panhui 6 лет назад
Родитель
Сommit
6b438af239
58 измененных файлов с 2426 добавлено и 161 удалено
  1. 12 9
      project.config.json
  2. 75 23
      src/App.vue
  3. 24 0
      src/Constants.js
  4. 6 24
      src/app.json
  5. 78 0
      src/calc.js
  6. 1 1
      src/components/AdvertisingSpace.vue
  7. 17 5
      src/components/HotItem.vue
  8. 16 5
      src/components/MenuList.vue
  9. 14 5
      src/components/ProductClassifyItem.vue
  10. 147 0
      src/components/ProductComment.vue
  11. 17 8
      src/components/ProductItem.vue
  12. 106 3
      src/components/ShoppingCart.vue
  13. 249 0
      src/components/SpecificationsContent.vue
  14. 79 16
      src/pages/classify/classify.vue
  15. 3 1
      src/pages/home/home.json
  16. 123 25
      src/pages/home/home.vue
  17. 25 3
      src/pages/login/login.vue
  18. 5 0
      src/pages/product/product.js
  19. 5 0
      src/pages/product/product.json
  20. 615 0
      src/pages/product/product.vue
  21. 5 0
      src/pages/setting/setting.js
  22. 3 0
      src/pages/setting/setting.json
  23. 159 0
      src/pages/setting/setting.vue
  24. 3 1
      src/pages/shoppingCart/shoppingCart.json
  25. 81 6
      src/pages/shoppingCart/shoppingCart.vue
  26. 5 0
      src/pages/storeInfo/storeInfo.js
  27. 3 0
      src/pages/storeInfo/storeInfo.json
  28. 169 0
      src/pages/storeInfo/storeInfo.vue
  29. 5 0
      src/pages/user copy/user.js
  30. 3 0
      src/pages/user copy/user.json
  31. 32 0
      src/pages/user copy/user.vue
  32. 5 1
      src/pages/user/user.json
  33. 246 19
      src/pages/user/user.vue
  34. 5 0
      src/pages/webView/webView.js
  35. 3 0
      src/pages/webView/webView.json
  36. 26 0
      src/pages/webView/webView.vue
  37. 5 1
      src/store/store.js
  38. 30 0
      src/time.js
  39. 21 5
      src/utils/http.js
  40. BIN
      static/images/dingdan_icon_paizhao(1).png
  41. BIN
      static/images/dingdan_icon_paizhao(2).png
  42. BIN
      static/images/dingdan_icon_paizhao.png
  43. BIN
      static/images/dingdan_icon_yuyue(1).png
  44. BIN
      static/images/dingdan_icon_yuyue.png
  45. BIN
      static/images/icon_daohang.png
  46. BIN
      static/images/icon_dian.png
  47. BIN
      static/images/icon_dizhi.png
  48. 0 0
      static/images/icon_inter.png
  49. BIN
      static/images/icon_inter_bai.png
  50. BIN
      static/images/icon_pingjia.png
  51. BIN
      static/images/icon_pingjia_pre.png
  52. BIN
      static/images/icon_pingjia_yiban.png
  53. BIN
      static/images/icon_tanchuangclose_02.png
  54. BIN
      static/images/info_icon_jifen(1).png
  55. BIN
      static/images/info_icon_jifen(2).png
  56. BIN
      static/images/info_icon_jifen.png
  57. BIN
      static/images/info_icon_tongzhi.png
  58. BIN
      static/images/xiangqing_icon_kefu.png

+ 12 - 9
project.config.json

@@ -1,11 +1,13 @@
 {
 	"description": "项目配置文件。",
 	"setting": {
-		"urlCheck": true,
+		"urlCheck": false,
 		"es6": false,
 		"postcss": true,
 		"minified": true,
-		"newFeature": true
+		"newFeature": true,
+		"autoAudits": false,
+		"checkInvalidKey": true
 	},
 	"miniprogramRoot": "dist/wx/",
 	"compileType": "miniprogram",
@@ -31,19 +33,20 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 1,
+			"current": 0,
 			"list": [
 				{
-					"id": -1,
-					"name": "商品分类",
-					"pathName": "pages/classify/classify",
+					"id": 0,
+					"name": "商品详情",
+					"pathName": "pages/storeInfo/storeInfo",
 					"query": "",
 					"scene": null
 				},
 				{
-					"id": -1,
-					"name": "购物车",
-					"pathName": "pages/shoppingCart/shoppingCart",
+					"id": 1,
+					"name": "设置",
+					"pathName": "pages/setting/setting",
+					"query": "",
 					"scene": null
 				}
 			]

+ 75 - 23
src/App.vue

@@ -1,8 +1,46 @@
 <script>
 export default {
-  created () {
-    // 调用API从本地缓存中获取数据
-    /*
+    onLaunch() {
+        wx.getSystemInfo({
+            success: res => {
+                this.$store.commit('updateSysInfo', res);
+            },
+        });
+        try {
+            var token = wx.getStorageSync('token');
+            console.log(token)
+            if (token) {
+                this.$http.setToken(token);
+            } else {
+                // this.$http
+                //     .post('/auth/login', {
+                //         username: 'root',
+                //         password: '123456',
+                //         requireToken: true,
+                //     })
+                //     .then(res => {
+                //         if (res.success) {
+                //             wx.setStorageSync(
+                //                 'token',
+                //                 '' + res.token,
+                //             );
+                //               this.$http.setToken('' + res.token);
+                //         }
+                //     });
+                wx.reLaunch({
+                    url: '/pages/login/login',
+                });
+            }
+        } catch (e) {
+            wx.reLaunch({
+                url: '/pages/login/login',
+            });
+        }
+
+    },
+    created() {
+        // 调用API从本地缓存中获取数据
+        /*
      * 平台 api 差异的处理方式:  api 方法统一挂载到 mpvue 名称空间, 平台判断通过 mpvuePlatform 特征字符串
      * 微信:mpvue === wx, mpvuePlatform === 'wx'
      * 头条:mpvue === tt, mpvuePlatform === 'tt'
@@ -10,30 +48,44 @@ export default {
      * 支付宝(蚂蚁):mpvue === my, mpvuePlatform === 'my'
      */
 
-    let logs
-    if (mpvuePlatform === 'my') {
-      logs = mpvue.getStorageSync({key: 'logs'}).data || []
-      logs.unshift(Date.now())
-      mpvue.setStorageSync({
-        key: 'logs',
-        data: logs
-      })
-    } else {
-      logs = mpvue.getStorageSync('logs') || []
-      logs.unshift(Date.now())
-      mpvue.setStorageSync('logs', logs)
-    }
-
-  },
-  log () {
-    console.log(`log at:${Date.now()}`)
-  }
-}
+        let logs;
+        if (mpvuePlatform === 'my') {
+            logs = mpvue.getStorageSync({ key: 'logs' }).data || [];
+            logs.unshift(Date.now());
+            mpvue.setStorageSync({
+                key: 'logs',
+                data: logs,
+            });
+        } else {
+            logs = mpvue.getStorageSync('logs') || [];
+            logs.unshift(Date.now());
+            mpvue.setStorageSync('logs', logs);
+        }
+    },
+    log() {
+        console.log(`log at:${Date.now()}`);
+    },
+};
 </script>
 
-<style>
+<style   lang="less">
 page {
     width: 100%;
     height: 100%;
 }
+
+.swiper {
+    overflow: hidden;
+    .wx-swiper-dot {
+        width: 8rpx;
+        height: 8rpx;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 4rpx;
+    }
+
+    .wx-swiper-dot-active {
+        width: 22rpx;
+        background-color: #00c5f2;
+    }
+}
 </style>

+ 24 - 0
src/Constants.js

@@ -0,0 +1,24 @@
+exports.UploadStatus = {
+    PREPARING: -1,
+    WAITING: 1,
+    UPLOADING: 2,
+    PAUSE: 3,
+    FINISHED: 4,
+    ERROR: 5,
+};
+
+exports.DownloadStatus = {
+    PREPARING: -1,
+    WAITING: 1,
+    DOWNLOADING: 2,
+    PAUSE: 3,
+    FINISHED: 4,
+    ERROR: 5,
+};
+
+exports.PayMode = {
+    ALIPAY: 0,
+    WEI_XIN: 1,
+    COIN: 2,
+    CLIENT: 3,
+};

+ 6 - 24
src/app.json

@@ -4,7 +4,11 @@
         "pages/login/login",
         "pages/classify/classify",
         "pages/shoppingCart/shoppingCart",
-        "pages/user/user"
+        "pages/user/user",
+        "pages/setting/setting",
+        "pages/product/product",
+        "pages/storeInfo/storeInfo",
+        "pages/webView/webView"
     ],
     "window": {
         "backgroundTextStyle": "light",
@@ -13,7 +17,7 @@
     },
     "tabBar": {
         "color": "#B3B3B3",
-        "backgroundColor": "#fffff",
+        "backgroundColor": "#ffffff",
         "selectedColor": "#00C5F2",
         "borderStyle": "white",
 
@@ -38,28 +42,6 @@
             "iconPath": "static/tabs/tabbar_icon_04.png",
             "selectedIconPath": "static/tabs/tabbar_icon_04_pre.png"
         }],
-
-        "items": [{
-            "name": "首页",
-            "pagePath": "pages/home/home",
-            "icon": "static/tabs/tabbar_icon_01.png",
-            "activeIcon": "static/tabs/tabbar_icon_01_pre.png"
-        }, {
-            "name": "商品",
-            "pagePath": "pages/classify/classify",
-            "icon": "static/tabs/tabbar_icon_02.png",
-            "activeIcon": "static/tabs/tabbar_icon_02_pre.png"
-        }, {
-            "name": "购物车",
-            "pagePath": "pages/shoppingCart/shoppingCart",
-            "icon": "static/tabs/tabbar_icon_03.png",
-            "activeIcon": "static/tabs/tabbar_icon_03_pre.png"
-        }, {
-            "name": "我的",
-            "pagePath": "pages/home/home",
-            "icon": "static/tabs/tabbar_icon_04.png",
-            "activeIcon": "static/tabs/tabbar_icon_04_pre.png"
-        }],
         "position": "bottom"
     }
 }

+ 78 - 0
src/calc.js

@@ -0,0 +1,78 @@
+/*
+    函数,加法函数,用来得到精确的加法结果  
+    说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。
+    参数:arg1:第一个加数;arg2第二个加数;d要保留的小数位数(可以不传此参数,如果不传则不处理小数位数)
+    调用:calc.Add(arg1,arg2,d)  
+    返回值:两数相加的结果
+    */
+exports.Add = function(arg1, arg2) {
+    console.log(arg1, arg2);
+    if (arg1 && arg2) {
+        (arg1 = arg1.toString()), (arg2 = arg2.toString());
+        var arg1Arr = arg1.split('.'),
+            arg2Arr = arg2.split('.'),
+            d1 = arg1Arr.length == 2 ? arg1Arr[1] : '',
+            d2 = arg2Arr.length == 2 ? arg2Arr[1] : '';
+        var maxLen = Math.max(d1.length, d2.length);
+        var m = Math.pow(10, maxLen);
+        var result = Number(((arg1 * m + arg2 * m) / m).toFixed(maxLen));
+        var d = arguments[2];
+        console.log(d);
+        console.log(result);
+        return typeof d === 'number' ? Number(result.toFixed(d)) : result;
+    }
+};
+/*
+    函数:减法函数,用来得到精确的减法结果  
+    说明:函数返回较为精确的减法结果。 
+    参数:arg1:第一个加数;arg2第二个加数;d要保留的小数位数(可以不传此参数,如果不传则不处理小数位数
+    调用:calc.Sub(arg1,arg2)  
+    返回值:两数相减的结果
+    */
+exports.Sub = function(arg1, arg2) {
+    if (arg1 && arg2) {
+        return this.Add(arg1, -Number(arg2), arguments[2]);
+    }
+};
+/*
+    函数:乘法函数,用来得到精确的乘法结果  
+    说明:函数返回较为精确的乘法结果。 
+    参数:arg1:第一个乘数;arg2第二个乘数;d要保留的小数位数(可以不传此参数,如果不传则不处理小数位数)
+    调用:calc.Mul(arg1,arg2)  
+    返回值:两数相乘的结果
+    */
+exports.Mul = function(arg1, arg2) {
+    if (arg1 && arg2) {
+        var r1 = arg1.toString(),
+            r2 = arg2.toString(),
+            m,
+            resultVal,
+            d = arguments[2];
+        m =
+            (r1.split('.')[1] ? r1.split('.')[1].length : 0) +
+            (r2.split('.')[1] ? r2.split('.')[1].length : 0);
+        resultVal = Number(r1.replace('.', '')) * Number(r2.replace('.', '')) / Math.pow(10, m);
+        return typeof d !== 'number' ? Number(resultVal) : Number(resultVal.toFixed(parseInt(d)));
+    }
+};
+/*
+    函数:除法函数,用来得到精确的除法结果  
+    说明:函数返回较为精确的除法结果。 
+    参数:arg1:除数;arg2被除数;d要保留的小数位数(可以不传此参数,如果不传则不处理小数位数)
+    调用:calc.Div(arg1,arg2)  
+    返回值:arg1除于arg2的结果
+    */
+exports.Div = function(arg1, arg2) {
+    if (arg1 && arg2) {
+        var r1 = arg1.toString(),
+            r2 = arg2.toString(),
+            m,
+            resultVal,
+            d = arguments[2];
+        m =
+            (r2.split('.')[1] ? r2.split('.')[1].length : 0) -
+            (r1.split('.')[1] ? r1.split('.')[1].length : 0);
+        resultVal = Number(r1.replace('.', '')) / Number(r2.replace('.', '')) * Math.pow(10, m);
+        return typeof d !== 'number' ? Number(resultVal) : Number(resultVal.toFixed(parseInt(d)));
+    }
+};

+ 1 - 1
src/components/AdvertisingSpace.vue

@@ -52,7 +52,7 @@ export default {
 .adList {
     display: flex;
     justify-content: space-between;
-    margin: 30rpx 0;
+    margin:0 0 30rpx;
 
     .line{
         width: 18rpx;

+ 17 - 5
src/components/HotItem.vue

@@ -1,17 +1,26 @@
 <template>
-    <div class='hotItem'>
+    <navigator :url="'/pages/product/product?id='+info.id" class='hotItem'>
         <div class="img">
-            <img src="/static/images/home_banner_01.png" class="bgImg" background-size="cover" alt="">
+            <img v-if="info.image" :src="info.image+'?x-oss-process=image/resize,m_fill,h_81,w_109'" class="bgImg" background-size="cover" alt="">
+            <img class="bgImg" v-else src="/static/images/icon_sirendingzhi.png" background-size="cover" alt="">
             <div class="fixedLabel">热卖</div>
         </div>
 
-        <div class="title">写真修图套餐写真修图套餐…</div>
-        <div class="sub">一站式套餐</div>
-    </div>
+        <div class="title">{{info.title}}</div>
+        <div class="sub">{{info.serviceDetail}}</div>
+    </navigator>
 </template>
 <script>
 export default {
     name: 'hotItem',
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            },
+        },
+    },
     data() {
         return {};
     },
@@ -70,6 +79,9 @@ export default {
         color: rgba(153, 153, 153, 1);
         line-height: 34rpx;
         margin-top: 2rpx;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
     }
 }
 </style>

+ 16 - 5
src/components/MenuList.vue

@@ -1,13 +1,14 @@
 <template>
     <div class="menuList">
-        <div class="menu-item">
+        <!-- <div class="menu-item">
             <img src="/static/images/home_icon_shiren.png" alt="">
             <div>私人定制</div>
-        </div>
+        </div> -->
 
         <div class="menu-item">
             <img src="/static/images/home_icon_zaixian.png" alt="">
             <div>在线客服</div>
+             <button open-type="contact"> 客服</button>
         </div>
 
         <div class="menu-item">
@@ -15,10 +16,10 @@
             <div>联系我们</div>
         </div>
 
-        <div class="menu-item">
+        <navigator url="/pages/storeInfo/storeInfo" class="menu-item">
             <img src="/static/images/home_icon_dianpu.png" alt="">
             <div>店铺介绍</div>
-        </div>
+        </navigator>
     </div>
 </template>
 <script>
@@ -32,12 +33,13 @@ export default {
 .menuList {
     display: flex;
     padding: 50rpx;
-    justify-content: space-between;
+    justify-content: space-around;
 
     .menu-item {
         display: flex;
         flex-direction: column;
         align-items: center;
+        position:relative;
         img {
             width: 128rpx;
             height: 128rpx;
@@ -49,6 +51,15 @@ export default {
             line-height: 36rpx;
             transform: translateY(-10rpx);
         }
+
+        button{
+            position: absolute;
+            left: 0;
+            right: 0;
+            top: 0;
+            bottom: 0;
+            opacity: 0;
+        }
     }
 }
 </style>

+ 14 - 5
src/components/ProductClassifyItem.vue

@@ -1,19 +1,28 @@
 <template>
-    <div class='productItem'>
+    <navigator :url="'/pages/product/product?id='+info.id" class='productItem'>
         <div class="img">
-            <img src="/static/images/home_banner_01.png" class="bgImg" background-size="cover" alt="">
+            <img v-if="info.image" :src="info.image+'?x-oss-process=image/resize,m_fill,h_110,w_110'" class="bgImg" background-size="cover" alt="">
+            <img class="bgImg" v-else src="/static/images/icon_sirendingzhi.png" background-size="cover" alt="">
             <!-- <div class="fixedLabel">热卖</div> -->
         </div>
         <div class="content">
-            <div class="title">写真修图套餐写真修图套餐…</div>
-            <div class="price">688</div>
+            <div class="title">{{info.title}}</div>
+            <div class="price">{{info.price}}</div>
 
         </div>
-    </div>
+    </navigator>
 </template>
 <script>
 export default {
     name: 'productItem',
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            },
+        },
+    },
     data() {
         return {};
     },

+ 147 - 0
src/components/ProductComment.vue

@@ -0,0 +1,147 @@
+<template>
+    <div class='comment'>
+        <div class="top">
+
+            <img class="icon" :src='userInfo.icon' background-size="cover">
+            <div class="user">
+                <div class="name">{{userInfo.username}}</div>
+                <div class="time">{{getTime}}</div>
+            </div>
+            <div class="imgList">
+                <img :src="item" v-for="(item,index) in imgList" :key="index" alt="">
+            </div>
+        </div>
+
+        <div class="text" v-if="info.context">
+            {{info.context}}
+        </div>
+
+        <div class="sub" v-else>
+            系统自动好评
+        </div>
+
+        <div class="commentImgs" v-if="info.productCommentImageList.length>0">
+            <img :src="item.imageUrl" v-for="(item,index) in info.productCommentImageList" background-size="cover" :key="index" alt="">
+        </div>
+    </div>
+</template>
+<script>
+import { formatTime } from '../time';
+export default {
+    name: 'productComment',
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            },
+        },
+    },
+    data() {
+        return {};
+    },
+    computed: {
+        userInfo() {
+            return this.info.userInfo || {};
+        },
+        imgList() {
+            var list = [
+                require('../../static/images/icon_pingjia.png'),
+                require('../../static/images/icon_pingjia_yiban.png'),
+                require('../../static/images/icon_pingjia_pre.png'),
+            ];
+            var img = [list[0], list[0], list[0], list[0], list[0]];
+            if (this.info.starLevel) {
+                var starLevel = Number(this.info.starLevel);
+                img = [];
+                for (var i = 0; i < 5; i++) {
+                    if (
+                        Math.floor(starLevel) == i &&
+                        Math.ceil(starLevel) > i
+                    ) {
+                        img.push(list[1]);
+                    } else if (starLevel <= i) {
+                        img.push(list[0]);
+                    } else if (starLevel > i) {
+                        img.push(list[2]);
+                    }
+                }
+            }
+            return img;
+        },
+        getTime() {
+            return formatTime(this.info.createTime, 'YMD');
+        },
+    },
+};
+</script>
+<style lang='less' scoped>
+.comment {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 8px;
+    margin: 0 15px 10px;
+    padding: 0 15px;
+
+    .top {
+        display: flex;
+        padding: 15px 0 22px;
+        .icon {
+            width: 32px;
+            height: 32px;
+            background: rgba(242, 244, 245, 1);
+            border-radius: 100%;
+        }
+
+        .user {
+            flex-grow: 1;
+            margin-left: 9px;
+
+            .name {
+                font-size: 13px;
+                color: rgba(0, 0, 0, 1);
+                line-height: 18px;
+            }
+
+            .time {
+                font-size: 12px;
+                color: rgba(153, 153, 153, 1);
+                line-height: 17px;
+            }
+        }
+
+        .imgList {
+            display: flex;
+            img {
+                width: 14px;
+                height: 14px;
+                margin-left: 4px;
+            }
+        }
+    }
+
+    .text {
+        font-size: 14px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 20px;
+        padding-bottom: 15px;
+    }
+
+    .sub {
+        font-size: 14px;
+        color: #666;
+        line-height: 20px;
+        padding-bottom: 15px;
+    }
+
+    .commentImgs {
+        display: flex;
+        flex-wrap: wrap;
+        padding: 0 0 15px;
+        img {
+            width: 90px;
+            height: 90px;
+            margin-right: 5px;
+        }
+    }
+}
+</style>

+ 17 - 8
src/components/ProductItem.vue

@@ -1,27 +1,36 @@
 <template>
-    <div class='productItem'>
+    <navigator :url="'/pages/product/product?id='+info.id" class='productItem'>
         <div class="img">
-            <img src="/static/images/home_banner_01.png" class="bgImg" background-size="cover" alt="">
+            <img v-if="info.image" :src="info.image+'?x-oss-process=image/resize,m_fill,h_116,w_168'" class="bgImg" background-size="cover" alt="">
+             <img class="bgImg" v-else src="/static/images/icon_sirendingzhi.png" background-size="cover" alt="">
             <!-- <div class="fixedLabel">热卖</div> -->
         </div>
         <div class="content">
-            <div class="title">写真修图套餐写真修图套餐…</div>
-            <div class="price">688</div>
+            <div class="title">{{info.title}}</div>
+            <div class="price">{{info.price}}</div>
 
             <div class="sub">
                 <div class="subItem">
-                    已售 233
+                    已售 {{info.salesVolume}}
                 </div>
                 <div class="subItem">
-                    好评 98%
+                    好评 {{info.praise}}%
                 </div>
             </div>
         </div>
-    </div>
+    </navigator>
 </template>
 <script>
 export default {
     name: 'productItem',
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            },
+        },
+    },
     data() {
         return {};
     },
@@ -33,7 +42,7 @@ export default {
     min-width: 334rpx;
     margin: 10rpx;
     background-color: #fff;
-    border-radius:4px;
+    border-radius: 4px;
     overflow: hidden;
 
     .img {

+ 106 - 3
src/components/ShoppingCart.vue

@@ -5,12 +5,26 @@
 
         <img src="/static/images/home_banner_01.png" class="productImg" background-size="cover" alt="">
 
-
         <div class="content">
-            <div class="title"></div>
+            <div class="title">告白系列高端修图套餐</div>
+
+            <div class="lable">
+                <span>定金支付</span>
+                <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
+            </div>
 
-            div.
+            <div class="money">
+                <div class="price">1200</div>
+                <div class="num">
+                    <img v-if="num>1" @click="subNum" src="/static/images/icon_jianqu.png" alt="">
+                    <img v-else src="/static/images/icon_jianqu_dis.png" alt="">
+                    <input type="number" v-model="num" confirm-type='done' @input="checkNum" />
+                    <img v-if="num<100" @click="addNum" src="/static/images/icon_zengjia.png" alt="">
+                    <img v-else src="/static/images/icon_zengjia_dis.png" alt="">
+                </div>
+            </div>
         </div>
+
     </div>
 </template>
 <script>
@@ -20,11 +34,23 @@ export default {
     data() {
         return {
             isChoose: false,
+            num: 1,
         };
     },
     computed: {
         ...mapState(['userInfo']),
     },
+    methods: {
+        addNum() {
+            this.num = Number(this.num) + 1;
+        },
+        subNum() {
+            this.num = Number(this.num) - 1;
+        },
+        checkNum() {
+            this.num = Number(this.num);
+        },
+    },
 };
 </script>
 <style lang='less' scoped>
@@ -34,6 +60,9 @@ export default {
     border-radius: 16rpx;
     display: flex;
     align-items: center;
+    padding: 30rpx;
+    box-sizing: border-box;
+    margin: 20rpx 30rpx;
 
     .leftIcon {
         width: 32rpx;
@@ -48,4 +77,78 @@ export default {
         border-radius: 4px;
     }
 }
+
+.content {
+    flex-grow: 1;
+    height: 160rpx;
+    padding-left: 22rpx;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    align-items: flex-start;
+    .title {
+        font-size: 28rpx;
+        color: rgba(0, 0, 0, 1);
+        line-height: 40rpx;
+    }
+
+    .lable {
+        display: flex;
+        background: rgba(242, 244, 245, 1);
+        border-radius: 4px;
+
+        img {
+            width: 44rpx;
+            height: 44rpx;
+        }
+
+        span {
+            padding: 4rpx 4rpx 6rpx 12rpx;
+            font-size: 24rpx;
+            color: rgba(153, 153, 153, 1);
+            line-height: 34rpx;
+        }
+    }
+
+    .money {
+        display: flex;
+        justify-content: space-between;
+        align-self: stretch;
+        align-items: center;
+
+        .price {
+            font-size: 32rpx;
+            font-weight: bold;
+            color: rgba(255, 59, 48, 1);
+            line-height: 44rpx;
+
+            &::before {
+                content: '¥';
+            }
+        }
+
+        .num {
+            display: flex;
+            align-items: center;
+
+            input {
+                width: 72rpx;
+                height: 40rpx;
+                background: rgba(242, 244, 245, 1);
+                border-radius: 4px;
+                font-size: 28rpx;
+                font-weight: bold;
+                color: rgba(0, 0, 0, 1);
+                text-align: center;
+                margin: 0 8rpx;
+            }
+
+            img {
+                min-width: 40rpx;
+                width: 40rpx;
+                height: 40rpx;
+            }
+        }
+    }
+}
 </style>

+ 249 - 0
src/components/SpecificationsContent.vue

@@ -0,0 +1,249 @@
+<template>
+    <div class='box weui-animate-fade-in' v-if="visible" @click="close()">
+        <div class="content weui-animate-slide-up" @click.stop=''>
+            <img class="image" v-if="productInfo.image" :src="productInfo.image+'?x-oss-process=image/resize,m_fill,h_120,w_120'" background-size="cover" alt="">
+            <img class="image" v-else src="/static/images/icon_sirendingzhi.png" background-size="cover" alt="">
+            <div class="price">
+                {{totalMoney}}
+            </div>
+
+            <div class="chosse">
+                <div class="title">选择支付方式</div>
+
+                <div class="lableList">
+                    <div class="lable" :class="{select:chooseType=='all'}" @click="changeType('all')">支付全价</div>
+                    <div class="lable" v-if="productInfo.downPayment" :class="{select:chooseType=='down'}" @click="changeType('down')">支付定金</div>
+                </div>
+            </div>
+
+            <div class="num">
+                <div class="title">
+                    购买数量
+                </div>
+                <div class="numVal">
+                    <img v-if="num>1" @click="subNum" src="/static/images/icon_jianqu.png" alt="">
+                    <img v-else src="/static/images/icon_jianqu_dis.png" alt="">
+                    <input type="number" v-model="num" confirm-type='done' @input="checkNum" />
+                    <img v-if="num<100" @click="addNum" src="/static/images/icon_zengjia.png" alt="">
+                    <img v-else src="/static/images/icon_zengjia_dis.png" alt="">
+                </div>
+            </div>
+
+            <button class="sureBtn" @click="close('sure')">
+                确定
+            </button>
+
+            <img src="/static/images/icon_tanchuangclose_02.png" @click="close" alt="" class="close">
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    name: 'SpecificationsContent',
+    props: {
+        visible: {
+            type: Boolean,
+            default: false,
+        },
+        productInfo: {
+            type: Object,
+            default: () => {
+                return {};
+            },
+        },
+        totalMoney: {
+            type: Number,
+            default: 0,
+        },
+        chooseType: {
+            type: String,
+            default: 'all',
+        },
+        chooseNum: {
+            type: Number,
+            default: 1,
+        },
+    },
+    data() {
+        return {
+            num: 1,
+            preInfo: {
+                chooseNum: 1,
+                chooseType: 'all',
+            },
+        };
+    },
+    watch: {
+        num() {
+            this.$emit('changeNum', this.num);
+        },
+        visible() {
+            this.num = this.chooseNum;
+            this.preInfo.chooseNum = this.chooseNum;
+            this.preInfo.chooseType = this.chooseType;
+        },
+    },
+    mounted() {},
+    methods: {
+        addNum() {
+            this.num = Number(this.num) + 1;
+        },
+        subNum() {
+            this.num = Number(this.num) - 1;
+        },
+        checkNum() {
+            this.num = Number(this.num);
+        },
+        close(type) {
+            if (!type) {
+                this.$emit('changeNum', this.preInfo.chooseNum);
+                this.$emit('changeType', this.preInfo.chooseType);
+            }
+            else{
+                this.$emit('changeChoose')
+            }
+            this.$emit('close');
+        },
+        changeType(type) {
+            this.$emit('changeType', type);
+        },
+    },
+    computed: {},
+};
+</script>
+<style lang='less' scoped>
+.box {
+    background-color: rgba(0, 0, 0, 0.5);
+    position: fixed;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    z-index: 200;
+}
+.content {
+    bottom: 0;
+    left: 0;
+    z-index: 201;
+    position: fixed;
+    width: 100%;
+    height: 320px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 8px 8px 0px 0px;
+    box-sizing: border-box;
+    padding: 40px 20px 8px;
+
+    .image {
+        width: 120px;
+        height: 120px;
+        border-radius: 6px;
+        position: absolute;
+        left: 20px;
+        top: -40px;
+    }
+
+    .price {
+        padding-left: 136px;
+        font-size: 22px;
+        font-weight: bold;
+        color: rgba(255, 59, 48, 1);
+        line-height: 30px;
+
+        &::before {
+            content: '¥';
+            font-size: 16px;
+        }
+    }
+
+    .close {
+        position: absolute;
+        right: 10px;
+        top: 10px;
+        width: 26px;
+        height: 26px;
+    }
+
+    .chosse {
+        margin-top: 30px;
+        .title {
+            font-size: 14px;
+            font-weight: bold;
+            color: rgba(0, 0, 0, 1);
+            line-height: 20px;
+        }
+
+        .lableList {
+            display: flex;
+            align-items: center;
+            margin-top: 15px;
+
+            .lable {
+                font-size: 14px;
+                color: rgba(51, 51, 51, 1);
+                line-height: 32px;
+                text-align: center;
+                background: rgba(242, 244, 245, 1);
+                width: 96px;
+                height: 32px;
+                border-radius: 16px;
+                margin-right: 20px;
+
+                &.select {
+                    background: rgba(0, 197, 242, 1);
+                    color: #ffffff;
+                }
+            }
+        }
+    }
+
+    .num {
+        display: flex;
+        justify-content: space-between;
+        align-self: stretch;
+        align-items: center;
+        margin-top: 34px;
+
+        .title {
+            font-size: 14px;
+            font-weight: bold;
+            color: rgba(0, 0, 0, 1);
+            line-height: 20px;
+        }
+
+        .numVal {
+            display: flex;
+            align-items: center;
+
+            input {
+                width: 60px;
+                height: 28px;
+                background: rgba(242, 244, 245, 1);
+                border-radius: 4px;
+                font-size: 28rpx;
+                font-weight: bold;
+                color: rgba(0, 0, 0, 1);
+                text-align: center;
+                margin: 0 8rpx;
+            }
+
+            img {
+                min-width: 28px;
+                width: 28px;
+                height: 28px;
+            }
+        }
+    }
+
+    .sureBtn {
+        width: 100%;
+        height: 40px;
+        background: rgba(0, 197, 242, 1);
+        border-radius: 22px;
+        font-size: 15px;
+        font-weight: bold;
+        color: rgba(255, 255, 255, 1);
+        line-height: 40px;
+        margin-top: 40px;
+    }
+}
+</style>

+ 79 - 16
src/pages/classify/classify.vue

@@ -3,14 +3,8 @@
         <scroll-view class="left"
                      scroll-y
                      scroll-with-animation>
-            <div class="classifyItem">
-                超值热卖
-            </div>
-            <div class="classifyItem select">
-                超值热卖
-            </div>
-            <div class="classifyItem" v-for="i in 10" :key="i">
-                超值热卖
+            <div class="classifyItem" @click="choose(item.id)" :class="{select:item.id==chooseType}" v-for="(item,index) in typeList" :key="index">
+                {{item.typeName}}
             </div>
 
         </scroll-view>
@@ -18,18 +12,20 @@
         <scroll-view class="right"
                      scroll-y
                      scroll-with-animation
-                     @scroll="scrollProduct">
+                     @scrolltolower="scrollProduct">
             <div class="rightContent">
-                <div class="customized">
+                <!-- <div class="customized">
                     <img src="/static/images/icon_shirendingzhi.png" alt="">
                     <span>私人定制</span>
-                </div>
+                </div> -->
 
                 <div class="productList">
-                    <productClassifyItem v-for="i in 20" :key="i"></productClassifyItem>
+                    <productClassifyItem v-for="(item,index) in productList" :key="index" :info='item'></productClassifyItem>
                 </div>
-
-                <view class="weui-loadmore">
+                <view class="weui-loadmore" v-if="isFinish">
+                    <view class="weui-loadmore__tips"></view>
+                </view>
+                <view class="weui-loadmore" v-else>
                     <view class="weui-loading"></view>
                     <view class="weui-loadmore__tips">正在加载</view>
                 </view>
@@ -43,10 +39,77 @@
 import productClassifyItem from '../../components/ProductClassifyItem';
 export default {
     data() {
-        return {};
+        return {
+            typeList: [],
+            chooseType: 0,
+            currentPage: 1,
+            productList: [],
+            flag: false,
+            isFinish: false,
+        };
+    },
+    onLoad() {
+        this.$http
+            .get('/itemType/itemTree')
+            .then(res => {
+                if (res.success) {
+                    this.typeList = res.data;
+                    if (res.data.length > 0) {
+                        this.chooseType = res.data[0].id;
+                        this.getProduct();
+                    }
+                }
+            })
+            .catch(e => {
+                console.log(e);
+            });
     },
     methods: {
-        scrollProduct() {},
+        scrollProduct() {
+            if(this.flag){
+                this.currentPage++;
+                this.getProduct()
+            }
+        },
+        getProduct() {
+            this.flag = false;
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: 10,
+                serviceType: this.chooseType,
+            };
+            if (this.currentPage == 1) {
+                this.productList = [];
+            }
+            this.$http
+                .get('/productInfo/page', data)
+                .then(res => {
+                    if (res.success) {
+                        this.productList = this.productList.concat(res.data.pp);
+                        if (
+                            res.data.page.currentPage < res.data.page.totalPage
+                        ) {
+                            // console.log('aaaaaa')
+                            this.flag = true;
+                        } else {
+                            this.isFinish = true;
+                        }
+                    }
+                })
+                .catch(e => {
+                    console.log(e);
+                });
+        },
+        choose(id){
+            if(this.chooseType==id){
+                return;
+            }
+
+            this.chooseType=id;
+            this.isFinish=false;
+            this.currentPage=1;
+            this.getProduct()
+        }
     },
     components: {
         productClassifyItem,

+ 3 - 1
src/pages/home/home.json

@@ -1,5 +1,7 @@
 {
 
     "navigationBarTextStyle": "white",
-    "navigationBarBackgroundColor": "#00C5F2"
+    "navigationBarBackgroundColor": "#00C5F2",
+    "backgroundColorTop": "#00C5F2",
+    "backgroundColorBottom": "#f2f4f5"
 }

+ 123 - 25
src/pages/home/home.vue

@@ -10,14 +10,17 @@
                            placeholder-class="placeholder" @keypress.enter="searchGoods()" />
 
                 </view>
-                <img src="/static/images/icon_weizhi2.png" class="weixin" alt="">
+                <div class="kefu">
+                    <img src="/static/images/icon_weizhi2.png" class="weixin" alt="">
+                    <button open-type="contact"> 客服</button>
+                </div>
 
             </view>
 
             <swiper indicator-dots autoplay circular class="swiper">
                 <block v-for="(item,index) in swiperList" :key="index">
                     <swiper-item>
-                        <image mode="aspectCover" :src="item.img"></image>
+                        <image mode="aspectFill" :src="item.imageUrl"></image>
                     </swiper-item>
                 </block>
             </swiper>
@@ -36,7 +39,7 @@
                     </navigator>
                     <scroll-view scroll-x style="width: 100%">
                         <div class="hotList">
-                            <hotItem v-for="i in 10" :key="i"></hotItem>
+                            <hotItem v-for="(item,index) in hotList" :key="index" :info='item'></hotItem>
                             <div class="right"></div>
                         </div>
                     </scroll-view>
@@ -50,10 +53,12 @@
                     </navigator>
 
                     <div class="classicsList">
-                        <productItem v-for="i in 10" :key="i"></productItem>
+                        <productItem v-for="(item,index) in homeList" :key="index" :info='item'></productItem>
                     </div>
-
-                    <view class="weui-loadmore">
+                    <view class="weui-loadmore" v-if="isFinish">
+                        <view class="weui-loadmore__tips">没有更多数据了</view>
+                    </view>
+                    <view class="weui-loadmore" v-else>
                         <view class="weui-loading"></view>
                         <view class="weui-loadmore__tips">正在加载</view>
                     </view>
@@ -76,26 +81,108 @@ export default {
         return {
             inputVal: '',
             inputShowed: false,
-            swiperList: [
-                {
-                    img: '/static/images/home_banner_01.png',
-                },
-                {
-                    img: '/static/images/home_banner_01.png',
-                },
-                {
-                    img: '/static/images/home_banner_01.png',
-                },
-            ],
+            swiperList: [],
+            currentHot: 1,
+            hotList: [],
+            hotFlag: false,
+            currentHome: 1,
+            homeList: [],
+            homeFlag: false,
+            isFinish: false,
         };
     },
+    onLoad() {
+        this.$http
+            .get('/storeInfo/getOne', { id: 13 })
+            .then(res => {
+                if (res.success) {
+                    this.$store.commit('updateStoreInfo', res.data);
+                    wx.setNavigationBarTitle({
+                        title: res.data.storeName,
+                    });
+                }
+            })
+            .catch(e => {
+                console.log(e);
+            });
+
+        this.$http
+            .get('/bannerInfo/all')
+            .then(res => {
+                if (res.success) {
+                    this.swiperList = res.data;
+                }
+            })
+            .catch(e => {
+                console.log(e);
+            });
+
+        this.getHot();
+        this.getHome();
+    },
+    onReachBottom() {
+        if (this.homeFlag) {
+            this.currentHome++;
+            this.getHome();
+        }
+    },
     methods: {
         clearInput() {},
-    },
-    onShow() {
-        wx.setNavigationBarTitle({
-            title: '美瑞莉娜工作室',
-        });
+        getHot() {
+            this.hotFlag = false;
+            var data = {
+                currentPage: this.currentHot,
+                pageNumber: 10,
+                hotFlag: 1,
+            };
+            if (this.currentHot == 1) {
+                this.hotList = [];
+            }
+            this.$http
+                .get('/productInfo/page', data)
+                .then(res => {
+                    if (res.success) {
+                        this.hotList = this.hotList.concat(res.data.pp);
+                        if (
+                            res.data.page.currentPage < res.data.page.totalPage
+                        ) {
+                            this.hotFlag = true;
+                        }
+                    }
+                })
+                .catch(e => {
+                    console.log(e);
+                });
+        },
+        getHome() {
+            this.homeFlag = false;
+            var data = {
+                currentPage: this.currentHome,
+                pageNumber: 10,
+                homeFlag: 1,
+            };
+            if (this.currentHome == 1) {
+                this.homeList = [];
+            }
+            this.$http
+                .get('/productInfo/page', data)
+                .then(res => {
+                    if (res.success) {
+                        this.homeList = this.homeList.concat(res.data.pp);
+                        if (
+                            res.data.page.currentPage < res.data.page.totalPage
+                        ) {
+                            // console.log('aaaaaa')
+                            this.homeFlag = true;
+                        } else {
+                            this.isFinish = true;
+                        }
+                    }
+                })
+                .catch(e => {
+                    console.log(e);
+                });
+        },
     },
     components: {
         menuList,
@@ -143,6 +230,18 @@ export default {
         }
     }
 
+    .kefu {
+        position: relative;
+        button {
+            position: absolute;
+            left: 0;
+            top: 0;
+            right: 0;
+            bottom: 0;
+            opacity: 0;
+        }
+    }
+
     .weixin {
         width: 48rpx;
         height: 48rpx;
@@ -153,6 +252,8 @@ export default {
 .swiper {
     margin: 0 30rpx;
     height: 320rpx;
+    border-radius: 8px;
+    overflow: hidden;
     image {
         width: 100%;
         height: 320rpx;
@@ -184,8 +285,6 @@ export default {
         position: relative;
         z-index: 2;
     }
-
-   
 }
 
 .linearBg {
@@ -195,7 +294,6 @@ export default {
         rgba(242, 242, 242, 1) 100%
     );
     padding-bottom: 10rpx;
-
 }
 
 .hotList {

+ 25 - 3
src/pages/login/login.vue

@@ -19,10 +19,29 @@ export default {
     },
     methods: {
         login() {
+            var ref = this;
             wx.login({
                 success(res) {
                     if (res.code) {
-                      console.log(res)
+                        console.log(res.code);
+                        ref.$http
+                            .post('auth/loginMiniApp', {
+                                code: res.code,
+                                requireToken: true,
+                            })
+                            .then(res => {
+                                if (res.success) {
+                                    ref.sessionKey = res.data.sessionKey;
+                                    wx.setStorageSync(
+                                        'token',
+                                        '' + res.token,
+                                    );
+                                    ref.$http.setToken('' + res.token);
+                                }
+                            })
+                            .catch(e => {
+                                console.log(e);
+                            });
                     } else {
                         console.log('登录失败!' + res.errMsg);
                     }
@@ -31,10 +50,9 @@ export default {
             // this.showCityPopup = true;
         },
         onGetUserInfo(e) {
-            console.log(e);
             let detail = e.mp.detail;
             this.$http
-                .post('user/getMiniAppUserInfo', {
+                .post('userInfo/getMiniAppUserInfo', {
                     sessionKey: this.sessionKey,
                     rawData: detail.rawData,
                     signature: detail.signature,
@@ -44,6 +62,10 @@ export default {
                 .then(res => {
                     console.log(res);
                     if (res.success) {
+                        this.$store.commit('updateUserInfo', res.data);
+                        wx.reLaunch({
+                            url: '/pages/home/home',
+                        });
                     }
                 });
         },

+ 5 - 0
src/pages/product/product.js

@@ -0,0 +1,5 @@
+import Vue from 'vue'
+import App from './product.vue'
+
+const app = new Vue(App)
+app.$mount()

+ 5 - 0
src/pages/product/product.json

@@ -0,0 +1,5 @@
+{
+    "navigationBarTitleText": "",
+    "backgroundColorTop": "#fff",
+    "backgroundColorBottom": "#f2f4f5"
+}

+ 615 - 0
src/pages/product/product.vue

@@ -0,0 +1,615 @@
+<template>
+    <div class="container" :style="{height:showSpecifications?'100%':'auto',overflow:showSpecifications?'hidden':''}">
+
+        <swiper indicator-dots autoplay circular class="swiper">
+            <block v-for="(item,index) in bannerList" :key="index">
+                <swiper-item>
+                    <image mode="aspectFill" :src="item.image"></image>
+                </swiper-item>
+            </block>
+        </swiper>
+
+        <div class="pay">
+            <div class="kefu">
+
+                <button open-type="contact"> 客服</button>
+
+                <img src="/static/images/xiangqing_icon_kefu.png" alt="">
+                <div class="text">在线咨询</div>
+            </div>
+
+            <div class="btnList">
+                <div>加入购物车</div>
+                <div>立即下单</div>
+            </div>
+        </div>
+
+        <div class="productInfo">
+            <div class="title">{{productInfo.title}}</div>
+            <div class="sub">{{productInfo.serviceDetail}}</div>
+
+            <div class="money">
+                <div class="price">{{productInfo.price}}</div>
+
+                <div class="down" v-if="productInfo.downPayment">
+                    <span>可先支付定金:</span>
+                    <span class="downPrice">{{productInfo.downPayment}}</span>
+                </div>
+            </div>
+
+            <div class="sale">
+                <span>已售 {{productInfo.salesVolume}}</span>
+                <span>好评 {{productInfo.praise}}%</span>
+            </div>
+
+            <div class="chooseSpecifications" @click="chooseSpecifications">
+                <span class="name">选择规格</span>
+                <span class="val">请选择</span>
+                <img src="/static/images/icon_inter.png" alt="">
+            </div>
+        </div>
+
+        <div class='main'>
+
+            <div class="tabList">
+                <div class="tabItem" :class="{select:nowSelectTab==0}" @click="chooseTab(0)">
+                    客片展示
+                </div>
+                <div class="tabItem" :class="{select:nowSelectTab==1}" @click="chooseTab(1)">
+                    产品详情
+                </div>
+                <div class="tabItem" :class="{select:nowSelectTab==2}" @click="chooseTab(2)">
+                    评价(256)
+                </div>
+
+                <div class="line" :style="{left:(100*nowSelectTab+77.5)+'px'}"></div>
+            </div>
+
+            <div class="mainDetail">
+
+                <div class="imgList" v-if="nowSelectTab==0">
+                    <image mode="widthFix" :src="item.image" v-for="(item,index) in detailList" :key="index" alt=""></image>
+                </div>
+
+                <div class="productDetail" v-if="nowSelectTab==1">
+                    <div class="detail-item" v-for="(item,index) in productParameters" :key="index">
+                        <div class="name">{{item.parameterKey}}</div>
+
+                        <div class="val" v-for="(k,kIndex) in item.parameterValue" :key="kIndex">{{k}}</div>
+                    </div>
+
+                </div>
+
+                <div class="productComment" v-if="nowSelectTab==2">
+
+                    <div class="totalComment">
+                        <div class="startList">
+                            <img :src="item" v-for="(item,index) in starList" :key="index" alt="">
+                        </div>
+                        <div class="startName">好评度{{productInfo.praise}}%</div>
+                    </div>
+
+                    <productComment v-for="(item,index) in productComments" :key="index" :info='item'></productComment>
+
+                    <div v-if="commentFinish">
+                    </div>
+                    <view class="weui-loadmore" v-else-if="loadingFinish">
+                        <view class="weui-loading"></view>
+                        <view class="weui-loadmore__tips">加载中</view>
+                    </view>
+                </div>
+
+                <div v-if="loadingFinish">
+                </div>
+                <view class="weui-loadmore" v-else-if="loading">
+                    <view class="weui-loading"></view>
+                    <view class="weui-loadmore__tips">加载中</view>
+                </view>
+                <view class="weui-loadmore" v-else>
+                    <!-- <view class="weui-loading"></view> -->
+                    <view class="weui-loadmore__tips">上划加载更多</view>
+                </view>
+
+            </div>
+
+        </div>
+
+        <specificationsContent :visible='showSpecifications' :productInfo='productInfo' @close='showSpecifications=false' :totalMoney='totalMoney' :chooseType='chooseType' :chooseNum='chooseNum' @changeType='changeType' @changeNum='changeNum' @changeChoose='hasChoose=true'></specificationsContent>
+    </div>
+</template>
+
+<script>
+import specificationsContent from '../../components/SpecificationsContent';
+import productComment from '../../components/ProductComment';
+import calc from '../../calc';
+export default {
+    data() {
+        return {
+            productId: 0,
+            productInfo: {},
+            bannerList: [],
+            showSpecifications: false,
+            chooseType: 'all',
+            chooseNum: 1,
+            hasChoose: false,
+            nowSelectTab: 0,
+            loading: false,
+            loadingFinish: false,
+            detailList: [],
+            productParameters: [],
+            currentPage: 1,
+            productComments: [],
+            commentFlag: false,
+            commentFinish: false,
+        };
+    },
+    computed: {
+        totalMoney() {
+            var money = 0;
+            if (this.chooseType == 'all') {
+                money = calc.Mul(this.chooseNum, this.productInfo.price);
+            } else if (this.productInfo.downPayment) {
+                money = calc.Mul(this.chooseNum, this.productInfo.downPayment);
+            }
+            return money;
+        },
+        starList() {
+            var list = [
+                require('../../../static/images/icon_pingjia.png'),
+                require('../../../static/images/icon_pingjia_yiban.png'),
+                require('../../../static/images/icon_pingjia_pre.png'),
+            ];
+            var img = [list[0], list[0], list[0], list[0], list[0]];
+            if (this.productInfo.praise) {
+                var starLevel = Number(this.productInfo.praise) / 20;
+                img = [];
+                for (var i = 0; i < 5; i++) {
+                    if (
+                        Math.floor(starLevel) == i &&
+                        Math.ceil(starLevel) > i
+                    ) {
+                        img.push(list[1]);
+                    } else if (starLevel <= i) {
+                        img.push(list[0]);
+                    } else if (starLevel > i) {
+                        img.push(list[2]);
+                    }
+                }
+            }
+            return img;
+        },
+    },
+    onLoad(options) {
+        console.log(options);
+        this.productId = options.id;
+        this.$http
+            .get('/productInfo/getOne', { id: this.productId })
+            .then(res => {
+                if (res.success) {
+                    this.productInfo = res.data;
+                }
+            })
+            .catch(e => {
+                console.log(e);
+            });
+
+        this.getImage(0).then(list => {
+            console.log(list);
+            this.bannerList = list;
+        });
+    },
+    onReachBottom() {
+        if (!this.isLoading) {
+            this.chooseTab(this.nowSelectTab);
+        }
+
+        if (this.nowSelectTab == 2 && this.commentFlag) {
+            this.getProductComment().then(list => {
+                this.productComments = this.productComments.concat(list);
+            });
+        }
+    },
+    methods: {
+        getImage(type) {
+            return new Promise((resolve, reject) => {
+                this.$http
+                    .get('/productImage/all', {
+                        productId: this.productId,
+                        typeFlag: type,
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            resolve(res.data);
+                        }
+                    })
+                    .catch(e => {
+                        console.log(e);
+                    });
+            });
+        },
+        chooseSpecifications() {
+            this.showSpecifications = true;
+        },
+        changeType(type) {
+            this.chooseType = type;
+        },
+        changeNum(num) {
+            this.chooseNum = num;
+        },
+        getProductParameters() {
+            return new Promise((resolve, reject) => {
+                this.$http
+                    .get('/productParameter/all', {
+                        productId: this.productId,
+                        currentPage: this.currentPage,
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            resolve(res.data);
+                        }
+                    })
+                    .catch(e => {
+                        console.log(e);
+                    });
+            });
+        },
+        getProductComment() {
+            return new Promise((resolve, reject) => {
+                this.commentFlag = false;
+                this.$http
+                    .get('/productComment/page', {
+                        productId: this.productId,
+                    })
+                    .then(res => {
+                        if (res.success) {
+                            resolve(res.data.pp);
+
+                            if (
+                                res.data.page.currentPage <
+                                res.data.page.totalPage
+                            ) {
+                                // console.log('aaaaaa')
+                                this.commentFlag = true;
+                            } else {
+                                this.commentFinish = true;
+                            }
+                        }
+                    })
+                    .catch(e => {
+                        console.log(e);
+                    });
+            });
+        },
+        chooseTab(tab) {
+            this.loadingFinish = false;
+            this.isLoading = true;
+            if (tab == 0) {
+                this.getImage(1).then(list => {
+                    this.detailList = list;
+                    this.loadingFinish = true;
+                });
+            } else if (tab == 1) {
+                this.getProductParameters().then(list => {
+                    list.forEach(item => {
+                        item.parameterValue = item.parameterValue.split(',');
+                    });
+                    this.productParameters = list;
+                    this.loadingFinish = true;
+                });
+            } else if (tab == 2) {
+                this.currentPage = 1;
+                this.getProductComment().then(list => {
+                    this.productComments = list;
+                    this.loadingFinish = true;
+                });
+            }
+            this.nowSelectTab = tab;
+        },
+    },
+    components: {
+        specificationsContent,
+        productComment,
+    },
+};
+</script>
+
+<style lang='less' scoped>
+.container {
+    // overflow: hidden;
+    min-height: 100%;
+    box-sizing: border-box;
+}
+.swiper {
+    height: 375px;
+
+    image {
+        width: 100%;
+        height: 375px;
+    }
+
+    .wx-swiper-dot {
+        width: 8rpx;
+        height: 8rpx;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 4rpx;
+    }
+
+    .wx-swiper-dot-active {
+        width: 22rpx;
+        background-color: #00c5f2;
+    }
+}
+
+.productInfo {
+    padding: 25px 15px 20px;
+
+    .title {
+        font-size: 18px;
+        font-weight: bold;
+        color: rgba(0, 0, 0, 1);
+        line-height: 25px;
+    }
+
+    .sub {
+        font-size: 12px;
+        color: rgba(153, 153, 153, 1);
+        line-height: 17px;
+        margin-top: 8px;
+    }
+
+    .money {
+        color: #ff3b30;
+        display: flex;
+        align-items: center;
+        margin-top: 10px;
+
+        .price {
+            font-size: 22px;
+            font-weight: bold;
+            line-height: 30px;
+
+            &::before {
+                content: '¥';
+                font-size: 16px;
+            }
+        }
+
+        .down {
+            font-size: 14px;
+            line-height: 20px;
+            margin-left: 15px;
+
+            .downPrice {
+                &::before {
+                    content: '¥';
+                }
+            }
+        }
+    }
+
+    .sale {
+        font-size: 12px;
+        font-weight: bold;
+        color: rgba(153, 153, 153, 1);
+        line-height: 15px;
+        span {
+            margin-right: 42px;
+        }
+    }
+
+    .chooseSpecifications {
+        height: 60px;
+        background: rgba(255, 255, 255, 1);
+        box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
+        border-radius: 8px;
+        display: flex;
+        align-items: center;
+        padding: 0 15px;
+        margin-top: 30px;
+
+        .name {
+            font-size: 14px;
+            font-weight: bold;
+            color: rgba(0, 0, 0, 1);
+            line-height: 20px;
+        }
+        .val {
+            font-size: 13px;
+            color: rgba(153, 153, 153, 1);
+            line-height: 18px;
+            flex-grow: 1;
+            text-align: right;
+        }
+
+        img {
+            width: 24px;
+            height: 24px;
+            margin-left: 10px;
+        }
+    }
+}
+
+.main {
+    position: relative;
+}
+
+.tabList {
+    position: sticky;
+    top: 0;
+    z-index: 20;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding: 16px 0;
+    background-color: #fff;
+    .tabItem {
+        width: 100px;
+        text-align: center;
+        font-size: 15px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 21px;
+
+        &.select {
+            color: #00c5f2;
+            font-weight: bold;
+        }
+    }
+
+    .line {
+        position: absolute;
+        bottom: 10px;
+        width: 20px;
+        height: 4px;
+        background: rgba(0, 197, 242, 1);
+        border-radius: 2px;
+        left: 40px;
+        transition: left ease-in-out 0.3s;
+    }
+}
+
+.imgList {
+    image {
+        width: 100%;
+        display: block;
+    }
+}
+
+.mainDetail {
+    background-color: #f2f4f5;
+
+    padding: 0 0 66px;
+    overflow: hidden;
+
+    .productDetail {
+        margin: 15px;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 8px;
+        padding: 0 15px;
+
+        .detail-item {
+            padding: 0 0 12px;
+            .name {
+                font-size: 14px;
+                font-weight: bold;
+                color: rgba(0, 0, 0, 1);
+                line-height: 20px;
+                padding: 15px 0 10px;
+            }
+
+            .val {
+                font-size: 14px;
+                color: rgba(153, 153, 153, 1);
+                line-height: 24px;
+            }
+
+            &:not(:last-child) {
+                border-bottom: 1px solid #f2f4f5;
+            }
+        }
+    }
+}
+
+.productComment {
+    position: relative;
+    border-top: 1px solid #f2f4f5;
+}
+
+.totalComment {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 8px;
+    padding: 15px 15px;
+    display: flex;
+    align-items: center;
+    height: 68px;
+    // position: sticky;
+    // top: 63px;
+    // opacity: 20;
+    margin: 15px;
+
+    .startList {
+        display: flex;
+        img {
+            width: 22px;
+            height: 22px;
+            margin-right: 8px;
+        }
+    }
+
+    .startName {
+        font-size: 13px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 18px;
+        flex-grow: 1;
+        text-align: right;
+    }
+}
+
+.pay {
+    display: flex;
+    height: 56px;
+    background: rgba(255, 255, 255, 1);
+    box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.08);
+    align-items: center;
+    z-index: 50;
+    position: fixed;
+    bottom: 0;
+    width: 100%;
+    left: 0;
+    .kefu {
+        width: 100px;
+        display: flex;
+        align-items: center;
+        flex-direction: column;
+        position: relative;
+
+        button {
+            position: absolute;
+            left: 0;
+            right: 0;
+            top: 0;
+            bottom: 0;
+            opacity: 0;
+        }
+        img {
+            width: 24px;
+            height: 24px;
+        }
+
+        .text {
+            font-size: 12px;
+            color: rgba(51, 51, 51, 1);
+            line-height: 17px;
+            margin-top: 2px;
+        }
+    }
+
+    .btnList {
+        display: flex;
+        div {
+            width: 130px;
+            height: 40px;
+            background: rgba(17, 221, 253, 1);
+            font-size: 15px;
+            font-weight: bold;
+            color: rgba(255, 255, 255, 1);
+            line-height: 40px;
+            text-align: center;
+            &:first-child {
+                border-radius: 22px 0px 0px 22px;
+                &:active {
+                    background-color: darken(#11ddfd, 10);
+                }
+            }
+
+            &:last-child {
+                background-color: #00c5f2;
+                border-radius: 0px 22px 22px 0px;
+
+                &:active {
+                    background-color: darken(#00c5f2, 10);
+                }
+            }
+        }
+    }
+}
+</style>

+ 5 - 0
src/pages/setting/setting.js

@@ -0,0 +1,5 @@
+import Vue from 'vue'
+import App from './setting.vue'
+
+const app = new Vue(App)
+app.$mount()

+ 3 - 0
src/pages/setting/setting.json

@@ -0,0 +1,3 @@
+{
+    "navigationBarTitleText": "个人设置"
+}

+ 159 - 0
src/pages/setting/setting.vue

@@ -0,0 +1,159 @@
+<template>
+    <div class="container">
+        <div class="card">
+            <div class="card-item">
+                <div class="name">头像</div>
+                <img :src="userInfo.icon" class="icon" background-size="cover" alt="">
+                <img src="/static/images/icon_inter.png" class="more" alt="">
+            </div>
+            <div class="card-item">
+                <div class="name">昵称</div>
+                <div class="val">{{userInfo.nickname}}</div>
+                <img src="/static/images/icon_inter.png" class="more" alt="">
+            </div>
+            <div class="card-item">
+                <div class="name">性别</div>
+                <div class="val">{{userInfo.sex}}</div>
+                <img src="/static/images/icon_inter.png" class="more" alt="">
+
+                <picker @change="bindPickerChange" :value="sexIndex" :range="sexList">
+                    <view class="picker">
+
+                    </view>
+                </picker>
+            </div>
+        </div>
+
+        <div class="card" style="margin-top:15px">
+            <div class="card-item">
+                <div class="name">消息提醒</div>
+                <switch :checked='noticeFlag' @change="switch1Change" color='#00C5F2' />
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex';
+export default {
+    data() {
+        return {
+            noticeFlag: false,
+            sexList: ['男', '女'],
+            sexIndex: 0,
+        };
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    onShow() {
+        this.$http
+            .get('/userInfo/getUserInfo')
+            .then(res => {
+                if (res.success) {
+                    this.$store.commit('updateUserInfo', res.data);
+                    this.noticeFlag = res.data.noticeFlag == 'Y';
+                    this.sexIndex = this.sexList.indexOf(res.data.sex);
+                }
+            })
+            .catch(e => {
+                console.log(e);
+            });
+    },
+    methods: {
+        switch1Change() {
+            this.noticeFlag = !this.noticeFlag;
+            this.updateUser('noticeFlag', this.noticeFlag ? 'Y' : 'N');
+        },
+        bindPickerChange(e) {
+            this.sexIndex = Number(e.mp.detail.value);
+            var sex = this.sexList[this.sexIndex];
+            if (sex == this.userInfo.sex) {
+                return;
+            }
+            this.userInfo.sex = sex;
+
+            this.updateUser('sex', sex);
+        },
+        updateUser(key, val) {
+            this.$http
+                .post('/userInfo/update', {
+                    id: this.userInfo.id,
+                    [key]: val,
+                })
+                .then(res => {
+                    if (res.success) {
+                        wx.showToast({
+                            title: '更新成功',
+                            icon: 'success',
+                            duration: 1500,
+                        });
+                    }
+                })
+                .catch(e => {
+                    console.log(e);
+                });
+        },
+    },
+};
+</script>
+
+<style lang='less' scoped>
+.container {
+    min-height: 100%;
+    background-color: #f2f4f5;
+    box-sizing: border-box;
+    padding: 15px;
+}
+
+.card-item {
+    display: flex;
+    height: 60px;
+    align-items: center;
+    position: relative;
+
+    .name {
+        font-size: 14px;
+        font-weight: bold;
+        color: rgba(0, 0, 0, 1);
+        line-height: 20px;
+        flex-grow: 1;
+    }
+    .icon {
+        width: 36px;
+        height: 36px;
+        border-radius: 100%;
+    }
+
+    .more {
+        width: 24px;
+        height: 24px;
+        margin-left: 10px;
+    }
+
+    .val {
+        font-size: 16px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 22px;
+    }
+
+    &:not(:last-child) {
+        border-bottom: 1px solid #f2f4f5;
+    }
+
+    .picker {
+        position: absolute;
+        left: 0;
+        right: 0;
+        top: 0;
+        bottom: 0;
+        opacity: 0;
+    }
+}
+
+.card {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 6px;
+    padding: 0 15px;
+}
+</style>

+ 3 - 1
src/pages/shoppingCart/shoppingCart.json

@@ -1,5 +1,7 @@
 {
 
     "navigationBarTextStyle": "white",
-    "navigationBarBackgroundColor": "#00C5F2"
+    "navigationBarBackgroundColor": "#00C5F2",
+    "backgroundColorTop": "#00C5F2",
+    "backgroundColorBottom": "#f2f4f5"
 }

+ 81 - 6
src/pages/shoppingCart/shoppingCart.vue

@@ -8,29 +8,44 @@
         <div class="cartList">
             <shoppingCart v-for="i in 10" :key="i"></shoppingCart>
         </div>
+
+        <div class="fixedBottom">
+            <img v-if="isChooseAll" src="/static/images/gouwuche_icon_xuanzhong.png" class="leftIcon" alt="">
+            <img v-else src="/static/images/gouwuche_icon_weixuanzhong.png" class="leftIcon" alt="">
+            <span>全选</span>
+            <span class="zhan"></span>
+            <span>合计:</span>
+
+            <span class="price">368</span>
+
+            <button>结算</button>
+        </div>
     </div>
 </template>
 
 <script>
-import shoppingCart from '../../components/ShoppingCart'
+import shoppingCart from '../../components/ShoppingCart';
 export default {
     data() {
-        return {};
+        return {
+            isChooseAll: false,
+        };
     },
     onShow() {
         wx.setNavigationBarTitle({ title: '美瑞莉娜工作室' });
     },
-    components:{
+    components: {
         shoppingCart
-    }
+    },
 };
 </script>
 
-<style>
+<style lang='less' scoped>
 .main {
-    height: 100%;
+    min-height: 100%;
     background-image: linear-gradient(#00c5f2 232rpx, #f2f4f5 232rpx, #f2f4f5);
     /* padding: 0 30rpx; */
+    padding-bottom: 150rpx;
 }
 
 .config {
@@ -44,5 +59,65 @@ export default {
     display: flex;
     justify-content: space-between;
     background-color: #00c5f2;
+    z-index: 20;
+}
+
+.fixedBottom {
+    height: 112rpx;
+    background: rgba(255, 255, 255, 1);
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    padding: 0 30rpx;
+    display: flex;
+    align-items: center;
+    width: 100%;
+    box-sizing: border-box;
+    z-index: 20;
+
+    .leftIcon {
+        width: 32rpx;
+        height: 32rpx;
+        min-width: 32rpx;
+        margin-right: 16rpx;
+    }
+
+    span {
+        font-size: 24rpx;
+        font-family: PingFangSC-Regular;
+        font-weight: 400;
+        color: rgba(0, 0, 0, 1);
+        line-height: 34rpx;
+    }
+
+    .price {
+        font-size: 44rpx;
+        font-weight: bold;
+        color: rgba(255, 59, 48, 1);
+        &::before {
+            content: '¥';
+            font-size: 32rpx;
+        }
+    }
+    .zhan {
+        flex-grow: 1;
+    }
+
+    button {
+        min-width: 220rpx;
+        width: 220rpx;
+        height: 80rpx;
+        background: rgba(0, 197, 242, 1);
+        border-radius: 44rpx;
+        font-size: 30rpx;
+        font-weight: bold;
+        color: rgba(255, 255, 255, 1);
+        line-height: 80rpx;
+        margin-left: 30rpx;
+
+        &:active {
+            background-color: darken(rgba(0, 197, 242, 1), 10);
+        }
+    }
 }
 </style>

+ 5 - 0
src/pages/storeInfo/storeInfo.js

@@ -0,0 +1,5 @@
+import Vue from 'vue'
+import App from './storeInfo.vue'
+
+const app = new Vue(App)
+app.$mount()

+ 3 - 0
src/pages/storeInfo/storeInfo.json

@@ -0,0 +1,3 @@
+{
+    "navigationBarTitleText": "店铺介绍"
+}

+ 169 - 0
src/pages/storeInfo/storeInfo.vue

@@ -0,0 +1,169 @@
+<template>
+    <div class="container">
+        <div class="introduction" v-html="storeIntroduction.introduction"></div>
+        <swiper indicator-dots autoplay circular class="swiper">
+            <block v-for="(item,index) in swiperList" :key="index">
+                <swiper-item>
+                    <image mode="aspectFill" :src="item"></image>
+                </swiper-item>
+            </block>
+        </swiper>
+
+        <div class="mapContent">
+            <map id="map" class="map" :longitude="longitude" :latitude="latitude" scale="14" :enable-scroll='false' :enable-zoom='false' :markers="markers" show-location></map>
+            <cover-view class="label" @click="goWeb">
+                <cover-image src="/static/images/icon_daohang.png" alt=""> </cover-image>
+                <cover-view>到这去</cover-view>
+            </cover-view>
+        </div>
+
+        <div class="address">
+            <img src="/static/images/icon_dizhi.png" alt="">
+            <span>地址:{{storeIntroduction.address}}</span>
+        </div>
+    </div>
+</template>
+
+<script>
+import { mapState } from 'vuex';
+export default {
+    data() {
+        return {
+            storeIntroduction: {},
+            longitude: 113.32452,
+            latitude: 23.099994,
+            markers: [],
+        };
+    },
+    computed: {
+        ...mapState(['storeInfo']),
+        swiperList() {
+            var list = [];
+
+            if (this.storeIntroduction.banner) {
+                list = this.storeIntroduction.banner.split(',');
+            }
+
+            return list;
+        },
+    },
+    onLoad() {
+        this.$http
+            .get('/storeIntroduction/getOne', {
+                storeId: this.storeInfo.id || 13,
+            })
+            .then(res => {
+                if (res.success) {
+                    this.storeIntroduction = res.data;
+                    this.latitude = res.data.latitude;
+                    this.longitude = res.data.longitude;
+
+                    this.markers.push({
+                        iconPath: '/static/images/icon_dian.png',
+                        id: 0,
+                        latitude: res.data.latitude,
+                        longitude: res.data.longitude,
+                        width: 12,
+                        height: 16,
+                        anchor: { x: 1, y: 0.1 },
+                    });
+                }
+            })
+            .catch(e => {
+                console.log(e);
+            });
+    },
+    methods: {
+        goWeb() {
+            console.log('aaaaaaa');
+            wx.navigateTo({
+                url:
+                    '/pages/webView/webView?type=map&marker=coord:' +
+                    this.latitude +
+                    ',' +
+                    this.longitude +
+                    ';title:' +
+                    this.storeIntroduction.title +
+                    ';addr:' +
+                    this.storeIntroduction.address +
+                    '&referer=DSNBZ-UJHKK-F7TJS-A5XQY-3YGOF-SVFVB',
+            });
+        },
+    },
+};
+</script>
+
+<style lang='less' scoped>
+.container {
+    padding: 15px;
+}
+.introduction {
+    font-size: 13px;
+    color: rgba(0, 0, 0, 1);
+    line-height: 22px;
+    text-indent: 2em;
+}
+
+.swiper {
+    border-radius: 8px;
+    box-shadow: 0px 2px 8px 0px rgba(153, 153, 153, 0.24);
+    margin: 15px 0;
+    height: 194px;
+
+    image {
+        width: 100%;
+        height: 194px;
+    }
+}
+.map {
+    border-radius: 6px;
+    height: 140px;
+    width: 100%;
+}
+
+.mapContent {
+    position: relative;
+    .label {
+        width: 74px;
+        height: 28px;
+        background: rgba(0, 197, 242, 1);
+        box-shadow: 0px 2px 6px 0px rgba(11, 158, 192, 0.3);
+        border-radius: 2px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        position: absolute;
+        left: 50%;
+        transform: translateX(-50%);
+        top: 30px;
+        z-index: 999;
+        cover-image {
+            width: 13px;
+            height: 13px;
+        }
+
+        cover-view {
+            font-size: 14px;
+            color: rgba(255, 255, 255, 1);
+            margin-left: 3px;
+            background-color: transparent;
+        }
+    }
+}
+
+.address {
+    display: flex;
+    padding: 15px 0;
+    align-items: center;
+    img {
+        width: 22px;
+        height: 22px;
+    }
+    span {
+        font-size: 14px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 22px;
+        margin-left: 5px;
+    }
+}
+</style>

+ 5 - 0
src/pages/user copy/user.js

@@ -0,0 +1,5 @@
+import Vue from 'vue'
+import App from './user.vue'
+
+const app = new Vue(App)
+app.$mount()

+ 3 - 0
src/pages/user copy/user.json

@@ -0,0 +1,3 @@
+{
+    "navigationBarTitleText": ""
+}

+ 32 - 0
src/pages/user copy/user.vue

@@ -0,0 +1,32 @@
+<template>
+  <div>
+  
+  </div>
+</template>
+
+<script>
+
+export default {
+  data () {
+    return {
+    
+    }
+  },
+
+  created () {
+      
+  }
+}
+</script>
+
+<style lang='less' scoped>
+.log-list {
+  display: flex;
+  flex-direction: column;
+  padding: 40rpx;
+}
+
+.log-item {
+  margin: 10rpx;
+}
+</style>

+ 5 - 1
src/pages/user/user.json

@@ -1,3 +1,7 @@
 {
-    "navigationBarTitleText": "查看启动日志"
+    "navigationBarTitleText": "",
+    "navigationBarTextStyle": "white",
+    "navigationBarBackgroundColor": "#00C5F2",
+    "backgroundColorTop": "#00C5F2",
+    "backgroundColorBottom": "#fff"
 }

+ 246 - 19
src/pages/user/user.vue

@@ -1,32 +1,259 @@
 <template>
-  <div>
-  
-  </div>
+    <div class="container">
+        <navigator url="/pages/setting/setting" class="user">
+            <img :src="userInfo.icon" class="icon" background-size="cover" alt="">
+
+            <div class="text">
+                <div class="name">{{userInfo.nickname}}</div>
+                <!-- <div class="sub">用户辅助文字信息</div> -->
+            </div>
+
+            <img src="/static/images/icon_inter_bai.png" class="more" alt="">
+
+        </navigator>
+
+        <div class="notice">
+            <img src="/static/images/info_icon_tongzhi.png" alt="">
+            <div class="content">
+                活动或者订单通告
+            </div>
+
+            <div class="sub">查看</div>
+            <img src="/static/images/icon_inter.png" alt="">
+        </div>
+
+        <div class="order">
+            <div class="order-top">
+                <div class="name">我的订单</div>
+                <div class="sub">查看全部订单</div>
+                <img src="/static/images/icon_inter.png" alt="">
+            </div>
+
+            <div class="orderList">
+                <div class="order-item">
+                    <img src="/static/images/dingdan_icon_yuyue(1).png" alt="">
+                    <div class="name">待付款</div>
+                </div>
+                <!-- <div class="order-item">
+                    <img src="/static/images/dingdan_icon_yuyue.png" alt="">
+                    <div class="name">待预约</div>
+                </div> -->
+                <div class="order-item">
+                    <img src="/static/images/dingdan_icon_paizhao.png" alt="">
+                    <div class="name">进行中</div>
+                </div>
+                <div class="order-item">
+                    <img src="/static/images/dingdan_icon_paizhao(2).png" alt="">
+                    <div class="name">待取件</div>
+                </div>
+                <div class="order-item">
+                    <img src="/static/images/dingdan_icon_paizhao(1).png" alt="">
+                    <div class="name">待评价</div>
+                </div>
+            </div>
+        </div>
+
+        <div class="menuList">
+            <div class="menu-item">
+                <img src="/static/images/info_icon_jifen.png" alt="">
+                <div class="name">我的积分</div>
+                <img src="/static/images/icon_inter.png" alt="">
+            </div>
+            <div class="menu-item">
+                <img src="/static/images/info_icon_jifen(1).png" alt="">
+                <div class="name">我的优惠券</div>
+                <img src="/static/images/icon_inter.png" alt="">
+            </div>
+
+            <div class="menu-item">
+                <img src="/static/images/info_icon_jifen(2).png" alt="">
+                <div class="name">我的地址</div>
+                <img src="/static/images/icon_inter.png" alt="">
+            </div>
+        </div>
+
+    </div>
 </template>
 
 <script>
-
+import { mapState } from 'vuex';
 export default {
-  data () {
-    return {
-    
+    data() {
+        return {};
+    },
+    computed: {
+        ...mapState(['userInfo']),
+    },
+    onShow() {
+        this.$http
+            .get('/userInfo/getUserInfo')
+            .then(res => {
+                if (res.success) {
+                    this.$store.commit('updateUserInfo',res.data)
+                }
+            })
+            .catch(e => {
+                console.log(e);
+            });
+    },
+};
+</script>
+
+<style lang='less' scoped>
+.container {
+    background-image: linear-gradient(#00c5f2 116px, #ffffff 116px, #ffffff);
+    min-height: 100%;
+    padding: 0 15px;
+}
+
+.user {
+    display: flex;
+    align-items: center;
+    padding: 15px 0;
+    .icon {
+        width: 60px;
+        height: 60px;
+        border-radius: 8px;
     }
-  },
 
-  created () {
-      
-  }
+    .text {
+        flex-grow: 1;
+        margin: 2px 0 0 12px;
+
+        .name {
+            font-size: 22px;
+            font-weight: bold;
+            color: rgba(255, 255, 255, 1);
+            line-height: 30px;
+        }
+
+        .sub {
+            font-size: 12px;
+            color: rgba(255, 255, 255, 1);
+            line-height: 17px;
+        }
+    }
+
+    .more {
+        width: 24px;
+        height: 24px;
+    }
 }
-</script>
 
-<style>
-.log-list {
-  display: flex;
-  flex-direction: column;
-  padding: 40rpx;
+.notice {
+    height: 52px;
+    background: rgba(255, 255, 255, 1);
+    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.04);
+    border-radius: 8px;
+    padding: 0 15px;
+    display: flex;
+    align-items: center;
+
+    img {
+        width: 24px;
+        height: 24px;
+    }
+
+    .content {
+        flex-grow: 1;
+        margin: 0 10px;
+        font-size: 14px;
+        color: rgba(255, 155, 2, 1);
+        line-height: 20px;
+    }
+
+    .sub {
+        font-size: 12px;
+        color: rgba(0, 197, 242, 1);
+        line-height: 17px;
+    }
+}
+
+.order {
+    margin: 20px 0 0;
+    height: 115px;
+    background: rgba(255, 255, 255, 1);
+    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.04);
+    border-radius: 8px;
+    padding: 0 15px;
+    .order-top {
+        height: 40px;
+        display: flex;
+        align-items: center;
+        border-bottom: 1px solid #f2f4f5;
+
+        .name {
+            font-size: 14px;
+            font-weight: bold;
+            color: rgba(0, 0, 0, 1);
+            line-height: 20px;
+            flex-grow: 1;
+        }
+        .sub {
+            font-size: 12px;
+            color: rgba(153, 153, 153, 1);
+            line-height: 17px;
+        }
+
+        img {
+            width: 24px;
+            height: 24px;
+        }
+    }
+
+    .orderList {
+        display: flex;
+        justify-content: space-around;
+        height: 74px;
+        align-items: center;
+
+        .order-item {
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            align-items: center;
+            width: 50px;
+            img {
+                width: 24px;
+                height: 24px;
+            }
+
+            .name {
+                font-size: 12px;
+                color: rgba(102, 102, 102, 1);
+                line-height: 17px;
+                margin: 4px 0 0;
+            }
+        }
+    }
 }
+.menuList {
+    margin: 20px 0 0 0;
+}
+.menu-item {
+    display: flex;
+    align-items: center;
+    height: 56px;
+
+    img {
+        width: 24px;
+        height: 24px;
+    }
 
-.log-item {
-  margin: 10rpx;
+    .name {
+        font-size: 15px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 21px;
+        flex-grow: 1;
+        margin: 0 0 0 10px;
+    }
+
+    &:not(:last-child) {
+        border-bottom: 1px solid #f2f4f5;
+    }
+
+    &:active {
+        background-color: darken(#fff, 1);
+    }
 }
 </style>

+ 5 - 0
src/pages/webView/webView.js

@@ -0,0 +1,5 @@
+import Vue from 'vue'
+import App from './webView.vue'
+
+const app = new Vue(App)
+app.$mount()

+ 3 - 0
src/pages/webView/webView.json

@@ -0,0 +1,3 @@
+{
+    "navigationBarTitleText": ""
+}

+ 26 - 0
src/pages/webView/webView.vue

@@ -0,0 +1,26 @@
+<template>
+    <web-view :src='url'></web-view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            url: '',
+        };
+    },
+    onLoad(options) {
+        console.log(options);
+        if (options.type == 'map') {
+            this.url =
+                'https://apis.map.qq.com/uri/v1/marker?marker=' +
+                options.marker +
+                '&referer=' +
+                options.referer;
+        }
+    },
+};
+</script>
+
+<style lang='less' scoped>
+</style>

+ 5 - 1
src/store/store.js

@@ -7,6 +7,7 @@ const store = new Vuex.Store({
         sysInfo: {
             statusBarHeight: 20,
         },
+        storeInfo: {}
     },
     mutations: {
         updateUserInfo(state, userInfo) {
@@ -15,6 +16,9 @@ const store = new Vuex.Store({
         updateSysInfo(state, sysInfo) {
             state.sysInfo = sysInfo;
         },
+        updateStoreInfo(state, storeInfo) {
+            state.storeInfo = storeInfo;
+        }
     },
 });
-export default store;
+export default store;

+ 30 - 0
src/time.js

@@ -0,0 +1,30 @@
+function formatNumber(n) {
+    const str = n.toString()
+    return str[1] ? str : `0${str}`
+}
+
+export function formatTime(time, type) {
+    const date = new Date(time)
+    const year = date.getFullYear()
+    const month = date.getMonth() + 1
+    const day = date.getDate()
+
+    const hour = date.getHours()
+    const minute = date.getMinutes()
+    const second = date.getSeconds()
+    const t1 = [year, month, day].map(formatNumber).join('/')
+    const t2 = [hour, minute, second].map(formatNumber).join(':')
+    if (type == 'YMD') {
+        return t1
+    } else {
+        return `${t1} ${t2}`
+    }
+
+}
+
+
+
+export default {
+    formatNumber,
+    formatTime
+}

+ 21 - 5
src/utils/http.js

@@ -1,4 +1,5 @@
-const baseUrl = process.env.NODE_ENV === 'development' ? 'http://localhost:8080' : '';
+const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.50.15:8080' : '';
+
 function parseUrl(url) {
     let _baseUrl = baseUrl;
     if (url.startsWith('http')) {
@@ -15,13 +16,23 @@ function parseUrl(url) {
 export default {
     install(_Vue) {
         _Vue.prototype.$http = {
-            get(url, params) {
+            setToken(token) {
+                console.log(token);
+                this.token = token;
+            },
+            get(url, params, options) {
+                options = options || {};
+                let self = this;
                 return new Promise((resolve, reject) => {
                     wx.request({
                         method: 'GET',
                         url: parseUrl(url),
                         data: params,
                         dataType: 'json',
+                        header: {
+                            token: self.token,
+                            ...(options.header || {}),
+                        },
                         success(res) {
                             if (res && res.statusCode === 200) {
                                 resolve(res.data);
@@ -35,14 +46,19 @@ export default {
                     });
                 });
             },
-            post(url, data) {
+            post(url, data, options) {
+                options = options || {};
                 return new Promise((resolve, reject) => {
                     wx.request({
                         method: 'post',
                         url: parseUrl(url),
                         data: data,
                         dataType: 'json',
-                        header: { 'content-type': 'application/x-www-form-urlencoded' },
+                        header: {
+                            'content-type': 'application/x-www-form-urlencoded',
+                            token: this.token,
+                            ...(options.header || {}),
+                        },
                         success(res) {
                             if (res && res.statusCode === 200) {
                                 resolve(res.data);
@@ -70,4 +86,4 @@ export default {
             });
         };
     },
-};
+};

BIN
static/images/dingdan_icon_paizhao(1).png


BIN
static/images/dingdan_icon_paizhao(2).png


BIN
static/images/dingdan_icon_paizhao.png


BIN
static/images/dingdan_icon_yuyue(1).png


BIN
static/images/dingdan_icon_yuyue.png


BIN
static/images/icon_daohang.png


BIN
static/images/icon_dian.png


BIN
static/images/icon_dizhi.png


+ 0 - 0
static/images/线性图标/icon_inter.png → static/images/icon_inter.png


BIN
static/images/icon_inter_bai.png


BIN
static/images/icon_pingjia.png


BIN
static/images/icon_pingjia_pre.png


BIN
static/images/icon_pingjia_yiban.png


BIN
static/images/icon_tanchuangclose_02.png


BIN
static/images/info_icon_jifen(1).png


BIN
static/images/info_icon_jifen(2).png


BIN
static/images/info_icon_jifen.png


BIN
static/images/info_icon_tongzhi.png


BIN
static/images/xiangqing_icon_kefu.png