fix: 更新生产环境API地址并调整用户类型权限控制
修改config中的baseUrl为生产环境地址 在indexNewsInfo.vue中添加用户类型判断,仅经理用户可显示评论功能 调整token刷新逻辑,仅对普通用户生效
This commit is contained in:
parent
fbcce419f2
commit
1d1bbae0c5
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
<!-- 底部栏 评论 / 收藏 -->
|
||||
<Comment
|
||||
v-if="isLogin && !isDomestic"
|
||||
v-if="isLogin && !isDomestic && userType == 1"
|
||||
:data="data"
|
||||
@handleClickLike="handleClickLike"
|
||||
@handleClickStar="handleClickStar"
|
||||
|
|
@ -93,6 +93,8 @@ onReachBottom(() => {
|
|||
console.log("🚀 ~ onReachBottom ~ onReachBottom:");
|
||||
});
|
||||
|
||||
// 1:经理用户、2:普通用户
|
||||
const userType = ref(2);
|
||||
const isDomestic = ref<boolean>(false);
|
||||
onLoad(async (option: any) => {
|
||||
uni.pageScrollTo({
|
||||
|
|
@ -135,6 +137,12 @@ onLoad(async (option: any) => {
|
|||
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;
|
||||
|
|
@ -144,6 +152,7 @@ onLoad(async (option: any) => {
|
|||
// 1766373354519
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const newList = async (columnId: number) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue