create-weapp-vite 2.0.32 → 2.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/{chunk-IT75MAH3.js → chunk-6CRKNZN2.js} +2 -3
- package/dist/cli.js +1 -5
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/templates/tailwindcss/package.json +1 -1
- package/templates/tdesign/package.json +1 -1
- package/templates/vant/package.json +1 -1
- package/templates/wevu/package.json +1 -1
- package/templates/wevu-tdesign/package.json +2 -2
- package/templates/wevu-retail/.editorconfig +0 -9
- package/templates/wevu-retail/.vscode/settings.json +0 -10
- package/templates/wevu-retail/AGENTS.md +0 -35
- package/templates/wevu-retail/README.md +0 -26
- package/templates/wevu-retail/auto-import-components.json +0 -1
- package/templates/wevu-retail/gitignore +0 -35
- package/templates/wevu-retail/package.json +0 -42
- package/templates/wevu-retail/postcss.config.js +0 -6
- package/templates/wevu-retail/project.config.json +0 -44
- package/templates/wevu-retail/project.private.config.json +0 -8
- package/templates/wevu-retail/src/app.vue +0 -104
- package/templates/wevu-retail/src/common/updateManager.ts +0 -29
- package/templates/wevu-retail/src/components/filter/index.vue +0 -134
- package/templates/wevu-retail/src/components/filter-popup/index.vue +0 -67
- package/templates/wevu-retail/src/components/goods-card/index.vue +0 -219
- package/templates/wevu-retail/src/components/goods-list/index.vue +0 -91
- package/templates/wevu-retail/src/components/load-more/index.vue +0 -99
- package/templates/wevu-retail/src/components/loading-content/index.vue +0 -48
- package/templates/wevu-retail/src/components/price/index.vue +0 -104
- package/templates/wevu-retail/src/components/promotion/ui-coupon-card/index.vue +0 -143
- package/templates/wevu-retail/src/components/promotion/ui-coupon-card/tools.wxs +0 -18
- package/templates/wevu-retail/src/components/swipeout/index.vue +0 -118
- package/templates/wevu-retail/src/components/swipeout/swipe.wxs +0 -151
- package/templates/wevu-retail/src/components/webp-image/index.vue +0 -105
- package/templates/wevu-retail/src/components/webp-image/utils.wxs +0 -140
- package/templates/wevu-retail/src/config/index.ts +0 -20437
- package/templates/wevu-retail/src/custom-tab-bar/data.ts +0 -22
- package/templates/wevu-retail/src/custom-tab-bar/index.vue +0 -62
- package/templates/wevu-retail/src/model/activities.ts +0 -7
- package/templates/wevu-retail/src/model/activity.ts +0 -18
- package/templates/wevu-retail/src/model/address.ts +0 -31
- package/templates/wevu-retail/src/model/cart.ts +0 -306
- package/templates/wevu-retail/src/model/category.ts +0 -175
- package/templates/wevu-retail/src/model/comments/queryDetail.ts +0 -50
- package/templates/wevu-retail/src/model/comments.ts +0 -298
- package/templates/wevu-retail/src/model/coupon.ts +0 -39
- package/templates/wevu-retail/src/model/detailsComments.ts +0 -30
- package/templates/wevu-retail/src/model/good.ts +0 -1904
- package/templates/wevu-retail/src/model/goods.ts +0 -7
- package/templates/wevu-retail/src/model/order/applyService.ts +0 -329
- package/templates/wevu-retail/src/model/order/orderConfirm.ts +0 -147
- package/templates/wevu-retail/src/model/order/orderDetail.ts +0 -1191
- package/templates/wevu-retail/src/model/order/orderList.ts +0 -1033
- package/templates/wevu-retail/src/model/promotion.ts +0 -20
- package/templates/wevu-retail/src/model/search.ts +0 -60
- package/templates/wevu-retail/src/model/submitComment.ts +0 -58
- package/templates/wevu-retail/src/model/swiper.ts +0 -39
- package/templates/wevu-retail/src/model/usercenter.ts +0 -52
- package/templates/wevu-retail/src/pages/cart/components/cart-bar/index.vue +0 -104
- package/templates/wevu-retail/src/pages/cart/components/cart-empty/index.vue +0 -41
- package/templates/wevu-retail/src/pages/cart/components/cart-group/index.vue +0 -333
- package/templates/wevu-retail/src/pages/cart/components/cart-group/index.wxs +0 -5
- package/templates/wevu-retail/src/pages/cart/components/cart-group/utils.wxs +0 -20
- package/templates/wevu-retail/src/pages/cart/components/goods-card/index.vue +0 -334
- package/templates/wevu-retail/src/pages/cart/components/specs-popup/index.vue +0 -100
- package/templates/wevu-retail/src/pages/cart/index.vue +0 -342
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/README.md +0 -95
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.vue +0 -73
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/index.vue +0 -121
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.vue +0 -74
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/index.vue +0 -102
- package/templates/wevu-retail/src/pages/category/components/goods-category/index.vue +0 -137
- package/templates/wevu-retail/src/pages/category/index.vue +0 -50
- package/templates/wevu-retail/src/pages/coupon/components/coupon-card/index.vue +0 -95
- package/templates/wevu-retail/src/pages/coupon/components/floating-button/index.vue +0 -44
- package/templates/wevu-retail/src/pages/coupon/coupon-activity-goods/index.vue +0 -135
- package/templates/wevu-retail/src/pages/coupon/coupon-detail/index.vue +0 -94
- package/templates/wevu-retail/src/pages/coupon/coupon-list/index.vue +0 -136
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/assets/play.png +0 -0
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/index.vue +0 -65
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/my-video/index.vue +0 -92
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/index.vue +0 -93
- package/templates/wevu-retail/src/pages/goods/comments/create/index.vue +0 -196
- package/templates/wevu-retail/src/pages/goods/comments/index.vue +0 -293
- package/templates/wevu-retail/src/pages/goods/details/components/buy-bar/index.vue +0 -117
- package/templates/wevu-retail/src/pages/goods/details/components/goods-specs-popup/index.vue +0 -440
- package/templates/wevu-retail/src/pages/goods/details/components/promotion-popup/index.vue +0 -83
- package/templates/wevu-retail/src/pages/goods/details/index.vue +0 -598
- package/templates/wevu-retail/src/pages/goods/list/index.vue +0 -299
- package/templates/wevu-retail/src/pages/goods/result/index.vue +0 -350
- package/templates/wevu-retail/src/pages/goods/search/index.vue +0 -196
- package/templates/wevu-retail/src/pages/home/home.vue +0 -215
- package/templates/wevu-retail/src/pages/home/readme +0 -8
- package/templates/wevu-retail/src/pages/order/after-service-detail/api.ts +0 -34
- package/templates/wevu-retail/src/pages/order/after-service-detail/index.vue +0 -430
- package/templates/wevu-retail/src/pages/order/after-service-list/api.ts +0 -1262
- package/templates/wevu-retail/src/pages/order/after-service-list/index.vue +0 -299
- package/templates/wevu-retail/src/pages/order/apply-service/index.vue +0 -665
- package/templates/wevu-retail/src/pages/order/components/after-service-button-bar/index.vue +0 -142
- package/templates/wevu-retail/src/pages/order/components/customer-service/index.vue +0 -75
- package/templates/wevu-retail/src/pages/order/components/goods-card/index.vue +0 -356
- package/templates/wevu-retail/src/pages/order/components/noGoods/noGood.wxs +0 -17
- package/templates/wevu-retail/src/pages/order/components/noGoods/noGoods.vue +0 -125
- package/templates/wevu-retail/src/pages/order/components/order-button-bar/index.vue +0 -262
- package/templates/wevu-retail/src/pages/order/components/order-card/index.vue +0 -126
- package/templates/wevu-retail/src/pages/order/components/order-goods-card/index.vue +0 -86
- package/templates/wevu-retail/src/pages/order/components/reason-sheet/index.vue +0 -161
- package/templates/wevu-retail/src/pages/order/components/reason-sheet/reasonSheet.ts +0 -25
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/mock.ts +0 -22
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupon.wxs +0 -16
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupons.vue +0 -207
- package/templates/wevu-retail/src/pages/order/components/specs-goods-card/index.vue +0 -185
- package/templates/wevu-retail/src/pages/order/config.ts +0 -94
- package/templates/wevu-retail/src/pages/order/delivery-detail/index.vue +0 -145
- package/templates/wevu-retail/src/pages/order/delivery-detail/isUrl.wxs +0 -7
- package/templates/wevu-retail/src/pages/order/fill-tracking-no/api.ts +0 -71
- package/templates/wevu-retail/src/pages/order/fill-tracking-no/index.vue +0 -267
- package/templates/wevu-retail/src/pages/order/invoice/index.vue +0 -94
- package/templates/wevu-retail/src/pages/order/order-confirm/components/address-card/index.vue +0 -78
- package/templates/wevu-retail/src/pages/order/order-confirm/getNotes.wxs +0 -11
- package/templates/wevu-retail/src/pages/order/order-confirm/handleInvoice.wxs +0 -11
- package/templates/wevu-retail/src/pages/order/order-confirm/index.vue +0 -707
- package/templates/wevu-retail/src/pages/order/order-confirm/order.wxs +0 -8
- package/templates/wevu-retail/src/pages/order/order-confirm/pay.ts +0 -115
- package/templates/wevu-retail/src/pages/order/order-detail/index.vue +0 -456
- package/templates/wevu-retail/src/pages/order/order-list/index.vue +0 -288
- package/templates/wevu-retail/src/pages/order/pay-result/index.vue +0 -77
- package/templates/wevu-retail/src/pages/order/receipt/index.vue +0 -336
- package/templates/wevu-retail/src/pages/promotion/promotion-detail/index.vue +0 -145
- package/templates/wevu-retail/src/pages/user/address/edit/index.vue +0 -514
- package/templates/wevu-retail/src/pages/user/address/list/index.vue +0 -249
- package/templates/wevu-retail/src/pages/user/components/t-location/index.vue +0 -156
- package/templates/wevu-retail/src/pages/user/components/ui-address-item/index.vue +0 -92
- package/templates/wevu-retail/src/pages/user/name-edit/index.vue +0 -49
- package/templates/wevu-retail/src/pages/user/person-info/index.vue +0 -198
- package/templates/wevu-retail/src/pages/usercenter/address/edit/util.ts +0 -33
- package/templates/wevu-retail/src/pages/usercenter/components/order-group/index.vue +0 -90
- package/templates/wevu-retail/src/pages/usercenter/components/ui-select-picker/index.vue +0 -108
- package/templates/wevu-retail/src/pages/usercenter/components/user-center-card/index.vue +0 -82
- package/templates/wevu-retail/src/pages/usercenter/index.vue +0 -301
- package/templates/wevu-retail/src/services/_utils/delay.ts +0 -3
- package/templates/wevu-retail/src/services/_utils/timeout.ts +0 -3
- package/templates/wevu-retail/src/services/activity/fetchActivity.ts +0 -20
- package/templates/wevu-retail/src/services/activity/fetchActivityList.ts +0 -20
- package/templates/wevu-retail/src/services/address/edit.ts +0 -33
- package/templates/wevu-retail/src/services/address/fetchAddress.ts +0 -48
- package/templates/wevu-retail/src/services/address/list.ts +0 -31
- package/templates/wevu-retail/src/services/cart/cart.ts +0 -20
- package/templates/wevu-retail/src/services/comments/fetchComments.ts +0 -18
- package/templates/wevu-retail/src/services/comments/fetchCommentsCount.ts +0 -18
- package/templates/wevu-retail/src/services/coupon/index.ts +0 -65
- package/templates/wevu-retail/src/services/good/comments/fetchCommentDetail.ts +0 -20
- package/templates/wevu-retail/src/services/good/fetchCategoryList.ts +0 -18
- package/templates/wevu-retail/src/services/good/fetchGood.ts +0 -18
- package/templates/wevu-retail/src/services/good/fetchGoods.ts +0 -29
- package/templates/wevu-retail/src/services/good/fetchGoodsDetailsComments.ts +0 -37
- package/templates/wevu-retail/src/services/good/fetchGoodsList.ts +0 -39
- package/templates/wevu-retail/src/services/good/fetchSearchHistory.ts +0 -35
- package/templates/wevu-retail/src/services/good/fetchSearchResult.ts +0 -38
- package/templates/wevu-retail/src/services/home/home.ts +0 -53
- package/templates/wevu-retail/src/services/order/applyService.ts +0 -70
- package/templates/wevu-retail/src/services/order/orderConfirm.ts +0 -69
- package/templates/wevu-retail/src/services/order/orderDetail.ts +0 -39
- package/templates/wevu-retail/src/services/order/orderList.ts +0 -39
- package/templates/wevu-retail/src/services/order/orderSubmitComment.ts +0 -22
- package/templates/wevu-retail/src/services/promotion/detail.ts +0 -18
- package/templates/wevu-retail/src/services/usercenter/fetchPerson.ts +0 -28
- package/templates/wevu-retail/src/services/usercenter/fetchUsercenter.ts +0 -18
- package/templates/wevu-retail/src/sitemap.json +0 -7
- package/templates/wevu-retail/src/utils/addressParse.ts +0 -25
- package/templates/wevu-retail/src/utils/getPermission.ts +0 -45
- package/templates/wevu-retail/src/utils/mock.ts +0 -51
- package/templates/wevu-retail/src/utils/util.ts +0 -134
- package/templates/wevu-retail/src/vite-env.d.ts +0 -1
- package/templates/wevu-retail/tailwind.config.ts +0 -15
- package/templates/wevu-retail/tsconfig.app.json +0 -58
- package/templates/wevu-retail/tsconfig.json +0 -11
- package/templates/wevu-retail/tsconfig.node.json +0 -33
- package/templates/wevu-retail/vite.config.ts +0 -14
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { getGoodsList } from './goods';
|
|
2
|
-
|
|
3
|
-
export function getPromotion(baseID = 0, length = 10) {
|
|
4
|
-
return {
|
|
5
|
-
list: getGoodsList(baseID, length).map((item) => {
|
|
6
|
-
return {
|
|
7
|
-
spuId: item.spuId,
|
|
8
|
-
thumb: item.primaryImage,
|
|
9
|
-
title: item.title,
|
|
10
|
-
price: item.minSalePrice,
|
|
11
|
-
originPrice: item.maxLinePrice,
|
|
12
|
-
tags: item.spuTagList.map((tag) => ({ title: tag.title })),
|
|
13
|
-
};
|
|
14
|
-
}),
|
|
15
|
-
banner: 'https://tdesign.gtimg.com/miniprogram/template/retail/promotion/banner-promotion.png',
|
|
16
|
-
time: 1000 * 60 * 60 * 20,
|
|
17
|
-
showBannerDesc: true,
|
|
18
|
-
statusTag: 'running',
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { getGoodsList } from './goods';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @param {number} sort
|
|
5
|
-
* @param {number} pageNum
|
|
6
|
-
* @param {number} pageSize
|
|
7
|
-
* @param {number} minPrice
|
|
8
|
-
* @param {number} maxPrice
|
|
9
|
-
* @param {string} keyword
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
export function getSearchHistory() {
|
|
13
|
-
return {
|
|
14
|
-
historyWords: [
|
|
15
|
-
'鸡',
|
|
16
|
-
'电脑',
|
|
17
|
-
'iPhone12',
|
|
18
|
-
'车载手机支架',
|
|
19
|
-
'自然堂',
|
|
20
|
-
'小米10',
|
|
21
|
-
'原浆古井贡酒',
|
|
22
|
-
'欧米伽',
|
|
23
|
-
'华为',
|
|
24
|
-
'针织半身裙',
|
|
25
|
-
'氢跑鞋',
|
|
26
|
-
'三盒处理器',
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function getSearchPopular() {
|
|
32
|
-
return {
|
|
33
|
-
popularWords: [
|
|
34
|
-
'鸡',
|
|
35
|
-
'电脑',
|
|
36
|
-
'iPhone12',
|
|
37
|
-
'车载手机支架',
|
|
38
|
-
'自然堂',
|
|
39
|
-
'小米10',
|
|
40
|
-
'原浆古井贡酒',
|
|
41
|
-
'欧米伽',
|
|
42
|
-
'华为',
|
|
43
|
-
'针织半身裙',
|
|
44
|
-
'氢跑鞋',
|
|
45
|
-
'三盒处理器',
|
|
46
|
-
],
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function getSearchResult() {
|
|
51
|
-
return {
|
|
52
|
-
saasId: null,
|
|
53
|
-
storeId: null,
|
|
54
|
-
pageNum: 1,
|
|
55
|
-
pageSize: 30,
|
|
56
|
-
totalCount: 1,
|
|
57
|
-
spuList: getGoodsList(7),
|
|
58
|
-
algId: 0,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export function getGoods() {
|
|
2
|
-
return {
|
|
3
|
-
goods: [
|
|
4
|
-
{
|
|
5
|
-
squid: '1',
|
|
6
|
-
checkItems: [
|
|
7
|
-
{
|
|
8
|
-
name: '匿名评价',
|
|
9
|
-
value: 'anonymous',
|
|
10
|
-
checked: false,
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
detail: {
|
|
14
|
-
image:
|
|
15
|
-
'https://wx.qlogo.cn/mmopen/vi_32/51VSMNuy1CyHiaAhAjLJ00kMZVqqnCqXeZduCLXHUBr52zFHRGxwL7kGia3fHj8GSNzFcqFDInQmRGM1eWjtQgqA/132',
|
|
16
|
-
title: '',
|
|
17
|
-
},
|
|
18
|
-
goodComment: {
|
|
19
|
-
/** 商品评价 */
|
|
20
|
-
rate: 0,
|
|
21
|
-
/** 评价内容 */
|
|
22
|
-
label: '123',
|
|
23
|
-
/** 上传图片 */
|
|
24
|
-
images: [],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
squid: '2',
|
|
29
|
-
checkItems: [
|
|
30
|
-
{
|
|
31
|
-
name: '匿名评价',
|
|
32
|
-
value: 'anonymous',
|
|
33
|
-
checked: false,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
detail: {
|
|
37
|
-
image:
|
|
38
|
-
'https://wx.qlogo.cn/mmopen/vi_32/51VSMNuy1CyHiaAhAjLJ00kMZVqqnCqXeZduCLXHUBr52zFHRGxwL7kGia3fHj8GSNzFcqFDInQmRGM1eWjtQgqA/132',
|
|
39
|
-
title: '评价内容 山姆智利进口',
|
|
40
|
-
},
|
|
41
|
-
goodComment: {
|
|
42
|
-
/** 商品评价 */
|
|
43
|
-
rate: 0,
|
|
44
|
-
/** 评价内容 */
|
|
45
|
-
label: '山姆智利进口',
|
|
46
|
-
/** 上传图片 */
|
|
47
|
-
images: [],
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
storeComment: {
|
|
52
|
-
/** 物流评价 */
|
|
53
|
-
logisticsRate: 0,
|
|
54
|
-
/** 服务评价 */
|
|
55
|
-
servicesRate: 0,
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// const images = [
|
|
2
|
-
// {
|
|
3
|
-
// img: 'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner1.png',
|
|
4
|
-
// text: '1',
|
|
5
|
-
// },
|
|
6
|
-
// {
|
|
7
|
-
// img: 'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner2.png',
|
|
8
|
-
// text: '2',
|
|
9
|
-
// },
|
|
10
|
-
// {
|
|
11
|
-
// img: 'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner3.png',
|
|
12
|
-
// text: '3',
|
|
13
|
-
// },
|
|
14
|
-
// {
|
|
15
|
-
// img: 'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner4.png',
|
|
16
|
-
// text: '4',
|
|
17
|
-
// },
|
|
18
|
-
// {
|
|
19
|
-
// img: 'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner5.png',
|
|
20
|
-
// text: '5',
|
|
21
|
-
// },
|
|
22
|
-
// {
|
|
23
|
-
// img: 'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner6.png',
|
|
24
|
-
// text: '6',
|
|
25
|
-
// },
|
|
26
|
-
// ];
|
|
27
|
-
|
|
28
|
-
const images = [
|
|
29
|
-
'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner1.png',
|
|
30
|
-
'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner2.png',
|
|
31
|
-
'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner3.png',
|
|
32
|
-
'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner4.png',
|
|
33
|
-
'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner5.png',
|
|
34
|
-
'https://tdesign.gtimg.com/miniprogram/template/retail/home/v2/banner6.png',
|
|
35
|
-
];
|
|
36
|
-
|
|
37
|
-
export function genSwiperImageList() {
|
|
38
|
-
return images;
|
|
39
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
const userInfo = {
|
|
2
|
-
avatarUrl:
|
|
3
|
-
'https://we-retail-static-1300977798.cos.ap-guangzhou.myqcloud.com/retail-ui/components-exp/avatar/avatar-1.jpg',
|
|
4
|
-
nickName: 'TDesign 🌟',
|
|
5
|
-
phoneNumber: '13438358888',
|
|
6
|
-
gender: 2,
|
|
7
|
-
};
|
|
8
|
-
const countsData = [
|
|
9
|
-
{
|
|
10
|
-
num: 2,
|
|
11
|
-
name: '积分',
|
|
12
|
-
type: 'point',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
num: 10,
|
|
16
|
-
name: '优惠券',
|
|
17
|
-
type: 'coupon',
|
|
18
|
-
},
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
const orderTagInfos = [
|
|
22
|
-
{
|
|
23
|
-
orderNum: 1,
|
|
24
|
-
tabType: 5,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
orderNum: 1,
|
|
28
|
-
tabType: 10,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
orderNum: 1,
|
|
32
|
-
tabType: 40,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
orderNum: 0,
|
|
36
|
-
tabType: 0,
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
|
|
40
|
-
const customerServiceInfo = {
|
|
41
|
-
servicePhone: '4006336868',
|
|
42
|
-
serviceTimeDuration: '每周三至周五 9:00-12:00 13:00-15:00',
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const genSimpleUserInfo = () => ({ ...userInfo });
|
|
46
|
-
|
|
47
|
-
export const genUsercenter = () => ({
|
|
48
|
-
userInfo,
|
|
49
|
-
countsData,
|
|
50
|
-
orderTagInfos,
|
|
51
|
-
customerServiceInfo,
|
|
52
|
-
});
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
Component({
|
|
3
|
-
options: {
|
|
4
|
-
addGlobalClass: true,
|
|
5
|
-
},
|
|
6
|
-
/**
|
|
7
|
-
* 组件的属性列表
|
|
8
|
-
*/
|
|
9
|
-
properties: {
|
|
10
|
-
isAllSelected: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
value: false,
|
|
13
|
-
},
|
|
14
|
-
totalAmount: {
|
|
15
|
-
type: Number,
|
|
16
|
-
value: 1,
|
|
17
|
-
},
|
|
18
|
-
totalGoodsNum: {
|
|
19
|
-
type: Number,
|
|
20
|
-
value: 0,
|
|
21
|
-
observer(num) {
|
|
22
|
-
const isDisabled = num == 0;
|
|
23
|
-
setTimeout(() => {
|
|
24
|
-
this.setData({
|
|
25
|
-
isDisabled,
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
totalDiscountAmount: {
|
|
31
|
-
type: Number,
|
|
32
|
-
value: 0,
|
|
33
|
-
},
|
|
34
|
-
bottomHeight: {
|
|
35
|
-
type: Number,
|
|
36
|
-
value: 100,
|
|
37
|
-
},
|
|
38
|
-
fixed: Boolean,
|
|
39
|
-
},
|
|
40
|
-
data: {
|
|
41
|
-
isDisabled: false,
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
methods: {
|
|
45
|
-
handleSelectAll() {
|
|
46
|
-
const { isAllSelected } = this.data;
|
|
47
|
-
this.setData({
|
|
48
|
-
isAllSelected: !isAllSelected,
|
|
49
|
-
});
|
|
50
|
-
this.triggerEvent('handleSelectAll', {
|
|
51
|
-
isAllSelected: isAllSelected,
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
handleToSettle() {
|
|
56
|
-
if (this.data.isDisabled) return;
|
|
57
|
-
this.triggerEvent('handleToSettle');
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<template>
|
|
64
|
-
<view class="cart-bar__placeholder [height:100rpx]" wx:if="{{fixed}}" />
|
|
65
|
-
<view class="cart-bar {{fixed ? 'cart-bar--fixed' : ''}} flex flex-v-center [display:flex] [align-items:center] [height:112rpx] [background-color:#fff] [border-top:1rpx_solid_#e5e5e5] [padding:16rpx_32rpx] [box-sizing:border-box] [font-size:24rpx] [line-height:36rpx] [color:#333] [position:fixed] [left:0] [right:0] [z-index:99] [bottom:calc(100rpx_+_env(safe-area-inset-bottom))] [&_.cart-bar__check]:[margin-right:12rpx] [&_.cart-bar__total]:[margin-left:24rpx] [&_.account-btn]:[width:192rpx] [&_.account-btn]:[height:80rpx] [&_.account-btn]:[border-radius:40rpx] [&_.account-btn]:[background-color:#fa4126] [&_.account-btn]:[font-size:28rpx] [&_.account-btn]:[font-weight:bold] [&_.account-btn]:[line-height:80rpx] [&_.account-btn]:[color:#ffffff] [&_.account-btn]:[text-align:center] [&_.disabled-btn]:[background-color:#cccccc] [&_.hover-btn]:[opacity:0.5]" style="bottom: {{fixed ? 'calc(' + bottomHeight + 'rpx + env(safe-area-inset-bottom))' : ''}};">
|
|
66
|
-
<t-icon
|
|
67
|
-
size="40rpx"
|
|
68
|
-
color="{{isAllSelected ? '#FA4126' : '#BBBBBB'}}"
|
|
69
|
-
name="{{isAllSelected ? 'check-circle-filled' : 'circle'}}"
|
|
70
|
-
class="cart-bar__check"
|
|
71
|
-
catchtap="handleSelectAll"
|
|
72
|
-
/>
|
|
73
|
-
<text>全选</text>
|
|
74
|
-
<view class="cart-bar__total flex1 [flex:1] [display:flex] [&_.cart-bar__total--bold]:[font-size:28rpx] [&_.cart-bar__total--bold]:[line-height:40rpx] [&_.cart-bar__total--bold]:[color:#333] [&_.cart-bar__total--bold]:[font-weight:bold] [&_.cart-bar__total--normal]:[font-size:24rpx] [&_.cart-bar__total--normal]:[line-height:32rpx] [&_.cart-bar__total--normal]:[color:#999] [&_.cart-bar__total--price]:[color:#fa4126] [&_.cart-bar__total--price]:[font-weight:bold]">
|
|
75
|
-
<view>
|
|
76
|
-
<text class="cart-bar__total--bold text-padding-right [padding-right:4rpx]">总计</text>
|
|
77
|
-
<price
|
|
78
|
-
price="{{totalAmount || '0'}}"
|
|
79
|
-
fill="{{false}}"
|
|
80
|
-
decimalSmaller
|
|
81
|
-
class="cart-bar__total--bold cart-bar__total--price"
|
|
82
|
-
/>
|
|
83
|
-
<text class="cart-bar__total--normal">(不含运费)</text>
|
|
84
|
-
</view>
|
|
85
|
-
<view wx:if="{{totalDiscountAmount}}">
|
|
86
|
-
<text class="cart-bar__total--normal text-padding-right [padding-right:4rpx]">已优惠</text>
|
|
87
|
-
<price class="cart-bar__total--normal" price="{{totalDiscountAmount || '0'}}" fill="{{false}}" />
|
|
88
|
-
</view>
|
|
89
|
-
</view>
|
|
90
|
-
<view catchtap="handleToSettle" class="{{!isDisabled ? '' : 'disabled-btn'}} account-btn" hover-class="{{!isDisabled ? '' : 'hover-btn'}}">
|
|
91
|
-
去结算({{totalGoodsNum}})
|
|
92
|
-
</view>
|
|
93
|
-
</view>
|
|
94
|
-
|
|
95
|
-
</template>
|
|
96
|
-
|
|
97
|
-
<json>
|
|
98
|
-
{
|
|
99
|
-
"component": true,
|
|
100
|
-
"usingComponents": {
|
|
101
|
-
"price": "/components/price/index",
|
|
102
|
-
"t-icon": "tdesign-miniprogram/icon/icon"
|
|
103
|
-
}
|
|
104
|
-
}</json>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
Component({
|
|
3
|
-
properties: {
|
|
4
|
-
imgUrl: {
|
|
5
|
-
type: String,
|
|
6
|
-
value: 'https://tdesign.gtimg.com/miniprogram/template/retail/template/empty-cart.png',
|
|
7
|
-
},
|
|
8
|
-
tip: {
|
|
9
|
-
type: String,
|
|
10
|
-
value: '购物车是空的',
|
|
11
|
-
},
|
|
12
|
-
btnText: {
|
|
13
|
-
type: String,
|
|
14
|
-
value: '去首页',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
data: {},
|
|
18
|
-
methods: {
|
|
19
|
-
handleClick() {
|
|
20
|
-
this.triggerEvent('handleClick');
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<view class="cart-empty [padding:64rpx_0rpx] [display:flex] [flex-direction:column] [align-items:center] [box-sizing:border-box] [height:calc(100vh_-_100rpx)] [background-color:#f5f5f5] [&_.cart-img]:[width:160rpx] [&_.cart-img]:[height:160rpx] [&_.cart-img]:[margin-bottom:24rpx] [&_.tip]:[font-size:28rpx] [&_.tip]:[line-height:40rpx] [&_.tip]:[color:#999] [&_.tip]:[margin-bottom:24rpx] [&_.btn]:[width:240rpx] [&_.btn]:[height:72rpx] [&_.btn]:[border-radius:36rpx] [&_.btn]:[text-align:center] [&_.btn]:[line-height:72rpx] [&_.btn]:[border:2rpx_solid_#fa4126] [&_.btn]:[color:#fa4126] [&_.btn]:[background-color:transparent] [&_.btn]:[font-size:28rpx] [&_.btn]:[font-weight:bold]">
|
|
28
|
-
<t-image t-class="cart-img" src="{{imgUrl}}" />
|
|
29
|
-
<view class="tip">{{tip}}</view>
|
|
30
|
-
<view class="btn" bind:tap="handleClick">{{btnText}}</view>
|
|
31
|
-
</view>
|
|
32
|
-
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<json>
|
|
36
|
-
{
|
|
37
|
-
"component": true,
|
|
38
|
-
"usingComponents": {
|
|
39
|
-
"t-image": "/components/webp-image/index"
|
|
40
|
-
}
|
|
41
|
-
}</json>
|