Browse Source

feat: 秒杀信息调整

Basil 3 years ago
parent
commit
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
      yanglao: number
108
      yanglao: number
109
      img: string
109
      img: string
110
      img_text: string
110
      img_text: string
111
-     //1-抢购中。2-即将开始。3-已结速
111
+     //1-抢购中。2-即将开始。3-已结束
112
      status: string
112
      status: string
113
 }
113
 }
114
 
114
 

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

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

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

@@ -51,8 +51,10 @@ function handleClick() {
51
       url: '/pages/annuity/index'
51
       url: '/pages/annuity/index'
52
     })
52
     })
53
   } else {
53
   } else {
54
+    userStore.setRedirectPage(`/pages/home/index`, 'tab')
55
+
54
     uni.navigateTo({
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
         if (state.list.length > 0) {
75
         if (state.list.length > 0) {
76
+          state.list = orderBy(state.list, ['seckill_date'], ['asc'])
77
+
76
           // list.value = orderBy(list.value, )
78
           // list.value = orderBy(list.value, )
77
           currentSeckillDate.value = state.list[0].seckill_date
79
           currentSeckillDate.value = state.list[0].seckill_date
78
           currentProductList.value = state.list[0].product_data
80
           currentProductList.value = state.list[0].product_data
81
+
79
         }
82
         }
80
       }
83
       }
81
     }
84
     }
@@ -136,10 +139,21 @@ function handleItemClick(seckillItem) {
136
                 <image :src="seckillItem.image" mode="widthFix" class="w-30"></image>
139
                 <image :src="seckillItem.image" mode="widthFix" class="w-30"></image>
137
               </div>
140
               </div>
138
               <div class="flex-1 flex flex-col gap-2">
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
                   {{ seckillItem.store_name }}
154
                   {{ seckillItem.store_name }}
142
                 </div>
155
                 </div>
156
+
143
                 <div class="text-gray text-xs">
157
                 <div class="text-gray text-xs">
144
                   即将恢复原价¥{{ seckillItem.ot_price}}
158
                   即将恢复原价¥{{ seckillItem.ot_price}}
145
                 </div>
159
                 </div>

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

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

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

@@ -101,8 +101,8 @@ function handleConfirm() {
101
       OrderLists: state.orderList,
101
       OrderLists: state.orderList,
102
       type: 'tdbaspzf'
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
     success(res) {
106
     success(res) {
107
       // 打开成功
107
       // 打开成功
108
       uni.showToast({
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
   getRecommendList({
114
   getRecommendList({
112
     page: 1,
115
     page: 1,