Commit 244db565 by 岑成威

fix: 手机号码取值

1 parent a53adc74
......@@ -392,11 +392,15 @@ export default {
total_price += Number(item.finalPrice) || 0
})
const raw = data
const customer = raw.customer || {}
data = {
...data.customer,
...data.payOrder,
...data,
packageGoodsList: data.packageGoodsList,
...customer,
...raw.payOrder,
...raw,
customerPhone: customer.customerPhone || raw.customerPhone,
customerName: customer.customerName || raw.customerName,
packageGoodsList: raw.packageGoodsList,
couponName,
total_price: Number(utils.decimal(total_price, 2)).toFixed(2)
}
......
......@@ -491,13 +491,18 @@ export default {
})
}
const raw = data
const customer = raw.customer || {}
data = {
...data.customer,
...data.payOrder,
...data,
packageGoodsList: data.packageGoodsList,
...customer,
...raw.payOrder,
...raw,
// 根级 customerPhone 常为 null,会覆盖 customer 内真实手机号
customerPhone: customer.customerPhone || raw.customerPhone,
customerName: customer.customerName || raw.customerName,
packageGoodsList: raw.packageGoodsList,
couponName,
total_price: data.selectPayType == 0 ? 0 : Number(utils.decimal(total_price, 2)).toFixed(2)
total_price: raw.selectPayType == 0 ? 0 : Number(utils.decimal(total_price, 2)).toFixed(2)
}
if (data.customerCoupon) {
data.customerCoupon.customerCouponCode = data.customerCoupon.customerCouponCode.split('-')[0]
......@@ -584,11 +589,15 @@ export default {
},
getWorkWechatLiveQRCode() {
this.customerService = ''
let { failCustomerService, defaultCustomerService } = this
let { orderCode, customerPhone: phoneNumber, selectPayType } = this.orderInfo
// console.log(orderCode, phoneNumber, selectPayType)
const { failCustomerService, defaultCustomerService, orderInfo } = this
const { orderCode, selectPayType } = orderInfo
const phoneNumber = orderInfo.customerPhone || orderInfo.customer?.customerPhone
// 订单状态 1-升级订单 2-战败订单
let orderType = selectPayType == 0 ? 2 : 1
const orderType = selectPayType == 0 ? 2 : 1
if (!phoneNumber) {
this.customerService = defaultCustomerService
return
}
uni.$api.boutiqueApi
.getWorkWechatLiveQRCode({
orderCode,
......@@ -602,7 +611,9 @@ export default {
this.customerService = defaultCustomerService
}
})
// }, 3000)
.catch(() => {
this.customerService = failCustomerService
})
},
/** 获取服务商是否使用膜卷号 */
getServiceFilmRollSetting(yqMerchantId) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!