1 Commits

Author SHA1 Message Date
27b2052cec feat: 退出登录的处理 2025-12-29 17:15:49 +08:00
4 changed files with 27 additions and 18 deletions

View File

@@ -102,6 +102,9 @@ const handleLogout = () => {
uni.clearStorageSync(); uni.clearStorageSync();
emits("close"); emits("close");
uni.$emit(NOTICE_EVENT_LOGOUT); uni.$emit(NOTICE_EVENT_LOGOUT);
uni.showToast({
title: "退出登录成功",
});
} }
}, },
}); });

View File

@@ -258,9 +258,6 @@ const addNoticeListener = () => {
uni.$on(NOTICE_EVENT_LOGOUT, () => { uni.$on(NOTICE_EVENT_LOGOUT, () => {
resetConfig(); resetConfig();
uni.showToast({
title: "退出登录成功",
});
}); });
uni.$on(SCROLL_TO_BOTTOM, () => { uni.$on(SCROLL_TO_BOTTOM, () => {

View File

@@ -1,7 +1,13 @@
<template> <template>
<view class="quick-access flex flex-row ml-12 pt-8 pb-8 scroll-x whitespace-nowrap"> <view
<view class="item border-box rounded-50 flex flex-row items-center" v-for="(item, index) in itemList" :key="index" class="quick-access flex flex-row ml-12 pt-8 pb-8 scroll-x whitespace-nowrap"
@click="sendReply(item)"> >
<view
class="item border-box rounded-50 flex flex-row items-center"
v-for="(item, index) in itemList"
:key="index"
@click="sendReply(item)"
>
<view class="flex items-center justify-center"> <view class="flex items-center justify-center">
<image v-if="item.icon" class="icon" :src="item.icon" /> <image v-if="item.icon" class="icon" :src="item.icon" />
<text class="font-size-14 color-2D91FF line-height-20"> <text class="font-size-14 color-2D91FF line-height-20">
@@ -16,7 +22,6 @@
import { ref } from "vue"; import { ref } from "vue";
import { Command } from "@/model/ChatModel"; import { Command } from "@/model/ChatModel";
import { SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant"; import { SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
import { checkToken } from "@/hooks/useGoLogin";
const itemList = ref([ const itemList = ref([
{ {
@@ -50,9 +55,7 @@ const sendReply = (item) => {
// 快速预定 // 快速预定
if (item.type === Command.quickBooking) { if (item.type === Command.quickBooking) {
checkToken().then(() => {
uni.navigateTo({ url: "/pages-quick/list" }); uni.navigateTo({ url: "/pages-quick/list" });
});
return; return;
} }

View File

@@ -2,12 +2,19 @@
<uni-popup ref="popup" type="bottom" :safe-area="false"> <uni-popup ref="popup" type="bottom" :safe-area="false">
<view class="popup-content border-box pt-12 pl-12 pr-12"> <view class="popup-content border-box pt-12 pl-12 pr-12">
<view class="header flex flex-items-center pb-12"> <view class="header flex flex-items-center pb-12">
<view class="title flex-full text-center font-size-17 color-000 font-500 ml-24">更多服务</view> <view
class="title flex-full text-center font-size-17 color-000 font-500 ml-24"
>更多服务</view
>
<uni-icons type="close" size="24" color="#CACFD8" @click="close" /> <uni-icons type="close" size="24" color="#CACFD8" @click="close" />
</view> </view>
<view class="list bg-white border-box pl-20 pr-20"> <view class="list bg-white border-box pl-20 pr-20">
<view class="item border-box border-bottom pt-20 pb-20" v-for="(item, index) in list" :key="index"> <view
class="item border-box border-bottom pt-20 pb-20"
v-for="(item, index) in list"
:key="index"
>
<view class="flex flex-items-center flex-justify-center"> <view class="flex flex-items-center flex-justify-center">
<image v-if="item.icon" class="left" :src="item.icon" /> <image v-if="item.icon" class="left" :src="item.icon" />
<view class="center flex-full"> <view class="center flex-full">
@@ -18,7 +25,10 @@
{{ item.content }} {{ item.content }}
</view> </view>
</view> </view>
<view class="right border-box font-size-12 color-white line-height-16" @click="handleClick(item)"> <view
class="right border-box font-size-12 color-white line-height-16"
@click="handleClick(item)"
>
{{ item.btnText }} {{ item.btnText }}
</view> </view>
</view> </view>
@@ -32,7 +42,6 @@
import { ref } from "vue"; import { ref } from "vue";
import { Command } from "@/model/ChatModel"; import { Command } from "@/model/ChatModel";
import { SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant"; import { SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
import { checkToken } from "@/hooks/useGoLogin";
const popup = ref(null); const popup = ref(null);
@@ -91,10 +100,7 @@ const handleClick = (item) => {
close(); close();
if (item.path) { if (item.path) {
checkToken().then(() => {
uni.navigateTo({ url: item.path }); uni.navigateTo({ url: item.path });
});
return; return;
} }