3 Revize 0beeefc7b6 ... 829edf3486

Autor SHA1 Zpráva Datum
  listKer 829edf3486 feat: 发券历史订单客户管理 před 2 roky
  黎海 dd0c64bb8e feat: 联调0517 před 2 roky
  黎海 7a7678fbcc feat: axios完善,接口联调 před 2 roky

+ 1 - 0
package.json

@@ -14,6 +14,7 @@
14 14
     "axios": "^0.27.2",
15 15
     "crypto-js": "^3.1.9-1",
16 16
     "element-ui": "^2.8.2",
17
+    "js-cookie": "^3.0.1",
17 18
     "vue": "^2.6.6",
18 19
     "vue-router": "^3.0.1",
19 20
     "vuex": "^3.0.1"

+ 32 - 32
src/common/errorHandler.js

@@ -1,38 +1,38 @@
1 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
 }

+ 122 - 96
src/common/http.js

@@ -5,14 +5,17 @@
5 5
 import axios from 'axios';
6 6
 import QS from 'qs';
7 7
 import store from '../store/index'
8
+import { Message, Loading } from 'element-ui'
9
+import { basePath, logFlag } from '@/config/env'
10
+import router from '../router/index'
8 11
 
9 12
 // 环境的切换
10 13
 if (process.env.NODE_ENV == 'development') {
11
-	axios.defaults.baseURL = '/api';
14
+  axios.defaults.baseURL = '/api';
12 15
 } else if (process.env.NODE_ENV == 'debug') {
13
-	axios.defaults.baseURL = '';
16
+  axios.defaults.baseURL = '';
14 17
 } else if (process.env.NODE_ENV == 'production') {
15
-	axios.defaults.baseURL = 'http://api.123dailu.com/';
18
+  axios.defaults.baseURL = 'http://api.123dailu.com/';
16 19
 }
17 20
 
18 21
 // 请求超时时间
@@ -20,116 +23,139 @@ axios.defaults.timeout = 10000;
20 23
 
21 24
 // post请求头
22 25
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
26
+axios.defaults.headers.post['token'] = localStorage.getItem('token');
27
+axios.defaults.headers.get['token'] = localStorage.getItem('token');
23 28
 
24 29
 // 请求拦截器
25 30
 axios.interceptors.request.use(
26
-	config => {
27
-		// 每次发送请求之前判断是否存在token,如果存在,则统一在http请求的header都加上token,不用每次请求都手动添加了
28
-		// 即使本地存在token,也有可能token是过期的,所以在响应拦截器中要对返回状态进行判断
29
-		const token = store.state.token;
30
-		token && (config.headers.Authorization = token);
31
-		return config;
32
-	},
33
-	error => {
34
-		return Promise.error(error);
35
-	})
31
+  config => {
32
+    // 每次发送请求之前判断是否存在token,如果存在,则统一在http请求的header都加上token,不用每次请求都手动添加了
33
+    // 即使本地存在token,也有可能token是过期的,所以在响应拦截器中要对返回状态进行判断
34
+    const token = localStorage.getItem('token');
35
+    if (!token) {
36
+      router.push('/login')
37
+    }
38
+    token && (config.headers.Authorization = token);
39
+    return config;
40
+  },
41
+  error => {
42
+    return Promise.error(error);
43
+  })
36 44
 
37 45
 // 响应拦截器
38 46
 axios.interceptors.response.use(
39
-	response => {
40
-		if (response.status === 200) {
41
-			return Promise.resolve(response);
42
-		} else {
43
-			return Promise.reject(response);
44
-		}
45
-	},
46
-	// 服务器状态码不是200的情况
47
-	error => {
48
-		if (error.response.status) {
49
-			switch (error.response.status) {
50
-				// 401: 未登录
51
-				// 未登录则跳转登录页面,并携带当前页面的路径
52
-				// 在登录成功后返回当前页面,这一步需要在登录页操作。
53
-				case 401:
54
-					router.replace({
55
-						path: '/login',
56
-						query: { redirect: router.currentRoute.fullPath }
57
-					});
58
-					break;
59
-				// 403 token过期
60
-				// 登录过期对用户进行提示
61
-				// 清除本地token和清空vuex中token对象
62
-				// 跳转登录页面
63
-				case 403:
64
-					this.$message.error('登录过期,请重新登录');
65
-					// 清除token
66
-					localStorage.removeItem('token');
67
-					store.commit('loginSuccess', null);
68
-					// 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面
69
-					setTimeout(() => {
70
-						router.replace({
71
-							path: '/login',
72
-							query: {
73
-								redirect: router.currentRoute.fullPath
74
-							}
75
-						});
76
-					}, 1000);
77
-					break;
78
-				// 404请求不存在
79
-				case 404:
80
-					this.$message.error('网络请求不存在');
81
-					break;
82
-				// 其他错误,直接抛出错误提示
83
-				default:
84
-					this.$message.error(error.response.data.message);
85
-			}
86
-			return Promise.reject(error.response);
87
-		}
88
-	}
47
+  response => {
48
+    if (response.status === 200) {
49
+      return Promise.resolve(response);
50
+    } else {
51
+      return Promise.reject(response);
52
+    }
53
+  },
54
+  // 服务器状态码不是200的情况
55
+  error => {
56
+    if (error.response.status) {
57
+      switch (error.response.status) {
58
+        // 401: 未登录
59
+        // 未登录则跳转登录页面,并携带当前页面的路径
60
+        // 在登录成功后返回当前页面,这一步需要在登录页操作。
61
+        case 401:
62
+          router.replace({
63
+            path: '/login',
64
+            query: { redirect: router.currentRoute.fullPath }
65
+          });
66
+          break;
67
+        // 403 token过期
68
+        // 登录过期对用户进行提示
69
+        // 清除本地token和清空vuex中token对象
70
+        // 跳转登录页面
71
+        case 403:
72
+          this.$message.error('登录过期,请重新登录');
73
+          // 清除token
74
+          localStorage.removeItem('token');
75
+          store.commit('loginSuccess', null);
76
+          // 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面
77
+          setTimeout(() => {
78
+            router.replace({
79
+              path: '/login',
80
+              query: {
81
+                redirect: router.currentRoute.fullPath
82
+              }
83
+            });
84
+          }, 1000);
85
+          break;
86
+        // 404请求不存在
87
+        case 404:
88
+          this.$message.error('网络请求不存在');
89
+          break;
90
+        // 其他错误,直接抛出错误提示
91
+        default:
92
+          this.$message.error(error.response.data.message);
93
+      }
94
+      return Promise.reject(error.response);
95
+    }
96
+  }
89 97
 )
90
-	/**
91
-	 * get方法,对应get请求
92
-	 * @param {String} url [请求的url地址]
93
-	 * @param {Object} params [请求时携带的参数]
94
-	 */
95
-function get(url, params){
96
-	return new Promise((resolve, reject) =>{
97
-		axios.get(url, {
98
-			params: params
99
-		})
100
-			.then(res => {
101
-				resolve(res.data);
102
-			})
103
-			.catch(err => {
104
-				reject(err.data)
105
-			})
106
-	});
98
+let reqUrl = ''
99
+/**
100
+ * get方法,对应get请求
101
+ * @param {String} url [请求的url地址]
102
+ * @param {Object} params [请求时携带的参数]
103
+ */
104
+function get (url, params) {
105
+  reqUrl = basePath + url
106
+  return new Promise((resolve, reject) => {
107
+    axios.get(reqUrl, {
108
+      params: params
109
+    })
110
+      .then(res => {
111
+        if (res.data.code != 200) {
112
+          Message({
113
+            message: res.data.msg,
114
+            type: 'error'
115
+          });
116
+        }
117
+        console.log(res.data);
118
+        resolve(res.data);
119
+      })
120
+      .catch(err => {
121
+        reject(err.data)
122
+      })
123
+  });
107 124
 }
108 125
 /**
109 126
  * post方法,对应post请求
110 127
  * @param {String} url [请求的url地址]
111 128
  * @param {Object} params [请求时携带的参数]
112 129
  */
113
-function post(url, params) {
114
-	return new Promise((resolve, reject) => {
115
-		axios.post(url, QS.stringify(params))
116
-			.then(res => {
117
-				resolve(res.data);
118
-			})
119
-			.catch(err => {
120
-				reject(err.data)
121
-			})
122
-	});
130
+function post (url, params) {
131
+  reqUrl = basePath + url
132
+  return new Promise((resolve, reject) => {
133
+    axios.post(reqUrl, QS.stringify(params))
134
+      .then(res => {
135
+        console.log(res, 'resres');
136
+        if (res.data.code != 200) {
137
+          Message({
138
+            message: res.data.msg,
139
+            type: 'error'
140
+          });
141
+        }
142
+        resolve(res.data);
143
+      })
144
+      .catch(err => {
145
+        console.log(err, 'errerrerr');
146
+        reject(err.data)
147
+      })
148
+  });
123 149
 }
124 150
 
125 151
 
126 152
 
127 153
 export default () => {
128
-	if (typeof window.$http == 'undefined') {
129
-		window.$http = {
130
-			post: post,
131
-			get: get
132
-		}
133
-	}
154
+  if (typeof window.$http == 'undefined') {
155
+    window.$http = {
156
+      post: post,
157
+      get: get
158
+    }
159
+  }
134 160
 }
135 161
 

+ 3 - 3
src/common/index.js

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

+ 24 - 1
src/common/utils.js

@@ -1,7 +1,30 @@
1 1
 // 自定义全局方法封装
2 2
 const utils = {
3
+  userInfo:{
4
+    
5
+  },
3 6
   test: function () { },
4
-  isBack: false
7
+  isBack: false,
8
+  formatTime: function (date, fmt) {
9
+    var date = new Date(date);
10
+    if (/(y+)/.test(fmt)) {
11
+      fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
12
+    }
13
+    var o = {
14
+      'M+': date.getMonth() + 1,
15
+      'd+': date.getDate(),
16
+      'h+': date.getHours(),
17
+      'm+': date.getMinutes(),
18
+      's+': date.getSeconds()
19
+    };
20
+    for (var k in o) {
21
+      if (new RegExp('(' + k + ')').test(fmt)) {
22
+        var str = o[k] + '';
23
+        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : ('00' + str).substr(str.length));
24
+      }
25
+    }
26
+    return fmt;
27
+  },
5 28
 
6 29
 }
7 30
 

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

@@ -12,11 +12,11 @@
12 12
                alt=""></div>
13 13
         <div class="left"
14 14
              v-if="menuIndex==0">
15
-          <div class="address">JOLIJOLI(西安)</div>
15
+          <div class="address">{{userInfo.store_name}}</div>
16 16
         </div>
17 17
         <div class="right">
18 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 20
         </div>
21 21
       </header>
22 22
       <div class="main-wrapper">
@@ -29,7 +29,6 @@
29 29
 <script type="text/javascript">
30 30
 import leftMenu from './leftMenu'
31 31
 import api from '@/server/home'
32
-import { mapState } from 'vuex'
33 32
 
34 33
 export default {
35 34
   data () {
@@ -37,26 +36,27 @@ export default {
37 36
       isFold: false,    //导航菜单面板是否折叠
38 37
       userId: 0,
39 38
       menuIndex: 0,
40
-      isback: false
39
+      isback: false,
40
+      userInfo: {
41
+        name: '333'
42
+      }
41 43
     }
42 44
   },
43 45
   created () {
44
-    this.initData();
46
+    this.getUserInfo()
45 47
   },
46 48
   components: {
47 49
     leftMenu,
48 50
   },
49 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 61
     loginOut () {
62 62
       let keys = document.cookie.match(/[^ =;]+(?=\=)/g);
@@ -64,7 +64,6 @@ export default {
64 64
         for (let i = keys.length; i--;)
65 65
           document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString()
66 66
       }
67
-      tool.toLogin();
68 67
     },
69 68
     changeMenu (index) {
70 69
       this.menuIndex = index
@@ -74,7 +73,6 @@ export default {
74 73
     }
75 74
   },
76 75
   computed: {
77
-    ...mapState(['user']),
78 76
     routerItems () {
79 77
       let resultArr = [];
80 78
       let routeNow = this.$route;

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

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

+ 1 - 21
src/config/env.js

@@ -1,26 +1,6 @@
1 1
 // 环境配置
2
-let appId = 102;       //sso登录服务的appid,传0表示走老的授权登录
3
-let appVersion = 1;    //sso登录服务的版本,默认为第一版
4
-let logFlag = {
5
-  dev: false,    			// 开发和测试环境是否上报log
6
-  from: false,   			// 是否上传页面来源
7
-  packageName: 'web-init'
8
-};
9
-let basePath = 'https://store.api.ijolijoli.com/'; 	// api请求地址
10
-let ssoPath = 'https://sso.51yund.com';		// 授权登录地址
11
-let localPath = 'https://51yund.com';       // 获取定位地址
12
-let logPath = 'https://api.51yund.com';     // 上传日志地址
13
-let jumpPath = 'https://d.51yund.com';		// 跳转登录地址
14
-let filterErr = ['sskey过期'];  //过滤掉某些错不上报
2
+let basePath = 'https://store.api.ijolijoli.com'; 	// api请求地址
15 3
 
16 4
 export {
17 5
   basePath,
18
-  ssoPath,
19
-  localPath,
20
-  jumpPath,
21
-  logPath,
22
-  logFlag,
23
-  appId,
24
-  appVersion,
25
-  filterErr
26 6
 }

+ 3 - 3
src/main.js

@@ -3,18 +3,18 @@ import App from './App.vue'
3 3
 import router from './router/index'
4 4
 import store from './store/index'
5 5
 import login from './common/login'
6
-import auth from './common/auth'
7
-import { injectGlobal } from './common/'
8 6
 import ElementUI from 'element-ui'
9 7
 import 'element-ui/lib/theme-chalk/index.css'
8
+import auth from './common/auth'
9
+import { injectGlobal } from './common/'
10 10
 import './style/reset.less'
11 11
 import './style/common.less'
12 12
 import './assets/font/iconfont.css'
13 13
 import './style/index.less'
14 14
 import './filters/filter'
15 15
 //全局注入
16
-injectGlobal()
17 16
 Vue.use(ElementUI)
17
+injectGlobal()
18 18
 
19 19
 window.globalVue = "";
20 20
 // login((hasLogin)=>{

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

@@ -258,8 +258,8 @@
258 258
 </template>
259 259
 
260 260
 <script>
261
-import { lstat } from 'fs';
262 261
 import minePupop from '../../../components/minePupop/index.vue'
262
+import api from '../../../server/home'
263 263
 
264 264
 export default {
265 265
   components: { minePupop },
@@ -268,11 +268,6 @@ export default {
268 268
       select: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/select.png',
269 269
       unSelect: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/unSelect.png',
270 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 273
       lableList: [
@@ -466,7 +461,7 @@ export default {
466 461
           mini: 242
467 462
         }
468 463
       ],
469
-    
464
+
470 465
       couponList: [
471 466
         {
472 467
 
@@ -483,6 +478,7 @@ export default {
483 478
       isProject: false,//是否展示选择项目弹窗
484 479
       isTs: false,//是否展示选择时间弹窗
485 480
       isPore: false,//皮肤状态弹窗
481
+      id: 0,//订单id
486 482
     };
487 483
   },
488 484
   computed: {
@@ -491,6 +487,12 @@ export default {
491 487
   watch: {},
492 488
 
493 489
   methods: {
490
+    getOrderInfo () {
491
+      api.getOrderInfo({ id: this.id }).then(res => {
492
+        this.userInfo = res.data.user
493
+
494
+      })
495
+    },
494 496
     onOperation (index) {
495 497
       if (this.programmeList[index].onSelect) {
496 498
         this.$set(this.programmeList[index], 'onSelect', !this.programmeList[index].onSelect)
@@ -505,7 +507,11 @@ export default {
505 507
   },
506 508
 
507 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 517
   mounted () {

+ 116 - 137
src/pages/coupon/index.vue

@@ -1,179 +1,152 @@
1 1
 <template>
2 2
   <div class="mine">
3 3
     <div class="table">
4
-      <el-input class="search-input"
5
-                placeholder="请输入内容"
6
-                prefix-icon="el-icon-search"
7
-                size="mini"
8
-                v-model="searckItem">
9
-      </el-input>
4
+      <el-input
5
+        class="search-input"
6
+        placeholder="请输入内容"
7
+        prefix-icon="el-icon-search"
8
+        size="mini"
9
+        v-model="searckItem"
10
+      ></el-input>
10 11
       <div class="search-button">搜索</div>
11 12
       <div class="coupon">选择优惠券</div>
12
-      <el-select class="coupon-select"
13
-                 v-model="coupon"
14
-                 size="mini"
15
-                 placeholder="选择优惠券">
16
-        <el-option v-for="item in couponList"
17
-                   :key="item.value"
18
-                   :label="item.label"
19
-                   :value="item.value">
20
-        </el-option>
13
+      <el-select class="coupon-select" v-model="coupon" size="mini" placeholder="选择优惠券">
14
+        <el-option v-for="item in couponList" :key="item.id" :label="item.name" :value="item.id"></el-option>
21 15
       </el-select>
22 16
       <div class="num-tips">数量</div>
23 17
       <div class="coupon-num">
24
-        <div class="reduce"
25
-             @click="reduceNum">-</div>
18
+        <div class="reduce" @click="reduceNum">-</div>
26 19
         <div class="num">{{couponNum}}</div>
27
-        <div class="add"
28
-             @click="couponNum++">+</div>
20
+        <div class="add" @click="couponNum++">+</div>
29 21
       </div>
30
-      <div class="send-coupon"
31
-           style="margin-left: 39px;"
32
-           @click="sendCoupon">发送</div>
22
+      <div class="send-coupon" style="margin-left: 39px;" @click="sendCoupon">发送</div>
33 23
     </div>
34 24
     <div class="user-list">
35
-      <el-table ref="multipleTable"
36
-                :data="tableData"
37
-                tooltip-effect="dark"
38
-                height="454"
39
-                style="width: 100%;border-radius: 8px;"
40
-                @selection-change="handleSelectionChange">
41
-        <el-table-column type="selection"
42
-                         width="55">
43
-        </el-table-column>
44
-        <el-table-column label="头像"
45
-                         width="120">
25
+      <el-table
26
+        ref="multipleTable"
27
+        :data="tableData"
28
+        tooltip-effect="dark"
29
+        height="354"
30
+        style="width: 100%;border-radius: 8px;"
31
+        @selection-change="handleSelectionChange"
32
+      >
33
+        <el-table-column type="selection" width="55"></el-table-column>
34
+        <el-table-column label="头像" width="120">
46 35
           <template slot-scope="scope">
47
-            <div class="head-img"><img :src="scope.row.headImg"
48
-                   alt=""></div>
36
+            <div class="head-img">
37
+              <img :src="scope.row.avatar_url" alt />
38
+            </div>
49 39
           </template>
50 40
         </el-table-column>
51
-        <el-table-column prop="name"
52
-                         label="姓名"
53
-                         width="120">
54
-        </el-table-column>
55
-        <el-table-column prop="phone"
56
-                         label="联系电话"
57
-                         show-overflow-tooltip>
58
-        </el-table-column>
59
-        <el-table-column prop="date"
60
-                         label="注册时间"
61
-                         show-overflow-tooltip>
62
-        </el-table-column>
41
+        <el-table-column prop="nickname" label="昵称" width="120"></el-table-column>
42
+        <el-table-column prop="mobile" label="联系电话" show-overflow-tooltip></el-table-column>
43
+        <el-table-column prop="create_time" label="注册时间" show-overflow-tooltip></el-table-column>
63 44
       </el-table>
45
+
46
+      <div class="pagin">
47
+        <el-pagination
48
+          background
49
+          layout="prev, pager, next"
50
+          @size-change="handleSizeChange"
51
+          @current-change="handleCurrentChange"
52
+          :current-page.sync="currentPage1"
53
+          :total="total"
54
+        ></el-pagination>
55
+      </div>
64 56
     </div>
65 57
   </div>
66 58
 </template>
67 59
 
68 60
 <script>
61
+import api from "../../server/home";
62
+
69 63
 export default {
70 64
   components: {},
71
-  data () {
65
+  data() {
72 66
     return {
73
-      searckItem: '',
74
-      couponList: [
75
-        {
76
-          value: '选项1',
77
-          label: '黄金糕'
78
-        }, {
79
-          value: '选项2',
80
-          label: '双皮奶'
81
-        }
82
-      ],
83
-      tableData: [{
84
-        date: '2022.04.25  14:30',
85
-        name: '滴滴滴',
86
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
87
-        phone: '13346783645'
88
-      }, {
89
-        date: '2022.04.25  14:30',
90
-        name: '滴滴滴',
91
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
92
-        phone: '13346783645'
93
-      }, {
94
-        date: '2022.04.25  14:30',
95
-        name: '滴滴滴',
96
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
97
-        phone: '13346783645'
98
-      }, {
99
-        date: '2022.04.25  14:30',
100
-        name: '滴滴滴',
101
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
102
-        phone: '13346783645'
103
-      }, {
104
-        date: '2022.04.25  14:30',
105
-        name: '滴滴滴',
106
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
107
-        phone: '13346783645'
108
-      }, {
109
-        date: '2022.04.25  14:30',
110
-        name: '滴滴滴',
111
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
112
-        phone: '13346783645'
113
-      }, {
114
-        date: '2022.04.25  14:30',
115
-        name: '滴滴滴',
116
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
117
-        phone: '13346783645'
118
-      }, {
119
-        date: '2022.04.25  14:30',
120
-        name: '滴滴滴',
121
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
122
-        phone: '13346783645'
123
-      }, {
124
-        date: '2022.04.25  14:30',
125
-        name: '滴滴滴',
126
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
127
-        phone: '13346783645'
128
-      }, {
129
-        date: '2022.04.25  14:30',
130
-        name: '滴滴滴',
131
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
132
-        phone: '13346783645'
133
-      }, {
134
-        date: '2022.04.25  14:30',
135
-        name: '滴滴滴',
136
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
137
-        phone: '13346783645'
138
-      }, {
139
-        date: '2022.04.25  14:30',
140
-        name: '滴滴滴',
141
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
142
-        phone: '13346783645'
143
-      }, {
144
-        date: '2022.04.25  14:30',
145
-        name: '滴滴滴',
146
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
147
-        phone: '13346783645'
148
-      },
149
-      ],
150
-      multipleSelection: [],//选中的列表
151
-      coupon: '',
152
-      couponNum: 1,//优惠券数量
67
+      searckItem: "",
68
+      couponList: [],
69
+      tableData: [],
70
+      multipleSelection: [], //选中的列表
71
+      coupon: "",
72
+      couponNum: 1, //优惠券数量
73
+      currentPage1: 1
153 74
     };
154 75
   },
155 76
   computed: {},
156 77
   watch: {},
157 78
 
158 79
   methods: {
159
-    reduceNum () {
160
-      this.couponNum > 1 ? this.couponNum-- : this.couponNum = 1
80
+    reduceNum() {
81
+      this.couponNum > 1 ? this.couponNum-- : (this.couponNum = 1);
161 82
     },
162
-    handleSelectionChange (val) {
83
+    handleSelectionChange(val) {
163 84
       this.multipleSelection = val;
85
+      console.log(this.multipleSelection);
86
+    },
87
+    // 发送优惠券
88
+    sendCoupon() {
89
+      console.log(this.coupon);
90
+      let selectIds = "";
91
+      for (let i = 0; i < this.multipleSelection.length; i++) {
92
+        selectIds = selectIds + ","+this.multipleSelection[i].id;
93
+      }
94
+      let params = {
95
+        id: this.coupon,
96
+        user_ids: selectIds.substring(1,selectIds.length),
97
+        num: this.couponNum
98
+      };
99
+      api.sendCoupon(params).then(res => {});
100
+    },
101
+
102
+    // 获取订单列表
103
+    getUserList() {
104
+      console.log("xxxxxxx");
105
+      let params = {
106
+        page: this.currentPage1,
107
+        limit: this.limit,
108
+        keywords: this.searchText
109
+      };
110
+      api.getUserList(params).then(res => {
111
+        if (res.code == 200) {
112
+          this.tableData = res.data.list;
113
+          this.total = res.data.total;
114
+        }
115
+      });
164 116
     },
165
-    sendCoupon () { },
166
-  },
167 117
 
168
-  created () {
118
+    // 获取优惠券列表
119
+    getCouponInfo() {
120
+      console.log("xxxxxxx");
121
+      let params = {
122
+        page: this.currentPage1,
123
+        limit: 100
124
+      };
125
+      api.getCouponInfo(params).then(res => {
126
+        if (res.code == 200) {
127
+          this.couponList = res.data.list;
128
+        }
129
+      });
130
+    },
169 131
 
170
-  },
132
+    handleCurrentChange(e) {
133
+      this.currentPage1 = e;
134
+      this.getUserList();
135
+      console.log(e, "eeeeee");
136
+    },
171 137
 
172
-  mounted () {
138
+    handleSizeChange(val) {
139
+      console.log(`每页 ${val} 条`);
140
+    }
141
+  },
173 142
 
143
+  created() {
144
+    this.getUserList();
145
+    this.getCouponInfo();
174 146
   },
175
-}
176 147
 
148
+  mounted() {}
149
+};
177 150
 </script>
178 151
 
179 152
 <style lang='less' scoped>
@@ -252,6 +225,12 @@ export default {
252 225
         height: 100%;
253 226
       }
254 227
     }
228
+    .pagin {
229
+      padding: 20px 0;
230
+      .el-pagination {
231
+        text-align: center;
232
+      }
233
+    }
255 234
     /deep/ .el-table th > .cell {
256 235
       font-size: 14px !important;
257 236
       font-family: PingFangSC-Regular, PingFang SC;

+ 411 - 346
src/pages/customerMan/details/index.vue

@@ -2,235 +2,303 @@
2 2
   <div class="mine">
3 3
     <div class="left">
4 4
       <div class="user-info">
5
-        <div class="user-img"><img :src="userInfo.image"
6
-               alt=""></div>
5
+        <div class="user-img">
6
+          <img :src="userInfo.image" alt />
7
+        </div>
7 8
         <div class="user-span">
8
-          <div class="name">昵称:<span>{{userInfo.name}}</span></div>
9
-          <div class="sex">性别:<span>{{userInfo.sex}}</span></div>
10
-          <div class="age">肤龄:<span>{{userInfo.age}}</span></div>
11
-          <div class="skin-type">肤质:<span>{{userInfo.skinType}}</span></div>
9
+          <div class="name">
10
+            昵称:
11
+            <span>{{userInfo.name}}</span>
12
+          </div>
13
+          <div class="sex">
14
+            性别:
15
+            <span>{{userInfo.sex}}</span>
16
+          </div>
17
+          <div class="age">
18
+            肤龄:
19
+            <span>{{userInfo.age}}</span>
20
+          </div>
21
+          <div class="skin-type">
22
+            肤质:
23
+            <span>{{userInfo.skinType}}</span>
24
+          </div>
12 25
         </div>
13
-        
14 26
       </div>
15 27
       <div class="personage-data">
16
-           <div class="myDataList">肌肤得分:<span class="bigSixe">56分</span></div>
17
-          <div class="myDataList">皮肤状态:<span>肤质一般</span></div>
18
-          <div class="myDataList">上传检测时间:<span>2022.0418 16:04</span></div>
19
-          <div class="myDataList">出生日期:<span>2000.02.29</span></div>
20
-          <div class="myDataList">联系电话:<span>13334597987</span></div>
21
-
22
-          <div class="myDataList">所在地:<span>广东省,深圳市,南山区</span></div>
23
-
24
-          <div class="myDataList">开卡店铺:<span>JOLIJOLI(西安店)</span></div>
28
+        <div class="myDataList">
29
+          肌肤得分:
30
+          <span class="bigSixe">56分</span>
31
+        </div>
32
+        <div class="myDataList">
33
+          皮肤状态:
34
+          <span>肤质一般</span>
35
+        </div>
36
+        <div class="myDataList">
37
+          上传检测时间:
38
+          <span>2022.0418 16:04</span>
39
+        </div>
40
+        <div class="myDataList">
41
+          出生日期:
42
+          <span>2000.02.29</span>
43
+        </div>
44
+        <div class="myDataList">
45
+          联系电话:
46
+          <span>13334597987</span>
47
+        </div>
25 48
 
26
-          <div class="myDataList">卡卷数量:<span>5</span></div>
49
+        <div class="myDataList">
50
+          所在地:
51
+          <span>广东省,深圳市,南山区</span>
52
+        </div>
27 53
 
28
-          <div class="myDataList">储值金额:<span class="JEcolor">¥<span class="bigSixe">500</span>.00</span></div>
29
-          <div class="myDataList">积分:<span>200</span></div>
54
+        <div class="myDataList">
55
+          开卡店铺:
56
+          <span>JOLIJOLI(西安店)</span>
57
+        </div>
30 58
 
59
+        <div class="myDataList">
60
+          卡卷数量:
61
+          <span>5</span>
62
+        </div>
31 63
 
64
+        <div class="myDataList">
65
+          储值金额:
66
+          <span class="JEcolor">
67
+            ¥
68
+            <span class="bigSixe">500</span>.00
69
+          </span>
70
+        </div>
71
+        <div class="myDataList">
72
+          积分:
73
+          <span>200</span>
74
+        </div>
32 75
       </div>
33 76
     </div>
34
-    <div class="right"> 
35
-       <div class="right-top">
36
-            <div class="right-top-data">
37
-                <div class="lable">
38
-                    <div class="lable-title">
39
-                        面诊标签
40
-                    </div>
41
-                    <div class="lable-list">
42
-                        <div v-for="(item,index) in lableList"
43
-                            :key="index"
44
-                            class='lable-info'>
45
-                        {{item.text}}
46
-                        </div>
47
-                    </div>
77
+    <div class="right">
78
+      <div class="right-top">
79
+        <div class="right-top-data">
80
+          <div class="lable">
81
+            <div class="lable-title">面诊标签</div>
82
+            <div class="lable-list">
83
+              <div v-for="(item,index) in lableList" :key="index" class="lable-info">{{item.text}}</div>
84
+            </div>
85
+          </div>
86
+          <div class="ps">
87
+            <div class="ps-title">备注</div>
88
+            <div class="ps-text">{{'富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆' | ellipsis(20)}}</div>
89
+          </div>
90
+        </div>
91
+        <div class="right-top-list" @click="toOrder(1)">
92
+          <div class="dataList">
93
+            <img :src="userInfo.image" />
94
+            <p>项目订单</p>
95
+            <span>19</span>
96
+          </div>
97
+          <div class="dataList" style="margin:18px 0px">
98
+            <img :src="userInfo.image" />
99
+            <p>项目订单</p>
100
+            <span>19</span>
101
+          </div>
102
+          <div class="dataList">
103
+            <img :src="userInfo.image" />
104
+            <p>项目订单</p>
105
+            <span>19</span>
106
+          </div>
107
+        </div>
108
+      </div>
109
+      <div class="right-bottom">
110
+        <div class="programme">
111
+          <div class="tab">
112
+            <div class="tab-title">执行方案</div>
113
+          </div>
114
+          <div class="programme-list">
115
+            <div
116
+              :class="['programme-info',item.onSelect?'programme-active':'']"
117
+              v-for="(item,index) in programmeList"
118
+              :key="index"
119
+              @click="onOperation(index)"
120
+            >
121
+              <div class="programme-left">
122
+                <div class="programme-img">
123
+                  <img
124
+                    src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
125
+                    alt
126
+                  />
48 127
                 </div>
49
-                <div class="ps">
50
-                    <div class="ps-title">
51
-                        备注
52
-                    </div>
53
-                    <div class="ps-text">{{'富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆' | ellipsis(20)}}</div>
54
-                    </div>
55
-            </div>  
56
-            <div class="right-top-list" @click="toOrder(1)">
57
-                <div class="dataList">
58
-                    <img :src="userInfo.image">
59
-                    <p>项目订单</p>
60
-                    <span>19</span>
128
+                <div class="programme-tips">
129
+                  <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
130
+                  <div class="tips-title">{{'美白、祛痘、抗皱'|ellipsis(9)}}</div>
131
+                  <div class="tips-title">
132
+                    仪器:
133
+                    <span>{{'无创水光'|ellipsis(9)}}</span>
134
+                  </div>
61 135
                 </div>
62
-                <div class="dataList" style="margin:18px 0px">
63
-                     <img :src="userInfo.image">
64
-                    <p>项目订单</p>
65
-                    <span>19</span>
136
+              </div>
137
+              <div class="programme-right">
138
+                <div class="frequency">
139
+                  执行频率:
140
+                  <span>一周一次</span>
66 141
                 </div>
67
-                <div class="dataList">
68
-                     <img :src="userInfo.image">
69
-                    <p>项目订单</p>
70
-                    <span>19</span>
142
+                <div class="duration">
143
+                  持续时长:
144
+                  <span>28天</span>
71 145
                 </div>
72
-            </div>
73
-       </div>
74
-       <div class="right-bottom">
75
-           <div class="programme">
76
-        <div class="tab">
77
-          <div class="tab-title">执行方案</div>
78
-        </div>
79
-        <div class="programme-list">
80
-          <div :class="['programme-info',item.onSelect?'programme-active':'']"
81
-               v-for="(item,index) in programmeList"
82
-               :key="index"
83
-               @click="onOperation(index)">
84
-            <div class="programme-left">
85
-              <div class="programme-img"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
86
-                     alt=""></div>
87
-              <div class="programme-tips">
88
-                <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
89
-                <div class="tips-title">{{'美白、祛痘、抗皱'|ellipsis(9)}}</div>
90
-                <div class="tips-title">仪器:<span>{{'无创水光'|ellipsis(9)}}</span></div>
91 146
               </div>
92
-            </div>
93
-            <div class="programme-right">
94
-              <div class="frequency">执行频率:<span>一周一次</span></div>
95
-              <div class="duration">持续时长:<span>28天</span></div>
96
-            </div>
97
-            <div class="operation"
98
-                 v-if="item.onSelect">
99
-              <div class="edit">编辑</div>
100
-              <div class="delete">删除</div>
147
+              <div class="operation" v-if="item.onSelect">
148
+                <div class="edit">编辑</div>
149
+                <div class="delete">删除</div>
150
+              </div>
101 151
             </div>
102 152
           </div>
103 153
         </div>
104 154
       </div>
105
-       </div>
106 155
     </div>
107
-      
108 156
   </div>
109 157
 </template>
110 158
 
111 159
 <script>
160
+import api from "../../../server/home";
112 161
 
113 162
 export default {
114
-  data () {
163
+  data() {
115 164
     return {
116 165
       userInfo: {
117
-        image: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
118
-        name: '张三',
119
-        sex: '女',
120
-        age: '23',
121
-        skinType: '中性皮肤'
166
+        image:
167
+          "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
168
+        name: "张三",
169
+        sex: "女",
170
+        age: "23",
171
+        skinType: "中性皮肤"
122 172
       },
123 173
       //面部标签
124 174
       lableList: [
125 175
         {
126
-          text: '对话框的',
176
+          text: "对话框的",
127 177
           disabled: false
128 178
         },
129 179
         {
130
-          text: '对话框的',
180
+          text: "对话框的",
131 181
           disabled: true
132 182
         },
133 183
         {
134
-          text: '对话框的',
184
+          text: "对话框的",
135 185
           disabled: false
136 186
         },
137 187
         {
138
-          text: '对话框的',
188
+          text: "对话框的",
139 189
           disabled: false
140 190
         },
141 191
         {
142
-          text: '对话框的',
192
+          text: "对话框的",
143 193
           disabled: false
144
-        },
145
-       
194
+        }
146 195
       ],
147 196
       //执行方案
148 197
       programmeList: [
149 198
         {
150
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
151
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
152
-          tips: '+润百颜精华',
153
-          zoom: '皮肤综合仪(30号房)',
154
-          ts: '30分钟',
155
-          price: '79.00'
199
+          image:
200
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
201
+          title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
202
+          tips: "+润百颜精华",
203
+          zoom: "皮肤综合仪(30号房)",
204
+          ts: "30分钟",
205
+          price: "79.00"
156 206
         },
157 207
         {
158
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
159
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
160
-          tips: '+润百颜精华',
161
-          zoom: '皮肤综合仪(30号房)',
162
-          ts: '30分钟',
163
-          price: '79.00'
208
+          image:
209
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
210
+          title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
211
+          tips: "+润百颜精华",
212
+          zoom: "皮肤综合仪(30号房)",
213
+          ts: "30分钟",
214
+          price: "79.00"
164 215
         },
165 216
         {
166
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
167
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
168
-          tips: '+润百颜精华',
169
-          zoom: '皮肤综合仪(30号房)',
170
-          ts: '30分钟',
171
-          price: '79.00'
172
-        },
217
+          image:
218
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
219
+          title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
220
+          tips: "+润百颜精华",
221
+          zoom: "皮肤综合仪(30号房)",
222
+          ts: "30分钟",
223
+          price: "79.00"
224
+        }
173 225
       ],
174 226
       //项目列表
175
-      projectList: [{
176
-        value: '选项1',
177
-        label: '黄金糕'
178
-      }, {
179
-        value: '选项2',
180
-        label: '双皮奶'
181
-      }, {
182
-        value: '选项3',
183
-        label: '蚵仔煎'
184
-      }, {
185
-        value: '选项4',
186
-        label: '龙须面'
187
-      }, {
188
-        value: '选项5',
189
-        label: '北京烤鸭'
190
-      }],
191
-      timesInfo: '',
192
-      projectInfo: '',
193
-      weekInfo: '',
194
-      programmeIndex: '',
195
-      remarks: '',
227
+      projectList: [
228
+        {
229
+          value: "选项1",
230
+          label: "黄金糕"
231
+        },
232
+        {
233
+          value: "选项2",
234
+          label: "双皮奶"
235
+        },
236
+        {
237
+          value: "选项3",
238
+          label: "蚵仔煎"
239
+        },
240
+        {
241
+          value: "选项4",
242
+          label: "龙须面"
243
+        },
244
+        {
245
+          value: "选项5",
246
+          label: "北京烤鸭"
247
+        }
248
+      ],
249
+      timesInfo: "",
250
+      projectInfo: "",
251
+      weekInfo: "",
252
+      programmeIndex: "",
253
+      remarks: "",
196 254
       isPupop: false
197 255
     };
198 256
   },
199
-  computed: {
200
-
201
-  },
257
+  computed: {},
202 258
   watch: {},
203 259
 
204 260
   methods: {
205
-    onOperation (index) {
261
+    getUserInfo() {
262
+      api.getUserInfo({ code: this.id }).then(res => {
263
+        this.userInfo = res.data.user;
264
+        this.order_data = res.data.order_data;
265
+        this.lableList = res.data.tags;
266
+        this.programmeList = res.data.order_data.project_list;
267
+        this.coupon_list = res.data.order_data.coupon_list;
268
+        this.remarks = res.data.remark;
269
+      });
270
+    },
271
+
272
+    onOperation(index) {
206 273
       if (this.programmeList[index].onSelect) {
207
-        this.$set(this.programmeList[index], 'onSelect', !this.programmeList[index].onSelect)
274
+        this.$set(
275
+          this.programmeList[index],
276
+          "onSelect",
277
+          !this.programmeList[index].onSelect
278
+        );
208 279
       } else {
209
-        this.$set(this.programmeList[index], 'onSelect', true)
280
+        this.$set(this.programmeList[index], "onSelect", true);
210 281
       }
211 282
     },
212
-    toOrder(index){
213
-        if(index === 1){
214
-           this.$router.push({
215
-            path: '/customerMan/projectOrder'
216
-            })
217
-        }
218
-    },
219
-    onSubmit () {
220
-
283
+    toOrder(index) {
284
+      if (index === 1) {
285
+        this.$router.push({
286
+          path: "/customerMan/projectOrder"
287
+        });
288
+      }
221 289
     },
222
-    submitFrequency () { },
223
-  },
224
-
225
-  created () {
226
-
290
+    onSubmit() {},
291
+    submitFrequency() {}
227 292
   },
228 293
 
229
-  mounted () {
230
-
294
+  created() {
295
+    let id = this.$route.query.id;
296
+    this.id = id;
297
+    this.getUserInfo();
231 298
   },
232
-}
233 299
 
300
+  mounted() {}
301
+};
234 302
 </script>
235 303
 
236 304
 <style lang='less' scoped>
@@ -262,14 +330,14 @@ export default {
262 330
       }
263 331
       .user-span {
264 332
         margin-left: 12px;
265
-        .sex{
266
-            margin-top: 8px;
333
+        .sex {
334
+          margin-top: 8px;
267 335
         }
268
-         .age{
269
-            margin-top: 8px;
336
+        .age {
337
+          margin-top: 8px;
270 338
         }
271
-         .skin-type{
272
-            margin-top: 8px;
339
+        .skin-type {
340
+          margin-top: 8px;
273 341
         }
274 342
 
275 343
         span {
@@ -277,232 +345,229 @@ export default {
277 345
         }
278 346
       }
279 347
     }
280
-    .personage-data{
281
-        margin-top: 30px;
282
-        .myDataList{
283
-          margin-top: 15px;
284
-          .bigSixe{
285
-              font-size: 18px;
286
-              color: #FA7D22;
287
-          }
288
-          span{
289
-             color: #333333;
290
-          }
291
-          .JEcolor{
292
-              color: #FA7D22;
293
-          }
348
+    .personage-data {
349
+      margin-top: 30px;
350
+      .myDataList {
351
+        margin-top: 15px;
352
+        .bigSixe {
353
+          font-size: 18px;
354
+          color: #fa7d22;
355
+        }
356
+        span {
357
+          color: #333333;
294 358
         }
359
+        .JEcolor {
360
+          color: #fa7d22;
361
+        }
362
+      }
295 363
     }
296
-  }  
297
- 
364
+  }
365
+
298 366
   .right {
299 367
     margin-left: 18px;
300 368
     position: relative;
301 369
     flex: 1;
302
-    .right-top{
303
-        height: 205px;
304
-        // border: 1px solid red;
370
+    .right-top {
371
+      height: 205px;
372
+      // border: 1px solid red;
373
+      display: flex;
374
+      .right-top-list {
375
+        width: 239ppx;
376
+        margin-left: 18px;
305 377
         display: flex;
306
-        .right-top-list{
307
-            width: 239ppx;
308
-            margin-left: 18px;
309
-            display: flex;
310
-            flex-direction: column;
311
-            .dataList{
312
-                height: 56px;
313
-                // width: 239ppx;
314
-                background: #ffffff;
315
-                box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
316
-                border-radius: 8px;
317
-                padding: 16px 12px 12px 12px;
318
-                display: flex;
319
-                align-items: center;
320
-                img{
321
-                    width: 33px;
322
-                    height: 33px;
323
-                }
324
-                p{
325
-                    font-size: 14px;
326
-                    margin-left:14px;
327
-                    margin-right: 80px;
328
-                }
329
-                span{
330
-                    font-size: 16px;
331
-                    margin-right: 20px;
332
-                }
333
-            }
334
-
378
+        flex-direction: column;
379
+        .dataList {
380
+          height: 56px;
381
+          // width: 239ppx;
382
+          background: #ffffff;
383
+          box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
384
+          border-radius: 8px;
385
+          padding: 16px 12px 12px 12px;
386
+          display: flex;
387
+          align-items: center;
388
+          img {
389
+            width: 33px;
390
+            height: 33px;
391
+          }
392
+          p {
393
+            font-size: 14px;
394
+            margin-left: 14px;
395
+            margin-right: 80px;
396
+          }
397
+          span {
398
+            font-size: 16px;
399
+            margin-right: 20px;
400
+          }
335 401
         }
336
-        .right-top-data{
337
-            background: #ffffff;
338
-            box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
339
-            border-radius: 8px;
340
-            padding: 16px 12px 12px 12px;
341
-            width: 310px;
342
-            height: 100%;
343
-            .lable {
344
-            //   margin-top: 23px;
345
-                width: 100%;
346
-                overflow: scroll;
347
-                background: #ffffff;
348
-            .lable-title {
402
+      }
403
+      .right-top-data {
404
+        background: #ffffff;
405
+        box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
406
+        border-radius: 8px;
407
+        padding: 16px 12px 12px 12px;
408
+        width: 310px;
409
+        height: 100%;
410
+        .lable {
411
+          //   margin-top: 23px;
412
+          width: 100%;
413
+          overflow: scroll;
414
+          background: #ffffff;
415
+          .lable-title {
349 416
             font-size: 14px;
350 417
             font-family: PingFangSC-Medium, PingFang SC;
351 418
             font-weight: 500;
352 419
             color: #333333;
353 420
             line-height: 20px;
354 421
             margin-bottom: 14px;
355
-            }
356
-            .lable-list {
422
+          }
423
+          .lable-list {
357 424
             width: 100%;
358 425
             min-height: 105rpx;
359 426
             .lable-info {
360
-                display: inline-block;
361
-                padding: 0 12px;
362
-                margin-left: 10px;
363
-                height: 24px;
364
-                line-height: 24px;
365
-                border-radius: 2px;
366
-                border: 1px solid #d6d6d6;
367
-                margin-bottom: 10px;
427
+              display: inline-block;
428
+              padding: 0 12px;
429
+              margin-left: 10px;
430
+              height: 24px;
431
+              line-height: 24px;
432
+              border-radius: 2px;
433
+              border: 1px solid #d6d6d6;
434
+              margin-bottom: 10px;
368 435
             }
369 436
             .add-lable {
370
-                display: inline-block;
371
-                width: 27px;
372
-                height: 24px;
373
-                line-height: 24px;
374
-                font-size: 12px;
375
-                font-family: PingFang-SC-Regular, PingFang-SC;
376
-                font-weight: 400;
377
-                color: #333333;
378
-                text-align: center;
379
-                margin-left: 10px;
380
-                border-radius: 2px;
381
-                border: 1px solid #d6d6d6;
382
-            }
437
+              display: inline-block;
438
+              width: 27px;
439
+              height: 24px;
440
+              line-height: 24px;
441
+              font-size: 12px;
442
+              font-family: PingFang-SC-Regular, PingFang-SC;
443
+              font-weight: 400;
444
+              color: #333333;
445
+              text-align: center;
446
+              margin-left: 10px;
447
+              border-radius: 2px;
448
+              border: 1px solid #d6d6d6;
383 449
             }
384
-            .remarks {
450
+          }
451
+          .remarks {
385 452
             /deep/ .el-textarea__inner:focus {
386
-                border-color: #fa852f;
387
-            }
453
+              border-color: #fa852f;
388 454
             }
389
-    }
390
-    .ps {
391
-      font-size: 14px;
392
-      font-family: PingFangSC-Medium, PingFang SC;
393
-      font-weight: 500;
394
-      color: #333333;
395
-      line-height: 20px;
396
-      .ps-text {
397
-        margin-top: 10px;
398
-        font-size: 12px;
399
-        font-weight: 400;
400
-        color: #666666;
401
-        line-height: 17px;
402
-      }
403
-    }
455
+          }
404 456
         }
405
-    }
406
-   .right-bottom{
407
-      margin-top: 18px;
408
-      background: #ffffff;
409
-      box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
410
-      border-radius: 8px;
411
-      padding: 16px 61px 12px 12px;
412
-      .programme {
413
-    //   margin-top: 20px;
414
-      width: 100%;
415
-      background: #ffffff;
416
-      border-radius: 8px;
417
-        
418
-      .tab {
419
-        display: flex;
420
-        align-items: center;
421
-        justify-content: space-between;
422
-        .tab-title {
457
+        .ps {
423 458
           font-size: 14px;
424 459
           font-family: PingFangSC-Medium, PingFang SC;
425 460
           font-weight: 500;
426 461
           color: #333333;
427 462
           line-height: 20px;
463
+          .ps-text {
464
+            margin-top: 10px;
465
+            font-size: 12px;
466
+            font-weight: 400;
467
+            color: #666666;
468
+            line-height: 17px;
469
+          }
428 470
         }
429 471
       }
430
-      .programme-list {
431
-        margin-top: 10px;
432
-        position: relative;
433
-        z-index: 1;
434
-        .programme-info {
435
-          position: relative;
436
-          margin-bottom: 10px;
437
-          border-radius: 4px;
438
-          border: 1px solid #f5f5f5;
472
+    }
473
+    .right-bottom {
474
+      margin-top: 18px;
475
+      background: #ffffff;
476
+      box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
477
+      border-radius: 8px;
478
+      padding: 16px 61px 12px 12px;
479
+      .programme {
480
+        //   margin-top: 20px;
481
+        width: 100%;
482
+        background: #ffffff;
483
+        border-radius: 8px;
484
+
485
+        .tab {
439 486
           display: flex;
440
-          justify-content: space-between;
441
-          padding: 8px 8px 8px 10px;
442 487
           align-items: center;
443
-          .programme-left {
488
+          justify-content: space-between;
489
+          .tab-title {
490
+            font-size: 14px;
491
+            font-family: PingFangSC-Medium, PingFang SC;
492
+            font-weight: 500;
493
+            color: #333333;
494
+            line-height: 20px;
495
+          }
496
+        }
497
+        .programme-list {
498
+          margin-top: 10px;
499
+          position: relative;
500
+          z-index: 1;
501
+          .programme-info {
502
+            position: relative;
503
+            margin-bottom: 10px;
504
+            border-radius: 4px;
505
+            border: 1px solid #f5f5f5;
444 506
             display: flex;
507
+            justify-content: space-between;
508
+            padding: 8px 8px 8px 10px;
445 509
             align-items: center;
446
-            .programme-img {
447
-              width: 48px;
448
-              display: inline-block;
449
-              img {
450
-                width: 100%;
451
-                display: block;
510
+            .programme-left {
511
+              display: flex;
512
+              align-items: center;
513
+              .programme-img {
514
+                width: 48px;
515
+                display: inline-block;
516
+                img {
517
+                  width: 100%;
518
+                  display: block;
519
+                }
520
+              }
521
+              .programme-tips {
522
+                display: inline-block;
523
+                margin-left: 10px;
524
+                font-size: 10px;
525
+                font-family: PingFangSC-Regular, PingFang SC;
526
+                font-weight: 400;
527
+                color: #999999;
528
+                line-height: 14px;
529
+                zoom: 0.83;
452 530
               }
453 531
             }
454
-            .programme-tips {
455
-              display: inline-block;
456
-              margin-left: 10px;
457
-              font-size: 10px;
532
+            .programme-right {
533
+              font-size: 12px;
458 534
               font-family: PingFangSC-Regular, PingFang SC;
459 535
               font-weight: 400;
460
-              color: #999999;
461
-              line-height: 14px;
462
-              zoom: 0.83;
536
+              color: #333333;
537
+              line-height: 17px;
538
+              .duration {
539
+                margin-top: 14px;
540
+              }
463 541
             }
464
-          }
465
-          .programme-right {
466
-            font-size: 12px;
467
-            font-family: PingFangSC-Regular, PingFang SC;
468
-            font-weight: 400;
469
-            color: #333333;
470
-            line-height: 17px;
471
-            .duration {
472
-              margin-top: 14px;
542
+            .operation {
543
+              position: absolute;
544
+              left: 50%;
545
+              transform: translateX(-50%);
546
+              top: 10px;
547
+              z-index: 10;
548
+              width: 44px;
549
+              background: #ffffff;
550
+              box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
551
+                0px 6px 16px 0px rgba(0, 0, 0, 0.08),
552
+                0px 3px 6px -4px rgba(0, 0, 0, 0.12);
553
+              border-radius: 2px;
554
+              padding: 10px;
555
+              font-size: 12px;
556
+              font-family: PingFangSC-Regular, PingFang SC;
557
+              font-weight: 400;
558
+              color: #333333;
559
+              line-height: 17px;
560
+              .delete {
561
+                margin-top: 20px;
562
+              }
473 563
             }
474 564
           }
475
-          .operation {
476
-            position: absolute;
477
-            left: 50%;
478
-            transform: translateX(-50%);
479
-            top: 10px;
480
-            z-index: 10;
481
-            width: 44px;
482
-            background: #ffffff;
483
-            box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.05),
484
-              0px 6px 16px 0px rgba(0, 0, 0, 0.08),
485
-              0px 3px 6px -4px rgba(0, 0, 0, 0.12);
486
-            border-radius: 2px;
487
-            padding: 10px;
488
-            font-size: 12px;
489
-            font-family: PingFangSC-Regular, PingFang SC;
490
-            font-weight: 400;
491
-            color: #333333;
492
-            line-height: 17px;
493
-            .delete {
494
-              margin-top: 20px;
495
-            }
565
+          .programme-active {
566
+            border: 1px solid #fa852f;
496 567
           }
497 568
         }
498
-        .programme-active {
499
-          border: 1px solid #fa852f;
500
-        }
501 569
       }
502 570
     }
503
-   }
504
-   
505
-
506 571
   }
507 572
 }
508 573
 </style>

+ 42 - 33
src/pages/customerMan/index.vue

@@ -9,7 +9,7 @@
9 9
       </el-input>
10 10
       <el-button type="primary"
11 11
                  class="searchButton"
12
-                 @click="search">搜索</el-button>
12
+                 @click="getUserList()">搜索</el-button>
13 13
     </div>
14 14
 
15 15
     <div class="user-list">
@@ -22,19 +22,19 @@
22 22
         <el-table-column label="头像"
23 23
                          width="120">
24 24
           <template slot-scope="scope">
25
-            <div class="head-img"><img :src="scope.row.headImg"
25
+            <div class="head-img"><img :src="scope.row.avatar_url"
26 26
                    alt=""></div>
27 27
           </template>
28 28
         </el-table-column>
29
-        <el-table-column prop="name"
29
+        <el-table-column prop="nickname"
30 30
                          label="昵称"
31 31
                          width="120">
32 32
         </el-table-column>
33
-        <el-table-column prop="phone"
33
+        <el-table-column prop="mobile"
34 34
                          label="联系电话"
35 35
                          show-overflow-tooltip>
36 36
         </el-table-column>
37
-        <el-table-column prop="date"
37
+        <el-table-column prop="create_time"
38 38
                          label="注册时间"
39 39
                          show-overflow-tooltip>
40 40
         </el-table-column>
@@ -46,7 +46,7 @@
46 46
                        @size-change="handleSizeChange"
47 47
                        @current-change="handleCurrentChange"
48 48
                        :current-page.sync="currentPage1"
49
-                       :total="1000">
49
+                       :total="total">
50 50
         </el-pagination>
51 51
       </div>
52 52
     </div>
@@ -54,6 +54,7 @@
54 54
 </template>
55 55
 
56 56
 <script>
57
+import api from "../../server/home";
57 58
 export default {
58 59
   components: {},
59 60
   data () {
@@ -70,22 +71,7 @@ export default {
70 71
           label: '双皮奶'
71 72
         }
72 73
       ],
73
-      tableData: [{
74
-        date: '2022.04.25  14:30',
75
-        name: '滴滴滴',
76
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
77
-        phone: '13346783645',
78
-        status: '已完成'
79
-      },
80
-      {
81
-        date: '2022.04.25  14:30',
82
-        name: '滴滴滴',
83
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
84
-        phone: '13346783645',
85
-        status: '已完成'
86
-      },
87
-
88
-      ],
74
+      tableData: [],
89 75
       currentPage1: 1,
90 76
       multipleSelection: ''
91 77
 
@@ -95,24 +81,47 @@ export default {
95 81
   watch: {},
96 82
 
97 83
   methods: {
98
-    search () { },
99
-    handleSizeChange (val) {
100
-      console.log(`每页 ${val} 条`);
84
+    
85
+  // 获取订单列表
86
+    getUserList() {
87
+      console.log("xxxxxxx");
88
+      let params = {
89
+        page: this.currentPage1,
90
+        limit: this.limit,
91
+        keywords: this.searchText,
92
+      };
93
+      api.getUserList(params).then(res => {
94
+        if (res.code == 200) {
95
+          this.tableData = res.data.list;
96
+          this.total = res.data.total;
97
+        }
98
+      });
101 99
     },
102
-    handleCurrentChange (val) {
103
-      console.log(`当前页: ${val}`);
100
+    
101
+    handleCurrentChange(e) {
102
+      this.currentPage1 = e;
103
+      this.getUserList();
104
+      console.log(e, "eeeeee");
104 105
     },
105
-    handleSelectionChange (row, column, event) {
106
-      this.$router.push({
107
-        path: '/customerMan/details'
108
-      })
106
+
107
+    handleSizeChange(val) {
108
+      console.log(`每页 ${val} 条`);
109 109
     },
110
+    handleSelectionChange(row, column, event) {
111
+      this.$router.push({
112
+        path: '/customerMan/details',
113
+        query: {
114
+          id: row.id
115
+        }
116
+      });
117
+    }
110 118
   },
111 119
 
112
-  created () {
113
-
120
+  created() {
121
+    this.getUserList();
114 122
   },
115 123
 
124
+
116 125
   mounted () {
117 126
 
118 127
   },

+ 225 - 168
src/pages/historicalOrder/details/index.vue

@@ -2,71 +2,87 @@
2 2
   <div class="mine">
3 3
     <div class="left">
4 4
       <div class="user-info">
5
-        <div class="user-img"><img :src="userInfo.image"
6
-               alt=""></div>
5
+        <div class="user-img">
6
+          <img :src="userInfo.avatar_url" alt />
7
+        </div>
7 8
         <div class="user-span">
8
-          <div class="name">昵称:<span>{{userInfo.name}}</span></div>
9
-          <div class="sex">性别:<span>{{userInfo.sex}}</span></div>
10
-          <div class="age">肤龄:<span>{{userInfo.age}}</span></div>
11
-          <div class="skin-type">肤质:<span>{{userInfo.skinType}}</span></div>
9
+          <div class="name">
10
+            昵称:
11
+            <span>{{userInfo.nickname}}</span>
12
+          </div>
13
+          <div class="sex">
14
+            性别:
15
+            <span>{{userInfo.sex==1?'男':'女'}}</span>
16
+          </div>
17
+          <div class="age">
18
+            肤龄:
19
+            <span>{{userInfo.age}}</span>
20
+          </div>
21
+          <div class="skin-type">
22
+            肤质:
23
+            <span>{{userInfo.skin}}</span>
24
+          </div>
12 25
         </div>
13 26
       </div>
14 27
       <div class="user-record">
15 28
         <div class="fraction">
16 29
           <div class="title">肌肤得分</div>
17
-          <div class="num">37分</div>
30
+          <div class="num">{{userInfo.score}}分</div>
18 31
         </div>
19 32
         <div class="status">
20 33
           <div class="title">皮肤状态</div>
21
-          <div class="tips">肤质一般</div>
34
+          <div class="tips">{{userInfo.skin_status}}</div>
22 35
         </div>
23 36
         <div class="times">
24 37
           <div class="title">上传检测时间</div>
25
-          <div class="ts">2022.04.18 16:04</div>
38
+          <div class="ts">{{userInfo.check_time}}</div>
26 39
         </div>
27 40
       </div>
28 41
       <div class="lable">
29
-        <div class="lable-title">
30
-          面诊标签
31
-        </div>
42
+        <div class="lable-title">面诊标签</div>
32 43
         <div class="lable-list">
33
-          <div v-for="(item,index) in lableList"
34
-               :key="index"
35
-               class='lable-info'>
36
-            {{item.text}}
37
-          </div>
44
+          <div v-for="(item,index) in lableList" :key="index" class="lable-info">{{item.text}}</div>
38 45
         </div>
39 46
       </div>
40 47
       <div class="ps">
41
-        <div class="ps-title">
42
-          备注
43
-        </div>
44
-        <div class="ps-text">{{'富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆富婆' | ellipsis(20)}}</div>
48
+        <div class="ps-title">备注</div>
49
+        <div class="ps-text">{{remarks | ellipsis(20)}}</div>
45 50
       </div>
46 51
       <div class="programme">
47 52
         <div class="tab">
48 53
           <div class="tab-title">执行方案</div>
49 54
         </div>
50 55
         <div class="programme-list">
51
-          <div :class="['programme-info',item.onSelect?'programme-active':'']"
52
-               v-for="(item,index) in programmeList"
53
-               :key="index"
54
-               @click="onOperation(index)">
56
+          <div
57
+            :class="['programme-info',item.onSelect?'programme-active':'']"
58
+            v-for="(item,index) in scheme_list"
59
+            :key="index"
60
+            @click="onOperation(index)"
61
+          >
55 62
             <div class="programme-left">
56
-              <div class="programme-img"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
57
-                     alt=""></div>
63
+              <div class="programme-img">
64
+                <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png" alt />
65
+              </div>
58 66
               <div class="programme-tips">
59 67
                 <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
60 68
                 <div class="tips-title">{{'美白、祛痘、抗皱'|ellipsis(9)}}</div>
61
-                <div class="tips-title">仪器:<span>{{'无创水光'|ellipsis(9)}}</span></div>
69
+                <div class="tips-title">
70
+                  仪器:
71
+                  <span>{{'无创水光'|ellipsis(9)}}</span>
72
+                </div>
62 73
               </div>
63 74
             </div>
64 75
             <div class="programme-right">
65
-              <div class="frequency">执行频率:<span>{{item.frequency}}</span></div>
66
-              <div class="duration">持续时长:<span>{{item.duration}}</span></div>
76
+              <div class="frequency">
77
+                执行频率:
78
+                <span>{{item.frequency}}</span>
79
+              </div>
80
+              <div class="duration">
81
+                持续时长:
82
+                <span>{{item.duration}}</span>
83
+              </div>
67 84
             </div>
68
-            <div class="operation"
69
-                 v-if="item.onSelect">
85
+            <div class="operation" v-if="item.onSelect">
70 86
               <div class="edit">编辑</div>
71 87
               <div class="delete">删除</div>
72 88
             </div>
@@ -76,26 +92,39 @@
76 92
     </div>
77 93
     <div class="right">
78 94
       <div class="shop-info">
79
-        <div class="shpo-name">预约店铺:<span>JOLIJOLI(西安店)</span></div>
80
-        <div class="shpo-address">门店地址:<span>JOLIJOLI(西安店)</span></div>
81
-        <div class="shpo-ts">美容时间:<span>JOLIJOLI(西安店)</span></div>
95
+        <div class="shpo-name">
96
+          预约店铺:
97
+          <span>{{order_data.store_name}}</span>
98
+        </div>
99
+        <div class="shpo-address">
100
+          门店地址:
101
+          <span>{{order_data.address}}</span>
102
+        </div>
103
+        <div class="shpo-ts">
104
+          美容时间:
105
+          <span>{{order_data.order_time}}</span>
106
+        </div>
82 107
       </div>
83 108
       <div class="project">
84 109
         <div class="project-title">
85
-          共<span>3个</span>项目
110
+          共
111
+          <span>{{order_data.project_num}}个</span>项目
86 112
         </div>
87 113
         <div class="project-list">
88
-          <div class="project-info"
89
-               v-for="(item,index) in programmeList"
90
-               :key="index">
91
-            <div class="project-image"><img :src="item.image"></div>
114
+          <div class="project-info" v-for="(item,index) in programmeList" :key="index">
115
+            <div class="project-image">
116
+              <img :src="item.cover_url" />
117
+            </div>
92 118
             <div class="project-content">
93 119
               <div class="title-price">
94
-                <div class="project-tit">{{item.title | ellipsis(14)}}</div>
95
-                <div class="project-price"><span class="min-size">¥</span>{{item.price}}</div>
120
+                <div class="project-tit">{{item.name | ellipsis(14)}}</div>
121
+                <div class="project-price">
122
+                  <span class="min-size">¥</span>
123
+                  {{item.price}}
124
+                </div>
96 125
               </div>
97
-              <div class="project-tips">{{item.tips}}</div>
98
-              <div class="project-zoom">{{item.zoom}}{{item.ts}}</div>
126
+              <div class="project-tips">{{item.product_names}}</div>
127
+              <div class="project-zoom">{{item.room}}{{item.use_time}}分钟</div>
99 128
             </div>
100 129
           </div>
101 130
         </div>
@@ -103,25 +132,33 @@
103 132
       <div class="cost">
104 133
         <div class="cost-title">
105 134
           <div>预约费用</div>
106
-          <div>¥399</div>
135
+          <div>¥{{order_data.original_price}}</div>
107 136
         </div>
108 137
         <div class="cost-coupon-list">
109 138
           <div class="coupon">
110 139
             <div class="coupon-tips">
111
-              <div class="coupon-icon"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
112
-                     alt=""></div>
140
+              <div class="coupon-icon">
141
+                <img
142
+                  src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/couponIcon.png"
143
+                  alt
144
+                />
145
+              </div>
113 146
               <div class="coupon-title">优惠卷</div>
114 147
               <div class="coupon-tip">已选推荐优惠</div>
115 148
             </div>
116 149
             <div class="on-icon">></div>
117 150
           </div>
118
-          <div class="coupon-ps">
119
-            <div>【敏感维稳】多元修护加乘维稳</div>
120
-            <div class="cou-price">-¥100</div>
151
+          <div class="coupon-ps" v-for="(item,index) in coupon_list" :key="index">
152
+            <div>{{item.coupon_name}}</div>
153
+            <div class="cou-price">-¥{{item.price}}</div>
121 154
           </div>
122 155
         </div>
123 156
         <div class="over-price">
124
-          合计: <span><span class="min-size">¥</span>399<span class="min-size">.00</span></span>
157
+          合计:
158
+          <span>
159
+            <span class="min-size">¥</span>{{order_data.price}}
160
+            <!-- <span class="min-size">.00</span> -->
161
+          </span>
125 162
         </div>
126 163
       </div>
127 164
     </div>
@@ -129,140 +166,160 @@
129 166
 </template>
130 167
 
131 168
 <script>
132
-
169
+import api from "../../../server/home";
133 170
 export default {
134
-  data () {
171
+  data() {
135 172
     return {
136 173
       userInfo: {
137
-        image: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
138
-        name: '张三',
139
-        sex: '女',
140
-        age: '23',
141
-        skinType: '中性皮肤'
142 174
       },
143
-      //面部标签
144
-      lableList: [
145
-        {
146
-          text: '对话框的',
147
-          disabled: false
148
-        },
149
-        {
150
-          text: '对话框的',
151
-          disabled: true
152
-        },
153
-        {
154
-          text: '对话框的',
155
-          disabled: false
156
-        },
157
-        {
158
-          text: '对话框的',
159
-          disabled: false
160
-        },
161
-        {
162
-          text: '对话框的',
163
-          disabled: false
164
-        },
165
-        {
166
-          text: '对话框的',
167
-          disabled: false
168
-        },
169
-        {
170
-          text: '对话框的',
171
-          disabled: false
172
-        },
173
-        {
174
-          text: '对话框的',
175
-          disabled: false
176
-        },
177
-        {
178
-          text: '对话框的',
179
-          disabled: false
180
-        },
181
-        {
182
-          text: '对话框的',
183
-          disabled: false
184
-        },
185
-      ],
186
-      //执行方案
187
-      programmeList: [
188
-        {
189
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
190
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
191
-          tips: '+润百颜精华',
192
-          zoom: '皮肤综合仪(30号房)',
193
-          ts: '30分钟',
194
-          price: '79.00'
195
-        },
196
-        {
197
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
198
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
199
-          tips: '+润百颜精华',
200
-          zoom: '皮肤综合仪(30号房)',
201
-          ts: '30分钟',
202
-          price: '79.00'
203
-        },
204
-        {
205
-          image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
206
-          title: '水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底',
207
-          tips: '+润百颜精华',
208
-          zoom: '皮肤综合仪(30号房)',
209
-          ts: '30分钟',
210
-          price: '79.00'
211
-        },
212
-      ],
213
-      //项目列表
214
-      projectList: [{
215
-        value: '选项1',
216
-        label: '黄金糕'
217
-      }, {
218
-        value: '选项2',
219
-        label: '双皮奶'
220
-      }, {
221
-        value: '选项3',
222
-        label: '蚵仔煎'
223
-      }, {
224
-        value: '选项4',
225
-        label: '龙须面'
226
-      }, {
227
-        value: '选项5',
228
-        label: '北京烤鸭'
229
-      }],
230
-      timesInfo: '',
231
-      projectInfo: '',
232
-      weekInfo: '',
233
-      programmeIndex: '',
234
-      remarks: '',
235
-      isPupop: false
175
+      lableList:{},
176
+      programmeList:{},
177
+      scheme_list:{},
178
+      // //面部标签
179
+      // lableList: [
180
+      //   {
181
+      //     text: "对话框的",
182
+      //     disabled: false
183
+      //   },
184
+      //   {
185
+      //     text: "对话框的",
186
+      //     disabled: true
187
+      //   },
188
+      //   {
189
+      //     text: "对话框的",
190
+      //     disabled: false
191
+      //   },
192
+      //   {
193
+      //     text: "对话框的",
194
+      //     disabled: false
195
+      //   },
196
+      //   {
197
+      //     text: "对话框的",
198
+      //     disabled: false
199
+      //   },
200
+      //   {
201
+      //     text: "对话框的",
202
+      //     disabled: false
203
+      //   },
204
+      //   {
205
+      //     text: "对话框的",
206
+      //     disabled: false
207
+      //   },
208
+      //   {
209
+      //     text: "对话框的",
210
+      //     disabled: false
211
+      //   },
212
+      //   {
213
+      //     text: "对话框的",
214
+      //     disabled: false
215
+      //   },
216
+      //   {
217
+      //     text: "对话框的",
218
+      //     disabled: false
219
+      //   }
220
+      // ],
221
+      // //执行方案
222
+      // programmeList: [
223
+      //   {
224
+      //     image:
225
+      //       "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
226
+      //     title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
227
+      //     tips: "+润百颜精华",
228
+      //     zoom: "皮肤综合仪(30号房)",
229
+      //     ts: "30分钟",
230
+      //     price: "79.00"
231
+      //   },
232
+      //   {
233
+      //     image:
234
+      //       "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
235
+      //     title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
236
+      //     tips: "+润百颜精华",
237
+      //     zoom: "皮肤综合仪(30号房)",
238
+      //     ts: "30分钟",
239
+      //     price: "79.00"
240
+      //   },
241
+      //   {
242
+      //     image:
243
+      //       "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png",
244
+      //     title: "水氧活肤华熙智慧玻尿酸基水氧活肤华熙智慧玻尿酸基底",
245
+      //     tips: "+润百颜精华",
246
+      //     zoom: "皮肤综合仪(30号房)",
247
+      //     ts: "30分钟",
248
+      //     price: "79.00"
249
+      //   }
250
+      // ],
251
+      // //项目列表
252
+      // projectList: [
253
+      //   {
254
+      //     value: "选项1",
255
+      //     label: "黄金糕"
256
+      //   },
257
+      //   {
258
+      //     value: "选项2",
259
+      //     label: "双皮奶"
260
+      //   },
261
+      //   {
262
+      //     value: "选项3",
263
+      //     label: "蚵仔煎"
264
+      //   },
265
+      //   {
266
+      //     value: "选项4",
267
+      //     label: "龙须面"
268
+      //   },
269
+      //   {
270
+      //     value: "选项5",
271
+      //     label: "北京烤鸭"
272
+      //   }
273
+      // ],
274
+      timesInfo: "",
275
+      projectInfo: "",
276
+      weekInfo: "",
277
+      programmeIndex: "",
278
+      remarks: "",
279
+      coupon_list:"",
280
+      order_data:"",
281
+      isPupop: false,
282
+      id:""
236 283
     };
237 284
   },
238
-  computed: {
239
-
240
-  },
285
+  computed: {},
241 286
   watch: {},
242 287
 
243 288
   methods: {
244
-    onOperation (index) {
289
+    getOrderInfo() {
290
+      api.getOrderInfo({ id: this.id }).then(res => {
291
+        this.userInfo = res.data.user;
292
+        this.order_data = res.data.order_data;
293
+        this.lableList = res.data.tags;
294
+        this.programmeList = res.data.order_data.project_list;
295
+        this.coupon_list = res.data.order_data.coupon_list;
296
+        this.remarks = res.data.remark;
297
+      });
298
+    },
299
+
300
+    onOperation(index) {
245 301
       if (this.programmeList[index].onSelect) {
246
-        this.$set(this.programmeList[index], 'onSelect', !this.programmeList[index].onSelect)
302
+        this.$set(
303
+          this.programmeList[index],
304
+          "onSelect",
305
+          !this.programmeList[index].onSelect
306
+        );
247 307
       } else {
248
-        this.$set(this.programmeList[index], 'onSelect', true)
308
+        this.$set(this.programmeList[index], "onSelect", true);
249 309
       }
250 310
     },
251
-    onSubmit () {
252
-
253
-    },
254
-    submitFrequency () { },
311
+    onSubmit() {},
312
+    submitFrequency() {}
255 313
   },
256 314
 
257
-  created () {
258
-
315
+  created() {
316
+    let id = this.$route.query.id;
317
+    this.id = id;
318
+    this.getOrderInfo();
259 319
   },
260 320
 
261
-  mounted () {
262
-
263
-  },
264
-}
265
-
321
+  mounted() {}
322
+};
266 323
 </script>
267 324
 
268 325
 <style lang='less' scoped>

+ 154 - 105
src/pages/historicalOrder/index.vue

@@ -1,155 +1,183 @@
1 1
 <template>
2 2
   <div class="mine">
3 3
     <div class="condition">
4
-      <el-date-picker v-model="dates"
5
-                      type="daterange"
6
-                      range-separator="->"
7
-                      start-placeholder="开始日期"
8
-                      end-placeholder="结束日期">
9
-      </el-date-picker>
10
-      <el-select class="coupon-select"
11
-                 v-model="coupon"
12
-                 placeholder="项目名称">
13
-        <el-option v-for="item in couponList"
14
-                   :key="item.value"
15
-                   :label="item.label"
16
-                   :value="item.value">
17
-        </el-option>
4
+      <el-date-picker
5
+        v-model="dates"
6
+        type="daterange"
7
+        range-separator="->"
8
+        start-placeholder="开始日期"
9
+        end-placeholder="结束日期"
10
+      ></el-date-picker>
11
+      <el-select class="coupon-select" v-model="coupon" placeholder="项目名称">
12
+        <el-option
13
+          v-for="item in couponList"
14
+          :key="item.value"
15
+          :label="item.label"
16
+          :value="item.value"
17
+        ></el-option>
18 18
       </el-select>
19
-      <el-select class="coupon-select"
20
-                 v-model="coupon"
21
-                 placeholder="卡券名称">
22
-        <el-option v-for="item in couponList"
23
-                   :key="item.value"
24
-                   :label="item.label"
25
-                   :value="item.value">
26
-        </el-option>
19
+      <el-select class="coupon-select" v-model="coupon" placeholder="卡券名称">
20
+        <el-option
21
+          v-for="item in couponList"
22
+          :key="item.value"
23
+          :label="item.label"
24
+          :value="item.value"
25
+        ></el-option>
27 26
       </el-select>
28 27
 
29
-      <el-input placeholder="请输入内容"
30
-                class="search"
31
-                v-model="searchText">
32
-        <i slot="prefix"
33
-           class="el-input__icon el-icon-search"></i>
28
+      <el-input placeholder="请输入内容" class="search" v-model="searchText">
29
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
34 30
       </el-input>
35
-      <el-button type="primary"
36
-                 class="searchButton"
37
-                 @click="search">搜索</el-button>
31
+      <el-button type="primary" class="searchButton" @click="getOrderList()">搜索</el-button>
38 32
     </div>
39 33
 
40 34
     <div class="user-list">
41
-      <el-table ref="multipleTable"
42
-                :data="tableData"
43
-                tooltip-effect="dark"
44
-                height="354"
45
-                style="width: 100%;border-radius: 8px;"
46
-                @row-click="handleSelectionChange">
47
-        <el-table-column label="头像"
48
-                         width="120">
35
+      <el-table
36
+        ref="multipleTable"
37
+        :data="tableData"
38
+        tooltip-effect="dark"
39
+        height="354"
40
+        style="width: 100%;border-radius: 8px;"
41
+        @row-click="handleSelectionChange"
42
+      >
43
+        <el-table-column label="头像" width="120">
49 44
           <template slot-scope="scope">
50
-            <div class="head-img"><img :src="scope.row.headImg"
51
-                   alt=""></div>
45
+            <div class="head-img">
46
+              <img :src="scope.row.avatar_url" alt />
47
+            </div>
52 48
           </template>
53 49
         </el-table-column>
54
-        <el-table-column prop="name"
55
-                         label="昵称"
56
-                         width="120">
57
-        </el-table-column>
58
-        <el-table-column prop="phone"
59
-                         label="联系电话"
60
-                         show-overflow-tooltip>
61
-        </el-table-column>
62
-        <el-table-column prop="date"
63
-                         label="预约时间"
64
-                         show-overflow-tooltip>
65
-        </el-table-column>
66
-        <el-table-column prop="date"
67
-                         label="状态"
68
-                         show-overflow-tooltip>
50
+        <el-table-column prop="nickname" label="昵称" width="120"></el-table-column>
51
+        <el-table-column prop="mobile" label="联系电话" show-overflow-tooltip></el-table-column>
52
+        <el-table-column prop="order_time" label="预约时间" show-overflow-tooltip></el-table-column>
53
+        <el-table-column prop="date" label="状态" show-overflow-tooltip>
69 54
           <template slot-scope="scope">
70
-            <div>{{scope.row.status}}</div>
55
+            <div :class="'color'+scope.row.status">{{statusStr[scope.row.status]}}</div>
71 56
           </template>
72 57
         </el-table-column>
73 58
       </el-table>
74 59
 
75 60
       <div class="pagin">
76
-        <el-pagination background
77
-                       layout="prev, pager, next"
78
-                       @size-change="handleSizeChange"
79
-                       @current-change="handleCurrentChange"
80
-                       :current-page.sync="currentPage1"
81
-                       :total="1000">
82
-        </el-pagination>
61
+        <el-pagination
62
+          background
63
+          layout="prev, pager, next"
64
+          @size-change="handleSizeChange"
65
+          @current-change="handleCurrentChange"
66
+          :current-page.sync="currentPage1"
67
+          :total="total"
68
+        ></el-pagination>
83 69
       </div>
84 70
     </div>
85 71
   </div>
86 72
 </template>
87 73
 
88 74
 <script>
75
+import api from "../../server/home";
76
+
89 77
 export default {
90 78
   components: {},
91
-  data () {
79
+  data() {
92 80
     return {
93
-      searchText: '',
94
-      dates: '',
95
-      coupon: '',
81
+      searchText: "",
82
+      dates: "",
83
+      coupon: "",
84
+      limit: 10,
85
+      total: 0,
86
+      statusStr: [
87
+        "已预约",
88
+        "未支付",
89
+        "已支付",
90
+        "待使用",
91
+        "正在使用",
92
+        "已结算",
93
+        "已取消"
94
+      ],
96 95
       couponList: [
97 96
         {
98
-          value: '选项1',
99
-          label: '黄金糕'
100
-        }, {
101
-          value: '选项2',
102
-          label: '双皮奶'
97
+          value: "选项1",
98
+          label: "黄金糕"
99
+        },
100
+        {
101
+          value: "选项2",
102
+          label: "双皮奶"
103 103
         }
104 104
       ],
105
-      tableData: [{
106
-        date: '2022.04.25  14:30',
107
-        name: '滴滴滴',
108
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
109
-        phone: '13346783645',
110
-        status: '已完成'
111
-      },
112
-      {
113
-        date: '2022.04.25  14:30',
114
-        name: '滴滴滴',
115
-        headImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
116
-        phone: '13346783645',
117
-        status: '已完成'
118
-      },
119
-
105
+      tableData: [
106
+        {
107
+          date: "2022.04.25  14:30",
108
+          name: "滴滴滴",
109
+          headImg:
110
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
111
+          phone: "13346783645",
112
+          status: "已完成"
113
+        },
114
+        {
115
+          date: "2022.04.25  14:30",
116
+          name: "滴滴滴",
117
+          headImg:
118
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
119
+          phone: "13346783645",
120
+          status: "已完成"
121
+        }
120 122
       ],
121 123
       currentPage1: 1,
122
-      multipleSelection: ''
123
-
124
+      multipleSelection: ""
124 125
     };
125 126
   },
126 127
   computed: {},
127 128
   watch: {},
128 129
 
129 130
   methods: {
130
-    search () { },
131
-    handleSizeChange (val) {
132
-      console.log(`每页 ${val} 条`);
133
-    },
134
-    handleCurrentChange (val) {
135
-      console.log(`当前页: ${val}`);
131
+    // 获取订单列表
132
+    getOrderList() {
133
+      console.log("xxxxxxx");
134
+      let start_date = "",
135
+        end_date = "";
136
+      if (this.dates && this.dates.length > 0) {
137
+        start_date = utils.formatTime(this.dates[0], "yyyy-MM-dd");
138
+        end_date = utils.formatTime(this.dates[1], "yyyy-MM-dd");
139
+      }
140
+      console.log(start_date, end_date, "end_date");
141
+      let params = {
142
+        page: this.currentPage1,
143
+        limit: this.limit,
144
+        keywords: this.searchText,
145
+        start_date: start_date,
146
+        end_date: end_date
147
+      };
148
+      api.getOrderList(params).then(res => {
149
+        if (res.code == 200) {
150
+          this.tableData = res.data.list;
151
+          this.total = res.data.total;
152
+        }
153
+      });
136 154
     },
137
-    handleSelectionChange (row, column, event) {
138
-      this.$router.push({
139
-        path: '/historicalOrder/details'
140
-      })
155
+    
156
+    handleCurrentChange(e) {
157
+      this.currentPage1 = e;
158
+      this.getOrderList();
159
+      console.log(e, "eeeeee");
141 160
     },
142
-  },
143
-
144
-  created () {
145 161
 
162
+    handleSizeChange(val) {
163
+      console.log(`每页 ${val} 条`);
164
+    },
165
+    handleSelectionChange(row, column, event) {
166
+      this.$router.push({
167
+        path: "/historicalOrder/details",
168
+        query: {
169
+          id: row.id
170
+        }
171
+      });
172
+    }
146 173
   },
147 174
 
148
-  mounted () {
149
-
175
+  created() {
176
+    this.getOrderList();
150 177
   },
151
-}
152 178
 
179
+  mounted() {}
180
+};
153 181
 </script>
154 182
 
155 183
 <style lang='less' scoped>
@@ -208,5 +236,26 @@ export default {
208 236
       border-bottom: none;
209 237
     }
210 238
   }
239
+  .color0 {
240
+    color: #fc3019;
241
+  }
242
+  .color1 {
243
+    color: #3ef3ed;
244
+  }
245
+  .color2 {
246
+    color: #00eeee;
247
+  }
248
+  .color3 {
249
+    color: #61D09D;
250
+  }
251
+  .color4 {
252
+    color: #3115cc;
253
+  }
254
+  .color5 {
255
+    color: #fc3019;
256
+  }
257
+  .color6 {
258
+    color: #A999EA;
259
+  }
211 260
 }
212 261
 </style>

+ 79 - 90
src/pages/home/index.vue

@@ -1,7 +1,9 @@
1 1
 <template>
2 2
   <div class="home">
3 3
     <div class="tab">
4
-      <div class="make-order" v-for="item in tabList">
4
+      <div class="make-order"
5
+           v-for="item,index in tabList"
6
+           :key="index">
5 7
         <div class="make-icon">
6 8
           <img :src="item.image">
7 9
         </div>
@@ -13,22 +15,38 @@
13 15
     </div>
14 16
     <div class="order-list">
15 17
       <div class="title">预约订单列表</div>
16
-      <div class="list-info">
17
-        <div class="user-info" v-for="(item,index) in orderList" :style="index==orderList.length-1?'border-bottom:0px':''">
18
-          <div class="head-img"> <div class="new">新</div><img :src="item.img" alt=""></div>
18
+      <div v-if="orderList.length>0"
19
+           class="list-info"
20
+           @click="toOrderDetails(item)">
21
+        <div class="user-info"
22
+             v-for="(item,index) in orderList"
23
+             :key="index"
24
+             :style="index==orderList.length-1?'border-bottom:0px':''">
25
+          <div class="head-img">
26
+            <div class="new">新</div><img :src="item.avatar_url"
27
+                 alt="">
28
+          </div>
19 29
           <div class="user-information">
20
-            <div class="name">客户昵称:<span>{{ item.name }}</span></div>
21
-            <div class="name">预约项目时间:<span>{{ item.ts }}</span></div>
22
-            <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>
23 33
           </div>
24 34
           <ul class="product-list">
25
-            <li class="product-image" v-for="value in item.imgList"><img :src="value" alt=""></li>
35
+            <li class="product-image"
36
+                v-for="value,i in item.project_list"
37
+                :key="i"><img :src="value.cover_url"
38
+                   alt=""></li>
26 39
           </ul>
27
-          <div class="status">
28
-            {{ 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?'已取消':'待使用' }}
29 43
           </div>
30 44
         </div>
31 45
       </div>
46
+      <div v-else
47
+           class="empty">
48
+        暂无数据
49
+      </div>
32 50
     </div>
33 51
   </div>
34 52
 </template>
@@ -38,86 +56,26 @@ import api from '@/server/home'
38 56
 
39 57
 export default {
40 58
   name: 'home',
41
-  data() {
59
+  data () {
42 60
     return {
43 61
       tabList: [
44 62
         {
45 63
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
46
-          num: 0,
64
+          num: 3,
47 65
           name: '预约订单'
48 66
         },
49 67
         {
50 68
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
51
-          num: 0,
69
+          num: 4,
52 70
           name: '未支付订单'
53 71
         },
54 72
         {
55 73
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/cancelOrder.png',
56
-          num: 0,
74
+          num: 9,
57 75
           name: '取消订单'
58 76
         },
59 77
       ],
60 78
       orderList: [
61
-        {
62
-          img: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
63
-          name: '滴滴滴',
64
-          ts: '2022.04.25  14:30-16:30',
65
-          num: '5',
66
-          imgList: [
67
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
68
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
69
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
70
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
71
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
72
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
73
-          ],
74
-          status: '未支付'
75
-        },
76
-        {
77
-          img: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
78
-          name: '滴滴滴',
79
-          ts: '2022.04.25  14:30-16:30',
80
-          num: '5',
81
-          imgList: [
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
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
85
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
86
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
87
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
88
-          ],
89
-          status: '未支付'
90
-        },
91
-        {
92
-          img: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
93
-          name: '滴滴滴',
94
-          ts: '2022.04.25  14:30-16:30',
95
-          num: '5',
96
-          imgList: [
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
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
100
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
101
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
102
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
103
-          ],
104
-          status: '未支付'
105
-        },
106
-        {
107
-          img: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
108
-          name: '滴滴滴',
109
-          ts: '2022.04.25  14:30-16:30',
110
-          num: '5',
111
-          imgList: [
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
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
115
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
116
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
117
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
118
-          ],
119
-          status: '未支付'
120
-        },
121 79
       ],
122 80
 
123 81
     }
@@ -126,10 +84,39 @@ export default {
126 84
 
127 85
   },
128 86
   created: function () {
129
-
87
+    this.getTotal()
88
+    this.getToday()
89
+    console.log(this.$store.state.comVal.token, 'this.$store.state.comVal.token');
130 90
   },
131 91
   methods: {
132
-    initData() {
92
+    getTotal () {
93
+      api.getTotal().then(res => {
94
+        if (res.code == 200) {
95
+          this.tabList[0].num = res.data.order_num
96
+          this.tabList[1].num = res.data.wait_pay_num
97
+          this.tabList[2].num = res.data.cancel_num
98
+        }
99
+        console.log(res, 'res====');
100
+      })
101
+    },
102
+    getToday () {
103
+      api.getToday().then(res => {
104
+        if (res.code = 200) {
105
+          this.orderList = res.data.list
106
+        }
107
+        console.log(res, 'res');
108
+      })
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
+    },
119
+    initData () {
133 120
 
134 121
     },
135 122
   },
@@ -151,7 +138,7 @@ export default {
151 138
     .make-order {
152 139
       width: 274px;
153 140
       padding: 14px 30px;
154
-      background: #FFFFFF;
141
+      background: #ffffff;
155 142
       box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
156 143
       border-radius: 8px;
157 144
       display: flex;
@@ -189,7 +176,7 @@ export default {
189 176
   .order-list {
190 177
     margin-top: 18px;
191 178
     width: 100%;
192
-    background: #FFFFFF;
179
+    background: #ffffff;
193 180
     box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
194 181
     border-radius: 8px;
195 182
     padding: 14px 12px;
@@ -210,14 +197,14 @@ export default {
210 197
 
211 198
       .user-info {
212 199
         padding: 14px 0;
213
-        border-bottom: 1px solid #E6E6E6;
200
+        border-bottom: 1px solid #e6e6e6;
214 201
         display: flex;
215 202
         align-items: center;
216 203
 
217 204
         .head-img {
218 205
           position: relative;
219 206
           width: 72px;
220
-          .new{
207
+          .new {
221 208
             position: absolute;
222 209
             top: -2px;
223 210
             right: -2px;
@@ -228,9 +215,9 @@ export default {
228 215
             font-size: 12px;
229 216
             font-family: PingFangSC-Regular, PingFang SC;
230 217
             font-weight: 400;
231
-            color: #FFFFFF;
218
+            color: #ffffff;
232 219
             line-height: 17px;
233
-            background: #FF6945;
220
+            background: #ff6945;
234 221
             border-radius: 50%;
235 222
           }
236 223
 
@@ -264,32 +251,34 @@ export default {
264 251
           overflow-y: hidden;
265 252
           padding-left: 8px;
266 253
 
267
-
268 254
           .product-image {
269 255
             display: inline-block;
270 256
             margin-left: 16px;
271 257
             width: 72px;
272
-            img{
258
+            img {
273 259
               border-radius: 8px;
274 260
               width: 100%;
275 261
               display: block;
276 262
             }
277
-
278 263
           }
279
-
280 264
         }
281
-        .status{
265
+        .status {
282 266
           margin-left: 56px;
283 267
           font-size: 16px;
284 268
           font-family: SourceHanSansCN-Regular, SourceHanSansCN;
285 269
           font-weight: 400;
286
-          color: #FC3019;
270
+          color: #fc3019;
287 271
           line-height: 24px;
288 272
         }
289 273
       }
290 274
     }
291
-
275
+    .empty {
276
+      height: 300px;
277
+      line-height: 300px;
278
+      width: 100%;
279
+      font-size: 28px;
280
+      color: slategrey;
281
+    }
292 282
   }
293 283
 }
294
-
295 284
 </style>

+ 82 - 30
src/pages/login/login.vue

@@ -2,17 +2,27 @@
2 2
   <div class="mine">
3 3
     <div class="login-info">
4 4
       <div class="logo">
5
-        <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/logo%402x.png" alt="">
5
+        <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/logo%402x.png"
6
+             alt="">
6 7
       </div>
7 8
       <div class="login-title">JOLIJOLI店员端</div>
8 9
       <div class="content">
9 10
         <div class="value-inp">
10
-          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/num_icon.png" alt="">
11
-          <el-input placeholder="请输入账号名" v-model="account"></el-input>
11
+          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/num_icon.png"
12
+               alt="">
13
+          <el-input placeholder="请输入账号名"
14
+                    v-model="account"></el-input>
12 15
         </div>
13 16
         <div class="value-inp">
14
-          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/password_icon.png" alt="">
15
-          <el-input placeholder="请输入密码" v-model="password" show-password></el-input>
17
+          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/password_icon.png"
18
+               alt="">
19
+          <el-input placeholder="请输入密码"
20
+                    v-model="password"
21
+                    show-password></el-input>
22
+        </div>
23
+        <div class="onLogin"
24
+             @click="onLogin">
25
+          登录
16 26
         </div>
17 27
       </div>
18 28
     </div>
@@ -20,25 +30,49 @@
20 30
 </template>
21 31
 
22 32
 <script>
33
+import api from '../../server/home'
34
+// import Cookies from "js-cookie"
23 35
 export default {
24 36
   components: {},
25
-  data() {
37
+  data () {
26 38
     return {
27
-      account:"",
28
-      password:""
39
+      account: "",
40
+      password: ""
29 41
 
30 42
     };
31 43
   },
32 44
   computed: {},
33 45
   watch: {},
34 46
 
35
-  methods: {},
47
+  methods: {
48
+    onLogin () {
49
+      let params = {
50
+        username: this.account,
51
+        password: this.password
52
+      }
53
+      api.getToken(params).then(res => {
54
+        if (res.code == 200) {
55
+          this.$store.state.comVal.token = res.data.token
56
+          console.log(this.$store.state.comVal.token, 'this.$store.');
57
+          localStorage.setItem("token", res.data.token)
58
+          this.$router.push({
59
+            path: '/home'
60
+          })
61
+        }
62
+      })
63
+    }
36 64
 
37
-  created() {
65
+  },
38 66
 
67
+  created () {
68
+    if (localStorage.getItem("token")) {
69
+      this.$router.push({
70
+        path: '/home'
71
+      })
72
+    }
39 73
   },
40 74
 
41
-  mounted() {
75
+  mounted () {
42 76
 
43 77
   },
44 78
 }
@@ -49,68 +83,86 @@ export default {
49 83
 .mine {
50 84
   width: 100%;
51 85
   min-height: 100vh;
52
-  background: linear-gradient(315deg, #FF9F7E 0%, #FF926C 0%, #FF9D55 100%);
86
+  background: linear-gradient(315deg, #ff9f7e 0%, #ff926c 0%, #ff9d55 100%);
53 87
   position: relative;
54
-  .login-info{
88
+  .login-info {
55 89
     position: absolute;
56 90
     left: 50%;
57 91
     top: 15%;
58 92
     transform: translateX(-50%);
59 93
     width: 460px;
60 94
     height: 460px;
61
-    background: url("https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/login_bg.png") no-repeat;
95
+    background: url("https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/login_bg.png")
96
+      no-repeat;
62 97
     background-size: 100% 100%;
63
-    .logo{
98
+    .logo {
64 99
       width: 100px;
65 100
       height: 100px;
66 101
       position: relative;
67 102
       left: 50%;
68 103
       transform: translateX(-50%);
69 104
       top: -17px;
70
-      img{
105
+      img {
71 106
         width: 100%;
72 107
         display: block;
73 108
       }
74 109
     }
75
-    .login-title{
110
+    .login-title {
76 111
       margin-top: 7px;
77 112
       font-size: 28px;
78 113
       font-family: PingFangSC-Medium, PingFang SC;
79 114
       font-weight: 500;
80 115
       text-align: center;
81
-      color: #EB5C21;
116
+      color: #eb5c21;
82 117
       line-height: 40px;
83 118
     }
84
-    .content{
119
+    .content {
85 120
       padding-top: 15px;
86 121
       position: relative;
87
-      .value-inp{
122
+      .value-inp {
88 123
         position: relative;
89 124
         margin-top: 20px;
90 125
         left: 50%;
91 126
         transform: translateX(-50%);
92 127
         width: 336px;
93 128
         height: 53px;
94
-        background: url("https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/input_bg.png") no-repeat;
129
+        background: url("https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/input_bg.png")
130
+          no-repeat;
95 131
         background-size: 100% 100%;
96 132
         display: flex;
97 133
         padding: 0 24px;
98 134
         justify-content: space-between;
99 135
         align-items: center;
100
-        img{
136
+        img {
101 137
           width: 32px;
102 138
           height: 32px;
103 139
         }
104
-       /deep/ .el-input__inner{
105
-          background-color:transparent;
106
-         border: 0px solid #DCDFE6;
107
-         height: 53px;
108
-         line-height: 53px;
109
-         font-size: 18px;
110
-         font-family: PingFangSC-Regular, PingFang SC;
111
-         font-weight: 400;
140
+        /deep/ .el-input__inner {
141
+          background-color: transparent;
142
+          border: 0px solid #dcdfe6;
143
+          height: 53px;
144
+          line-height: 53px;
145
+          font-size: 18px;
146
+          font-family: PingFangSC-Regular, PingFang SC;
147
+          font-weight: 400;
112 148
         }
113 149
       }
150
+      .onLogin {
151
+        margin-top: 29px;
152
+        position: relative;
153
+        left: 50%;
154
+        transform: translateX(-50%);
155
+        width: 214px;
156
+        height: 53px;
157
+        line-height: 53px;
158
+        background: #fa7d22;
159
+        border-radius: 27px;
160
+        font-size: 18px;
161
+        font-family: PingFangSC-Medium, PingFang SC;
162
+        font-weight: 500;
163
+        color: #ffffff;
164
+        text-align: center;
165
+      }
114 166
     }
115 167
   }
116 168
 }

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

@@ -2,46 +2,47 @@
2 2
   <div class="mine">
3 3
     <div class="left">
4 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 6
                alt=""></div>
7 7
         <div class="user-span">
8
-          <div class="name">昵称:<span>{{userInfo.name}}</span></div>
8
+          <div class="name">昵称:<span>{{userInfo.nickname}}</span></div>
9 9
           <div class="sex">性别:<span>{{userInfo.sex}}</span></div>
10 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 12
         </div>
13 13
       </div>
14 14
       <div class="user-record">
15 15
         <div class="fraction">
16 16
           <div class="title">肌肤得分</div>
17
-          <div class="num">37分</div>
17
+          <div class="num">{{userInfo.score}}分</div>
18 18
         </div>
19 19
         <div class="status">
20 20
           <div class="title">皮肤状态</div>
21
-          <div class="tips">肤质一般</div>
21
+          <div class="tips">{{userInfo.skin_status}}</div>
22 22
         </div>
23 23
         <div class="times">
24 24
           <div class="title">上传检测时间</div>
25
-          <div class="ts">2022.04.18 16:04</div>
25
+          <div class="ts">{{userInfo.check_time}}</div>
26 26
         </div>
27 27
       </div>
28 28
       <div class="summary">
29 29
         <div class="left-title">皮肤总结</div>
30 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 34
             <div class="result">
33 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 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 42
               </div>
42 43
             </div>
43 44
             <div class="bottom-tips">
44
-              <span>皮肤状态一般,污物阻塞导致,油脂分泌旺盛,皮肤状态一般,污物阻塞导致,油脂分泌旺盛</span>
45
+              <span>{{item.suggest}}</span>
45 46
             </div>
46 47
           </div>
47 48
         </div>
@@ -55,8 +56,8 @@
55 56
         <div class="lable-list">
56 57
           <div v-for="(item,index) in lableList"
57 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 61
           </div>
61 62
           <div class="add-lable">
62 63
             +
@@ -86,12 +87,12 @@
86 87
                :key="index"
87 88
                @click="onOperation(index)">
88 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 91
                      alt=""></div>
91 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 96
               </div>
96 97
             </div>
97 98
             <div class="programme-right">
@@ -122,9 +123,9 @@
122 123
                    class="project-select"
123 124
                    size="mini">
124 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 129
           </el-option>
129 130
         </el-select>
130 131
         <div class="frequency">
@@ -158,63 +159,21 @@
158 159
 </template>
159 160
 
160 161
 <script>
161
-import { mapActions } from 'vuex'
162 162
 import minePupop from '../../../components/minePupop/index.vue'
163
+import api from '../../../server/home'
163 164
 
164 165
 export default {
165 166
   components: { minePupop },
166 167
   data () {
167 168
     return {
168 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 178
       programmeList: [
220 179
         {
@@ -267,12 +226,14 @@ export default {
267 226
           label: '2'
268 227
         },
269 228
       ],
270
-      timesInfo: '',
271
-      projectInfo: '',
272
-      weekInfo: '',
229
+      timesInfo: '',//次数
230
+      projectInfo: '',//项目
231
+      projectId: '',//项目id
232
+      weekInfo: '',//周次
273 233
       programmeIndex: '',
274
-      remarks: '',
275
-      isPupop: false
234
+      remarks: '',//备注
235
+      isPupop: false,
236
+      id: 0
276 237
     };
277 238
   },
278 239
   computed: {
@@ -281,6 +242,34 @@ export default {
281 242
   watch: {},
282 243
 
283 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 273
     onOperation (index) {
285 274
       if (this.programmeList[index].onSelect) {
286 275
         this.$set(this.programmeList[index], 'onSelect', !this.programmeList[index].onSelect)
@@ -289,13 +278,17 @@ export default {
289 278
       }
290 279
     },
291 280
     onSubmit () {
292
-
281
+      this.getSkinUpdate()
293 282
     },
294 283
     submitFrequency () { },
295 284
   },
296 285
 
297 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 294
   mounted () {
@@ -328,6 +321,7 @@ export default {
328 321
         width: 96px;
329 322
         img {
330 323
           width: 100%;
324
+          border-radius: 5px;
331 325
           display: block;
332 326
         }
333 327
       }
@@ -404,11 +398,11 @@ export default {
404 398
             }
405 399
             .right {
406 400
               font-size: 12px;
407
-              transform: scale(0.83);
408 401
               font-family: PingFangSC-Regular, PingFang SC;
409 402
               font-weight: 400;
410 403
               color: #666666;
411
-              line-height: 16px;
404
+              line-height: 20px;
405
+              text-align: end;
412 406
             }
413 407
           }
414 408
           .bottom-tips {

+ 50 - 98
src/pages/testSkin/index.vue

@@ -15,7 +15,8 @@
15 15
            class="el-input__icon el-icon-search"></i>
16 16
       </el-input>
17 17
       <el-button type="primary"
18
-                 class="searchButton">搜索</el-button>
18
+                 class="searchButton"
19
+                 @click="getSkinList">搜索</el-button>
19 20
     </div>
20 21
     <div class="list">
21 22
       <div class="tab">
@@ -29,22 +30,22 @@
29 30
         <div class="tab user-info"
30 31
              v-for="(item,index) in userList"
31 32
              :key="index"
32
-             @click="onDetails">
33
-          <div class="head-img"><img :src="item.img"
33
+             @click="onDetails(item.id)">
34
+          <div class="head-img"><img :src="item.avatar_url"
34 35
                  alt=""></div>
35
-          <div class="head-name">{{ item.name }}</div>
36
-          <div class="head-phone">{{ item.phone }}</div>
37
-          <div class="head-ts">{{ item.ts }}</div>
38
-          <div class="head-status">{{ item.status }}</div>
36
+          <div class="head-name">{{ item.nickname }}</div>
37
+          <div class="head-phone">{{ item.mobile }}</div>
38
+          <div class="head-ts">{{ item.check_time }}</div>
39
+          <div class="head-status"
40
+               :style="item.status==1?'color: #61D09D;':'color: #FC3019;'">{{ item.status==1?'已面诊':'未面诊'}}</div>
39 41
         </div>
40 42
       </div>
41 43
       <div class="pagin">
42 44
         <el-pagination background
43 45
                        layout="prev, pager, next"
44
-                       @size-change="handleSizeChange"
45 46
                        @current-change="handleCurrentChange"
46 47
                        :current-page.sync="currentPage1"
47
-                       :total="1000">
48
+                       :total="total">
48 49
         </el-pagination>
49 50
       </div>
50 51
     </div>
@@ -52,111 +53,62 @@
52 53
 </template>
53 54
 
54 55
 <script>
56
+import api from '../../server/home'
55 57
 export default {
56 58
   components: {},
57 59
   data () {
58 60
     return {
59
-      dates: '',
61
+      dates: [],
60 62
       searchText: '',
61
-      userList: [
62
-        {
63
-          img:
64
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
65
-          name: '张三',
66
-          phone: 4556455645,
67
-          ts: '2022.04.15  14:30-16:30',
68
-          status: '标签信息未填写'
69
-        },
70
-        {
71
-          img:
72
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
73
-          name: '张三',
74
-          phone: 4556455645,
75
-          ts: '2022.04.15  14:30-16:30',
76
-          status: '标签信息未填写'
77
-        },
78
-        {
79
-          img:
80
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
81
-          name: '张三',
82
-          phone: 4556455645,
83
-          ts: '2022.04.15  14:30-16:30',
84
-          status: '标签信息未填写'
85
-        },
86
-        {
87
-          img:
88
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
89
-          name: '张三',
90
-          phone: 4556455645,
91
-          ts: '2022.04.15  14:30-16:30',
92
-          status: '标签信息未填写'
93
-        },
94
-        {
95
-          img:
96
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
97
-          name: '张三',
98
-          phone: 4556455645,
99
-          ts: '2022.04.15  14:30-16:30',
100
-          status: '标签信息未填写'
101
-        },
102
-        {
103
-          img:
104
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
105
-          name: '张三',
106
-          phone: 4556455645,
107
-          ts: '2022.04.15  14:30-16:30',
108
-          status: '标签信息未填写'
109
-        },
110
-        {
111
-          img:
112
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
113
-          name: '张三',
114
-          phone: 4556455645,
115
-          ts: '2022.04.15  14:30-16:30',
116
-          status: '标签信息未填写'
117
-        },
118
-        {
119
-          img:
120
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
121
-          name: '张三',
122
-          phone: 4556455645,
123
-          ts: '2022.04.15  14:30-16:30',
124
-          status: '标签信息未填写'
125
-        },
126
-        {
127
-          img:
128
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
129
-          name: '张三',
130
-          phone: 4556455645,
131
-          ts: '2022.04.15  14:30-16:30',
132
-          status: '标签信息未填写'
133
-        },
134
-        {
135
-          img:
136
-            'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
137
-          name: '张三',
138
-          phone: 4556455645,
139
-          ts: '2022.04.15  14:30-16:30',
140
-          status: '标签信息未填写'
141
-        }
142
-      ],
143
-      currentPage1: 2
63
+      userList: [],
64
+      currentPage1: 1,
65
+      limit: 10,
66
+      total: 0,
144 67
     }
145 68
   },
146 69
   computed: {},
147 70
   watch: {},
148 71
 
149 72
   methods: {
150
-    onDetails () {
73
+    getSkinList () {
74
+      let start_date = '', end_date = ''
75
+      if (this.dates && this.dates.length > 0) {
76
+        start_date = utils.formatTime(this.dates[0], 'yyyy-MM-dd')
77
+        end_date = utils.formatTime(this.dates[1], 'yyyy-MM-dd')
78
+      }
79
+      console.log(start_date, end_date, 'end_date');
80
+      let params = {
81
+        page: this.currentPage1,
82
+        limit: this.limit,
83
+        keywords: this.searchText,
84
+        start_date: start_date,
85
+        end_date: end_date,
86
+      }
87
+      api.getSkinList(params).then(res => {
88
+        if (res.code == 200) {
89
+          this.userList = res.data.list
90
+          this.total = res.data.total
91
+        }
92
+      })
93
+    },
94
+    onDetails (e) {
151 95
       this.$router.push({
152
-        path: '/testSkin/details'
96
+        path: '/testSkin/details',
97
+        query: {
98
+          id: e
99
+        }
153 100
       })
154 101
     },
155
-    handleCurrentChange () { },
156
-    handleSizeChange () { }
102
+    handleCurrentChange (e) {
103
+      this.currentPage1 = e
104
+      this.getSkinList
105
+      console.log(e, 'eeeeee');
106
+    }
157 107
   },
158 108
 
159
-  created () { },
109
+  created () {
110
+    this.getSkinList()
111
+  },
160 112
 
161 113
   mounted () { }
162 114
 }

+ 1 - 1
src/router/map/home.js

@@ -16,7 +16,7 @@ import Coupon from '@/pages/coupon/index'
16 16
 import projectOrder from '@/pages/customerMan/myOrder'
17 17
 
18 18
 export default {
19
-  path: '/',
19
+  path: '/layout',
20 20
   name: '首页',
21 21
   component: layout,
22 22
   children: [

+ 10 - 5
src/router/map/login.js

@@ -1,8 +1,13 @@
1 1
 // 登录
2 2
 export default [
3
-	{	
4
-		path: '/login',
5
-		name: 'login',
6
-		component: () => import('@/pages/login/login.vue') 
7
-	}
3
+  {
4
+    path: '/',
5
+    name: 'login',
6
+    component: () => import('@/pages/login/login.vue')
7
+  },
8
+  {
9
+    path: '/login',
10
+    name: 'login',
11
+    component: () => import('@/pages/login/login.vue')
12
+  }
8 13
 ]

+ 67 - 8
src/server/home.js

@@ -3,14 +3,73 @@
3 3
 import url from './urls'
4 4
 
5 5
 export default class Home {
6
-	/**
7
-	 * @描述  1.1	获取用户信息
8
-	 */
9
-	static getUserMess(parms) {
10
-		return $http.post(url.getUserMess,parms);
11
-    }
6
+  /**
7
+   * @描述  1.1	获取用户信息
8
+   */
9
+  static getToken (parms) {
10
+    return $http.post(url.getToken, parms);
11
+  }
12
+
13
+  static getTotal (parms) {
14
+    return $http.get(url.getTotal, parms);
15
+  }
16
+
17
+  static getToday (parms) {
18
+    return $http.get(url.getToday, parms);
19
+  }
20
+
21
+  static getSkinList (parms) {
22
+    return $http.get(url.getSkinList, parms);
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 getSkinTags (parms) {
34
+    return $http.get(url.getSkinTags, parms);
35
+  }
36
+  static getSkinUpdate (parms) {
37
+    return $http.post(url.getSkinUpdate, parms);
38
+  }
39
+
40
+  // 获取历史订单
41
+  static getOrderList (parms) {
42
+    return $http.get(url.getOrderList, parms);
43
+  }
44
+
45
+  // 获取订单详情
46
+  static getOrderInfo (parms) {
47
+    return $http.get(url.getOrderInfo, parms);
48
+  }
49
+
50
+  // 获取用户列表
51
+  static getUserList (parms) {
52
+    return $http.get(url.getUserList, parms);
53
+  }
54
+  
55
+  // 获取用户详情
56
+  static getUserInfo (parms) {
57
+    return $http.get(url.getUserInfo, parms);
58
+  }
59
+  
60
+  // 获取优惠券列表
61
+  static getCouponInfo (parms) {
62
+    return $http.get(url.getCouponInfo, parms);
63
+  }
64
+
65
+  // 发送优惠券接口
66
+  static sendCoupon (parms) {
67
+    return $http.post(url.sendCoupon, parms);
68
+  }
69
+  
70
+
12 71
 }
13 72
 
14
- 
15
- 
73
+
74
+
16 75
 

+ 41 - 3
src/server/urls.js

@@ -1,5 +1,43 @@
1 1
 export default {
2
-	//登录
3
-	getsskey: '/sport/get_session_key',
4
-	getUserMess: '/enterprise/check_user_auth'
2
+  //登录
3
+  getToken: '/v2/pad/login',
4
+  //首页数据
5
+  getTotal: '/v2/pad/home/total',
6
+  //今日订单列表
7
+  getToday: '/v2/pad/order/today',
8
+  //测肤记录列表
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
+  getSkinTags: '/v2/pad/skin/tags',
18
+  //保存测肤记录
19
+  getSkinUpdate:'/v2/pad/skin/update',
20
+
21
+  /**
22
+   *  by ListKer
23
+   */
24
+
25
+  // 获取历史订单
26
+  getOrderList:'/v2/pad/order/list',
27
+
28
+  //获取订单详情
29
+  getOrderInfo: '/v2/pad/order/info',
30
+
31
+  // 获取用户列表
32
+  getUserList:'/v2/pad/user/list',
33
+  
34
+  // 获取用户详情
35
+  getUserInfo:'/v2/pad/user/info',
36
+  
37
+  // 获取优惠券列表
38
+  getCouponInfo:'/v2/pad/coupon/list',
39
+  
40
+  // 发送优惠券接口
41
+  sendCoupon:'/v2/pad/coupon/send',
42
+
5 43
 }

+ 2 - 1
src/store/modules/comVal.js

@@ -1,5 +1,6 @@
1 1
 const state = {
2
-  name: 666
2
+  name: 666,
3
+  token: null
3 4
 }
4 5
 
5 6
 const actions = {