Commit e6ac6bfa by 张立顺

战败自带选券

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