feat: 快速预定新增未登录检测拦截
This commit is contained in:
@@ -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) {
|
||||
checkToken().then(() => {
|
||||
uni.navigateTo({ url: "/pages-quick/list" });
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,19 +2,12 @@
|
||||
<uni-popup ref="popup" type="bottom" :safe-area="false">
|
||||
<view class="popup-content border-box pt-12 pl-12 pr-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" />
|
||||
</view>
|
||||
|
||||
<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">
|
||||
<image v-if="item.icon" class="left" :src="item.icon" />
|
||||
<view class="center flex-full">
|
||||
@@ -25,10 +18,7 @@
|
||||
{{ item.content }}
|
||||
</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 }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -42,6 +32,7 @@
|
||||
import { ref } from "vue";
|
||||
import { Command } from "@/model/ChatModel";
|
||||
import { SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
|
||||
import { checkToken } from "@/hooks/useGoLogin";
|
||||
|
||||
const popup = ref(null);
|
||||
|
||||
@@ -100,7 +91,10 @@ const handleClick = (item) => {
|
||||
close();
|
||||
|
||||
if (item.path) {
|
||||
checkToken().then(() => {
|
||||
uni.navigateTo({ url: item.path });
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user