bug修改

This commit is contained in:
姚亚男
2021-10-22 18:03:14 +08:00
parent dcc0e8b1fa
commit c15d7ca29b
16 changed files with 137 additions and 128 deletions
+18 -1
View File
@@ -118,6 +118,15 @@ Page({
},
// 登录
formSubmit(e) {
let pattern = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (!pattern.test(e.detail.value.phone)) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 2000
})
return
}
if (e.detail.value.phone && e.detail.value.captcha) {
let params = {
username: encrypt(this.data.rsaPublicKey,e.detail.value.phone), // 手机号加密
@@ -191,7 +200,9 @@ Page({
UserApi.wxBind(params).then(res=>{})
})
},
onLoad(){
},
/**
* 生命周期函数--监听页面显示
*/
@@ -205,6 +216,12 @@ Page({
key: 'rsaPublicKey',
data: res.result
})
}else{
wx.showToast({
title: res.message,
icon: 'none',
duration: 2000
})
}
}).catch(err => {
wx.showToast({