1 Commits

Author SHA1 Message Date
DEV_DSW
3e18c99161 feat: 快速预定新增未登录检测拦截 2025-12-29 17:26:46 +08:00
2 changed files with 15 additions and 24 deletions

View File

@@ -1,13 +1,7 @@
<template> <template>
<view <view class="quick-access flex flex-row ml-12 pt-8 pb-8 scroll-x whitespace-nowrap">
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="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">
@@ -22,6 +16,7 @@
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([
{ {
@@ -55,7 +50,9 @@ const sendReply = (item) => {
// 快速预定 // 快速预定
if (item.type === Command.quickBooking) { if (item.type === Command.quickBooking) {
uni.navigateTo({ url: "/pages-quick/list" }); checkToken().then(() => {
uni.navigateTo({ url: "/pages-quick/list" });
});
return; return;
} }

View File

@@ -2,19 +2,12 @@
<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 <view class="title flex-full text-center font-size-17 color-000 font-500 ml-24">更多服务</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 <view class="item border-box border-bottom pt-20 pb-20" v-for="(item, index) in list" :key="index">
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">
@@ -25,10 +18,7 @@
{{ item.content }} {{ item.content }}
</view> </view>
</view> </view>
<view <view class="right border-box font-size-12 color-white line-height-16" @click="handleClick(item)">
class="right border-box font-size-12 color-white line-height-16"
@click="handleClick(item)"
>
{{ item.btnText }} {{ item.btnText }}
</view> </view>
</view> </view>
@@ -42,6 +32,7 @@
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);
@@ -100,7 +91,10 @@ const handleClick = (item) => {
close(); close();
if (item.path) { if (item.path) {
uni.navigateTo({ url: item.path }); checkToken().then(() => {
uni.navigateTo({ url: item.path });
});
return; return;
} }