Przeglądaj źródła

大仓 分类 偏移量定位

李战雷 2 lat temu
rodzic
commit
d1ea07d2aa

+ 1 - 1
.env.development

@@ -1 +1 @@
1
-VITE_GLOB_API_URL = 'https://test.bjtdba.com'
1
+VITE_GLOB_API_URL = 'https://app.bjtdba.com'

+ 32 - 40
src/components/ProductCard/ProductCard.vue

@@ -1,14 +1,14 @@
1 1
 <script lang="ts" setup>
2
-import type {ExtractPropTypes, PropType} from "vue";
3
-import type {ProductDetailModel} from "~/apis/model/storeModel";
4
-import {debounce} from "lodash-es";
5
-import {throttle} from "~/utils/throttle";
2
+import type { ExtractPropTypes, PropType } from 'vue'
3
+import type { ProductDetailModel } from '~/apis/model/storeModel'
4
+
5
+import { throttle } from '~/utils/throttle'
6 6
 
7 7
 const props = defineProps({
8 8
   item: {
9 9
     type: Object as PropType<ProductDetailModel>,
10
-    required: true
11
-  }
10
+    required: true,
11
+  },
12 12
 })
13 13
 
14 14
 const emit = defineEmits<{
@@ -20,49 +20,46 @@ function handleClick() {
20 20
   //   emit('click:item', props.item)
21 21
 
22 22
   throttle(() => {
23
-    // uni.navigateTo({
24
-    //   url: `/pages/store/product/detail?id=${item.product_id}`
25
-    // })
26 23
     emit('click:item', props.item)
27
-
28 24
   })
29 25
   // }, 100)
30
-
31 26
 }
32 27
 </script>
33 28
 
34 29
 <template>
35 30
   <div
36
-      @tap.stop="handleClick"
37
-      class="bg-white rounded-lg"
31
+    class="bg-white rounded-lg"
32
+    @tap.stop="handleClick"
38 33
   >
39
-    <image :src="item.image" style="width: 341rpx; height: 341rpx;" 	:fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 5"></image>
40
-    <image :src="item.thumb" style="width: 341rpx; height: 341rpx;"   :fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 6"></image>
41
-    <image :src="item.image" style="width: 341rpx; height: 341rpx;"   :fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 1 ||item.type == 14 ||item.type == 10 ||item.type == 8 ||item.type == 15 ||item.type == 16"></image>
34
+    <image v-if="item.type == 5" :src="item.image" style="width: 341rpx; height: 341rpx;" :fade-in="true" class="rounded-t-lg  !w-full aspect-square" />
35
+    <image v-if="item.type == 6" :src="item.thumb" style="width: 341rpx; height: 341rpx;" :fade-in="true" class="rounded-t-lg  !w-full aspect-square" />
36
+    <image v-if="item.type == 1 || item.type == 14 || item.type == 10 || item.type == 8 || item.type == 15 || item.type == 16" :src="item.image" style="width: 341rpx; height: 341rpx;" :fade-in="true" class="rounded-t-lg  !w-full aspect-square" />
42 37
 
43 38
     <div class="text-sm p-2 flex flex-col gap-1">
44 39
       <div v-if="item.type == 5" class="line-clamp-2">
45 40
         {{ item.store_name }}
46 41
       </div>
47
-      <div v-if="item.type == 1 ||item.type == 14 ||item.type == 10 ||item.type == 8 ||item.type == 15 ||item.type == 16" class="line-clamp-2">
42
+      <div v-if="item.type == 1 || item.type == 14 || item.type == 10 || item.type == 8 || item.type == 15 || item.type == 16" class="line-clamp-2">
48 43
         {{ item.store_name }}
49 44
       </div>
50 45
       <div v-if="item.type == 6" class="line-clamp-2">
51 46
         {{ item.name }}
52 47
       </div>
53 48
       <div class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
54
-        <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
55
-               mode="widthFix" class="!w-8 h-4"></image>
56
-        <div class="px-2 flex items-center jusitify-center"  >
49
+        <image
50
+          src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
51
+          mode="widthFix" class="!w-8 h-4"
52
+        />
53
+        <div class="px-2 flex items-center jusitify-center">
57 54
           <div v-if="item.type == 5">
58
-            养老金 ¥{{item.yanglao||item.yanglao_price}}
55
+            养老金 ¥{{ item.yanglao || item.yanglao_price }}
59 56
           </div>
60
-          <div v-if="item.type == 1 ||item.type == 14 ||item.type == 10 ||item.type == 8 ||item.type == 15 ||item.type == 16">
61
-            养老金 ¥{{item.yanglao_price}}
57
+          <div v-if="item.type == 1 || item.type == 14 || item.type == 10 || item.type == 8 || item.type == 15 || item.type == 16">
58
+            养老金 ¥{{ item.yanglao_price }}
62 59
           </div>
63 60
 
64
-          <div v-if="item.type==6">
65
-            养老金 ¥{{item.commission}}
61
+          <div v-if="item.type == 6">
62
+            养老金 ¥{{ item.commission }}
66 63
           </div>
67 64
         </div>
68 65
       </div>
@@ -74,40 +71,35 @@ function handleClick() {
74 71
           <div v-if="item.type == 5">
75 72
             {{ item.price }}
76 73
           </div>
77
-          <div v-if="item.type == 1 ||item.type == 14 ||item.type == 10 ||item.type == 8 ||item.type == 15 ||item.type == 16">
74
+          <div v-if="item.type == 1 || item.type == 14 || item.type == 10 || item.type == 8 || item.type == 15 || item.type == 16">
78 75
             {{ item.price }}
79 76
           </div>
80 77
           <div v-if="item.type == 6">
81
-            {{item.lowestCouponPrice}}
78
+            {{ item.lowestCouponPrice }}
82 79
           </div>
83 80
         </div>
84 81
 
85
-        <div  v-if="item.type == 5" class="bg-[#202020] text-[#FFDD99] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4">
86
-
87
-          <div >
82
+        <div v-if="item.type == 5" class="bg-[#202020] text-[#FFDD99] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4">
83
+          <div>
88 84
             大仓
89 85
           </div>
90
-          
91 86
         </div>
92
-        <div v-if="item.type == 6"  class="bg-[#202020] text-[#FFDD99] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4">
93
-
94
-         
95
-          <div >
87
+        <div v-if="item.type == 6" class="bg-[#202020] text-[#FFDD99] rounded-t-lg rounded-br-lg text-10px leading-none px-1 flex items-center justify-center h-4">
88
+          <div>
96 89
             京东
97 90
           </div>
98 91
         </div>
99
-
100 92
       </div>
101 93
 
102 94
       <div class="line-through text-xs font-bold flex ">
103 95
         <div v-if="item.type == 5">
104
-          ¥ {{item.ot_price}}
96
+          ¥ {{ item.ot_price }}
105 97
         </div>
106
-        <div v-if="item.type == 1 ||item.type == 14 ||item.type == 10 ||item.type == 8 ||item.type == 15 ||item.type == 16">
107
-          ¥ {{item.ot_price}}
98
+        <div v-if="item.type == 1 || item.type == 14 || item.type == 10 || item.type == 8 || item.type == 15 || item.type == 16">
99
+          ¥ {{ item.ot_price }}
108 100
         </div>
109 101
         <div v-if="item.type == 6">
110
-          ¥ {{item.price}}
102
+          ¥ {{ item.price }}
111 103
         </div>
112 104
       </div>
113 105
     </div>

+ 265 - 249
src/pages/dacang/list/index.vue

@@ -1,256 +1,272 @@
1
-<script lang="ts" setup>
2
-import FNavBar from "~/components/FNavBar/FNavBar.vue";
3
-import { getDcProductClassify, getDcProductList } from "~/apis/dacang";
4
-import FTabs from "~/components/FTabs/FTabs.vue";
5
-import ProductList from "~/components/ProductList/ProductList.vue";
6
-import type { DcProductModel } from "~/apis/model/dacang.model";
7
-import { useDacangStore } from "~/stores/dacangStore";
8
-import { CDN_URL } from "~/config/app";
9
-import DacangHeader from "~/pages/dacang/list/components/dacang-header.vue";
10
-import CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
11
-import { getProductShare } from "~/apis/common";
12
-import { useUserStore } from "~/stores/userStore";
13
-import Cache from "~/utils/cache";
14
-import { getBannerImg } from '~/apis/product'
15
-import Banner from "./components/banner.vue";
16
-
17
-
18
-const usePageStore = usePageStoreWidthOut()
19
-
20
-
21
-const state = reactive({
22
-  tabs: [],
23
-  lists: {},
24
-  productList: <Array<DcProductModel>>[],
25
-  currentClassify: '-1',
26
-  keyword: '',
27
-  status: 'noMore',
28
-  banner: '',
29
-  currentPage: 1,
30
-  pageSize: 10,
31
-  totalPage: 1
32
-})
33
-
34
-// 距离顶部距离
35
-let Scroll_X = ref(0)
36
-
37
-let scrollPositions = reactive({})
38
-const dacangStore = useDacangStore()
39
-const userStore = useUserStore()
40
-
41
-
42
-onLoad(async (option) => {
43
-  state.tabs = [{ store_category_id: '-1', cate_name: '全部' }]
44
-  const classifyRes = await getDcProductClassify()
45
-  state.tabs.push(...classifyRes)
46
-  usePageStore.setPageConfig({
47
-    currentPage: {
48
-      type: 'tab',
49
-      url: '/pages/dacang/list/index'
50
-    }
51
-  })
52
-
53
-  if (option && option.shareId) {
54
-    userStore.setShareId(option.shareId)
55
-  }
56
-  getProductShare().then(res => {
57
-    if (res) {
58
-      userStore.setShareId(res.share_id)
59
-    }
60
-  }).catch(message => {
61
-    console.log(message)
62
-  })
63
-  userStore.setRedirectPage(`/pages/dacang/list/index`, 'tab')
64
-  getBannerImg().then(res => {
65
-    console.log('banner', res);
66
-    state.banner = res[0].pic
67
-    console.log(state.banner);
68
-
69
-  })
70
-
71
-})
72
-
73
-
74
-onShareAppMessage(() => {
75
-  const shareId = Cache.get('SHARE_ID')
76
-
77
-  return {
78
-    title: `消费储蓄 保障未来`,
79
-    path: `/pages/dacang/list/index?shareId=${shareId}`,
80
-    imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-09/20231009202402136.png'
81
-  }
82
-})
83
-
84
-onShareTimeline(() => {
85
-  const shareId = Cache.get('SHARE_ID')
86
-  return {
87
-    title: `消费储蓄 保障未来`,
88
-    imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-11/20231011062523504.png',
89
-    query: `from=share&shareId=${shareId}`
90
-  }
91
-})
92
-
93
-onShow((options) => {
94
-
95
-  usePageStore.setPageConfig({
96
-    currentPage: {
97
-      type: 'tab',
98
-      url: '/pages/dacang/list/index'
99
-    }
100
-  })
101
-  loadList('reload')
102
-})
103
-
104
-const loadList = async (action: 'page' | 'reload', callback?: (items) => void) => {
105
-  console.log(action);
106
-  let params: any = {
107
-    page: state.currentPage,
108
-    limit: state.pageSize,
109
-    keyword: state.keyword
110
-  }
111
-  console.log(params);
112
-  if (state.currentClassify !== '-1') {
113
-    params.classify = state.currentClassify
114
-  }
115
-  let res = await getDcProductList({
116
-    ...params
117
-  })
118
-  console.log('res>>>>', res);
119
-  if (action === 'page') {
120
-    state.lists[state.currentClassify] = state.lists[state.currentClassify].concat(res)
121
-  }
122
-  if (action === 'reload') {
123
-    state.lists[state.currentClassify] = res
124
-  }
125
-
126
-  if (callback) {
127
-    callback(res)
128
-  }
129
-
130
-
131
-}
132
-
133
-function handleTabItemClick(classifyId: string) {
134
-  state.currentClassify = classifyId
135
-  // uni.pageScrollTo({
136
-  //   scrollTop: 0
137
-  // });
138
-  state.currentPage = 1
139
-  state.pageSize = 10
140
-
141
-  setTimeout(() => {
142
-    loadList('reload')
143
-  }, 300)
144
-
145
-}
146
-
147
-// function handleTabItemClick(classifyId) {
148
-//   // 保存当前分类页的滚动位置
149
-//   scrollPositions[state.currentClassify] = Scroll_X.value;
150
-
151
-//   console.log(111, scrollPositions[classifyId]);
152
-
153
-//   // 切换当前分类页
154
-//   state.currentClassify = classifyId;
155
-
156
-//   // 检查当前分类页是否有保存的滚动位置
157
-//   if (scrollPositions[classifyId] !== undefined) {
158
-//     // 如果有保存的滚动位置,恢复滚动位置
159
-//     uni.pageScrollTo({
160
-//       scrollTop: scrollPositions[classifyId],
161
-//     });
162
-//   } else {
163
-//     // 如果没有保存的滚动位置,重新加载数据
164
-//     state.currentPage = 1;
165
-//     state.pageSize = 10;
166
-//     loadList('reload');
167
-//   }
168
-// }
169
-
170
-function toHuiyuan() {
171
-  
172
-  uni.navigateTo({
173
-    url: `/pages/guest_member_new/index?is_merchant=${userStore.userInfo.is_merchant}`
174
-  })
175
-}
176
-
177
-
178
-const headerClass = ref('')
179
-
180
-onPageScroll((page) => {
181
-
182
-
183
-  Scroll_X.value = Number(page.scrollTop.toFixed())
184
-
185
-  // page.scrollTop
186
-  if (page.scrollTop >= 76) {
187
-    headerClass.value = '!bg-primary !text-white'
188
-  } else {
189
-    headerClass.value = ''
190
-  }
191
-})
192
-
193
-onReachBottom(() => {
194
-  uni.showLoading()
195
-
196
-  state.status = 'loading'
197
-  state.currentPage += 1
198
-  loadList('page', (items) => {
199
-    uni.hideLoading()
200
-    console.log(items)
201
-    if (!items.length > 0) {
202
-      // console.log('没有更多了')
203
-      state.status = 'noMore'
204
-    }
205
-  })
206
-})
207
-onPullDownRefresh(() => {
208
-  // uni.showLoading()
209
-  // state.currentPage = 1
210
-  // state.pageSize = 10
211
-  // loadList('reload', (items) => {
212
-  //   uni.hideLoading()
213
-  //   uni.stopPullDownRefresh()
214
-  // })
215
-})
216
-
217
-
1
+<script lang="ts" setup>
2
+	import FNavBar from "~/components/FNavBar/FNavBar.vue";
3
+	import { getDcProductClassify, getDcProductList } from "~/apis/dacang";
4
+	import FTabs from "~/components/FTabs/FTabs.vue";
5
+	import ProductList from "~/components/ProductList/ProductList.vue";
6
+	import type { DcProductModel } from "~/apis/model/dacang.model";
7
+	import { useDacangStore } from "~/stores/dacangStore";
8
+	import { CDN_URL } from "~/config/app";
9
+	import DacangHeader from "~/pages/dacang/list/components/dacang-header.vue";
10
+	import CXBBackTop from "~/components/CXBBackTop/CXBBackTop.vue";
11
+	import { getProductShare } from "~/apis/common";
12
+	import { useUserStore } from "~/stores/userStore";
13
+	import Cache from "~/utils/cache";
14
+	import { getBannerImg } from '~/apis/product'
15
+	import Banner from "./components/banner.vue";
16
+
17
+
18
+	const usePageStore = usePageStoreWidthOut()
19
+
20
+
21
+	const state = reactive({
22
+		tabs: [],
23
+		lists: {},
24
+		productList: <Array<DcProductModel>>[],
25
+		currentClassify: '-1',
26
+		keyword: '',
27
+		status: 'noMore',
28
+		banner: '',
29
+		currentPage: 1,
30
+		pageSize: 10,
31
+		totalPage: 1,
32
+		isResponseReachBotton: true, // 是否详情触底事件
33
+
34
+	})
35
+
36
+	// 距离顶部距离
37
+	let Scroll_X = ref(0)
38
+
39
+	let scrollPositions = reactive({})
40
+	const dacangStore = useDacangStore()
41
+	const userStore = useUserStore()
42
+
43
+
44
+	onLoad(async (option) => {
45
+		state.tabs = [{ store_category_id: '-1', cate_name: '全部' }]
46
+		const classifyRes = await getDcProductClassify()
47
+		state.tabs.push(...classifyRes)
48
+		usePageStore.setPageConfig({
49
+			currentPage: {
50
+				type: 'tab',
51
+				url: '/pages/dacang/list/index'
52
+			}
53
+		})
54
+
55
+		if (option && option.shareId) {
56
+			userStore.setShareId(option.shareId)
57
+		}
58
+		getProductShare().then(res => {
59
+			if (res) {
60
+				userStore.setShareId(res.share_id)
61
+			}
62
+		}).catch(message => {
63
+			console.log(message)
64
+		})
65
+		userStore.setRedirectPage(`/pages/dacang/list/index`, 'tab')
66
+		getBannerImg().then(res => {
67
+			console.log('banner', res);
68
+			state.banner = res[0].pic
69
+			console.log(state.banner);
70
+
71
+		})
72
+
73
+		if (dacangStore) {
74
+			state.currentClassify = dacangStore.currentClassify
75
+		}
76
+		loadList('reload')
77
+	})
78
+
79
+
80
+	onShareAppMessage(() => {
81
+		const shareId = Cache.get('SHARE_ID')
82
+
83
+		return {
84
+			title: `消费储蓄 保障未来`,
85
+			path: `/pages/dacang/list/index?shareId=${shareId}`,
86
+			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-09/20231009202402136.png'
87
+		}
88
+	})
89
+
90
+	onShareTimeline(() => {
91
+		const shareId = Cache.get('SHARE_ID')
92
+		return {
93
+			title: `消费储蓄 保障未来`,
94
+			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-11/20231011062523504.png',
95
+			query: `from=share&shareId=${shareId}`
96
+		}
97
+	})
98
+
99
+	onShow((options) => {
100
+
101
+		usePageStore.setPageConfig({
102
+			currentPage: {
103
+				type: 'tab',
104
+				url: '/pages/dacang/list/index'
105
+			}
106
+		})
107
+
108
+		
109
+	})
110
+
111
+	const loadList = async (action : 'page' | 'reload', callback ?: (items) => void) => {
112
+		console.log(action);
113
+		let params : any = {
114
+			page: state.currentPage,
115
+			limit: state.pageSize,
116
+			keyword: state.keyword
117
+		}
118
+		console.log(params);
119
+		if (state.currentClassify !== '-1') {
120
+			params.classify = state.currentClassify
121
+		}
122
+		let res = await getDcProductList({
123
+			...params
124
+		})
125
+		console.log('res>>>>', res);
126
+		if (action === 'page') {
127
+			state.lists[state.currentClassify] = state.lists[state.currentClassify].concat(res)
128
+		}
129
+		if (action === 'reload') {
130
+			state.lists[state.currentClassify] = res
131
+		}
132
+
133
+		if (callback) {
134
+			callback(res)
135
+		}
136
+
137
+
138
+	}
139
+
140
+	// function handleTabItemClick(classifyId: string) {
141
+	//   state.currentClassify = classifyId
142
+	//   state.currentPage = 1
143
+	//   state.pageSize = 10
144
+
145
+	//   setTimeout(() => {
146
+	//     loadList('reload')
147
+	//   }, 300)
148
+
149
+	// }
150
+
151
+	function handleTabItemClick(classifyId : string) {
152
+		
153
+		state.isResponseReachBotton = false;
154
+		// 切换当前分类页
155
+		state.currentClassify = classifyId;
156
+		// 检查当前分类页是否有保存的滚动位置
157
+		if (scrollPositions[classifyId] !== undefined) {
158
+			// 如果有保存的滚动位置,恢复滚动位置
159
+			uni.pageScrollTo({
160
+				scrollTop: scrollPositions[classifyId],
161
+				duration: 1
162
+			});
163
+		} else {
164
+			// 如果没有保存的滚动位置,重新加载数据
165
+			state.currentPage = 1;
166
+			state.pageSize = 10;
167
+			setTimeout(() => {
168
+				loadList('reload')
169
+			}, 300)
170
+		}
171
+		// state.isResponseReachBotton = true;
172
+	}
173
+
174
+	function toHuiyuan() {
175
+		uni.navigateTo({
176
+			url: `/pages/guest_member_new/index?is_merchant=${userStore.userInfo.is_merchant}`
177
+		})
178
+	}
179
+
180
+	const headerClass = ref('')
181
+	onPageScroll((page) => {
182
+
183
+		Scroll_X.value = Number(page.scrollTop.toFixed())
184
+
185
+		// 保存当前分类页的滚动位置
186
+		scrollPositions[state.currentClassify] = Scroll_X.value;
187
+
188
+		// page.scrollTop
189
+		if (page.scrollTop >= 76) {
190
+			headerClass.value = '!bg-primary !text-white'
191
+		} else {
192
+			headerClass.value = ''
193
+		}
194
+	})
195
+
196
+	onReachBottom(() => {
197
+
198
+		console.log('是否出发触底事件 = ', state.isResponseReachBotton)
199
+
200
+		if (!state.isResponseReachBotton) {
201
+			return
202
+		}
203
+		console.log('触发了')
204
+		uni.showLoading()
205
+
206
+		state.status = 'loading'
207
+		state.currentPage += 1
208
+		loadList('page', (items) => {
209
+			uni.hideLoading()
210
+			console.log(items)
211
+			if (!items.length > 0) {
212
+				// console.log('没有更多了')
213
+				state.status = 'noMore'
214
+			}
215
+		})
216
+	})
217
+	onPullDownRefresh(() => {
218
+		uni.showLoading()
219
+		state.currentPage = 1
220
+		state.pageSize = 10
221
+		loadList('reload', (items) => {
222
+			uni.hideLoading()
223
+			uni.stopPullDownRefresh()
224
+		})
225
+	})
226
+
227
+	function moving(event) {
228
+		console.log('event = ', event)
229
+
230
+		state.isResponseReachBotton = true
231
+	}
218 232
 </script>
219
-<template>
220
-  <div class="h-screen">
221
-    <DacangHeader :ex-class="headerClass" :tabs="state.tabs" @click:item="handleTabItemClick" />
222
-	<!-- gap-2 -->
223
-    <div class="flex flex-col">
224
-      <CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
225
-      <image lazy-load :src="state.banner" mode="widthFix" @click="toHuiyuan" class="w-full h-50"></image>
226
-      <div>
227
-        <ProductList :list="state.lists[state.currentClassify]" />
228
-      </div>
229
-      <div class="pb-safe flex justify-center items-center text-[12px] text-gray-500"
230
-        v-if="state.lists[state.currentClassify]?.length > 0">
231
-        <div v-if="state.status === 'loading'">
232
-          加载中...
233
-        </div>
234
-        <div v-if="state.status === 'noMore'">
235
-          没有更多了~
236
-        </div>
237
-      </div>
238
-    </div>
239
-
240
-  </div>
241
-</template>
242
-<style>
243
-page {
244
-  background-color: #f8f8f8;
245
-}
246
-
247
-.nut-tab-pane {
248
-  display: none !important;
249
-}
233
+
234
+<template>
235
+	<div class="h-screen" @touchmove="moving">
236
+		<DacangHeader :ex-class="headerClass" :tabs="state.tabs" @click:item="handleTabItemClick" />
237
+		<!-- gap-2 -->
238
+		<div class="flex flex-col gap-2">
239
+			<CXBBackTop :Scroll_X="Scroll_X" :isCss="1" />
240
+			<image lazy-load :src="state.banner" mode="widthFix" @click="toHuiyuan" class="w-full h-50 mt--2"></image>
241
+			<div>
242
+				<ProductList :list="state.lists[state.currentClassify]" />
243
+			</div>
244
+			<div class="pb-safe flex justify-center items-center text-[12px] text-gray-500"
245
+				v-if="state.lists[state.currentClassify]?.length > 0">
246
+				<div v-if="state.status === 'loading'">
247
+					加载中...
248
+				</div>
249
+				<div v-if="state.status === 'noMore'">
250
+					没有更多了~
251
+				</div>
252
+			</div>
253
+		</div>
254
+
255
+	</div>
256
+</template>
257
+<style>
258
+	page {
259
+		background-color: #f8f8f8;
260
+	}
261
+
262
+	.nut-tab-pane {
263
+		display: none !important;
264
+	}
250 265
 </style>
266
+
251 267
 <route lang="yaml" >
252 268
 style:
253 269
   navigationStyle: custom
254 270
   navigationBarTitleText: 储蓄保
255 271
   enablePullDownRefresh: true
256
-</route>
272
+</route>

+ 1 - 0
src/pages/home/components/navs.vue

@@ -96,6 +96,7 @@ function handleItemClick(item: any) {
96 96
   switch (item.key) {
97 97
     case PLATFORM_NAME.DC: {
98 98
       const dacangStore = useDacangStore()
99
+	  console.log('categoryId = ', item.categoryId)
99 100
       dacangStore.setClassify(item.categoryId)
100 101
       uni.switchTab({
101 102
         url: '/pages/dacang/list/index',

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

@@ -65,8 +65,8 @@ function handleConfirm() {
65 65
       OrderLists: state.orderList,
66 66
       type: 'tdbaspzf',
67 67
     },
68
-    envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
69
-    // envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
68
+    // envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
69
+    envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
70 70
     success(res) {
71 71
       // 打开成功
72 72
       uni.showToast({