Commit f5d27734 authored by linxin's avatar linxin

add

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