12 changed files with 123 additions and 111 deletions
Split View
Diff Options
-
79pages/client/bank-add/index.js
-
3pages/client/bank-add/index.json
-
20pages/client/bank-add/index.wxml
-
66pages/home/customer-info/index.js
-
4pages/home/customer-info/index.json
-
14pages/home/customer-info/index.wxml
-
19pages/home/customer-list/index.js
-
2pages/home/customer-list/index.json
-
14pages/home/customer-list/index.wxml
-
1pages/home/employee/index.json
-
4pages/home/employee/index.wxml
-
8pages/home/employee/index.wxss
@ -1,66 +1,43 @@ |
|||
// pages/client/bank-add/index.js
|
|||
import { postCaptcha, verifyCode } from "../../../api/user" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
|
|||
second: '获取验证码', |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
fetchCaptcha: function(){ |
|||
if (!(/^1\d{10}$/.test(this.data.form.account)) || this.data.form.account.length < 11) { |
|||
util.showToast('请输入11位手机号码') |
|||
return |
|||
} |
|||
wx.showLoading({ title: '正在获取', mask: true }) |
|||
postCaptcha({ verifiableAccount: this.data.form.account, verifiableAccountType: 1, purpose: 1 }).then(result => { |
|||
wx.hideLoading() |
|||
this.setData({ codeEnable: false }) |
|||
util.showToast('验证码已经发送') |
|||
this.countDown = this.countDown || this.selectComponent('.count-down') |
|||
this.countDown.reset() |
|||
this.countDown.start() |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
}, |
|||
onCountChange: function(e) { |
|||
if(e.detail.minutes != 0){ |
|||
return |
|||
} |
|||
this.setData({ second: e.detail.seconds + ' 秒 ' }) |
|||
}, |
|||
onFinished: function(){ |
|||
this.setData({ second: '重新获取验证码', codeEnable: true }) |
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -1,5 +1,6 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"van-button": "/components/button/index" |
|||
"van-button": "/components/button/index", |
|||
"van-count-down": "/components/count-down/index" |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save