Commit f5d27734 authored by linxin's avatar linxin

add

parent 38fddb16
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
* @LastEditors: your name * @LastEditors: your name
--> -->
<template> <template>
<h-view id="base-info" class="public-style" title="基本信息"> <h-view id="base-info1" class="public-style" title="基本信息">
<h-header :proportion="[5,1,1]" class="header"> <h-header :proportion="[5,1,1]" class="header">
<div slot="left" class="h-header-btn" @click="$routeGo()"> <div slot="left" class="h-header-btn" @click="$routeGo()">
<img src="@/assets/userBind/arrow.png" > <img src="@/assets/homeImage/arrow.png" >
<span>用户绑定</span> <span>用户绑定</span>
</div> </div>
</h-header> </h-header>
<Tab @getTabNum="getTabNum" /> <Tab :tabNum="tabNum" @getTabNum="getTabNum"/>
<h-content class="content"> <h-content class="content">
<div v-show="tabNum==0"> <div v-show="tabNum==0">
<list-item :item-height="44"> <list-item :item-height="44">
...@@ -43,11 +43,11 @@ ...@@ -43,11 +43,11 @@
<span>身份证照片上传</span> <span>身份证照片上传</span>
<div class="upload-box"> <div class="upload-box">
<div> <div>
<img src="@/assets/userBind/front.png" > <img src="@/assets/homeImage/front.png" >
<p>正面</p> <p>正面</p>
</div> </div>
<div> <div>
<img src="@/assets/userBind/back.png" > <img src="@/assets/homeImage/back.png" >
<p>反面</p> <p>反面</p>
</div> </div>
</div> </div>
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
<span>房产证件</span> <span>房产证件</span>
<div class="img-content"> <div class="img-content">
<div class="card-upload"> <div class="card-upload">
<img src="@/assets/userBind/camera.png" > <img src="@/assets/homeImage/camera.png" >
</div> </div>
</div> </div>
</div> </div>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<span>车辆证件</span> <span>车辆证件</span>
<div class="img-content"> <div class="img-content">
<div class="card-upload"> <div class="card-upload">
<img src="@/assets/userBind/camera.png" > <img src="@/assets/homeImage/camera.png" >
</div> </div>
</div> </div>
</div> </div>
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<span>其他资产证件</span> <span>其他资产证件</span>
<div class="img-content"> <div class="img-content">
<div class="card-upload"> <div class="card-upload">
<img src="@/assets/userBind/camera.png" > <img src="@/assets/homeImage/camera.png" >
</div> </div>
</div> </div>
</div> </div>
...@@ -165,9 +165,9 @@ ...@@ -165,9 +165,9 @@
<notify v-model="show3" content="添加成功,记得保存哦" type="success" class="notice" /> <notify v-model="show3" content="添加成功,记得保存哦" type="success" class="notice" />
<div class="modal-content-add-top"> <div class="modal-content-add-top">
<span>添加银行卡</span> <span>添加银行卡</span>
<img src="@/assets/userBind/close.png" @click="hideModal" > <img src="@/assets/homeImage/close.png" @click="hideModal" >
</div> </div>
<img src="@/assets/userBind/addBack.png" class="addBack" > <img src="@/assets/homeImage/addBack.png" class="addBack" >
<list-item :item-height="44" class="card-Info"> <list-item :item-height="44" class="card-Info">
<item> <item>
<div slot="name">银行卡卡号</div> <div slot="name">银行卡卡号</div>
...@@ -196,8 +196,9 @@ ...@@ -196,8 +196,9 @@
</template> </template>
<script> <script>
import Tab from '@/components/tab' import Tab from '@/components/tab'
import InvoiceInfo from './invoiceInfo' import InvoiceInfo from '@/pages/np/invoiceInfo'
import BankInfo from './bankInfo' import BankInfo from '@/pages/np/bankInfo'
import axios from 'axios'
export default { export default {
components: { components: {
Tab, Tab,
...@@ -265,6 +266,12 @@ export default { ...@@ -265,6 +266,12 @@ export default {
vm.isPaople = false vm.isPaople = false
} }
}, },
'tabNum': function (newVal) {
if (newVal === 1 && !window.localStorage.user_id) {
this.handleNotify()
this.tabNum = 0
}
},
}, },
created () { created () {
this.getBpType() this.getBpType()
...@@ -277,18 +284,19 @@ export default { ...@@ -277,18 +284,19 @@ export default {
methods: { methods: {
verified () { verified () {
let vm = this let vm = this
if (!vm.baseInfo.bp_type || !vm.baseInfo.bp_name || !vm.baseInfo.id_card_no || !vm.baseInfo.phone || !vm.baseInfo.living_address || // var qs = require('qs')
!vm.baseInfo.address_on_resident_booklit || !vm.baseInfo.marital_status || !vm.baseInfo.academic_background || !vm.baseInfo.bp_name_sp || !vm.baseInfo.spouse_phone || // if (!vm.baseInfo.bp_type || !vm.baseInfo.bp_name || !vm.baseInfo.id_card_no || !vm.baseInfo.phone || !vm.baseInfo.living_address ||
!vm.baseInfo.working_place_sp || !vm.baseInfo.address_sp // !vm.baseInfo.address_on_resident_booklit || !vm.baseInfo.marital_status || !vm.baseInfo.academic_background || !vm.baseInfo.bp_name_sp || !vm.baseInfo.spouse_phone ||
) { // !vm.baseInfo.working_place_sp || !vm.baseInfo.address_sp
vm.hlsPopup.showLongCenter('必输字端不能为空!') // ) {
return // vm.hlsPopup.showLongCenter('必输字端不能为空!')
} // return
// }
if (!vm.hlsUtil.phoneNumber(vm.baseInfo.phone)) { // if (!vm.hlsUtil.phoneNumber(vm.baseInfo.phone)) {
vm.hlsPopup.showLongCenter('手机号码有误!') // vm.hlsPopup.showLongCenter('手机号码有误!')
return // return
} // }
let url = process.env.basePath + 'bp_np_bind_save' let url = process.env.basePath + 'bp_np_bind_save'
let param = { let param = {
'parameter': { 'parameter': {
...@@ -298,13 +306,47 @@ export default { ...@@ -298,13 +306,47 @@ export default {
vm.hlsPopup.showLoading('保存中!') vm.hlsPopup.showLoading('保存中!')
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.hlsPopup.showSuccess('保存成功')
if (res.result === 'S') { if (res.result === 'S') {
// console.log(res) debugger
vm.hlsPopup.showSuccess('保存成功')
window.localStorage.setItem('user_id', res.bp_id) window.localStorage.setItem('user_id', res.bp_id)
console.log(res.bp_id)
} }
}) })
}, },
post1 (url, param) {
param.user_id = window.localStorage.user_id
param.access_token = window.localStorage.access_token
let headers = {}
if (window.localStorage.access_token) {
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer ' + window.localStorage.access_token,
}
} else {
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
}
}
if ($config.debug) {
let postName = 'POST'
console.log(postName + ' Start!')
console.log(postName + ' url ' + url)
console.log(postName + ' parameter ' + JSON.stringify(param, '', 2))
}
return new Promise((resolve, reject) => {
axios({
method: 'post',
headers: headers,
url,
data: param,
}).then(res => {
resolve(res)
}).catch(err => {
reject(err)
})
})
},
showNotifyAtTop () { showNotifyAtTop () {
if (this.show1) return if (this.show1) return
...@@ -363,6 +405,14 @@ export default { ...@@ -363,6 +405,14 @@ export default {
}, },
}) })
}, },
handleNotify () {
this.hlsPopup.showNotify({
content: '清先保存基本信息',
position: 'top',
time: 2000,
type: 'warning',
})
},
getinvoiceList (i) { getinvoiceList (i) {
Object.assign(this.baseInfo, i) Object.assign(this.baseInfo, i)
}, },
...@@ -462,7 +512,7 @@ export default { ...@@ -462,7 +512,7 @@ export default {
} }
</script> </script>
<style lang="less"> <style lang="less">
#base-info { #base-info1 {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
input::placeholder { input::placeholder {
color: #b4b4b5; color: #b4b4b5;
...@@ -557,7 +607,7 @@ export default { ...@@ -557,7 +607,7 @@ export default {
padding-bottom: 8px; padding-bottom: 8px;
height: auto; height: auto;
background-color: #fff; background-color: #fff;
margin-bottom: 10px; margin-bottom: 15px;
span { span {
color: #656464; color: #656464;
font-size: 13px; font-size: 13px;
......
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