|
|
@@ -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>
|