Compare commits
3 Commits
64db5ebaf3
...
4cdff7a594
| Author | SHA1 | Date | |
|---|---|---|---|
| 4cdff7a594 | |||
| 67474d73a4 | |||
| dc8b939ff3 |
@ -5,7 +5,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
class="code-img"
|
class="code-img"
|
||||||
src="./images/qrcode.png"
|
src="https://one-feel-config-images-bucket.oss-cn-chengdu.aliyuncs.com/20250920102920_354_52.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
show-menu-by-longpress="true"
|
show-menu-by-longpress="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -3,12 +3,6 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.description {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #666;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-img {
|
.code-img {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
width: 250px;
|
width: 250px;
|
||||||
@ -20,6 +14,6 @@
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
<template>
|
|
||||||
<button
|
|
||||||
v-if="!hasToken"
|
|
||||||
class="reset-btn"
|
|
||||||
open-type="getPhoneNumber"
|
|
||||||
@getphonenumber="onLogin"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { computed, defineEmits } from "vue";
|
|
||||||
import { useAppStore } from "@/store";
|
|
||||||
import { onLogin } from "@/hooks/useGoLogin";
|
|
||||||
|
|
||||||
const emits = defineEmits(["click"]);
|
|
||||||
|
|
||||||
const hasToken = computed(() => useAppStore().hasToken);
|
|
||||||
</script>
|
|
||||||
@ -1,8 +1,11 @@
|
|||||||
|
// 退出登录
|
||||||
|
export const NOTICE_EVENT_LOGOUT = "NOTICE_EVENT_LOGOUT";
|
||||||
|
|
||||||
// 滚动到底部
|
// 滚动到底部
|
||||||
export const SCROLL_TO_BOTTOM = 'SCROLL_TO_BOTTOM'
|
export const SCROLL_TO_BOTTOM = "SCROLL_TO_BOTTOM";
|
||||||
|
|
||||||
// 推荐帖子
|
// 推荐帖子
|
||||||
export const RECOMMEND_POSTS_TITLE = 'RECOMMEND_POSTS_TITLE'
|
export const RECOMMEND_POSTS_TITLE = "RECOMMEND_POSTS_TITLE";
|
||||||
|
|
||||||
// 发送命令
|
// 发送命令
|
||||||
export const SEND_COMMAND_TEXT = 'SEND_COMMAND_TEXT'
|
export const SEND_COMMAND_TEXT = "SEND_COMMAND_TEXT";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { loginAuth, bindPhone } from "@/manager/LoginManager";
|
import { loginAuth, bindPhone } from "@/manager/LoginManager";
|
||||||
// 引入base.js中的clientId
|
import { clientId } from "@/constant/base";
|
||||||
import { clientId } from "@/constant/base";
|
import { useAppStore } from "@/store";
|
||||||
|
|
||||||
// 跳转登录
|
// 跳转登录
|
||||||
export const goLogin = () => uni.navigateTo({ url: "/pages/login/index" });
|
export const goLogin = () => uni.navigateTo({ url: "/pages/login/index" });
|
||||||
@ -26,14 +26,13 @@ export const onLogin = async (e) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 检测token
|
// 检测token
|
||||||
export const checkToken = async () => {
|
export const checkToken = () => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const token = uni.getStorageSync("token");
|
const appStore = useAppStore();
|
||||||
if (!token) {
|
console.log("appStore.hasToken: ", appStore.hasToken);
|
||||||
console.log("token不存在,重新登录");
|
if (!appStore.hasToken) {
|
||||||
loginAuth().then(() => {
|
console.log("没有token,跳转到登录页");
|
||||||
resolve();
|
goLogin();
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
@ -1,20 +1,30 @@
|
|||||||
|
|
||||||
export const MessageRole = {
|
export const MessageRole = {
|
||||||
|
// 智能体消息
|
||||||
AI: "AI",
|
AI: "AI",
|
||||||
|
// 我发送的消息
|
||||||
ME: "ME",
|
ME: "ME",
|
||||||
OTHER: "OTHER"
|
// 其他消息
|
||||||
}
|
OTHER: "OTHER",
|
||||||
|
};
|
||||||
|
|
||||||
export const MessageType = {
|
export const MessageType = {
|
||||||
TEXT: 'TEXT',
|
// 文本消息
|
||||||
IMAGE: 'IMAGE'
|
TEXT: "TEXT",
|
||||||
}
|
// 图片消息
|
||||||
|
IMAGE: "IMAGE",
|
||||||
|
};
|
||||||
|
|
||||||
export const CompName = {
|
export const CompName = {
|
||||||
|
// 快速预定卡片
|
||||||
quickBookingCard: "quickBookingCard",
|
quickBookingCard: "quickBookingCard",
|
||||||
|
// 服务工单卡片
|
||||||
createWorkOrderCard: "createWorkOrderCard",
|
createWorkOrderCard: "createWorkOrderCard",
|
||||||
|
// 意见反馈卡片
|
||||||
feedbackCard: "feedbackCard",
|
feedbackCard: "feedbackCard",
|
||||||
|
// 探索发现卡片
|
||||||
discoveryCard: "discoveryCard",
|
discoveryCard: "discoveryCard",
|
||||||
addLicensePlate: "addLicensePlate",
|
// 图片和商品卡片
|
||||||
|
pictureAndCommodityCard: "pictureAndCommodityCard",
|
||||||
|
// 输入车牌卡片
|
||||||
|
enterLicensePlateCard: "enterLicensePlateCard",
|
||||||
};
|
};
|
||||||
@ -31,17 +31,6 @@
|
|||||||
>
|
>
|
||||||
</ChatTopWelcome>
|
</ChatTopWelcome>
|
||||||
|
|
||||||
<ChatCardAI class="message-item-ai">
|
|
||||||
<template #content>
|
|
||||||
<!-- 车牌添加卡片 -->
|
|
||||||
<AddCarCrad
|
|
||||||
:toolCall="{
|
|
||||||
url: 'https://shop.gzcyb.vip/scanQrFixCode?fixCodeId=49892',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</ChatCardAI>
|
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="area-msg-list-content"
|
class="area-msg-list-content"
|
||||||
v-for="item in chatMsgList"
|
v-for="item in chatMsgList"
|
||||||
@ -78,12 +67,16 @@
|
|||||||
:toolCall="item.toolCall"
|
:toolCall="item.toolCall"
|
||||||
/>
|
/>
|
||||||
<DetailCardCompontent
|
<DetailCardCompontent
|
||||||
v-else-if="item.toolCall.componentName === ''"
|
v-else-if="
|
||||||
|
item.toolCall.componentName ===
|
||||||
|
CompName.pictureAndCommodityCard
|
||||||
|
"
|
||||||
:toolCall="item.toolCall"
|
:toolCall="item.toolCall"
|
||||||
/>
|
/>
|
||||||
<AddCarCrad
|
<AddCarCrad
|
||||||
v-else-if="
|
v-else-if="
|
||||||
item.toolCall.componentName === CompName.addLicensePlate
|
item.toolCall.componentName ===
|
||||||
|
CompName.enterLicensePlateCard
|
||||||
"
|
"
|
||||||
:toolCall="item.toolCall"
|
:toolCall="item.toolCall"
|
||||||
/>
|
/>
|
||||||
@ -158,6 +151,7 @@ import {
|
|||||||
SCROLL_TO_BOTTOM,
|
SCROLL_TO_BOTTOM,
|
||||||
RECOMMEND_POSTS_TITLE,
|
RECOMMEND_POSTS_TITLE,
|
||||||
SEND_COMMAND_TEXT,
|
SEND_COMMAND_TEXT,
|
||||||
|
NOTICE_EVENT_LOGOUT,
|
||||||
} from "@/constant/constant";
|
} from "@/constant/constant";
|
||||||
import { WSS_URL } from "@/request/base/baseUrl";
|
import { WSS_URL } from "@/request/base/baseUrl";
|
||||||
import { MessageRole, MessageType, CompName } from "../../model/ChatModel";
|
import { MessageRole, MessageType, CompName } from "../../model/ChatModel";
|
||||||
@ -187,7 +181,7 @@ import {
|
|||||||
import WebSocketManager from "@/utils/WebSocketManager";
|
import WebSocketManager from "@/utils/WebSocketManager";
|
||||||
import TypewriterManager from "@/utils/TypewriterManager";
|
import TypewriterManager from "@/utils/TypewriterManager";
|
||||||
import { IdUtils } from "@/utils";
|
import { IdUtils } from "@/utils";
|
||||||
import { goLogin } from "@/hooks/useGoLogin";
|
import { goLogin, checkToken } from "@/hooks/useGoLogin";
|
||||||
|
|
||||||
import { useAppStore } from "@/store";
|
import { useAppStore } from "@/store";
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
@ -196,7 +190,7 @@ const statusBarHeight = ref(20);
|
|||||||
/// 输入框组件引用
|
/// 输入框组件引用
|
||||||
const inputAreaRef = ref(null);
|
const inputAreaRef = ref(null);
|
||||||
|
|
||||||
const timer = ref(null);
|
const holdKeyboardTimer = ref(null);
|
||||||
/// focus时,点击页面的时候不收起键盘
|
/// focus时,点击页面的时候不收起键盘
|
||||||
const holdKeyboard = ref(false);
|
const holdKeyboard = ref(false);
|
||||||
/// 是否在键盘弹出,点击界面时关闭键盘
|
/// 是否在键盘弹出,点击界面时关闭键盘
|
||||||
@ -242,8 +236,8 @@ const openDrawer = () => emits("openDrawer");
|
|||||||
|
|
||||||
/// =============事件函数↓================
|
/// =============事件函数↓================
|
||||||
const handleTouchEnd = () => {
|
const handleTouchEnd = () => {
|
||||||
clearTimeout(timer.value);
|
clearTimeout(holdKeyboardTimer.value);
|
||||||
timer.value = setTimeout(() => {
|
holdKeyboardTimer.value = setTimeout(() => {
|
||||||
// 键盘弹出时点击界面则关闭键盘
|
// 键盘弹出时点击界面则关闭键盘
|
||||||
if (holdKeyboardFlag.value && isKeyboardShow.value) {
|
if (holdKeyboardFlag.value && isKeyboardShow.value) {
|
||||||
uni.hideKeyboard();
|
uni.hideKeyboard();
|
||||||
@ -303,12 +297,9 @@ const handleReply = (text) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 是发送指令
|
// 是发送指令
|
||||||
const handleReplyInstruct = (item) => {
|
const handleReplyInstruct = async (item) => {
|
||||||
if (!appStore.hasToken) {
|
await checkToken();
|
||||||
console.log("没有token,跳转到登录页");
|
|
||||||
goLogin();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (item.type === "MyOrder") {
|
if (item.type === "MyOrder") {
|
||||||
// 订单
|
// 订单
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -345,6 +336,13 @@ const sendMessageAction = (inputText) => {
|
|||||||
|
|
||||||
/// 添加通知
|
/// 添加通知
|
||||||
const addNoticeListener = () => {
|
const addNoticeListener = () => {
|
||||||
|
uni.$on(NOTICE_EVENT_LOGOUT, () => {
|
||||||
|
resetConfig();
|
||||||
|
uni.showToast({
|
||||||
|
title: "退出登录成功",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
uni.$on(SCROLL_TO_BOTTOM, () => {
|
uni.$on(SCROLL_TO_BOTTOM, () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
@ -631,14 +629,10 @@ const initData = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 发送消息的参数拼接
|
// 发送消息的参数拼接
|
||||||
const sendMessage = (message, isInstruct = false) => {
|
const sendMessage = async (message, isInstruct = false) => {
|
||||||
console.log("发送的消息:", message);
|
console.log("发送的消息:", message);
|
||||||
|
|
||||||
if (!appStore.hasToken) {
|
await checkToken();
|
||||||
console.log("没有token,跳转到登录页");
|
|
||||||
goLogin();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!webSocketConnectStatus) {
|
if (!webSocketConnectStatus) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -780,7 +774,12 @@ onUnmounted(() => {
|
|||||||
uni.$off(SCROLL_TO_BOTTOM);
|
uni.$off(SCROLL_TO_BOTTOM);
|
||||||
uni.$off(RECOMMEND_POSTS_TITLE);
|
uni.$off(RECOMMEND_POSTS_TITLE);
|
||||||
uni.$off(SEND_COMMAND_TEXT);
|
uni.$off(SEND_COMMAND_TEXT);
|
||||||
|
uni.$off(NOTICE_EVENT_LOGOUT);
|
||||||
|
|
||||||
|
resetConfig();
|
||||||
|
});
|
||||||
|
|
||||||
|
const resetConfig = () => {
|
||||||
// 清理WebSocket连接
|
// 清理WebSocket连接
|
||||||
if (webSocketManager) {
|
if (webSocketManager) {
|
||||||
webSocketManager.destroy();
|
webSocketManager.destroy();
|
||||||
@ -797,11 +796,11 @@ onUnmounted(() => {
|
|||||||
resetMessageState();
|
resetMessageState();
|
||||||
|
|
||||||
// 清理定时器
|
// 清理定时器
|
||||||
if (timer.value) {
|
if (holdKeyboardTimer.value) {
|
||||||
clearTimeout(timer.value);
|
clearTimeout(holdKeyboardTimer.value);
|
||||||
timer.value = null;
|
holdKeyboardTimer.value = null;
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -13,18 +13,12 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import DrawerHome from "@/pages/drawer/DrawerHome.vue";
|
import DrawerHome from "@/pages/drawer/DrawerHome.vue";
|
||||||
import { goLogin } from "@/hooks/useGoLogin";
|
import { checkToken } from "@/hooks/useGoLogin";
|
||||||
import { useAppStore } from "@/store";
|
|
||||||
const appStore = useAppStore();
|
|
||||||
const showLeft = ref(false);
|
const showLeft = ref(false);
|
||||||
|
|
||||||
// 打开窗口
|
// 打开窗口
|
||||||
const showDrawer = (e) => {
|
const showDrawer = async (e) => {
|
||||||
if (!appStore.hasToken) {
|
await checkToken();
|
||||||
console.log("没有token,跳转到登录页");
|
|
||||||
goLogin();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
showLeft.value.open();
|
showLeft.value.open();
|
||||||
// 发送抽屉显示事件
|
// 发送抽屉显示事件
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<text class="title">我的</text>
|
<text class="title">我的</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<MineSetting v-if="isDrawerVisible" />
|
<MineSetting v-if="isDrawerVisible" @closeDrawer="closeDrawer" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,6 +23,7 @@ const emits = defineEmits(["closeDrawer"]);
|
|||||||
const isDrawerVisible = ref(false);
|
const isDrawerVisible = ref(false);
|
||||||
|
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
|
console.log("关闭抽屉");
|
||||||
isDrawerVisible.value = false;
|
isDrawerVisible.value = false;
|
||||||
emits("closeDrawer");
|
emits("closeDrawer");
|
||||||
};
|
};
|
||||||
|
|||||||
@ -36,8 +36,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted, defineEmits } from "vue";
|
||||||
import { getLoginUserPhone } from "@/request/api/LoginApi";
|
import { getLoginUserPhone } from "@/request/api/LoginApi";
|
||||||
|
import { NOTICE_EVENT_LOGOUT } from "@/constant/constant";
|
||||||
|
import { useAppStore } from "@/store";
|
||||||
|
|
||||||
|
const appStore = useAppStore();
|
||||||
|
const emits = defineEmits(["closeDrawer"]);
|
||||||
|
|
||||||
// 假数据
|
// 假数据
|
||||||
const userInfo = ref({
|
const userInfo = ref({
|
||||||
@ -51,12 +56,12 @@ const menuList = ref([
|
|||||||
// { label: '修改手机号', type: 'navigate', url: '/pages/change-phone/change-phone' },
|
// { label: '修改手机号', type: 'navigate', url: '/pages/change-phone/change-phone' },
|
||||||
{
|
{
|
||||||
label: "账号注销",
|
label: "账号注销",
|
||||||
type: "navigate",
|
type: "action",
|
||||||
url: "/pages/cancel-account/cancel-account",
|
url: "cancelAccount",
|
||||||
},
|
},
|
||||||
// { label: '营业资质&协议', type: 'navigate', url: '/pages/agreement/agreement' },
|
// { label: '营业资质&协议', type: 'navigate', url: '/pages/agreement/agreement' },
|
||||||
{ label: "联系客服", type: "action", action: "contactService" },
|
// { label: "联系客服", type: "action", action: "contactService" },
|
||||||
{ label: "订阅消息", type: "action", action: "subscribeMessage" },
|
// { label: "订阅消息", type: "action", action: "subscribeMessage" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 组件挂载时调用
|
// 组件挂载时调用
|
||||||
@ -79,6 +84,8 @@ const handleMenuClick = (item) => {
|
|||||||
} else if (item.type === "action") {
|
} else if (item.type === "action") {
|
||||||
if (item.action === "contactService") {
|
if (item.action === "contactService") {
|
||||||
uni.showToast({ title: "联系客服功能待实现", icon: "none" });
|
uni.showToast({ title: "联系客服功能待实现", icon: "none" });
|
||||||
|
} else if (item.action === "cancelAccount") {
|
||||||
|
handleLogout();
|
||||||
} else if (item.action === "subscribeMessage") {
|
} else if (item.action === "subscribeMessage") {
|
||||||
uni.requestSubscribeMessage({
|
uni.requestSubscribeMessage({
|
||||||
tmplIds: ["fMIt1q9GgM3Ep0DJSNgVPm4C3lCpQdz2TediETcv3iM"],
|
tmplIds: ["fMIt1q9GgM3Ep0DJSNgVPm4C3lCpQdz2TediETcv3iM"],
|
||||||
@ -98,7 +105,9 @@ const handleLogout = () => {
|
|||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.clearStorageSync();
|
uni.clearStorageSync();
|
||||||
uni.reLaunch({ url: "/pages/login/index" });
|
appStore.setHasToken(false);
|
||||||
|
emits("closeDrawer");
|
||||||
|
uni.$emit(NOTICE_EVENT_LOGOUT);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<view class="card-price-row">
|
<view class="card-price-row">
|
||||||
<text class="card-price-fu">¥</text>
|
<text class="card-price-fu">¥</text>
|
||||||
<text class="card-price">{{ item.commodityPrice }}</text>
|
<text class="card-price">{{ item.commodityPrice }}</text>
|
||||||
<text class="card-unit">/人</text>
|
<text class="card-unit">/{{ item.stockUnitLabel }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<text class="card-btn">下单</text>
|
<text class="card-btn">下单</text>
|
||||||
@ -47,6 +47,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||||
import { defineProps } from "vue";
|
import { defineProps } from "vue";
|
||||||
|
import { checkToken } from "@/hooks/useGoLogin";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
commodityDTO: {
|
commodityDTO: {
|
||||||
@ -57,9 +58,11 @@ const props = defineProps({
|
|||||||
|
|
||||||
/// 去下单
|
/// 去下单
|
||||||
const placeOrderHandle = (item) => {
|
const placeOrderHandle = (item) => {
|
||||||
|
checkToken().then(() => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/goods/index?commodityId=${item.commodityId}`,
|
url: `/pages/goods/index?commodityId=${item.commodityId}`,
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<view class="card-price-row">
|
<view class="card-price-row">
|
||||||
<text class="card-price-fu">¥</text>
|
<text class="card-price-fu">¥</text>
|
||||||
<text class="card-price">{{ item.specificationPrice }}</text>
|
<text class="card-price">{{ item.specificationPrice }}</text>
|
||||||
<text class="card-unit">/人</text>
|
<text class="card-unit">/{{ item.stockUnitLabel }} </text>
|
||||||
</view>
|
</view>
|
||||||
<text class="card-btn">下单</text>
|
<text class="card-btn">下单</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { goLogin } from "../../hooks/useGoLogin";
|
import { goLogin } from "../../hooks/useGoLogin";
|
||||||
import { BASE_URL } from "./baseUrl";
|
import { BASE_URL } from "./baseUrl";
|
||||||
import { loginAuth, checkPhone } from "@/manager/LoginManager";
|
|
||||||
|
|
||||||
const defaultConfig = {
|
const defaultConfig = {
|
||||||
header: {
|
header: {
|
||||||
@ -53,14 +52,8 @@ function request(url, args = {}, method = "POST", customConfig = {}) {
|
|||||||
resolve(res.data);
|
resolve(res.data);
|
||||||
if (res.statusCode && res.statusCode === 424) {
|
if (res.statusCode && res.statusCode === 424) {
|
||||||
console.log("424错误,重新登录");
|
console.log("424错误,重新登录");
|
||||||
loginAuth().then(async () => {
|
|
||||||
// 检测是否绑定手机号
|
|
||||||
const res = await checkPhone();
|
|
||||||
if (!res.data) {
|
|
||||||
goLogin();
|
goLogin();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error("请求失败:", err);
|
console.error("请求失败:", err);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user