setting.vue 1.23 KB
<template>
	<view class="list">
    <uni-list>
    	<uni-list-item title="当前仓库" rightText="长沙仓库" :showArrow="false">1232</uni-list-item>
    	<uni-list-item title="货主编码" rightText="长沙华恒机器人有限公司" :showArrow="false"></uni-list-item>
		<uni-list-item title="操作者" rightText="youjie" :showArrow="false"></uni-list-item>
		<uni-list-item title="日志查看" rightText="74条" :showArrow="false" link="navigateTo" to="/pages/log/log" ></uni-list-item>
		<uni-list-item title="版本号" :rightText="version" :showArrow="false"></uni-list-item>
    </uni-list>
	<view class="log-out" @click="logOut">
		<view class="btn">
			<text>退出登录</text>
		</view>
		
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				version: this.$conf.version
			}
		},
		methods: {
			logOut() {
				this.$store.dispatch("logout")
				this.$api.user.logout();
				this.back();
			},
			back() {
				uni.redirectTo({
					url: 'page/login/login'
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
 .list {
	 margin-top: 30rpx;
	 .log-out {
		 margin-top: 30rpx;
		 .btn {
			 height: 86rpx;
			 line-height: 86rpx;
			 text-align: center;
			 background-color: #FFFFFF;
		 }
	 }
 }
</style>