<!--
|
* @Author: 小明丶
|
* @Date: 2019-08-20 13:57:53
|
* @LastEditors: 小明丶
|
* @LastEditTime: 2020-11-19 16:42:13
|
* @Description:
|
-->
|
|
<template>
|
<div class="setting-box h-100-g">
|
<v-navbar title="设置中心" fixed></v-navbar>
|
|
<div class="cell-group" v-if="orgType===1 || orgType===2">
|
<v-cell label='商户审批' :readonly="true" isLink :placeholder="placeText"
|
@click.native="$router.push('/mine/setting/merchants-approval')">
|
</v-cell>
|
</div>
|
|
<div class="cell-group" v-if="orgType == 3">
|
<v-cell label='商户资料' :readonly="true" isLink @click.native="$router.push(`/setting/mer-date?merId=${orgId}`)"></v-cell>
|
</div>
|
<div class="cell-group">
|
<v-cell label='修改密码' v-if="hasTokenLoc && isLoginByOpenId" :readonly="true" isLink @click.native="$router.push('/user/reset-pwd')"></v-cell>
|
<v-cell label='退出登录' v-if="hasTokenLoc" :readonly="true" isLink :Show_input="false" @click.native="dialogShow = !dialogShow">
|
</v-cell>
|
</div>
|
|
|
|
<van-dialog class="setting-box-dialog" v-model="dialogShow" :confirmButtonColor="$store.state.backColor" show-cancel-button message="确定退出当前账号?"
|
@confirm="LoginOut">
|
</van-dialog>
|
</div>
|
</template>
|
|
<script>
|
import {
|
SET_SESSION_ID,
|
SET_USER_INFO
|
} from '@/store/mutations-types';
|
import {
|
mapMutations, mapGetters
|
} from 'vuex';
|
export default {
|
name: "setting",
|
data() {
|
return {
|
placeText: '',
|
dialogShow: false,
|
}
|
},
|
computed:{
|
...mapGetters(['orgType', 'orgId']),
|
hasTokenLoc(){
|
if(localStorage.hjToken){
|
return false
|
}else{
|
return true
|
}
|
},
|
isLoginByOpenId(){
|
if(sessionStorage.isLoginByOpenId == 1){
|
return false
|
}else{
|
return true
|
}
|
}
|
},
|
created(){
|
this.$api.getAuditType().then((res) => {
|
this.placeText = res.body.currAuditTypeName;
|
}).catch((err) => {
|
|
});
|
},
|
methods: {
|
...mapMutations([SET_USER_INFO, SET_SESSION_ID]),
|
LoginOut() {
|
localStorage.removeItem('user_account')
|
localStorage.removeItem('user_pwd')
|
localStorage.removeItem('sib_wx_openId')
|
this.SET_USER_INFO({});
|
this.SET_SESSION_ID('');
|
this.$router.push('/');
|
},
|
}
|
}
|
</script>
|
|
<style scoped lang="less">
|
.setting-box {
|
padding-top: 44px;
|
background-color: @c-bg-f5;
|
|
.cell-group {
|
margin: 10px auto 0 auto;
|
width: 360px;
|
}
|
}
|
</style>
|