Files
GX.O3.WMS/APK/APP_O3/pages/myinfo/loginmanage/loginmanage.vue
T

197 lines
4.8 KiB
Vue
Executable File

<template>
<view class="page">
<view class="title">系统设置</view>
<view class="title-switch"><text>设为默认账号</text><switch/></view>
<view class="title-switch"><text>直接登录</text><switch/></view>
<view class="title-switch"><text>退出清除信息</text><switch/></view>
<view class="title">声音管理</view>
<view class="title-switch"><text>暂无</text></view>
<view class="title">网络设定</view>
<view class="title-switch"><text>{{requestUrl}}</text></view>
<view class="bottom-button">
<view class="bot-btn" @tap="clickClearCache"> 切换账号</view>
<!-- #ifdef APP-PLUS -->
<view class="bot-btn-quit" @tap="Quit">
<navigator target="miniProgram">退出系统</navigator>
</view>
<!-- #endif -->
</view>
<opsoft-dialog
@dialogCancelClick="dialogCancelClick"
@dialogConfirmClick="dialogConfirmClick"
:dialogContent="dialogContent"
:dialogTitle="dialogTitle"
:dialogShow="dialogShow"
></opsoft-dialog>
</view>
</template>
<script>
import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
import uniList from '@/components/uni-list/uni-list.vue'
import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
import opsoftDialog from '@/components/opsoft-dialog/opsoft-dialog.vue'
import errorStrUntil from '@/common/errorStrUntil.js';
import {
mapState,
mapMutations
} from 'vuex';
export default {
data() {
return {
dialogShow:false,
dialogTitle:'',
dialogContent:'',
requestUrl: '',
ip:'',
post:'',
virtualPath:''
}
},
components: {
uniCollapse,
uniCollapseItem,
uniList,
uniListItem,
opsoftDialog
},
computed: {
...mapState(['hasLogin','userInfo'])
},
onShow() {
this.requestUrl = this.$global.globalData.requestUrl
},
methods: {
dialogProps(){
this.dialogShow = true;
this.dialogTitle = '切换提示';
this.dialogContent = '确认切换账号';
},
dialogConfirmClick:function() {
console.log("dialogConfirmClick");
this.dialogShow=false;
let requestUrl = this.$global.globalData.requestUrl;
this.post = uni.getStorageSync('requestPort');
this.ip = uni.getStorageSync('requestIp');
this.virtualPath = uni.getStorageSync('requestPath');
// 清除token
uni.setStorageSync("token", "")
uni.setStorageSync("ifLogin", false)
//缓存账套配置
this.$global.setGlobalObj({
requestUrl: requestUrl
});
uni.setStorage({
key:"requestPort",
data:this.post
});
uni.setStorage({
key:"requestIp",
data:this.ip
});
uni.setStorage({
key:"requestPath",
data:this.virtualPath
});
uni.reLaunch({url: '../../myinfo/login/login'});
},
dialogCancelClick:function() {
console.log("dialogCancelClick");
this.dialogShow=false
},
Quit() {
//只在安卓应用中有用 退出当前应用,改方法只在App中生效
plus.runtime.quit();
},
clearServerCache: function(count){},
logOut(count){},
clickClearCache: function() {
this.dialogProps()
},
...mapMutations(['logout','clearCache']),
}
}
</script>
<style>
page {
width: 100%;
height: 100%;
background: #F2F2F2;
}
.title{
height: 90.57upx;
line-height: 90.57upx;
font-size: 28.98upx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #686868;
margin-left: 43.47upx;
}
.title-switch{
display: flex;
width: 100%;
flex-direction: row;
background: #FFFFFF;
margin-top: 3.62upx;
align-items: center;
}
.title-switch text{
width: 100%;
height: 108.69upx;
line-height: 108.69upx;
font-size: 32.6upx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #232323;
margin-left: 43.47upx;
}
switch{
width: 79.71upx;
transform: scale(0.7);
margin-right: 43.47upx;
}
.bot-btn{
height: 86.95upx;
line-height: 86.95upx;
background: #FFFFFF;
box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);
border-radius: 43.47upx;
text-align: center;
font-size: 32.6upx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4688FD;
margin-top: 65.21upx;
margin-left: 43.47upx;
margin-right: 43.47upx;
}
.bot-btn-quit{
height: 86.95upx;
line-height: 86.95upx;
background: #FFFFFF;
box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);
border-radius: 43.47upx;
text-align: center;
font-size: 32.6upx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4688FD;
margin-top: 30rpx;
margin-left: 43.47upx;
margin-right: 43.47upx;
}
</style>