diff --git a/pages/api/user.js b/pages/api/user.js index d4eabd7..e831143 100644 --- a/pages/api/user.js +++ b/pages/api/user.js @@ -19,6 +19,7 @@ const loginPwd = (params) => mPost(`/uec/authorize/by-password`, params, config) const postCaptcha = (params) => mPost(`/uec/get/auth-captcha`, params, config) const setPassword = (params) => mPost(`/uec/user/set/sign-in-password`, params, config) const getUserInfo = (params) => mGet('/uec/get/user-info', params, config) +const updateUserInfo = (params) => mPost('/uec/user/update/user-info', params, config) const getAuthSession = () => mGet('/uec/create/identity-auth-session', null, config) const certificateImage = (params) => mPost('/uec/recognize/certificate-img', params, config) const certificateIdentity = (params) => mPost('/uec/identify/identity', params, config) @@ -184,6 +185,7 @@ export { finalizeToken, wechatApplet, getUserInfo, + updateUserInfo, postCaptcha, loginPwd, loginCaptcha, diff --git a/pages/bank/create/index.js b/pages/bank/create/index.js index 5c8e491..42e9ba1 100644 --- a/pages/bank/create/index.js +++ b/pages/bank/create/index.js @@ -67,6 +67,7 @@ Page({ } }, checkCardNo: function(cardNo){ + cardNo = cardNo.replace(/\s+/g, '') getBankcardInfo(cardNo).then(result => { this.setData({ ['form.cardName']: result.data.bank, @@ -110,6 +111,7 @@ Page({ util.showToast('请输入11位手机号码') return } + this.data.form.cardNo = this.data.form.cardNo.replace(/\s+/g, '') wx.showLoading({ title: '处理中', mask: true }) sendCaptcha({ account: this.data.form.phone, accountType: 'MOBILE', purpose: 'RECYCLE_CLIENT_BIND_BANK_CARD' }).then(result => { wx.hideLoading() diff --git a/pages/home/info/index.js b/pages/home/info/index.js index 1329295..7a06da3 100644 --- a/pages/home/info/index.js +++ b/pages/home/info/index.js @@ -1,4 +1,5 @@ -import { zconfig, getBaseInfo, modifyMemberInfo } from '../../api/ztb' +import { zconfig, getBaseInfo } from '../../api/ztb' +import { updateUserInfo } from '../../api/user' const util = require('../../../utils/util') const app = getApp() @@ -100,7 +101,7 @@ Page({ if(form.nickname){ wx.showLoading({ title: '处理中', mask: true }) } - modifyMemberInfo(form).then(result => { + updateUserInfo(form).then(result => { wx.hideLoading() if(form.nickname){ this.setData({['userInfo.nickname']: form.nickname}) diff --git a/pages/login/index.js b/pages/login/index.js index 44a8468..8168428 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -78,7 +78,6 @@ Page({ storage.remove('Authorization') config.header = null this.setData({ loging: false}) - wx.navigateBack() }) }).catch(err => { wx.hideLoading() @@ -87,9 +86,7 @@ Page({ storage.remove('Authorization') config.header = null this.setData({ loging: false}) - wx.navigateBack() }) - }, handleUserToken: function(userToken){ storage.put('userToken', userToken)