瀏覽代碼

【积分问题修复】

tags/C.10.02
海洋之声 5 年之前
父節點
當前提交
d642239f0a
共有 2 個檔案被更改,包括 15 行新增5 行删除
  1. +14
    -4
      pages/integralmall/payIntegcoupondetail/index.js
  2. +1
    -1
      pages/integralmall/payIntegcoupondetail/index.wxml

+ 14
- 4
pages/integralmall/payIntegcoupondetail/index.js 查看文件

@@ -20,7 +20,8 @@ Page({
data: null, data: null,
showErr: false, showErr: false,
showAlert: false, showAlert: false,
remainingPoints:0
remainingPoints:0,
submitAble:true
}, },
getUserInfo: function () { getUserInfo: function () {
let that = this; let that = this;
@@ -55,6 +56,11 @@ Page({
url: `/pages/spellGroup/spellGroup`, url: `/pages/spellGroup/spellGroup`,
}) })
}, },
onShow:function(){
this.setData({
submitAble: true
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@@ -72,6 +78,9 @@ Page({
*/ */
gotoPay() { gotoPay() {
var that = this; var that = this;
that.setData({
submitAble: false
})
Http.get({ Http.get({
url: config.api.checkPhoneStatus, url: config.api.checkPhoneStatus,
data: {} data: {}
@@ -92,8 +101,7 @@ Page({
.catch(err => { .catch(err => {
console.log(err); console.log(err);
that.setData({ that.setData({
showbutton: false,
showbutton1: false
submitAble: true
}) })
if (err.code == 2011) { if (err.code == 2011) {
wx.showToast({ wx.showToast({
@@ -236,7 +244,6 @@ Page({
}) })
}) })
.catch(err => { .catch(err => {
console.log(err);
if (err.code != 12002) { if (err.code != 12002) {
setTimeout(function () { setTimeout(function () {
_this.payOrderUpdate(orderId, payOrderId, status, reason, _this); _this.payOrderUpdate(orderId, payOrderId, status, reason, _this);
@@ -269,5 +276,8 @@ Page({
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
this.getDetail(this.data.paramData.couponChannelId); this.getDetail(this.data.paramData.couponChannelId);
this.setData({
submitAble: true
})
} }
}) })

+ 1
- 1
pages/integralmall/payIntegcoupondetail/index.wxml 查看文件

@@ -36,6 +36,6 @@
</view> </view>
<view class='edit'> <view class='edit'>
<button class='user-motto user-enough' wx:if="{{remainingPoints>=0}}" bindtap='gotoPay'>{{'确认'+data.creditPrice+'积分支付'}}</button> <button class='user-motto user-enough' wx:if="{{remainingPoints>=0}}" bindtap='gotoPay'>{{'确认'+data.creditPrice+'积分支付'}}</button>
<button class='user-motto' style='color:rgba(0, 0, 0, 0.3);background:#F7F7F7!important;' wx:if="{{remainingPoints<0}}" bindtap='cannotPay'>积分不足</button>
<button class='user-motto user-enough' style='' wx:if="{{remainingPoints<0}}" bindtap='cannotPay'>积分不足</button>
</view> </view>
</view> </view>

Loading…
取消
儲存