HolyKnightIX 2 anni fa
parent
commit
bb00a96032
2 ha cambiato i file con 17 aggiunte e 16 eliminazioni
  1. +11
    -16
      pages/exchangeCard/exchangeCard.js
  2. +6
    -0
      pages/exchangeCard/exchangeCard.wxml

+ 11
- 16
pages/exchangeCard/exchangeCard.js Vedi File

@@ -59,10 +59,7 @@ Page({
const phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
const phoneValid = phoneReg.test(this.data.phone)
if (!phoneValid) {
wx.showToast({
title: '请输入正确的手机号!',
icon: 'none'
})
this.Toast('请输入正确的手机号!', 'none')
return
}
this.setData({
@@ -139,10 +136,7 @@ Page({
})
.catch(err => {
console.log(err);
wx.showToast({
title: err.message,
icon: "none"
})
this.Toast(err.message, 'none')
})
},

@@ -203,16 +197,10 @@ Page({
url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${this.data.eCardId}`,
})
} else {
wx.showToast({
title: '当前用户不是该卡的持有者,无法转赠!',
icon: 'none'
})
this.Toast('当前用户不是该卡的持有者,无法转赠!', 'none')
}
} else {
wx.showToast({
title: '该卡未绑定',
icon: 'error'
})
this.Toast('该卡未绑定', 'none')
}
},

@@ -239,6 +227,13 @@ Page({
}
})
},

Toast(message, icon) {
wx.showToast({
title: message,
icon: icon
})
},
onLoad() {
setTimeout(() => {
this.checkPhoneStatus()


+ 6
- 0
pages/exchangeCard/exchangeCard.wxml Vedi File

@@ -35,6 +35,12 @@
<!-- <text class="changePhone" bindtap="changePhone">更改</text> -->
</view>

<view class="name">
激活状态:
<text wx:if="{{ownerUserId}}" style="color: #ff0000;">已激活</text>
<text wx:else style="color: #1aad19;">未激活</text>
</view>

<view wx:if="{{isChangePhone}}" class="phone">持卡人手机号:
<input class="phoneInput" type="text" placeholder="请填写手机号" focus="true" bindinput="phoneInput" />
<text class="confirmPhone" bindtap="confirmPhone">确定</text>


Caricamento…
Annulla
Salva