Browse Source

no message

featrue/v4.1
xpz2018 5 years ago
parent
commit
0b621c2f95
4 changed files with 7 additions and 5 deletions
  1. 2
      pages/api/user.js
  2. 2
      pages/bank/create/index.js
  3. 5
      pages/home/info/index.js
  4. 3
      pages/login/index.js

2
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 postCaptcha = (params) => mPost(`/uec/get/auth-captcha`, params, config)
const setPassword = (params) => mPost(`/uec/user/set/sign-in-password`, 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 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 getAuthSession = () => mGet('/uec/create/identity-auth-session', null, config)
const certificateImage = (params) => mPost('/uec/recognize/certificate-img', params, config) const certificateImage = (params) => mPost('/uec/recognize/certificate-img', params, config)
const certificateIdentity = (params) => mPost('/uec/identify/identity', params, config) const certificateIdentity = (params) => mPost('/uec/identify/identity', params, config)
@ -184,6 +185,7 @@ export {
finalizeToken, finalizeToken,
wechatApplet, wechatApplet,
getUserInfo, getUserInfo,
updateUserInfo,
postCaptcha, postCaptcha,
loginPwd, loginPwd,
loginCaptcha, loginCaptcha,

2
pages/bank/create/index.js

@ -67,6 +67,7 @@ Page({
} }
}, },
checkCardNo: function(cardNo){ checkCardNo: function(cardNo){
cardNo = cardNo.replace(/\s+/g, '')
getBankcardInfo(cardNo).then(result => { getBankcardInfo(cardNo).then(result => {
this.setData({ this.setData({
['form.cardName']: result.data.bank, ['form.cardName']: result.data.bank,
@ -110,6 +111,7 @@ Page({
util.showToast('请输入11位手机号码') util.showToast('请输入11位手机号码')
return return
} }
this.data.form.cardNo = this.data.form.cardNo.replace(/\s+/g, '')
wx.showLoading({ title: '处理中', mask: true }) wx.showLoading({ title: '处理中', mask: true })
sendCaptcha({ account: this.data.form.phone, accountType: 'MOBILE', purpose: 'RECYCLE_CLIENT_BIND_BANK_CARD' }).then(result => { sendCaptcha({ account: this.data.form.phone, accountType: 'MOBILE', purpose: 'RECYCLE_CLIENT_BIND_BANK_CARD' }).then(result => {
wx.hideLoading() wx.hideLoading()

5
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 util = require('../../../utils/util')
const app = getApp() const app = getApp()
@ -100,7 +101,7 @@ Page({
if(form.nickname){ if(form.nickname){
wx.showLoading({ title: '处理中', mask: true }) wx.showLoading({ title: '处理中', mask: true })
} }
modifyMemberInfo(form).then(result => {
updateUserInfo(form).then(result => {
wx.hideLoading() wx.hideLoading()
if(form.nickname){ if(form.nickname){
this.setData({['userInfo.nickname']: form.nickname}) this.setData({['userInfo.nickname']: form.nickname})

3
pages/login/index.js

@ -78,7 +78,6 @@ Page({
storage.remove('Authorization') storage.remove('Authorization')
config.header = null config.header = null
this.setData({ loging: false}) this.setData({ loging: false})
wx.navigateBack()
}) })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
@ -87,9 +86,7 @@ Page({
storage.remove('Authorization') storage.remove('Authorization')
config.header = null config.header = null
this.setData({ loging: false}) this.setData({ loging: false})
wx.navigateBack()
}) })
}, },
handleUserToken: function(userToken){ handleUserToken: function(userToken){
storage.put('userToken', userToken) storage.put('userToken', userToken)

Loading…
Cancel
Save