Compare commits
No commits in common. "4cdff7a594a803aa9c3a34c93679f03a39b82bd2" and "64db5ebaf33e773c6ddd4533fd7abe0305402a72" have entirely different histories.
4cdff7a594
...
64db5ebaf3
@ -5,7 +5,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
class="code-img"
|
class="code-img"
|
||||||
src="https://one-feel-config-images-bucket.oss-cn-chengdu.aliyuncs.com/20250920102920_354_52.png"
|
src="./images/qrcode.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
show-menu-by-longpress="true"
|
show-menu-by-longpress="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -3,6 +3,12 @@
|
|||||||
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;
|
||||||
@ -14,6 +20,6 @@
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #666;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
components/Interceptor/index.vue
Normal file
18
components/Interceptor/index.vue
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<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,11 +1,8 @@
|
|||||||
// 退出登录
|
|
||||||
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,13 +26,14 @@ export const onLogin = async (e) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 检测token
|
// 检测token
|
||||||
export const checkToken = () => {
|
export const checkToken = async () => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const appStore = useAppStore();
|
const token = uni.getStorageSync("token");
|
||||||
console.log("appStore.hasToken: ", appStore.hasToken);
|
if (!token) {
|
||||||
if (!appStore.hasToken) {
|
console.log("token不存在,重新登录");
|
||||||
console.log("没有token,跳转到登录页");
|
loginAuth().then(() => {
|
||||||
goLogin();
|
resolve();
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
@ -1,30 +1,20 @@
|
|||||||
|
|
||||||
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',
|
||||||
TEXT: "TEXT",
|
IMAGE: 'IMAGE'
|
||||||
// 图片消息
|
}
|
||||||
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,6 +31,17 @@
|
|||||||
>
|
>
|
||||||
</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"
|
||||||
@ -67,16 +78,12 @@
|
|||||||
:toolCall="item.toolCall"
|
:toolCall="item.toolCall"
|
||||||
/>
|
/>
|
||||||
<DetailCardCompontent
|
<DetailCardCompontent
|
||||||
v-else-if="
|
v-else-if="item.toolCall.componentName === ''"
|
||||||
item.toolCall.componentName ===
|
|
||||||
CompName.pictureAndCommodityCard
|
|
||||||
"
|
|
||||||
:toolCall="item.toolCall"
|
:toolCall="item.toolCall"
|
||||||
/>
|
/>
|
||||||
<AddCarCrad
|
<AddCarCrad
|
||||||
v-else-if="
|
v-else-if="
|
||||||
item.toolCall.componentName ===
|
item.toolCall.componentName === CompName.addLicensePlate
|
||||||
CompName.enterLicensePlateCard
|
|
||||||
"
|
"
|
||||||
:toolCall="item.toolCall"
|
:toolCall="item.toolCall"
|
||||||
/>
|
/>
|
||||||
@ -151,7 +158,6 @@ 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";
|
||||||
@ -181,7 +187,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, checkToken } from "@/hooks/useGoLogin";
|
import { goLogin } from "@/hooks/useGoLogin";
|
||||||
|
|
||||||
import { useAppStore } from "@/store";
|
import { useAppStore } from "@/store";
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
@ -190,7 +196,7 @@ const statusBarHeight = ref(20);
|
|||||||
/// 输入框组件引用
|
/// 输入框组件引用
|
||||||
const inputAreaRef = ref(null);
|
const inputAreaRef = ref(null);
|
||||||
|
|
||||||
const holdKeyboardTimer = ref(null);
|
const timer = ref(null);
|
||||||
/// focus时,点击页面的时候不收起键盘
|
/// focus时,点击页面的时候不收起键盘
|
||||||
const holdKeyboard = ref(false);
|
const holdKeyboard = ref(false);
|
||||||
/// 是否在键盘弹出,点击界面时关闭键盘
|
/// 是否在键盘弹出,点击界面时关闭键盘
|
||||||
@ -236,8 +242,8 @@ const openDrawer = () => emits("openDrawer");
|
|||||||
|
|
||||||
/// =============事件函数↓================
|
/// =============事件函数↓================
|
||||||
const handleTouchEnd = () => {
|
const handleTouchEnd = () => {
|
||||||
clearTimeout(holdKeyboardTimer.value);
|
clearTimeout(timer.value);
|
||||||
holdKeyboardTimer.value = setTimeout(() => {
|
timer.value = setTimeout(() => {
|
||||||
// 键盘弹出时点击界面则关闭键盘
|
// 键盘弹出时点击界面则关闭键盘
|
||||||
if (holdKeyboardFlag.value && isKeyboardShow.value) {
|
if (holdKeyboardFlag.value && isKeyboardShow.value) {
|
||||||
uni.hideKeyboard();
|
uni.hideKeyboard();
|
||||||
@ -297,9 +303,12 @@ const handleReply = (text) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 是发送指令
|
// 是发送指令
|
||||||
const handleReplyInstruct = async (item) => {
|
const handleReplyInstruct = (item) => {
|
||||||
await checkToken();
|
if (!appStore.hasToken) {
|
||||||
|
console.log("没有token,跳转到登录页");
|
||||||
|
goLogin();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (item.type === "MyOrder") {
|
if (item.type === "MyOrder") {
|
||||||
// 订单
|
// 订单
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -336,13 +345,6 @@ 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();
|
||||||
@ -629,10 +631,14 @@ const initData = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 发送消息的参数拼接
|
// 发送消息的参数拼接
|
||||||
const sendMessage = async (message, isInstruct = false) => {
|
const sendMessage = (message, isInstruct = false) => {
|
||||||
console.log("发送的消息:", message);
|
console.log("发送的消息:", message);
|
||||||
|
|
||||||
await checkToken();
|
if (!appStore.hasToken) {
|
||||||
|
console.log("没有token,跳转到登录页");
|
||||||
|
goLogin();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!webSocketConnectStatus) {
|
if (!webSocketConnectStatus) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -774,12 +780,7 @@ 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();
|
||||||
@ -796,11 +797,11 @@ const resetConfig = () => {
|
|||||||
resetMessageState();
|
resetMessageState();
|
||||||
|
|
||||||
// 清理定时器
|
// 清理定时器
|
||||||
if (holdKeyboardTimer.value) {
|
if (timer.value) {
|
||||||
clearTimeout(holdKeyboardTimer.value);
|
clearTimeout(timer.value);
|
||||||
holdKeyboardTimer.value = null;
|
timer.value = null;
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -13,12 +13,18 @@
|
|||||||
<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 { checkToken } from "@/hooks/useGoLogin";
|
import { goLogin } from "@/hooks/useGoLogin";
|
||||||
|
import { useAppStore } from "@/store";
|
||||||
|
const appStore = useAppStore();
|
||||||
const showLeft = ref(false);
|
const showLeft = ref(false);
|
||||||
|
|
||||||
// 打开窗口
|
// 打开窗口
|
||||||
const showDrawer = async (e) => {
|
const showDrawer = (e) => {
|
||||||
await checkToken();
|
if (!appStore.hasToken) {
|
||||||
|
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" @closeDrawer="closeDrawer" />
|
<MineSetting v-if="isDrawerVisible" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,7 +23,6 @@ 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,13 +36,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, defineEmits } from "vue";
|
import { ref, onMounted } 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({
|
||||||
@ -56,12 +51,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: "action",
|
type: "navigate",
|
||||||
url: "cancelAccount",
|
url: "/pages/cancel-account/cancel-account",
|
||||||
},
|
},
|
||||||
// { 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" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 组件挂载时调用
|
// 组件挂载时调用
|
||||||
@ -84,8 +79,6 @@ 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"],
|
||||||
@ -105,9 +98,7 @@ const handleLogout = () => {
|
|||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.clearStorageSync();
|
uni.clearStorageSync();
|
||||||
appStore.setHasToken(false);
|
uni.reLaunch({ url: "/pages/login/index" });
|
||||||
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">/{{ item.stockUnitLabel }}</text>
|
<text class="card-unit">/人</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<text class="card-btn">下单</text>
|
<text class="card-btn">下单</text>
|
||||||
@ -47,7 +47,6 @@
|
|||||||
<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: {
|
||||||
@ -58,11 +57,9 @@ 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">/{{ item.stockUnitLabel }} </text>
|
<text class="card-unit">/人</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="card-btn">下单</text>
|
<text class="card-btn">下单</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
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: {
|
||||||
@ -52,8 +53,14 @@ 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