feat: 订单调起前登录检验
This commit is contained in:
@@ -287,6 +287,11 @@ const handleReply = (text) => {
|
|||||||
|
|
||||||
// 是发送指令
|
// 是发送指令
|
||||||
const handleReplyInstruct = (item) => {
|
const handleReplyInstruct = (item) => {
|
||||||
|
if (!appStore.hasToken) {
|
||||||
|
console.log("没有token,跳转到登录页");
|
||||||
|
goLogin();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (item.type === "MyOrder") {
|
if (item.type === "MyOrder") {
|
||||||
// 订单
|
// 订单
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -480,9 +485,12 @@ const initWebSocket = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 初始化连接
|
// 初始化连接
|
||||||
webSocketManager.connect().then(() => {
|
webSocketManager
|
||||||
|
.connect()
|
||||||
|
.then(() => {
|
||||||
webSocketConnectStatus = true;
|
webSocketConnectStatus = true;
|
||||||
}).catch((error) => {
|
})
|
||||||
|
.catch((error) => {
|
||||||
console.error("WebSocket连接失败:", error);
|
console.error("WebSocket连接失败:", error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user