diff --git a/src/config/index.ts b/src/config/index.ts index e967188..9abcbdb 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1,7 +1,7 @@ // const baseUrl = "http://192.168.31.25:8060/api"; -export const baseUrl = "http://127.0.0.1:8040/apih5"; +// export const baseUrl = "http://127.0.0.1:8040/apih5"; // export const baseUrl = "http://123.60.153.169:8042/apih5"; -// export const baseUrl = "https://cankao.cs.com.cn/mini"; +export const baseUrl = "https://cankao.cs.com.cn/mini"; export const baseUrlDataV = "https://cankao.cs.com.cn/zzck_datav"; // export const baseUrlDataV = "http://123.60.153.169:9995/zzck_datav"; diff --git a/src/pages/detail/indexNewsInfo.vue b/src/pages/detail/indexNewsInfo.vue index 8b8ef1a..b023aff 100644 --- a/src/pages/detail/indexNewsInfo.vue +++ b/src/pages/detail/indexNewsInfo.vue @@ -47,7 +47,7 @@ { console.log("🚀 ~ onReachBottom ~ onReachBottom:"); }); +// 1:经理用户、2:普通用户 +const userType = ref(2); const isDomestic = ref(false); onLoad(async (option: any) => { uni.pageScrollTo({ @@ -135,14 +137,21 @@ onLoad(async (option: any) => { window.location.reload(); } - console.log("🚀 ~ Date.now():", Date.now()); - // 打开页面时链接中带有time字段,表示上次分享的时间 - let shareTime = option?.time || 0; - // 现在的时间对比上次的分享时间,如果超过24小时,则刷新推荐栏目 - if (uni.getStorageSync("token") && Date.now() - shareTime > 24 * 60 * 60 * 1000) { - uni.removeStorageSync("token"); - // 1766373354519 - window.location.reload(); + // 1:经理用户、2:普通用户 + if (option?.userType) { + userType.value = option.userType; + } + + if (option?.userType == 2) { + console.log("🚀 ~ Date.now():", Date.now()); + // 打开页面时链接中带有time字段,表示上次分享的时间 + let shareTime = option?.time || 0; + // 现在的时间对比上次的分享时间,如果超过24小时,则刷新推荐栏目 + if (uni.getStorageSync("token") && Date.now() - shareTime > 24 * 60 * 60 * 1000) { + uni.removeStorageSync("token"); + // 1766373354519 + window.location.reload(); + } } });