dxz1228 %!s(int64=2) %!d(string=hai) anos
pai
achega
54d79026f4
Modificáronse 3 ficheiros con 32 adicións e 11 borrados
  1. 1 1
      src/pages.json
  2. 19 6
      src/pages/miaosha/index.vue
  3. 12 4
      src/pages/store/home/search.vue

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
src/pages.json


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

@@ -8,7 +8,7 @@ import FButton from "~/components/FButton/FButton.vue";
8 8
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
9 9
 import { CDM_URL, CDN_URL } from "~/config/app";
10 10
 import { filter, orderBy } from "lodash-es";
11
-const currentSeckillDate = ref()
11
+
12 12
 const status1Icon = CDN_URL + '/static/assets/mashangqiang.png'
13 13
 const status2Icon = CDN_URL + '/static/assets/jijiangkaiqiang.png'
14 14
 const status3Icon = CDN_URL + '/static/assets/miaosha_yijieshu_220908.png'
@@ -16,7 +16,7 @@ const userStore = useUserStore()
16 16
 // const list = ref<Array<DcSeckillModel>>()
17 17
 const currentProductList = ref([])
18 18
 const currentstatus = ref(0)
19
-
19
+const currentSeckillDate = ref(null)
20 20
 //https://cdn.bjtdba.com/vod/image/2023-12-22/20231222162545839.png 
21 21
 //https://cdn.bjtdba.com/vod/image/2023-12-22/20231222162527655.png 
22 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 207
 function onClickLeft() {
195 208
   const pages = getCurrentPages()
@@ -251,12 +264,11 @@ function onClickLeft() {
251 264
   </CXBBasePage> -->
252 265
   <FNavBar title="" :left-arrow="true" fixed placeholder z-index="999" ex-class="bg-transparent w-screen"
253 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 268
     <div style="width: 750rpx; height: 490rpx;position: relative; ">
256 269
       <image style="width: 100%;height: 100%;" :src="ms_backimg"></image>
257 270
       <image class="ms_titleimg" :src="ms_titleimg"></image>
258 271
     </div>
259
-
260 272
     <div class="pb-safe list_d ">
261 273
       <!-- <scroll-view class=" whitespace-nowrap  w-screen  text-sm py-3" :scroll-with-animation="true" :scroll-x="true"
262 274
         :show-scrollbar="false">
@@ -270,7 +282,7 @@ function onClickLeft() {
270 282
       </scroll-view> -->
271 283
       <scroll-view class=" whitespace-nowrap  w-screen  text-sm py-3" :scroll-with-animation="true" :scroll-x="true"
272 284
         :show-scrollbar="false">
273
-        <div class="flex  items-center ">
285
+        <div class="flex  items-center justify-center ">
274 286
           <div @tap="handleSeckillDateClick(item)" v-for="(item, index) in state.list" :key="index"
275 287
             class="basis-1/3   relative px-3 text-[#FFFFFF]" style="text-align: center;">
276 288
             <div>{{ item.seckill_date?.slice(0, 5) }}</div>
@@ -292,7 +304,7 @@ function onClickLeft() {
292 304
           </div>
293 305
           <div class="flex items-center justify-center">
294 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 308
           </div>
297 309
         </div>
298 310
         <div v-if="currentstatus == 2" class="ms_title_gg mx-3 flex flex-1 justify-between">
@@ -347,6 +359,7 @@ function onClickLeft() {
347 359
 style:
348 360
   navigationBarTitleText: 限时秒杀
349 361
   navigationStyle: custom
362
+  enablePullDownRefresh: true
350 363
 </route>
351 364
 <style>
352 365
 page {

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

@@ -242,8 +242,8 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
242 242
         </div>
243 243
       </template>
244 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 247
         <nut-menu class="custom-menu">
248 248
           <template #icon>
249 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 279
       </div>
280 280
     </div>
281 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 283
     <!--    <MerchantHeader -->
285 284
     <!-- <MerchantHeader :is-search-home="true"
286 285
                     @product-type-change="handleProductTypeChange"
@@ -304,4 +303,13 @@ page {
304 303
   --nut-searchbar-background: #fff;
305 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 315
 </style>