Commit 8107611c authored by 李晓兵's avatar 李晓兵

Merge branch 'develop' of https://hel.hand-china.com/xugong/hls-xcmg-vue-app into develop

parents dc42dcbf d6d99651
Pipeline #4463 canceled with stages
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
vm.$post(url, param).then(function (res) { vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.notice_detail = res.info.notice_detail vm.notice_detail = res.info.notice_body
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
...@@ -73,6 +73,8 @@ export default { ...@@ -73,6 +73,8 @@ export default {
line-height: 20px; line-height: 20px;
p{ p{
text-indent: 35px; text-indent: 35px;
color: #666666;
font-size: 14px;
} }
} }
} }
......
...@@ -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>
...@@ -162,6 +170,8 @@ export default { ...@@ -162,6 +170,8 @@ export default {
upLoadObj: defaultImg, // 上传的图片 upLoadObj: defaultImg, // 上传的图片
flag: true, flag: true,
isAGENT: false, isAGENT: false,
popSetect: false, // true:待提交或者审核未通过
popSetectBox: false, // 弹出选择框
elecStatusDesceibe: '', elecStatusDesceibe: '',
user_bp_status: '', user_bp_status: '',
user_bp_class: '', user_bp_class: '',
...@@ -190,6 +200,16 @@ export default { ...@@ -190,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: {
...@@ -301,30 +321,46 @@ export default { ...@@ -301,30 +321,46 @@ 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
this.popSetect = true// 是否弹出选择框
} 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')
) { ) {
this.description = '审核未通过' this.description = '审核未通过'
this.approveBtn = false this.approveBtn = false
this.popSetect = true// 是否弹出选择框
} else { } else {
this.description = '审批中' this.description = '审批中'
this.approveBtn = false this.approveBtn = false
this.popSetect = false
} }
}, },
// 我的发票 // 我的发票
...@@ -489,6 +525,46 @@ export default { ...@@ -489,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({
......
...@@ -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 () {
......
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