From 758d8056dc3dbc6bf92c298aa3627e66b933b5a0 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 22 五月 2025 13:25:21 +0800
Subject: [PATCH] feat: UI

---
 apps/taro/src/pages/mine/index.vue |  116 ++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 85 insertions(+), 31 deletions(-)

diff --git a/apps/taro/src/pages/mine/index.vue b/apps/taro/src/pages/mine/index.vue
index 2717095..e379d80 100644
--- a/apps/taro/src/pages/mine/index.vue
+++ b/apps/taro/src/pages/mine/index.vue
@@ -1,46 +1,80 @@
 <template>
-  <PageLayoutWithBg class="mine-page-wrapper" title="鎴戠殑" :need-auth="false">
+  <PageLayoutWithBg class="mine-page-wrapper" :need-auth="false">
     <template #navigationBar>
-      <TransparentNavigationBar
-        title="涓汉涓績"
-        :is-absolute="false"
-        mode="dark"
-      ></TransparentNavigationBar>
+      <TransparentNavigationBar :title="'涓汉涓績'" :is-absolute="false">
+      </TransparentNavigationBar>
     </template>
     <template #bg>
-      <img :src="OssAssets.mine.Bg" class="mine-page-bg" :style="{ height: `${bgHeight}px` }" />
+      <img :src="OssAssets.common.MinePageBg" class="mine-page-bg" />
     </template>
     <div class="mine-page-top-view" @click="goLogin">
       <img class="mine-avatar" :src="DefaultAvatar" alt="" />
       <div class="user-info">
-        <div class="user-info-name" v-if="isLogin">{{ userDetail?.userName ?? '123' }}</div>
+        <div class="user-info-name" v-if="isLogin">
+          {{ hiddenPhoneNumber(virtualPhoneNumber) }}
+        </div>
         <div class="mine-go-login" v-else>鐧诲綍</div>
       </div>
     </div>
-    <ContentScrollView>
+    <ContentScrollView style="background-color: transparent">
       <List class="mine-list-wrapper">
-        <ListItem title="璁㈠崟绠$悊" @click="goOrderManage"></ListItem>
-        <ListItem v-if="isLogin" title="閫�鍑虹櫥褰�" @click="goLogout"></ListItem>
+        <ListItemV2 :icon="IconMineOrder" title="璁㈠崟绠$悊" @click="goOrderManage"></ListItemV2>
+        <ListItemV2 :icon="IconMineUserId" title="鎴峰彿绠$悊" @click="goUserAccountList"></ListItemV2>
+        <template v-if="isChannelAccount">
+          <ListItemV2 :icon="IconMineDataBoard" title="鏁版嵁鐪嬫澘" @click="goDashboard"></ListItemV2>
+          <ListItemV2
+            :icon="IconMinePromotion"
+            title="娓犻亾浜岀淮鐮�"
+            @click="goShareQrcode"
+          ></ListItemV2>
+          <ListItemV2
+            :icon="IconMinePromotion"
+            title="鎺ㄥ箍浜岀淮鐮�"
+            @click="goPromotionQrcode"
+          ></ListItemV2>
+        </template>
+        <ListItemV2
+          :icon="IconMineCustomerService"
+          v-if="isWeb && !isInAlipay"
+          title="鍦ㄧ嚎瀹㈡湇"
+          @click="handleChat"
+        ></ListItemV2>
+        <ListItemV2
+          v-if="isLogin"
+          title="閫�鍑虹櫥褰�"
+          @click="goLogout"
+          :icon="IconMineExist"
+        ></ListItemV2>
       </List>
     </ContentScrollView>
   </PageLayoutWithBg>
 </template>
 
 <script setup lang="ts">
-import { TransparentNavigationBar, List, ListItem } from '@/components';
-import { useUser, useIsLogin, useGoLogin, useAccessLogin } from '@/hooks';
+import { TransparentNavigationBar, List, ListItemV2 } from '@/components';
+import { useUser, useIsLogin, useGoLogin, useAccessLogin, useOnlineService } from '@/hooks';
 import Taro from '@tarojs/taro';
 import { RouterPath, OssAssets } from '@/constants';
 import DefaultAvatar from '@/assets/components/icon-default-avatar.png';
+import IconMineOrder from '@/assets/mine/icon-mine-order.png';
+import IconMineUserId from '@/assets/mine/icon-mine-userId.png';
+import IconMineDataBoard from '@/assets/mine/icon-mine-data-board.png';
+import IconMinePromotion from '@/assets/mine/icon-mine-promotion.png';
+import IconMineCustomerService from '@/assets/mine/icon-mine-customer-service.png';
+import IconMineExist from '@/assets/mine/icon-mine-exist.png';
 import { useSystemStore } from '@/stores/modules/system';
-import PageLayoutWithBg from '@/components/Layout/PageLayoutWithBg.vue';
 import { useUserStore } from '@/stores/modules/user';
-import { useUserStoreWithOut } from '@/stores/modules/user';
+import { Message } from '@/utils';
+import { isWeb, isInAlipay } from '@/utils/env';
+import { useLifeRechargeContext } from '@life-payment/core-vue';
+import { hiddenPhoneNumber } from '@life-payment/utils';
 
-const { userDetail } = useUser();
+const { userDetail, virtualPhoneNumber, isChannelAccount } = useUser();
+
 const isLogin = useIsLogin();
 const systemStore = useSystemStore();
 const userStore = useUserStore();
+const { blLifeRecharge } = useLifeRechargeContext();
 
 const { goLoginFn } = useGoLogin();
 const bgHeight = computed(() => 133 + systemStore.navHeight);
@@ -52,28 +86,48 @@
 }
 
 function goPage(routeName: string) {
-  Taro.navigateTo({
+  RouteHelper.navigateTo({
     url: routeName,
   });
 }
 
-Taro.showShareMenu({
-  showShareItems: ['shareAppMessage'],
-});
-
-Taro.useShareAppMessage((res) => {
-  return {
-    title: `${userDetail.value?.contacter}鍚嶇墖`,
-    // path: `${RouterPath.userHomePage}?userId=${userDetail.value?.userId}`,
-    imageUrl: userDetail.value?.avatarUrl,
-  };
-});
+// Taro.showShareMenu({
+//   showShareItems: ['shareAppMessage'],
+// });
+// Taro.useShareAppMessage((res) => {
+//   return {
+//     title: `${userDetail.value?.contacter}鍚嶇墖`,
+//     // path: `${RouterPath.userHomePage}?userId=${userDetail.value?.userId}`,
+//     imageUrl: userDetail.value?.avatarUrl,
+//   };
+// });
 
 const goOrderManage = useAccessLogin(() => goPage(RouterPath.order));
+const goUserAccountList = useAccessLogin(() => goPage(RouterPath.userAccountList));
+const goShareQrcode = useAccessLogin(() => goPage(RouterPath.shareQrcode));
+const goPromotionQrcode = useAccessLogin(() => goPage(RouterPath.promotionQrcode));
+const goDashboard = useAccessLogin(() => goPage(RouterPath.dashboard));
 
-function goLogout() {
-  userStore.logout();
-  useUserStoreWithOut().logout();
+async function goLogout() {
+  try {
+    await Message.confirm({
+      message: '纭畾瑕侀��鍑虹櫥褰曞悧锛�',
+    });
+    userStore.logout();
+    blLifeRecharge.loginout();
+  } catch (error) {}
+}
+
+const { onlineServiceLink } = useOnlineService();
+
+function handleChat() {
+  if (isWeb && onlineServiceLink.value) {
+    if (isInAlipay) {
+      Message.warning('璇峰湪寰俊涓墦寮�浣跨敤璇ュ姛鑳�');
+    } else {
+      window.open(onlineServiceLink.value, '_blank');
+    }
+  }
 }
 </script>
 

--
Gitblit v1.9.1