Procházet zdrojové kódy

feat: 秒杀信息调整

Basil před 2 roky
rodič
revize
473cfe2094

+ 1 - 1
.env.development

@@ -1 +1 @@
1
-VITE_GLOB_API_URL = 'https://app.bjtdba.com'
1
+VITE_GLOB_API_URL = 'https://test.bjtdba.com'

+ 1 - 1
.env.production

@@ -1 +1 @@
1
-VITE_GLOB_API_URL = 'https://app.bjtdba.com'
1
+VITE_GLOB_API_URL = 'https://test.bjtdba.com'

+ 1 - 1
src/apis/model/dacang.model.ts

@@ -108,7 +108,7 @@ export interface DcSeckillProductDataModel {
108 108
      yanglao: number
109 109
      img: string
110 110
      img_text: string
111
-     //1-抢购中。2-即将开始。3-已结
111
+     //1-抢购中。2-即将开始。3-已结
112 112
      status: string
113 113
 }
114 114
 

+ 3 - 1
src/components/CXBSkuPopup/CXBSkuPopup.vue

@@ -136,7 +136,9 @@ function handleCountChange(value) {
136 136
                   {{ (currentSku.price * 30).toFixed(2) }} 积分
137 137
                 </div>
138 138
                 <div class="flex items-end gap-2" v-else>
139
-                  <FPrice :price="currentSku.price"/>
139
+                  <FPrice :price="detail.dc_price" v-if="detail.seckill == 1"/>
140
+
141
+                  <FPrice :price="currentSku.price" v-else/>
140 142
                   <FPrice v-if="currentSku.ot_price" :price="currentSku.ot_price" :ex-class="'!text-black text-xs font-bold'" need-symbol strike-through/>
141 143
                 </div>
142 144
               </div>

+ 3 - 1
src/pages/home/components/header.vue

@@ -51,8 +51,10 @@ function handleClick() {
51 51
       url: '/pages/annuity/index'
52 52
     })
53 53
   } else {
54
+    userStore.setRedirectPage(`/pages/home/index`, 'tab')
55
+
54 56
     uni.navigateTo({
55
-      url: '/pages/user/login/index?key=30'
57
+      url: '/pages/user/login/index'
56 58
     })
57 59
   }
58 60
 }

+ 16 - 2
src/pages/miaosha/index.vue

@@ -73,9 +73,12 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
73 73
         }
74 74
 
75 75
         if (state.list.length > 0) {
76
+          state.list = orderBy(state.list, ['seckill_date'], ['asc'])
77
+
76 78
           // list.value = orderBy(list.value, )
77 79
           currentSeckillDate.value = state.list[0].seckill_date
78 80
           currentProductList.value = state.list[0].product_data
81
+
79 82
         }
80 83
       }
81 84
     }
@@ -136,10 +139,21 @@ function handleItemClick(seckillItem) {
136 139
                 <image :src="seckillItem.image" mode="widthFix" class="w-30"></image>
137 140
               </div>
138 141
               <div class="flex-1 flex flex-col gap-2">
139
-                <div class="bg-[#fe0032] rounded-tl-full rounded-tr-full rounded-br-full"></div>
140
-                <div>
142
+<!--                <div class="bg-[#fe0032] rounded-tl-full rounded-tr-full rounded-br-full"></div>-->
143
+                <div class="bg-[#fe0032] text-[#ffffff] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4 w-fit"
144
+                     v-if="seckillItem.status == 1 || seckillItem.status == 2"
145
+                >
146
+                  <div v-if="seckillItem.status == 1">
147
+                    抢购中
148
+                  </div>
149
+                  <div v-if="seckillItem.status == 2">
150
+                    大仓秒杀
151
+                  </div>
152
+                </div>
153
+                <div class="line-clamp-1">
141 154
                   {{ seckillItem.store_name }}
142 155
                 </div>
156
+
143 157
                 <div class="text-gray text-xs">
144 158
                   即将恢复原价¥{{ seckillItem.ot_price}}
145 159
                 </div>

+ 12 - 2
src/pages/order_addcart/index.vue

@@ -43,15 +43,22 @@ const state = reactive({
43 43
 const shopping = ref<ShoppingResult>()
44 44
 
45 45
 onBeforeMount(() => {
46
+
46 47
   if (!userStore.uid) {
47
-    userStore.setRedirectPage(`/pages/user/index`, "tab");
48 48
 
49 49
     return uni.navigateTo({
50 50
       url: '/user/login/index'
51 51
     })
52 52
   }
53 53
 })
54
+
55
+// nextTick(() => {
56
+//   loadCartList()
57
+// })
54 58
 onLoad((options) => {
59
+  userStore.setRedirectPage(`/pages/order_addcart/index`, "tab");
60
+
61
+
55 62
   uni.$on('cart-reload', () => {
56 63
     // console.log('新商品添加...')
57 64
     state.cart_id = []
@@ -59,9 +66,12 @@ onLoad((options) => {
59 66
   })
60 67
 
61 68
   state.cart_id = []
62
-  loadCartList()
69
+  // loadCartList()
63 70
 })
64 71
 onShow(() => {
72
+  userStore.setRedirectPage(`/pages/order_addcart/index`, "tab");
73
+  loadCartList()
74
+
65 75
   // pageStore.setPageConfig({
66 76
   //   orderBack: {
67 77
   //     type: 'tab',

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

@@ -101,8 +101,8 @@ function handleConfirm() {
101 101
       OrderLists: state.orderList,
102 102
       type: 'tdbaspzf'
103 103
     },
104
-    // envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
105
-    envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
104
+    envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
105
+    // envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
106 106
     success(res) {
107 107
       // 打开成功
108 108
       uni.showToast({

+ 3 - 0
src/pages/store/product/detail.vue

@@ -107,6 +107,9 @@ onLoad((option: any) => {
107 107
 
108 108
   }
109 109
 
110
+  userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}`, 'page')
111
+
112
+
110 113
   // }
111 114
   getRecommendList({
112 115
     page: 1,