Browse Source

[拼团][修改]:[拼团待支付订单跳转]

tags/C.7.1.0
meo 6 years ago
parent
commit
bd847bd024
3 changed files with 79 additions and 16 deletions
  1. +7
    -7
      pages/coupon/detail/index.js
  2. +70
    -7
      pages/spellGroup/mySpellGroup/index.js
  3. +2
    -2
      pages/spellGroup/mySpellGroup/index.wxml

+ 7
- 7
pages/coupon/detail/index.js View File

@@ -765,7 +765,7 @@ Page({
mask: false
});
} else if (err.code == 3012) {
that.getUnPaidOrder(that.data.couponId, discount);
that.getUnPaidOrder(that.data.couponId);
} else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面
@@ -895,7 +895,7 @@ Page({
})
},
// 获得未支付的订单
getUnPaidOrder(couponId, discount){
getUnPaidOrder(couponId){
let that = this;
Http.get({
url: config.api.getUnPaidOrder,
@@ -903,10 +903,6 @@ Page({
couponId: couponId
}
}).then(res=>{
/**
* discount 砍价订单
* discount1 砍价按原价购买订单
*/
that.setData({
disOrderNumber: res.data.orderNumber,
})
@@ -947,7 +943,11 @@ Page({
})
}
}).catch(error=>{
console.log(error)
wx.showToast({
title: error.message,
icon: "none",
duration: 3000
})
})
},
onShow() {


+ 70
- 7
pages/spellGroup/mySpellGroup/index.js View File

@@ -30,7 +30,8 @@ Page({
showTime: true,
limitCondition: "",
minLimit: 0,
maxLimit: 0
maxLimit: 0,
spellGroupOrder:false
},

/**
@@ -168,12 +169,73 @@ Page({
}, 1000)
}
},
// 获得未支付的订单
getUnPaidOrder(couponId) {
let that = this;
Http.get({
url: config.api.getUnPaidOrder,
data: {
couponId: couponId
}
}).then(res => {
that.setData({
disOrderNumber: res.data.orderNumber,
})

// 拼团订单
if (res.data.payment/100 != Number(that.data.data.price)) {
that.setData({
spellGroupOrder: true
})
} else {
// 原价购买订单
that.setData({
spellGroupOrder: false
})
}
if (that.data.spellGroupOrder) {
wx.showModal({
title: '提示',
content: "您有未支付拼团订单,请先进行支付",
confirmText: "去支付",
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}`,
})
}
}
})
} else {
wx.showModal({
title: '提示',
content: '您有未支付订单,请先进行支付',
confirmText: "去支付",
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: `/pages/order/detail/index?orderId=${that.data.disOrderNumber}`,
})
}
}
})
}
}).catch(error => {
console.log(error)
wx.showToast({
title: error.message,
icon:"none",
duration:3000
})
})
},
/**
* 发起拼团
*/
gotoSpell() {
gotoSpell(e) {
this.setData({
canSpell: false
canSpell: false,
formId: e.detail.formId
})
this.orderFunc(0)
},
@@ -411,10 +473,11 @@ Page({
mask: false
});
} else if (err.code == 3012) {
wx.showToast({
title: err.message,
icon: "none"
})
// wx.showToast({
// title: err.message,
// icon: "none"
// })
that.getUnPaidOrder(that.data.data.couponId);
} else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面


+ 2
- 2
pages/spellGroup/mySpellGroup/index.wxml View File

@@ -90,8 +90,8 @@
</form>
</view>
</view>
<!-- 分享弹框 -->
<!-- 分享弹框 -->
<!-- 分享弹框 -->
<!-- 分享弹框 -->
<view class='modal' wx:if="{{isshowposter}}" bindtap='hidemodal'>
<view class='modal-content'>
<view>


Loading…
Cancel
Save