feat: 快速预定新增未登录检测拦截

This commit is contained in:
DEV_DSW
2025-12-29 17:26:46 +08:00
parent 6745e36a79
commit 3e18c99161
2 changed files with 15 additions and 24 deletions

View File

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