|
|
@@ -1,5 +1,5 @@
|
|
|
// pages/orders/order-detail.ts
|
|
|
-import { api_executeOrder, api_executePayment, api_queryByParamName, api_userPaymentOrderUnpaid, api_getUserReceiveAddressPage } from "../../api/login";
|
|
|
+import { api_executeOrderV2, api_executePayment, api_queryByParamName, api_userPaymentOrderUnpaid, api_getUserReceiveAddressPage } from "../../api/login";
|
|
|
|
|
|
// 获取应用实例
|
|
|
const app = getApp<IAppOption>()
|
|
|
@@ -23,6 +23,7 @@ Page({
|
|
|
goodsInfo: {} as any,
|
|
|
instrumentsInfo: {} as any,
|
|
|
memberInfo: {} as any,
|
|
|
+ userNote: '', // 会员手机号
|
|
|
paymentType: null as any, // 支付类型
|
|
|
paymentChannel: null as any,
|
|
|
},
|
|
|
@@ -35,12 +36,13 @@ Page({
|
|
|
if (options.orderInfo) {
|
|
|
const goods = JSON.parse(decodeURIComponent(options.orderInfo));
|
|
|
const instrumentsInfo = JSON.parse(decodeURIComponent(options.instrumentsInfo));
|
|
|
- const memberInfo = JSON.parse(decodeURIComponent(options.memberInfo));
|
|
|
- console.log(goods, 'goods', instrumentsInfo, memberInfo)
|
|
|
+ // const memberInfo = JSON.parse(decodeURIComponent(options.memberInfo));
|
|
|
+
|
|
|
+ // console.log(goods, 'goods', instrumentsInfo, memberInfo)
|
|
|
this.setData({
|
|
|
goodsInfo: goods,
|
|
|
instrumentsInfo,
|
|
|
- memberInfo,
|
|
|
+ userNote: options.userNote,
|
|
|
status: goods.status
|
|
|
});
|
|
|
}
|
|
|
@@ -163,7 +165,7 @@ Page({
|
|
|
"paymentCouponAmount": 0
|
|
|
})
|
|
|
}
|
|
|
- const { data } = await api_executeOrder({
|
|
|
+ const { data } = await api_executeOrderV2({
|
|
|
"orderType": "WECHAT_MINI",
|
|
|
"paymentType": this.data.paymentType,
|
|
|
"paymentCashAmount": salePrice + (this.data.instrumentsInfo.salePrice || 0),
|
|
|
@@ -174,7 +176,8 @@ Page({
|
|
|
"orderName": name + (this.data.instrumentsInfo.name ? `+${this.data.instrumentsInfo.name}` : ""),
|
|
|
"orderDesc": name + (this.data.instrumentsInfo.name ? `+${this.data.instrumentsInfo.name}` : ""),
|
|
|
"receiveAddress": this.data.addressInfo.id || "",
|
|
|
- "userBeneficiaryId": this.data.memberInfo.id
|
|
|
+ userNote: this.data.userNote
|
|
|
+ // "userBeneficiaryId": this.data.memberInfo.id
|
|
|
})
|
|
|
if (data.code === 200) {
|
|
|
const { paymentConfig, paymentType, orderNo } = data.data
|