添加月卡订单页面的去支付和取消订单
This commit is contained in:
parent
c3ad7f9a37
commit
058d2d4a60
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<!-- 电商服务区域 -->
|
<!-- 电商服务区域 -->
|
||||||
<view class="service-section">
|
<view class="service-section">
|
||||||
<text class="section-title">电商服务</text>
|
<text class="section-title">订单信息</text>
|
||||||
|
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<text class="info-label">车牌号码</text>
|
<text class="info-label">车牌号码</text>
|
||||||
|
|||||||
@ -136,7 +136,49 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.itemObj = JSON.parse(decodeURIComponent(options.item));
|
const rawData = JSON.parse(decodeURIComponent(options.item));
|
||||||
|
|
||||||
|
// 检查数据格式是否为month_card_order_list
|
||||||
|
if (rawData.carInfo) {
|
||||||
|
// 根据平台设置不同的trans_type值
|
||||||
|
// 小程序: 71, App: 51
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
let trans_type = 51; // 默认App环境
|
||||||
|
|
||||||
|
// 运行时判断是否为小程序环境
|
||||||
|
if (systemInfo.platform === 'devtools' || systemInfo.platform === 'unknown') {
|
||||||
|
trans_type = 71; // 开发工具或未知环境默认为小程序
|
||||||
|
}
|
||||||
|
|
||||||
|
// 条件编译:针对不同平台设置不同值
|
||||||
|
// #ifdef MP
|
||||||
|
trans_type = 71; // 所有小程序平台
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
trans_type = 51; // App平台
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
this.itemObj = {
|
||||||
|
endTime: rawData.carInfo.deadline_time || '',
|
||||||
|
headerTitle: rawData.parkingInfo.parking_name || '',
|
||||||
|
monthCount: rawData.month_num || 0,
|
||||||
|
monthPrice: rawData.monthly_rental_fee || 0,
|
||||||
|
order_id: rawData.id || 0,
|
||||||
|
paymentAmount: rawData.amount || 0,
|
||||||
|
selectedBillingRule: rawData.billing_rule_id || '',
|
||||||
|
selectedCarPlate: rawData.carInfo.car_no || '',
|
||||||
|
selectedCarPlateId: rawData.carInfo.id || 0,
|
||||||
|
selectedParkId: rawData.parking_id || 0,
|
||||||
|
selectedParkType: rawData.parkingInfo.space_type || 0,
|
||||||
|
startTime: rawData.carInfo.enable_time || '',
|
||||||
|
trans_type: trans_type,
|
||||||
|
user_id: rawData.user_id || 0
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// 使用原始数据格式
|
||||||
|
this.itemObj = rawData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user