Explorar o código

feat: 联调0517

黎海 %!s(int64=2) %!d(string=hai) anos
pai
achega
dd0c64bb8e

+ 32 - 32
src/common/errorHandler.js

@@ -1,38 +1,38 @@
1
 import Vue from 'vue'
1
 import Vue from 'vue'
2
-import {logFlag} from '@/config/env'
3
-export default () =>{
4
-    const errorHandler = (err, vm, info) => {
5
-        // `info` 是 Vue 特定的错误信息,比如错误所在的生命周期钩子
6
-        let compName = "";
7
-        if (vm) {
8
-            compName = _formatComponentName(vm);
9
-            compName = compName.replace(/\\/g, "/");
10
-        }
11
-        let obj = {
12
-            component: compName, 
13
-            hook: info, 
14
-            err_msg: err + ''
15
-        }
16
-        let hosts = location.host;
17
-        if((hosts.indexOf("localhost") > -1 || hosts.indexOf("test") > -1)){
18
-            console.table(obj);
19
-        }
20
-        tool.$throwJS(obj);
2
+import { logFlag } from '@/config/env'
3
+export default () => {
4
+  const errorHandler = (err, vm, info) => {
5
+    // `info` 是 Vue 特定的错误信息,比如错误所在的生命周期钩子
6
+    let compName = "";
7
+    if (vm) {
8
+      compName = _formatComponentName(vm);
9
+      compName = compName.replace(/\\/g, "/");
21
     }
10
     }
22
-    Vue.config.errorHandler = errorHandler;
11
+    let obj = {
12
+      component: compName,
13
+      hook: info,
14
+      err_msg: err + ''
15
+    }
16
+    let hosts = location.host;
17
+    if ((hosts.indexOf("localhost") > -1 || hosts.indexOf("test") > -1)) {
18
+      console.table(obj);
19
+    }
20
+    tool.$throwJS(obj);
21
+  }
22
+  Vue.config.errorHandler = errorHandler;
23
 }
23
 }
24
 
24
 
25
 //获取当前组件的路径
25
 //获取当前组件的路径
26
-function _formatComponentName(vm) {
27
-    if (vm.$root === vm) return 'root';
28
-    let name = vm._isVue
29
-        ? (vm.$options && vm.$options.name) ||
30
-        (vm.$options && vm.$options._componentTag)
31
-        : vm.name;
32
-    return (
33
-        (name ? 'component <' + name + '>' : 'anonymous component') +
34
-        (vm._isVue && vm.$options && vm.$options.__file
35
-            ? ' at ' + (vm.$options && vm.$options.__file)
36
-            : '')
37
-    );
26
+function _formatComponentName (vm) {
27
+  if (vm.$root === vm) return 'root';
28
+  let name = vm._isVue
29
+    ? (vm.$options && vm.$options.name) ||
30
+    (vm.$options && vm.$options._componentTag)
31
+    : vm.name;
32
+  return (
33
+    (name ? 'component <' + name + '>' : 'anonymous component') +
34
+    (vm._isVue && vm.$options && vm.$options.__file
35
+      ? ' at ' + (vm.$options && vm.$options.__file)
36
+      : '')
37
+  );
38
 }
38
 }

+ 3 - 3
src/common/index.js

@@ -1,11 +1,11 @@
1
 // 全局注入 
1
 // 全局注入 
2
-import { injectTool } from './tool'
2
+// import { injectTool } from './tool'
3
 import injectHttp from './http'
3
 import injectHttp from './http'
4
-import errorLog from './errorHandler.js'
4
+// import errorLog from './errorHandler.js'
5
 import utils from './utils'
5
 import utils from './utils'
6
 
6
 
7
 export const injectGlobal = () => {
7
 export const injectGlobal = () => {
8
-  injectTool();
8
+  // injectTool();
9
   injectHttp();
9
   injectHttp();
10
   utils()
10
   utils()
11
   // errorLog();
11
   // errorLog();

+ 3 - 0
src/common/utils.js

@@ -1,5 +1,8 @@
1
 // 自定义全局方法封装
1
 // 自定义全局方法封装
2
 const utils = {
2
 const utils = {
3
+  userInfo:{
4
+    
5
+  },
3
   test: function () { },
6
   test: function () { },
4
   isBack: false,
7
   isBack: false,
5
   formatTime: function (date, fmt) {
8
   formatTime: function (date, fmt) {

+ 15 - 17
src/components/common/layout/layout.vue

@@ -12,11 +12,11 @@
12
                alt=""></div>
12
                alt=""></div>
13
         <div class="left"
13
         <div class="left"
14
              v-if="menuIndex==0">
14
              v-if="menuIndex==0">
15
-          <div class="address">JOLIJOLI(西安)</div>
15
+          <div class="address">{{userInfo.store_name}}</div>
16
         </div>
16
         </div>
17
         <div class="right">
17
         <div class="right">
18
           <div class="news"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/news.png"></div>
18
           <div class="news"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/news.png"></div>
19
-          <div class="head-img"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/cancelOrder.png"></div>
19
+          <div class="head-img"><img :src="userInfo.avatar_url"></div>
20
         </div>
20
         </div>
21
       </header>
21
       </header>
22
       <div class="main-wrapper">
22
       <div class="main-wrapper">
@@ -29,7 +29,6 @@
29
 <script type="text/javascript">
29
 <script type="text/javascript">
30
 import leftMenu from './leftMenu'
30
 import leftMenu from './leftMenu'
31
 import api from '@/server/home'
31
 import api from '@/server/home'
32
-import { mapState } from 'vuex'
33
 
32
 
34
 export default {
33
 export default {
35
   data () {
34
   data () {
@@ -37,26 +36,27 @@ export default {
37
       isFold: false,    //导航菜单面板是否折叠
36
       isFold: false,    //导航菜单面板是否折叠
38
       userId: 0,
37
       userId: 0,
39
       menuIndex: 0,
38
       menuIndex: 0,
40
-      isback: false
39
+      isback: false,
40
+      userInfo: {
41
+        name: '333'
42
+      }
41
     }
43
     }
42
   },
44
   },
43
   created () {
45
   created () {
44
-    this.initData();
46
+    this.getUserInfo()
45
   },
47
   },
46
   components: {
48
   components: {
47
     leftMenu,
49
     leftMenu,
48
   },
50
   },
49
   methods: {
51
   methods: {
50
-    initData () {
51
-      let sskey = tool.getYdUserKey("session_key");
52
-      let userId = tool.getYdUserKey('user_id');
53
-      let enterprise_id = tool.getYdUserKey('enterprise_id');
54
-      if (!userId || !sskey) {
55
-        tool.toLogin();
56
-        return;
57
-      }
58
-      this.userId = userId;
59
-      // this.$router.replace('/home');
52
+    getUserInfo () {
53
+      let that = this
54
+      api.getUserInfo().then(res => {
55
+        if (res.code == 200) {
56
+          this.userInfo = res.data
57
+
58
+        }
59
+      })
60
     },
60
     },
61
     loginOut () {
61
     loginOut () {
62
       let keys = document.cookie.match(/[^ =;]+(?=\=)/g);
62
       let keys = document.cookie.match(/[^ =;]+(?=\=)/g);
@@ -64,7 +64,6 @@ export default {
64
         for (let i = keys.length; i--;)
64
         for (let i = keys.length; i--;)
65
           document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString()
65
           document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString()
66
       }
66
       }
67
-      tool.toLogin();
68
     },
67
     },
69
     changeMenu (index) {
68
     changeMenu (index) {
70
       this.menuIndex = index
69
       this.menuIndex = index
@@ -74,7 +73,6 @@ export default {
74
     }
73
     }
75
   },
74
   },
76
   computed: {
75
   computed: {
77
-    ...mapState(['user']),
78
     routerItems () {
76
     routerItems () {
79
       let resultArr = [];
77
       let resultArr = [];
80
       let routeNow = this.$route;
78
       let routeNow = this.$route;

+ 2 - 0
src/components/common/layout/leftMenu.vue

@@ -37,6 +37,7 @@
37
 
37
 
38
 <script>
38
 <script>
39
 // import memberLogic from '@/server/memberLogic.js'
39
 // import memberLogic from '@/server/memberLogic.js'
40
+
40
 export default {
41
 export default {
41
   props: ['isCollapse'],
42
   props: ['isCollapse'],
42
   data () {
43
   data () {
@@ -96,6 +97,7 @@ export default {
96
     })
97
     })
97
   },
98
   },
98
   methods: {
99
   methods: {
100
+
99
     handleSelect (index, item) {
101
     handleSelect (index, item) {
100
       this.nowIndex = index
102
       this.nowIndex = index
101
       this.$router.push({
103
       this.$router.push({

+ 14 - 8
src/pages/confirmOrder/details/index.vue

@@ -258,8 +258,8 @@
258
 </template>
258
 </template>
259
 
259
 
260
 <script>
260
 <script>
261
-import { lstat } from 'fs';
262
 import minePupop from '../../../components/minePupop/index.vue'
261
 import minePupop from '../../../components/minePupop/index.vue'
262
+import api from '../../../server/home'
263
 
263
 
264
 export default {
264
 export default {
265
   components: { minePupop },
265
   components: { minePupop },
@@ -268,11 +268,6 @@ export default {
268
       select: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/select.png',
268
       select: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/select.png',
269
       unSelect: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/unSelect.png',
269
       unSelect: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/unSelect.png',
270
       userInfo: {
270
       userInfo: {
271
-        image: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
272
-        name: '张三',
273
-        sex: '女',
274
-        age: '23',
275
-        skinType: '中性皮肤'
276
       },
271
       },
277
       //面部标签
272
       //面部标签
278
       lableList: [
273
       lableList: [
@@ -466,7 +461,7 @@ export default {
466
           mini: 242
461
           mini: 242
467
         }
462
         }
468
       ],
463
       ],
469
-    
464
+
470
       couponList: [
465
       couponList: [
471
         {
466
         {
472
 
467
 
@@ -483,6 +478,7 @@ export default {
483
       isProject: false,//是否展示选择项目弹窗
478
       isProject: false,//是否展示选择项目弹窗
484
       isTs: false,//是否展示选择时间弹窗
479
       isTs: false,//是否展示选择时间弹窗
485
       isPore: false,//皮肤状态弹窗
480
       isPore: false,//皮肤状态弹窗
481
+      id: 0,//订单id
486
     };
482
     };
487
   },
483
   },
488
   computed: {
484
   computed: {
@@ -491,6 +487,12 @@ export default {
491
   watch: {},
487
   watch: {},
492
 
488
 
493
   methods: {
489
   methods: {
490
+    getOrderInfo () {
491
+      api.getOrderInfo({ id: this.id }).then(res => {
492
+        this.userInfo = res.data.user
493
+
494
+      })
495
+    },
494
     onOperation (index) {
496
     onOperation (index) {
495
       if (this.programmeList[index].onSelect) {
497
       if (this.programmeList[index].onSelect) {
496
         this.$set(this.programmeList[index], 'onSelect', !this.programmeList[index].onSelect)
498
         this.$set(this.programmeList[index], 'onSelect', !this.programmeList[index].onSelect)
@@ -505,7 +507,11 @@ export default {
505
   },
507
   },
506
 
508
 
507
   created () {
509
   created () {
508
-
510
+    let id = this.$route.query.id
511
+    if (id) {
512
+      this.id = id
513
+    }
514
+    this.getOrderInfo()
509
   },
515
   },
510
 
516
 
511
   mounted () {
517
   mounted () {

+ 35 - 69
src/pages/home/index.vue

@@ -15,31 +15,38 @@
15
     </div>
15
     </div>
16
     <div class="order-list">
16
     <div class="order-list">
17
       <div class="title">预约订单列表</div>
17
       <div class="title">预约订单列表</div>
18
-      <div class="list-info">
18
+      <div v-if="orderList.length>0"
19
+           class="list-info"
20
+           @click="toOrderDetails(item)">
19
         <div class="user-info"
21
         <div class="user-info"
20
              v-for="(item,index) in orderList"
22
              v-for="(item,index) in orderList"
21
              :key="index"
23
              :key="index"
22
              :style="index==orderList.length-1?'border-bottom:0px':''">
24
              :style="index==orderList.length-1?'border-bottom:0px':''">
23
           <div class="head-img">
25
           <div class="head-img">
24
-            <div class="new">新</div><img :src="item.img"
26
+            <div class="new">新</div><img :src="item.avatar_url"
25
                  alt="">
27
                  alt="">
26
           </div>
28
           </div>
27
           <div class="user-information">
29
           <div class="user-information">
28
-            <div class="name">客户昵称:<span>{{ item.name }}</span></div>
29
-            <div class="name">预约项目时间:<span>{{ item.ts }}</span></div>
30
-            <div class="name">预约项目数量:<span>{{ item.num }}</span></div>
30
+            <div class="name">客户昵称:<span>{{ item.nickname }}</span></div>
31
+            <div class="name">预约项目时间:<span>{{ item.order_time }}</span></div>
32
+            <div class="name">预约项目数量:<span>{{ item.project_num }}</span></div>
31
           </div>
33
           </div>
32
           <ul class="product-list">
34
           <ul class="product-list">
33
             <li class="product-image"
35
             <li class="product-image"
34
-                v-for="value,i in item.imgList"
35
-                :key="i"><img :src="value"
36
+                v-for="value,i in item.project_list"
37
+                :key="i"><img :src="value.cover_url"
36
                    alt=""></li>
38
                    alt=""></li>
37
           </ul>
39
           </ul>
38
-          <div class="status">
39
-            {{ item.status }}
40
+          <div class="status"
41
+               :style="item.status==0?'color: #FC3019':item.status==5?'color: #A999EA':'color: #61D09D;'">
42
+            {{ item.status==0?'未支付':item.status==5?'已取消':'待使用' }}
40
           </div>
43
           </div>
41
         </div>
44
         </div>
42
       </div>
45
       </div>
46
+      <div v-else
47
+           class="empty">
48
+        暂无数据
49
+      </div>
43
     </div>
50
     </div>
44
   </div>
51
   </div>
45
 </template>
52
 </template>
@@ -69,66 +76,6 @@ export default {
69
         },
76
         },
70
       ],
77
       ],
71
       orderList: [
78
       orderList: [
72
-        {
73
-          img: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
74
-          name: '滴滴滴',
75
-          ts: '2022.04.25  14:30-16:30',
76
-          num: '5',
77
-          imgList: [
78
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
79
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
80
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
81
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
82
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
83
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
84
-          ],
85
-          status: '未支付'
86
-        },
87
-        {
88
-          img: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
89
-          name: '滴滴滴',
90
-          ts: '2022.04.25  14:30-16:30',
91
-          num: '5',
92
-          imgList: [
93
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
94
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
95
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
96
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
97
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
98
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
99
-          ],
100
-          status: '未支付'
101
-        },
102
-        {
103
-          img: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
104
-          name: '滴滴滴',
105
-          ts: '2022.04.25  14:30-16:30',
106
-          num: '5',
107
-          imgList: [
108
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
109
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
110
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
111
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
112
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
113
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
114
-          ],
115
-          status: '未支付'
116
-        },
117
-        {
118
-          img: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
119
-          name: '滴滴滴',
120
-          ts: '2022.04.25  14:30-16:30',
121
-          num: '5',
122
-          imgList: [
123
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
124
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
125
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
126
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
127
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
128
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
129
-          ],
130
-          status: '未支付'
131
-        },
132
       ],
79
       ],
133
 
80
 
134
     }
81
     }
@@ -154,9 +101,21 @@ export default {
154
     },
101
     },
155
     getToday () {
102
     getToday () {
156
       api.getToday().then(res => {
103
       api.getToday().then(res => {
104
+        if (res.code = 200) {
105
+          this.orderList = res.data.list
106
+        }
157
         console.log(res, 'res');
107
         console.log(res, 'res');
158
       })
108
       })
159
     },
109
     },
110
+    toOrderDetails (e) {
111
+      if (e.status != 0) return
112
+      this.$router.push({
113
+        path: '/confirmOrder/details',
114
+        query: {
115
+          id: e.id
116
+        }
117
+      })
118
+    },
160
     initData () {
119
     initData () {
161
 
120
 
162
     },
121
     },
@@ -313,6 +272,13 @@ export default {
313
         }
272
         }
314
       }
273
       }
315
     }
274
     }
275
+    .empty {
276
+      height: 300px;
277
+      line-height: 300px;
278
+      width: 100%;
279
+      font-size: 28px;
280
+      color: slategrey;
281
+    }
316
   }
282
   }
317
 }
283
 }
318
 </style>
284
 </style>

+ 74 - 80
src/pages/testSkin/details/index.vue

@@ -2,46 +2,47 @@
2
   <div class="mine">
2
   <div class="mine">
3
     <div class="left">
3
     <div class="left">
4
       <div class="user-info">
4
       <div class="user-info">
5
-        <div class="user-img"><img :src="userInfo.image"
5
+        <div class="user-img"><img :src="userInfo.avatar_url"
6
                alt=""></div>
6
                alt=""></div>
7
         <div class="user-span">
7
         <div class="user-span">
8
-          <div class="name">昵称:<span>{{userInfo.name}}</span></div>
8
+          <div class="name">昵称:<span>{{userInfo.nickname}}</span></div>
9
           <div class="sex">性别:<span>{{userInfo.sex}}</span></div>
9
           <div class="sex">性别:<span>{{userInfo.sex}}</span></div>
10
           <div class="age">肤龄:<span>{{userInfo.age}}</span></div>
10
           <div class="age">肤龄:<span>{{userInfo.age}}</span></div>
11
-          <div class="skin-type">肤质:<span>{{userInfo.skinType}}</span></div>
11
+          <div class="skin-type">肤质:<span>{{userInfo.skin}}</span></div>
12
         </div>
12
         </div>
13
       </div>
13
       </div>
14
       <div class="user-record">
14
       <div class="user-record">
15
         <div class="fraction">
15
         <div class="fraction">
16
           <div class="title">肌肤得分</div>
16
           <div class="title">肌肤得分</div>
17
-          <div class="num">37分</div>
17
+          <div class="num">{{userInfo.score}}分</div>
18
         </div>
18
         </div>
19
         <div class="status">
19
         <div class="status">
20
           <div class="title">皮肤状态</div>
20
           <div class="title">皮肤状态</div>
21
-          <div class="tips">肤质一般</div>
21
+          <div class="tips">{{userInfo.skin_status}}</div>
22
         </div>
22
         </div>
23
         <div class="times">
23
         <div class="times">
24
           <div class="title">上传检测时间</div>
24
           <div class="title">上传检测时间</div>
25
-          <div class="ts">2022.04.18 16:04</div>
25
+          <div class="ts">{{userInfo.check_time}}</div>
26
         </div>
26
         </div>
27
       </div>
27
       </div>
28
       <div class="summary">
28
       <div class="summary">
29
         <div class="left-title">皮肤总结</div>
29
         <div class="left-title">皮肤总结</div>
30
         <div class="summary-list">
30
         <div class="summary-list">
31
-          <div class="summary-info">
31
+          <div class="summary-info"
32
+               v-for="item,index in detail_list"
33
+               :key="index">
32
             <div class="result">
34
             <div class="result">
33
               <div class="result-left">
35
               <div class="result-left">
34
-                <div class="title">RGB毛孔:</div>
35
-                <div class="tips">粗大毛孔个数144</div>
36
+                <div class="title">{{item.name}}:</div>
37
+                <div class="tips">{{item.main_item.name}}{{item.main_item.num}}</div>
36
               </div>
38
               </div>
37
-              <div class="right">
38
-                <span>粗大毛孔个数:144个</span><br>
39
-                <span>中等毛孔个数:409个</span><br>
40
-                <span>细小毛孔个数:299个</span>
39
+              <div class="right min-size">
40
+                <div v-for="value,i in item.items"
41
+                     :key="i">{{value.name}}:{{value.num}}个</div>
41
               </div>
42
               </div>
42
             </div>
43
             </div>
43
             <div class="bottom-tips">
44
             <div class="bottom-tips">
44
-              <span>皮肤状态一般,污物阻塞导致,油脂分泌旺盛,皮肤状态一般,污物阻塞导致,油脂分泌旺盛</span>
45
+              <span>{{item.suggest}}</span>
45
             </div>
46
             </div>
46
           </div>
47
           </div>
47
         </div>
48
         </div>
@@ -55,8 +56,8 @@
55
         <div class="lable-list">
56
         <div class="lable-list">
56
           <div v-for="(item,index) in lableList"
57
           <div v-for="(item,index) in lableList"
57
                :key="index"
58
                :key="index"
58
-               :class="['lable-info', item.disabled?'active':'']">
59
-            {{item.text}}
59
+               :class="['lable-info', tags.indexOf(item)>-1?'active':'']">
60
+            {{item}}
60
           </div>
61
           </div>
61
           <div class="add-lable">
62
           <div class="add-lable">
62
             +
63
             +
@@ -86,12 +87,12 @@
86
                :key="index"
87
                :key="index"
87
                @click="onOperation(index)">
88
                @click="onOperation(index)">
88
             <div class="programme-left">
89
             <div class="programme-left">
89
-              <div class="programme-img"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
90
+              <div class="programme-img"><img :src="item.cover_url"
90
                      alt=""></div>
91
                      alt=""></div>
91
               <div class="programme-tips">
92
               <div class="programme-tips">
92
-                <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
93
-                <div class="tips-title">{{'美白、祛痘、抗皱'|ellipsis(9)}}</div>
94
-                <div class="tips-title">仪器:<span>{{'无创水光'|ellipsis(9)}}</span></div>
93
+                <div class="tips-title">{{item.name|ellipsis(9)}}</div>
94
+                <div class="tips-title">{{item.desc|ellipsis(9)}}</div>
95
+                <div class="tips-title">仪器:<span>{{item.device_name|ellipsis(9)}}</span></div>
95
               </div>
96
               </div>
96
             </div>
97
             </div>
97
             <div class="programme-right">
98
             <div class="programme-right">
@@ -122,9 +123,9 @@
122
                    class="project-select"
123
                    class="project-select"
123
                    size="mini">
124
                    size="mini">
124
           <el-option v-for="item in projectList"
125
           <el-option v-for="item in projectList"
125
-                     :key="item.value"
126
-                     :label="item.label"
127
-                     :value="item.value">
126
+                     :key="item.id"
127
+                     :label="item.name"
128
+                     :value="item.id">
128
           </el-option>
129
           </el-option>
129
         </el-select>
130
         </el-select>
130
         <div class="frequency">
131
         <div class="frequency">
@@ -158,63 +159,21 @@
158
 </template>
159
 </template>
159
 
160
 
160
 <script>
161
 <script>
161
-import { mapActions } from 'vuex'
162
 import minePupop from '../../../components/minePupop/index.vue'
162
 import minePupop from '../../../components/minePupop/index.vue'
163
+import api from '../../../server/home'
163
 
164
 
164
 export default {
165
 export default {
165
   components: { minePupop },
166
   components: { minePupop },
166
   data () {
167
   data () {
167
     return {
168
     return {
168
       userInfo: {
169
       userInfo: {
169
-        image: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
170
-        name: '张三',
171
-        sex: '女',
172
-        age: '23',
173
-        skinType: '中性皮肤'
174
       },
170
       },
171
+      //皮肤总结
172
+      detail_list: [],
175
       //面部标签
173
       //面部标签
176
-      lableList: [
177
-        {
178
-          text: '对话框的',
179
-          disabled: false
180
-        },
181
-        {
182
-          text: '对话框的',
183
-          disabled: true
184
-        },
185
-        {
186
-          text: '对话框的',
187
-          disabled: false
188
-        },
189
-        {
190
-          text: '对话框的',
191
-          disabled: false
192
-        },
193
-        {
194
-          text: '对话框的',
195
-          disabled: false
196
-        },
197
-        {
198
-          text: '对话框的',
199
-          disabled: false
200
-        },
201
-        {
202
-          text: '对话框的',
203
-          disabled: false
204
-        },
205
-        {
206
-          text: '对话框的',
207
-          disabled: false
208
-        },
209
-        {
210
-          text: '对话框的',
211
-          disabled: false
212
-        },
213
-        {
214
-          text: '对话框的',
215
-          disabled: false
216
-        },
217
-      ],
174
+      lableList: [],
175
+      //后台默认的标签
176
+      tags: [],
218
       //执行方案
177
       //执行方案
219
       programmeList: [
178
       programmeList: [
220
         {
179
         {
@@ -267,12 +226,14 @@ export default {
267
           label: '2'
226
           label: '2'
268
         },
227
         },
269
       ],
228
       ],
270
-      timesInfo: '',
271
-      projectInfo: '',
272
-      weekInfo: '',
229
+      timesInfo: '',//次数
230
+      projectInfo: '',//项目
231
+      projectId: '',//项目id
232
+      weekInfo: '',//周次
273
       programmeIndex: '',
233
       programmeIndex: '',
274
-      remarks: '',
275
-      isPupop: false
234
+      remarks: '',//备注
235
+      isPupop: false,
236
+      id: 0
276
     };
237
     };
277
   },
238
   },
278
   computed: {
239
   computed: {
@@ -281,6 +242,34 @@ export default {
281
   watch: {},
242
   watch: {},
282
 
243
 
283
   methods: {
244
   methods: {
245
+    getSkinInfo () {
246
+      api.getSkinInfo({ id: this.id }).then(res => {
247
+        this.userInfo = res.data.user
248
+        this.detail_list = res.data.detail_list
249
+        this.lableList = res.data.tags
250
+        this.programmeList = res.data.scheme_list
251
+        this.remarks = res.data.remark
252
+      })
253
+    },
254
+    getSkinTags () {
255
+      api.getSkinTags().then(res => {
256
+        this.tags = res.data.tags
257
+      })
258
+    },
259
+    getProject () {
260
+      api.getProject().then(res => {
261
+        this.projectList = res.data.list
262
+      })
263
+    },
264
+    getSkinUpdate () {
265
+      let params = {
266
+        remark: this.remarks,
267
+        tags: this.lableList.toString()
268
+      }
269
+      api.getSkinUpdate().then(res => {
270
+
271
+      })
272
+    },
284
     onOperation (index) {
273
     onOperation (index) {
285
       if (this.programmeList[index].onSelect) {
274
       if (this.programmeList[index].onSelect) {
286
         this.$set(this.programmeList[index], 'onSelect', !this.programmeList[index].onSelect)
275
         this.$set(this.programmeList[index], 'onSelect', !this.programmeList[index].onSelect)
@@ -289,13 +278,17 @@ export default {
289
       }
278
       }
290
     },
279
     },
291
     onSubmit () {
280
     onSubmit () {
292
-
281
+      this.getSkinUpdate()
293
     },
282
     },
294
     submitFrequency () { },
283
     submitFrequency () { },
295
   },
284
   },
296
 
285
 
297
   created () {
286
   created () {
298
-
287
+    let id = this.$route.query.id
288
+    this.id = id
289
+    this.getSkinInfo()
290
+    this.getProject()
291
+    this.getSkinTags()
299
   },
292
   },
300
 
293
 
301
   mounted () {
294
   mounted () {
@@ -328,6 +321,7 @@ export default {
328
         width: 96px;
321
         width: 96px;
329
         img {
322
         img {
330
           width: 100%;
323
           width: 100%;
324
+          border-radius: 5px;
331
           display: block;
325
           display: block;
332
         }
326
         }
333
       }
327
       }
@@ -404,11 +398,11 @@ export default {
404
             }
398
             }
405
             .right {
399
             .right {
406
               font-size: 12px;
400
               font-size: 12px;
407
-              transform: scale(0.83);
408
               font-family: PingFangSC-Regular, PingFang SC;
401
               font-family: PingFangSC-Regular, PingFang SC;
409
               font-weight: 400;
402
               font-weight: 400;
410
               color: #666666;
403
               color: #666666;
411
-              line-height: 16px;
404
+              line-height: 20px;
405
+              text-align: end;
412
             }
406
             }
413
           }
407
           }
414
           .bottom-tips {
408
           .bottom-tips {

+ 6 - 3
src/pages/testSkin/index.vue

@@ -30,7 +30,7 @@
30
         <div class="tab user-info"
30
         <div class="tab user-info"
31
              v-for="(item,index) in userList"
31
              v-for="(item,index) in userList"
32
              :key="index"
32
              :key="index"
33
-             @click="onDetails">
33
+             @click="onDetails(item.id)">
34
           <div class="head-img"><img :src="item.avatar_url"
34
           <div class="head-img"><img :src="item.avatar_url"
35
                  alt=""></div>
35
                  alt=""></div>
36
           <div class="head-name">{{ item.nickname }}</div>
36
           <div class="head-name">{{ item.nickname }}</div>
@@ -91,9 +91,12 @@ export default {
91
         }
91
         }
92
       })
92
       })
93
     },
93
     },
94
-    onDetails () {
94
+    onDetails (e) {
95
       this.$router.push({
95
       this.$router.push({
96
-        path: '/testSkin/details'
96
+        path: '/testSkin/details',
97
+        query: {
98
+          id: e
99
+        }
97
       })
100
       })
98
     },
101
     },
99
     handleCurrentChange (e) {
102
     handleCurrentChange (e) {

+ 18 - 0
src/server/home.js

@@ -21,6 +21,24 @@ export default class Home {
21
   static getSkinList (parms) {
21
   static getSkinList (parms) {
22
     return $http.get(url.getSkinList, parms);
22
     return $http.get(url.getSkinList, parms);
23
   }
23
   }
24
+  static getSkinInfo (parms) {
25
+    return $http.get(url.getSkinInfo, parms);
26
+  }
27
+  static getProject (parms) {
28
+    return $http.get(url.getProject, parms);
29
+  }
30
+  static getUserInfo (parms) {
31
+    return $http.get(url.getUserInfo, parms);
32
+  }
33
+  static getOrderInfo (parms) {
34
+    return $http.get(url.getOrderInfo, parms);
35
+  }
36
+  static getSkinTags (parms) {
37
+    return $http.get(url.getSkinTags, parms);
38
+  }
39
+  static getSkinUpdate (parms) {
40
+    return $http.post(url.getSkinUpdate, parms);
41
+  }
24
 }
42
 }
25
 
43
 
26
 
44
 

+ 15 - 3
src/server/urls.js

@@ -2,9 +2,21 @@ export default {
2
   //登录
2
   //登录
3
   getToken: '/v2/pad/login',
3
   getToken: '/v2/pad/login',
4
   //首页数据
4
   //首页数据
5
-  getTotal:'/v2/pad/home/total',
5
+  getTotal: '/v2/pad/home/total',
6
   //今日订单列表
6
   //今日订单列表
7
-  getToday:'/v2/pad/order/today',
7
+  getToday: '/v2/pad/order/today',
8
   //测肤记录列表
8
   //测肤记录列表
9
-  getSkinList:'/v2/pad/skin/list',
9
+  getSkinList: '/v2/pad/skin/list',
10
+  //测肤记录详情
11
+  getSkinInfo: '/v2/pad/skin/info',
12
+  //获取项目列表
13
+  getProject: '/v2/pad/scheme/project',
14
+  //获取用户信息
15
+  getUserInfo: '/v2/pad/account/info',
16
+  //获取订单详情
17
+  getOrderInfo: '/v2/pad/order/info',
18
+  //后台默认的标签
19
+  getSkinTags: '/v2/pad/skin/tags',
20
+  //保存测肤记录
21
+  getSkinUpdate:'/v2/pad/skin/update',
10
 }
22
 }