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
d6d99651
Commit
d6d99651
authored
Jan 03, 2020
by
linxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
f24b9ea9
Pipeline
#4462
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
7 deletions
+82
-7
my-info.vue
src/pages/myInfo/my-info.vue
+74
-1
role-switch-component.vue
src/pages/myInfo/role-switch-component.vue
+8
-6
No files found.
src/pages/myInfo/my-info.vue
View file @
d6d99651
...
@@ -137,7 +137,8 @@
...
@@ -137,7 +137,8 @@
<div
slot=
"name"
>
退出登录
</div>
<div
slot=
"name"
>
退出登录
</div>
</item>
</item>
</list-item>
</list-item>
<button
@
click=
"approveBtn ? unBind() : changePageHead()"
>
{{
description
}}
</button>
<button
v-if=
"!popSetect"
@
click=
"approveBtn ? unBind() : changePageHead()"
>
{{
description
}}
</button>
<button
v-if=
"popSetect"
@
click=
"popSetectBox=true"
>
{{
description
}}
</button>
</div>
</div>
</h-content>
</h-content>
<role-switch
<role-switch
...
@@ -147,6 +148,13 @@
...
@@ -147,6 +148,13 @@
@
roleConfirm=
"roleConfirm"
@
roleConfirm=
"roleConfirm"
@
roleCancle=
"roleCancle"
@
roleCancle=
"roleCancle"
/>
/>
<role-switch
v-show=
"popSetectBox"
ref=
"roleSwitch"
:roleList=
"type"
@
roleConfirm=
"typeConfirm"
@
roleCancle=
"typeCancle"
/>
</h-view>
</h-view>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -163,6 +171,7 @@ export default {
...
@@ -163,6 +171,7 @@ export default {
flag
:
true
,
flag
:
true
,
isAGENT
:
false
,
isAGENT
:
false
,
popSetect
:
false
,
// true:待提交或者审核未通过
popSetect
:
false
,
// true:待提交或者审核未通过
popSetectBox
:
false
,
// 弹出选择框
elecStatusDesceibe
:
''
,
elecStatusDesceibe
:
''
,
user_bp_status
:
''
,
user_bp_status
:
''
,
user_bp_class
:
''
,
user_bp_class
:
''
,
...
@@ -191,6 +200,16 @@ export default {
...
@@ -191,6 +200,16 @@ export default {
bp_type_desc
:
'担保人'
,
bp_type_desc
:
'担保人'
,
},
},
],
],
type
:
[
{
bp_type
:
'0'
,
bp_type_desc
:
'修改信息'
,
},
{
bp_type
:
'1'
,
bp_type_desc
:
'重新选择用户类型'
,
},
],
}
}
},
},
watch
:
{
watch
:
{
...
@@ -302,15 +321,27 @@ export default {
...
@@ -302,15 +321,27 @@ export default {
this
.
roleSwitchFlag
=
false
this
.
roleSwitchFlag
=
false
console
.
log
(
'选择后的角色为:'
+
role
)
console
.
log
(
'选择后的角色为:'
+
role
)
},
},
typeConfirm
(
e
)
{
// 选择操作方式后
this
.
popSetectBox
=
false
if
(
e
.
bp_type
===
'0'
)
{
this
.
changePageHead
()
}
else
if
(
e
.
bp_type
===
'1'
)
{
this
.
unBindSelext
()
}
},
// 选择角色后取消
// 选择角色后取消
roleCancle
()
{
roleCancle
()
{
this
.
roleSwitchFlag
=
false
this
.
roleSwitchFlag
=
false
},
},
typeCancle
()
{
this
.
popSetectBox
=
false
},
// 监听用户状态
// 监听用户状态
watchBpStatus
()
{
watchBpStatus
()
{
if
(
!
this
.
bp_id
&&
this
.
user_bp_status
===
'NEW'
)
{
if
(
!
this
.
bp_id
&&
this
.
user_bp_status
===
'NEW'
)
{
this
.
description
=
'用户绑定'
this
.
description
=
'用户绑定'
this
.
approveBtn
=
false
this
.
approveBtn
=
false
this
.
popSetect
=
false
}
else
if
(
this
.
bp_id
&&
this
.
user_bp_status
===
'NEW'
)
{
}
else
if
(
this
.
bp_id
&&
this
.
user_bp_status
===
'NEW'
)
{
this
.
description
=
'待提交'
this
.
description
=
'待提交'
this
.
approveBtn
=
false
this
.
approveBtn
=
false
...
@@ -318,6 +349,7 @@ export default {
...
@@ -318,6 +349,7 @@ export default {
}
else
if
(
this
.
bp_id
&&
this
.
user_bp_status
===
'APPROVED'
)
{
}
else
if
(
this
.
bp_id
&&
this
.
user_bp_status
===
'APPROVED'
)
{
this
.
description
=
'解除绑定'
this
.
description
=
'解除绑定'
this
.
approveBtn
=
true
this
.
approveBtn
=
true
this
.
popSetect
=
false
}
else
if
(
}
else
if
(
(
this
.
bp_id
&&
this
.
user_bp_status
===
'RETURN'
)
||
(
this
.
bp_id
&&
this
.
user_bp_status
===
'RETURN'
)
||
(
this
.
bp_id
&&
this
.
user_bp_status
===
'REJECT'
)
(
this
.
bp_id
&&
this
.
user_bp_status
===
'REJECT'
)
...
@@ -328,6 +360,7 @@ export default {
...
@@ -328,6 +360,7 @@ export default {
}
else
{
}
else
{
this
.
description
=
'审批中'
this
.
description
=
'审批中'
this
.
approveBtn
=
false
this
.
approveBtn
=
false
this
.
popSetect
=
false
}
}
},
},
// 我的发票
// 我的发票
...
@@ -492,6 +525,46 @@ export default {
...
@@ -492,6 +525,46 @@ export default {
},
},
})
})
},
},
unBindSelext
()
{
let
vm
=
this
vm
.
popSetectBox
=
true
hlsPopup
.
showConfirm
({
title
:
'提示'
,
content
:
'确定解除绑定?'
,
onConfirm
:
function
(
index
)
{
if
(
index
===
1
)
{
let
myPhone
=
window
.
localStorage
.
getItem
(
'user_phone'
)
let
myPassword
=
window
.
localStorage
.
getItem
(
'password'
)
let
url
=
process
.
env
.
basePath
+
'bp_unbind'
let
param
=
{
master
:
{
phone
:
myPhone
,
password
:
myPassword
,
},
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
hlsHttp
.
post
(
url
,
param
)
.
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
hlsPopup
.
showLongCenter
(
'解绑成功'
)
vm
.
userQuery
()
vm
.
approveBtn
=
false
this
.
$router
.
push
({
name
:
'UserBind'
,
})
}
else
{
vm
.
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
.
catch
(()
=>
{
vm
.
hlsPopup
.
showLongCenter
(
'传入参数异常'
)
})
}
},
})
},
unBind
()
{
unBind
()
{
let
vm
=
this
let
vm
=
this
hlsPopup
.
showConfirm
({
hlsPopup
.
showConfirm
({
...
...
src/pages/myInfo/role-switch-component.vue
View file @
d6d99651
...
@@ -11,10 +11,12 @@
...
@@ -11,10 +11,12 @@
<img
src=
"@/assets/myInfo/modalClose.png"
@
click=
"roleCancle"
>
<img
src=
"@/assets/myInfo/modalClose.png"
@
click=
"roleCancle"
>
</div>
</div>
<div
class=
"content-wrap"
>
<div
class=
"content-wrap"
>
<div
v-for=
"(item,index) in roleList"
:key=
"index"
:class=
"
{'item-active':index === switchIndex}" class="role-item" @click="chooseRole(index)">
<div
v-for=
"(item,index) in roleList"
:key=
"index"
:class=
"
{'item-active':index === switchIndex}" class="role-item"
@click="chooseRole(index)">
<span>
{{
item
.
bp_type_desc
}}
</span>
<span>
{{
item
.
bp_type_desc
}}
</span>
</div>
</div>
<div
:class=
"
{'content-btn-active':switchIndex !== ''}" class="content-btn"
>
<span
@
click=
"roleConfirm"
>
确定
</span></div>
<div
:class=
"
{'content-btn-active':switchIndex !== ''}" class="content-btn"
@click="roleConfirm">
<span
>
确定
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -37,15 +39,15 @@ export default {
...
@@ -37,15 +39,15 @@ export default {
updated
:
function
()
{
updated
:
function
()
{
},
},
methods
:
{
methods
:
{
chooseRole
(
index
)
{
chooseRole
(
index
)
{
this
.
switchIndex
=
index
this
.
switchIndex
=
index
},
},
roleConfirm
()
{
roleConfirm
()
{
if
(
this
.
switchIndex
===
''
)
{
if
(
this
.
switchIndex
===
''
)
{
}
else
{
}
else
{
this
.
showFlag
=
false
this
.
showFlag
=
false
this
.
$emit
(
'roleConfirm'
,
this
.
roleList
[
this
.
switchIndex
])
this
.
$emit
(
'roleConfirm'
,
this
.
roleList
[
this
.
switchIndex
])
}
}
},
},
show
()
{
show
()
{
...
...
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