diff --git a/src/config.ts b/src/config.ts index 203695b..0170b30 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,5 @@ -const ip: string = "119.29.194.155:8893"; +// const ip: string = "119.29.194.155:8893"; +const ip: string = "yufangzc.com"; const fwqip: string = "yufangzc.com"; //打包服务器接口代理标识 const SERVERAGENT: string = "/jzd-api"; @@ -6,11 +7,11 @@ const SERVERAGENT: string = "/jzd-api"; export const HOMEAGENT: string = ""; // 接口地址 export const BASE_URL: string = - process.env.NODE_ENV == "development" ? `http://${ip}/zhxy` : SERVERAGENT; + process.env.NODE_ENV == "development" ? `https://${ip}/zhxy` : SERVERAGENT; // WebSocket地址 export const BASE_WS_URL: string = `wss://${ip}`; //图片地址 -export const BASE_IMAGE_URL: string = process.env.NODE_ENV == "development" ? `http://${ip}` : `https://${fwqip}`; +export const BASE_IMAGE_URL: string = process.env.NODE_ENV == "development" ? `https://${ip}` : `https://${fwqip}`; //存token的key export const AUTH_KEY: string = "satoken"; //token过期返回状态码 diff --git a/src/pages/base/course-selection/index.vue b/src/pages/base/course-selection/index.vue index 5133122..5b99327 100644 --- a/src/pages/base/course-selection/index.vue +++ b/src/pages/base/course-selection/index.vue @@ -155,7 +155,7 @@ diff --git a/src/pages/system/launchPage/launchPage.vue b/src/pages/system/launchPage/launchPage.vue index 9444a10..57d114f 100644 --- a/src/pages/system/launchPage/launchPage.vue +++ b/src/pages/system/launchPage/launchPage.vue @@ -19,9 +19,8 @@ import { useUserStore } from "@/store/modules/user"; import { checkOpenId } from "@/api/system/login"; import { isTabBar } from "@/utils/uniapp"; -const { setGlobal, getGlobal } = useDataStore(); -const { afterLoginAction, getToken } = useUserStore(); -const { setFile, getFile } = useDataStore(); +const { setGlobal } = useDataStore(); +const { afterLoginAction } = useUserStore(); const isShow = ref(true); function toHome(data: any) { @@ -37,26 +36,23 @@ function toHome(data: any) { } onLoad(async (data: any) => { + console.log(data); setGlobal(data); - if (!getToken) { - if (data && data.openId) { - checkOpenId({ openId: data.openId, appCode: "JZ" }) - .then(async (res) => { - if (res.resultCode == 1) { - if (res.result) { - afterLoginAction(res.result); - toHome(data); - } else { - uni.reLaunch({ - url: "/pages/base/parentRegister/index", - }); - } + if (data && data.openId) { + checkOpenId({ openId: data.openId, appCode: "JZ" }) + .then(async (res) => { + if (res.resultCode == 1) { + if (res.result) { + afterLoginAction(res.result); + toHome(data); + } else { + uni.reLaunch({ + url: "/pages/base/parentRegister/index", + }); } - }) - .catch((err) => {}); - } - } else { - toHome(data); + } + }) + .catch((err) => {}); } });