panhui 3 ani în urmă
părinte
comite
870515f1db

BIN
.DS_Store


+ 1 - 1
.env.development

@@ -1 +1 @@
-VUE_APP_BASE_URL=https://pms.izouma.com
+VUE_APP_BASE_URL=https://pms.shycgy.net

+ 7 - 0
project.config.json

@@ -77,6 +77,13 @@
                     "query": "",
                     "scene": null
                 },
+                {
+                    "id": -1,
+                    "name": "首页",
+                    "pathName": "/pages/banner",
+                    "query": "",
+                    "scene": null
+                },
                 {
                     "id": -1,
                     "name": "信息",

BIN
src/.DS_Store


+ 7 - 0
src/main.js

@@ -26,6 +26,7 @@ export default {
         pages: [
             'pages/login',
             'pages/home',
+            'pages/banner',
             'pages/withdrawalExamine',
             'pages/my',
             'pages/repairReport',
@@ -56,6 +57,12 @@ export default {
             color: '#584C43',
             selectedColor: '#00BA64',
             list: [
+                {
+                    pagePath: 'pages/banner',
+                    text: '首页',
+                    iconPath: 'native/tabbar/homepage.png',
+                    selectedIconPath: 'native/tabbar/homepage_fill.png'
+                },
                 {
                     pagePath: 'pages/home',
                     text: '团队房间',

BIN
src/native/.DS_Store


BIN
src/native/tabbar/.DS_Store


BIN
src/native/tabbar/homepage.png


BIN
src/native/tabbar/homepage_fill.png


+ 146 - 0
src/pages/banner.vue

@@ -0,0 +1,146 @@
+<config>
+{
+    "navigationStyle": "custom",
+    "navigationBarTextStyle": "white",
+    "backgroundColorTop":'#00ba64',
+    "backgroundColorBottom":'#f5f7fa',
+}
+</config>
+<template>
+    <div class="app">
+        <img src="../native/yajing-png-bg@3x.png" alt="" class="bg" />
+        <swiper class="my-swiper" indicator-dots autoplay :interval="5000" :duration="500">
+            <block v-for="(item, index) in banners" :key="index">
+                <swiper-item>
+                    <img class="banner-img" :src="item.pic" alt="" />
+                </swiper-item>
+            </block>
+        </swiper>
+        <div class="list">
+            <div class="list-title">
+                热门门店
+            </div>
+            <div class="room" v-for="(item, index) in list" :key="index">
+                <img :src="item.pic" alt="" class="room-img" />
+                <div class="room-info">
+                    <div class="text1">{{ item.storeName }}</div>
+                    <div class="text2">
+                        <div class="text">
+                            <div>
+                                {{ item.address }}
+                            </div>
+                            <div>联系电话:{{ item.phone }}</div>
+                        </div>
+                        <div class="price">¥{{ item.money }}</div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            list: [],
+            banners: []
+        };
+    },
+    onShow() {
+        this.getBanner();
+        this.getList();
+    },
+    methods: {
+        getBanner() {
+            this.$http
+                .get('/banner/all', {
+                    sort: 'sort,asc'
+                })
+                .then(res => {
+                    this.banners = res.content;
+                });
+        },
+        getList() {
+            this.$http.get('/clientStoreInfo/all').then(res => {
+                this.list = res.content;
+            });
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.app {
+    background: #f5f7fa !important;
+    // padding-bottom: 200px;
+    padding-bottom: 50px;
+    min-height: 100vh;
+    position: relative;
+    padding-top: 62px;
+    .bg {
+        width: 100%;
+        height: 220px;
+        display: block;
+        position: absolute;
+        top: 0;
+        left: 0;
+    }
+}
+.my-swiper {
+    margin: 16px;
+    border-radius: 16px;
+    overflow: hidden;
+    height: 160px;
+    .banner-img {
+        height: 160px;
+        width: 100%;
+    }
+}
+.list {
+    padding: 16px;
+    .list-title {
+        font-size: 18px;
+        font-weight: bold;
+        color: #000000;
+        line-height: 24px;
+    }
+    .room-img {
+        width: 100%;
+        height: 160px;
+        display: block;
+    }
+    .room {
+        border-radius: 16px;
+        overflow: hidden;
+        margin-top: 16px;
+    }
+    .room-info {
+        background-color: #ffffff;
+        padding: 12px;
+        .text1 {
+            font-size: 17px;
+            font-weight: bold;
+            color: #000000;
+            line-height: 24px;
+        }
+        .text2 {
+            display: flex;
+            align-items: flex-end;
+            margin-top: 5px;
+            .text {
+                flex-grow: 1;
+                font-size: 13px;
+                color: #939599;
+                line-height: 18px;
+            }
+            .price {
+                font-size: 15px;
+                font-weight: bold;
+                color: #00ba64;
+                line-height: 21px;
+            }
+        }
+    }
+}
+</style>

+ 2 - 1
src/pages/home.vue

@@ -161,7 +161,8 @@ export default {
 .app {
     background: #f5f7fa !important;
     // padding-bottom: 200px;
-    height: 100vh;
+    padding-bottom: 50px;
+    min-height: 100vh;
     .top-img {
         width: 100%;
         background: #00ba64;