From 14681dfe7052cb76eefcc0c17d0a0d708e1ac9dd Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期二, 13 五月 2025 16:31:14 +0800
Subject: [PATCH] 完成移动端基本功能

---
 eims-ui-mobile/src/pages/my/index.vue |   50 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/eims-ui-mobile/src/pages/my/index.vue b/eims-ui-mobile/src/pages/my/index.vue
index 2c2a4ca..8a5bd92 100644
--- a/eims-ui-mobile/src/pages/my/index.vue
+++ b/eims-ui-mobile/src/pages/my/index.vue
@@ -9,11 +9,57 @@
 </route>
 
 <template>
-  <view class="pt-40 text-xl text-center text-green-500">鎴戠殑椤甸潰</view>
+  <view class="bg-base">
+    <wd-cell-group border>
+      <wd-cell title="鐧诲綍鐢ㄦ埛" :value="realName" icon="user" is-link />
+      <wd-cell title="瑙掕壊" :value="loginRoleName()" icon="bags" is-link />
+      <wd-cell title="浜哄憳绠$悊" icon="usergroup" is-link @click="handleInfo" />
+    </wd-cell-group>
+    <wd-cell-group border class="mt-2">
+      <wd-cell title="閫�鍑虹櫥褰�" icon="login" is-link @click="handleLogout" />
+    </wd-cell-group>
+  </view>
 </template>
 
 <script lang="ts" setup>
-//
+import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store'
+import { loginRoleName } from '@/utils/RoleUtils'
+import { useMessage } from 'wot-design-uni'
+const message = useMessage()
+const userStore = useUserStore()
+const accessStore = useAccessStore()
+const configStore = useSystemConfigStore()
+const realName = computed(() => userStore?.userInfo?.realName)
+
+function handleLogout() {
+  if (!isLogined()) {
+    uni.navigateTo({ url: '/pages/login/index' })
+    return false
+  }
+  message
+    .confirm({
+      msg: '鎻愮ず',
+      title: '纭畾閫�鍑虹櫥褰曞悧锛�',
+    })
+    .then(() => {
+      userStore.clearUserInfo()
+      accessStore.clearAccessInfo()
+      configStore.clearConfigInfo()
+      uni.navigateTo({ url: '/pages/login/index' })
+    })
+    .catch(() => {})
+}
+
+const isLogined = () => {
+  return accessStore.isLogined
+}
+
+function handleInfo() {
+  uni.showToast({
+    title: '鍔熻兘寮�鍙戜腑',
+    icon: 'none',
+  })
+}
 </script>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.3