|
@@ -59,10 +59,7 @@ Page({ |
|
|
const phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/ |
|
|
const phoneReg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/ |
|
|
const phoneValid = phoneReg.test(this.data.phone) |
|
|
const phoneValid = phoneReg.test(this.data.phone) |
|
|
if (!phoneValid) { |
|
|
if (!phoneValid) { |
|
|
wx.showToast({ |
|
|
|
|
|
title: '请输入正确的手机号!', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.Toast('请输入正确的手机号!', 'none') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.setData({ |
|
|
this.setData({ |
|
@@ -139,10 +136,7 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
.catch(err => { |
|
|
.catch(err => { |
|
|
console.log(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}`, |
|
|
url: `/pages/ConsumeDetail/ConsumeDetail?cardId=${this.data.eCardId}`, |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
wx.showToast({ |
|
|
|
|
|
title: '当前用户不是该卡的持有者,无法转赠!', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.Toast('当前用户不是该卡的持有者,无法转赠!', 'none') |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
wx.showToast({ |
|
|
|
|
|
title: '该卡未绑定', |
|
|
|
|
|
icon: 'error' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.Toast('该卡未绑定', 'none') |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@@ -239,6 +227,13 @@ Page({ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
Toast(message, icon) { |
|
|
|
|
|
wx.showToast({ |
|
|
|
|
|
title: message, |
|
|
|
|
|
icon: icon |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.checkPhoneStatus() |
|
|
this.checkPhoneStatus() |
|
|