erp 新洋电子
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

74 lines
1.5 KiB

<template>
<view>
<view class="bg">
<view class="user-info">
<image src="../../static/def.jpg" mode=""></image>
<view @tap="login()" v-if="!userInfo.name">未登录去登录</view>
<view v-else>欢迎您!{{userInfo.name}}</view>
</view>
</view>
<view>
<view class="list" @tap="editPsd()">
<view class="left">
<image class="xgmi" src="../../static/xg.png" mode=""></image>
<view>修改密码</view>
</view>
<image class="next-icon" src="../../static/next.png"></image>
</view>
</view>
<button class="logout" type="primary" v-if="userInfo.name" @tap="logout">退出登录</button>
</view>
</template>
<script>
import { mapGetters, mapMutations } from 'vuex';
import {authSee} from "../../api/user.js"
export default {
computed: {
...mapGetters(['userInfo', 'roleType'])
},
onShow() {
},
onLoad() {
},
data() {
return {
status:0,
ifJump:0,
};
},methods:{
...mapMutations(['setToken', 'setUserInfo']),
editPsd(){
uni.navigateTo({
url: '../editePsd/editePsd',
success: res => {},
fail: () => {},
complete: () => {}
});
},
login(){
uni.navigateTo({
url: '../login/login',
success: res => {},
fail: () => {},
complete: () => {}
});
},
logout(){
this.$functions.confirm("是否确认退出登录").then(()=>{
this.setToken("");
this.setUserInfo({});
uni.reLaunch({
url:"../login/login"
})
})
}
}
}
</script>
<style lang="scss">
@import "./index.scss"
</style>