Sfoglia il codice sorgente

fix: 提现提示逻辑

Basil 2 anni fa
parent
commit
be21d08456

+ 1 - 0
components.d.ts

@@ -46,6 +46,7 @@ declare module '@vue/runtime-core' {
46 46
     NutCell: typeof import('nutui-uniapp/components/cell/cell.vue')['default']
47 47
     NutCellGroup: typeof import('nutui-uniapp/components/cellgroup/cellgroup.vue')['default']
48 48
     NutCheckbox: typeof import('nutui-uniapp/components/checkbox/checkbox.vue')['default']
49
+    NutCountdown: typeof import('nutui-uniapp/components/countdown/countdown.vue')['default']
49 50
     NutDatePicker: typeof import('nutui-uniapp/components/datepicker/datepicker.vue')['default']
50 51
     NutDialog: typeof import('nutui-uniapp/components/dialog/dialog.vue')['default']
51 52
     NutForm: typeof import('nutui-uniapp/components/form/form.vue')['default']

+ 14 - 1
src/apis/dacang.ts

@@ -27,9 +27,19 @@ enum API {
27 27
 	DC_HOME_PRODUCT_LIST = '/api/dacang/nologin/dc_home_product',
28 28
 	// 大仓商品列表分类
29 29
 	DC_CLASSIFY = '/api/dacang/nologin/classify',
30
+
31
+	SECKILL_LIST = '/api/store/product/seckill/lst',
30 32
 }
31 33
 
32 34
 
35
+export function getSeckillList(params: {page: number, limit: number, start_time: number, end_time: number}) {
36
+	return defHttp.get({
37
+		url: API.SECKILL_LIST,
38
+		data: {
39
+			...params
40
+		}
41
+	})
42
+}
33 43
 export function getSeckillIndexTime() {
34 44
 	return defHttp.get({
35 45
 		url: API.DC_SECKILL_INDEX_TIME
@@ -76,9 +86,12 @@ export function getDcProductList(params: QueryDcProductListParams): Promise<Arra
76 86
 /**
77 87
  * 大仓秒杀商品
78 88
  */
79
-export function getDcSeckill(): Promise<Array<DcSeckillModel>> {
89
+export function getDcSeckill(params: { page: number, limit: number }): Promise<Array<DcSeckillModel>> {
80 90
 	return defHttp.get({
81 91
 		url: API.DC_SECKILL,
92
+		data: {
93
+			...params
94
+		}
82 95
 	})
83 96
 }
84 97
 

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


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

@@ -177,7 +177,7 @@ page {
177 177
   background-color: #f8f8f8;
178 178
 }
179 179
 </style>
180
-<route lang="yaml" >
180
+<route lang="yaml" type="home">
181 181
 style:
182 182
   navigationStyle: custom
183 183
   navigationBarTitleText: 储蓄保

+ 17 - 17
src/pages/immediate-withdrawal/index.vue

@@ -41,13 +41,13 @@ onLoad(async () => {
41 41
   userBrokeragePrice.value = userSpreadInfo.value?.brokerage_price ? parseFloat(userSpreadInfo.value?.brokerage_price) : 0
42 42
   console.log(userBrokeragePrice.value)
43 43
   // if (userSpreadInfo.value?.brokerage_price) {
44
-    if (userBrokeragePrice.value < widthdrawalConfig.value.withdrawal_money) {
45
-      isDisabled.value = true
46
-      return uni.showToast({
47
-        title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
48
-        icon: 'none'
49
-      })
50
-    }
44
+  if (userBrokeragePrice.value < widthdrawalConfig.value.withdrawal_money) {
45
+    isDisabled.value = true
46
+    return uni.showToast({
47
+      title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
48
+      icon: 'none'
49
+    })
50
+  }
51 51
   // }
52 52
 })
53 53
 
@@ -100,13 +100,15 @@ function handleImmediateWithdrawal() {
100 100
     })
101 101
   }
102 102
 
103
-    if (userBrokeragePrice.value < widthdrawalConfig.value.withdrawal_money) {
104
-      return uni.showToast({
105
-        title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
106
-        icon: 'none'
107
-      })
108
-    }
103
+  // 1.用户可提现余额≤最低提现额
104
+  if (userBrokeragePrice.value < widthdrawalConfig.value.withdrawal_money) {
105
+    return uni.showToast({
106
+      title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
107
+      icon: 'none'
108
+    })
109
+  }
109 110
 
111
+  // 2 当输入金额≤可提现余额<最低提现额度
110 112
   if (Number.parseFloat(cashWithdrawalAmount.value) <= Number.parseFloat(userBrokeragePrice.value) < widthdrawalConfig.value.withdrawal_money) {
111 113
     // 1 判断是否需要实名
112 114
     if (!yanglaojin.value?.is_certification == 1) {
@@ -115,14 +117,14 @@ function handleImmediateWithdrawal() {
115 117
       })
116 118
     }
117 119
 
118
-
119 120
     return uni.showToast({
120 121
       title: '满' + widthdrawalConfig.value.withdrawal_money + '才可以提现~',
121 122
       icon: 'none'
122 123
     })
123 124
   }
124 125
 
125
-  if (Number.parseFloat(cashWithdrawalAmount.value) >= Number.parseFloat(userBrokeragePrice.value) >= widthdrawalConfig.value.withdrawal_money) {
126
+  // 当输入金额>可提现余额且输入金额≥最低提现额度
127
+  if ((Number.parseFloat(cashWithdrawalAmount.value) > Number.parseFloat(userBrokeragePrice.value)) && (Number.parseFloat(cashWithdrawalAmount.value) >= widthdrawalConfig.value.withdrawal_money)) {
126 128
     // 1 判断是否需要实名
127 129
     if (!yanglaojin.value?.is_certification == 1) {
128 130
       return uni.navigateTo({
@@ -138,8 +140,6 @@ function handleImmediateWithdrawal() {
138 140
   }
139 141
 
140 142
 
141
-
142
-
143 143
   getApplicationWithdrawal({extract_price: cashWithdrawalAmount.value, extract_type: 1}).then(res => {
144 144
     // uni.showToast({
145 145
     //   title: res,

+ 176 - 0
src/pages/miaosha/index-bak-old.vue

@@ -0,0 +1,176 @@
1
+<script setup lang="ts">
2
+import {getDcSeckill, getSeckillIndexTime, getSeckillList} from "~/apis/dacang";
3
+import {DcSeckillModel} from "~/apis/model/dacang.model";
4
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
+import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
6
+import FPrice from "~/components/FPrice/FPrice.vue";
7
+import FButton from "~/components/FButton/FButton.vue";
8
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
9
+import {CDN_URL} from "~/config/app";
10
+const currentSeckillDate = ref()
11
+const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
12
+const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
13
+const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
14
+
15
+const list = ref<Array<DcSeckillModel>>()
16
+const currentProductList = ref([])
17
+
18
+const state = reactive({
19
+  // seckillTime
20
+  timeList: [],
21
+  // seckillTimeIndex
22
+  endTime: '',
23
+  // 倒计时
24
+  //seckillEndTime
25
+  active: 1,
26
+
27
+  scrollLeft: 0,
28
+  loading: false,
29
+
30
+  seckillList: [],
31
+  currentPage: 1,
32
+  pageSize: 10,
33
+  totalPage: 1,
34
+
35
+  status: 1
36
+})
37
+onLoad((options) => {
38
+  loadSeckillConfig()
39
+})
40
+
41
+function loadSeckillConfig() {
42
+  getSeckillIndexTime().then(res => {
43
+    console.log(res)
44
+    state.timeList = res.seckillTime
45
+    state.active = res.seckillTimeIndex
46
+    state.endTime = res.seckillEndTime
47
+
48
+    let time
49
+    state.timeList.map((item) => {
50
+      time = item.start_time > 9 ? item.start_time + ':00' : '0' + item.start_time + ':00';
51
+      item.time = time;
52
+    })
53
+
54
+    //
55
+    if (state.timeList.length) {
56
+      state.scrollLeft = (state.active - 1.37) * 100
57
+      // setTimeout(() => {
58
+      //   state.loading = true
59
+      // }, 2000)
60
+      //
61
+      state.seckillList = []
62
+      state.page = 1
63
+      state.status = state.timeList[state.active].status
64
+      loadList('reload')
65
+
66
+    }
67
+  })
68
+}
69
+
70
+function loadStoreSeckillList(action: 'page' | 'reload', callback?: (items) => void) {
71
+  if (action === 'reload') {
72
+    state.currentPage = 1
73
+  }
74
+  const params = {
75
+    page: state.currentPage,
76
+    limit: state.pageSize,
77
+    start_time: state.timeList[state.active].start_time,
78
+    end_time: state.timeList[state.active].end_time
79
+  }
80
+  getSeckillList({
81
+    ...params
82
+  }).then(res => {
83
+    console.log(res)
84
+  })
85
+}
86
+function handleSeckillDateClick(seckill) {
87
+  currentProductList.value = seckill.product_data
88
+  currentSeckillDate.value = seckill.seckill_date
89
+}
90
+
91
+function handleItemClick(seckillItem) {
92
+  uni.navigateTo({
93
+    url: `/pages/store/product/detail?id=${seckillItem.product_id}`
94
+  })
95
+}
96
+</script>
97
+<template>
98
+  <CXBBasePage>
99
+    <div
100
+        v-if="list && list.length > 0"
101
+
102
+    >
103
+      <scroll-view
104
+          class=" whitespace-nowrap  w-screen  text-sm py-3"
105
+          :scroll-with-animation="true"
106
+          :scroll-x="true"
107
+          :show-scrollbar="false"
108
+      >
109
+        <div
110
+            @tap="handleSeckillDateClick(item)"
111
+            v-for="(item, index) in list"
112
+            :key="index"
113
+            class="flex inline-flex items-center justify-center relative pl-5"
114
+            :class="currentSeckillDate === item.seckill_date ? 'text-[#fe0032]' : ''"
115
+        >
116
+          {{item.seckill_date}}
117
+        </div>
118
+        <!--      </div>-->
119
+      </scroll-view>
120
+      <div class="p-3 pb-safe">
121
+        <div class="flex flex-col gap-3">
122
+          <div
123
+              @tap="handleItemClick(seckillItem)"
124
+              v-for="(seckillItem, itemIndex) in currentProductList"
125
+              :key="itemIndex"
126
+              class="bg-white rounded p-3"
127
+          >
128
+            <div
129
+                class="bg-white flex gap-3"
130
+            >
131
+              <div>
132
+                <image :src="seckillItem.image" mode="widthFix" class="w-30"></image>
133
+              </div>
134
+              <div class="flex-1 flex flex-col gap-2">
135
+                <div class="bg-[#fe0032] rounded-tl-full rounded-tr-full rounded-br-full"></div>
136
+                <div>
137
+                  {{ seckillItem.store_name }}
138
+                </div>
139
+                <div class="text-gray text-xs">
140
+                  即将恢复原价¥{{ seckillItem.ot_price}}
141
+                </div>
142
+                <CXBYaojinTag :amount="Number.parseFloat(seckillItem.yanglao)" />
143
+                <div class="flex items-center justify-between">
144
+                  <FPrice :price="seckillItem.seckill_price"/>
145
+                  <image
146
+                      v-if="seckillItem.status == 1"
147
+                      :src="status1Icon" mode="widthFix" class="w-16 h-7" ></image>
148
+                  <image
149
+                      v-if="seckillItem.status == 2"
150
+                      :src="status2Icon" mode="widthFix" class="w-16 h-7" ></image>
151
+                  <image
152
+                      v-if="seckillItem.status == 3"
153
+                      :src="status3Icon" mode="widthFix" class="w-16 h-7" ></image>
154
+                </div>
155
+              </div>
156
+
157
+            </div>
158
+          </div>
159
+
160
+        </div>
161
+      </div>
162
+    </div>
163
+    <CXBEmpty v-else/>
164
+
165
+  </CXBBasePage>
166
+
167
+</template>
168
+<route lang="yaml">
169
+style:
170
+  navigationBarTitleText: 限时秒杀
171
+</route>
172
+<style>
173
+page {
174
+  background: #f8f8f8;
175
+}
176
+</style>

+ 118 - 0
src/pages/miaosha/index-bak.vue

@@ -0,0 +1,118 @@
1
+<script setup lang="ts">
2
+import {getDcSeckill} from "~/apis/dacang";
3
+import {DcSeckillModel} from "~/apis/model/dacang.model";
4
+import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5
+import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
6
+import FPrice from "~/components/FPrice/FPrice.vue";
7
+import FButton from "~/components/FButton/FButton.vue";
8
+import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
9
+import {CDN_URL} from "~/config/app";
10
+const currentSeckillDate = ref()
11
+const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
12
+const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
13
+const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
14
+
15
+const list = ref<Array<DcSeckillModel>>()
16
+const currentProductList = ref([])
17
+onLoad((options) => {
18
+  getDcSeckill().then(res => {
19
+    list.value = res
20
+    if (list.value && list.value?.length > 0) {
21
+      currentSeckillDate.value = list.value[0].seckill_date
22
+      currentProductList.value = list.value[0].product_data
23
+
24
+    }
25
+  })
26
+})
27
+
28
+function handleSeckillDateClick(seckill) {
29
+  currentProductList.value = seckill.product_data
30
+  currentSeckillDate.value = seckill.seckill_date
31
+}
32
+
33
+function handleItemClick(seckillItem) {
34
+  uni.navigateTo({
35
+    url: `/pages/store/product/detail?id=${seckillItem.product_id}`
36
+  })
37
+}
38
+</script>
39
+<template>
40
+  <CXBBasePage>
41
+    <div
42
+        v-if="list && list.length > 0"
43
+
44
+    >
45
+      <scroll-view
46
+          class=" whitespace-nowrap  w-screen  text-sm py-3"
47
+          :scroll-with-animation="true"
48
+          :scroll-x="true"
49
+          :show-scrollbar="false"
50
+      >
51
+        <div
52
+            @tap="handleSeckillDateClick(item)"
53
+            v-for="(item, index) in list"
54
+            :key="index"
55
+            class="flex inline-flex items-center justify-center relative pl-5"
56
+            :class="currentSeckillDate === item.seckill_date ? 'text-[#fe0032]' : ''"
57
+        >
58
+          {{item.seckill_date}}
59
+        </div>
60
+        <!--      </div>-->
61
+      </scroll-view>
62
+      <div class="p-3 pb-safe">
63
+        <div class="flex flex-col gap-3">
64
+          <div
65
+              @tap="handleItemClick(seckillItem)"
66
+              v-for="(seckillItem, itemIndex) in currentProductList"
67
+              :key="itemIndex"
68
+              class="bg-white rounded p-3"
69
+          >
70
+            <div
71
+                class="bg-white flex gap-3"
72
+            >
73
+              <div>
74
+                <image :src="seckillItem.image" mode="widthFix" class="w-30"></image>
75
+              </div>
76
+              <div class="flex-1 flex flex-col gap-2">
77
+                <div class="bg-[#fe0032] rounded-tl-full rounded-tr-full rounded-br-full"></div>
78
+                <div>
79
+                  {{ seckillItem.store_name }}
80
+                </div>
81
+                <div class="text-gray text-xs">
82
+                  即将恢复原价¥{{ seckillItem.ot_price}}
83
+                </div>
84
+                <CXBYaojinTag :amount="Number.parseFloat(seckillItem.yanglao)" />
85
+                <div class="flex items-center justify-between">
86
+                  <FPrice :price="seckillItem.seckill_price"/>
87
+                  <image
88
+                      v-if="seckillItem.status == 1"
89
+                      :src="status1Icon" mode="widthFix" class="w-16 h-7" ></image>
90
+                  <image
91
+                      v-if="seckillItem.status == 2"
92
+                      :src="status2Icon" mode="widthFix" class="w-16 h-7" ></image>
93
+                  <image
94
+                      v-if="seckillItem.status == 3"
95
+                      :src="status3Icon" mode="widthFix" class="w-16 h-7" ></image>
96
+                </div>
97
+              </div>
98
+
99
+            </div>
100
+          </div>
101
+
102
+        </div>
103
+      </div>
104
+    </div>
105
+    <CXBEmpty v-else/>
106
+
107
+  </CXBBasePage>
108
+
109
+</template>
110
+<route lang="yaml">
111
+style:
112
+navigationBarTitleText: 限时秒杀
113
+</route>
114
+<style>
115
+page {
116
+  background: #f8f8f8;
117
+}
118
+</style>

+ 61 - 52
src/pages/miaosha/index.vue

@@ -1,5 +1,5 @@
1 1
 <script setup lang="ts">
2
-import {getDcSeckill, getSeckillIndexTime} from "~/apis/dacang";
2
+import {getDcSeckill} from "~/apis/dacang";
3 3
 import {DcSeckillModel} from "~/apis/model/dacang.model";
4 4
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
5 5
 import CXBYaojinTag from "~/components/CXBYaojinTag/CXBYaojinTag.vue";
@@ -7,68 +7,77 @@ import FPrice from "~/components/FPrice/FPrice.vue";
7 7
 import FButton from "~/components/FButton/FButton.vue";
8 8
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
9 9
 import {CDN_URL} from "~/config/app";
10
+import {filter, orderBy} from "lodash-es";
10 11
 const currentSeckillDate = ref()
11 12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
12 13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
13 14
 const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
14 15
 
15
-const list = ref<Array<DcSeckillModel>>()
16
+// const list = ref<Array<DcSeckillModel>>()
16 17
 const currentProductList = ref([])
17 18
 
18 19
 const state = reactive({
19
-  // seckillTime
20
-  timeList: [],
21
-  // seckillTimeIndex
22
-  endTime: '',
23
-  // 倒计时
24
-  //seckillEndTime
25
-  active: '',
20
+  currentPage: 1,
21
+  pageSize: 10,
22
+  totalPage: 1,
23
+  statue: 'noMore',
26 24
 
27
-  scrollLeft: 0,
28
-  loading: false,
29
-
30
-  seckillList: [],
31
-  page: 1,
32
-  limit: 10,
33
-  status: ''
25
+  list: []
34 26
 })
35 27
 onLoad((options) => {
36
-  getSeckillIndexTime().then(res => {
37
-    console.log(res)
38
-    state.timeList = res.seckillTime
39
-    state.active = res.seckillTimeIndex
40
-    state.endTime = res.seckillEndTime
41
-
42
-    let time
43
-    state.timeList.map((item) => {
44
-      time = item.start_time > 9 ? item.start_time + ':00' : '0' + item.start_time + ':00';
45
-      item.time = time;
46
-    })
47
-
48
-    if (state.timeList.length) {
49
-      state.scrollLeft = (state.active = 1.37) * 100
50
-      setTimeout(() => {
51
-        state.loading = true
52
-      }, 2000)
53
-
54
-      state.seckillList = []
55
-      state.page = 1
56
-      state.status = state.timeList[state.active].status
57
-      loadSeckillList()
58
-
59
-    }
60
-  })
61
-
28
+  loadList('reload')
62 29
 })
63 30
 
64
-function loadSeckillList() {
65
-  getDcSeckill().then(res => {
66
-    list.value = res
67
-    if (list.value && list.value?.length > 0) {
68
-      currentSeckillDate.value = list.value[0].seckill_date
69
-      currentProductList.value = list.value[0].product_data
70
-    }
71 31
 
32
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
33
+  if (action === 'reload') {
34
+    state.currentPage = 1
35
+  }
36
+  const params = {
37
+    page: state.currentPage,
38
+    limit: state.pageSize
39
+  }
40
+
41
+  getDcSeckill({
42
+    ...params
43
+  }).then( res => {
44
+    if (action === 'reload') {
45
+      if (res && res.length > 0) {
46
+        console.log(res)
47
+        const resList = res
48
+        // const status3List = orderBy(list.value, (val) => {
49
+        //   return val.status == 3
50
+        // })
51
+        let status3FilterList = filter(resList, (val) => {
52
+          return val.status == 3
53
+        })
54
+        let status2FilterList = filter(resList, (val) => {
55
+          return val.status == 2
56
+        })
57
+        let status1FilterList = filter(resList, (val) => {
58
+          return val.status == 1
59
+        })
60
+        if (status3FilterList.length >= 3) {
61
+          status3FilterList = orderBy(status3FilterList,  ['ctime'], ['desc'])
62
+          console.log(status3FilterList)
63
+          state.list.push(status3FilterList[0])
64
+          console.log(state.list)
65
+        } else {
66
+          state.list.push(status3FilterList)
67
+        }
68
+        if (status2FilterList.length > 0) {
69
+          state.list.push(status2FilterList)
70
+        }
71
+        if (status1FilterList.length > 0) {
72
+          state.list.push(status1FilterList)
73
+        }
74
+        if (state.list.length > 0) {
75
+          // list.value = orderBy(list.value, )
76
+          currentSeckillDate.value = state.list[0].seckill_date
77
+          currentProductList.value = state.list[0].product_data
78
+        }
79
+      }
80
+    }
72 81
   })
73 82
 }
74 83
 function handleSeckillDateClick(seckill) {
@@ -85,7 +94,7 @@ function handleItemClick(seckillItem) {
85 94
 <template>
86 95
   <CXBBasePage>
87 96
     <div
88
-        v-if="list && list.length > 0"
97
+        v-if="state.list.length > 0"
89 98
 
90 99
     >
91 100
       <scroll-view
@@ -96,7 +105,7 @@ function handleItemClick(seckillItem) {
96 105
       >
97 106
         <div
98 107
             @tap="handleSeckillDateClick(item)"
99
-            v-for="(item, index) in list"
108
+            v-for="(item, index) in state.list"
100 109
             :key="index"
101 110
             class="flex inline-flex items-center justify-center relative pl-5"
102 111
             :class="currentSeckillDate === item.seckill_date ? 'text-[#fe0032]' : ''"
@@ -153,7 +162,7 @@ function handleItemClick(seckillItem) {
153 162
   </CXBBasePage>
154 163
 
155 164
 </template>
156
-<route lang="yaml" type="home">
165
+<route lang="yaml">
157 166
 style:
158 167
   navigationBarTitleText: 限时秒杀
159 168
 </route>

+ 37 - 12
src/pages/store/product/detail.vue

@@ -16,6 +16,7 @@ import {
16 16
 import {DcProductModel} from "~/apis/model/dacang.model";
17 17
 import {CDN_URL} from "~/config/app";
18 18
 import {debounce} from "lodash-es";
19
+import dayjs from "dayjs";
19 20
 
20 21
 const usePageStore = usePageStoreWidthOut()
21 22
 
@@ -25,6 +26,7 @@ const shangpinxiangqing_gouwuche = CDN_URL + '/static/assets/shangpinxiangqing_g
25 26
 const wx_shareImg = CDN_URL + '/static/assets/wx_share_221121.png'
26 27
 const pyqImg = CDN_URL + '/static/assets/pyq_221121.png'
27 28
 const miaoshaIcon = CDN_URL + '/static/assets/miaoshajia_220805.png'
29
+const xiaoshimiaoshaIcon = CDN_URL + '/static/assets/xiaoshimiaosha_220805.png'
28 30
 const userStore = useUserStore()
29 31
 
30 32
 const shareShowTips = ref(false)
@@ -76,8 +78,8 @@ uni.showShareMenu({
76 78
 })
77 79
 onLoad((option: any) => {
78 80
   // const id = '4858'
79
-  // state.id = option.id
80
-  state.id = 4858
81
+  state.id = option.id
82
+  // state.id = 4858
81 83
 
82 84
 
83 85
   getRecommendList({
@@ -401,16 +403,37 @@ function handleShowCustomer() {
401 403
           </swiper-item>
402 404
         </swiper>
403 405
       </div>
404
-      <div class="bg-gradient-to-r from-[#fe7577] to-[#fe0032] h-25 mt-3" v-if="detail.seckill == 1">
405
-       <div class="flex gap-2 items-center text-white">
406
-           <div class="text-[24px]">
407
-             <text class="text-[20px]">¥</text>{{ detail.price }}
408
-           </div>
409
-           <image :src="miaoshaIcon" mode="widthFix" class="w-10"></image>
410
-       </div>
411
-        <div class="text-white">
412
-          即将恢复原价
406
+      <div class="bg-gradient-to-r from-[#fe7577] to-[#fe0032] h-20 mt-3 flex items-center p-3 justify-between"
407
+           v-if="detail.seckill == 1">
408
+        <div class="flex flex-col">
409
+          <div class="flex gap-2 items-center text-white">
410
+            <div class="text-[30px] font-bold">
411
+              <text class="text-[20px]">¥</text>{{ detail.price }}
412
+            </div>
413
+            <image :src="miaoshaIcon" mode="widthFix" class="w-10"></image>
414
+          </div>
415
+          <div class="text-white text-xs">
416
+            即将恢复原价 ¥{{detail.ot_price}}
417
+          </div>
413 418
         </div>
419
+        <div class="flex flex-col items-center gap-2 justify-center">
420
+          <image :src="xiaoshimiaoshaIcon" class="w-17 h-4" model="widthFix"></image>
421
+          <div class="text-white " v-if="detail.seckill_s == 1">
422
+            <div class="text-xs"
423
+                 >
424
+            距秒杀结束</div>
425
+            <nut-countdown :end-time="new Date(detail.seckill_date_end).getTime() + 60 * 1000" ></nut-countdown>
426
+          </div>
427
+          <div class="text-white" v-if="detail.seckill_s == 2">
428
+            <div class="">
429
+              即将开始</div>
430
+          </div>
431
+          <div class="text-white" v-if="detail.seckill_s == 0">
432
+            <div class="">
433
+              已结束</div>
434
+          </div>
435
+        </div>
436
+
414 437
       </div>
415 438
       <div class="bg-black bg-op-30 fixed top-3  rounded-full right-3 h-6 w-6 flex flex-col justify-center items-center z-10"
416 439
            @click="toggleRelation"
@@ -422,7 +445,9 @@ function handleShowCustomer() {
422 445
       </div>
423 446
 
424 447
       <div
425
-          class="flex flex-col p-3 gap-3">
448
+          class="flex flex-col p-3 gap-3"
449
+          v-if="!detail.seckill == 1"
450
+      >
426 451
         <div class="flex flex-row  items-center text-[#FE0032] font-bold text-lg gap-2">
427 452
           <div v-if="is148Merchant && detail.price" class="flex justify-end items-end gap-2">
428 453
             <div class="!text-[24px]">{{ Number.parseFloat(detail.price).toFixed(2) }} </div>