Browse Source

v3.3.0大概ok

dxz1228 2 years ago
parent
commit
ae357fbd33

File diff suppressed because it is too large
+ 1 - 1
src/pages.json


+ 2 - 2
src/pages/home/index.vue

@@ -500,7 +500,7 @@ page {
500 500
   left: 50%;
501 501
   margin-left: -65rpx;
502 502
   z-index: 2;
503
-  width: 129rpx;
503
+  min-width: 129rpx;
504 504
   height: 38rpx;
505 505
 }
506 506
 
@@ -508,7 +508,7 @@ page {
508 508
   height: 38rpx;
509 509
   line-height: 38rpx;
510 510
   margin-left: 42rpx;
511
-  font-size: 26rpx;
511
+  font-size: 20rpx;
512 512
   font-family: PingFangSC, PingFang SC;
513 513
   font-weight: 500;
514 514
   color: #FFFFFF;

+ 4 - 4
src/pages/order-confirm/index.vue

@@ -350,8 +350,8 @@ function reTotal() {
350 350
 
351 351
                 </div>
352 352
                 <div class="flex justify-between ">
353
-                  <FPrice :price="orderProductItem.productAttr.price" v-if="item.mer_id != '148'"></FPrice>
354
-                  <FPrice :price="orderProductItem.productAttr.price * 30" v-if="item.mer_id == '148'"  symbol="积分" position="after"></FPrice>
353
+                  <div  v-if="item.mer_id != '148'" style="color:#fa4032" >¥{{ orderProductItem.productAttr.price }}</div>
354
+                  <div  v-if="item.mer_id == '148'" style="color:#fa4032">{{ orderProductItem.productAttr.price * 30 }}积分</div>
355 355
                   <nut-input-number v-model="orderProductItem.cart_num" @change="(num) => handleNumberChange(num, orderProductItem)"/>
356 356
 
357 357
                 </div>
@@ -396,8 +396,8 @@ function reTotal() {
396 396
       <div class="flex justify-between items-center p-3">
397 397
         <div class="flex-1 flex text-sm font-bold">
398 398
           应付金额:
399
-          <FPrice v-if="data.type && data.type == '3'" :price="data.totalPrice * 30" symbol="积分" position="after"></FPrice>
400
-         <FPrice  v-else :price="data.totalPrice"></FPrice>
399
+          <div style="color:#fa4032" v-if="data.type && data.type == '3'" >{{ data.totalPrice * 30 }}积分</div>
400
+         <div style="color:#fa4032"  v-else >¥{{data.totalPrice}}</div>
401 401
         </div>
402 402
         <div class="flex">
403 403
           <nut-button type="primary" @click="handleSubmit">提交订单</nut-button>

+ 27 - 20
src/pages/order/components/OrderItem.vue

@@ -128,7 +128,7 @@ function handlePayment() {
128 128
 }
129 129
 
130 130
 function handleShowOrderDetail(order) {
131
-  console.log(order)
131
+  console.log(111212121,order)
132 132
   uni.navigateTo({
133 133
     url: '/pages/order/detail?detail=' + `${encodeBase64(order)}`
134 134
   })
@@ -238,29 +238,36 @@ function updateRemainingTime(detail: any) {
238 238
   const endTime = new Date(detail.close_time).getTime();
239 239
   const timeDifference = endTime - currentTime;
240 240
 
241
-  // 计算剩余时间
242
-  const hours = Math.floor(timeDifference / (1000 * 60 * 60));
243
-  const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
244
-  const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
241
+  if (timeDifference > 0) {
242
+    // 计算剩余时间
243
+    const hours = Math.floor(timeDifference / (1000 * 60 * 60));
244
+    const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
245
+    const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
245 246
 
246
-  // 更新数据
247
-  remainingTime.value = {
248
-    hours: hours < 10 ? '0' + hours : hours,
249
-    minutes: minutes < 10 ? '0' + minutes : minutes,
250
-    seconds: seconds < 10 ? '0' + seconds : seconds
247
+    // 更新数据
248
+
249
+    remainingTime.value = {
250
+      hours: hours < 10 ? '0' + hours : hours,
251
+      minutes: minutes < 10 ? '0' + minutes : minutes,
252
+      seconds: seconds < 10 ? '0' + seconds : seconds
253
+    }
254
+  } else {
255
+    clearInterval(timer);
256
+    remainingTime.value = {
257
+      hours: "00",
258
+      minutes: "00",
259
+      seconds: "00"
260
+    }
261
+    //   //重新刷新页面
262
+    uni.$emit('AllreloadList')
263
+    console.log('自动关闭>>>');
251 264
   }
252 265
 }
253 266
 
254 267
 
255 268
 // 每秒更新剩余时间
256 269
 const timer = setInterval(() => {
257
-  if (remainingTime.hours <= 0 && remainingTime.minutes <= 0) {
258
-    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
259
-    clearInterval(timer);
260
-    //重新刷新页面
261
-    uni.$emit('AllreloadList')
262
-    console.log('自动关闭');
263
-  }
270
+
264 271
   updateRemainingTime(props.orderItem)
265 272
 }, 1000);
266 273
 
@@ -336,14 +343,14 @@ function handleShowDetail(orderItem: any) {
336 343
               <nut-button size="small" type="default" @tap.stop="handleRemindTheDelivery">
337 344
                 <div class="text-black">提醒发货</div>
338 345
               </nut-button>
339
-              <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderProduct)">售后详情</nut-button>
346
+              <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderProduct)">申请售后</nut-button>
340 347
             </div>
341 348
 
342 349
 
343 350
             <div class="flex justify-end gap-2" v-if="orderProduct.type == 1">
344 351
               <nut-button size="small" plain type="default"
345 352
                 @tap.stop="handleShowLogistics(orderProduct)">查看物流</nut-button>
346
-              <nut-button size="small" plain type="default" @tap.stop="handeDetail(orderProduct)">售后详情</nut-button>
353
+              <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderProduct)">申请售后</nut-button>
347 354
 
348 355
               <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderProduct)">确认收货</nut-button>
349 356
 
@@ -428,7 +435,7 @@ function handleShowDetail(orderItem: any) {
428 435
 
429 436
         <div class="flex justify-end gap-2" v-if="orderItem.status == 1">
430 437
           <nut-button size="small" plain type="default" @tap.stop="handleShowLogistics(orderItem)">查看物流</nut-button>
431
-          <nut-button size="small" plain type="default" @tap.stop="handeDetail(orderItem)">售后详情</nut-button>
438
+          <nut-button size="small" plain type="default" @tap.stop="handeRefund(orderItem)">申请售后</nut-button>
432 439
 
433 440
           <nut-button size="small" plain type="primary" @tap.stop="handleTakeOrder(orderItem)">确认收货</nut-button>
434 441
 

+ 25 - 16
src/pages/order/components/OrderObligationItem.vue

@@ -219,31 +219,40 @@ function updateRemainingTime(detail: any) {
219 219
   const endTime = new Date(detail.close_time).getTime();
220 220
   const timeDifference = endTime - currentTime;
221 221
 
222
-  // 计算剩余时间
223
-  const hours = Math.floor(timeDifference / (1000 * 60 * 60));
224
-  const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
225
-  const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
226
-
227
-  // 更新数据
228
-  remainingTime.value = {
229
-    hours: hours < 10 ? '0' + hours : hours,
230
-    minutes: minutes < 10 ? '0' + minutes : minutes,
231
-    seconds: seconds < 10 ? '0' + seconds : seconds
222
+  if (timeDifference > 0) {
223
+    // 计算剩余时间
224
+    const hours = Math.floor(timeDifference / (1000 * 60 * 60));
225
+    const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
226
+    const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
227
+
228
+    // 更新数据
229
+
230
+    remainingTime.value = {
231
+      hours: hours < 10 ? '0' + hours : hours,
232
+      minutes: minutes < 10 ? '0' + minutes : minutes,
233
+      seconds: seconds < 10 ? '0' + seconds : seconds
234
+    }
235
+  } else {
236
+    clearInterval(timer);
237
+    remainingTime.value = {
238
+      hours: "00",
239
+      minutes: "00",
240
+      seconds: "00"
241
+    }
242
+    //   //重新刷新页面
243
+    uni.$emit('dfkreloadList')
244
+    console.log('自动关闭>>>');
232 245
   }
233 246
 }
234 247
 
235 248
 
236 249
 // 每秒更新剩余时间
237 250
 const timer = setInterval(() => {
238
-  if (remainingTime.hours <= 0 && remainingTime.minutes <= 0) {
239
-    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
240
-    clearInterval(timer);
241
-    uni.$emit('dfkreloadList')
242
-    console.log('自动关闭');
243
-  }
251
+
244 252
   updateRemainingTime(props.orderItem)
245 253
 }, 1000);
246 254
 
255
+
247 256
 onUnload(() => {
248 257
   clearInterval(timer);
249 258
   console.log('卸载关闭');

+ 24 - 16
src/pages/order/detail.vue

@@ -118,27 +118,35 @@ function updateRemainingTime(detail: any) {
118 118
   const currentTime = new Date().getTime();
119 119
   const endTime = new Date(detail.close_time).getTime();
120 120
   const timeDifference = endTime - currentTime;
121
-
122
-  // 计算剩余时间
123
-  const hours = Math.floor(timeDifference / (1000 * 60 * 60));
124
-  const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
125
-  const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
126
-
127
-  // 更新数据
128
-  remainingTime.value = {
129
-    hours: hours < 10 ? '0' + hours : hours,
130
-    minutes: minutes < 10 ? '0' + minutes : minutes,
131
-    seconds: seconds < 10 ? '0' + seconds : seconds
121
+  if (timeDifference > 0) {
122
+    // 计算剩余时间
123
+    const hours = Math.floor(timeDifference / (1000 * 60 * 60));
124
+    const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
125
+    const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
126
+
127
+    // 更新数据
128
+    remainingTime.value = {
129
+      hours: hours < 10 ? '0' + hours : hours,
130
+      minutes: minutes < 10 ? '0' + minutes : minutes,
131
+      seconds: seconds < 10 ? '0' + seconds : seconds
132
+    }
133
+  } else {
134
+    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
135
+    clearInterval(timer);
136
+    uni.redirectTo({
137
+      url:'/pages/order/detail?detail=' + `${encodeBase64(detail.value)}`
138
+    })
139
+    
140
+    console.log('自动关闭');
132 141
   }
142
+
133 143
 }
134 144
 
135 145
 
136 146
 // 每秒更新剩余时间
137 147
 const timer = setInterval(() => {
138 148
   if (remainingTime.hours <= 0 && remainingTime.minutes <= 0) {
139
-    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
140
-    clearInterval(timer);
141
-    console.log('自动关闭');
149
+    
142 150
   }
143 151
   updateRemainingTime(detail.value)
144 152
 }, 60000);
@@ -308,7 +316,7 @@ function handleShowDetail(orderItem: any) {
308 316
 
309 317
 </script>
310 318
 <template>
311
-  <div class="custom-navbar" v-if="detail.status==='5'" >
319
+  <div class="custom-navbar" v-if="detail.status === '5'">
312 320
     <!-- 标题行1 -->
313 321
     <text class="title-line">剩余{{ remainingTime.hours }}时{{ remainingTime.minutes }}分自动关闭</text>
314 322
   </div>
@@ -500,6 +508,7 @@ style:
500 508
 page {
501 509
   background: #f8f8f8;
502 510
 }
511
+
503 512
 .custom-navbar {
504 513
   background-color: #fff;
505 514
   /* 导航栏背景色 */
@@ -515,5 +524,4 @@ page {
515 524
   /* 字体大小 */
516 525
   color: #333;
517 526
 }
518
-
519 527
 </style>

+ 24 - 16
src/pages/order/obligation-detail.vue

@@ -59,28 +59,36 @@ function updateRemainingTime(detail: any) {
59 59
   const currentTime = new Date().getTime();
60 60
   const endTime = new Date(detail.close_time).getTime();
61 61
   const timeDifference = endTime - currentTime;
62
-
63
-  // 计算剩余时间
64
-  const hours = Math.floor(timeDifference / (1000 * 60 * 60));
65
-  const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
66
-  const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
67
-
68
-  // 更新数据
69
-  remainingTime.value = {
70
-    hours: hours < 10 ? '0' + hours : hours,
71
-    minutes: minutes < 10 ? '0' + minutes : minutes,
72
-    seconds: seconds < 10 ? '0' + seconds : seconds
62
+  if (timeDifference > 0) {
63
+    // 计算剩余时间
64
+    const hours = Math.floor(timeDifference / (1000 * 60 * 60));
65
+    const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
66
+    const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
67
+
68
+    // 更新数据
69
+    remainingTime.value = {
70
+      hours: hours < 10 ? '0' + hours : hours,
71
+      minutes: minutes < 10 ? '0' + minutes : minutes,
72
+      seconds: seconds < 10 ? '0' + seconds : seconds
73
+    }
74
+  } else {
75
+    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
76
+    clearInterval(timer);
77
+    uni.showToast({
78
+      title: '已自动取消订单',
79
+      icon: 'none'
80
+    })
81
+    setTimeout(() => {
82
+      uni.navigateBack()
83
+    }, 300)
84
+    console.log('自动关闭');
73 85
   }
86
+
74 87
 }
75 88
 
76 89
 
77 90
 // 每秒更新剩余时间
78 91
 const timer = setInterval(() => {
79
-  if (remainingTime.hours <= 0 && remainingTime.minutes <= 0) {
80
-    // 达到设定时间,执行关闭操作,你可以在这里添加你的关闭逻辑
81
-    clearInterval(timer);
82
-    console.log('自动关闭');
83
-  }
84 92
   updateRemainingTime(detail.value)
85 93
 }, 60000);
86 94
 

+ 27 - 11
src/pages/order_addcart/index.vue

@@ -37,7 +37,7 @@ const state = reactive({
37 37
   totalPrice: 0,
38 38
   totalNum: 0,
39 39
   selectAllIndeterminate: false,
40
-  product_id:[],
40
+  product_id: [],
41 41
   cart_id: [],
42 42
   changeSkuCart_id: '0',
43 43
   isManage: true,
@@ -134,6 +134,12 @@ onBeforeMount(() => {
134 134
 onLoad((options) => {
135 135
 
136 136
   if (!userStore.uid) {
137
+    pageStore.setPageConfig({
138
+      currentPage: {
139
+        type: 'tab',
140
+        url: '/pages/home/index'
141
+      }
142
+    })
137 143
     return uni.redirectTo({
138 144
       url: '/pages/user/login/index'
139 145
     })
@@ -153,9 +159,9 @@ onShow(() => {
153 159
 
154 160
   if (!userStore.uid) {
155 161
     pageStore.setPageConfig({
156
-      orderBack: {
162
+      currentPage: {
157 163
         type: 'tab',
158
-        url: '/pages/order_addcart/index'
164
+        url: '/pages/home/index'
159 165
       }
160 166
     })
161 167
     return uni.redirectTo({
@@ -542,7 +548,7 @@ function handleromoveCollect() {
542 548
       success: (res) => {
543 549
         if (res.confirm) {
544 550
           console.log(state.product_id);
545
-          removeCartItem(state.product_id).then(res=>{
551
+          removeCartItem(state.product_id).then(res => {
546 552
             console.log(res);
547 553
             uni.showToast({
548 554
               title: '收藏成功'
@@ -551,9 +557,9 @@ function handleromoveCollect() {
551 557
             state.product_id = []
552 558
             state.totalPrice = ''
553 559
             loadCartList()
554
-          }).catch(error=>{
555
-            console.log('error>>>',error);
556
-            
560
+          }).catch(error => {
561
+            console.log('error>>>', error);
562
+
557 563
           })
558 564
 
559 565
         } else if (res.cancel) {
@@ -771,12 +777,13 @@ onUnload(() => {
771 777
 
772 778
       <div class="flex justify-center items-center gap-2 pr-3">
773 779
         <div class="flex text-[12px]" v-if="state.isManage">
774
-          <span v-if="state.totalNum != 0 &&state.isManage">已选{{ state.totalNum }}件,</span>合计:<FPrice :price="state.totalPrice"></FPrice>
780
+          <span v-if="state.totalNum != 0 && state.isManage">已选{{ state.totalNum }}件,</span>合计:<FPrice
781
+            :price="state.totalPrice"></FPrice>
775 782
         </div>
776
-        <FButton v-if="!state.isManage" @click="handleromoveCollect" size="small"
777
-          :exClass="['rounded-full', '!text-[14px]', 'text-black', 'bg-write', 'w-full']">
783
+        <button v-if="!state.isManage" @click="handleromoveCollect"
784
+          class="['rounded-full', '!text-[14px]', 'text-black',remove_sc]">
778 785
           移入收藏
779
-        </FButton>
786
+        </button>
780 787
         <FButton @click="handleSubmit" size="small"
781 788
           :exClass="['rounded-full', '!text-[14px]', 'text-white', 'bg-primary', 'w-full']">
782 789
           {{ state.isManage ? '去结算' : '删除' }}
@@ -822,6 +829,15 @@ page {
822 829
   height: 7rpx;
823 830
   margin-bottom: 6rpx;
824 831
 }
832
+
833
+
834
+.remove_sc {
835
+  background-color: #ffffff;
836
+  border: 1rpx solid #b7b7b7;
837
+  height: 64rpx;
838
+  line-height: 64rpx;
839
+  text-align: center;
840
+}
825 841
 </style>
826 842
 <route lang="yaml">
827 843
 style:

+ 12 - 4
src/pages/refund/drawback.vue

@@ -66,7 +66,15 @@ onLoad(async (options) => {
66 66
     state.from = options.from
67 67
   }
68 68
   await userStore.getUserInfo()
69
+  if (options.refund_type == '1') {
70
+    uni.setNavigationBarTitle({
71
+      title: '申请退款'
72
+    })
73
+  }
69 74
   if (options.refund_type == '2') {
75
+    uni.setNavigationBarTitle({
76
+      title: '申请退货退款'
77
+    })
70 78
     formData.goods = '已收到货'
71 79
   }
72 80
   formData.refund_type = options.refund_type
@@ -221,8 +229,8 @@ function handleshowReasonPopup() {
221 229
         </template>
222 230
       </nut-cell>
223 231
 
224
-      <nut-cell :desc="formData.goods == '' ? '请选择' : `${formData.goods}`" :is-link="formData.refund_type == '1' ? true : false"
225
-        @click="handleChooseGoodStatus">
232
+      <nut-cell :desc="formData.goods == '' ? '请选择' : `${formData.goods}`"
233
+        :is-link="formData.refund_type == '1' ? true : false" @click="handleChooseGoodStatus">
226 234
         <template #title>
227 235
           <div class="flex font-bold gap-1 items-center">
228 236
             <div>收货状态</div>
@@ -303,13 +311,13 @@ function handleshowReasonPopup() {
303 311
 
304 312
     <GoodStatusPopup v-model:show="state.showGoodStatusPopup" @confirm="onGoodStatusConfirm" />
305 313
     <RefundReasonPopup v-model:show="state.showReasonPopup" @confirm="onRefundReasonConfirm" />
306
-    
314
+
307 315
   </div>
308 316
 </template>
309 317
 
310 318
 <route lang="yaml">
311 319
 style:
312
-  navigationBarTitleText: 申请退款
320
+  navigationBarTitleText: 储蓄保
313 321
 </route>
314 322
 
315 323
 <style lang="scss">