Explorar o código

feat: 更改导航

lihai %!s(int64=2) %!d(string=hai) anos
pai
achega
99190d3506

+ 5 - 5
src/components/common/layout/leftMenu.vue

@@ -59,11 +59,6 @@ export default {
59 59
           unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/uncoupon.png',
60 60
           icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/coupon.png',
61 61
         }, {
62
-          name: "客户管理",
63
-          path: "/customerMan",
64
-          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png',
65
-          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png',
66
-        }, {
67 62
           name: "历史订单",
68 63
           path: "/historicalOrder",
69 64
           unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhistory.png',
@@ -78,6 +73,11 @@ export default {
78 73
           path: "/storeDetection",
79 74
           icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/testing.png',
80 75
           unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/untesting.png'
76
+        }, {
77
+          name: "客户管理",
78
+          path: "/customerMan",
79
+          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png',
80
+          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png',
81 81
         }
82 82
       ],
83 83
       nowIndex: 0

+ 70 - 57
src/filters/filter.js

@@ -4,17 +4,17 @@ import Vue from 'vue'
4 4
    * @param {Object} value     //需要匹配小数位的原始值
5 5
    * @param {Object} d         //小数位的位数(可不传,不传默认保留两位小数)  
6 6
    */
7
-Vue.filter("doubleNum", function(value,d) {
8
-	if(value=='--'){
9
-		return value;
10
-	}
11
-	d=d?d:'2';
12
-	if(value){
13
-		return parseFloat(value).toFixed(d);
14
-	} else{
15
-		// return '--'
16
-		return (0).toFixed(d);
17
-	}
7
+Vue.filter("doubleNum", function (value, d) {
8
+  if (value == '--') {
9
+    return value;
10
+  }
11
+  d = d ? d : '2';
12
+  if (value) {
13
+    return parseFloat(value).toFixed(d);
14
+  } else {
15
+    // return '--'
16
+    return (0).toFixed(d);
17
+  }
18 18
 });
19 19
 
20 20
 /**
@@ -22,14 +22,14 @@ Vue.filter("doubleNum", function(value,d) {
22 22
    * @param {Object} value     //需要匹配的原始值
23 23
    * @param {Object} d         //需要保留的小数位的位数(可不传,不传保留原始小数位)  
24 24
    */
25
-Vue.filter("thousand", function(value,d) {
26
-	if(value){
27
-		if(d) value=parseFloat(value).toFixed(d);
28
-		value=value.toString();
29
-		var re=/\d{1,3}(?=(\d{3})+$)/g;
30
-		var n1=value.replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.replace(re,"$&,")+s2;});
31
-		return n1;
32
-	}
25
+Vue.filter("thousand", function (value, d) {
26
+  if (value) {
27
+    if (d) value = parseFloat(value).toFixed(d);
28
+    value = value.toString();
29
+    var re = /\d{1,3}(?=(\d{3})+$)/g;
30
+    var n1 = value.replace(/^(\d+)((\.\d+)?)$/, function (s, s1, s2) { return s1.replace(re, "$&,") + s2; });
31
+    return n1;
32
+  }
33 33
 });
34 34
 
35 35
 /**
@@ -37,54 +37,67 @@ Vue.filter("thousand", function(value,d) {
37 37
    * @param {Object} value     //需要匹配的原始值
38 38
    * @param {Object} value2    //需要得到的日期格式(页面不区分大小写,可不传,不传默认返回年月日) 
39 39
    */
40
-Vue.filter("formatDate", function(value,value2) {
41
-	if(value){ 
42
-		if(value2) {
43
-			if(value2.toLowerCase()=='yyyy-mm-dd hhmm'){
44
-				let str=value.slice(11,19);
45
-				if(str=='23:59:59'){
46
-					return value.slice(0,10)+' 24:00';
47
-				} else{
48
-					return value.slice(0,16);
49
-				}
50
-			} else if(value2.toLowerCase()=='yyyy-mm-dd hh'){
51
-				return value.slice(0,13);
52
-			}else if(value2.toLowerCase()=='hhmm'){
53
-				if(value.slice(11,19)=='23:59:59'){
54
-					return '24:00';
55
-				}
56
-				return value.slice(11,16);
57
-			} else{
58
-				return value.slice(0,10);
59
-			}
60
-		}else{
61
-			return value.slice(0,10);
62
-		}
63
-	}
40
+Vue.filter("formatDate", function (value, value2) {
41
+  if (value) {
42
+    if (value2) {
43
+      if (value2.toLowerCase() == 'yyyy-mm-dd hhmm') {
44
+        let str = value.slice(11, 19);
45
+        if (str == '23:59:59') {
46
+          return value.slice(0, 10) + ' 24:00';
47
+        } else {
48
+          return value.slice(0, 16);
49
+        }
50
+      } else if (value2.toLowerCase() == 'yyyy-mm-dd hh') {
51
+        return value.slice(0, 13);
52
+      } else if (value2.toLowerCase() == 'hhmm') {
53
+        if (value.slice(11, 19) == '23:59:59') {
54
+          return '24:00';
55
+        }
56
+        return value.slice(11, 16);
57
+      } else {
58
+        return value.slice(0, 10);
59
+      }
60
+    } else {
61
+      return value.slice(0, 10);
62
+    }
63
+  }
64 64
 });
65 65
 
66 66
 /**
67 67
    * 时间格式重置   页面用法:{{'18:30:26' | formatTime}}  返回值:'18:30'
68 68
    * @param {Object} value     //需要匹配的原始值
69 69
    */
70
-Vue.filter("formatTime", function(value) {
71
-	if(value){ 
72
-		if(value=='23:59:59'){
73
-			return "24:00";
74
-		} else{
75
-			return value.slice(0,5);
76
-		}
77
-	}
70
+Vue.filter("formatTime", function (value) {
71
+  if (value) {
72
+    if (value == '23:59:59') {
73
+      return "24:00";
74
+    } else {
75
+      return value.slice(0, 5);
76
+    }
77
+  }
78 78
 });
79 79
 
80 80
 /**
81 81
    * 格式重置   返回百分比
82 82
    * @param {Object} value     //需要匹配的原始值
83 83
    */
84
-Vue.filter("percent", function(value) {
85
-	if(value){
86
-		return parseFloat(value).toFixed(2)+ '%';
87
-	} else{
88
-		return (0).toFixed(2) + '%';
89
-	}
84
+Vue.filter("percent", function (value) {
85
+  if (value) {
86
+    return parseFloat(value).toFixed(2) + '%';
87
+  } else {
88
+    return (0).toFixed(2) + '%';
89
+  }
90 90
 });
91
+
92
+/**
93
+ * 限制字符串长度
94
+ * value:字符串对象
95
+ * lmit:展示的长度
96
+ */
97
+Vue.filter("ellipsis", function (value, lmit) {
98
+  if (!value) return ''
99
+  if (value.length > lmit) {
100
+    return value.slice(0, lmit) + '...'
101
+  }
102
+  return value
103
+})

+ 25 - 2
src/pages/testSkin/details/index.vue

@@ -5,7 +5,7 @@
5 5
         <div class="user-img"><img :src="userInfo.image"
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.name}}</span></div>
9 9
           <div class="sex">性别:<span>{{userInfo.sex}}</span></div>
10 10
           <div class="age">肤龄:<span>{{userInfo.age}}</span></div>
11 11
           <div class="skin-type">肤质:<span>{{userInfo.skinType}}</span></div>
@@ -81,7 +81,15 @@
81 81
         </div>
82 82
         <div class="programme-list">
83 83
           <div class="programme-info">
84
-            <div class="programme-left"></div>
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">【清洁补水】华熙智慧…</div>
89
+                <div class="tips-title">美白、祛痘、抗皱</div>
90
+                <div class="tips-title">仪器:<span>无创水光</span></div>
91
+              </div>
92
+            </div>
85 93
             <div class="programme-right"></div>
86 94
           </div>
87 95
         </div>
@@ -394,6 +402,21 @@ export default {
394 402
           align-items: center;
395 403
           .programme-left {
396 404
             flex: 1;
405
+            display: flex;
406
+            .programme-img {
407
+              width: 48px;
408
+              img {
409
+                width: 100%;
410
+                display: block;
411
+              }
412
+            }
413
+            .programme-tips {
414
+              font-size: 10px;
415
+              font-family: PingFangSC-Regular, PingFang SC;
416
+              font-weight: 400;
417
+              color: #999999;
418
+              line-height: 14px;
419
+            }
397 420
           }
398 421
           .programme-right {
399 422
             flex: 1;