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,301 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { fetchUserCenter } from '../../services/usercenter/fetchUsercenter';
|
|
3
|
-
import Toast from 'tdesign-miniprogram/toast/index';
|
|
4
|
-
|
|
5
|
-
const menuData = [
|
|
6
|
-
[
|
|
7
|
-
{
|
|
8
|
-
title: '收货地址',
|
|
9
|
-
tit: '',
|
|
10
|
-
url: '',
|
|
11
|
-
type: 'address',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
title: '优惠券',
|
|
15
|
-
tit: '',
|
|
16
|
-
url: '',
|
|
17
|
-
type: 'coupon',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: '积分',
|
|
21
|
-
tit: '',
|
|
22
|
-
url: '',
|
|
23
|
-
type: 'point',
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
{
|
|
28
|
-
title: '帮助中心',
|
|
29
|
-
tit: '',
|
|
30
|
-
url: '',
|
|
31
|
-
type: 'help-center',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: '客服热线',
|
|
35
|
-
tit: '',
|
|
36
|
-
url: '',
|
|
37
|
-
type: 'service',
|
|
38
|
-
icon: 'service',
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
const orderTagInfos = [
|
|
44
|
-
{
|
|
45
|
-
title: '待付款',
|
|
46
|
-
iconName: 'wallet',
|
|
47
|
-
orderNum: 0,
|
|
48
|
-
tabType: 5,
|
|
49
|
-
status: 1,
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
title: '待发货',
|
|
53
|
-
iconName: 'deliver',
|
|
54
|
-
orderNum: 0,
|
|
55
|
-
tabType: 10,
|
|
56
|
-
status: 1,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
title: '待收货',
|
|
60
|
-
iconName: 'package',
|
|
61
|
-
orderNum: 0,
|
|
62
|
-
tabType: 40,
|
|
63
|
-
status: 1,
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
title: '待评价',
|
|
67
|
-
iconName: 'comment',
|
|
68
|
-
orderNum: 0,
|
|
69
|
-
tabType: 60,
|
|
70
|
-
status: 1,
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
title: '退款/售后',
|
|
74
|
-
iconName: 'exchang',
|
|
75
|
-
orderNum: 0,
|
|
76
|
-
tabType: 0,
|
|
77
|
-
status: 1,
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
|
|
81
|
-
const getDefaultData = () => ({
|
|
82
|
-
showMakePhone: false,
|
|
83
|
-
userInfo: {
|
|
84
|
-
avatarUrl: '',
|
|
85
|
-
nickName: '正在登录...',
|
|
86
|
-
phoneNumber: '',
|
|
87
|
-
},
|
|
88
|
-
menuData,
|
|
89
|
-
orderTagInfos,
|
|
90
|
-
customerServiceInfo: {},
|
|
91
|
-
currAuthStep: 1,
|
|
92
|
-
showKefu: true,
|
|
93
|
-
versionNo: '',
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
Page({
|
|
97
|
-
data: getDefaultData(),
|
|
98
|
-
|
|
99
|
-
onLoad() {
|
|
100
|
-
this.getVersionInfo();
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
onShow() {
|
|
104
|
-
this.getTabBar().init();
|
|
105
|
-
this.init();
|
|
106
|
-
},
|
|
107
|
-
onPullDownRefresh() {
|
|
108
|
-
this.init();
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
init() {
|
|
112
|
-
this.fetUseriInfoHandle();
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
fetUseriInfoHandle() {
|
|
116
|
-
fetchUserCenter().then(({ userInfo, countsData, orderTagInfos: orderInfo, customerServiceInfo }) => {
|
|
117
|
-
// eslint-disable-next-line no-unused-expressions
|
|
118
|
-
menuData?.[0].forEach((v) => {
|
|
119
|
-
countsData.forEach((counts) => {
|
|
120
|
-
if (counts.type === v.type) {
|
|
121
|
-
// eslint-disable-next-line no-param-reassign
|
|
122
|
-
v.tit = counts.num;
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
const info = orderTagInfos.map((v, index) => ({
|
|
127
|
-
...v,
|
|
128
|
-
...orderInfo[index],
|
|
129
|
-
}));
|
|
130
|
-
this.setData({
|
|
131
|
-
userInfo,
|
|
132
|
-
menuData,
|
|
133
|
-
orderTagInfos: info,
|
|
134
|
-
customerServiceInfo,
|
|
135
|
-
currAuthStep: 2,
|
|
136
|
-
});
|
|
137
|
-
wx.stopPullDownRefresh();
|
|
138
|
-
});
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
onClickCell({ currentTarget }) {
|
|
142
|
-
const { type } = currentTarget.dataset;
|
|
143
|
-
|
|
144
|
-
switch (type) {
|
|
145
|
-
case 'address': {
|
|
146
|
-
wx.navigateTo({ url: '/pages/user/address/list/index' });
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
case 'service': {
|
|
150
|
-
this.openMakePhone();
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
case 'help-center': {
|
|
154
|
-
Toast({
|
|
155
|
-
context: this,
|
|
156
|
-
selector: '#t-toast',
|
|
157
|
-
message: '你点击了帮助中心',
|
|
158
|
-
icon: '',
|
|
159
|
-
duration: 1000,
|
|
160
|
-
});
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
case 'point': {
|
|
164
|
-
Toast({
|
|
165
|
-
context: this,
|
|
166
|
-
selector: '#t-toast',
|
|
167
|
-
message: '你点击了积分菜单',
|
|
168
|
-
icon: '',
|
|
169
|
-
duration: 1000,
|
|
170
|
-
});
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
case 'coupon': {
|
|
174
|
-
wx.navigateTo({ url: '/pages/coupon/coupon-list/index' });
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
default: {
|
|
178
|
-
Toast({
|
|
179
|
-
context: this,
|
|
180
|
-
selector: '#t-toast',
|
|
181
|
-
message: '未知跳转',
|
|
182
|
-
icon: '',
|
|
183
|
-
duration: 1000,
|
|
184
|
-
});
|
|
185
|
-
break;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
|
|
190
|
-
jumpNav(e) {
|
|
191
|
-
const status = e.detail.tabType;
|
|
192
|
-
|
|
193
|
-
if (status === 0) {
|
|
194
|
-
wx.navigateTo({ url: '/pages/order/after-service-list/index' });
|
|
195
|
-
} else {
|
|
196
|
-
wx.navigateTo({ url: `/pages/order/order-list/index?status=${status}` });
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
jumpAllOrder() {
|
|
201
|
-
wx.navigateTo({ url: '/pages/order/order-list/index' });
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
openMakePhone() {
|
|
205
|
-
this.setData({ showMakePhone: true });
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
closeMakePhone() {
|
|
209
|
-
this.setData({ showMakePhone: false });
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
call() {
|
|
213
|
-
wx.makePhoneCall({
|
|
214
|
-
phoneNumber: this.data.customerServiceInfo.servicePhone,
|
|
215
|
-
});
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
gotoUserEditPage() {
|
|
219
|
-
const { currAuthStep } = this.data;
|
|
220
|
-
if (currAuthStep === 2) {
|
|
221
|
-
wx.navigateTo({ url: '/pages/user/person-info/index' });
|
|
222
|
-
} else {
|
|
223
|
-
this.fetUseriInfoHandle();
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
getVersionInfo() {
|
|
228
|
-
const versionInfo = wx.getAccountInfoSync();
|
|
229
|
-
const { version, envVersion = __wxConfig } = versionInfo.miniProgram;
|
|
230
|
-
this.setData({
|
|
231
|
-
versionNo: envVersion === 'release' ? version : envVersion,
|
|
232
|
-
});
|
|
233
|
-
},
|
|
234
|
-
});
|
|
235
|
-
</script>
|
|
236
|
-
|
|
237
|
-
<template>
|
|
238
|
-
<t-user-center-card
|
|
239
|
-
userInfo="{{userInfo}}"
|
|
240
|
-
isPhoneHide="{{true}}"
|
|
241
|
-
name-class="custom-name-class"
|
|
242
|
-
phone-class="custom-phone-class"
|
|
243
|
-
avatar-class="customer-avatar-class"
|
|
244
|
-
currAuthStep="{{currAuthStep}}"
|
|
245
|
-
bind:gotoUserEditPage="gotoUserEditPage"
|
|
246
|
-
/>
|
|
247
|
-
<view class="content-wrapper [margin-top:340rpx] [position:relative] [padding:0_30rpx]">
|
|
248
|
-
<view class="order-group-wrapper [margin-bottom:16rpx]">
|
|
249
|
-
<t-order-group orderTagInfos="{{orderTagInfos}}" bind:onClickTop="jumpAllOrder" bind:onClickItem="jumpNav" />
|
|
250
|
-
</view>
|
|
251
|
-
<view wx:for="{{menuData}}" wx:key="item" class="cell-box [border-radius:10rpx] [overflow:hidden] [margin-bottom:20rpx] [&_.order-group__left]:[margin-right:0] [&_.t-cell-padding]:[padding:24rpx_18rpx_24rpx_32rpx]">
|
|
252
|
-
<t-cell-group>
|
|
253
|
-
<t-cell
|
|
254
|
-
wx:for="{{item}}"
|
|
255
|
-
wx:for-item="xitem"
|
|
256
|
-
wx:for-index="xindex"
|
|
257
|
-
wx:key="xindex"
|
|
258
|
-
title="{{xitem.title}}"
|
|
259
|
-
arrow="{{!xitem.icon}}"
|
|
260
|
-
note="{{xitem.tit}}"
|
|
261
|
-
data-type="{{xitem.type}}"
|
|
262
|
-
bordered="{{false}}"
|
|
263
|
-
bind:click="onClickCell"
|
|
264
|
-
t-class="t-cell-padding"
|
|
265
|
-
t-class-note="order-group-note"
|
|
266
|
-
t-class-left="order-group__left"
|
|
267
|
-
>
|
|
268
|
-
<t-icon name="{{xitem.icon}}" size="48rpx" slot="note" />
|
|
269
|
-
</t-cell>
|
|
270
|
-
</t-cell-group>
|
|
271
|
-
</view>
|
|
272
|
-
</view>
|
|
273
|
-
<view class="footer__version [text-align:center] [margin-top:50rpx] [color:#999] [margin-bottom:4rpx] [font-size:24rpx] [line-height:32rpx]" wx:if="{{versionNo !== ''}}">当前版本 {{versionNo}}</view>
|
|
274
|
-
<t-popup visible="{{showMakePhone}}" placement="bottom" bind:visible-change="closeMakePhone" data-index="2">
|
|
275
|
-
<view class="popup-content [background:#f5f5f5] [margin-bottom:env(safe-area-inset-bottom)] [border-radius:16rpx_16rpx_0_0] [&_.popup-title]:[background:#fff] [&_.popup-title]:[text-align:center] [&_.popup-title]:[font-size:24rpx] [&_.popup-title]:[color:#999] [&_.popup-title]:[height:112rpx] [&_.popup-title]:[line-height:112rpx] [&_.popup-title]:[border-radius:16rpx_16rpx_0_0] [&_.popup-phone]:[background:#fff] [&_.popup-phone]:[height:100rpx] [&_.popup-phone]:[display:flex] [&_.popup-phone]:[justify-content:center] [&_.popup-phone]:[align-items:center] [&_.popup-phone]:[text-align:center] [&_.popup-phone]:[font-size:30rpx] [&_.popup-phone]:[font-family:PingFangSC-Regular,_PingFang_SC] [&_.popup-phone]:[font-weight:400] [&_.popup-phone]:[color:#333] [&_.popup-close]:[background:#fff] [&_.popup-close]:[height:100rpx] [&_.popup-close]:[display:flex] [&_.popup-close]:[justify-content:center] [&_.popup-close]:[align-items:center] [&_.popup-close]:[text-align:center] [&_.popup-close]:[font-size:30rpx] [&_.popup-close]:[font-family:PingFangSC-Regular,_PingFang_SC] [&_.popup-close]:[font-weight:400] [&_.popup-close]:[color:#333] [&_.popup-phone_.online]:[margin-bottom:20rpx] [&_.popup-close]:[border:0] [&_.popup-close]:[margin-top:16rpx]">
|
|
276
|
-
<view class="popup-title border-bottom-1px [position:relative]" wx:if="{{customerServiceInfo.serviceTimeDuration}}">
|
|
277
|
-
服务时间: {{customerServiceInfo.serviceTimeDuration}}
|
|
278
|
-
</view>
|
|
279
|
-
<view class="popup-phone {{showKefu ? 'border-bottom-1px' : ''}} [position:relative]" bind:tap="call">电话客服</view>
|
|
280
|
-
<button class="popup-phone border-bottom-1px online [position:relative]" open-type="contact" wx:if="{{showKefu}}">在线客服</button>
|
|
281
|
-
<view class="popup-close" bind:tap="closeMakePhone">取消</view>
|
|
282
|
-
</view>
|
|
283
|
-
</t-popup>
|
|
284
|
-
<t-toast id="t-toast" />
|
|
285
|
-
</template>
|
|
286
|
-
|
|
287
|
-
<json>
|
|
288
|
-
{
|
|
289
|
-
"navigationBarTitleText": "个人中心",
|
|
290
|
-
"navigationStyle": "custom",
|
|
291
|
-
"usingComponents": {
|
|
292
|
-
"t-popup": "tdesign-miniprogram/popup/popup",
|
|
293
|
-
"t-icon": "tdesign-miniprogram/icon/icon",
|
|
294
|
-
"t-cell-group": "tdesign-miniprogram/cell-group/cell-group",
|
|
295
|
-
"t-cell": "tdesign-miniprogram/cell/cell",
|
|
296
|
-
"t-user-center-card": "./components/user-center-card/index",
|
|
297
|
-
"t-order-group": "./components/order-group/index",
|
|
298
|
-
"t-toast": "tdesign-miniprogram/toast/toast"
|
|
299
|
-
},
|
|
300
|
-
"enablePullDownRefresh": true
|
|
301
|
-
}</json>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取活动列表 */
|
|
4
|
-
function mockFetchActivity(ID = 0) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { getActivity } = require('../../model/activity');
|
|
7
|
-
|
|
8
|
-
return delay().then(() => getActivity(ID));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** 获取活动列表 */
|
|
12
|
-
export function fetchActivity(ID = 0) {
|
|
13
|
-
if (config.useMock) {
|
|
14
|
-
return mockFetchActivity(ID);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return new Promise((resolve) => {
|
|
18
|
-
resolve('real api');
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取活动列表 */
|
|
4
|
-
function mockFetchActivityList(pageIndex = 1, pageSize = 20) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { getActivityList } = require('../../model/activities');
|
|
7
|
-
|
|
8
|
-
return delay().then(() => getActivityList(pageIndex, pageSize));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** 获取活动列表 */
|
|
12
|
-
export function fetchActivityList(pageIndex = 1, pageSize = 20) {
|
|
13
|
-
if (config.useMock) {
|
|
14
|
-
return mockFetchActivityList(pageIndex, pageSize);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return new Promise((resolve) => {
|
|
18
|
-
resolve('real api');
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
let addressPromise = [];
|
|
2
|
-
|
|
3
|
-
/** 地址编辑Promise */
|
|
4
|
-
export const getAddressPromise = () => {
|
|
5
|
-
let resolver;
|
|
6
|
-
let rejecter;
|
|
7
|
-
const nextPromise = new Promise((resolve, reject) => {
|
|
8
|
-
resolver = resolve;
|
|
9
|
-
rejecter = reject;
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
addressPromise.push({ resolver, rejecter });
|
|
13
|
-
|
|
14
|
-
return nextPromise;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** 用户保存了一个地址 */
|
|
18
|
-
export const resolveAddress = (address) => {
|
|
19
|
-
const allAddress = [...addressPromise];
|
|
20
|
-
addressPromise = [];
|
|
21
|
-
|
|
22
|
-
console.info('用户保存了一个地址', address);
|
|
23
|
-
|
|
24
|
-
allAddress.forEach(({ resolver }) => resolver(address));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/** 取消编辑 */
|
|
28
|
-
export const rejectAddress = () => {
|
|
29
|
-
const allAddress = [...addressPromise];
|
|
30
|
-
addressPromise = [];
|
|
31
|
-
|
|
32
|
-
allAddress.forEach(({ rejecter }) => rejecter(new Error('cancel')));
|
|
33
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取收货地址 */
|
|
4
|
-
function mockFetchDeliveryAddress(id) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { genAddress } = require('../../model/address');
|
|
7
|
-
|
|
8
|
-
return delay().then(() => genAddress(id));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** 获取收货地址 */
|
|
12
|
-
export function fetchDeliveryAddress(id = 0) {
|
|
13
|
-
if (config.useMock) {
|
|
14
|
-
return mockFetchDeliveryAddress(id);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return new Promise((resolve) => {
|
|
18
|
-
resolve('real api');
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** 获取收货地址列表 */
|
|
23
|
-
function mockFetchDeliveryAddressList(len = 0) {
|
|
24
|
-
const { delay } = require('../_utils/delay');
|
|
25
|
-
const { genAddressList } = require('../../model/address');
|
|
26
|
-
|
|
27
|
-
return delay().then(() =>
|
|
28
|
-
genAddressList(len).map((address) => {
|
|
29
|
-
return {
|
|
30
|
-
...address,
|
|
31
|
-
phoneNumber: address.phone,
|
|
32
|
-
address: `${address.provinceName}${address.cityName}${address.districtName}${address.detailAddress}`,
|
|
33
|
-
tag: address.addressTag,
|
|
34
|
-
};
|
|
35
|
-
}),
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** 获取收货地址列表 */
|
|
40
|
-
export function fetchDeliveryAddressList(len = 10) {
|
|
41
|
-
if (config.useMock) {
|
|
42
|
-
return mockFetchDeliveryAddressList(len);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return new Promise((resolve) => {
|
|
46
|
-
resolve('real api');
|
|
47
|
-
});
|
|
48
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
let addressPromise = [];
|
|
2
|
-
|
|
3
|
-
/** 获取一个地址选择Promise */
|
|
4
|
-
export const getAddressPromise = () => {
|
|
5
|
-
let resolver;
|
|
6
|
-
let rejecter;
|
|
7
|
-
const nextPromise = new Promise((resolve, reject) => {
|
|
8
|
-
resolver = resolve;
|
|
9
|
-
rejecter = reject;
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
addressPromise.push({ resolver, rejecter });
|
|
13
|
-
|
|
14
|
-
return nextPromise;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** 用户选择了一个地址 */
|
|
18
|
-
export const resolveAddress = (address) => {
|
|
19
|
-
const allAddress = [...addressPromise];
|
|
20
|
-
addressPromise = [];
|
|
21
|
-
|
|
22
|
-
allAddress.forEach(({ resolver }) => resolver(address));
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/** 用户没有选择任何地址只是返回上一页了 */
|
|
26
|
-
export const rejectAddress = () => {
|
|
27
|
-
const allAddress = [...addressPromise];
|
|
28
|
-
addressPromise = [];
|
|
29
|
-
|
|
30
|
-
allAddress.forEach(({ rejecter }) => rejecter(new Error('cancel')));
|
|
31
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取购物车mock数据 */
|
|
4
|
-
function mockFetchCartGroupData(params) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { genCartGroupData } = require('../../model/cart');
|
|
7
|
-
|
|
8
|
-
return delay().then(() => genCartGroupData(params));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** 获取购物车数据 */
|
|
12
|
-
export function fetchCartGroupData(params) {
|
|
13
|
-
if (config.useMock) {
|
|
14
|
-
return mockFetchCartGroupData(params);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return new Promise((resolve) => {
|
|
18
|
-
resolve('real api');
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取商品评论 */
|
|
4
|
-
function mockFetchComments(parmas) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { getGoodsAllComments } = require('../../model/comments');
|
|
7
|
-
return delay().then(() => getGoodsAllComments(parmas));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** 获取商品评论 */
|
|
11
|
-
export function fetchComments(parmas) {
|
|
12
|
-
if (config.useMock) {
|
|
13
|
-
return mockFetchComments(parmas);
|
|
14
|
-
}
|
|
15
|
-
return new Promise((resolve) => {
|
|
16
|
-
resolve('real api');
|
|
17
|
-
});
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取商品评论数 */
|
|
4
|
-
function mockFetchCommentsCount(ID = 0) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { getGoodsCommentsCount } = require('../../model/comments');
|
|
7
|
-
return delay().then(() => getGoodsCommentsCount(ID));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** 获取商品评论数 */
|
|
11
|
-
export function fetchCommentsCount(ID = 0) {
|
|
12
|
-
if (config.useMock) {
|
|
13
|
-
return mockFetchCommentsCount(ID);
|
|
14
|
-
}
|
|
15
|
-
return new Promise((resolve) => {
|
|
16
|
-
resolve('real api');
|
|
17
|
-
});
|
|
18
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取优惠券列表 */
|
|
4
|
-
function mockFetchCoupon(status) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { getCouponList } = require('../../model/coupon');
|
|
7
|
-
return delay().then(() => getCouponList(status));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** 获取优惠券列表 */
|
|
11
|
-
export function fetchCouponList(status = 'default') {
|
|
12
|
-
if (config.useMock) {
|
|
13
|
-
return mockFetchCoupon(status);
|
|
14
|
-
}
|
|
15
|
-
return new Promise((resolve) => {
|
|
16
|
-
resolve('real api');
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/** 获取优惠券 详情 */
|
|
21
|
-
function mockFetchCouponDetail(id, status) {
|
|
22
|
-
const { delay } = require('../_utils/delay');
|
|
23
|
-
const { getCoupon } = require('../../model/coupon');
|
|
24
|
-
const { genAddressList } = require('../../model/address');
|
|
25
|
-
|
|
26
|
-
return delay().then(() => {
|
|
27
|
-
const result = {
|
|
28
|
-
detail: getCoupon(id, status),
|
|
29
|
-
storeInfoList: genAddressList(),
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
result.detail.useNotes = `1个订单限用1张,除运费券外,不能与其它类型的优惠券叠加使用(运费券除外)\n2.仅适用于各区域正常售卖商品,不支持团购、抢购、预售类商品`;
|
|
33
|
-
result.detail.storeAdapt = `商城通用`;
|
|
34
|
-
|
|
35
|
-
if (result.detail.type === 'price') {
|
|
36
|
-
result.detail.desc = `减免 ${result.detail.value / 100} 元`;
|
|
37
|
-
|
|
38
|
-
if (result.detail.base) {
|
|
39
|
-
result.detail.desc += `,满${result.detail.base / 100}元可用`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
result.detail.desc += '。';
|
|
43
|
-
} else if (result.detail.type === 'discount') {
|
|
44
|
-
result.detail.desc = `${result.detail.value}折`;
|
|
45
|
-
|
|
46
|
-
if (result.detail.base) {
|
|
47
|
-
result.detail.desc += `,满${result.detail.base / 100}元可用`;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
result.detail.desc += '。';
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return result;
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** 获取优惠券 详情 */
|
|
58
|
-
export function fetchCouponDetail(id, status = 'default') {
|
|
59
|
-
if (config.useMock) {
|
|
60
|
-
return mockFetchCouponDetail(id, status);
|
|
61
|
-
}
|
|
62
|
-
return new Promise((resolve) => {
|
|
63
|
-
resolve('real api');
|
|
64
|
-
});
|
|
65
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { config } from '../../../config/index';
|
|
2
|
-
import { queryCommentDetail } from '../../../model/comments/queryDetail';
|
|
3
|
-
/** 获取商品评价数据 */
|
|
4
|
-
function mockQueryCommentDetail(params) {
|
|
5
|
-
const { delay } = require('../../_utils/delay');
|
|
6
|
-
const data = queryCommentDetail(params);
|
|
7
|
-
return delay().then(() => {
|
|
8
|
-
return data;
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** 获取评价详情 */
|
|
13
|
-
export function getCommentDetail(params) {
|
|
14
|
-
if (config.useMock) {
|
|
15
|
-
return mockQueryCommentDetail(params);
|
|
16
|
-
}
|
|
17
|
-
return new Promise((resolve) => {
|
|
18
|
-
resolve('real api');
|
|
19
|
-
});
|
|
20
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取商品列表 */
|
|
4
|
-
function mockFetchGoodCategory() {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { getCategoryList } = require('../../model/category');
|
|
7
|
-
return delay().then(() => getCategoryList());
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** 获取商品列表 */
|
|
11
|
-
export function getCategoryList() {
|
|
12
|
-
if (config.useMock) {
|
|
13
|
-
return mockFetchGoodCategory();
|
|
14
|
-
}
|
|
15
|
-
return new Promise((resolve) => {
|
|
16
|
-
resolve('real api');
|
|
17
|
-
});
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取商品列表 */
|
|
4
|
-
function mockFetchGood(ID = 0) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { genGood } = require('../../model/good');
|
|
7
|
-
return delay().then(() => genGood(ID));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** 获取商品列表 */
|
|
11
|
-
export function fetchGood(ID = 0) {
|
|
12
|
-
if (config.useMock) {
|
|
13
|
-
return mockFetchGood(ID);
|
|
14
|
-
}
|
|
15
|
-
return new Promise((resolve) => {
|
|
16
|
-
resolve('real api');
|
|
17
|
-
});
|
|
18
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { config } from '../../config/index';
|
|
2
|
-
|
|
3
|
-
/** 获取商品列表 */
|
|
4
|
-
function mockFetchGoodsList(pageIndex = 1, pageSize = 20) {
|
|
5
|
-
const { delay } = require('../_utils/delay');
|
|
6
|
-
const { getGoodsList } = require('../../model/goods');
|
|
7
|
-
return delay().then(() =>
|
|
8
|
-
getGoodsList(pageIndex, pageSize).map((item) => {
|
|
9
|
-
return {
|
|
10
|
-
spuId: item.spuId,
|
|
11
|
-
thumb: item.primaryImage,
|
|
12
|
-
title: item.title,
|
|
13
|
-
price: item.minSalePrice,
|
|
14
|
-
originPrice: item.maxLinePrice,
|
|
15
|
-
tags: item.spuTagList.map((tag) => tag.title),
|
|
16
|
-
};
|
|
17
|
-
}),
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** 获取商品列表 */
|
|
22
|
-
export function fetchGoodsList(pageIndex = 1, pageSize = 20) {
|
|
23
|
-
if (config.useMock) {
|
|
24
|
-
return mockFetchGoodsList(pageIndex, pageSize);
|
|
25
|
-
}
|
|
26
|
-
return new Promise((resolve) => {
|
|
27
|
-
resolve('real api');
|
|
28
|
-
});
|
|
29
|
-
}
|