Просмотр исходного кода

会员专区 banner图
会员专区 下拉无数据
banner 去掉中间红点

许雷 лет назад: 3
Родитель
Сommit
846dedf293

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

@@ -47,7 +47,7 @@ const state = reactive({
47
   banners: [],
47
   banners: [],
48
   announcementList: [],
48
   announcementList: [],
49
 
49
 
50
-  indicatorDots: true,
50
+  indicatorDots: false,
51
   circular: true,
51
   circular: true,
52
   autoplay: true,
52
   autoplay: true,
53
   interval: 5000,
53
   interval: 5000,

+ 6 - 6
src/pages/product/dingshenglianmeng.vue

@@ -1,5 +1,5 @@
1
 <template>
1
 <template>
2
- 
2
+
3
     <scroll-view>
3
     <scroll-view>
4
 		<div class="h-45">
4
 		<div class="h-45">
5
 		  <swiper
5
 		  <swiper
@@ -63,7 +63,7 @@ const state = reactive({
63
   banners: [],
63
   banners: [],
64
   keyword: '' ,
64
   keyword: '' ,
65
   status: 'noMore',
65
   status: 'noMore',
66
-  indicatorDots: true,
66
+  indicatorDots: false,
67
   circular: true,
67
   circular: true,
68
   autoplay: true,
68
   autoplay: true,
69
   interval: 5000,
69
   interval: 5000,
@@ -93,7 +93,7 @@ onLoad((option) => {
93
 		state.banners = res
93
 		state.banners = res
94
 	})
94
 	})
95
 	loadList('reload')
95
 	loadList('reload')
96
-	
96
+
97
 })
97
 })
98
 
98
 
99
 
99
 
@@ -101,7 +101,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
101
 	if (action === 'reload') {
101
 	if (action === 'reload') {
102
 	  state.currentPage = 1
102
 	  state.currentPage = 1
103
 	}
103
 	}
104
-	
104
+
105
 	const params = {
105
 	const params = {
106
 		type :state.type,
106
 		type :state.type,
107
 		page: state.currentPage,
107
 		page: state.currentPage,
@@ -118,7 +118,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
118
 			}
118
 			}
119
 			state.totalPage = Math.ceil(res.count / state.pageSize);
119
 			state.totalPage = Math.ceil(res.count / state.pageSize);
120
 			state.status = 'more'
120
 			state.status = 'more'
121
-			
121
+
122
 			if (callback) {
122
 			if (callback) {
123
 			      callback(res.list)
123
 			      callback(res.list)
124
 			}
124
 			}
@@ -169,4 +169,4 @@ onShow(() =>{
169
 <route lang="yaml">
169
 <route lang="yaml">
170
 style:
170
 style:
171
   enablePullDownRefresh: true
171
   enablePullDownRefresh: true
172
-</route>
172
+</route>

+ 2 - 2
src/pages/store/product/detail.vue

@@ -39,7 +39,7 @@ const state = reactive({
39
   shareCover: '',
39
   shareCover: '',
40
   // 是否收藏
40
   // 是否收藏
41
   isRelation: false,
41
   isRelation: false,
42
-  indicatorDots: true,
42
+  indicatorDots: false,
43
   circular: true,
43
   circular: true,
44
   autoplay: true,
44
   autoplay: true,
45
   interval: 5000,
45
   interval: 5000,
@@ -860,4 +860,4 @@ button::after {
860
 style:
860
 style:
861
   navigationBarTitleText: 商品详情
861
   navigationBarTitleText: 商品详情
862
   enablePullDownRefresh: false
862
   enablePullDownRefresh: false
863
-</route>
863
+</route>

+ 20 - 15
src/pages/vip/index.vue

@@ -119,17 +119,12 @@
119
 </template>
119
 </template>
120
 
120
 
121
 <script setup lang="ts">
121
 <script setup lang="ts">
122
-import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
123
-import FSearch from "~/components/FSearch/FSearch.vue";
124
 import {computed} from "vue";
122
 import {computed} from "vue";
125
 import {getVipAreaList} from "~/apis/merchant";
123
 import {getVipAreaList} from "~/apis/merchant";
126
-import {CDN_URL} from "~/config/app";
127
-import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
128
 import {getHomeBanner, getProductShare} from "~/apis/common";
124
 import {getHomeBanner, getProductShare} from "~/apis/common";
129
 import {useUserStore} from "~/stores/userStore";
125
 import {useUserStore} from "~/stores/userStore";
130
 import Cache from "~/utils/cache";
126
 import Cache from "~/utils/cache";
131
 
127
 
132
-const homeBanner = CDN_URL + '/static/assets/home-banner.png'
133
 
128
 
134
 const systemInfo = uni.getSystemInfoSync()
129
 const systemInfo = uni.getSystemInfoSync()
135
 const statusBarHeight = systemInfo.statusBarHeight ?? 0
130
 const statusBarHeight = systemInfo.statusBarHeight ?? 0
@@ -149,7 +144,7 @@ const state = reactive({
149
 
144
 
150
   keyword: '' ,
145
   keyword: '' ,
151
   status: 'noMore',
146
   status: 'noMore',
152
-  indicatorDots: true,
147
+  indicatorDots: false,
153
   circular: true,
148
   circular: true,
154
   autoplay: true,
149
   autoplay: true,
155
   interval: 5000,
150
   interval: 5000,
@@ -171,7 +166,7 @@ onLoad((option) => {
171
   })
166
   })
172
   userStore.setRedirectPage(`/pages/vip/index`, 'page')
167
   userStore.setRedirectPage(`/pages/vip/index`, 'page')
173
 
168
 
174
-  getHomeBanner().then(res => {
169
+  getHomeBanner("user_banner").then(res => {
175
     // console.log(res)
170
     // console.log(res)
176
     state.banners = res
171
     state.banners = res
177
   })
172
   })
@@ -216,7 +211,9 @@ onPageScroll((page) => {
216
 
211
 
217
 
212
 
218
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
213
 function loadList(action: 'page' | 'reload', callback?: (items) => void) {
219
-  // console.log(state.keyword)
214
+  if (action === 'reload') {
215
+    state.currentPage=1;
216
+  }
220
   const params = {
217
   const params = {
221
     page: state.currentPage,
218
     page: state.currentPage,
222
     limit: state.pageSize,
219
     limit: state.pageSize,
@@ -225,17 +222,26 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
225
   if (state.keyword) {
222
   if (state.keyword) {
226
     params.keyword = state.keyword
223
     params.keyword = state.keyword
227
   }
224
   }
228
-  console.log(params)
229
   getVipAreaList({
225
   getVipAreaList({
230
     // page: state.currentPage,
226
     // page: state.currentPage,
231
     // limit: state.pageSize
227
     // limit: state.pageSize
232
     ...params
228
     ...params
233
   }).then(res => {
229
   }).then(res => {
234
-    // console.log(res.list)
235
-    console.log(res.list)
230
+
236
     if (res) {
231
     if (res) {
237
-      list.value = res.list
232
+      if (action === 'reload') {
233
+        list.value = res.list
234
+      }else if (action === 'page') {
235
+        list.value = list.value.concat(res.list)
236
+      }
237
+      state.totalPage = Math.ceil(res.count / state.pageSize);
238
+      state.status = 'more'
239
+
240
+      if (callback) {
241
+        callback(res.list)
242
+      }
238
     }
243
     }
244
+
239
   })
245
   })
240
 }
246
 }
241
 function handleItemClick(item) {
247
 function handleItemClick(item) {
@@ -247,7 +253,7 @@ function handleItemClick(item) {
247
 function handleScrollToLower() {
253
 function handleScrollToLower() {
248
   state.status = 'loading';
254
   state.status = 'loading';
249
   state.currentPage += 1;
255
   state.currentPage += 1;
250
-  console.log(state.totalPage)
256
+  // console.log(state.totalPage)
251
   if (state.currentPage > state.totalPage) {
257
   if (state.currentPage > state.totalPage) {
252
     state.status = 'noMore';
258
     state.status = 'noMore';
253
   } else {
259
   } else {
@@ -259,7 +265,6 @@ function handleScrollToLower() {
259
 
265
 
260
 onReachBottom(() => {
266
 onReachBottom(() => {
261
   console.log('到底了。。。')
267
   console.log('到底了。。。')
262
-
263
   handleScrollToLower()
268
   handleScrollToLower()
264
 
269
 
265
 })
270
 })
@@ -304,4 +309,4 @@ page {
304
 .f-nav-bar-icon {
309
 .f-nav-bar-icon {
305
   --at-apply: 'text-lg'
310
   --at-apply: 'text-lg'
306
 }
311
 }
307
-</style>
312
+</style>