create-weapp-vite 2.0.32 → 2.0.33
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-MXKCD6NA.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/wevu/package.json +1 -1
- package/templates/wevu-tdesign/package.json +1 -1
- 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,115 +0,0 @@
|
|
|
1
|
-
import Dialog from 'tdesign-miniprogram/dialog/index';
|
|
2
|
-
import Toast from 'tdesign-miniprogram/toast/index';
|
|
3
|
-
|
|
4
|
-
import { dispatchCommitPay } from '../../../services/order/orderConfirm';
|
|
5
|
-
|
|
6
|
-
// 真实的提交支付
|
|
7
|
-
export const commitPay = (params) => {
|
|
8
|
-
return dispatchCommitPay({
|
|
9
|
-
goodsRequestList: params.goodsRequestList, // 待结算的商品集合
|
|
10
|
-
invoiceRequest: params.invoiceRequest, // 发票信息
|
|
11
|
-
// isIgnore: params.isIgnore || false, // 删掉 是否忽视库存不足和商品失效,继续结算,true=继续结算 购物车请赋值false
|
|
12
|
-
userAddressReq: params.userAddressReq, // 地址信息(用户在购物选择更换地址)
|
|
13
|
-
currency: params.currency || 'CNY', // 支付货币: 人民币=CNY,美元=USD
|
|
14
|
-
logisticsType: params.logisticsType || 1, // 配送方式 0=无需配送 1=快递 2=商家 3=同城 4=自提
|
|
15
|
-
// orderMark: params.orderMark, // 下单备注
|
|
16
|
-
orderType: params.orderType || 0, // 订单类型 0=普通订单 1=虚拟订单
|
|
17
|
-
payType: params.payType || 1, // 支付类型(0=线上、1=线下)
|
|
18
|
-
totalAmount: params.totalAmount, // 新增字段"totalAmount"总的支付金额
|
|
19
|
-
userName: params.userName, // 用户名
|
|
20
|
-
payWay: 1,
|
|
21
|
-
authorizationCode: '', //loginCode, // 登录凭证
|
|
22
|
-
storeInfoList: params.storeInfoList, //备注信息列表
|
|
23
|
-
couponList: params.couponList,
|
|
24
|
-
groupInfo: params.groupInfo,
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const paySuccess = (payOrderInfo) => {
|
|
29
|
-
const { payAmt, tradeNo, groupId, promotionId } = payOrderInfo;
|
|
30
|
-
// 支付成功
|
|
31
|
-
Toast({
|
|
32
|
-
context: this,
|
|
33
|
-
selector: '#t-toast',
|
|
34
|
-
message: '支付成功',
|
|
35
|
-
duration: 2000,
|
|
36
|
-
icon: 'check-circle',
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const params = {
|
|
40
|
-
totalPaid: payAmt,
|
|
41
|
-
orderNo: tradeNo,
|
|
42
|
-
};
|
|
43
|
-
if (groupId) {
|
|
44
|
-
params.groupId = groupId;
|
|
45
|
-
}
|
|
46
|
-
if (promotionId) {
|
|
47
|
-
params.promotionId = promotionId;
|
|
48
|
-
}
|
|
49
|
-
const paramsStr = Object.keys(params)
|
|
50
|
-
.map((k) => `${k}=${params[k]}`)
|
|
51
|
-
.join('&');
|
|
52
|
-
// 跳转支付结果页面
|
|
53
|
-
wx.redirectTo({ url: `/pages/order/pay-result/index?${paramsStr}` });
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const payFail = (payOrderInfo, resultMsg) => {
|
|
57
|
-
if (resultMsg === 'requestPayment:fail cancel') {
|
|
58
|
-
if (payOrderInfo.dialogOnCancel) {
|
|
59
|
-
//结算页,取消付款,dialog提示
|
|
60
|
-
Dialog.confirm({
|
|
61
|
-
title: '是否放弃付款',
|
|
62
|
-
content: '商品可能很快就会被抢空哦,是否放弃付款?',
|
|
63
|
-
confirmBtn: '放弃',
|
|
64
|
-
cancelBtn: '继续付款',
|
|
65
|
-
}).then(() => {
|
|
66
|
-
wx.redirectTo({ url: '/pages/order/order-list/index' });
|
|
67
|
-
});
|
|
68
|
-
} else {
|
|
69
|
-
//订单列表页,订单详情页,取消付款,toast提示
|
|
70
|
-
Toast({
|
|
71
|
-
context: this,
|
|
72
|
-
selector: '#t-toast',
|
|
73
|
-
message: '支付取消',
|
|
74
|
-
duration: 2000,
|
|
75
|
-
icon: 'close-circle',
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
Toast({
|
|
80
|
-
context: this,
|
|
81
|
-
selector: '#t-toast',
|
|
82
|
-
message: `支付失败:${resultMsg}`,
|
|
83
|
-
duration: 2000,
|
|
84
|
-
icon: 'close-circle',
|
|
85
|
-
});
|
|
86
|
-
setTimeout(() => {
|
|
87
|
-
wx.redirectTo({ url: '/pages/order/order-list/index' });
|
|
88
|
-
}, 2000);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// 微信支付方式
|
|
93
|
-
export const wechatPayOrder = (payOrderInfo) => {
|
|
94
|
-
// const payInfo = JSON.parse(payOrderInfo.payInfo);
|
|
95
|
-
// const { timeStamp, nonceStr, signType, paySign } = payInfo;
|
|
96
|
-
return new Promise((resolve) => {
|
|
97
|
-
// demo 中直接走支付成功
|
|
98
|
-
paySuccess(payOrderInfo);
|
|
99
|
-
resolve();
|
|
100
|
-
/* wx.requestPayment({
|
|
101
|
-
timeStamp,
|
|
102
|
-
nonceStr,
|
|
103
|
-
package: payInfo.package,
|
|
104
|
-
signType,
|
|
105
|
-
paySign,
|
|
106
|
-
success: function () {
|
|
107
|
-
paySuccess(payOrderInfo);
|
|
108
|
-
resolve();
|
|
109
|
-
},
|
|
110
|
-
fail: function (err) {
|
|
111
|
-
payFail(payOrderInfo, err.errMsg);
|
|
112
|
-
},
|
|
113
|
-
}); */
|
|
114
|
-
});
|
|
115
|
-
};
|
|
@@ -1,456 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { formatTime } from '../../../utils/util';
|
|
3
|
-
import { OrderStatus, LogisticsIconMap } from '../config';
|
|
4
|
-
import { fetchBusinessTime, fetchOrderDetail } from '../../../services/order/orderDetail';
|
|
5
|
-
import Toast from 'tdesign-miniprogram/toast/index';
|
|
6
|
-
import { getAddressPromise } from '../../../services/address/list';
|
|
7
|
-
|
|
8
|
-
Page({
|
|
9
|
-
data: {
|
|
10
|
-
pageLoading: true,
|
|
11
|
-
order: {}, // 后台返回的原始数据
|
|
12
|
-
_order: {}, // 内部使用和提供给 order-card 的数据
|
|
13
|
-
storeDetail: {},
|
|
14
|
-
countDownTime: null,
|
|
15
|
-
addressEditable: false,
|
|
16
|
-
backRefresh: false, // 用于接收其他页面back时的状态
|
|
17
|
-
formatCreateTime: '', //格式化订单创建时间
|
|
18
|
-
logisticsNodes: [],
|
|
19
|
-
/** 订单评论状态 */
|
|
20
|
-
orderHasCommented: true,
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
onLoad(query) {
|
|
24
|
-
this.orderNo = query.orderNo;
|
|
25
|
-
this.init();
|
|
26
|
-
this.navbar = this.selectComponent('#navbar');
|
|
27
|
-
this.pullDownRefresh = this.selectComponent('#wr-pull-down-refresh');
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
onShow() {
|
|
31
|
-
// 当从其他页面返回,并且 backRefresh 被置为 true 时,刷新数据
|
|
32
|
-
if (!this.data.backRefresh) return;
|
|
33
|
-
this.onRefresh();
|
|
34
|
-
this.setData({ backRefresh: false });
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
onPageScroll(e) {
|
|
38
|
-
this.pullDownRefresh && this.pullDownRefresh.onPageScroll(e);
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
onImgError(e) {
|
|
42
|
-
if (e.detail) {
|
|
43
|
-
console.error('img 加载失败');
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
// 页面初始化,会展示pageLoading
|
|
48
|
-
init() {
|
|
49
|
-
this.setData({ pageLoading: true });
|
|
50
|
-
this.getStoreDetail();
|
|
51
|
-
this.getDetail()
|
|
52
|
-
.then(() => {
|
|
53
|
-
this.setData({ pageLoading: false });
|
|
54
|
-
})
|
|
55
|
-
.catch((e) => {
|
|
56
|
-
console.error(e);
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
// 页面刷新,展示下拉刷新
|
|
61
|
-
onRefresh() {
|
|
62
|
-
this.init();
|
|
63
|
-
// 如果上一页为订单列表,通知其刷新数据
|
|
64
|
-
const pages = getCurrentPages();
|
|
65
|
-
const lastPage = pages[pages.length - 2];
|
|
66
|
-
if (lastPage) {
|
|
67
|
-
lastPage.data.backRefresh = true;
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
// 页面刷新,展示下拉刷新
|
|
72
|
-
onPullDownRefresh_(e) {
|
|
73
|
-
const { callback } = e.detail;
|
|
74
|
-
return this.getDetail().then(() => callback && callback());
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
getDetail() {
|
|
78
|
-
const params = {
|
|
79
|
-
parameter: this.orderNo,
|
|
80
|
-
};
|
|
81
|
-
return fetchOrderDetail(params).then((res) => {
|
|
82
|
-
const order = res.data;
|
|
83
|
-
const _order = {
|
|
84
|
-
id: order.orderId,
|
|
85
|
-
orderNo: order.orderNo,
|
|
86
|
-
parentOrderNo: order.parentOrderNo,
|
|
87
|
-
storeId: order.storeId,
|
|
88
|
-
storeName: order.storeName,
|
|
89
|
-
status: order.orderStatus,
|
|
90
|
-
statusDesc: order.orderStatusName,
|
|
91
|
-
amount: order.paymentAmount,
|
|
92
|
-
totalAmount: order.goodsAmountApp,
|
|
93
|
-
logisticsNo: order.logisticsVO.logisticsNo,
|
|
94
|
-
goodsList: (order.orderItemVOs || []).map((goods) =>
|
|
95
|
-
Object.assign({}, goods, {
|
|
96
|
-
id: goods.id,
|
|
97
|
-
thumb: goods.goodsPictureUrl,
|
|
98
|
-
title: goods.goodsName,
|
|
99
|
-
skuId: goods.skuId,
|
|
100
|
-
spuId: goods.spuId,
|
|
101
|
-
specs: (goods.specifications || []).map((s) => s.specValue),
|
|
102
|
-
price: goods.tagPrice ? goods.tagPrice : goods.actualPrice, // 商品销售单价, 优先取限时活动价
|
|
103
|
-
num: goods.buyQuantity,
|
|
104
|
-
titlePrefixTags: goods.tagText ? [{ text: goods.tagText }] : [],
|
|
105
|
-
buttons: goods.buttonVOs || [],
|
|
106
|
-
}),
|
|
107
|
-
),
|
|
108
|
-
buttons: order.buttonVOs || [],
|
|
109
|
-
createTime: order.createTime,
|
|
110
|
-
receiverAddress: this.composeAddress(order),
|
|
111
|
-
groupInfoVo: order.groupInfoVo,
|
|
112
|
-
};
|
|
113
|
-
this.setData({
|
|
114
|
-
order,
|
|
115
|
-
_order,
|
|
116
|
-
formatCreateTime: formatTime(parseFloat(`${order.createTime}`), 'YYYY-MM-DD HH:mm'), // 格式化订单创建时间
|
|
117
|
-
countDownTime: this.computeCountDownTime(order),
|
|
118
|
-
addressEditable:
|
|
119
|
-
[OrderStatus.PENDING_PAYMENT, OrderStatus.PENDING_DELIVERY].includes(order.orderStatus) &&
|
|
120
|
-
order.orderSubStatus !== -1, // 订单正在取消审核时不允许修改地址(但是返回的状态码与待发货一致)
|
|
121
|
-
isPaid: !!order.paymentVO.paySuccessTime,
|
|
122
|
-
invoiceStatus: this.datermineInvoiceStatus(order),
|
|
123
|
-
invoiceDesc: order.invoiceDesc,
|
|
124
|
-
invoiceType: order.invoiceVO?.invoiceType === 5 ? '电子普通发票' : '不开发票', //是否开票 0-不开 5-电子发票
|
|
125
|
-
logisticsNodes: this.flattenNodes(order.trajectoryVos || []),
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
// 展开物流节点
|
|
131
|
-
flattenNodes(nodes) {
|
|
132
|
-
return (nodes || []).reduce((res, node) => {
|
|
133
|
-
return (node.nodes || []).reduce((res1, subNode, index) => {
|
|
134
|
-
res1.push({
|
|
135
|
-
title: index === 0 ? node.title : '', // 子节点中仅第一个显示title
|
|
136
|
-
desc: subNode.status,
|
|
137
|
-
date: formatTime(+subNode.timestamp, 'YYYY-MM-DD HH:mm:ss'),
|
|
138
|
-
icon: index === 0 ? LogisticsIconMap[node.code] || '' : '', // 子节点中仅第一个显示icon
|
|
139
|
-
});
|
|
140
|
-
return res1;
|
|
141
|
-
}, res);
|
|
142
|
-
}, []);
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
datermineInvoiceStatus(order) {
|
|
146
|
-
// 1-已开票
|
|
147
|
-
// 2-未开票(可补开)
|
|
148
|
-
// 3-未开票
|
|
149
|
-
// 4-门店不支持开票
|
|
150
|
-
return order.invoiceStatus;
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
// 拼接省市区
|
|
154
|
-
composeAddress(order) {
|
|
155
|
-
return [
|
|
156
|
-
//order.logisticsVO.receiverProvince,
|
|
157
|
-
order.logisticsVO.receiverCity,
|
|
158
|
-
order.logisticsVO.receiverCountry,
|
|
159
|
-
order.logisticsVO.receiverArea,
|
|
160
|
-
order.logisticsVO.receiverAddress,
|
|
161
|
-
]
|
|
162
|
-
.filter((s) => !!s)
|
|
163
|
-
.join(' ');
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
getStoreDetail() {
|
|
167
|
-
fetchBusinessTime().then((res) => {
|
|
168
|
-
const storeDetail = {
|
|
169
|
-
storeTel: res.data.telphone,
|
|
170
|
-
storeBusiness: res.data.businessTime.join('\n'),
|
|
171
|
-
};
|
|
172
|
-
this.setData({ storeDetail });
|
|
173
|
-
});
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
// 仅对待支付状态计算付款倒计时
|
|
177
|
-
// 返回时间若是大于2020.01.01,说明返回的是关闭时间,否则说明返回的直接就是剩余时间
|
|
178
|
-
computeCountDownTime(order) {
|
|
179
|
-
if (order.orderStatus !== OrderStatus.PENDING_PAYMENT) return null;
|
|
180
|
-
return order.autoCancelTime > 1577808000000 ? order.autoCancelTime - Date.now() : order.autoCancelTime;
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
onCountDownFinish() {
|
|
184
|
-
//this.setData({ countDownTime: -1 });
|
|
185
|
-
const { countDownTime, order } = this.data;
|
|
186
|
-
if (countDownTime > 0 || (order && order.groupInfoVo && order.groupInfoVo.residueTime > 0)) {
|
|
187
|
-
this.onRefresh();
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
onGoodsCardTap(e) {
|
|
192
|
-
const { index } = e.currentTarget.dataset;
|
|
193
|
-
const goods = this.data.order.orderItemVOs[index];
|
|
194
|
-
wx.navigateTo({ url: `/pages/goods/details/index?spuId=${goods.spuId}` });
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
onEditAddressTap() {
|
|
198
|
-
getAddressPromise()
|
|
199
|
-
.then((address) => {
|
|
200
|
-
this.setData({
|
|
201
|
-
'order.logisticsVO.receiverName': address.name,
|
|
202
|
-
'order.logisticsVO.receiverPhone': address.phone,
|
|
203
|
-
'_order.receiverAddress': address.address,
|
|
204
|
-
});
|
|
205
|
-
})
|
|
206
|
-
.catch(() => {});
|
|
207
|
-
|
|
208
|
-
wx.navigateTo({
|
|
209
|
-
url: `/pages/user/address/list/index?selectMode=1`,
|
|
210
|
-
});
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
onOrderNumCopy() {
|
|
214
|
-
wx.setClipboardData({
|
|
215
|
-
data: this.data.order.orderNo,
|
|
216
|
-
});
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
onDeliveryNumCopy() {
|
|
220
|
-
wx.setClipboardData({
|
|
221
|
-
data: this.data.order.logisticsVO.logisticsNo,
|
|
222
|
-
});
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
onToInvoice() {
|
|
226
|
-
wx.navigateTo({
|
|
227
|
-
url: `/pages/order/invoice/index?orderNo=${this.data._order.orderNo}`,
|
|
228
|
-
});
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
onSuppleMentInvoice() {
|
|
232
|
-
wx.navigateTo({
|
|
233
|
-
url: `/pages/order/receipt/index?orderNo=${this.data._order.orderNo}`,
|
|
234
|
-
});
|
|
235
|
-
},
|
|
236
|
-
|
|
237
|
-
onDeliveryClick() {
|
|
238
|
-
const logisticsData = {
|
|
239
|
-
nodes: this.data.logisticsNodes,
|
|
240
|
-
company: this.data.order.logisticsVO.logisticsCompanyName,
|
|
241
|
-
logisticsNo: this.data.order.logisticsVO.logisticsNo,
|
|
242
|
-
phoneNumber: this.data.order.logisticsVO.logisticsCompanyTel,
|
|
243
|
-
};
|
|
244
|
-
wx.navigateTo({
|
|
245
|
-
url: `/pages/order/delivery-detail/index?data=${encodeURIComponent(JSON.stringify(logisticsData))}`,
|
|
246
|
-
});
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
/** 跳转订单评价 */
|
|
250
|
-
navToCommentCreate() {
|
|
251
|
-
wx.navigateTo({
|
|
252
|
-
url: `/pages/order/createComment/index?orderNo=${this.orderNo}`,
|
|
253
|
-
});
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
/** 跳转拼团详情/分享页*/
|
|
257
|
-
toGrouponDetail() {
|
|
258
|
-
wx.showToast({ title: '点击了拼团' });
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
clickService() {
|
|
262
|
-
Toast({
|
|
263
|
-
context: this,
|
|
264
|
-
selector: '#t-toast',
|
|
265
|
-
message: '您点击了联系客服',
|
|
266
|
-
});
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
onOrderInvoiceView() {
|
|
270
|
-
wx.navigateTo({
|
|
271
|
-
url: `/pages/order/invoice/index?orderNo=${this.orderNo}`,
|
|
272
|
-
});
|
|
273
|
-
},
|
|
274
|
-
});
|
|
275
|
-
</script>
|
|
276
|
-
|
|
277
|
-
<template>
|
|
278
|
-
<t-pull-down-refresh id="t-pull-down-refresh" bindrefresh="onPullDownRefresh_" t-class-indicator="t-class-indicator">
|
|
279
|
-
<!-- 页面内容 -->
|
|
280
|
-
<view class="order-detail [width:100%] [box-sizing:border-box] [padding:0rpx_0rpx_calc(env(safe-area-inset-bottom)_+_144rpx)] [&_.count-down]:[color:#ffffff] [&_.header]:[width:100%] [&_.header]:[background-color:#ffffff] [&_.order-detail__header]:[width:700rpx] [&_.order-detail__header]:[height:200rpx] [&_.order-detail__header]:[border-radius:24rpx] [&_.order-detail__header]:[margin:0_auto] [&_.order-detail__header]:[overflow:hidden] [&_.order-detail__header]:[display:flex] [&_.order-detail__header]:[flex-direction:column] [&_.order-detail__header]:[align-items:center] [&_.order-detail__header]:[justify-content:center] [&_.order-detail__header]:[background-image:url('https://tdesign.gtimg.com/miniprogram/template/retail/template/order-bg.png')] [&_.order-detail__header]:[background-repeat:no-repeat] [&_.order-detail__header]:[background-size:contain] [&_.order-detail__header_.title]:[color:#ffffff] [&_.order-detail__header_.title]:[overflow:hidden] [&_.order-detail__header_.title]:[display:-webkit-box] [&_.order-detail__header_.title]:[-webkit-box-orient:vertical] [&_.order-detail__header_.desc]:[color:#ffffff] [&_.order-detail__header_.desc]:[overflow:hidden] [&_.order-detail__header_.desc]:[display:-webkit-box] [&_.order-detail__header_.desc]:[-webkit-box-orient:vertical] [&_.order-detail__header_.title]:[-webkit-line-clamp:1] [&_.order-detail__header_.title]:[font-size:44rpx] [&_.order-detail__header_.title]:[line-height:64rpx] [&_.order-detail__header_.title]:[margin-bottom:8rpx] [&_.order-detail__header_.title]:[font-weight:bold] [&_.order-detail__header_.desc]:[-webkit-line-clamp:2] [&_.order-detail__header_.desc]:[font-size:24rpx] [&_.order-detail__header_.desc]:[line-height:32rpx] [&_.order-detail__header_.desc_.count-down]:[display:inline] [&_.order-logistics]:[box-sizing:border-box] [&_.order-logistics]:[padding:32rpx] [&_.order-logistics]:[width:100%] [&_.order-logistics]:[background-color:#ffffff] [&_.order-logistics]:[overflow:hidden] [&_.order-logistics]:[color:#333333] [&_.order-logistics]:[font-size:32rpx] [&_.order-logistics]:[line-height:48rpx] [&_.order-logistics]:[display:flex] [&_.order-logistics]:[position:relative] [&_.border-bottom]:[margin:0_auto] [&_.border-bottom]:[width:686rpx] [&_.border-bottom]:[scale:1_0.5] [&_.border-bottom]:[height:2rpx] [&_.border-bottom]:[background-color:#e5e5e5] [&_.border-bottom-margin]:[margin:16rpx_auto] [&_.pay-detail]:[background-color:#ffffff] [&_.pay-detail]:[width:100%] [&_.pay-detail]:[box-sizing:border-box] [&_.padding-inline]:[padding:16rpx_32rpx] [&_.pay-detail_.pay-item]:[width:100%] [&_.pay-detail_.pay-item]:[height:72rpx] [&_.pay-detail_.pay-item]:[display:flex] [&_.pay-detail_.pay-item]:[align-items:center] [&_.pay-detail_.pay-item]:[justify-content:space-between] [&_.pay-detail_.pay-item]:[font-size:26rpx] [&_.pay-detail_.pay-item]:[line-height:36rpx] [&_.pay-detail_.pay-item]:[color:#666666] [&_.pay-detail_.pay-item]:[background-color:#ffffff] [&_.pay-detail_.pay-item_.pay-item__right]:[color:#333333] [&_.pay-detail_.pay-item_.pay-item__right]:[font-size:24rpx] [&_.pay-detail_.pay-item_.pay-item__right]:[display:flex] [&_.pay-detail_.pay-item_.pay-item__right]:[align-items:center] [&_.pay-detail_.pay-item_.pay-item__right]:[justify-content:flex-end] [&_.pay-detail_.pay-item_.pay-item__right]:[max-width:400rpx] [&_.pay-detail_.pay-item_.pay-item__right_.pay-remark]:[display:-webkit-box] [&_.pay-detail_.pay-item_.pay-item__right_.pay-remark]:[-webkit-box-orient:vertical] [&_.pay-detail_.pay-item_.pay-item__right_.pay-remark]:[-webkit-line-clamp:2] [&_.pay-detail_.pay-item_.pay-item__right_.pay-remark]:[max-width:400rpx] [&_.pay-detail_.pay-item_.pay-item__right_.pay-remark]:[text-overflow:ellipsis] [&_.pay-detail_.pay-item_.pay-item__right_.pay-remark]:[overflow:hidden] [&_.pay-detail_.pay-item_.font-bold]:[font-weight:bold] [&_.pay-detail_.pay-item_.primary]:[color:#fa4126] [&_.pay-detail_.pay-item_.max-size]:[font-size:36rpx] [&_.pay-detail_.pay-item_.max-size]:[line-height:48rpx] [&_.pay-detail_.pay-service]:[width:100%] [&_.pay-detail_.pay-service]:[height:72rpx] [&_.pay-detail_.pay-service]:[display:flex] [&_.pay-detail_.pay-service]:[align-items:center] [&_.pay-detail_.pay-service]:[justify-content:center] [&_.pay-detail_.pay-service]:[font-size:32rpx] [&_.pay-detail_.pay-service]:[line-height:36rpx] [&_.pay-detail_.pay-service]:[color:#333333] [&_.pay-detail_.pay-service]:[background-color:#ffffff]">
|
|
281
|
-
<view class="header">
|
|
282
|
-
<view class="order-detail__header">
|
|
283
|
-
<view class="title">{{_order.statusDesc}}</view>
|
|
284
|
-
<view class="desc">
|
|
285
|
-
<block wx:if="{{ order.holdStatus === 1 }}">
|
|
286
|
-
<block wx:if="{{ order.groupInfoVo.residueTime > 0 }}">
|
|
287
|
-
拼团剩余
|
|
288
|
-
<t-count-down
|
|
289
|
-
time="{{order.groupInfoVo.residueTime}}"
|
|
290
|
-
format="HH小时mm分ss秒"
|
|
291
|
-
t-class="count-down"
|
|
292
|
-
bindfinish="onCountDownFinish"
|
|
293
|
-
/>
|
|
294
|
-
<view>过时自动取消</view>
|
|
295
|
-
</block>
|
|
296
|
-
</block>
|
|
297
|
-
<block wx:elif="{{countDownTime === null}}">{{order.orderStatusRemark || ''}}</block>
|
|
298
|
-
<block wx:elif="{{countDownTime > 0}}">
|
|
299
|
-
剩
|
|
300
|
-
<t-count-down
|
|
301
|
-
time="{{countDownTime}}"
|
|
302
|
-
format="HH小时mm分ss秒"
|
|
303
|
-
t-class="count-down"
|
|
304
|
-
bindfinish="onCountDownFinish"
|
|
305
|
-
/>
|
|
306
|
-
支付,过时订单将会取消
|
|
307
|
-
</block>
|
|
308
|
-
<block wx:else>超时未支付</block>
|
|
309
|
-
</view>
|
|
310
|
-
</view>
|
|
311
|
-
|
|
312
|
-
<!-- 物流 -->
|
|
313
|
-
<view class="order-logistics [&_.logistics-icon]:[width:40rpx] [&_.logistics-icon]:[height:40rpx] [&_.logistics-icon]:[margin-right:16rpx] [&_.logistics-icon]:[margin-top:4rpx] [&_.logistics-content]:[flex:1] [&_.logistics-content_.logistics-time]:[font-size:28rpx] [&_.logistics-content_.logistics-time]:[line-height:40rpx] [&_.logistics-content_.logistics-time]:[color:#999999] [&_.logistics-content_.logistics-time]:[margin-top:12rpx] [&_.logistics-back]:[color:#999999] [&_.logistics-back]:[align-self:center] [&_.edit-text]:[color:#fa4126] [&_.edit-text]:[font-size:26rpx] [&_.edit-text]:[line-height:36rpx]" wx:if="{{logisticsNodes[0]}}" bindtap="onDeliveryClick">
|
|
314
|
-
<t-icon name="deliver" size="40rpx" class="logistics-icon" prefix="wr" />
|
|
315
|
-
<view class="logistics-content">
|
|
316
|
-
<view>{{logisticsNodes[0].desc}}</view>
|
|
317
|
-
<view class="logistics-time">{{logisticsNodes[0].date}}</view>
|
|
318
|
-
</view>
|
|
319
|
-
<t-icon class="logistics-back" name="arrow_forward" size="36rpx" prefix="wr" />
|
|
320
|
-
</view>
|
|
321
|
-
<view class="border-bottom" wx:if="{{logisticsNodes[0]}}" />
|
|
322
|
-
<!-- 收货地址 -->
|
|
323
|
-
<view class="order-logistics [&_.logistics-icon]:[width:40rpx] [&_.logistics-icon]:[height:40rpx] [&_.logistics-icon]:[margin-right:16rpx] [&_.logistics-icon]:[margin-top:4rpx] [&_.logistics-content]:[flex:1] [&_.logistics-content_.logistics-time]:[font-size:28rpx] [&_.logistics-content_.logistics-time]:[line-height:40rpx] [&_.logistics-content_.logistics-time]:[color:#999999] [&_.logistics-content_.logistics-time]:[margin-top:12rpx] [&_.logistics-back]:[color:#999999] [&_.logistics-back]:[align-self:center] [&_.edit-text]:[color:#fa4126] [&_.edit-text]:[font-size:26rpx] [&_.edit-text]:[line-height:36rpx]">
|
|
324
|
-
<t-icon name="location" size="40rpx" class="logistics-icon" prefix="wr" />
|
|
325
|
-
<view class="logistics-content">
|
|
326
|
-
<view>{{order.logisticsVO.receiverName + ' '}}{{order.logisticsVO.receiverPhone}}</view>
|
|
327
|
-
<view class="logistics-time">{{_order.receiverAddress}}</view>
|
|
328
|
-
</view>
|
|
329
|
-
<view wx:if="{{addressEditable}}" class="edit-text" bindtap="onEditAddressTap"> 修改 </view>
|
|
330
|
-
</view>
|
|
331
|
-
</view>
|
|
332
|
-
<!-- 店铺及商品 -->
|
|
333
|
-
<order-card order="{{_order}}" use-top-right-slot>
|
|
334
|
-
<order-goods-card
|
|
335
|
-
wx:for="{{_order.goodsList}}"
|
|
336
|
-
wx:key="id"
|
|
337
|
-
wx:for-item="goods"
|
|
338
|
-
wx:for-index="gIndex"
|
|
339
|
-
goods="{{goods}}"
|
|
340
|
-
no-top-line="{{gIndex === 0}}"
|
|
341
|
-
bindtap="onGoodsCardTap"
|
|
342
|
-
data-index="{{gIndex}}"
|
|
343
|
-
>
|
|
344
|
-
<order-button-bar
|
|
345
|
-
slot="append-card"
|
|
346
|
-
class="goods-button-bar [height:112rpx] [width:686rpx] [margin-bottom:16rpx]"
|
|
347
|
-
order="{{_order}}"
|
|
348
|
-
bindrefresh="onRefresh"
|
|
349
|
-
goodsIndex="{{gIndex}}"
|
|
350
|
-
/>
|
|
351
|
-
</order-goods-card>
|
|
352
|
-
<view class="pay-detail">
|
|
353
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
354
|
-
<text>商品总额</text>
|
|
355
|
-
<price fill decimalSmaller wr-class="pay-item__right font-bold" price="{{order.totalAmount || '0'}}" />
|
|
356
|
-
</view>
|
|
357
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
358
|
-
<text>运费</text>
|
|
359
|
-
<view class="pay-item__right font-bold">
|
|
360
|
-
<block wx:if="{{order.freightFee}}">
|
|
361
|
-
+
|
|
362
|
-
<price fill decimalSmaller price="{{order.freightFee}}" />
|
|
363
|
-
</block>
|
|
364
|
-
<text wx:else>免运费</text>
|
|
365
|
-
</view>
|
|
366
|
-
</view>
|
|
367
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
368
|
-
<text>活动优惠</text>
|
|
369
|
-
<view class="pay-item__right primary font-bold">
|
|
370
|
-
-
|
|
371
|
-
<price fill price="{{order.discountAmount || 0}}" />
|
|
372
|
-
</view>
|
|
373
|
-
</view>
|
|
374
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
375
|
-
<text>优惠券</text>
|
|
376
|
-
<view class="pay-item__right" catchtap="onOpenCoupons">
|
|
377
|
-
<block wx:if="{{order.couponAmount}}">
|
|
378
|
-
-
|
|
379
|
-
<price fill decimalSmaller price="{{order.couponAmount}}" />
|
|
380
|
-
</block>
|
|
381
|
-
<text wx:else>无可用</text>
|
|
382
|
-
<!-- <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" /> -->
|
|
383
|
-
</view>
|
|
384
|
-
</view>
|
|
385
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
386
|
-
<text>{{isPaid ? '实付' : '应付'}}</text>
|
|
387
|
-
<price
|
|
388
|
-
fill
|
|
389
|
-
decimalSmaller
|
|
390
|
-
wr-class="pay-item__right font-bold primary max-size"
|
|
391
|
-
price="{{order.paymentAmount || '0'}}"
|
|
392
|
-
/>
|
|
393
|
-
</view>
|
|
394
|
-
</view>
|
|
395
|
-
</order-card>
|
|
396
|
-
<view class="pay-detail padding-inline">
|
|
397
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
398
|
-
<text>订单编号</text>
|
|
399
|
-
<view class="pay-item__right" bindtap="onOrderNumCopy">
|
|
400
|
-
<text class="order-no">{{order.orderNo}}</text>
|
|
401
|
-
<view class="pay-item__right__copy">复制</view>
|
|
402
|
-
</view>
|
|
403
|
-
</view>
|
|
404
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
405
|
-
<text>下单时间</text>
|
|
406
|
-
<view class="pay-item__right">
|
|
407
|
-
<text class="order-no normal-color">{{formatCreateTime}}</text>
|
|
408
|
-
</view>
|
|
409
|
-
</view>
|
|
410
|
-
<view class="border-bottom border-bottom-margin" />
|
|
411
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
412
|
-
<text>发票</text>
|
|
413
|
-
<view class="pay-item__right" bindtap="onOrderInvoiceView">
|
|
414
|
-
<text class="order-no normal-color">{{invoiceType}}</text>
|
|
415
|
-
<view class="pay-item__right__copy">查看</view>
|
|
416
|
-
</view>
|
|
417
|
-
</view>
|
|
418
|
-
<view class="pay-item [&_.pay-item__right_.pay-item__right__copy]:[width:80rpx] [&_.pay-item__right_.pay-item__right__copy]:[height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[text-align:center] [&_.pay-item__right_.pay-item__right__copy]:[font-size:24rpx] [&_.pay-item__right_.pay-item__right__copy]:[line-height:40rpx] [&_.pay-item__right_.pay-item__right__copy]:[color:#333333] [&_.pay-item__right_.pay-item__right__copy]:[position:relative] [&_.pay-item__right_.order-no]:[color:#333333] [&_.pay-item__right_.order-no]:[font-size:26rpx] [&_.pay-item__right_.order-no]:[line-height:40rpx] [&_.pay-item__right_.order-no]:[padding-right:16rpx] [&_.pay-item__right_.normal-color]:[color:#333333]">
|
|
419
|
-
<text>备注</text>
|
|
420
|
-
<view class="pay-item__right">
|
|
421
|
-
<text class="order-no normal-color">{{order.remark || '-'}}</text>
|
|
422
|
-
</view>
|
|
423
|
-
</view>
|
|
424
|
-
<view class="border-bottom border-bottom-margin" />
|
|
425
|
-
<view class="pay-service" wx:if="{{storeDetail && storeDetail.storeTel}}" catch:tap="clickService">
|
|
426
|
-
<t-icon name="service" size="40rpx" />
|
|
427
|
-
<text decode="{{true}}"> 联系客服</text>
|
|
428
|
-
</view>
|
|
429
|
-
</view>
|
|
430
|
-
</view>
|
|
431
|
-
<view wx:if="{{_order.buttons.length > 0}}" class="bottom-bar [position:fixed] [left:0] [bottom:0] [right:0] [z-index:10] [background:#fff] [height:112rpx] [width:686rpx] [padding:0rpx_32rpx_env(safe-area-inset-bottom)] [display:flex] [align-items:center]">
|
|
432
|
-
<order-button-bar order="{{_order}}" bindrefresh="onRefresh" isBtnMax />
|
|
433
|
-
</view>
|
|
434
|
-
</t-pull-down-refresh>
|
|
435
|
-
<t-toast id="t-toast" />
|
|
436
|
-
<t-dialog id="t-dialog" />
|
|
437
|
-
</template>
|
|
438
|
-
|
|
439
|
-
<json>
|
|
440
|
-
{
|
|
441
|
-
"navigationBarTitleText": "订单详情",
|
|
442
|
-
"usingComponents": {
|
|
443
|
-
"t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh",
|
|
444
|
-
"t-button": "tdesign-miniprogram/button/button",
|
|
445
|
-
"t-cell": "tdesign-miniprogram/cell/cell",
|
|
446
|
-
"t-icon": "tdesign-miniprogram/icon/icon",
|
|
447
|
-
"t-image": "/components/webp-image/index",
|
|
448
|
-
"t-count-down": "tdesign-miniprogram/count-down/count-down",
|
|
449
|
-
"t-toast": "tdesign-miniprogram/toast/toast",
|
|
450
|
-
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
|
451
|
-
"price": "/components/price/index",
|
|
452
|
-
"order-card": "../components/order-card/index",
|
|
453
|
-
"order-goods-card": "../components/order-goods-card/index",
|
|
454
|
-
"order-button-bar": "../components/order-button-bar/index"
|
|
455
|
-
}
|
|
456
|
-
}</json>
|