Commit 329e9d2c authored by 胡's avatar

feat: 批量签署

parent 6b13fad6
...@@ -9,12 +9,17 @@ ...@@ -9,12 +9,17 @@
<scroll ref="scrollLists" :updateData="[prolists]" :pullUp="false"> <scroll ref="scrollLists" :updateData="[prolists]" :pullUp="false">
<div class="scroll-box"> <div class="scroll-box">
<div class="box" v-for="item of list" :key="item.id" @click="doCheck(item.id)"> <div
class="box"
v-for="item of list"
:key="item.project_id"
@click="doCheck(item.project_id)"
>
<div class="name"> <div class="name">
<img src="@/assets/login/contract.png" alt="icon" /> <img src="@/assets/login/contract.png" alt="icon" />
<span>{{ item.name }}</span> <span>{{ item.project_name }}</span>
</div> </div>
<div>{{ item.id }}</div> <div>{{ item.project_number }}</div>
</div> </div>
</div> </div>
</scroll> </scroll>
...@@ -24,61 +29,51 @@ ...@@ -24,61 +29,51 @@
</button>--> </button>-->
<bottom-tab class="add-box"> <bottom-tab class="add-box">
<tab-button class="before" >签署电子合同</tab-button> <tab-button class="before" @click.native="signContact">签署电子合同</tab-button>
<tab-button class="next" >提交审核</tab-button> <tab-button class="next" @click.native="submit">提交审核</tab-button>
</bottom-tab> </bottom-tab>
</h-view> </h-view>
</template> </template>
<script> <script>
export default { export default {
name: 'myBindUser', name: 'myBindUser',
data() { data() {
return { return {
prolists: [], prolists: [],
title: this.$route.query.name === 'confirmList' ? '批量签署电子合同' : '', title: this.$route.query.name === 'confirmList' ? '批量签署电子合同' : '',
list: JSON.parse(window.localStorage.getItem('handleContact')),
list: [
{
id: 13434343434343,
name: '签署合同',
},
{
id: 23434343434343,
name: '签署合同',
},
{
id: 34343434343,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
{
id: 44343434343434,
name: '签署合同',
},
]
} }
}, },
beforeRouteEnter(to, from, next) { methods: {
next(vm => { // 提交
async submit() {
},
// 签署
async signContact() {
let url = process.env.basePath + 'batch_sign';
let param = {
"master": {
"project_id": this.list.map(item => item.project_id),
"bp_id": JSON.parse(window.localStorage.getItem('now_user_bp_bind_id')).bp_id
}
}
hlsPopup.showLoading('请稍候');
let res = await this.$post(url, param);
this.hlsPopup.hideLoading()
if (res.result == 'S' && res.info.msg === 'success') {
this.$router.push({
name: 'ElectronicSign',
params: { url: res.info.data.url },
}) })
} else {
hlsPopup.showLongCenter(res.message || res.info.msg)
}
}, },
methods: {
doCheck(id) { doCheck(id) {
this.list = this.list.map(item => { this.list = this.list.map(item => {
item.checked = item.id == id; item.checked = item.project_id == id;
return item; return item;
}) })
}, },
......
<template> <template>
<h-view id="contract-signing"> <h-view id="contract-signing">
<h-header :proportion="[5,1,1]" class="bar-custom"> <h-header :proportion="[5, 1, 1]" class="bar-custom">
<div slot="left" class="h-header-btn"> <div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()"> <img src="@/assets/userBind/arrow.png" @click="$routeGo()" />
<span>融租方案确认</span> <span>融租方案确认</span>
</div> </div>
</h-header> </h-header>
<div class="tab-style has-header"> <div class="tab-style has-header">
<div :class="{'done':num === 1,'undone':num !== 1}" @click="num = 1;"><img :src="num === 1?check1:uncheck1"><span>待确认</span></div> <div :class="{ 'done': num === 1, 'undone': num !== 1 }" @click="num = 1; isRadio = false">
<div :class="{'done':num === 2,'undone':num !== 2}" @click="num = 2;"><img :src="num === 2?check2:uncheck2"><span>已确认</span></div> <img :src="num === 1 ? check1 : uncheck1" />
<span>待确认</span>
</div>
<div :class="{ 'done': num === 2, 'undone': num !== 2 }" @click="num = 2; isRadio = false">
<img :src="num === 2 ? check2 : uncheck2" />
<span>已确认</span>
</div>
</div> </div>
<!-- 搜索 --> <!-- 搜索 -->
<div class="search"> <div class="search">
<input v-model="searchInput" type="text" placeholder="请输入合同号/承租人名称"> <input v-model="searchInput" type="text" placeholder="请输入合同号/承租人名称" />
</div> </div>
<scroll <scroll ref="scroll" :updateData="[showLists]" :pullUp="true" @pullingUp="loadMore">
ref="scroll"
:updateData="[showLists]"
:pullUp="true"
@pullingUp="loadMore"
>
<div class="wrap"> <div class="wrap">
<div v-for="(item,index) in showLists" :key="index" class="contract-lists" > <div v-for="(item,index) in showLists" :key="index" class="contract-lists">
<div class="pro-code" @click="goDetails(item)"> <div class="pro-code" @click="goDetails(item)">
<img src="@/assets/distributorSign/fileIcon.png" alt="" class="file-icon"> <img src="@/assets/distributorSign/fileIcon.png" alt class="file-icon" />
<p> <p>
<span>合同号</span> <span>合同号</span>
<span>{{ item.project_number }}</span> <span>{{ item.project_number }}</span>
</p> </p>
<img src="@/assets/constractSigning/righticon.png" alt="" class="arrow"> <img src="@/assets/constractSigning/righticon.png" alt class="arrow" />
</div> </div>
<div class="box"> <div class="box">
<div><p>承租人</p><p>{{ item.bp_name }}</p></div> <div
<div><p>合同名称</p><p>{{ item.project_name }}</p></div> v-show="isRadio"
<div><p>合同租金</p><p class="money">{{ item.total_price|currency }}</p></div> style=" flex: 0 1 50px"
<div><p>产品名称</p><p>{{ item.division_n }}</p></div> class="check-box"
<div><p>申请时间</p><p>{{ dateConverse(item.confirm_start_date) }}</p></div> @click.stop="clickRadio(item)"
>
<div v-show="!item.checked"></div>
<img v-show="item.checked" src="@/assets/contractCreate/selected.png" alt="已选择" />
</div>
<div
class="text"
style="flex: 0 1 calc(100vw - 55px)"
:style="{ marginLeft: !isRadio ? '50px' : '0' }"
>
<div>
<p>承租人</p>
<p>{{ item.bp_name }}</p>
</div>
<div>
<p>合同名称</p>
<p>{{ item.project_name }}</p>
</div>
<div>
<p>合同租金</p>
<p class="money">{{ item.total_price | currency }}</p>
</div>
<div>
<p>产品名称</p>
<p>{{ item.division_n }}</p>
</div>
<div>
<p>申请时间</p>
<p>{{ dateConverse(item.confirm_start_date) }}</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</scroll> </scroll>
<div class="check-bottom">
<div class="choose" v-show="isRadio">
<div class="radio" @click="allChoose(!chooseAll)">
<img v-show="chooseAll" src="@/assets/login/radio.png" alt="radio" />
<div class="no-check" v-show="!chooseAll"></div>
<span :style="{ color: chooseAll ? '#1d3fff' : 'rgb(212,214,212)' }">全选</span>
</div>
<button class="cancel" @click="cancelRadio">× 取消批量</button>
<button
class="sign"
@click="signContract"
>签订电子合同</button>
</div>
<button v-show="num == 1 && !isRadio" class="go-radio" @click="isRadio = true">
<img src="@/assets/login/write.png" alt="icon" />
<span>批量签署</span>
</button>
</div>
<div v-if="showLists.length === 0"> <div v-if="showLists.length === 0">
<div class="display"> <div class="display">
<img src="@/assets/messageCenter/noMsg.png" alt=""> <img src="@/assets/messageCenter/noMsg.png" alt />
</div> </div>
</div> </div>
</h-view> </h-view>
...@@ -56,7 +106,7 @@ import unCheck1 from '@/assets/constractSigning/no-undone.png' ...@@ -56,7 +106,7 @@ import unCheck1 from '@/assets/constractSigning/no-undone.png'
import unCheck2 from '@/assets/constractSigning/yes-undone.png' import unCheck2 from '@/assets/constractSigning/yes-undone.png'
export default { export default {
data () { data() {
return { return {
num: 1, num: 1,
pagenum: 1, pagenum: 1,
...@@ -73,11 +123,14 @@ export default { ...@@ -73,11 +123,14 @@ export default {
showLists: [], showLists: [],
lists: [], lists: [],
approvedFlag: false, approvedFlag: false,
chooseAll: false,
isRadio: false,
} }
}, },
watch: { watch: {
'num': { 'num': {
handler (newVal, oldVal) { handler(newVal, oldVal) {
// this.$refs.scroll.update(false) // this.$refs.scroll.update(false)
if (newVal === 2) { if (newVal === 2) {
if (!this.approvedFlag) { if (!this.approvedFlag) {
...@@ -91,7 +144,7 @@ export default { ...@@ -91,7 +144,7 @@ export default {
} }
}, },
}, },
searchInput () { searchInput() {
let vm = this let vm = this
if (vm.timeout) { if (vm.timeout) {
clearTimeout(vm.timeout) clearTimeout(vm.timeout)
...@@ -101,13 +154,13 @@ export default { ...@@ -101,13 +154,13 @@ export default {
}, 1000) }, 1000)
}, },
}, },
activated () { activated() {
}, },
created () { created() {
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next(vm => {
if (from.name === 'MyInfo' || from.name === 'MyContract') { if (from.name === 'MyInfo' || from.name === 'MyContract') {
vm.num = 1 vm.num = 1
...@@ -133,11 +186,33 @@ export default { ...@@ -133,11 +186,33 @@ export default {
}) })
}, },
methods: { methods: {
dateConverse (date) { signContract() {
let list = this.showLists.filter(item => item.checked);
if(!list.length) return hlsPopup.showLongCenter('请选择合同');
window.localStorage.setItem('handleContact', JSON.stringify(list));
this.$router.push({ path: '/batchSign', query: { name: 'confirmList'}});
},
clickRadio(item) {
item.checked = !item.checked;
this.chooseAll = this.showLists.every(item => item.checked);
},
allChoose(status) {
this.chooseAll = status;
this.showLists = this.showLists.map(item => {
item.checked = status;
return item;
});
},
cancelRadio() {
this.isRadio = false; // 关闭多选菜单
this.allChoose(false); // 关闭全选按钮
},
dateConverse(date) {
return date.replace(/\//g, '-') return date.replace(/\//g, '-')
}, },
// 合同查询 // 合同查询
contractList () { contractList() {
let vm = this let vm = this
if (vm.num === 1) { if (vm.num === 1) {
let url = $config.basePath + 'prj_confirm_list_query' let url = $config.basePath + 'prj_confirm_list_query'
...@@ -153,7 +228,10 @@ export default { ...@@ -153,7 +228,10 @@ export default {
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.submitLists = res.lists vm.submitLists = res.lists.map(item => {
item.checked = false;
return item;
})
vm.showLists = vm.submitLists vm.showLists = vm.submitLists
if (res.lists.length > 0 && res.lists.length < 10) { if (res.lists.length > 0 && res.lists.length < 10) {
vm.$refs.scroll.update(true) vm.$refs.scroll.update(true)
...@@ -179,7 +257,10 @@ export default { ...@@ -179,7 +257,10 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
console.log(res.lists) console.log(res.lists)
vm.approvedLists = res.lists vm.approvedLists = res.lists.map(item => {
item.checked = false;
return item;
})
vm.approvedFlag = true vm.approvedFlag = true
vm.showLists = vm.approvedLists vm.showLists = vm.approvedLists
if (res.lists.length > 0 && res.lists.length < 10) { if (res.lists.length > 0 && res.lists.length < 10) {
...@@ -194,7 +275,7 @@ export default { ...@@ -194,7 +275,7 @@ export default {
} }
}, },
loadMore () { loadMore() {
let vm = this let vm = this
if (vm.num === 1) { if (vm.num === 1) {
vm.submitPagenum++ vm.submitPagenum++
...@@ -268,7 +349,7 @@ export default { ...@@ -268,7 +349,7 @@ export default {
}) })
} }
}, },
async submitSearch () { async submitSearch() {
let vm = this let vm = this
vm.submitPagenum = 1 vm.submitPagenum = 1
let url = $config.basePath + 'prj_confirm_list_query' let url = $config.basePath + 'prj_confirm_list_query'
...@@ -284,7 +365,10 @@ export default { ...@@ -284,7 +365,10 @@ export default {
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.submitLists = res.lists vm.submitLists = res.lists.map(item => {
item.checked = false;
return item;
})
if (vm.num === 1) { if (vm.num === 1) {
vm.showLists = vm.submitLists vm.showLists = vm.submitLists
} }
...@@ -300,7 +384,7 @@ export default { ...@@ -300,7 +384,7 @@ export default {
return false return false
} }
}, },
approvedearch () { approvedearch() {
let vm = this let vm = this
let url = $config.basePath + 'prj_confirm_list_query' let url = $config.basePath + 'prj_confirm_list_query'
vm.approvedPagenum = 1 vm.approvedPagenum = 1
...@@ -313,7 +397,10 @@ export default { ...@@ -313,7 +397,10 @@ export default {
searchInput: vm.searchInput, searchInput: vm.searchInput,
} }
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
vm.approvedLists = res.lists vm.approvedLists = res.lists.map(item => {
item.checked = false;
return item;
})
if (vm.num === 2) { if (vm.num === 2) {
vm.showLists = vm.approvedLists vm.showLists = vm.approvedLists
} }
...@@ -325,14 +412,14 @@ export default { ...@@ -325,14 +412,14 @@ export default {
} }
}) })
}, },
async search () { async search() {
let res = await this.submitSearch() let res = await this.submitSearch()
if (res) { if (res) {
this.approvedearch() this.approvedearch()
} }
}, },
goDetails (item) { goDetails(item) {
this.$router.push({ this.$router.push({
name: 'ContractDetail', name: 'ContractDetail',
params: { params: {
...@@ -348,7 +435,7 @@ export default { ...@@ -348,7 +435,7 @@ export default {
</script> </script>
<style lang="less" type="text/less"> <style lang="less" type="text/less">
#contract-signing{ #contract-signing {
.display { .display {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -360,23 +447,23 @@ export default { ...@@ -360,23 +447,23 @@ export default {
// margin-top: -70px; // margin-top: -70px;
} }
} }
.tab-style{ .tab-style {
display:flex; display: flex;
width: 100%; width: 100%;
justify-content: center; justify-content: center;
padding-top:12px; padding-top: 12px;
padding-bottom: 8px; padding-bottom: 8px;
align-items: center; align-items: center;
background-color: #fff; background-color: #fff;
box-shadow:0 2px 3px 0 rgba(220,220,221,0.50); box-shadow: 0 2px 3px 0 rgba(220, 220, 221, 0.5);
position: absolute; position: absolute;
z-index: 999; z-index: 999;
div{ div {
position: relative; position: relative;
height: 32px; height: 32px;
width: 172px; width: 172px;
border-radius:16px; border-radius: 16px;
border-radius: 16px; border-radius: 16px;
font-family: PingFangSC-Semibold; font-family: PingFangSC-Semibold;
font-size: 14px; font-size: 14px;
...@@ -384,25 +471,90 @@ export default { ...@@ -384,25 +471,90 @@ export default {
margin: 0 4px; margin: 0 4px;
line-height: 32px; line-height: 32px;
} }
.undone{ .undone {
background: rgba(220,220,221,0.26); background: rgba(220, 220, 221, 0.26);
color: #383F45; color: #383f45;
} }
.done{ .done {
background: rgba(0,70,156,0.10); background: rgba(0, 70, 156, 0.1);
color: #00469C; color: #00469c;
} }
img{ img {
height: 20px; height: 20px;
display: block; display: block;
float: left; float: left;
margin: 6px 0 0 43px; margin: 6px 0 0 43px;
} }
span{ span {
position: absolute; position: absolute;
left:70px; left: 70px;
}
}
.check-bottom {
width: 100%;
height: 60px;
background-color: #fff;
position: absolute;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
.go-radio {
width: 90%;
color: #fff;
background-color: #1d3fff;
padding: 7px 10px;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
font-size: 0.15rem;
img {
width: 16px;
margin-right: 4px;
}
}
.choose {
width: 100%;
display: flex;
justify-content: space-evenly;
align-items: center;
height: 100%;
font-size: 0.25rem;
}
.radio {
display: flex;
align-items: center;
color: #1d3fff;
img {
width: 24px;
}
.no-check {
width: 17px;
height: 17px;
border-radius: 8.5px;
border: 1px solid #edeef1;
background-color: #fff;
margin-right: 7.1px;
}
}
.cancel {
background-color: #ffcece;
color: red;
padding: 7px 15px;
border-radius: 3px;
}
.sign {
color: #fff;
background-color: #1d3fff;
padding: 7px 40px;
border-radius: 3px;
} }
} }
...@@ -421,7 +573,7 @@ export default { ...@@ -421,7 +573,7 @@ export default {
width: 100%; width: 100%;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 14px; font-size: 14px;
color: #888C8F; color: #888c8f;
line-height: 36px; line-height: 36px;
background: url("../../assets/contractStart/search1.png") 320px no-repeat; background: url("../../assets/contractStart/search1.png") 320px no-repeat;
background-size: 16px 16px; background-size: 16px 16px;
...@@ -431,7 +583,7 @@ export default { ...@@ -431,7 +583,7 @@ export default {
input::placeholder { input::placeholder {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 14px; font-size: 14px;
color: #888C8F; color: #888c8f;
letter-spacing: 0; letter-spacing: 0;
} }
input:focus { input:focus {
...@@ -469,9 +621,9 @@ export default { ...@@ -469,9 +621,9 @@ export default {
flex: 1; flex: 1;
font-family: PingFangSC-Semibold; font-family: PingFangSC-Semibold;
font-size: 15px; font-size: 15px;
color: #4B4A4B; color: #4b4a4b;
letter-spacing: 0; letter-spacing: 0;
border-bottom: 1px solid #F3F3F7 border-bottom: 1px solid #f3f3f7;
} }
.arrow { .arrow {
height: 16px; height: 16px;
...@@ -481,10 +633,31 @@ export default { ...@@ -481,10 +633,31 @@ export default {
} }
} }
.box { .box {
margin-left: 50px; // margin-left: 50px;
// margin-right: 19px;
display: flex;
.check-box {
height: 100px;
display: flex;
justify-content: center;
align-items: center;
div {
width: 0.32rem;
height: 0.32rem;
border: 0.02rem solid #1d3fff;
border-radius: 0.06rem;
}
img {
width: 0.32rem;
}
}
.text {
margin-right: 19px; margin-right: 19px;
div { div {
width: 100%;
padding: 8px 0; padding: 8px 0;
line-height: 18px; line-height: 18px;
display: flex; display: flex;
...@@ -493,7 +666,7 @@ export default { ...@@ -493,7 +666,7 @@ export default {
.money { .money {
font-family: Verdana-Bold; font-family: Verdana-Bold;
font-size: 14px; font-size: 14px;
color: #4B4A4B; color: #4b4a4b;
letter-spacing: 0; letter-spacing: 0;
font-weight: 600; font-weight: 600;
} }
...@@ -505,24 +678,25 @@ export default { ...@@ -505,24 +678,25 @@ export default {
font-size: 14px; font-size: 14px;
letter-spacing: 0; letter-spacing: 0;
} }
p:nth-of-type(1){ p:nth-of-type(1) {
width: 32%; width: 32%;
left: 0; left: 0;
color: rgba(75,74,75,0.60); color: rgba(75, 74, 75, 0.6);
} }
p:nth-of-type(2){ p:nth-of-type(2) {
right: 0; right: 0;
color: #4B4A4B; color: #4b4a4b;
}
} }
} }
} }
} }
} }
.content{ .content {
position: absolute; position: absolute;
top:0; top: 0;
} }
.scrollContent{ .scrollContent {
padding-top: 3rem; padding-top: 3rem;
padding-bottom: 20px; padding-bottom: 20px;
} }
...@@ -533,9 +707,9 @@ export default { ...@@ -533,9 +707,9 @@ export default {
padding-top: 3.4rem; padding-top: 3.4rem;
} }
} }
} }
// iPhoneX适配 // iPhoneX适配
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) { @media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios { .platform-ios {
#contract-signing { #contract-signing {
.scrollContent { .scrollContent {
...@@ -543,9 +717,9 @@ export default { ...@@ -543,9 +717,9 @@ export default {
} }
} }
} }
} }
// iPhoneXR适配 // iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) { @media (device-width: 414px) and (device-height: 896px) {
.platform-ios { .platform-ios {
#contract-signing { #contract-signing {
.scrollContent { .scrollContent {
...@@ -567,5 +741,5 @@ export default { ...@@ -567,5 +741,5 @@ export default {
} }
} }
} }
} }
</style> </style>
...@@ -29,7 +29,12 @@ ...@@ -29,7 +29,12 @@
<div <div
:class="['normal', { unbind: item.bp_status === 'APPROVED' }]" :class="['normal', { unbind: item.bp_status === 'APPROVED' }]"
@click.stop="doStatus(item)" @click.stop="doStatus(item)"
>{{ item.bp_status === 'APPROVED' ? '× 解绑' : item.bp_status_n }}</div> >
<span
style="font-size: .3rem;"
>{{ item.bp_status === 'APPROVED' ? '×' : '' }}</span>
{{ item.bp_status === 'APPROVED' ? ' 解绑' : item.bp_status === 'NEW' ? '待提交' : item.bp_status_n }}
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -85,11 +90,19 @@ export default { ...@@ -85,11 +90,19 @@ export default {
}, },
methods: { methods: {
// 未认证进行人脸 认证 // 未认证进行人脸 认证
face(item) { async face(item) {
let vm = this; let vm = this;
let register = ['NP_NO', 'ORG_NO', 'ORG_L_NO', 'ORG_AUTH_NO']; let register = ['NP_NO', 'ORG_NO', 'ORG_L_NO', 'ORG_AUTH_NO'];
if (register.includes(item.bp_identity)) { if (register.includes(item.bp_identity)) {
// 人脸识别之前要确认是否已经在别的渠道已经绑定。
let res = await vm.getNpCertificationUrl(item)
if (res) {
hlsPopup.showLongCenter(item.bp_identity === 'ORG_NO' ? '请联系业务人员协助认证' : '认证已通过');
return vm.getList();
}
// 正式进行人脸识别
let url = process.env.basePath + 'bp_query' let url = process.env.basePath + 'bp_query'
let param = { bp_id: item.bp_id } let param = { bp_id: item.bp_id }
hlsPopup.showLoading('请稍候') hlsPopup.showLoading('请稍候')
...@@ -103,10 +116,12 @@ export default { ...@@ -103,10 +116,12 @@ export default {
idName: data.bp_name, idName: data.bp_name,
phoneNum: window.localStorage.user_phone, phoneNum: window.localStorage.user_phone,
}, },
function (suc) { async function (suc) {
let success = JSON.parse(suc) let success = JSON.parse(suc)
if (success.code === 1) { if (success.code === 1) {
vm.getNpCertificationUrl(item) let res = await vm.getNpCertificationUrl(item)
hlsPopup.showLongCenter(res ? '绑定成功!' : '绑定失败!');
if (res) vm.getList();
} }
}, },
function (reason) { function (reason) {
...@@ -135,10 +150,12 @@ export default { ...@@ -135,10 +150,12 @@ export default {
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
hlsPopup.hideLoading() hlsPopup.hideLoading()
if (res.info.code === 0 && res.info.data.authUrl) { if (res.info.code === 0 && res.info.data.authUrl) {
hlsPopup.showLongCenter('绑定失败!') // hlsPopup.showLongCenter('绑定失败!')
return false
} else if (res.info.code === 0 && res.info.data.openId) { } else if (res.info.code === 0 && res.info.data.openId) {
hlsPopup.showLongCenter('绑定成功!') // hlsPopup.showLongCenter('绑定成功!')
vm.getList() // vm.getList()
return true
} else { } else {
hlsPopup.showLongCenter(res.info.msg) hlsPopup.showLongCenter(res.info.msg)
} }
......
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