Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
85397e1d
Commit
85397e1d
authored
Jan 19, 2021
by
Jennie Shi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人认证逻辑修改
parent
e42abb85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
156 additions
and
178 deletions
+156
-178
my-info.vue
src/pages/myInfo/my-info.vue
+156
-178
No files found.
src/pages/myInfo/my-info.vue
View file @
85397e1d
...
...
@@ -13,7 +13,7 @@
</h-header>
<!--
<div
:class=
"['top',(multipleRole!=='GUTA'&&user_bp_type!=='GUTA')?'has':'antiHas']"
style=
"margin-top:-1px;"
>
-->
<div
class=
"top"
style=
"margin-top:
-1px
"
>
<div
class=
"top"
style=
"margin-top:
-1px;
"
>
<div
class=
"card-top"
>
<img
:src=
"upLoadObj"
@
click=
"checkType"
>
<div
class=
"sign"
>
...
...
@@ -21,11 +21,9 @@
<div>
电子签
<p
:class=
"[elecStatus
? 'across' :
'un-across']"
:class=
"[elecStatus
?'across':
'un-across']"
@
click=
"certification"
>
{{
elecStatusDesceibe
}}
</p>
>
{{
elecStatusDesceibe
}}
</p>
</div>
</div>
</div>
...
...
@@ -35,7 +33,7 @@
<div
class=
"card-bottom"
>
<div
v-if=
"((user_bp_type!=='TENANT')&&(user_bp_type!=='GUTA')&&(multipleRole!=='GUTA')&&(multipleRole!=='TENANT'))||multipleRole==='AGENT'"
@
click=
"goStart"
>
<img
src=
"@/assets/myInfo/car.png"
>
<p>
融租合同创建
</p>
<p>
发车申请
</p>
</div>
<div
v-if=
"((user_bp_type==='TENANT')&&(multipleRole==='TENANT'))||(multipleRole==='TENANT')||((user_bp_type==='TENANT')&&(!multipleRole))"
@
click=
"changePay"
>
<img
src=
"@/assets/myInfo/pay.png"
>
...
...
@@ -65,86 +63,43 @@
<div
class=
"content-top"
>
<list-item
:item-height=
"44"
class=
"list"
>
<item
@
click
.
native=
"goContract"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/agreement.png"
class=
"left-icon"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/agreement.png"
class=
"left-icon"
>
<div
slot=
"name"
>
我的合同
</div>
</item>
<item
v-if=
"
(user_bp_type === 'TENANT' ||
user_bp_type === 'GUTA' ||
multipleRole === 'GUTA' ||
multipleRole === 'TENANT') &&
multipleRole !== 'AGENT'
"
v-if=
"((user_bp_type==='TENANT')||(user_bp_type==='GUTA'||(multipleRole==='GUTA')||(multipleRole==='TENANT')))&&multipleRole!=='AGENT'"
@
click
.
native=
"goReimburse"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/repay.png"
class=
"left-icon"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/repay.png"
class=
"left-icon"
>
<div
slot=
"name"
>
我的还款
</div>
</item>
<item
v-if=
"user_bp_type === 'TENANT'"
@
click
.
native=
"goInvoice"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/invoice.png"
class=
"left-icon"
>
<item
v-if=
"user_bp_type==='TENANT'"
@
click
.
native=
"goInvoice"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/invoice.png"
class=
"left-icon"
>
<div
slot=
"name"
>
我的发票
</div>
</item>
<item
@
click
.
native=
"goMyProduct"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/collect.png"
class=
"left-icon"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/collect.png"
class=
"left-icon"
>
<div
slot=
"name"
>
我的收藏
</div>
<div
v-if=
"productCount > 0"
slot=
"right-icon"
:class=
"
{
'right-icon-width': productCount > 99,
'right-icon': productCount
<
99
,
}"
>
{{
productCount
>
99
?
"99+"
:
productCount
}}
</div>
:class=
"
{'right-icon-width':productCount>99, 'right-icon':productCount
<99
}"
>
{{
productCount
>
99
?
'99+'
:
productCount
}}
</div>
</item>
<item
@
click
.
native=
"changeHelp"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/help.png"
class=
"left-icon"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/help.png"
class=
"left-icon"
>
<div
slot=
"name"
>
帮助与反馈
</div>
</item>
<item
@
click
.
native=
"goAbout"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/about.png"
class=
"left-icon"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/about.png"
class=
"left-icon"
>
<div
slot=
"name"
>
关于徐工
</div>
</item>
<item
@
click
.
native=
"goSetting"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/setting.png"
class=
"left-icon"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/setting.png"
class=
"left-icon"
>
<div
slot=
"name"
>
设置
</div>
</item>
<item
@
click
.
native=
"goContactUs"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/contact.png"
class=
"left-icon"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/contact.png"
class=
"left-icon"
>
<div
slot=
"name"
>
联系我们
</div>
</item>
<!--
<item
@
click
.
native=
"updateVersion"
>
...
...
@@ -157,24 +112,13 @@
<div
slot=
"content"
>
{{
currentVersion
}}
</div>
</item>
-->
<item
@
click
.
native=
"logOut"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/exit.png"
class=
"left-icon"
>
<img
slot=
"left-icon"
src=
"@/assets/myInfo/exit.png"
class=
"left-icon"
>
<div
slot=
"name"
>
退出登录
</div>
</item>
</list-item>
<div
class=
"version"
>
版本号:
{{
currentVersion
}}
</div>
<button
v-if=
"!popSetect"
@
click=
"approveBtn ? unBind() : changePageHead()"
>
{{
description
}}
</button>
<button
v-if=
"popSetect"
@
click=
"popSetectBox = true"
>
{{
description
}}
</button>
<button
v-if=
"!popSetect"
@
click=
"approveBtn ? unBind() : changePageHead()"
>
{{
description
}}
</button>
<button
v-if=
"popSetect"
@
click=
"popSetectBox=true"
>
{{
description
}}
</button>
</div>
</h-content>
<role-switch
...
...
@@ -244,7 +188,7 @@ export default {
}
},
computed
:
{
roleList
()
{
'roleList'
()
{
let
obj
=
{
bp_type
:
this
.
user_bp_type
,
bp_type_n
:
this
.
bp_type_n
,
...
...
@@ -316,7 +260,7 @@ export default {
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
(
vm
)
=>
{
next
(
vm
=>
{
vm
.
signCount
=
'0'
vm
.
carNum
=
'0'
vm
.
faceSign
=
'0'
...
...
@@ -358,8 +302,7 @@ export default {
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
if
(
res
.
info
)
{
vm
.
upLoadObj
=
process
.
env
.
filePath
+
vm
.
upLoadObj
=
process
.
env
.
filePath
+
'attachment_id='
+
res
.
info
.
attachment_id
+
'&access_token='
+
...
...
@@ -387,8 +330,7 @@ export default {
}
console
.
log
(
'选择后的角色为:'
+
role
)
},
typeConfirm
(
e
)
{
// 选择操作方式后
typeConfirm
(
e
)
{
// 选择操作方式后
this
.
popSetectBox
=
false
if
(
e
.
bp_type
===
'0'
)
{
this
.
changePageHead
()
...
...
@@ -419,7 +361,7 @@ export default {
}
else
if
(
this
.
bp_id
&&
this
.
user_bp_status
===
'NEW'
)
{
this
.
description
=
'待提交'
this
.
approveBtn
=
false
this
.
popSetect
=
true
// 是否弹出选择框
this
.
popSetect
=
true
// 是否弹出选择框
}
else
if
(
this
.
bp_id
&&
this
.
user_bp_status
===
'APPROVED'
)
{
this
.
description
=
'解除绑定'
this
.
approveBtn
=
true
...
...
@@ -430,7 +372,7 @@ export default {
)
{
this
.
description
=
'审核未通过'
this
.
approveBtn
=
false
this
.
popSetect
=
true
// 是否弹出选择框
this
.
popSetect
=
true
// 是否弹出选择框
}
else
{
this
.
description
=
'审批中'
this
.
approveBtn
=
false
...
...
@@ -457,7 +399,7 @@ export default {
},
})
},
// 进入待签约功能,客户类型为经销商则进入经销商功能,非经销商则进入
融租方案确认
// 进入待签约功能,客户类型为经销商则进入经销商功能,非经销商则进入
合同签约
goSign
()
{
if
(
this
.
bp_id
)
{
// if (this.user_bp_type === 'AGENT') {
...
...
@@ -510,7 +452,7 @@ export default {
},
})
},
// 进入
融租合同创建
// 进入
发车申请
goStart
()
{
if
(
this
.
bp_id
)
{
this
.
$router
.
push
({
...
...
@@ -520,7 +462,7 @@ export default {
hlsPopup
.
showLongCenter
(
'请先进行用户绑定'
)
}
},
// 进入
合同签订
// 进入
发车确认
goCarConfirm
()
{
if
(
this
.
bp_id
)
{
this
.
$router
.
push
({
...
...
@@ -647,7 +589,9 @@ export default {
},
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsHttp
.
post
(
url
,
param
)
.
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
hlsPopup
.
showLongCenter
(
'解绑成功'
)
...
...
@@ -683,7 +627,9 @@ export default {
},
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsHttp
.
post
(
url
,
param
)
.
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
hlsPopup
.
showLongCenter
(
'解绑成功'
)
...
...
@@ -705,18 +651,13 @@ export default {
this
.
bp_id
===
undefined
?
[
'修改头像'
]
:
[
'修改头像'
,
'用户信息'
,
'角色切换'
],
callback
:
(
index
)
=>
{
callback
:
index
=>
{
if
(
index
===
0
)
{
this
.
imgUploadShow
(
vm
.
app_user_id
)
}
else
if
(
index
===
1
)
{
this
.
changePageHead
()
}
else
if
(
index
===
2
)
{
if
(
(
vm
.
user_bp_type
===
'TENANT'
||
vm
.
user_bp_type
===
'GUTA'
||
vm
.
user_bp_type
===
'AGENT'
)
&&
vm
.
user_bp_status
===
'APPROVED'
)
{
if
(((
vm
.
user_bp_type
===
'TENANT'
)
||
(
vm
.
user_bp_type
===
'GUTA'
)
||
(
vm
.
user_bp_type
===
'AGENT'
))
&&
(
vm
.
user_bp_status
===
'APPROVED'
))
{
vm
.
$refs
.
roleSwitchRoleList
.
show
()
}
else
{
hlsPopup
.
showLongCenter
(
'您当前尚无可用角色'
)
...
...
@@ -755,7 +696,7 @@ export default {
hlsPopup
.
showActionSheet
({
titleText
:
'请选择照片'
,
buttonArray
:
[
'拍照'
,
'从相册取'
],
callback
:
(
index
)
=>
{
callback
:
index
=>
{
if
(
index
===
0
)
{
vm
.
imgUploadOpenCamera
(
check_id
)
}
else
{
...
...
@@ -866,7 +807,10 @@ export default {
changePageHead
()
{
let
vm
=
this
if
(
vm
.
bp_id
)
{
if
(
vm
.
user_bp_status
===
'NEW'
||
vm
.
user_bp_status
===
'RETURN'
)
{
if
(
vm
.
user_bp_status
===
'NEW'
||
vm
.
user_bp_status
===
'RETURN'
)
{
vm
.
flag
=
true
if
(
vm
.
user_bp_class
===
'NP'
)
{
vm
.
$router
.
push
({
...
...
@@ -912,7 +856,9 @@ export default {
},
})
}
}
else
if
(
vm
.
user_bp_status
===
'REJECT'
)
{
}
else
if
(
vm
.
user_bp_status
===
'REJECT'
)
{
vm
.
flag
=
true
if
(
vm
.
user_bp_class
===
'NP'
)
{
vm
.
$router
.
push
({
...
...
@@ -966,10 +912,7 @@ export default {
vm
.
app_user_id
=
res
.
info
.
app_user_id
window
.
localStorage
.
removeItem
(
'bp_id'
)
window
.
localStorage
.
setItem
(
'bp_id'
,
res
.
info
.
user_bp_id
)
window
.
localStorage
.
setItem
(
'user_bp_status'
,
res
.
info
.
user_bp_status
)
window
.
localStorage
.
setItem
(
'user_bp_status'
,
res
.
info
.
user_bp_status
)
window
.
localStorage
.
setItem
(
'bp_name'
,
res
.
info
.
user_bp_name
)
window
.
localStorage
.
setItem
(
'bp_identity'
,
res
.
info
.
bp_identity
)
window
.
localStorage
.
setItem
(
'bp_class'
,
res
.
info
.
user_bp_class
)
...
...
@@ -979,6 +922,7 @@ export default {
vm
.
user_phone
=
res
.
info
.
user_phone
vm
.
bp_type_n
=
res
.
info
.
user_bp_type_n
if
(
window
.
localStorage
.
multipleRole
)
{
}
else
{
if
(
res
.
info
.
user_bp_type
===
'TENANT'
)
{
window
.
localStorage
.
setItem
(
'multipleRole'
,
'TENANT'
)
...
...
@@ -996,11 +940,7 @@ export default {
}
else
{
vm
.
isAGENT
=
false
}
if
(
vm
.
user_bp_type
===
'GUTA'
||
vm
.
user_bp_type
===
'TENANT'
||
vm
.
user_bp_type
===
'AGENT'
)
{
if
(
vm
.
user_bp_type
===
'GUTA'
||
vm
.
user_bp_type
===
'TENANT'
||
vm
.
user_bp_type
===
'AGENT'
)
{
vm
.
isMultiRole
=
true
}
else
{
vm
.
isMultiRole
=
false
...
...
@@ -1035,39 +975,47 @@ export default {
async
certification
()
{
let
vm
=
this
if
(
vm
.
bp_id
)
{
if
(
vm
.
bp_identity
===
'NP_NO'
||
vm
.
bp_identity
===
'ORG_L_NO'
||
vm
.
bp_identity
===
'ORG_AUTH_NO'
)
{
let
url
=
process
.
env
.
basePath
+
'bp_query'
let
param
=
{
bp_id
:
window
.
localStorage
.
bp_id
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
((
result
)
=>
{
hlsPopup
.
hideLoading
()
if
(
result
.
result
===
'S'
)
{
let
data
=
result
.
lists
[
0
]
cordova
.
plugins
.
IdCardPlugin
.
idCardIdentify
(
{
idNum
:
data
.
id_card_no
,
idName
:
data
.
bp_name
,
phoneNum
:
window
.
localStorage
.
user_phone
,
},
function
(
suc
)
{
let
success
=
JSON
.
parse
(
suc
)
if
(
success
.
code
===
1
)
{
vm
.
getNpCertificationUrl
()
}
if
(
vm
.
bp_identity
===
'NP_NO'
||
vm
.
bp_identity
===
'ORG_L_NO'
)
{
let
authUrl
=
await
vm
.
getNpCertificationUrl
()
if
(
authUrl
)
{
const
u
=
navigator
.
userAgent
const
isiOS
=
!!
u
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
)
if
(
isiOS
)
{
let
ref
=
cordova
.
InAppBrowser
.
open
(
authUrl
,
'_blank'
,
'location=yes,toolbar=yes'
)
ref
.
addEventListener
(
'exit'
,
function
()
{
console
.
log
(
'Browser is closed...'
)
vm
.
userQuery
()
})
console
.
log
(
'ios'
)
}
else
{
vm
.
$router
.
push
({
name
:
'Certification'
,
params
:
{
authUrl
:
authUrl
,
},
function
(
reason
)
{
let
error
=
JSON
.
parse
(
reason
)
vm
.
hlsPopup
.
showLongCenter
(
'认证失败: '
+
error
.
message
)
})
console
.
log
(
'android'
)
}
)
}
else
{
vm
.
hlsPopup
.
showLongCenter
(
result
.
message
)
}
})
}
else
if
(
vm
.
bp_identity
===
'ORG_NO'
)
{
hlsPopup
.
showLongCenter
(
'APP端不支持认证企业账号,请移步PC端操作'
)
// hlsPopup.showLongCenter('获取认证url失败')
}
}
else
if
(
vm
.
bp_identity
===
'ORG_NO'
||
vm
.
bp_identity
===
'ORG_AUTH_NO'
)
{
// let authUrl = await vm.getOrgCertificationUrl()
// if (authUrl) {
// vm.$router.push({
// name: 'Certification',
// params: {
// authUrl: authUrl,
// },
// })
// } else {
// // hlsPopup.showLongCenter('获取认证url失败')
// }
hlsPopup
.
showLongCenter
(
'请联系对应业务人员为企业进行认证'
)
}
else
{
hlsPopup
.
showLongCenter
(
'您已认证通过'
)
}
...
...
@@ -1075,6 +1023,7 @@ export default {
hlsPopup
.
showLongCenter
(
'请先进行用户绑定'
)
}
},
// 获取个人认证url
async
getNpCertificationUrl
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'auth_user_sign'
...
...
@@ -1084,13 +1033,42 @@ export default {
hlsPopup
.
showLoading
(
'请稍候'
)
let
res
=
await
vm
.
$post
(
url
,
param
)
hlsPopup
.
hideLoading
()
if
(
res
.
info
.
code
===
0
&&
res
.
info
.
data
.
authUrl
)
{
hlsPopup
.
showLongCenter
(
'绑定失败!'
)
}
else
if
(
res
.
info
.
code
===
0
&&
res
.
info
.
data
.
openId
)
{
hlsPopup
.
showLongCenter
(
'绑定成功!'
)
vm
.
userQuery
()
if
((
res
.
info
.
code
===
0
)
&&
(
res
.
info
.
data
.
authUrl
))
{
vm
.
authUrl
=
res
.
info
.
data
.
authUrl
return
vm
.
authUrl
}
else
if
((
res
.
info
.
code
===
0
)
&&
(
res
.
info
.
data
.
openId
))
{
vm
.
authUrl
=
res
.
info
.
data
.
openId
return
vm
.
authUrl
}
else
{
hlsPopup
.
showLongCenter
(
res
.
info
.
msg
)
hlsPopup
.
showError
(
res
.
info
.
msg
)
return
''
}
},
// 获取企业认证url
async
getOrgCertificationUrl
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'auth_company_sign'
let
param
=
{
phone
:
vm
.
user_phone
,
}
hlsPopup
.
showLoading
(
'请稍候'
)
let
res
=
await
vm
.
$post
(
url
,
param
)
hlsPopup
.
hideLoading
()
// if (res.info.code === 0) {
// return res.info.data.authUrl
// } else {
// hlsPopup.showLongCenter(res.info.msg)
// return null
// }
if
((
res
.
info
.
code
===
0
)
&&
(
res
.
info
.
data
.
authUrl
))
{
vm
.
authUrl
=
res
.
info
.
data
.
authUrl
return
vm
.
authUrl
}
else
if
((
res
.
info
.
code
===
0
)
&&
(
res
.
info
.
data
.
openId
))
{
vm
.
authUrl
=
res
.
info
.
data
.
openId
return
vm
.
authUrl
}
else
{
hlsPopup
.
showError
(
res
.
info
.
msg
)
return
''
}
},
goAbout
()
{
...
...
@@ -1172,12 +1150,12 @@ export default {
border: 1px solid #00469c;
}
}
.has {
height: 206px;
}
.antiHas {
height: 3.12rem;
.has{
height:206px;
}
.antiHas{
height:3.12rem;
}
.top {
width: 100%;
// height: 206px;
...
...
@@ -1247,7 +1225,7 @@ export default {
text-align: center;
font-family: PingFangSC-Regular;
font-size: 14px;
color:
#656464;
color:#656464;
}
}
.userInfo {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment