浏览代码

feat: 更改优惠券逻辑

黎海 2 年之前
父节点
当前提交
ecee641e6a
共有 4 个文件被更改,包括 410 次插入190 次删除
  1. 151 133
      src/components/common/layout/layout.vue
  2. 54 6
      src/pages/confirmOrder/addOrder/index.vue
  3. 184 34
      src/pages/confirmOrder/details/index.vue
  4. 21 17
      vue.config.js

+ 151 - 133
src/components/common/layout/layout.vue

@@ -22,8 +22,10 @@
22
           {{$route.name}}
22
           {{$route.name}}
23
         </div>
23
         </div>
24
         <div class="right">
24
         <div class="right">
25
-          <div @click="onAppMessage" class="news">
26
-            <span class="dot" v-show="hasUnreadMessage"></span>
25
+          <div @click="onAppMessage"
26
+               class="news">
27
+            <span class="dot"
28
+                  v-show="hasUnreadMessage"></span>
27
             <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/news.png" />
29
             <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/news.png" />
28
           </div>
30
           </div>
29
           <div class="head-img"><img :src="userInfo.avatar_url"></div>
31
           <div class="head-img"><img :src="userInfo.avatar_url"></div>
@@ -46,93 +48,102 @@
46
     </div>
48
     </div>
47
     <minePupop :show="msgPupopVisible">
49
     <minePupop :show="msgPupopVisible">
48
       <div class="block">
50
       <div class="block">
49
-          <div class="title">
50
-            <div @click="clearUnreadMsgsByType(0)" class="clear">
51
-              <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/clearMsg.png" alt="">
52
-              <div class="">清除未读</div>
53
-            </div>
54
-            <div class="txt">消息</div>
55
-            <div class="delete-pupop" @click="closeMsgPanel">
56
-              <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png" alt />
57
-            </div>
51
+        <div class="title">
52
+          <div @click="clearUnreadMsgsByType(0)"
53
+               class="clear">
54
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/clearMsg.png"
55
+                 alt="">
56
+            <div class="">清除未读</div>
58
           </div>
57
           </div>
59
-          <div class="msg-con">
60
-            <van-list 
61
-              v-model="mainPanelMsgListLoading"
62
-              :finished="mainPanelMsgListFinished"
63
-              finished-text="没有更多了"
64
-              @load="getMainPanelMessageList"
65
-              :immediate-check="false"
66
-            >
67
-              <div class="order-msg">
68
-                <div class="success">
69
-                  <div class="flex justify-between" @click="toMsgDetail(1)">
70
-                    <div class="desc flex items-center">
71
-                      <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png" alt="" />
72
-                      <div class="title">预约成功信息</div>
73
-                    </div>
74
-                    <div class="count flex flex-column justify-center items-center">
75
-                      <!-- <div class="time">10:23</div> -->
76
-                      <div class="num" v-if="orderSuccessUnreadNum">{{orderSuccessUnreadNum}}</div>
77
-                    </div>
58
+          <div class="txt">消息</div>
59
+          <div class="delete-pupop"
60
+               @click="closeMsgPanel">
61
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
62
+                 alt />
63
+          </div>
64
+        </div>
65
+        <div class="msg-con">
66
+          <van-list v-model="mainPanelMsgListLoading"
67
+                    :finished="mainPanelMsgListFinished"
68
+                    finished-text="没有更多了"
69
+                    @load="getMainPanelMessageList"
70
+                    :immediate-check="false">
71
+            <div class="order-msg">
72
+              <div class="success">
73
+                <div class="flex justify-between"
74
+                     @click="toMsgDetail(1)">
75
+                  <div class="desc flex items-center">
76
+                    <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
77
+                         alt="" />
78
+                    <div class="title">预约成功信息</div>
78
                   </div>
79
                   </div>
79
-                </div>
80
-                <div class="cancel">
81
-                  <div class="flex justify-between" @click="toMsgDetail(2)">
82
-                    <div class="desc flex items-center">
83
-                      <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/cancelOrder.png" alt="" />
84
-                      <div class="title">预约取消信息</div>
85
-                    </div>
86
-                    <div class="count flex flex-column justify-center items-center">
87
-                      <!-- <div class="time">10:23</div> -->
88
-                      <div class="num" v-if="orderCancelUnreadNum">{{orderCancelUnreadNum}}</div>
89
-                    </div>
80
+                  <div class="count flex flex-column justify-center items-center">
81
+                    <!-- <div class="time">10:23</div> -->
82
+                    <div class="num"
83
+                         v-if="orderSuccessUnreadNum">{{orderSuccessUnreadNum}}</div>
90
                   </div>
84
                   </div>
91
                 </div>
85
                 </div>
92
               </div>
86
               </div>
93
-              <div class="ready-msg flex justify-between items-center" 
94
-                v-for="(item, index) in msgPanelList" 
95
-                :key="index"
96
-                @click="readMsgToOrderDetails(item)"
97
-              >
98
-                <div class="content-bar flex flex-column">
99
-                  <div class="desc-info">{{item.project_name}}</div>
100
-                  <div class="desc-time">{{`${item.device_name} (${item.room}) 还有${item.minute}分钟开始` | ellipsis(80)}}</div>
101
-                </div>
102
-                <div class="count flex flex-column items-center">
103
-                  <div class="time">{{item.create_time}}</div>
104
-                  <div class="dot" v-if="!item.is_read && allUnread"></div>
87
+              <div class="cancel">
88
+                <div class="flex justify-between"
89
+                     @click="toMsgDetail(2)">
90
+                  <div class="desc flex items-center">
91
+                    <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/cancelOrder.png"
92
+                         alt="" />
93
+                    <div class="title">预约取消信息</div>
94
+                  </div>
95
+                  <div class="count flex flex-column justify-center items-center">
96
+                    <!-- <div class="time">10:23</div> -->
97
+                    <div class="num"
98
+                         v-if="orderCancelUnreadNum">{{orderCancelUnreadNum}}</div>
99
+                  </div>
105
                 </div>
100
                 </div>
106
               </div>
101
               </div>
107
-            </van-list>
108
-          </div>
102
+            </div>
103
+            <div class="ready-msg flex justify-between items-center"
104
+                 v-for="(item, index) in msgPanelList"
105
+                 :key="index"
106
+                 @click="readMsgToOrderDetails(item)">
107
+              <div class="content-bar flex flex-column">
108
+                <div class="desc-info">{{item.project_name}}</div>
109
+                <div class="desc-time">{{`${item.device_name} (${item.room}) 还有${item.minute}分钟开始` | ellipsis(80)}}</div>
110
+              </div>
111
+              <div class="count flex flex-column items-center">
112
+                <div class="time">{{item.create_time}}</div>
113
+                <div class="dot"
114
+                     v-if="!item.is_read && allUnread"></div>
115
+              </div>
116
+            </div>
117
+          </van-list>
118
+        </div>
109
       </div>
119
       </div>
110
     </minePupop>
120
     </minePupop>
111
     <minePupop :show="msgSuccessDetailPupopVisible">
121
     <minePupop :show="msgSuccessDetailPupopVisible">
112
       <div class="block detail">
122
       <div class="block detail">
113
         <div class="title">
123
         <div class="title">
114
-          <div @click="backMsgPanel" class="back flex items-center">
115
-            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/back.png" alt="" />
124
+          <div @click="backMsgPanel"
125
+               class="back flex items-center">
126
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/back.png"
127
+                 alt="" />
116
           </div>
128
           </div>
117
           <div class="txt">消息</div>
129
           <div class="txt">消息</div>
118
-          <div class="delete-msg flex items-center" @click="clearUnreadMsgsByType(1)">
119
-            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/clearMsg.png" alt />
130
+          <div class="delete-msg flex items-center"
131
+               @click="clearUnreadMsgsByType(1)">
132
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/clearMsg.png"
133
+                 alt />
120
             <div class="">清除未读</div>
134
             <div class="">清除未读</div>
121
           </div>
135
           </div>
122
         </div>
136
         </div>
123
         <div class="detail-msg-con">
137
         <div class="detail-msg-con">
124
-          <van-list 
125
-            v-model="detailSuccessMsgListLoading"
126
-            :finished="detailSuccessMsgListFinished"
127
-            finished-text="没有更多了"
128
-            @load="getMessageByType(orderMsgType)"
129
-            :immediate-check="false"
130
-          >
131
-            <div class="msg-bar flex justify-between items-center" 
132
-              v-for="(item, index) in msgSuccessDetailList" 
133
-              :key="index"
134
-              @click="readMsgToOrderDetails(item)"
135
-            >
138
+          <van-list v-model="detailSuccessMsgListLoading"
139
+                    :finished="detailSuccessMsgListFinished"
140
+                    finished-text="没有更多了"
141
+                    @load="getMessageByType(orderMsgType)"
142
+                    :immediate-check="false">
143
+            <div class="msg-bar flex justify-between items-center"
144
+                 v-for="(item, index) in msgSuccessDetailList"
145
+                 :key="index"
146
+                 @click="readMsgToOrderDetails(item)">
136
               <div class="info flex">
147
               <div class="info flex">
137
                 <div class="name">{{item.nickname}}</div>
148
                 <div class="name">{{item.nickname}}</div>
138
                 <div class="project">成功预约{{item.order_time}}</div>
149
                 <div class="project">成功预约{{item.order_time}}</div>
@@ -140,7 +151,8 @@
140
               </div>
151
               </div>
141
               <div class="flex flex-column items-center">
152
               <div class="flex flex-column items-center">
142
                 <div class="time">{{item.create_time}}</div>
153
                 <div class="time">{{item.create_time}}</div>
143
-                <div class="dot" v-if="!item.is_read && successUnread"></div>
154
+                <div class="dot"
155
+                     v-if="!item.is_read && successUnread"></div>
144
               </div>
156
               </div>
145
             </div>
157
             </div>
146
           </van-list>
158
           </van-list>
@@ -150,28 +162,29 @@
150
     <minePupop :show="msgCancelDetailPupopVisible">
162
     <minePupop :show="msgCancelDetailPupopVisible">
151
       <div class="block detail">
163
       <div class="block detail">
152
         <div class="title">
164
         <div class="title">
153
-          <div @click="backMsgPanel" class="back flex items-center">
154
-            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/back.png" alt="" />
165
+          <div @click="backMsgPanel"
166
+               class="back flex items-center">
167
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/back.png"
168
+                 alt="" />
155
           </div>
169
           </div>
156
           <div class="txt">消息</div>
170
           <div class="txt">消息</div>
157
-          <div class="delete-msg flex items-center" @click="clearUnreadMsgsByType(2)">
158
-            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/clearMsg.png" alt />
171
+          <div class="delete-msg flex items-center"
172
+               @click="clearUnreadMsgsByType(2)">
173
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/clearMsg.png"
174
+                 alt />
159
             <div class="">清除未读</div>
175
             <div class="">清除未读</div>
160
           </div>
176
           </div>
161
         </div>
177
         </div>
162
         <div class="detail-msg-con">
178
         <div class="detail-msg-con">
163
-          <van-list 
164
-            v-model="detailCancelMsgListLoading"
165
-            :finished="detailCancelMsgListFinished"
166
-            finished-text="没有更多了"
167
-            @load="getMessageByType(orderMsgType)"
168
-            :immediate-check="false"
169
-          >
179
+          <van-list v-model="detailCancelMsgListLoading"
180
+                    :finished="detailCancelMsgListFinished"
181
+                    finished-text="没有更多了"
182
+                    @load="getMessageByType(orderMsgType)"
183
+                    :immediate-check="false">
170
             <div class="msg-bar flex justify-between items-center"
184
             <div class="msg-bar flex justify-between items-center"
171
-              v-for="(item, index) in msgCancelDetailList"
172
-              :key="index"
173
-              @click="readMsgToOrderDetails(item)"
174
-            >
185
+                 v-for="(item, index) in msgCancelDetailList"
186
+                 :key="index"
187
+                 @click="readMsgToOrderDetails(item)">
175
               <div class="info flex">
188
               <div class="info flex">
176
                 <div class="name">{{item.nickname}}</div>
189
                 <div class="name">{{item.nickname}}</div>
177
                 <div class="project">取消预约{{item.order_time}}</div>
190
                 <div class="project">取消预约{{item.order_time}}</div>
@@ -179,20 +192,27 @@
179
               </div>
192
               </div>
180
               <div class="flex flex-column items-center">
193
               <div class="flex flex-column items-center">
181
                 <div class="time">{{item.create_time}}</div>
194
                 <div class="time">{{item.create_time}}</div>
182
-                <div class="dot" v-if="!item.is_read"></div>
195
+                <div class="dot"
196
+                     v-if="!item.is_read"></div>
183
               </div>
197
               </div>
184
             </div>
198
             </div>
185
           </van-list>
199
           </van-list>
186
         </div>
200
         </div>
187
       </div>
201
       </div>
188
     </minePupop>
202
     </minePupop>
189
-    <audio ref="orderSuccessMp3" id="orderSuccessMp3" muted>
203
+    <audio ref="orderSuccessMp3"
204
+           id="orderSuccessMp3"
205
+           muted>
190
       <source src="@/assets/audio/order_success.mp3" />
206
       <source src="@/assets/audio/order_success.mp3" />
191
     </audio>
207
     </audio>
192
-    <audio ref="orderReadyMp3_15" id="orderReadyMp3_15" muted>
208
+    <audio ref="orderReadyMp3_15"
209
+           id="orderReadyMp3_15"
210
+           muted>
193
       <source src="@/assets/audio/order_ready_15.mp3" />
211
       <source src="@/assets/audio/order_ready_15.mp3" />
194
     </audio>
212
     </audio>
195
-    <audio ref="orderReadyMp3_5" id="orderReadyMp3_5" muted>
213
+    <audio ref="orderReadyMp3_5"
214
+           id="orderReadyMp3_5"
215
+           muted>
196
       <source src="@/assets/audio/order_ready_5.mp3" />
216
       <source src="@/assets/audio/order_ready_5.mp3" />
197
     </audio>
217
     </audio>
198
   </div>
218
   </div>
@@ -249,7 +269,6 @@ export default {
249
   },
269
   },
250
   async created () {
270
   async created () {
251
     this.getUserInfo()
271
     this.getUserInfo()
252
-
253
     console.log('开始连接...')
272
     console.log('开始连接...')
254
     let token = this.$store.state.comVal.token || localStorage.getItem('token')
273
     let token = this.$store.state.comVal.token || localStorage.getItem('token')
255
     //申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
274
     //申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
@@ -258,12 +277,12 @@ export default {
258
       //当WebSocket创建成功时,触发onopen事件
277
       //当WebSocket创建成功时,触发onopen事件
259
       console.log("连接成功");
278
       console.log("连接成功");
260
       this.timer = setInterval(() => {
279
       this.timer = setInterval(() => {
261
-        this.wsInstance.send(JSON.stringify({type:'ping'}));
280
+        this.wsInstance.send(JSON.stringify({ type: 'ping' }));
262
       }, 30000);
281
       }, 30000);
263
     }
282
     }
264
     this.wsInstance.onmessage = (e) => {
283
     this.wsInstance.onmessage = (e) => {
265
       //当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
284
       //当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
266
-      console.log('收到消息',e.data)
285
+      console.log('收到消息', e.data)
267
       let data = JSON.parse(e.data);
286
       let data = JSON.parse(e.data);
268
       if (data.data.type === 'order_success') {
287
       if (data.data.type === 'order_success') {
269
         console.log('预约成功信息播报')
288
         console.log('预约成功信息播报')
@@ -289,11 +308,11 @@ export default {
289
     }
308
     }
290
 
309
 
291
     await this.queryHasUnreadMessage()
310
     await this.queryHasUnreadMessage()
292
-    this.timer1 = setInterval(async() => {
311
+    this.timer1 = setInterval(async () => {
293
       await this.queryHasUnreadMessage()
312
       await this.queryHasUnreadMessage()
294
     }, 20000)
313
     }, 20000)
295
   },
314
   },
296
-  mounted () {},
315
+  mounted () { },
297
   beforeDestroy () {
316
   beforeDestroy () {
298
     // 关闭WebSocket连接并清除定时器
317
     // 关闭WebSocket连接并清除定时器
299
     this.wsInstance.close()
318
     this.wsInstance.close()
@@ -330,7 +349,7 @@ export default {
330
       this.wsInstance.close()
349
       this.wsInstance.close()
331
       clearInterval(this.timer)
350
       clearInterval(this.timer)
332
       clearInterval(this.timer1)
351
       clearInterval(this.timer1)
333
-      
352
+
334
       this.$router.replace('/login')
353
       this.$router.replace('/login')
335
     },
354
     },
336
     changeMenu (index) {
355
     changeMenu (index) {
@@ -345,28 +364,28 @@ export default {
345
     async queryHasUnreadMessage () {
364
     async queryHasUnreadMessage () {
346
       let resp = await api.hasUnreadMessage()
365
       let resp = await api.hasUnreadMessage()
347
       if (resp.code === 200) {
366
       if (resp.code === 200) {
348
-        this.hasUnreadMessage =  resp.data ? true : false
367
+        this.hasUnreadMessage = resp.data ? true : false
349
       }
368
       }
350
     },
369
     },
351
     async getMainPanelMessageList (page = this.mainPanelMessagePage) {
370
     async getMainPanelMessageList (page = this.mainPanelMessagePage) {
352
       // setTimeout(async() => {
371
       // setTimeout(async() => {
353
-        let resp = await api.getMessageList({ page: page, limit: this.mainPanelMessageLimit })
354
-        if (resp.code = 200) {
355
-          this.orderSuccessUnreadNum = resp.data.reserved
356
-          this.orderCancelUnreadNum = resp.data.cancel
372
+      let resp = await api.getMessageList({ page: page, limit: this.mainPanelMessageLimit })
373
+      if (resp.code = 200) {
374
+        this.orderSuccessUnreadNum = resp.data.reserved
375
+        this.orderCancelUnreadNum = resp.data.cancel
357
 
376
 
358
-          if (this.mainPanelMessagePage === 1) {
359
-            this.msgPanelList = resp.data.list
360
-          } else {
361
-            this.msgPanelList = [...this.msgPanelList, ...resp.data.list]
362
-          }
377
+        if (this.mainPanelMessagePage === 1) {
378
+          this.msgPanelList = resp.data.list
379
+        } else {
380
+          this.msgPanelList = [...this.msgPanelList, ...resp.data.list]
381
+        }
363
 
382
 
364
-          this.mainPanelMessagePage++
365
-          this.mainPanelMsgListLoading = false;
366
-          if (this.msgPanelList.length >= resp.data.total) {
367
-            this.mainPanelMsgListFinished = true;
368
-          }
383
+        this.mainPanelMessagePage++
384
+        this.mainPanelMsgListLoading = false;
385
+        if (this.msgPanelList.length >= resp.data.total) {
386
+          this.mainPanelMsgListFinished = true;
369
         }
387
         }
388
+      }
370
       // }, 1000);
389
       // }, 1000);
371
     },
390
     },
372
     async getMessageByType (type, page = this.detailSuccessMessagePage) {
391
     async getMessageByType (type, page = this.detailSuccessMessagePage) {
@@ -379,7 +398,7 @@ export default {
379
           } else {
398
           } else {
380
             this.msgSuccessDetailList = [...this.msgSuccessDetailList, ...resp.data.list]
399
             this.msgSuccessDetailList = [...this.msgSuccessDetailList, ...resp.data.list]
381
           }
400
           }
382
-          
401
+
383
           this.detailSuccessMessagePage++
402
           this.detailSuccessMessagePage++
384
           this.detailSuccessMsgListLoading = false;
403
           this.detailSuccessMsgListLoading = false;
385
           if (this.msgSuccessDetailList.length >= resp.data.total) {
404
           if (this.msgSuccessDetailList.length >= resp.data.total) {
@@ -420,20 +439,20 @@ export default {
420
       this.msgPupopVisible = false
439
       this.msgPupopVisible = false
421
       // this.getMessageByType(param)
440
       // this.getMessageByType(param)
422
       if (param === 1) {
441
       if (param === 1) {
423
-      this.msgSuccessDetailList = []
424
-      this.detailSuccessMessagePage = 1
425
-      this.detailSuccessMsgListLoading = false
426
-      this.detailSuccessMsgListFinished = false
427
-      this.getMessageByType(param, 1)
442
+        this.msgSuccessDetailList = []
443
+        this.detailSuccessMessagePage = 1
444
+        this.detailSuccessMsgListLoading = false
445
+        this.detailSuccessMsgListFinished = false
446
+        this.getMessageByType(param, 1)
428
 
447
 
429
         this.msgSuccessDetailPupopVisible = true
448
         this.msgSuccessDetailPupopVisible = true
430
       } else {
449
       } else {
431
-      this.msgCancelDetailList = []
432
-      this.detailCancelMessagePage = 1
433
-      this.detailCancelMsgListLoading = false
434
-      this.detailCancelMsgListFinished = false
435
-      
436
-      this.getMessageByType(param, 1)
450
+        this.msgCancelDetailList = []
451
+        this.detailCancelMessagePage = 1
452
+        this.detailCancelMsgListLoading = false
453
+        this.detailCancelMsgListFinished = false
454
+
455
+        this.getMessageByType(param, 1)
437
 
456
 
438
         this.msgCancelDetailPupopVisible = true
457
         this.msgCancelDetailPupopVisible = true
439
       }
458
       }
@@ -443,7 +462,7 @@ export default {
443
     backMsgPanel () {
462
     backMsgPanel () {
444
       this.msgSuccessDetailPupopVisible = false
463
       this.msgSuccessDetailPupopVisible = false
445
       this.msgCancelDetailPupopVisible = false
464
       this.msgCancelDetailPupopVisible = false
446
-      
465
+
447
       this.getMainPanelMessageList()
466
       this.getMainPanelMessageList()
448
       this.msgPupopVisible = true
467
       this.msgPupopVisible = true
449
     },
468
     },
@@ -465,7 +484,7 @@ export default {
465
     async readMsgToOrderDetails (source) {
484
     async readMsgToOrderDetails (source) {
466
       // console.log(source)
485
       // console.log(source)
467
       if (!source.is_read) {
486
       if (!source.is_read) {
468
-        let clearMsgByIdResp = await api.clearMessageById({id: source.id})
487
+        let clearMsgByIdResp = await api.clearMessageById({ id: source.id })
469
         if (clearMsgByIdResp.code === 200) {
488
         if (clearMsgByIdResp.code === 200) {
470
           this.getMainPanelMessageList()
489
           this.getMainPanelMessageList()
471
         }
490
         }
@@ -490,7 +509,7 @@ export default {
490
           this.msgPupopVisible = false
509
           this.msgPupopVisible = false
491
           this.msgSuccessDetailPupopVisible = false
510
           this.msgSuccessDetailPupopVisible = false
492
           this.msgCancelDetailPupopVisible = false
511
           this.msgCancelDetailPupopVisible = false
493
-          
512
+
494
           this.$router.push({
513
           this.$router.push({
495
             path: "/historicalOrder/details",
514
             path: "/historicalOrder/details",
496
             query: {
515
             query: {
@@ -528,7 +547,7 @@ export default {
528
       },
547
       },
529
       set (val) {
548
       set (val) {
530
         this.MsgType = val
549
         this.MsgType = val
531
-      } 
550
+      }
532
     }
551
     }
533
   },
552
   },
534
 }
553
 }
@@ -671,7 +690,7 @@ export default {
671
   width: 9px;
690
   width: 9px;
672
   height: 9px;
691
   height: 9px;
673
   border-radius: 50%;
692
   border-radius: 50%;
674
-  background-color: #FF6945;
693
+  background-color: #ff6945;
675
   margin-top: 10px;
694
   margin-top: 10px;
676
 }
695
 }
677
 .dot-activated {
696
 .dot-activated {
@@ -717,7 +736,8 @@ export default {
717
     overflow: auto;
736
     overflow: auto;
718
     margin-top: 21px;
737
     margin-top: 21px;
719
     .order-msg {
738
     .order-msg {
720
-      .success, .cancel {
739
+      .success,
740
+      .cancel {
721
         .desc {
741
         .desc {
722
           img {
742
           img {
723
             width: 36px;
743
             width: 36px;
@@ -744,8 +764,7 @@ export default {
744
             box-sizing: border-box;
764
             box-sizing: border-box;
745
             color: #ffffff;
765
             color: #ffffff;
746
             border-radius: 50%;
766
             border-radius: 50%;
747
-            background-color: #FF6945;
748
-            
767
+            background-color: #ff6945;
749
           }
768
           }
750
         }
769
         }
751
       }
770
       }
@@ -766,7 +785,6 @@ export default {
766
           font-weight: 500;
785
           font-weight: 500;
767
           line-height: 18px;
786
           line-height: 18px;
768
         }
787
         }
769
-        
770
       }
788
       }
771
       .count {
789
       .count {
772
         .time {
790
         .time {

+ 54 - 6
src/pages/confirmOrder/addOrder/index.vue

@@ -238,8 +238,12 @@
238
                      size="mini">
238
                      size="mini">
239
             <el-option v-for="item in classifyList"
239
             <el-option v-for="item in classifyList"
240
                        :key="item.id"
240
                        :key="item.id"
241
+                       style=" display: flex;justify-content: space-between ;align-items: center;line-height: inherit;"
241
                        :label="item.name"
242
                        :label="item.name"
242
                        :value="item.id">
243
                        :value="item.id">
244
+              <span style="float: left">{{ item.name }}</span>
245
+              <span v-if="item.recommend==1"
246
+                    style="float: right;color: #fa7d22ff;font-size: 13px;background: #ffefeb;border-radius: 4px;border: 1px solid #fa7d22;height: 18px;padding: 2px 6px;">推荐</span>
243
             </el-option>
247
             </el-option>
244
           </el-select>
248
           </el-select>
245
         </div>
249
         </div>
@@ -252,8 +256,13 @@
252
                      size="mini">
256
                      size="mini">
253
             <el-option v-for="item in projectList"
257
             <el-option v-for="item in projectList"
254
                        :key="item.id"
258
                        :key="item.id"
259
+                       style=" display: flex;justify-content: space-between ;align-items: center;line-height: inherit; padding: 0 12px;"
255
                        :label="item.name"
260
                        :label="item.name"
256
-                       :value="item.id"></el-option>
261
+                       :value="item.id">
262
+              <span style="float: left">{{ item.name |ellipsis(14) }}</span>
263
+              <span v-if="item.recommend==1"
264
+                    style="float: right;color: #fa7d22ff;font-size: 13px;background: #ffefeb;border-radius: 4px;border: 1px solid #fa7d22;height: 18px;padding: 2px 6px;">推荐</span>
265
+            </el-option>
257
           </el-select>
266
           </el-select>
258
         </div>
267
         </div>
259
         <div class="products-select">
268
         <div class="products-select">
@@ -496,6 +505,7 @@ export default {
496
       });
505
       });
497
     },
506
     },
498
     addProject () {
507
     addProject () {
508
+      this.classifyInfo = ""
499
       this.projectInfo = "";
509
       this.projectInfo = "";
500
       this.productsInfo = "";
510
       this.productsInfo = "";
501
       this.isEditProject = false;
511
       this.isEditProject = false;
@@ -614,11 +624,48 @@ export default {
614
         );
624
         );
615
         return;
625
         return;
616
       }
626
       }
617
-      this.getWeekDate();
618
-      this.getOrderTime();
619
-      this.order_time = "";
620
-      this.tsTableIndex = 0;
621
-      this.isTs = true;
627
+
628
+      let that = this;
629
+      let order_data = [];
630
+      this.order_data.project_list.forEach(item => {
631
+        let order_data_info = {};
632
+        order_data_info["id"] = item.id;
633
+        if (item.product_ids != "") {
634
+          order_data_info["product_id"] = item.product_ids;
635
+        }
636
+        order_data.push(order_data_info);
637
+      });
638
+      let params = {
639
+        user_id: this.userInfo.user_id,
640
+        order_data: JSON.stringify(order_data),
641
+        // order_day: this.tsTableList[this.tsTableIndex].order_day,
642
+        // order_time: this.timeIndexText
643
+      };
644
+      this.$loading({
645
+        lock: true,
646
+        text: '加载中',
647
+        spinner: 'el-icon-loading',
648
+        background: 'rgba(0, 0, 0, 0.7)'
649
+      })
650
+      api.padOrderAdd(params).then(res => {
651
+        if (res.code == 200) {
652
+          this.$loading().close()
653
+          // 关闭当前页面并且跳转
654
+          that.$router.push({
655
+            path: "/confirmOrder/details",
656
+            query: {
657
+              id: res.data.order_id
658
+            }
659
+          });
660
+        }
661
+      });
662
+
663
+
664
+      // this.getWeekDate();
665
+      // this.getOrderTime();
666
+      // this.order_time = "";
667
+      // this.tsTableIndex = 0;
668
+      // this.isTs = true;
622
     },
669
     },
623
     //确定时间选择
670
     //确定时间选择
624
     comfigTs () {
671
     comfigTs () {
@@ -1239,6 +1286,7 @@ export default {
1239
       overflow: scroll;
1286
       overflow: scroll;
1240
       .coupon-info {
1287
       .coupon-info {
1241
         width: 345px;
1288
         width: 345px;
1289
+        height: fit-content;
1242
         margin-bottom: 20px;
1290
         margin-bottom: 20px;
1243
         padding: 20px 14px 10px 14px;
1291
         padding: 20px 14px 10px 14px;
1244
         position: relative;
1292
         position: relative;

+ 184 - 34
src/pages/confirmOrder/details/index.vue

@@ -203,9 +203,19 @@
203
              @click="isCoupun=false"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
203
              @click="isCoupun=false"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
204
                alt=""></div>
204
                alt=""></div>
205
         <div class="coupon-pupop-title">选择优惠券</div>
205
         <div class="coupon-pupop-title">选择优惠券</div>
206
+        <div class="tatle">
207
+          <div class="tatle-list">
208
+            <div :class="['tatle-info',item.display==true?'tatle-info-active':'']"
209
+                 v-for="item,index in couponTatleList"
210
+                 @click="changeTable(item,index)"
211
+                 :key="index">{{item.name}}</div>
212
+          </div>
213
+        </div>
206
         <ul class="coupon-lists">
214
         <ul class="coupon-lists">
207
           <li class="coupon-info"
215
           <li class="coupon-info"
208
               v-for="item,index in couponList"
216
               v-for="item,index in couponList"
217
+              @click="selectPupop(item,index)"
218
+              :style="item.isSelect?'border: 1px solid #FA7D22;':''"
209
               :key="index">
219
               :key="index">
210
             <!-- 1: '抵扣券',
220
             <!-- 1: '抵扣券',
211
       2: '满减券',
221
       2: '满减券',
@@ -221,13 +231,12 @@
221
                 <div class="price-tips">{{item.full_price}}</div>
231
                 <div class="price-tips">{{item.full_price}}</div>
222
               </div>
232
               </div>
223
               <div class="coupon-tip">
233
               <div class="coupon-tip">
224
-                <div class="tips-title">{{item.coupon_name}}</div>
225
-                <div class="tips-ts">有效期至{{item.ex_time}}</div>
234
+                <div class="tips-title">{{item.coupon_name | ellipsis(14)}}</div>
235
+                <!-- <div class="tips-ts">有效期至{{item.ex_time}}</div> -->
226
               </div>
236
               </div>
227
-              <div class="choice-icon"
228
-                   @click="selectPupop(item,index)"><img :src="item.isSelect?select:unSelect"></div>
237
+              <div class="choice-icon"><img :src="item.isSelect?select:unSelect"></div>
229
             </div>
238
             </div>
230
-            <div class="bottom">
239
+            <!-- <div class="bottom">
231
               <div class="coupon-notes"
240
               <div class="coupon-notes"
232
                    @click="isOver=!isOver">
241
                    @click="isOver=!isOver">
233
                 <div class="notes-text min-size">
242
                 <div class="notes-text min-size">
@@ -237,7 +246,7 @@
237
                 <div class="notes-icon"><img :src="isOver?open:unOpen"
246
                 <div class="notes-icon"><img :src="isOver?open:unOpen"
238
                        alt=""></div>
247
                        alt=""></div>
239
               </div>
248
               </div>
240
-            </div>
249
+            </div> -->
241
           </li>
250
           </li>
242
         </ul>
251
         </ul>
243
         <div class="coupon-confirm"
252
         <div class="coupon-confirm"
@@ -259,8 +268,12 @@
259
                      size="mini">
268
                      size="mini">
260
             <el-option v-for="item in classifyList"
269
             <el-option v-for="item in classifyList"
261
                        :key="item.id"
270
                        :key="item.id"
271
+                       style=" display: flex;justify-content: space-between ;align-items: center;line-height: inherit;"
262
                        :label="item.name"
272
                        :label="item.name"
263
                        :value="item.id">
273
                        :value="item.id">
274
+              <span style="float: left">{{ item.name }}</span>
275
+              <span v-if="item.recommend==1"
276
+                    style="float: right;color: #fa7d22ff;font-size: 13px;background: #ffefeb;border-radius: 4px;border: 1px solid #fa7d22;height: 18px;padding: 2px 6px;">推荐</span>
264
             </el-option>
277
             </el-option>
265
           </el-select>
278
           </el-select>
266
         </div>
279
         </div>
@@ -274,7 +287,11 @@
274
             <el-option v-for="item in projectList"
287
             <el-option v-for="item in projectList"
275
                        :key="item.id"
288
                        :key="item.id"
276
                        :label="item.name"
289
                        :label="item.name"
290
+                       style=" display: flex;justify-content: space-between ;align-items: center;line-height: inherit; padding: 0 12px;"
277
                        :value="item.id">
291
                        :value="item.id">
292
+              <span style="float: left">{{ item.name |ellipsis(14) }}</span>
293
+              <span v-if="item.recommend==1"
294
+                    style="float: right;color: #fa7d22ff;font-size: 13px;background: #ffefeb;border-radius: 4px;border: 1px solid #fa7d22;height: 18px;padding: 2px 6px;">推荐</span>
278
             </el-option>
295
             </el-option>
279
           </el-select>
296
           </el-select>
280
         </div>
297
         </div>
@@ -422,9 +439,11 @@
422
           </div>
439
           </div>
423
         </div>
440
         </div>
424
         <div v-else>
441
         <div v-else>
425
-          <div class="pay-title">支付成</div>
442
+          <div class="pay-title">支付成</div>
426
           <div class="pay-suc"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/paySuc.png"
443
           <div class="pay-suc"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/paySuc.png"
427
                  alt=""></div>
444
                  alt=""></div>
445
+          <div class="suc-tips">美容项目即将开始</div>
446
+          <div class="suc-zoom">请带领用户移步到 <span class="device_name">{{device_name}}</span> <span class="zoom">{{room}}</span></div>
428
           <div class="pay-button"
447
           <div class="pay-button"
429
                @click="toHome">返回首页</div>
448
                @click="toHome">返回首页</div>
430
         </div>
449
         </div>
@@ -498,6 +517,25 @@ export default {
498
           isSelect: false
517
           isSelect: false
499
         },
518
         },
500
       ],
519
       ],
520
+      //优惠券类型
521
+      couponTatleList: [
522
+        {
523
+          id: 0,
524
+          name: '用户券',
525
+          display: true
526
+        },
527
+        {
528
+          id: 1,
529
+          name: '美团',
530
+          display: false
531
+        },
532
+        {
533
+          id: 2,
534
+          name: '抖音券',
535
+          display: false
536
+        },
537
+      ],
538
+      platform: 0,
501
       timesInfo: '',
539
       timesInfo: '',
502
       reservationPrice: 0,//预约费用
540
       reservationPrice: 0,//预约费用
503
       projectInfo: '',
541
       projectInfo: '',
@@ -530,6 +568,8 @@ export default {
530
       showMoney: 0, // 价值总额
568
       showMoney: 0, // 价值总额
531
       discountPrice: 0,//活动后金额
569
       discountPrice: 0,//活动后金额
532
       discount: 0,//折扣类型
570
       discount: 0,//折扣类型
571
+      device_name: '',//支付成功后的设备
572
+      room: '',//设备房间
533
       // showRuleText: 10086,
573
       // showRuleText: 10086,
534
 
574
 
535
     };
575
     };
@@ -577,7 +617,6 @@ export default {
577
             this.order_data.discountPrice = this.showMoney
617
             this.order_data.discountPrice = this.showMoney
578
           }
618
           }
579
         })
619
         })
580
-        console.log(Number(this.order_data.discountPrice).toFixed(2), 'this.order_data.discountPrice.toFixed(2)');
581
         this.discountPrice = Number(this.order_data.discountPrice).toFixed(2)
620
         this.discountPrice = Number(this.order_data.discountPrice).toFixed(2)
582
         this.calculationPrice()
621
         this.calculationPrice()
583
       })
622
       })
@@ -626,6 +665,7 @@ export default {
626
       })
665
       })
627
     },
666
     },
628
     addProject () {
667
     addProject () {
668
+      this.classifyInfo = ''
629
       this.projectInfo = ''
669
       this.projectInfo = ''
630
       this.productsInfo = ''
670
       this.productsInfo = ''
631
       this.isEditProject = false
671
       this.isEditProject = false
@@ -732,11 +772,40 @@ export default {
732
     //确定订单&支付
772
     //确定订单&支付
733
     determine () {
773
     determine () {
734
       if (this.isChange) {
774
       if (this.isChange) {
735
-        this.getWeekDate()
736
-        this.getOrderTime()
737
-        this.order_time = ''
738
-        this.tsTableIndex = 0
739
-        this.isTs = true
775
+        let order_data = []
776
+        this.order_data.project_list.forEach(item => {
777
+          let order_data_info = {}
778
+          order_data_info['id'] = item.id
779
+          if (item.product_ids != "") {
780
+            order_data_info['product_id'] = item.product_ids
781
+          }
782
+          order_data.push(order_data_info)
783
+        })
784
+        let params = {
785
+          id: this.id,
786
+          order_data: JSON.stringify(order_data),
787
+          // order_day: this.tsTableList[this.tsTableIndex].order_day,
788
+          // order_time: this.timeIndexText
789
+        }
790
+        this.$loading({
791
+          lock: true,
792
+          text: '加载中',
793
+          spinner: 'el-icon-loading',
794
+          background: 'rgba(0, 0, 0, 0.7)'
795
+        })
796
+        api.setOrderUpdate(params).then(res => {
797
+          this.$loading().close()
798
+          if (res.code == 200) {
799
+            this.getOrderInfo()
800
+            this.isTs = false
801
+            this.isChange = false
802
+          }
803
+        })
804
+        // this.getWeekDate()
805
+        // this.getOrderTime()
806
+        // this.order_time = ''
807
+        // this.tsTableIndex = 0
808
+        // this.isTs = true
740
       } else {
809
       } else {
741
         this.choicePayType = true
810
         this.choicePayType = true
742
       }
811
       }
@@ -780,17 +849,33 @@ export default {
780
         this.reservationPrice += Number(res.price)
849
         this.reservationPrice += Number(res.price)
781
       })
850
       })
782
     },
851
     },
852
+    //切换优惠券tatle
853
+    changeTable (item, index) {
854
+      this.couponTatleList.forEach((res, i) => {
855
+        if (index == i) {
856
+          res.display = true
857
+          this.platform = item.id
858
+          this.couponList = []
859
+          this.page = 1
860
+          this.onCoupon()
861
+        } else {
862
+          res.display = false
863
+        }
864
+      })
865
+    },
783
 
866
 
784
     //获取订单优惠券
867
     //获取订单优惠券
868
+
785
     onCoupon () {
869
     onCoupon () {
786
       if (this.couponList.length > 0) {
870
       if (this.couponList.length > 0) {
787
         this.isCoupun = true
871
         this.isCoupun = true
788
         return
872
         return
789
       }
873
       }
790
-
874
+      // platform 优惠券平台,0本地(用户券:默认),1美团券,2抖音券
791
       let params = {
875
       let params = {
792
         id: this.id,
876
         id: this.id,
793
         page: this.page,
877
         page: this.page,
878
+        platform: this.platform,
794
         limit: this.limit
879
         limit: this.limit
795
       }
880
       }
796
       api.getOrderCoupon(params).then(res => {
881
       api.getOrderCoupon(params).then(res => {
@@ -830,13 +915,17 @@ export default {
830
       let coupon_data = []
915
       let coupon_data = []
831
       if (this.isSelectCoup.length > 0) {
916
       if (this.isSelectCoup.length > 0) {
832
         this.isSelectCoup.forEach(item => {
917
         this.isSelectCoup.forEach(item => {
833
-          if (item.type != 4) {
834
-            params['coupon_id'] = item.id
918
+          if (this.platform != 0) {
919
+            params['scoupon_id'] = item.id
835
           } else {
920
           } else {
836
-            let couponInfo = {}
837
-            couponInfo['id'] = item.projectids
838
-            couponInfo['coupon_id'] = item.id
839
-            coupon_data.push(couponInfo)
921
+            if (item.type != 4) {
922
+              params['coupon_id'] = item.id
923
+            } else {
924
+              let couponInfo = {}
925
+              couponInfo['id'] = item.projectids
926
+              couponInfo['coupon_id'] = item.id
927
+              coupon_data.push(couponInfo)
928
+            }
840
           }
929
           }
841
         })
930
         })
842
       }
931
       }
@@ -863,7 +952,6 @@ export default {
863
             }, 1000)
952
             }, 1000)
864
           }
953
           }
865
         }
954
         }
866
-
867
       })
955
       })
868
     },
956
     },
869
     changePayStatus () {
957
     changePayStatus () {
@@ -876,6 +964,8 @@ export default {
876
       api.payStatus({ id: this.id, }).then(res => {
964
       api.payStatus({ id: this.id, }).then(res => {
877
         if (res.data.pay_status == 1) {
965
         if (res.data.pay_status == 1) {
878
           clearInterval(this.payStatusInterval)
966
           clearInterval(this.payStatusInterval)
967
+          this.device_name = res.data.device_name
968
+          this.room = res.data.room
879
           this.isPayCode = false
969
           this.isPayCode = false
880
         }
970
         }
881
       })
971
       })
@@ -1629,7 +1719,7 @@ export default {
1629
     background: #ffffff;
1719
     background: #ffffff;
1630
     border-radius: 8px;
1720
     border-radius: 8px;
1631
     position: relative;
1721
     position: relative;
1632
-    padding: 42px;
1722
+    padding: 40px 20px;
1633
     .delete-pupop {
1723
     .delete-pupop {
1634
       width: 32px;
1724
       width: 32px;
1635
       position: absolute;
1725
       position: absolute;
@@ -1647,29 +1737,60 @@ export default {
1647
       line-height: 20px;
1737
       line-height: 20px;
1648
       text-align: center;
1738
       text-align: center;
1649
     }
1739
     }
1740
+    .tatle {
1741
+      margin-top: 20px;
1742
+      .tatle-list {
1743
+        display: flex;
1744
+        padding-left: 20px;
1745
+        .tatle-info {
1746
+          width: 104px;
1747
+          height: 30px;
1748
+          line-height: 30px;
1749
+          margin-left: 10px;
1750
+          background: #f7f8fa;
1751
+          border-radius: 10px 10px 0px 0px;
1752
+          font-size: 14px;
1753
+          font-family: PingFangSC-Regular, PingFang SC;
1754
+          font-weight: 400;
1755
+          color: #999999;
1756
+          text-align: center;
1757
+        }
1758
+        .tatle-info-active {
1759
+          background: #fffaf6;
1760
+          color: #fa7d22;
1761
+        }
1762
+      }
1763
+    }
1650
     .coupon-lists {
1764
     .coupon-lists {
1651
       display: inline-block;
1765
       display: inline-block;
1652
       position: relative;
1766
       position: relative;
1767
+      width: 100%;
1768
+      background: #fffaf6;
1769
+      border-radius: 8px;
1653
       left: 50%;
1770
       left: 50%;
1654
       transform: translateX(-50%);
1771
       transform: translateX(-50%);
1655
-      margin-top: 20px;
1772
+      padding: 10px 10px 0 10px;
1773
+      display: flex;
1774
+      flex-wrap: wrap;
1656
       height: 228px;
1775
       height: 228px;
1657
       overflow: scroll;
1776
       overflow: scroll;
1658
       .coupon-info {
1777
       .coupon-info {
1659
-        width: 345px;
1778
+        margin-left: 10px;
1779
+        width: 225px;
1780
+        height: fit-content;
1660
         margin-bottom: 20px;
1781
         margin-bottom: 20px;
1661
         padding: 20px 14px 10px 14px;
1782
         padding: 20px 14px 10px 14px;
1662
         position: relative;
1783
         position: relative;
1663
-        background: #fff4e6;
1664
-        border-radius: 12px;
1784
+        background: #ffffff;
1785
+        border-radius: 8px;
1665
         .coupon-tips-text {
1786
         .coupon-tips-text {
1666
           position: absolute;
1787
           position: absolute;
1667
           left: 0;
1788
           left: 0;
1668
           top: 0;
1789
           top: 0;
1669
           padding: 0 8px;
1790
           padding: 0 8px;
1670
           height: 18px;
1791
           height: 18px;
1671
-          background: #875617;
1672
-          border-radius: 12px 0px 12px 0px;
1792
+          background: #fa7d22;
1793
+          border-radius: 8px 0px 8px 0px;
1673
           font-size: 12px;
1794
           font-size: 12px;
1674
           font-family: PingFangSC-Medium, PingFang SC;
1795
           font-family: PingFangSC-Medium, PingFang SC;
1675
           font-weight: 500;
1796
           font-weight: 500;
@@ -1681,9 +1802,9 @@ export default {
1681
         .top {
1802
         .top {
1682
           display: flex;
1803
           display: flex;
1683
           justify-content: space-between;
1804
           justify-content: space-between;
1684
-          align-items: center;
1805
+          align-items: end;
1685
           padding-bottom: 10px;
1806
           padding-bottom: 10px;
1686
-          border-bottom: 1px dashed #ffdfb6;
1807
+          // border-bottom: 1px dashed #ffdfb6;
1687
           .all-free {
1808
           .all-free {
1688
             font-size: 22px;
1809
             font-size: 22px;
1689
             font-family: PingFangSC-Medium, PingFang SC;
1810
             font-family: PingFangSC-Medium, PingFang SC;
@@ -1712,6 +1833,7 @@ export default {
1712
             }
1833
             }
1713
           }
1834
           }
1714
           .discount-over {
1835
           .discount-over {
1836
+            width: 50px;
1715
             font-size: 22px;
1837
             font-size: 22px;
1716
             font-family: PingFangSC-Medium, PingFang SC;
1838
             font-family: PingFangSC-Medium, PingFang SC;
1717
             font-weight: 500;
1839
             font-weight: 500;
@@ -1720,10 +1842,11 @@ export default {
1720
           }
1842
           }
1721
           .coupon-tip {
1843
           .coupon-tip {
1722
             .tips-title {
1844
             .tips-title {
1723
-              font-size: 16px;
1845
+              width: 126px;
1846
+              font-size: 14px;
1724
               font-family: PingFangSC-Medium, PingFang SC;
1847
               font-family: PingFangSC-Medium, PingFang SC;
1725
               font-weight: 500;
1848
               font-weight: 500;
1726
-              color: #875617;
1849
+              color: #333333;
1727
               line-height: 22px;
1850
               line-height: 22px;
1728
             }
1851
             }
1729
             .tips-ts {
1852
             .tips-ts {
@@ -2000,7 +2123,7 @@ export default {
2000
       }
2123
       }
2001
     }
2124
     }
2002
     .pay-title {
2125
     .pay-title {
2003
-      font-size: 14px;
2126
+      font-size: 16px;
2004
       font-family: PingFangSC-Medium, PingFang SC;
2127
       font-family: PingFangSC-Medium, PingFang SC;
2005
       font-weight: 500;
2128
       font-weight: 500;
2006
       color: #333333;
2129
       color: #333333;
@@ -2009,12 +2132,39 @@ export default {
2009
     }
2132
     }
2010
     .pay-suc {
2133
     .pay-suc {
2011
       margin-top: 40px;
2134
       margin-top: 40px;
2012
-      margin-bottom: 80px;
2013
       text-align: center;
2135
       text-align: center;
2014
       img {
2136
       img {
2015
         width: 140px;
2137
         width: 140px;
2016
       }
2138
       }
2017
     }
2139
     }
2140
+    .suc-tips {
2141
+      text-align: center;
2142
+      margin-top: 20px;
2143
+      font-size: 14px;
2144
+      font-family: PingFangSC-Regular, PingFang SC;
2145
+      font-weight: 400;
2146
+      color: #333333;
2147
+      line-height: 20px;
2148
+    }
2149
+    .suc-zoom {
2150
+      text-align: center;
2151
+      margin-top: 23px;
2152
+      font-size: 14px;
2153
+      font-family: PingFangSC-Regular, PingFang SC;
2154
+      font-weight: 400;
2155
+      color: #333333;
2156
+      line-height: 20px;
2157
+      .device_name {
2158
+        margin-left: 10px;
2159
+        color: #fa7d22;
2160
+      }
2161
+      .zoom {
2162
+        margin-left: 10px;
2163
+        font-size: 18px;
2164
+        color: #fa7d22;
2165
+      }
2166
+    }
2167
+
2018
     .pay-price {
2168
     .pay-price {
2019
       margin-top: 10px;
2169
       margin-top: 10px;
2020
       font-size: 14px;
2170
       font-size: 14px;

+ 21 - 17
vue.config.js

@@ -3,8 +3,12 @@
3
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
 
4
 
5
 module.exports = {
5
 module.exports = {
6
-  publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/dist' :
6
+  // 测试
7
+  publicPath: process.env.env_config === 'prod' ? 'https://h5-cms-vue.ijolijoli.com/test_pad/dist' :
7
     process.env.env_config === 'test' ? '/vapps/calory/' : '/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' :
11
+  //   process.env.env_config === 'test' ? '/vapps/calory/' : '/dist/',
8
   // 设置跨域
12
   // 设置跨域
9
   crossorigin: 'anonymous',
13
   crossorigin: 'anonymous',
10
   /**
14
   /**
@@ -42,22 +46,22 @@ module.exports = {
42
   css: {
46
   css: {
43
     loaderOptions: {
47
     loaderOptions: {
44
       postcss: {
48
       postcss: {
45
-          plugins: [
46
-              require("postcss-px-to-viewport")({
47
-                unitToConvert: "px", // 把什么单位转换成vw
48
-                viewportWidth: 1000, // 视口宽度,设计稿宽度
49
-                viewportHeight: 600, // 视口高度,设计稿高度
50
-                unitPrecision: 5, // 转换成vw单位的小数点后的保留位数
51
-                propList: ["*"], // 属性列表,表示你要把哪些css属性的px转换成vw
52
-                viewportUnit: "vw", // 使用的单位,目前可选单位有vw,vh。
53
-                fontViewportUnit: "vw", // 字体使用的单位
54
-                selectorBlackList: ['van', 'el-'], // 匹配不被转换为vw的选择器
55
-                minPixelValue: 1,
56
-                mediaQuery: false,
57
-                replace: true, // 是否直接更换属性值,而不添加备用属性
58
-                exclude: /(\/|\\)(node_modules)(\/|\\)/,
59
-              })
60
-          ]
49
+        plugins: [
50
+          require("postcss-px-to-viewport")({
51
+            unitToConvert: "px", // 把什么单位转换成vw
52
+            viewportWidth: 1000, // 视口宽度,设计稿宽度
53
+            viewportHeight: 600, // 视口高度,设计稿高度
54
+            unitPrecision: 5, // 转换成vw单位的小数点后的保留位数
55
+            propList: ["*"], // 属性列表,表示你要把哪些css属性的px转换成vw
56
+            viewportUnit: "vw", // 使用的单位,目前可选单位有vw,vh。
57
+            fontViewportUnit: "vw", // 字体使用的单位
58
+            selectorBlackList: ['van', 'el-'], // 匹配不被转换为vw的选择器
59
+            minPixelValue: 1,
60
+            mediaQuery: false,
61
+            replace: true, // 是否直接更换属性值,而不添加备用属性
62
+            exclude: /(\/|\\)(node_modules)(\/|\\)/,
63
+          })
64
+        ]
61
       }
65
       }
62
     }
66
     }
63
   }
67
   }