From b850badcf800eff5819e0789d1b81e5e27fcd037 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 29 十一月 2024 17:21:34 +0800
Subject: [PATCH] ll
---
h5/pages/index.vue | 41 +++++++++++++++++++++++++++++++++--------
1 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/h5/pages/index.vue b/h5/pages/index.vue
index 3970282..8232d81 100644
--- a/h5/pages/index.vue
+++ b/h5/pages/index.vue
@@ -1,6 +1,6 @@
<template>
<view class="main_app">
- <view class="hone_name title">{{ userInfo.name }}锛屾杩庣櫥褰�</view>
+ <view class="hone_name title">{{ userInfo.realname }}锛屾杩庣櫥褰�</view>
<view class="home_con">
<image class="bg" src="@/static/home/home_bg.jpg" mode=""></image>
<view class="h1">闃滃畞鏂囦綋涓績</view>
@@ -20,19 +20,21 @@
<view class="name">{{item.name}}</view>
</view>
</view>
+ <view class="loginout" @click="loginOut">閫�鍑虹櫥闄�</view>
</view>
-
</template>
-<script>
+<script>
+ import { logoutPost } from '@/api'
export default {
data() {
return {
userInfo: uni.getStorageSync('userInfo') || {},
- list1: [{
- name: '鎵爜宸℃',
- url: '',
- img: require('@/static/home/ic_fangkebaobei@2x.png'),
+ list1: [
+ {
+ name: '鏂板宸ュ崟',
+ url: '/pages/workOrder/edit',
+ img: require('@/static/home/ic_xinzenggongdan@2x.png'),
auth: 'weixin:menu:visitcar'
},
{
@@ -72,7 +74,14 @@
url: item.url
})
},
-
+ loginOut() {
+ this.$store.commit('empty')
+ logoutPost()
+ uni.redirectTo({
+ url: '/pages/login'
+ })
+ },
+
}
}
</script>
@@ -131,5 +140,21 @@
}
}
}
+
+ .loginout {
+ position: fixed;
+ bottom: 88rpx;
+ left: 50%;
+ transform: translate(-50%, 0);
+ width: 152rpx;
+ height: 60rpx;
+ border-radius: 30rpx;
+ border: 1rpx solid $primaryColor;
+ color: $primaryColor;
+ font-size: 26rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3