瀏覽代碼

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

tags/C.7.1.0
meo 6 年之前
父節點
當前提交
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, discountStatus: null,
disabled: false, disabled: false,
display: "block!important", display: "block!important",
showButton: false
showButton: false,
showButton1: false
}, },


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


+ 1
- 1
pages/bargain/bargainDatail/bargainDatail.wxml 查看文件

@@ -70,6 +70,6 @@
</view> </view>
</form> </form>
<view style='display:{{display}}' wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false"> <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>
</view> </view>

Loading…
取消
儲存