Ver código fonte

跳转优化&7修复优惠券到期时间

yuhao 2 anos atrás
pai
commit
a5cffd52fb

+ 1 - 1
src/App.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div id="app">
3 3
     <keep-alive>
4
-      <router-view v-if="$route.meta.keepAlive"></router-view>
4
+      <router-view v-if="$route.meta.keepAlive" :key="$route.fullpath"></router-view>
5 5
     </keep-alive>
6 6
     <router-view v-if="!$route.meta.keepAlive"></router-view>
7 7
   </div>

+ 19 - 19
src/components/common/layout/layout.vue

@@ -162,7 +162,10 @@
162 162
               >
163 163
                 <div class="content" v-html="item.msg"></div>
164 164
                 <!-- 是否已读0未读 1已读 -->
165
-                <div class="time">{{ item.create_time }} <div v-if="item.is_read==0" class="icon"></div> </div>
165
+                <div class="time">
166
+                  {{ item.create_time }}
167
+                  <div v-if="item.is_read == 0" class="icon"></div>
168
+                </div>
166 169
               </div>
167 170
             </van-list>
168 171
           </el-tab-pane>
@@ -291,10 +294,10 @@ import api from "@/server/home";
291 294
 export default {
292 295
   data() {
293 296
     return {
297
+      isback:false,
294 298
       isFold: false, //导航菜单面板是否折叠
295 299
       userId: 0,
296 300
       menuIndex: 0,
297
-      isback: false,
298 301
       userInfo: {
299 302
         name: "333",
300 303
       },
@@ -326,7 +329,7 @@ export default {
326 329
       successUnread: true,
327 330
       cancelUnread: true,
328 331
       allUnread: true,
329
-      cosmetMessageShow:false,//消息弹窗开关
332
+      cosmetMessageShow: false, //消息弹窗开关
330 333
       activeName: "first", //默认选中消息模块
331 334
       cosmetMessageList: [], //后台发送美容师的消息列表
332 335
       cosmetMessageLoading: false, //后台发送美容师的消息加载
@@ -381,13 +384,10 @@ export default {
381 384
       await this.queryHasUnreadMessage();
382 385
     }, 20000);
383 386
   },
384
-  mounted() {
385
-    if (
386
-      this.$route.path == "/payUser/details" ||
387
-      this.$route.path == "/testSkin/details"
388
-    ) {
389
-      this.isback = true;
390
-    }
387
+  mounted () {
388
+      if(this.$route.path=='/payUser/details'||this.$route.path=='/testSkin/details'||this.$route.path=='/customerMan/details'){
389
+        this.isback=true
390
+      }
391 391
   },
392 392
   beforeDestroy() {
393 393
     // 关闭WebSocket连接并清除定时器
@@ -405,7 +405,7 @@ export default {
405 405
     onAppMessage() {
406 406
       this.msgPanelList = [];
407 407
       this.mainPanelMessagePage = 1;
408
-      this.cosmetMessagePage=1
408
+      this.cosmetMessagePage = 1;
409 409
       this.mainPanelMsgListLoading = false;
410 410
       this.mainPanelMsgListFinished = false;
411 411
       this.getMainPanelMessageList(1);
@@ -531,12 +531,12 @@ export default {
531 531
     // 切换消息标题获取消息列表
532 532
     handleClick(tab) {
533 533
       if (tab.name == "second") {
534
-        this.cosmetMessageList = []
535
-        this.cosmetMessagePage=1
534
+        this.cosmetMessageList = [];
535
+        this.cosmetMessagePage = 1;
536 536
         this.getCosmetMessageList();
537 537
       } else {
538
-        this.msgPanelList = []
539
-        this.cosmetMessagePage=1
538
+        this.msgPanelList = [];
539
+        this.cosmetMessagePage = 1;
540 540
         this.getMainPanelMessageList();
541 541
       }
542 542
     },
@@ -555,7 +555,7 @@ export default {
555 555
           if (this.cosmetMessagePage == 1) {
556 556
             list = [];
557 557
           }
558
-          list = [...list,...res.data.list];
558
+          list = [...list, ...res.data.list];
559 559
           this.cosmetMessageList = list;
560 560
           ++this.cosmetMessagePage;
561 561
           this.cosmetMessageLoading = false;
@@ -609,7 +609,7 @@ export default {
609 609
     backMsgPanel() {
610 610
       this.msgSuccessDetailPupopVisible = false;
611 611
       this.msgCancelDetailPupopVisible = false;
612
-      this.mainPanelMessagePage=1
612
+      this.mainPanelMessagePage = 1;
613 613
       this.getMainPanelMessageList();
614 614
       // this.msgPupopVisible = true;
615 615
       this.cosmetMessageShow = true;
@@ -1013,7 +1013,7 @@ export default {
1013 1013
     align-items: center;
1014 1014
     color: #999999;
1015 1015
     position: absolute;
1016
-    top: 10px;
1016
+    top: 20px;
1017 1017
     right: 300px;
1018 1018
     z-index: 999;
1019 1019
     img {
@@ -1105,7 +1105,7 @@ export default {
1105 1105
         display: flex;
1106 1106
         align-items: center;
1107 1107
         justify-content: flex-end;
1108
-        .icon{
1108
+        .icon {
1109 1109
           width: 6px;
1110 1110
           height: 6px;
1111 1111
           background-color: #e54635;

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

@@ -88,7 +88,6 @@ export default {
88 88
         {
89 89
           name: "订单中心",
90 90
           path: "/orderCenter",
91
-          // /orderCenter
92 91
           unicon:
93 92
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhistory.png",
94 93
           icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/history.png",
@@ -122,7 +121,7 @@ export default {
122 121
         },
123 122
         {
124 123
           name: "店铺排班",
125
-          path: "/scheduling/details",
124
+          path: "/schedulingDetail",
126 125
           unicon:
127 126
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png",
128 127
           icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png",
@@ -133,9 +132,9 @@ export default {
133 132
   },
134 133
   watch: {
135 134
     $route(to, from) {
136
-      console.log(to, "tootototo");
135
+      // console.log(to, "tootototo");
137 136
       let patname = `/${to.path.split("/")[1]}`;
138
-      console.log(window.location, "window.location.pathname", to);
137
+      // console.log(window.location, "window.location.pathname", to);
139 138
       this.$emit("changeIsBack", to.meta.isback);
140 139
       this.menu.forEach((item, index) => {
141 140
         if (patname == item.path) {
@@ -151,7 +150,7 @@ export default {
151 150
   },
152 151
   mounted() {
153 152
     let patname = `/${window.location.hash.substr(1).split("/")[1]}`;
154
-    console.log(window.location, "window.location.pathname", patname);
153
+    // console.log(window.location, "window.location.pathname", patname);
155 154
     this.menu.forEach((item, index) => {
156 155
       if (patname == item.path) {
157 156
         this.nowIndex = index;

+ 10 - 2
src/pages/cardOrder/index.vue

@@ -27,7 +27,7 @@
27 27
       >
28 28
         <el-table-column label="头像" width="120">
29 29
           <template slot-scope="scope">
30
-            <div class="head-img">
30
+            <div @click.stop="goUserDetail(scope.row)" class="head-img">
31 31
               <img :src="scope.row.avatar_url" alt />
32 32
             </div>
33 33
           </template>
@@ -187,6 +187,15 @@ export default {
187 187
   watch: {},
188 188
 
189 189
   methods: {
190
+    // 跳入用户详情
191
+    goUserDetail(e) {
192
+      this.$router.push({
193
+        path: "/customerMan/details",
194
+        query: {
195
+          id: e.user_id,
196
+        },
197
+      });
198
+    },
190 199
     // 分配美容师
191 200
     selectType(type, index) {
192 201
       // 给表单添加美容师
@@ -256,7 +265,6 @@ export default {
256 265
       api.getStaffList().then((res) => {
257 266
         if (res.code == 200) {
258 267
           this.nameList = res.data;
259
-          console.log(res);
260 268
         }
261 269
       });
262 270
     },

+ 0 - 2
src/pages/coupon/index.vue

@@ -112,7 +112,6 @@ export default {
112 112
   methods: {
113 113
     // 发券中心点击用户跳转到用户详情
114 114
     goDetail(row, column, event) {
115
-      console.log(1);
116 115
       this.$router.push({
117 116
         path: "/customerMan/details",
118 117
         query: {
@@ -176,7 +175,6 @@ export default {
176 175
       api.getCouponInfo(params).then((res) => {
177 176
         if (res.code == 200) {
178 177
           this.couponList = res.data.list;
179
-          console.log(res.data.list);
180 178
         }
181 179
       });
182 180
     },

+ 1 - 1
src/pages/customerMan/myOrder/index.vue

@@ -247,7 +247,7 @@ type: "全额券" -->
247 247
                 show-overflow-tooltip
248 248
               ></el-table-column>
249 249
               <el-table-column
250
-                prop="create_time"
250
+                prop="ex_time"
251 251
                 label="到期时间"
252 252
                 width="180"
253 253
                 show-overflow-tooltip

+ 7 - 2
src/pages/historicalOrder/index.vue

@@ -44,7 +44,12 @@
44 44
         <el-table-column
45 45
           prop="user_id"
46 46
           label="用户ID"
47
-          width="120"
47
+          width="80"
48
+        ></el-table-column>
49
+        <el-table-column
50
+          prop="real_name"
51
+          label="真实姓名"
52
+          width="100"
48 53
         ></el-table-column>
49 54
         <el-table-column
50 55
           prop="nickname"
@@ -189,7 +194,7 @@ export default {
189 194
   watch: {},
190 195
 
191 196
   methods: {
192
-        // 跳入用户详情
197
+    // 跳入用户详情
193 198
     goUserDetail(e) {
194 199
       console.log(e);
195 200
       this.$router.push({

+ 4 - 4
src/pages/orderCenter/orderCenter.vue

@@ -1,27 +1,27 @@
1 1
 <template>
2 2
   <div class="box">
3
-    <div class="orderForm" @click="$router.push('/historicalOrder')">
3
+    <div class="orderForm" @click="$router.push('/orderCenter/historicalOrder')">
4 4
       <img
5 5
         src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E7%BE%8E%E5%A6%86%E4%BA%A7%E5%93%81%402x%281%29.png"
6 6
         alt=""
7 7
       />
8 8
       <div class="title">订单项目</div>
9 9
     </div>
10
-        <div class="orderForm" @click="$router.push('/cardOrder')">
10
+        <div class="orderForm" @click="$router.push('/orderCenter/cardOrder')">
11 11
       <img
12 12
         src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E5%8D%A1%402x.png"
13 13
         alt=""
14 14
       />
15 15
       <div class="title">次卡订单</div>
16 16
     </div>
17
-        <div class="orderForm" @click="$router.push('/productOrder')">
17
+        <div class="orderForm" @click="$router.push('/orderCenter/productOrder')">
18 18
       <img
19 19
         src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E7%BE%8E%E5%A6%86%E4%BA%A7%E5%93%81%402x.png"
20 20
         alt=""
21 21
       />
22 22
       <div class="title">美妆产品订单</div>
23 23
     </div>
24
-        <div class="orderForm" @click="$router.push('/rechargeOrder')">
24
+        <div class="orderForm" @click="$router.push('/orderCenter/rechargeOrder')">
25 25
       <img
26 26
         src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E5%85%85%E5%80%BC%20%281%29%402x.png"
27 27
         alt=""

+ 2 - 2
src/pages/payUser/details/index.vue

@@ -430,7 +430,6 @@ export default {
430 430
     },
431 431
     getPadUserInfo() {
432 432
       api.getPadUserInfo({ id: this.id }).then((res) => {
433
-        console.log(res, "aaaaaaaa");
434 433
         // 将用户手机号中间四位变成****
435 434
         res.data.user.mobile =
436 435
           res.data.user.mobile.substring(0, 3) +
@@ -510,7 +509,7 @@ export default {
510 509
         activeName = "five";
511 510
       }
512 511
       this.$router.push({
513
-        path: "/customerMan/projectOrder",
512
+        path: "/payUser/Order",
514 513
         query: {
515 514
           id: this.id,
516 515
           activeName: activeName,
@@ -523,6 +522,7 @@ export default {
523 522
         path: "/testSkin/details",
524 523
         query: {
525 524
           id: this.userInfo.analysis_id,
525
+          isback:true
526 526
         },
527 527
       });
528 528
     },

+ 0 - 1
src/pages/payUser/index.vue

@@ -194,7 +194,6 @@ export default {
194 194
           });
195 195
           this.tableData = res.data.list;
196 196
           this.total = res.data.total;
197
-          console.log(this.tableData);
198 197
         }
199 198
       });
200 199
     },

+ 0 - 2
src/pages/payUser/myOrder/index.vue

@@ -580,7 +580,6 @@ export default {
580 580
       };
581 581
       let resp = await api.getCardList(params);
582 582
       if (resp.code === 200) {
583
-        console.log(resp, "asdasdasd");
584 583
         this.cardListData = resp.data.list;
585 584
         this.total = resp.data.total;
586 585
       }
@@ -594,7 +593,6 @@ export default {
594 593
       };
595 594
       let resp = await api.getBalanceRecord(params);
596 595
       if (resp.code === 200) {
597
-        console.log(resp, "asdasdasd");
598 596
         this.balanceListData = resp.data.list;
599 597
         this.total = resp.data.count;
600 598
       }

+ 6 - 5
src/pages/rechargeOrder/index.vue

@@ -100,11 +100,12 @@
100 100
           prop=""
101 101
           label="分配"
102 102
           show-overflow-tooltip
103
-          v-if='level==10'
103
+          v-if="level == 10"
104 104
         >
105 105
           <template slot-scope="scope">
106 106
             <el-dropdown
107
-              @command="(command) => selectType(command, scope.$index)" trigger='click'
107
+              @command="(command) => selectType(command, scope.$index)"
108
+              trigger="click"
108 109
             >
109 110
               <el-button @click.stop type="primary" class="amend" size="mini">
110 111
                 分配
@@ -149,7 +150,7 @@ export default {
149 150
       total: 0,
150 151
       product: "",
151 152
       coupon: "",
152
-      level:'', //等级权限
153
+      level: "", //等级权限
153 154
       couponList: [
154 155
         {
155 156
           value: "选项1",
@@ -187,11 +188,11 @@ export default {
187 188
   watch: {},
188 189
 
189 190
   methods: {
190
-            // 跳入用户详情
191
+    // 跳入用户详情
191 192
     goUserDetail(e) {
192 193
       console.log(e);
193 194
       this.$router.push({
194
-        path: "/customerMan/details",
195
+        path: "/payUser/Details",
195 196
         query: {
196 197
           id: e.user_id,
197 198
         },

+ 13 - 8
src/router/map/home.js

@@ -89,14 +89,22 @@ export default {
89 89
   },
90 90
   {
91 91
     path: '/payUser/Details',
92
+    meta: {
93
+      isback: true,
94
+      keepAlive: true
95
+    },
92 96
     component: payUserDetails,
93 97
   },
94 98
   {
95 99
     path: '/payUser/Order',
100
+    meta: {
101
+      isback: true,
102
+      keepAlive: true
103
+    },
96 104
     component: payUserOrder,
97 105
   },
98 106
   {
99
-    path: '/historicalOrder',
107
+    path: '/orderCenter/historicalOrder',
100 108
     meta: {
101 109
       isback: true,
102 110
     },
@@ -141,18 +149,15 @@ export default {
141 149
     component: scheduling,
142 150
   },
143 151
   {
144
-    path: '/scheduling/details',
152
+    path: '/schedulingDetail',
145 153
     component: schedulingDetails,
146
-    meta: {
147
-      isback: true,
148
-    },
149 154
   },
150 155
   {
151 156
     path: '/orderCenter',
152 157
     component: orderCenter
153 158
   },
154 159
   {
155
-    path: '/productOrder',
160
+    path: '/orderCenter/productOrder',
156 161
     component: productOrder,
157 162
     meta: {
158 163
       isback: true,
@@ -166,7 +171,7 @@ export default {
166 171
     },
167 172
   },
168 173
   {
169
-    path: '/cardOrder',
174
+    path: '/orderCenter/cardOrder',
170 175
     component: cardOrder,
171 176
     meta: {
172 177
       isback: true,
@@ -180,7 +185,7 @@ export default {
180 185
     },
181 186
   },
182 187
   {
183
-    path: '/rechargeOrder',
188
+    path: '/orderCenter/rechargeOrder',
184 189
     component: rechargeOrder,
185 190
     meta: {
186 191
       isback: true,

+ 4 - 4
vue.config.js

@@ -4,11 +4,11 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4 4
 
5 5
 module.exports = {
6 6
   // 测试
7
-  publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/test_pad/dist' :
8
-    process.env.env_config === 'test' ? '/vapps/calory/' : '/dist/',
9
-  // 正式
10
-  // publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/dist' :
7
+  // publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/test_pad/dist' :
11 8
   //   process.env.env_config === 'test' ? '/vapps/calory/' : '/dist/',
9
+  // 正式
10
+  publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/dist' :
11
+    process.env.env_config === 'test' ? '/vapps/calory/' : '/dist/',
12 12
   // 设置跨域
13 13
   crossorigin: 'anonymous',
14 14
   /**