Commit e6ac6bfa by 张立顺

战败自带选券

1 parent 67da339c
......@@ -12,6 +12,16 @@ Component({
}
}
},
selectPayType: {
type: Number,
observer: function (n) {
// console.log(n,'selectPayType');
if (n == 0) {
this.checkCoupon()
// defaultSelectCoupon()
}
}
},
merchantId: {
type: Number,
observer: function (n, o) {
......@@ -90,7 +100,8 @@ Component({
api
.getCouponList({
merchantId,
yqMerchantId
yqMerchantId,
orderByType:9, // 按时间排序
})
.then(res => {
let { code, data, message } = res
......@@ -180,8 +191,9 @@ Component({
customerCouponList,
chooseItem
})
// 追加一个逻辑 订单补录并且不是回显的话
if (pageName == 'additionRecordOrder' && !orderObj.couponName && !orderObj.customerCouponCode) {
// 追加一个逻辑 订单补录并且不是回显的话 或则订单是战败
// pageName == 'additionRecordOrder' &&
if ( (pageName == 'additionRecordOrder' || this.data.selectPayType == 0 )&&!orderObj.couponName && !orderObj.customerCouponCode) {
if (couponList.length) {
// couponList.find((item)=>{
// return item.list.length &&
......
......@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 2
let index = 1
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
......
......@@ -389,6 +389,7 @@
merchantId="{{ orderObj.merchantId }}"
customerPhone="{{ orderObj.customer.customerPhone }}"
yqMerchantId="{{ orderObj.sellerMerchantId }}"
selectPayType="{{orderObj.selectPayType}}"
returnFun="{{ returnFun }}"
/>
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!