Просмотр исходного кода

隐藏用户手机号&&确认订单切换项目&&项目折扣

yuhao лет назад: 2
Родитель
Сommit
43495c7139

Разница между файлами не показана из-за своего большого размера
+ 10256 - 7465
package-lock.json


+ 2 - 2
package.json

@@ -31,7 +31,7 @@
31 31
     "@vue/cli-service": "^3.5.0",
32 32
     "@vue/test-utils": "1.0.0-beta.29",
33 33
     "babel-core": "7.0.0-bridge.0",
34
-    "babel-eslint": "^10.0.1",
34
+    "babel-eslint": "^8.2.2",
35 35
     "babel-jest": "^23.6.0",
36 36
     "cross-env": "^5.2.1",
37 37
     "eslint": "^5.8.0",
@@ -108,4 +108,4 @@
108 108
       "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
109 109
     }
110 110
   }
111
-}
111
+}

Разница между файлами не показана из-за своего большого размера
+ 410 - 263
src/pages/confirmOrder/addOrder/index.vue


+ 95 - 70
src/pages/coupon/index.vue

@@ -1,71 +1,82 @@
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"></el-input>
9
-      <div class="search-button"
10
-           @click="getUserList">搜索</div>
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>
11
+      <div class="search-button" @click="getUserList">搜索</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.id"
18
-                   :label="item.name"
19
-                   :value="item.id"></el-option>
13
+      <el-select
14
+        class="coupon-select"
15
+        v-model="coupon"
16
+        size="mini"
17
+        placeholder="选择优惠券"
18
+      >
19
+        <el-option
20
+          v-for="item in couponList"
21
+          :key="item.id"
22
+          :label="item.name"
23
+          :value="item.id"
24
+        ></el-option>
20 25
       </el-select>
21 26
       <div class="num-tips">数量</div>
22 27
       <div class="coupon-num">
23
-        <div class="reduce"
24
-             @click="reduceNum">-</div>
25
-        <div class="num">{{couponNum}}</div>
26
-        <div class="add"
27
-             @click="couponNum++">+</div>
28
+        <div class="reduce" @click="reduceNum">-</div>
29
+        <div class="num">{{ couponNum }}</div>
30
+        <div class="add" @click="couponNum++">+</div>
31
+      </div>
32
+      <div class="send-coupon" style="margin-left: 39px" @click="sendCoupon">
33
+        发送
28 34
       </div>
29
-      <div class="send-coupon"
30
-           style="margin-left: 39px;"
31
-           @click="sendCoupon">发送</div>
32 35
     </div>
33 36
     <div class="user-list">
34
-      <el-table ref="multipleTable"
35
-                :data="tableData"
36
-                tooltip-effect="dark"
37
-                height="500"
38
-                style="width: 100%;border-radius: 8px;"
39
-                @selection-change="handleSelectionChange">
40
-        <el-table-column type="selection"
41
-                         width="55"></el-table-column>
42
-        <el-table-column label="头像"
43
-                         width="120">
37
+      <el-table
38
+        ref="multipleTable"
39
+        :data="tableData"
40
+        tooltip-effect="dark"
41
+        height="500"
42
+        style="width: 100%; border-radius: 8px"
43
+        @selection-change="handleSelectionChange"
44
+        @row-click="goDetail"
45
+      >
46
+        <el-table-column type="selection" width="55"></el-table-column>
47
+        <el-table-column label="头像" width="120">
44 48
           <template slot-scope="scope">
45 49
             <div class="head-img">
46
-              <img :src="scope.row.avatar_url"
47
-                   alt />
50
+              <img :src="scope.row.avatar_url" alt />
48 51
             </div>
49 52
           </template>
50 53
         </el-table-column>
51
-        <el-table-column prop="nickname"
52
-                         label="昵称"
53
-                         width="120"></el-table-column>
54
-        <el-table-column prop="mobile"
55
-                         label="联系电话"
56
-                         show-overflow-tooltip></el-table-column>
57
-        <el-table-column prop="create_time"
58
-                         label="注册时间"
59
-                         show-overflow-tooltip></el-table-column>
54
+        <el-table-column
55
+          prop="nickname"
56
+          label="昵称"
57
+          width="120"
58
+        ></el-table-column>
59
+        <el-table-column
60
+          prop="mobile"
61
+          label="联系电话"
62
+          show-overflow-tooltip
63
+        ></el-table-column>
64
+        <el-table-column
65
+          prop="create_time"
66
+          label="注册时间"
67
+          show-overflow-tooltip
68
+        ></el-table-column>
60 69
       </el-table>
61 70
 
62 71
       <div class="pagin">
63
-        <el-pagination background
64
-                       layout="prev, pager, next"
65
-                       @size-change="handleSizeChange"
66
-                       @current-change="handleCurrentChange"
67
-                       :current-page.sync="currentPage1"
68
-                       :total="total"></el-pagination>
72
+        <el-pagination
73
+          background
74
+          layout="prev, pager, next"
75
+          @size-change="handleSizeChange"
76
+          @current-change="handleCurrentChange"
77
+          :current-page.sync="currentPage1"
78
+          :total="total"
79
+        ></el-pagination>
69 80
       </div>
70 81
     </div>
71 82
   </div>
@@ -75,8 +86,8 @@
75 86
 import api from "../../server/home";
76 87
 
77 88
 export default {
78
-  components: {},
79
-  data () {
89
+    components: {},
90
+  data() {
80 91
     return {
81 92
       searckItem: "",
82 93
       couponList: [],
@@ -93,14 +104,24 @@ export default {
93 104
   watch: {},
94 105
 
95 106
   methods: {
96
-    reduceNum () {
107
+    // 发券中心点击用户跳转到用户详情
108
+    goDetail(row, column, event) {
109
+      console.log(1);
110
+      this.$router.push({
111
+        path: "/customerMan/details",
112
+        query: {
113
+          id: row.id,
114
+        },
115
+      });
116
+    },
117
+    reduceNum() {
97 118
       this.couponNum > 1 ? this.couponNum-- : (this.couponNum = 1);
98 119
     },
99
-    handleSelectionChange (val) {
120
+    handleSelectionChange(val) {
100 121
       this.multipleSelection = val;
101 122
     },
102 123
     // 发送优惠券
103
-    sendCoupon () {
124
+    sendCoupon() {
104 125
       let selectIds = "";
105 126
       for (let i = 0; i < this.multipleSelection.length; i++) {
106 127
         selectIds = selectIds + "," + this.multipleSelection[i].id;
@@ -108,27 +129,32 @@ export default {
108 129
       let params = {
109 130
         id: this.coupon,
110 131
         user_ids: selectIds.substring(1, selectIds.length),
111
-        num: this.couponNum
132
+        num: this.couponNum,
112 133
       };
113
-      api.sendCoupon(params).then(res => {
134
+      api.sendCoupon(params).then((res) => {
114 135
         if (res.code == 200) {
115 136
           this.$message({
116
-            message: '发送成功',
117
-            type: 'success'
137
+            message: "发送成功",
138
+            type: "success",
118 139
           });
119 140
         }
120 141
       });
121 142
     },
122 143
 
123 144
     // 获取订单列表
124
-    getUserList () {
145
+    getUserList() {
125 146
       let params = {
126 147
         page: this.currentPage1,
127 148
         limit: this.limit,
128
-        keywords: this.searckItem
149
+        keywords: this.searckItem,
129 150
       };
130
-      api.getUserList(params).then(res => {
151
+      api.getUserList(params).then((res) => {
131 152
         if (res.code == 200) {
153
+          // 将用户手机号中间四位变成****
154
+          res.data.list.map((item) => {
155
+            item.mobile =
156
+              item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
157
+          });
132 158
           this.tableData = res.data.list;
133 159
           this.total = res.data.total;
134 160
         }
@@ -136,33 +162,32 @@ export default {
136 162
     },
137 163
 
138 164
     // 获取优惠券列表
139
-    getCouponInfo () {
165
+    getCouponInfo() {
140 166
       let params = {
141 167
         page: this.currentPage1,
142
-        limit: 100
168
+        limit: 100,
143 169
       };
144
-      api.getCouponInfo(params).then(res => {
170
+      api.getCouponInfo(params).then((res) => {
145 171
         if (res.code == 200) {
146 172
           this.couponList = res.data.list;
147 173
         }
148 174
       });
149 175
     },
150 176
 
151
-    handleCurrentChange (e) {
177
+    handleCurrentChange(e) {
152 178
       this.currentPage1 = e;
153 179
       this.getUserList();
154 180
     },
155 181
 
156
-    handleSizeChange (val) {
157
-    }
182
+    handleSizeChange(val) {},
158 183
   },
159 184
 
160
-  created () {
185
+  created() {
161 186
     this.getUserList();
162 187
     this.getCouponInfo();
163 188
   },
164 189
 
165
-  mounted () { }
190
+  mounted() {},
166 191
 };
167 192
 </script>
168 193
 

+ 186 - 149
src/pages/customerMan/details/index.vue

@@ -4,39 +4,54 @@
4 4
       <div class="user-info">
5 5
         <div class="title">
6 6
           <div class="txt">个人信息</div>
7
-          <div class="test-record"
8
-               @click="toTestRecord"
9
-               v-if="userInfo.analysis_id">测肤记录</div>
7
+          <div
8
+            class="test-record"
9
+            @click="toTestRecord"
10
+            v-if="userInfo.analysis_id"
11
+          >
12
+            测肤记录
13
+          </div>
10 14
         </div>
11 15
         <div class="detail-info">
12 16
           <div class="user-img">
13
-            <img :src="userInfo.avatar_url"
14
-                 alt="">
17
+            <img :src="userInfo.avatar_url" alt="" />
15 18
           </div>
16 19
           <div class="user-span">
17 20
             <div class="info">
18
-              <div class="name"><span>{{userInfo.nickname | ellipsis(3)}}</span></div>
19
-              <div class="sex"><img :src="gender"
20
-                     alt=""></div>
21
-              <div class="age"><span>{{userInfo.skin_age}}</span><span class="min-size">肤龄</span></div>
21
+              <div class="name">
22
+                <span>{{ userInfo.nickname | ellipsis(3) }}</span>
23
+              </div>
24
+              <div class="sex"><img :src="gender" alt="" /></div>
25
+              <div class="age">
26
+                <span>{{ userInfo.skin_age }}</span
27
+                ><span class="min-size">肤龄</span>
28
+              </div>
22 29
             </div>
23
-            <div class="real-name">姓名:
24
-              <span v-show="!nameInpVisible">{{userInfo.real_name}}</span>
25
-              <el-input size="mini"
26
-                        ref="realNameInp"
27
-                        v-show="nameInpVisible"
28
-                        @change="updateRealName"
29
-                        v-model="userInfo.real_name"
30
-                        type="text"></el-input>
31
-              <img class="edit-name"
32
-                   @click="editName"
33
-                   src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/eidt.png"
34
-                   alt=""
35
-                   srcset="">
30
+            <div class="real-name">
31
+              姓名:
32
+              <span v-show="!nameInpVisible">{{ userInfo.real_name }}</span>
33
+              <el-input
34
+                size="mini"
35
+                ref="realNameInp"
36
+                v-show="nameInpVisible"
37
+                @change="updateRealName"
38
+                v-model="userInfo.real_name"
39
+                type="text"
40
+              ></el-input>
41
+              <img
42
+                class="edit-name"
43
+                @click="editName"
44
+                src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/eidt.png"
45
+                alt=""
46
+                srcset=""
47
+              />
48
+            </div>
49
+            <div class="skin-type">
50
+              肤质:<span>{{ userInfo.skin_type }}</span>
51
+            </div>
52
+            <div class="skin-color">
53
+              肤色:<span>{{ userInfo.skin_color }}</span>
36 54
             </div>
37
-            <div class="skin-type">肤质:<span>{{userInfo.skin_type}}</span></div>
38
-            <div class="skin-color">肤色:<span>{{userInfo.skin_color}}</span></div>
39
-
40 55
           </div>
41 56
         </div>
42 57
       </div>
@@ -44,53 +59,52 @@
44 59
       <div class="personage-data">
45 60
         <div class="myDataList">
46 61
           上传报告时间:
47
-          <span>{{userInfo.check_time}}</span>
62
+          <span>{{ userInfo.check_time }}</span>
48 63
         </div>
49 64
         <div class="myDataList">
50 65
           出生日期:
51
-          <span>{{userInfo.birthday}}</span>
66
+          <span>{{ userInfo.birthday }}</span>
52 67
         </div>
53 68
         <div class="myDataList">
54 69
           联系电话:
55
-          <span>{{userInfo.mobile}}</span>
70
+          <span>{{ userInfo.mobile }}</span>
56 71
         </div>
57 72
 
58 73
         <div class="myDataList">
59 74
           所在地:
60
-          <span>{{userInfo.city}}</span>
75
+          <span>{{ userInfo.city }}</span>
61 76
         </div>
62 77
 
63 78
         <div class="myDataList">
64 79
           开卡店铺:
65
-          <span>{{userInfo.store_name}}</span>
80
+          <span>{{ userInfo.store_name }}</span>
66 81
         </div>
67 82
 
68
-         <div class="myDataList coupon-num">
83
+        <div class="myDataList coupon-num">
69 84
           次卡数量:
70
-          <span>{{order_total.card_order}}</span>
85
+          <span>{{ order_total.card_order }}</span>
71 86
         </div>
72 87
 
73 88
         <div class="myDataList coupon-num">
74 89
           优惠券数量:
75
-          <span>{{userInfo.card_num}}</span>
90
+          <span>{{ userInfo.card_num }}</span>
76 91
         </div>
77 92
 
78 93
         <div class="myDataList">
79 94
           储值金额:
80 95
           <span class="JEcolor">
81 96
82
-            <span class="bigSixe">{{userInfo.amount}}</span>
97
+            <span class="bigSixe">{{ userInfo.amount }}</span>
83 98
             <!-- .00 -->
84 99
           </span>
85 100
         </div>
86 101
         <div class="myDataList">
87 102
           积分:
88
-          <span>{{userInfo.coin}}</span>
103
+          <span>{{ userInfo.coin }}</span>
89 104
         </div>
90
-        <div class="myDataList"
91
-             @click="remarkPupopVisible=true">
105
+        <div class="myDataList" @click="remarkPupopVisible = true">
92 106
           备注:
93
-          <span>{{userInfo.remark | ellipsis(20)}}</span>
107
+          <span>{{ userInfo.remark | ellipsis(20) }}</span>
94 108
         </div>
95 109
       </div>
96 110
     </div>
@@ -102,45 +116,54 @@
102 116
             <div class="problem">
103 117
               <div class="problem-title">问题标签</div>
104 118
               <div class="problem-lable">
105
-                <div class="lable-text problem-text">{{problem}}</div>
119
+                <div class="lable-text problem-text">{{ problem }}</div>
106 120
               </div>
107 121
             </div>
108 122
             <div class="problem">
109 123
               <div class="problem-title">面部标签</div>
110 124
               <div class="problem-lable">
111
-                <div class="lable-text"
112
-                     v-for="item,index in lableList"
113
-                     :key="index"
114
-                     :style="{background:item.bgcolor,borderColor:item.bdcolor}">{{item.text}}</div>
125
+                <div
126
+                  class="lable-text"
127
+                  v-for="(item, index) in lableList"
128
+                  :key="index"
129
+                  :style="{
130
+                    background: item.bgcolor,
131
+                    borderColor: item.bdcolor,
132
+                  }"
133
+                >
134
+                  {{ item.text }}
135
+                </div>
115 136
               </div>
116 137
             </div>
117 138
           </div>
118 139
         </div>
119 140
         <div class="right-top-list">
120
-          <div class="dataList"
121
-               @click="toOrder(1)">
141
+          <div class="dataList" @click="toOrder(1)">
122 142
             <div class="">
123
-              <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/project_icon.png" />
143
+              <img
144
+                src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/project_icon.png"
145
+              />
124 146
               <div>项目订单</div>
125 147
             </div>
126
-            <span>{{order_total.project}}</span>
148
+            <span>{{ order_total.project }}</span>
127 149
           </div>
128
-          <div class="dataList"
129
-               style="margin:18px 0px"
130
-               @click="toOrder(2)">
150
+          <div class="dataList" style="margin: 18px 0px" @click="toOrder(2)">
131 151
             <div class="">
132
-              <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/coupon_icon.png" />
152
+              <img
153
+                src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/coupon_icon.png"
154
+              />
133 155
               <div>次卡订单</div>
134 156
             </div>
135
-            <span>{{order_total.card_order}}</span>
157
+            <span>{{ order_total.card_order }}</span>
136 158
           </div>
137
-          <div class="dataList"
138
-               @click="toOrder(3)">
159
+          <div class="dataList" @click="toOrder(3)">
139 160
             <div class="">
140
-              <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/order_total_icon.png" />
161
+              <img
162
+                src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/order_total_icon.png"
163
+              />
141 164
               <div>商品订单</div>
142 165
             </div>
143
-            <span>{{order_total.goods}}</span>
166
+            <span>{{ order_total.goods }}</span>
144 167
           </div>
145 168
         </div>
146 169
       </div>
@@ -149,40 +172,50 @@
149 172
           <div class="tab">
150 173
             <div class="tab-title">执行方案</div>
151 174
           </div>
152
-          <div class="programmeList"
153
-               v-if="programmeList.length>0">
175
+          <div class="programmeList" v-if="programmeList.length > 0">
154 176
             <div class="programmeWeek">
155
-              <div class="programmeItem"
156
-                   v-for="item,index in programmeList"
157
-                   :key="index">
158
-                <div :class="selectWeek==index?'weekItemSelect':'weekItem'"
159
-                     @click="weekSelect(index)">{{item.name}}</div>
160
-                <div class="weekLine"
161
-                     v-if="index==3?false:true"></div>
177
+              <div
178
+                class="programmeItem"
179
+                v-for="(item, index) in programmeList"
180
+                :key="index"
181
+              >
182
+                <div
183
+                  :class="selectWeek == index ? 'weekItemSelect' : 'weekItem'"
184
+                  @click="weekSelect(index)"
185
+                >
186
+                  {{ item.name }}
187
+                </div>
188
+                <div class="weekLine" v-if="index == 3 ? false : true"></div>
162 189
               </div>
163 190
             </div>
164
-            <div class="doTime">{{programmeList[selectWeek].time}}</div>
165
-            <div class="weekDetails"
166
-                 v-if="programmeList.length>0">
167
-              <div class="contentItem"
168
-                   v-for="item,index1 in programmeList[selectWeek].list"
169
-                   :key="index1">
191
+            <div class="doTime">{{ programmeList[selectWeek].time }}</div>
192
+            <div class="weekDetails" v-if="programmeList.length > 0">
193
+              <div
194
+                class="contentItem"
195
+                v-for="(item, index1) in programmeList[selectWeek].list"
196
+                :key="index1"
197
+              >
170 198
                 <div class="itemTitle">
171
-                  <div>{{item.name}}</div>
172
-                  <div>{{item.classify_name}}</div>
199
+                  <div>{{ item.name }}</div>
200
+                  <div>{{ item.classify_name }}</div>
173 201
                   <!-- <div>{{item.time}}</div> -->
174 202
                 </div>
175
-                <div class="itemContent"
176
-                     v-for="items,index2 in item.list"
177
-                     :key="index2">
178
-                  <img class="itemContent-img"
179
-                       :src="items.cover_url" />
203
+                <div
204
+                  class="itemContent"
205
+                  v-for="(items, index2) in item.list"
206
+                  :key="index2"
207
+                >
208
+                  <img class="itemContent-img" :src="items.cover_url" />
180 209
                   <div class="itemContent-right">
181 210
                     <div class="right-content">
182
-                      <div class="right-name">{{items.name |ellipsis(14)}}</div>
183
-                      <div class="right-price">{{items.price |doubleNum(2)}}</div>
211
+                      <div class="right-name">
212
+                        {{ items.name | ellipsis(14) }}
213
+                      </div>
214
+                      <div class="right-price">
215
+                        {{ items.price | doubleNum(2) }}
216
+                      </div>
184 217
                     </div>
185
-                    <div class="right-project">{{items.product_name}}</div>
218
+                    <div class="right-project">{{ items.product_name }}</div>
186 219
                   </div>
187 220
                 </div>
188 221
               </div>
@@ -194,19 +227,21 @@
194 227
     <!-- 备注 -->
195 228
     <mine-pupop :show="remarkPupopVisible">
196 229
       <div class="block">
197
-        <div class="delete-pupop"
198
-             @click="remarkPupopVisible=false">
199
-          <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
200
-               alt />
230
+        <div class="delete-pupop" @click="remarkPupopVisible = false">
231
+          <img
232
+            src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
233
+            alt
234
+          />
201 235
         </div>
202 236
         <div class="pupop-title">备注</div>
203
-        <textarea type="text"
204
-                  class="noticeInput"
205
-                  placeholder="备注"
206
-                  v-model="userInfo.remark"></textarea>
237
+        <textarea
238
+          type="text"
239
+          class="noticeInput"
240
+          placeholder="备注"
241
+          v-model="userInfo.remark"
242
+        ></textarea>
207 243
         <div class="noticeSubmit">
208
-          <div class="submit-notice"
209
-               @click="submitRemark">确定</div>
244
+          <div class="submit-notice" @click="submitRemark">确定</div>
210 245
         </div>
211 246
       </div>
212 247
     </mine-pupop>
@@ -218,7 +253,7 @@ import api from "../../../server/home";
218 253
 import minePupop from "../../../components/minePupop/index.vue";
219 254
 
220 255
 export default {
221
-  data () {
256
+  data() {
222 257
     return {
223 258
       userInfo: {
224 259
         image:
@@ -227,13 +262,12 @@ export default {
227 262
         sex: "女",
228 263
         age: "23",
229 264
         skinType: "中性皮肤",
230
-        real_name: '',
231
-        remark: '',
265
+        real_name: "",
266
+        remark: "",
232 267
       },
233 268
       problem: "",
234 269
       //面部标签
235
-      lableList: [
236
-      ],
270
+      lableList: [],
237 271
       //执行方案
238 272
       programmeList: [],
239 273
 
@@ -249,34 +283,37 @@ export default {
249 283
       programmeIndex: "",
250 284
       isPupop: false,
251 285
       nameInpVisible: false,
252
-      remarkPupopVisible: false
286
+      remarkPupopVisible: false,
253 287
     };
254 288
   },
255 289
   components: { minePupop },
256 290
   computed: {
257
-    gender () {
291
+    gender() {
258 292
       // 性别,1男,2女,0保密
259
-      return this.userInfo.sex == 1 ?
260
-        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png' :
261
-        'https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png'
262
-    }
293
+      return this.userInfo.sex == 1
294
+        ? "https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/male.png"
295
+        : "https://we-spa.oss-cn-shenzhen.aliyuncs.com/wxapp/20220610/female.png";
296
+    },
263 297
   },
264 298
   watch: {},
265 299
 
266 300
   methods: {
267
-    getPadUserInfo () {
268
-      api.getPadUserInfo({ id: this.id }).then(res => {
301
+    getPadUserInfo() {
302
+      api.getPadUserInfo({ id: this.id }).then((res) => {
303
+        console.log(res);
304
+        // 将用户手机号中间四位变成****
305
+        res.data.user.mobile = res.data.user.mobile.substring(0, 3) + "****" + res.data.user.mobile.substring(7);
269 306
         this.userInfo = res.data.user;
270 307
         // this.userInfo.remarks = res.data.remark;
271 308
         this.problem = res.data.skin_name;
272
-        let _problem = []
273
-        res.data.face_names.forEach(item => {
274
-          let info = {}
275
-          info['text'] = item
276
-          _problem.push(info)
277
-          console.log(_problem, '_problem');
278
-        })
279
-        this.lableList = _problem
309
+        let _problem = [];
310
+        res.data.face_names.forEach((item) => {
311
+          let info = {};
312
+          info["text"] = item;
313
+          _problem.push(info);
314
+          console.log(_problem, "_problem");
315
+        });
316
+        this.lableList = _problem;
280 317
         this.randomColor();
281 318
         this.order_total = res.data.order_total;
282 319
         this.programmeList = res.data.scheme_list;
@@ -284,40 +321,40 @@ export default {
284 321
         // this.coupon_list = res.data.order_data.coupon_list;
285 322
       });
286 323
     },
287
-    randomColor (type) {
324
+    randomColor(type) {
288 325
       let arr = [
289 326
         {
290 327
           background: "rgba(244, 247, 255, 1)",
291
-          border: "rgba(85, 124, 255, 1)"
328
+          border: "rgba(85, 124, 255, 1)",
292 329
         },
293 330
         {
294 331
           background: "rgba(245, 252, 245, 1)",
295
-          border: "rgba(66, 211, 81, 1)"
332
+          border: "rgba(66, 211, 81, 1)",
296 333
         },
297 334
         {
298 335
           background: "rgba(254, 244, 237, 1)",
299
-          border: "rgba(250, 125, 34, 1)"
336
+          border: "rgba(250, 125, 34, 1)",
300 337
         },
301 338
         {
302 339
           background: "rgba(249, 245, 255, 1)",
303
-          border: "rgba(136, 50, 255, 1)"
340
+          border: "rgba(136, 50, 255, 1)",
304 341
         },
305 342
         {
306 343
           background: "rgba(255, 252, 245, 1)",
307
-          border: "rgba(204, 116, 42, 1)"
308
-        }
344
+          border: "rgba(204, 116, 42, 1)",
345
+        },
309 346
       ];
310
-      this.lableList.forEach(res => {
347
+      this.lableList.forEach((res) => {
311 348
         let color = Math.floor(Math.random() * arr.length);
312 349
         this.$set(res, "bgcolor", arr[color].background);
313 350
         this.$set(res, "bdcolor", arr[color].border);
314 351
       });
315 352
     },
316
-    weekSelect (index) {
353
+    weekSelect(index) {
317 354
       console.log("xxxx");
318 355
       this.selectWeek = index;
319 356
     },
320
-    onOperation (index) {
357
+    onOperation(index) {
321 358
       if (this.programmeList[index].onSelect) {
322 359
         this.$set(
323 360
           this.programmeList[index],
@@ -328,62 +365,62 @@ export default {
328 365
         this.$set(this.programmeList[index], "onSelect", true);
329 366
       }
330 367
     },
331
-    toOrder (index) {
332
-      let activeName = 'first'
368
+    toOrder(index) {
369
+      let activeName = "first";
333 370
       if (index == 3) {
334
-        activeName = 'third'
371
+        activeName = "third";
335 372
       } else if (index == 2) {
336
-        activeName = 'second'
373
+        activeName = "second";
337 374
       }
338 375
       this.$router.push({
339 376
         path: "/customerMan/projectOrder",
340 377
         query: {
341 378
           id: this.id,
342
-          activeName: activeName
343
-        }
379
+          activeName: activeName,
380
+        },
344 381
       });
345 382
     },
346
-    toTestRecord () {
383
+    toTestRecord() {
347 384
       this.$router.push({
348
-        path: '/testSkin/details',
385
+        path: "/testSkin/details",
349 386
         query: {
350
-          id: this.userInfo.analysis_id
351
-        }
352
-      })
387
+          id: this.userInfo.analysis_id,
388
+        },
389
+      });
353 390
     },
354
-    editName () {
355
-      this.nameInpVisible = true
356
-      this.$refs.realNameInp.focus()
391
+    editName() {
392
+      this.nameInpVisible = true;
393
+      this.$refs.realNameInp.focus();
357 394
     },
358
-    async updateRealName () {
395
+    async updateRealName() {
359 396
       let resp = await api.updateUserProfile({
360 397
         id: this.id,
361
-        real_name: this.userInfo.real_name
362
-      })
398
+        real_name: this.userInfo.real_name,
399
+      });
363 400
       if (resp.code === 200) {
364
-        this.$message.success('保存成功!')
401
+        this.$message.success("保存成功!");
365 402
       }
366
-      this.nameInpVisible = false
403
+      this.nameInpVisible = false;
367 404
     },
368
-    async submitRemark () {
405
+    async submitRemark() {
369 406
       let resp = await api.updateUserProfile({
370 407
         id: this.id,
371
-        remark: this.userInfo.remark
372
-      })
408
+        remark: this.userInfo.remark,
409
+      });
373 410
       if (resp.code === 200) {
374
-        this.$message.success('保存成功!')
411
+        this.$message.success("保存成功!");
375 412
       }
376
-      this.remarkPupopVisible = false
377
-    }
413
+      this.remarkPupopVisible = false;
414
+    },
378 415
   },
379 416
 
380
-  created () {
417
+  created() {
381 418
     let id = this.$route.query.id;
382 419
     this.id = id;
383 420
     this.getPadUserInfo();
384 421
   },
385 422
 
386
-  mounted () { }
423
+  mounted() {},
387 424
 };
388 425
 </script>
389 426
 

+ 62 - 64
src/pages/customerMan/index.vue

@@ -1,52 +1,51 @@
1 1
 <template>
2 2
   <div class="mine">
3 3
     <div class="condition">
4
-      <el-input placeholder="请输入内容"
5
-                class="search"
6
-                v-model="searchText">
7
-        <i slot="prefix"
8
-           class="el-input__icon el-icon-search"></i>
4
+      <el-input placeholder="请输入内容" class="search" v-model="searchText">
5
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
9 6
       </el-input>
10
-      <el-button type="primary"
11
-                 class="searchButton"
12
-                 @click="getUserList()">搜索</el-button>
7
+      <el-button type="primary" class="searchButton" @click="getUserList()"
8
+        >搜索</el-button
9
+      >
13 10
     </div>
14 11
 
15 12
     <div class="user-list">
16
-      <el-table ref="multipleTable"
17
-                :data="tableData"
18
-                tooltip-effect="dark"
19
-                height="500"
20
-                style="width: 100%;border-radius: 8px;"
21
-                @row-click="handleSelectionChange">
22
-        <el-table-column label="头像"
23
-                         width="120">
13
+      <el-table
14
+        ref="multipleTable"
15
+        :data="tableData"
16
+        tooltip-effect="dark"
17
+        height="500"
18
+        style="width: 100%; border-radius: 8px"
19
+        @row-click="handleSelectionChange"
20
+      >
21
+        <el-table-column label="头像" width="120">
24 22
           <template slot-scope="scope">
25
-            <div class="head-img"><img :src="scope.row.avatar_url"
26
-                   alt=""></div>
23
+            <div class="head-img">
24
+              <img :src="scope.row.avatar_url" alt="" />
25
+            </div>
27 26
           </template>
28 27
         </el-table-column>
29
-        <el-table-column prop="nickname"
30
-                         label="昵称"
31
-                         width="120">
28
+        <el-table-column prop="nickname" label="昵称" width="120">
32 29
         </el-table-column>
33
-        <el-table-column prop="mobile"
34
-                         label="联系电话"
35
-                         show-overflow-tooltip>
30
+        <el-table-column prop="mobile" label="联系电话" show-overflow-tooltip>
36 31
         </el-table-column>
37
-        <el-table-column prop="create_time"
38
-                         label="注册时间"
39
-                         show-overflow-tooltip>
32
+        <el-table-column
33
+          prop="create_time"
34
+          label="注册时间"
35
+          show-overflow-tooltip
36
+        >
40 37
         </el-table-column>
41 38
       </el-table>
42 39
 
43 40
       <div class="pagin">
44
-        <el-pagination background
45
-                       layout="prev, pager, next"
46
-                       @size-change="handleSizeChange"
47
-                       @current-change="handleCurrentChange"
48
-                       :current-page.sync="currentPage1"
49
-                       :total="total">
41
+        <el-pagination
42
+          background
43
+          layout="prev, pager, next"
44
+          @size-change="handleSizeChange"
45
+          @current-change="handleCurrentChange"
46
+          :current-page.sync="currentPage1"
47
+          :total="total"
48
+        >
50 49
         </el-pagination>
51 50
       </div>
52 51
     </div>
@@ -57,74 +56,73 @@
57 56
 import api from "../../server/home";
58 57
 export default {
59 58
   components: {},
60
-  data () {
59
+  data() {
61 60
     return {
62
-      searchText: '',
63
-      dates: '',
64
-      coupon: '',
61
+      searchText: "",
62
+      dates: "",
63
+      coupon: "",
65 64
       couponList: [
66 65
         {
67
-          value: '选项1',
68
-          label: '黄金糕'
69
-        }, {
70
-          value: '选项2',
71
-          label: '双皮奶'
72
-        }
66
+          value: "选项1",
67
+          label: "黄金糕",
68
+        },
69
+        {
70
+          value: "选项2",
71
+          label: "双皮奶",
72
+        },
73 73
       ],
74 74
       tableData: [],
75 75
       currentPage1: 1,
76
-      multipleSelection: '',
77
-      total: 0
78
-
76
+      multipleSelection: "",
77
+      total: 0,
79 78
     };
80 79
   },
81 80
   computed: {},
82 81
   watch: {},
83 82
 
84 83
   methods: {
85
-
86 84
     // 获取订单列表
87
-    getUserList () {
85
+    getUserList() {
88 86
       let params = {
89 87
         page: this.currentPage1,
90 88
         limit: this.limit,
91 89
         keywords: this.searchText,
92 90
       };
93
-      api.getUserList(params).then(res => {
91
+      api.getUserList(params).then((res) => {
94 92
         if (res.code == 200) {
93
+          // 将用户手机号中间四位变成****
94
+          res.data.list.map((item) => {
95
+            item.mobile =
96
+              item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
97
+          });
95 98
           this.tableData = res.data.list;
96 99
           this.total = res.data.total;
97 100
         }
98 101
       });
99 102
     },
100 103
 
101
-    handleCurrentChange (e) {
104
+    handleCurrentChange(e) {
102 105
       this.currentPage1 = e;
103 106
       this.getUserList();
104 107
     },
105 108
 
106
-    handleSizeChange (val) {
107
-    },
108
-    handleSelectionChange (row, column, event) {
109
+    handleSizeChange(val) {},
110
+    handleSelectionChange(row, column, event) {
109 111
       this.$router.push({
110
-        path: '/customerMan/details',
112
+        path: "/customerMan/details",
111 113
         query: {
112
-          id: row.id
113
-        }
114
+          id: row.id,
115
+        },
114 116
       });
115
-    }
117
+    },
116 118
   },
117 119
 
118
-  created () {
120
+  created() {
119 121
     this.getUserList();
120 122
   },
121 123
 
122
-
123
-  mounted () {
124
-
125
-  },
126
-}
127
-
124
+  mounted() {},
125
+};
128 126
 </script>
129 127
 
130 128
 <style lang='less' scoped>

+ 97 - 72
src/pages/historicalOrder/index.vue

@@ -1,78 +1,99 @@
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="结束日期"></el-date-picker>
4
+      <el-date-picker
5
+        v-model="dates"
6
+        type="daterange"
7
+        range-separator="->"
8
+        start-placeholder="开始日期"
9
+        end-placeholder="结束日期"
10
+      ></el-date-picker>
9 11
 
10
-      <el-input placeholder="请输入项目"
11
-                class="search"
12
-                v-model="product">
13
-        <i slot="prefix"
14
-           class="el-input__icon el-icon-search"></i>
12
+      <el-input placeholder="请输入项目" class="search" v-model="product">
13
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
15 14
       </el-input>
16 15
 
17
-      <el-input placeholder="请输入优惠券"
18
-                class="search"
19
-                v-model="coupon">
20
-        <i slot="prefix"
21
-           class="el-input__icon el-icon-search"></i>
16
+      <el-input placeholder="请输入优惠券" class="search" v-model="coupon">
17
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
22 18
       </el-input>
23 19
 
24
-      <el-input placeholder="请输入内容"
25
-                class="search"
26
-                v-model="searchText">
27
-        <i slot="prefix"
28
-           class="el-input__icon el-icon-search"></i>
20
+      <el-input placeholder="请输入内容" class="search" v-model="searchText">
21
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
29 22
       </el-input>
30
-      <el-button type="primary"
31
-                 class="searchButton"
32
-                 @click="getOrderList()">搜索</el-button>
23
+      <el-button type="primary" class="searchButton" @click="getOrderList()"
24
+        >搜索</el-button
25
+      >
33 26
     </div>
34 27
 
35 28
     <div class="user-list">
36
-      <el-table ref="multipleTable"
37
-                :data="tableData"
38
-                tooltip-effect="dark"
39
-                height="500"
40
-                style="width: 100%;border-radius: 8px;"
41
-                @row-click="handleSelectionChange">
42
-        <el-table-column label="头像"
43
-                         width="120">
29
+      <el-table
30
+        ref="multipleTable"
31
+        :data="tableData"
32
+        tooltip-effect="dark"
33
+        height="500"
34
+        style="width: 100%; border-radius: 8px"
35
+        @row-click="handleSelectionChange"
36
+      >
37
+        <el-table-column label="头像" width="120">
44 38
           <template slot-scope="scope">
45 39
             <div class="head-img">
46
-              <img :src="scope.row.avatar_url"
47
-                   alt />
40
+              <img :src="scope.row.avatar_url" alt />
48 41
             </div>
49 42
           </template>
50 43
         </el-table-column>
51
-        <el-table-column prop="nickname"
52
-                         label="昵称"
53
-                         width="120"></el-table-column>
54
-        <el-table-column prop="mobile"
55
-                         label="联系电话"
56
-                         show-overflow-tooltip></el-table-column>
57
-        <el-table-column prop="order_time"
58
-                         label="预约时间"
59
-                         show-overflow-tooltip></el-table-column>
60
-        <el-table-column prop="date"
61
-                         label="状态"
62
-                         show-overflow-tooltip>
44
+        <el-table-column
45
+          prop="nickname"
46
+          label="昵称"
47
+          width="120"
48
+        ></el-table-column>
49
+        <el-table-column
50
+          prop="mobile"
51
+          label="联系电话"
52
+          show-overflow-tooltip
53
+        ></el-table-column>
54
+        <el-table-column
55
+          prop="order_time"
56
+          label="预约时间"
57
+          show-overflow-tooltip
58
+        ></el-table-column>
59
+        <el-table-column prop="date" label="状态" show-overflow-tooltip>
63 60
           <template slot-scope="scope">
64
-            <div :style="scope.row.status==0?'color: #FC3019':scope.row.status==5?'color: #A999EA':'color: #61D09D;'">{{ scope.row.status==0?'未支付':scope.row.status==5?'已取消':scope.row.status==1?'待使用':scope.row.status==2?'正在使用':scope.row.status==3?'已结算':'' }}</div>
61
+            <div
62
+              :style="
63
+                scope.row.status == 0
64
+                  ? 'color: #FC3019'
65
+                  : scope.row.status == 5
66
+                  ? 'color: #A999EA'
67
+                  : 'color: #61D09D;'
68
+              "
69
+            >
70
+              {{
71
+                scope.row.status == 0
72
+                  ? "未支付"
73
+                  : scope.row.status == 5
74
+                  ? "已取消"
75
+                  : scope.row.status == 1
76
+                  ? "待使用"
77
+                  : scope.row.status == 2
78
+                  ? "正在使用"
79
+                  : scope.row.status == 3
80
+                  ? "已结算"
81
+                  : ""
82
+              }}
83
+            </div>
65 84
           </template>
66 85
         </el-table-column>
67 86
       </el-table>
68 87
 
69 88
       <div class="pagin">
70
-        <el-pagination background
71
-                       layout="prev, pager, next"
72
-                       @size-change="handleSizeChange"
73
-                       @current-change="handleCurrentChange"
74
-                       :current-page.sync="currentPage1"
75
-                       :total="total"></el-pagination>
89
+        <el-pagination
90
+          background
91
+          layout="prev, pager, next"
92
+          @size-change="handleSizeChange"
93
+          @current-change="handleCurrentChange"
94
+          :current-page.sync="currentPage1"
95
+          :total="total"
96
+        ></el-pagination>
76 97
       </div>
77 98
     </div>
78 99
   </div>
@@ -83,7 +104,7 @@ import api from "../../server/home";
83 104
 
84 105
 export default {
85 106
   components: {},
86
-  data () {
107
+  data() {
87 108
     return {
88 109
       searchText: "",
89 110
       dates: "",
@@ -95,12 +116,12 @@ export default {
95 116
       couponList: [
96 117
         {
97 118
           value: "选项1",
98
-          label: "黄金糕"
119
+          label: "黄金糕",
99 120
         },
100 121
         {
101 122
           value: "选项2",
102
-          label: "双皮奶"
103
-        }
123
+          label: "双皮奶",
124
+        },
104 125
       ],
105 126
       tableData: [
106 127
         {
@@ -109,7 +130,7 @@ export default {
109 130
           headImg:
110 131
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
111 132
           phone: "13346783645",
112
-          status: "已完成"
133
+          status: "已完成",
113 134
         },
114 135
         {
115 136
           date: "2022.04.25  14:30",
@@ -117,11 +138,11 @@ export default {
117 138
           headImg:
118 139
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png",
119 140
           phone: "13346783645",
120
-          status: "已完成"
121
-        }
141
+          status: "已完成",
142
+        },
122 143
       ],
123 144
       currentPage1: 1,
124
-      multipleSelection: ""
145
+      multipleSelection: "",
125 146
     };
126 147
   },
127 148
   computed: {},
@@ -129,7 +150,7 @@ export default {
129 150
 
130 151
   methods: {
131 152
     // 获取订单列表
132
-    getOrderList () {
153
+    getOrderList() {
133 154
       let start_date = "",
134 155
         end_date = "";
135 156
       if (this.dates && this.dates.length > 0) {
@@ -143,38 +164,42 @@ export default {
143 164
         project_name: this.product,
144 165
         coupon_name: this.coupon,
145 166
         start_date: start_date,
146
-        end_date: end_date
167
+        end_date: end_date,
147 168
       };
148
-      api.getOrderList(params).then(res => {
169
+      api.getOrderList(params).then((res) => {
149 170
         if (res.code == 200) {
171
+          // 将用户手机号中间四位变成****
172
+          res.data.list.map((item) => {
173
+            item.mobile =
174
+              item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
175
+          });
150 176
           this.tableData = res.data.list;
151 177
           this.total = res.data.total;
152 178
         }
153 179
       });
154 180
     },
155 181
 
156
-    handleCurrentChange (e) {
182
+    handleCurrentChange(e) {
157 183
       this.currentPage1 = e;
158 184
       this.getOrderList();
159 185
     },
160 186
 
161
-    handleSizeChange (val) {
162
-    },
163
-    handleSelectionChange (row, column, event) {
187
+    handleSizeChange(val) {},
188
+    handleSelectionChange(row, column, event) {
164 189
       this.$router.push({
165 190
         path: "/historicalOrder/details",
166 191
         query: {
167
-          id: row.id
168
-        }
192
+          id: row.id,
193
+        },
169 194
       });
170
-    }
195
+    },
171 196
   },
172 197
 
173
-  created () {
198
+  created() {
174 199
     this.getOrderList();
175 200
   },
176 201
 
177
-  mounted () { }
202
+  mounted() {},
178 203
 };
179 204
 </script>
180 205
 

+ 64 - 52
src/pages/testSkin/index.vue

@@ -1,22 +1,21 @@
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="结束日期">
4
+      <el-date-picker
5
+        v-model="dates"
6
+        type="daterange"
7
+        range-separator="->"
8
+        start-placeholder="开始日期"
9
+        end-placeholder="结束日期"
10
+      >
9 11
       </el-date-picker>
10 12
 
11
-      <el-input placeholder="请输入内容"
12
-                class="search"
13
-                v-model="searchText">
14
-        <i slot="prefix"
15
-           class="el-input__icon el-icon-search"></i>
13
+      <el-input placeholder="请输入内容" class="search" v-model="searchText">
14
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
16 15
       </el-input>
17
-      <el-button type="primary"
18
-                 class="searchButton"
19
-                 @click="getSkinList">搜索</el-button>
16
+      <el-button type="primary" class="searchButton" @click="getSkinList"
17
+        >搜索</el-button
18
+      >
20 19
     </div>
21 20
     <div class="list">
22 21
       <div class="tab">
@@ -27,25 +26,32 @@
27 26
         <div class="head-status">状态</div>
28 27
       </div>
29 28
       <div class="content">
30
-        <div class="tab user-info"
31
-             v-for="(item,index) in userList"
32
-             :key="index"
33
-             @click="onDetails(item.id)">
34
-          <div class="head-img"><img :src="item.avatar_url"
35
-                 alt=""></div>
29
+        <div
30
+          class="tab user-info"
31
+          v-for="(item, index) in userList"
32
+          :key="index"
33
+          @click="onDetails(item.id)"
34
+        >
35
+          <div class="head-img"><img :src="item.avatar_url" alt="" /></div>
36 36
           <div class="head-name">{{ item.nickname }}</div>
37 37
           <div class="head-phone">{{ item.mobile }}</div>
38 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
+          <div
40
+            class="head-status"
41
+            :style="item.status == 1 ? 'color: #61D09D;' : 'color: #FC3019;'"
42
+          >
43
+            {{ item.status == 1 ? "已面诊" : "未面诊" }}
44
+          </div>
41 45
         </div>
42 46
       </div>
43 47
       <div class="pagin">
44
-        <el-pagination background
45
-                       layout="prev, pager, next"
46
-                       @current-change="handleCurrentChange"
47
-                       :current-page.sync="currentPage1"
48
-                       :total="total">
48
+        <el-pagination
49
+          background
50
+          layout="prev, pager, next"
51
+          @current-change="handleCurrentChange"
52
+          :current-page.sync="currentPage1"
53
+          :total="total"
54
+        >
49 55
         </el-pagination>
50 56
       </div>
51 57
     </div>
@@ -53,28 +59,29 @@
53 59
 </template>
54 60
 
55 61
 <script>
56
-import api from '../../server/home'
62
+import api from "../../server/home";
57 63
 export default {
58 64
   components: {},
59
-  data () {
65
+  data() {
60 66
     return {
61 67
       dates: [],
62
-      searchText: '',
68
+      searchText: "",
63 69
       userList: [],
64 70
       currentPage1: 1,
65 71
       limit: 10,
66 72
       total: 0,
67
-    }
73
+    };
68 74
   },
69 75
   computed: {},
70 76
   watch: {},
71 77
 
72 78
   methods: {
73
-    getSkinList () {
74
-      let start_date = '', end_date = ''
79
+    getSkinList() {
80
+      let start_date = "",
81
+        end_date = "";
75 82
       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')
83
+        start_date = utils.formatTime(this.dates[0], "yyyy-MM-dd");
84
+        end_date = utils.formatTime(this.dates[1], "yyyy-MM-dd");
78 85
       }
79 86
       let params = {
80 87
         page: this.currentPage1,
@@ -82,34 +89,39 @@ export default {
82 89
         keywords: this.searchText,
83 90
         start_date: start_date,
84 91
         end_date: end_date,
85
-      }
86
-      api.getSkinList(params).then(res => {
92
+      };
93
+      api.getSkinList(params).then((res) => {
87 94
         if (res.code == 200) {
88
-          this.userList = res.data.list
89
-          this.total = res.data.total
95
+          // 将用户手机号中间四位变成****
96
+          res.data.list.map((item) => {
97
+            item.mobile =
98
+              item.mobile.substring(0, 3) + "****" + item.mobile.substring(7);
99
+          });
100
+          this.userList = res.data.list;
101
+          this.total = res.data.total;
90 102
         }
91
-      })
103
+      });
92 104
     },
93
-    onDetails (e) {
105
+    onDetails(e) {
94 106
       this.$router.push({
95
-        path: '/testSkin/details',
107
+        path: "/testSkin/details",
96 108
         query: {
97
-          id: e
98
-        }
99
-      })
109
+          id: e,
110
+        },
111
+      });
112
+    },
113
+    handleCurrentChange(e) {
114
+      this.currentPage1 = e;
115
+      this.getSkinList();
100 116
     },
101
-    handleCurrentChange (e) {
102
-      this.currentPage1 = e
103
-      this.getSkinList()
104
-    }
105 117
   },
106 118
 
107
-  created () {
108
-    this.getSkinList()
119
+  created() {
120
+    this.getSkinList();
109 121
   },
110 122
 
111
-  mounted () { }
112
-}
123
+  mounted() {},
124
+};
113 125
 </script>
114 126
 
115 127
 <style lang='less' scoped>

+ 2 - 2
vue.config.js

@@ -21,9 +21,9 @@ module.exports = {
21 21
 
22 22
   // 它支持webPack-dev-server的所有选项
23 23
   devServer: {
24
-    host: "0.0.0.0",
24
+    host: "0.0.0.0",//ip本地
25 25
     port: 8083, // 端口号
26
-    https: false, // https:{type:Boolean}
26
+    https: false, // https:{type:Boolean}配置前缀
27 27
     open: false, //配置自动启动浏览器
28 28
     proxy: '' // 配置跨域处理
29 29
   },