dxz1228 преди 2 години
родител
ревизия
54d79026f4
променени са 3 файла, в които са добавени 32 реда и са изтрити 11 реда
  1. 1 1
      src/pages.json
  2. 19 6
      src/pages/miaosha/index.vue
  3. 12 4
      src/pages/store/home/search.vue

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
src/pages.json


+ 19 - 6
src/pages/miaosha/index.vue

@@ -8,7 +8,7 @@ import FButton from "~/components/FButton/FButton.vue";
8
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
8
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
9
 import { CDM_URL, CDN_URL } from "~/config/app";
9
 import { CDM_URL, CDN_URL } from "~/config/app";
10
 import { filter, orderBy } from "lodash-es";
10
 import { filter, orderBy } from "lodash-es";
11
-const currentSeckillDate = ref()
11
+
12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
14
 const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
14
 const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
@@ -16,7 +16,7 @@ const userStore = useUserStore()
16
 // const list = ref<Array<DcSeckillModel>>()
16
 // const list = ref<Array<DcSeckillModel>>()
17
 const currentProductList = ref([])
17
 const currentProductList = ref([])
18
 const currentstatus = ref(0)
18
 const currentstatus = ref(0)
19
-
19
+const currentSeckillDate = ref(null)
20
 //https://cdn.bjtdba.com/vod/image/2023-12-22/20231222162545839.png 
20
 //https://cdn.bjtdba.com/vod/image/2023-12-22/20231222162545839.png 
21
 //https://cdn.bjtdba.com/vod/image/2023-12-22/20231222162527655.png 
21
 //https://cdn.bjtdba.com/vod/image/2023-12-22/20231222162527655.png 
22
 //https://cdn.bjtdba.com/vod/image/2023-12-22/20231222162507598.png 
22
 //https://cdn.bjtdba.com/vod/image/2023-12-22/20231222162507598.png 
@@ -190,6 +190,19 @@ function handleItemClick(seckillItem) {
190
   })
190
   })
191
 }
191
 }
192
 
192
 
193
+// 下拉刷新
194
+onPullDownRefresh(() => {
195
+  // uni.reLaunch({
196
+  //     url: '/pages/miaosha/index',
197
+  //   })
198
+  state.list = []
199
+  currentProductList.value = []
200
+  currentstatus.value = 0
201
+  currentSeckillDate.value = null
202
+  loadList('reload')
203
+  uni.stopPullDownRefresh();
204
+
205
+})
193
 
206
 
194
 function onClickLeft() {
207
 function onClickLeft() {
195
   const pages = getCurrentPages()
208
   const pages = getCurrentPages()
@@ -251,12 +264,11 @@ function onClickLeft() {
251
   </CXBBasePage> -->
264
   </CXBBasePage> -->
252
   <FNavBar title="" :left-arrow="true" fixed placeholder z-index="999" ex-class="bg-transparent w-screen"
265
   <FNavBar title="" :left-arrow="true" fixed placeholder z-index="999" ex-class="bg-transparent w-screen"
253
     @click-left="onClickLeft" />
266
     @click-left="onClickLeft" />
254
-  <div v-if="state.list && state.list.length > 0">
267
+  <div v-if="state.list && state.list.length > 0" style="position: relative;">
255
     <div style="width: 750rpx; height: 490rpx;position: relative; ">
268
     <div style="width: 750rpx; height: 490rpx;position: relative; ">
256
       <image style="width: 100%;height: 100%;" :src="ms_backimg"></image>
269
       <image style="width: 100%;height: 100%;" :src="ms_backimg"></image>
257
       <image class="ms_titleimg" :src="ms_titleimg"></image>
270
       <image class="ms_titleimg" :src="ms_titleimg"></image>
258
     </div>
271
     </div>
259
-
260
     <div class="pb-safe list_d ">
272
     <div class="pb-safe list_d ">
261
       <!-- <scroll-view class=" whitespace-nowrap  w-screen  text-sm py-3" :scroll-with-animation="true" :scroll-x="true"
273
       <!-- <scroll-view class=" whitespace-nowrap  w-screen  text-sm py-3" :scroll-with-animation="true" :scroll-x="true"
262
         :show-scrollbar="false">
274
         :show-scrollbar="false">
@@ -270,7 +282,7 @@ function onClickLeft() {
270
       </scroll-view> -->
282
       </scroll-view> -->
271
       <scroll-view class=" whitespace-nowrap  w-screen  text-sm py-3" :scroll-with-animation="true" :scroll-x="true"
283
       <scroll-view class=" whitespace-nowrap  w-screen  text-sm py-3" :scroll-with-animation="true" :scroll-x="true"
272
         :show-scrollbar="false">
284
         :show-scrollbar="false">
273
-        <div class="flex  items-center ">
285
+        <div class="flex  items-center justify-center ">
274
           <div @tap="handleSeckillDateClick(item)" v-for="(item, index) in state.list" :key="index"
286
           <div @tap="handleSeckillDateClick(item)" v-for="(item, index) in state.list" :key="index"
275
             class="basis-1/3   relative px-3 text-[#FFFFFF]" style="text-align: center;">
287
             class="basis-1/3   relative px-3 text-[#FFFFFF]" style="text-align: center;">
276
             <div>{{ item.seckill_date?.slice(0, 5) }}</div>
288
             <div>{{ item.seckill_date?.slice(0, 5) }}</div>
@@ -292,7 +304,7 @@ function onClickLeft() {
292
           </div>
304
           </div>
293
           <div class="flex items-center justify-center">
305
           <div class="flex items-center justify-center">
294
             <image style="width: 36rpx;height: 36rpx;margin-right:12rpx " :src="ms_textimg"></image>
306
             <image style="width: 36rpx;height: 36rpx;margin-right:12rpx " :src="ms_textimg"></image>
295
-            <span  style="height: 36rpx;line-height: 36rpx; color: #999999;">抓紧时间抢购哦~</span>
307
+            <span style="height: 36rpx;line-height: 36rpx; color: #999999;">抓紧时间抢购哦~</span>
296
           </div>
308
           </div>
297
         </div>
309
         </div>
298
         <div v-if="currentstatus == 2" class="ms_title_gg mx-3 flex flex-1 justify-between">
310
         <div v-if="currentstatus == 2" class="ms_title_gg mx-3 flex flex-1 justify-between">
@@ -347,6 +359,7 @@ function onClickLeft() {
347
 style:
359
 style:
348
   navigationBarTitleText: 限时秒杀
360
   navigationBarTitleText: 限时秒杀
349
   navigationStyle: custom
361
   navigationStyle: custom
362
+  enablePullDownRefresh: true
350
 </route>
363
 </route>
351
 <style>
364
 <style>
352
 page {
365
 page {

+ 12 - 4
src/pages/store/home/search.vue

@@ -242,8 +242,8 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
242
         </div>
242
         </div>
243
       </template>
243
       </template>
244
     </nut-searchbar>
244
     </nut-searchbar>
245
-    <div class="flex flex-row items-center">
246
-      <div class="basis-1/4 text-left cx-menu">
245
+    <div class="flex flex-row items-center" >
246
+      <div class="basis-1/4 text-center cx-menu">
247
         <nut-menu class="custom-menu">
247
         <nut-menu class="custom-menu">
248
           <template #icon>
248
           <template #icon>
249
             <image :src="downDefaultImg" mode="widthFix" class="w-1 h-1"></image>
249
             <image :src="downDefaultImg" mode="widthFix" class="w-1 h-1"></image>
@@ -279,8 +279,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
279
       </div>
279
       </div>
280
     </div>
280
     </div>
281
   </div>
281
   </div>
282
-
283
-  <div class="p-3 pb-25 mt-15 flex flex-col gap-3">
282
+  <div class="p-3 pb-25 mt-21 flex flex-col gap-3">
284
     <!--    <MerchantHeader -->
283
     <!--    <MerchantHeader -->
285
     <!-- <MerchantHeader :is-search-home="true"
284
     <!-- <MerchantHeader :is-search-home="true"
286
                     @product-type-change="handleProductTypeChange"
285
                     @product-type-change="handleProductTypeChange"
@@ -304,4 +303,13 @@ page {
304
   --nut-searchbar-background: #fff;
303
   --nut-searchbar-background: #fff;
305
   --nut-searchbar-input-box-shadow: none;
304
   --nut-searchbar-input-box-shadow: none;
306
 }
305
 }
306
+
307
+:deep(.nut-menu__bar) {
308
+  --nut-white: none;
309
+  background: none;
310
+  background-color: transparent !important;
311
+}
312
+.custom-menu {
313
+  background: white;
314
+}
307
 </style>
315
 </style>