ソースを参照

feat:提交代码,测试分包

longzc 1 年間 前
コミット
8b12260b6f
共有3 個のファイルを変更した494 個の追加795 個の削除を含む
  1. 1 795
      src/pages.json
  2. 467 0
      src/subPages/paegs/quick-fuc/business.vue
  3. 26 0
      src/subPages/paegs/quick-fuc/constants.js

File diff suppressed because it is too large
+ 1 - 795
src/pages.json


+ 467 - 0
src/subPages/paegs/quick-fuc/business.vue

@@ -0,0 +1,467 @@
1
+<template>
2
+	<view class="business-container">
3
+		<view class="lab-content">
4
+			<scroll-view scroll-x="true" class="lab-item">
5
+				<view class="lab-item-x" v-for="(item,index) in tabList" :key="'lab-item-x-'+index">
6
+					<view class="lab-item-small" @click="onTabClick(index,item.merchant_category_id)">
7
+						<text :class="currentIndex==index?'lab-title':'lab-default-title'">{{item.category_name}}</text>
8
+						<view :class="currentIndex==index?'lab-line':'lab-default-line'"></view>
9
+					</view>
10
+				</view>
11
+			</scroll-view>
12
+		</view>
13
+		<view class="banner-content">
14
+			<image class="top-banner" src="/static/img/img_banner_dslm.png" mode="aspectFill"></image>
15
+		</view>
16
+		<view class="fuc-content">
17
+			<view @click="onFucClick" class="fuc-item" v-for="(item,index) in MU_TABLE_LIST" :key="'fuc-item-'+index">
18
+				<text class="item-title">{{item.title}}</text>
19
+				<text class="item-des">{{item.des}}</text>
20
+				<image class="item-img" :src="item.icon" mode=""></image>
21
+			</view>
22
+		</view>
23
+		<view v-if="goodsList&& goodsList.length!=0" v-for="(item,index) in goodsList" :key="'goods-x-'+index">
24
+			<view class="vip-content" v-if="item.childList&& item.childList.length!=0"
25
+				@click="goShopClick(item.mer_id)">
26
+				<image class="vip-bg" src="/static/img/item_smq_bg.png" mode="aspectFill"></image>
27
+				<view class="left-lab-content">
28
+					<image class="lab-icon" :src="item.mer_avatar" mode="widthFix"></image>
29
+					<text class="lab-title">{{item.mer_name}}</text>
30
+					<view class="small-lab">补充养老</view>
31
+				</view>
32
+				<view class="right-lab-content">
33
+					<text class="right-tx">进入店铺</text>
34
+					<image class="right-icon" src="/static/icon/img_jt_right.png" mode="widthFix"></image>
35
+				</view>
36
+			</view>
37
+			<view class="goods-scoll-content">
38
+				<scroll-view scroll-x="true" class="goods-scoll-item">
39
+					<view @click="onDetailClick(childItem.product_id)" class="goods-scoll-item-x"
40
+						v-for="(childItem,childIndex) in item.childList" :key="'goods-scoll-item-x-'+childIndex">
41
+						<view class="goods-item">
42
+							<image class="goods-img" :src="childItem.image" mode="aspectFill"></image>
43
+							<text class="goods-title">{{childItem.store_name}}</text>
44
+							<view class="price-content">
45
+								<text class="goods-des">{{childItem.price}}</text>
46
+								<text class="goods-des">pv:{{childItem.pv?childItem.pv:0}}</text>
47
+							</view>
48
+						</view>
49
+					</view>
50
+				</scroll-view>
51
+			</view>
52
+		</view>
53
+		<CXBEmpty v-else />
54
+	</view>
55
+</template>
56
+
57
+<script setup>
58
+	import {
59
+		MU_TABLE_LIST
60
+	} from "./constants.js"
61
+	import {
62
+		apiGetCategoryList,
63
+		apiGetProductType,
64
+		apiGetProductList
65
+	} from '~/apis/quickLink'
66
+	import { getProductShare } from "~/apis/common";
67
+	const currentIndex = ref(0)
68
+	const tabList = ref([])
69
+	const goodsList = ref([])
70
+	let id=''
71
+
72
+
73
+	onLoad((option) => {
74
+		console.log();
75
+		getCategoryList()
76
+		getProductType()
77
+		
78
+		if (option && option.shareId) {
79
+		  userStore.setShareId(option.shareId)
80
+		}
81
+		getProductShare().then(res => {
82
+		  if (res) userStore.setShareId(res.share_id)
83
+		}).catch(message => {
84
+		})
85
+	})
86
+
87
+	onShareAppMessage(() => {
88
+		const shareId = Cache.get('SHARE_ID')
89
+		return {
90
+			title: `消费储蓄 保障未来`,
91
+			path: `/pages/vip/index?shareId=${shareId}`,
92
+			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-09/20231009202402136.png'
93
+		}
94
+	})
95
+
96
+	onShareTimeline(() => {
97
+		const shareId = Cache.get('SHARE_ID')
98
+		return {
99
+			title: `消费储蓄 保障未来`,
100
+			query: `from=share&shareId=${shareId}`,
101
+			imageUrl: 'https://cdn.bjtdba.com/vod/image/2023-10-11/20231011062523504.png'
102
+		}
103
+	})
104
+
105
+	onReachBottom(() => {
106
+		console.log('到底了。。。')
107
+	})
108
+
109
+	onPullDownRefresh(() => {
110
+		getProductType()
111
+		uni.stopPullDownRefresh()
112
+	})
113
+
114
+	function onTabClick(position, id) {
115
+		currentIndex.value = position
116
+		id.value = id
117
+		getProductType()
118
+	}
119
+
120
+	function goShopClick(id) {
121
+		uni.navigateTo({
122
+			url: `/pages/store/home/index?id=${id}`
123
+		})
124
+	}
125
+
126
+	function onDetailClick(id) {
127
+		uni.navigateTo({
128
+			url: `/pages/store/product/detail?id=${id}`
129
+		})
130
+	}
131
+
132
+	function onFucClick() {
133
+		uni.showToast({
134
+			title: '升级中',
135
+			icon: 'none'
136
+		})
137
+	}
138
+
139
+	function getCategoryList() {
140
+		apiGetCategoryList().then((res) => {
141
+			let _list = new Array()
142
+			_list.push({
143
+				category_name: '全部',
144
+				merchant_category_id: ''
145
+			})
146
+			if (res.merchantCategory && res.merchantCategory.length != 0) {
147
+				_list.push(...res.merchantCategory)
148
+			}
149
+			tabList.value = _list
150
+		})
151
+	}
152
+
153
+	function getProductType() {
154
+		uni.showLoading({
155
+			title:'加载中...'
156
+		})
157
+		apiGetProductType(id.value).then((res) => {
158
+			if (res && res.pageInfo && res.pageInfo.list) {
159
+				goodsList.value = res.pageInfo.list
160
+				dealData()
161
+			}
162
+			uni.hideLoading()
163
+		})
164
+	}
165
+
166
+	function dealData() {
167
+		for (let i = 0; i < goodsList.value.length; i++) {
168
+			let _id = goodsList.value[i].mer_id
169
+			apiGetProductList(_id).then(resx => {
170
+				if (resx.pageInfo.list && resx.pageInfo.list.length != 0) {
171
+					goodsList.value[i].childList = resx.pageInfo.list
172
+				}
173
+			})
174
+		}
175
+	}
176
+</script>
177
+
178
+<style lang="scss" scoped>
179
+	.business-container {
180
+		display: flex;
181
+		flex-direction: column;
182
+		min-height: 100VH;
183
+		background-color: #f8f8f8;
184
+		box-sizing: border-box;
185
+
186
+		.goods-content {
187
+			display: flex;
188
+			flex-direction: row;
189
+			margin-left: 10rpx;
190
+			margin-right: 10rpx;
191
+
192
+
193
+		}
194
+
195
+		.goods-item {
196
+			display: flex;
197
+			margin-left: 10rpx;
198
+			margin-right: 10rpx;
199
+			width: 230rpx;
200
+			align-items: center;
201
+			justify-content: center;
202
+			flex-direction: column;
203
+			background-color: #fff;
204
+			border-radius: 20rpx;
205
+
206
+			.goods-img {
207
+				width: 230rpx;
208
+				height: 230rpx;
209
+				border-top-right-radius: 20rpx;
210
+				border-top-left-radius: 20rpx;
211
+				background-color: #333;
212
+			}
213
+
214
+			.goods-title {
215
+				width: 230rpx;
216
+				font-size: 28rpx;
217
+				color: #333;
218
+				margin-top: 10rpx;
219
+				text-overflow: ellipsis;
220
+				overflow: hidden;
221
+				margin-left: 10rpx;
222
+				margin-right: 10rpx;
223
+				word-break: break-all;
224
+				white-space: nowrap;
225
+			}
226
+
227
+			.price-content {
228
+				margin-top: 10rpx;
229
+				display: flex;
230
+				margin-bottom: 20rpx;
231
+				flex-direction: row;
232
+				align-items: center;
233
+				justify-content: space-between;
234
+				padding-left: 16rpx;
235
+				padding-right: 16rpx;
236
+				box-sizing: border-box;
237
+				width: 100%;
238
+
239
+				.price-left {
240
+					font-size: 28rpx;
241
+					color: #333;
242
+				}
243
+
244
+				.price-rifht {
245
+					font-size: 28rpx;
246
+					color: #333;
247
+				}
248
+			}
249
+
250
+
251
+		}
252
+
253
+		.vip-content {
254
+			margin: 20rpx;
255
+			position: relative;
256
+			height: 100rpx;
257
+			display: flex;
258
+			flex-direction: row;
259
+			align-items: center;
260
+			box-sizing: border-box;
261
+
262
+			.vip-bg {
263
+				position: absolute;
264
+				height: 100rpx;
265
+				width: 710rpx;
266
+				border-top-right-radius: 20rpx;
267
+				border-top-left-radius: 20rpx;
268
+			}
269
+
270
+			.right-lab-content {
271
+				display: flex;
272
+				flex-direction: row;
273
+				align-items: center;
274
+				flex: 1;
275
+				z-index: 22;
276
+				justify-content: flex-end;
277
+
278
+				.right-tx {
279
+					color: #fff;
280
+					font-size: 26rpx;
281
+					margin-right: 10rpx;
282
+				}
283
+
284
+				.right-icon {
285
+					width: 14rpx;
286
+					height: 10rpx;
287
+					margin-right: 20rpx;
288
+				}
289
+			}
290
+
291
+			.left-lab-content {
292
+				height: 50rpx;
293
+				background-color: #fff;
294
+				border-radius: 20rpx;
295
+				z-index: 222;
296
+				display: flex;
297
+				flex-direction: row;
298
+				align-items: center;
299
+				margin-left: 20rpx;
300
+
301
+				.lab-icon {
302
+					width: 30rpx;
303
+					height: 30rpx;
304
+					margin-left: 10rpx;
305
+				}
306
+
307
+				.lab-title {
308
+					font-size: 26rpx;
309
+					color: #333;
310
+					margin-left: 10rpx;
311
+				}
312
+
313
+				.small-lab {
314
+					border-radius: 20rpx;
315
+					background-color: #000;
316
+					margin-right: 10rpx;
317
+					color: #fff;
318
+					font-size: 24rpx;
319
+					padding-left: 6rpx;
320
+					padding-right: 6rpx;
321
+					margin-left: 20rpx;
322
+				}
323
+
324
+			}
325
+
326
+		}
327
+
328
+		.fuc-content {
329
+			display: flex;
330
+			padding-left: 14rpx;
331
+			padding-right: 14rpx;
332
+			margin-top: 20rpx;
333
+			flex-direction: row;
334
+
335
+			.fuc-item {
336
+				flex: 1;
337
+				display: flex;
338
+				flex-direction: column;
339
+				background-color: #fff;
340
+				border-radius: 10rpx;
341
+				margin-left: 6rpx;
342
+				margin-right: 6rpx;
343
+				padding-top: 30rpx;
344
+				padding-bottom: 30rpx;
345
+				align-items: center;
346
+				justify-content: center;
347
+
348
+				.item-img {
349
+					width: 80rpx;
350
+					height: 80rpx;
351
+				}
352
+
353
+				.item-title {
354
+					font-size: 30rpx;
355
+					font-weight: bolder;
356
+					color: #333;
357
+					margin-bottom: 10rpx;
358
+				}
359
+
360
+				.item-des {
361
+					font-size: 24rpx;
362
+					color: #999;
363
+					margin-bottom: 40rpx;
364
+				}
365
+
366
+			}
367
+		}
368
+
369
+		.banner-content {
370
+			background-color: #fff;
371
+			padding: 20rpx;
372
+			height: 360rpx;
373
+			display: flex;
374
+			flex-direction: column;
375
+			margin-top: 90rpx;
376
+			box-sizing: border-box;
377
+
378
+			.top-banner {
379
+				border-radius: 20rpx;
380
+				background: #999;
381
+				height: 360rpx;
382
+				width: 100%;
383
+			}
384
+		}
385
+
386
+		.goods-scoll-content {
387
+			width: 100%;
388
+			display: flex;
389
+			flex-direction: row;
390
+			align-items: center;
391
+
392
+			.goods-scoll-item {
393
+				display: flex;
394
+				flex-direction: row;
395
+				white-space: nowrap;
396
+				width: 100%;
397
+				margin-left: 10rpx;
398
+				margin-right: 10rpx;
399
+			}
400
+
401
+			.goods-scoll-item-x {
402
+				display: inline-block;
403
+				text-align: center;
404
+				width: 230rpx;
405
+				margin-right: 16rpx;
406
+			}
407
+		}
408
+
409
+		.lab-content {
410
+			width: 100%;
411
+			height: 90rpx;
412
+			display: flex;
413
+			flex-direction: row;
414
+			align-items: center;
415
+			position: fixed;
416
+			top: 0;
417
+			left: 0;
418
+			background-color: #fff;
419
+			z-index: 99999;
420
+
421
+			.lab-item {
422
+				display: flex;
423
+				flex-direction: row;
424
+				white-space: nowrap;
425
+				width: 100%;
426
+			}
427
+
428
+			.lab-item-x {
429
+				display: inline-block;
430
+				margin-right: 10px;
431
+				text-align: center;
432
+			}
433
+
434
+			.lab-item-small {
435
+				display: flex;
436
+				flex-direction: column;
437
+				align-items: center;
438
+				width: 124rpx;
439
+
440
+				.lab-default-title {
441
+					font-size: 28rpx;
442
+					margin-bottom: 10rpx;
443
+				}
444
+
445
+				.lab-title {
446
+					font-size: 32rpx;
447
+					margin-bottom: 10rpx;
448
+					color: #FE0032;
449
+				}
450
+
451
+				.lab-line {
452
+					width: 50rpx;
453
+					height: 6rpx;
454
+					background-color: #FE0032;
455
+					border-radius: 4rpx;
456
+				}
457
+
458
+				.lab-default-line {
459
+					width: 50rpx;
460
+					height: 6rpx;
461
+					border-radius: 4rpx;
462
+				}
463
+
464
+			}
465
+		}
466
+	}
467
+</style>

+ 26 - 0
src/subPages/paegs/quick-fuc/constants.js

@@ -0,0 +1,26 @@
1
+import { KINGKONGKEY } from '~/apis/model/common.model'
2
+export const MU_TABLE_LIST =  [{
3
+	title:'商家入驻',
4
+	key:KINGKONGKEY.SJRZ,
5
+	icon:'/static/icon/icon_sm_sjrz.png',
6
+	des:'入驻流程指南'
7
+},
8
+{
9
+	title:'店铺推荐',
10
+	key:KINGKONGKEY.DPTJ,
11
+	icon:'/static/icon/icon_sm_dptj.png',
12
+	des:'优质店铺推荐'
13
+},
14
+{
15
+	title:'官方客服',
16
+	key:KINGKONGKEY.GFKF,
17
+	icon:'/static/icon/icon_sm_gfkf.png',
18
+	des:'用户专属客服'
19
+},
20
+{
21
+	title:'店铺管理',
22
+	key:KINGKONGKEY.DPGL,
23
+	icon:'/static/icon/icon_sm_dpgl.png',
24
+	des:'商品订单管理'
25
+},
26
+]