Просмотр исходного кода

[砍价][修改]:[修改按钮的状态]

tags/C.7.1.0
meo 6 лет назад
Родитель
Сommit
95cf25a058
2 измененных файлов: 9 добавлений и 7 удалений
  1. +8
    -6
      pages/bargain/bargainDatail/bargainDatail.js
  2. +1
    -1
      pages/bargain/bargainDatail/bargainDatail.wxml

+ 8
- 6
pages/bargain/bargainDatail/bargainDatail.js Просмотреть файл

@@ -24,7 +24,8 @@ Page({
discountStatus: null,
disabled: false,
display: "block!important",
showButton: false
showButton: false,
showButton1: false
},

/**
@@ -68,7 +69,8 @@ Page({
var todayDate = new Date().getTime();
that.setData({
todayDate: todayDate,
showButton: false
showButton: false,
showButton1: false
})
if (that.data.pressEndDate) {
that.countdown(that.data.pressEndDate)
@@ -518,7 +520,7 @@ Page({
orderFunc(e) {
var that = this;
that.setData({
showButton: true
showButton1: true
})
Http.get({
url: config.api.checkPhoneStatus,
@@ -526,7 +528,7 @@ Page({
})
.then(res => {
that.setData({
showButton: false
showButton1: false
})
if (typeof(res) != "undefined") {
let orderId = "" + e.currentTarget.dataset.orderid;
@@ -586,7 +588,7 @@ Page({
*/
that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', 'fail', that);
that.setData({
showbutton: false
showbutton1: false
})
return;
},
@@ -622,7 +624,7 @@ Page({
})
.catch(err => {
that.setData({
showButton: true
showButton1: true
})
if (err.code == 2011) {
wx.showToast({


+ 1
- 1
pages/bargain/bargainDatail/bargainDatail.wxml Просмотреть файл

@@ -70,6 +70,6 @@
</view>
</form>
<view style='display:{{display}}' wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false">
<button bindtap='orderFunc' data-orderId="{{data.id}}" data-salePrice="{{data.salePrice/100}}" hover-class="other-button-hover">{{data.salePrice/100}}元 底价购买</button>
<button bindtap='orderFunc' disabled='{{showButton1}}' data-orderId="{{data.id}}" data-salePrice="{{data.salePrice/100}}" hover-class="other-button-hover">{{data.salePrice/100}}元 底价购买</button>
</view>
</view>

Загрузка…
Отмена
Сохранить