From 55c03f35a31979aefd46aead13a145c9b293e6d8 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期四, 27 三月 2025 17:38:55 +0800 Subject: [PATCH] fix: 四期需求 --- apps/taro/src/pages/mine/index.vue | 40 ++++++++++++++++++++++++++++++---------- 1 files changed, 30 insertions(+), 10 deletions(-) diff --git a/apps/taro/src/pages/mine/index.vue b/apps/taro/src/pages/mine/index.vue index 6ed70bb..8bf95d1 100644 --- a/apps/taro/src/pages/mine/index.vue +++ b/apps/taro/src/pages/mine/index.vue @@ -21,6 +21,11 @@ <List class="mine-list-wrapper"> <ListItem title="璁㈠崟绠$悊" @click="goOrderManage"></ListItem> <ListItem title="鎴峰彿绠$悊" @click="goUserAccountList"></ListItem> + <template v-if="isChannelAccount"> + <ListItem title="鏁版嵁鐪嬫澘" @click="goDashboard"></ListItem> + <ListItem title="鎺ㄥ箍浜岀淮鐮�" @click="goShareQrcode"></ListItem> + </template> + <ListItem v-if="isWeb && !isInAlipay" title="鍦ㄧ嚎瀹㈡湇" @click="handleChat"></ListItem> <ListItem v-if="isLogin" title="閫�鍑虹櫥褰�" @click="goLogout"></ListItem> </List> </ContentScrollView> @@ -29,7 +34,7 @@ <script setup lang="ts"> import { TransparentNavigationBar, List, ListItem } from '@/components'; -import { useUser, useIsLogin, useGoLogin, useAccessLogin } from '@/hooks'; +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'; @@ -37,10 +42,11 @@ import PageLayoutWithBg from '@/components/Layout/PageLayoutWithBg.vue'; import { useUserStore } 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, virtualPhoneNumber } = useUser(); +const { userDetail, virtualPhoneNumber, isChannelAccount } = useUser(); const isLogin = useIsLogin(); const systemStore = useSystemStore(); const userStore = useUserStore(); @@ -56,7 +62,7 @@ } function goPage(routeName: string) { - Taro.navigateTo({ + RouteHelper.navigateTo({ url: routeName, }); } @@ -64,16 +70,18 @@ // Taro.showShareMenu({ // showShareItems: ['shareAppMessage'], // }); -Taro.useShareAppMessage((res) => { - return { - title: `${userDetail.value?.contacter}鍚嶇墖`, - // path: `${RouterPath.userHomePage}?userId=${userDetail.value?.userId}`, - imageUrl: userDetail.value?.avatarUrl, - }; -}); +// 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 goDashboard = useAccessLogin(() => goPage(RouterPath.dashboard)); async function goLogout() { try { @@ -84,6 +92,18 @@ blLifeRecharge.loginout(); } catch (error) {} } + +const { onlineServiceLink } = useOnlineService(); + +function handleChat() { + if (isWeb && onlineServiceLink.value) { + if (isInAlipay) { + Message.warning('璇峰湪寰俊涓墦寮�浣跨敤璇ュ姛鑳�'); + } else { + window.open(onlineServiceLink.value, '_blank'); + } + } +} </script> <style lang="scss"> -- Gitblit v1.9.1