Authored by QC-L

修改订单支付成功页面没有数据的问题 review by 黄敬囿

... ... @@ -19,6 +19,7 @@
.more {
font-family: SFProText-Medium;
font-weight: 500;
font-size: 28px;
color: #000;
display: flex;
... ...
... ... @@ -17,6 +17,7 @@ Page({
paySuccessText: '支付成功!',
compensale: '',
_triggerObserer: true,
orderCode: 0
},
onLoad: function (option) {
... ... @@ -29,6 +30,9 @@ Page({
if (orderCode){
this.fetchComputeCompensate(orderCode)
}
this.setData({
orderCode
})
}
},
... ... @@ -75,7 +79,8 @@ Page({
lookAround: function () {
wx.navigateBack({
delta: getCurrentPages().length-1
})
});
router.go('home', null, 'switchTab');
},
checkOrderClick: function () {
... ... @@ -84,6 +89,4 @@ Page({
}
router.go('orderDetail', params);
},
})
... ...
... ... @@ -101,12 +101,14 @@ Page({
if (data.goodsInfo && data.goodsInfo.goodImg){
data.goodsInfo.goodImg = getImgUrl(data.goodsInfo.goodImg, 90,90);
}
let buttons = data.buttons;
let lastIndex = buttons.length - 1;
let lastIndex = 0;
if (data && data.buttons && data.buttons.length > 0) {
lastIndex = data.buttons.length - 1;
}
that.setData({
data,
lastIndex: lastIndex
});
});
if (data.statusDetail && data.statusDetail.leftTime){
let leftTime = data.statusDetail.leftTime;
... ...
{
"navigationBarTitleText": "订单详情",
"usingComponents": {
"orderproductinfo": "../../components/order/orderproductinfo",
"orderdetailaction": "../../components/order/orderaction"
... ...
... ... @@ -22,7 +22,7 @@ export default {
go(name, query, jumpType) {
const jump = jumpType ? jumpType : 'navigateTo';
const rule = rules[name];
console.log(name);
if (!rule) {
return Promise.reject(`路由规则未匹配到: ${name}`);
}
... ...