Commit caaa755c authored by 李晓兵's avatar 李晓兵

'修改银行卡逻辑'

parent 785bc27d
...@@ -305,30 +305,41 @@ export default { ...@@ -305,30 +305,41 @@ export default {
this.getinvoiceList() this.getinvoiceList()
}, },
methods: { methods: {
verified () { async verified () {
this.saveWord() let bpId = await this.saveWord()
this.getBankInfo() this.getBankInfo()
}, },
saveProtocol () { async saveProtocol () {
let vm = this let vm = this
let url = process.env.basePath + 'bp_np_bind_save' let url = process.env.basePath + 'bp_np_bind_save'
let param = { let param = {
master: this.baseInfo, master: this.baseInfo,
} }
vm.hlsPopup.showLoading('保存中!') vm.hlsPopup.showLoading('保存中!')
vm.hlsHttp.post(url, param).then(function (res) { let res = await vm.hlsHttp.post(url, param)
if (res.result === 'S') {
vm.hlsPopup.showSuccess('保存成功')
vm.isSave = true
window.localStorage.setItem('user_id', res.bp_id)
window.sessionStorage.setItem('user_id', res.bp_id)
window.sessionStorage.setItem('bp_name', vm.baseInfo.bp_name)
window.localStorage.setItem('bp_name', vm.baseInfo.bp_name)
return res.bp_id
}
/* vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.showSuccess('保存成功') vm.hlsPopup.showSuccess('保存成功')
vm.isSave = true vm.isSave = true
return res.bp_id
window.localStorage.setItem('user_id', res.bp_id) window.localStorage.setItem('user_id', res.bp_id)
window.sessionStorage.setItem('user_id', res.bp_id) window.sessionStorage.setItem('user_id', res.bp_id)
window.sessionStorage.setItem('bp_name', vm.baseInfo.bp_name) window.sessionStorage.setItem('bp_name', vm.baseInfo.bp_name)
window.localStorage.setItem('bp_name', vm.baseInfo.bp_name) window.localStorage.setItem('bp_name', vm.baseInfo.bp_name)
} }
}) })*/
}, },
saveWord () { async saveWord () {
let vm = this let vm = this
if (!vm.baseInfo.bp_type) { if (!vm.baseInfo.bp_type) {
vm.hlsPopup.showLongCenter('客户类型不能为空!') vm.hlsPopup.showLongCenter('客户类型不能为空!')
...@@ -361,7 +372,8 @@ export default { ...@@ -361,7 +372,8 @@ export default {
} else if (!vm.hlsUtil.phoneNumber(vm.baseInfo.phone)) { } else if (!vm.hlsUtil.phoneNumber(vm.baseInfo.phone)) {
vm.hlsPopup.showLongCenter('手机号码有误!') vm.hlsPopup.showLongCenter('手机号码有误!')
} else { } else {
vm.saveProtocol() let bpId = await vm.saveProtocol()
return bpId
} }
}, },
uploadIdCardFront () { uploadIdCardFront () {
...@@ -502,7 +514,7 @@ export default { ...@@ -502,7 +514,7 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.successCall() vm.successCall()
this.hlsPopup.showLongCenter('保存成功') vm.hlsPopup.showLongCenter('保存成功')
setTimeout(vm.successCall, 2000) setTimeout(vm.successCall, 2000)
} }
}) })
......
...@@ -133,7 +133,7 @@ export function get (url) { ...@@ -133,7 +133,7 @@ export function get (url) {
} }
// post请求 // post请求
export function post (url, param) { export function post (url, param) {
param.user_id = window.localStorage.user_id // param.user_id = window.localStorage.user_id
param.access_token = window.localStorage.access_token param.access_token = window.localStorage.access_token
let headers = {} let headers = {}
if (window.localStorage.access_token) { if (window.localStorage.access_token) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment