<template>
|
<div class="setting">
|
<x-header
|
:left-options.showBack="{backText: ''}"
|
:title="'设置'"
|
></x-header>
|
<Group>
|
<cell title="修改密码" v-if="showBtn" :is-link="true" link="/f-update-password"></cell>
|
<!--<cell title="给予评价" :is-link="true"></cell>-->
|
<!--<cell title="关于我们" :is-link="true"></cell>-->
|
<cell title="当前版本" v-if="showVer" @click.native="alertUpdata">{{appVer}}</cell>
|
|
</Group>
|
<FButton v-if="showBtn" text="退出登录" class="btn" @click.native="logoutFn"></FButton>
|
</div>
|
</template>
|
<script>
|
/**
|
* Created by 吴彦祖 on 2018/4/2.
|
* 我的--设置
|
*/
|
import FButton from '../../components/common/FButton.vue'
|
import { Group , Cell , XHeader, Alert,XButton} from 'vux';
|
import sysApi from '../../api/api';
|
import statusCodeManage from '../../api/statusCodeManage';
|
export default {
|
name: 'f-setting',
|
components:{
|
XHeader,
|
Group,
|
Cell,
|
FButton,
|
Alert,
|
XButton
|
},
|
data(){
|
return {
|
toChangePwd:'',
|
appVer:'V 1.0.0',
|
showBtn:false,
|
showVer:true
|
}
|
},
|
methods:{
|
logoutFn(){
|
sysApi.logout().then(
|
res=>{
|
window.sessionStorage.removeItem('newClientState');
|
window.sessionStorage.removeItem('newPhoneNum');
|
window.sessionStorage.removeItem('newSid');
|
this.$router.push({name:'/f-main'});
|
},
|
err=>{
|
statusCodeManage.showTipOfStatusCode(err,this);
|
}
|
)
|
}
|
},
|
activated(){
|
this.$store.commit('UPDATE_DIRECTION', {direction: 'in'});
|
let sid=window.sessionStorage.getItem('newSid');
|
let clientInfo=JSON.parse(window.localStorage.getItem('newClientInfo'));
|
if(clientInfo.cn){
|
this.showVer=false;
|
}else{
|
this.showVer=true;
|
}
|
if(sid){
|
this.showBtn=true;
|
}else{
|
this.showBtn=false;
|
}
|
},
|
deactivated () {
|
this.$store.commit('UPDATE_DIRECTION', {direction: 'none'});
|
}
|
}
|
</script>
|
<style lang="less">
|
@import '../../style/mixin.less';
|
.setting{
|
background-color: @color-background-default;
|
.vux-header {
|
.color-linear-gradient(@color-primary-light, @color-primary, 90deg);
|
.vux-header-title {
|
font-size: 18px;
|
}
|
.vux-header-left {
|
.left-arrow:before {
|
border: solid 1px @color-white;
|
border-width: 2px 0 0 2px;
|
}
|
}
|
}
|
.weui-cells{
|
margin-top:10px;
|
}
|
.vux-label{
|
font-size:@font-size-base;
|
color: @color-text-primary;
|
}
|
.weui-btn:after{
|
display: none;
|
}
|
|
|
/*.weui-dialog{*/
|
/*width:240px;*/
|
/*height:346px;*/
|
/*background-image: url("../../assets/img/wechat.png");*/
|
/*background-size:240px 346px;*/
|
/*border-radius:7.5PX;*/
|
/*overflow: visible;*/
|
/*}*/
|
/*.weui-dialog__hd{*/
|
/*display: none;*/
|
/*}*/
|
/*.weui-dialog__bd{*/
|
/*width:100%;*/
|
/*height:100%;*/
|
/*position: relative;*/
|
/*box-sizing: border-box;*/
|
/*img{*/
|
/*width:83px;*/
|
/*height:83px;*/
|
/*position: absolute;*/
|
/*left:50%;*/
|
/*bottom:10px;*/
|
/*margin-left: -42px;*/
|
/*}*/
|
/*.close-icon{*/
|
/*width:83px;*/
|
/*height:83px;*/
|
/*position: absolute;*/
|
/*left:50%;*/
|
/*bottom:-82px;*/
|
/*margin-left: -42px;*/
|
/*span:after{*/
|
/*content:"";*/
|
/*border-right: 1PX solid #ffffff;*/
|
/*font-size:20PX;*/
|
/*}*/
|
/*i{*/
|
/*display: block;*/
|
/*font-size:25PX;*/
|
/*color: #ffffff;*/
|
/*}*/
|
/*}*/
|
/*}*/
|
/*.weui-dialog__ft{*/
|
/*display: none;*/
|
/*}*/
|
/*.f-button-alert{*/
|
/*width:110px;*/
|
/*height: 33px;*/
|
/*font-size: 14PX;*/
|
/*background-color: #fff000 !important;*/
|
/*color: #0092f1;*/
|
/*position: absolute;*/
|
/*left:50%;*/
|
/*top:189px;*/
|
/*margin-left: -55px;*/
|
/*}*/
|
}
|
</style>
|