mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 01:46:44 +08:00
feat: 隐藏 366 367 368 项目管理的内容推荐,组织访问外部链接
This commit is contained in:
@@ -99,7 +99,8 @@
|
||||
<!--外连接-->
|
||||
<view v-if="conLink.openType == 1">
|
||||
<view v-if="conLink.url!=''" style="min-height: 400px;position: relative;">
|
||||
<web-view :src="conLink.url"></web-view>
|
||||
<!-- 此处会导致返回异常,暂时不给使用-->
|
||||
<!-- <web-view :src="conLink.url"></web-view>-->
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
@@ -410,7 +411,7 @@
|
||||
|
||||
</view>
|
||||
<!--推荐课程-->
|
||||
<view v-if="tabIndex==1 && !catalogShow" style="padding: 30upx;background-color: #fff;">
|
||||
<view v-if="tabIndex==1 && !catalogShow && validateManagerID" style="padding: 30upx;background-color: #fff;">
|
||||
<view style="color: #333333; font-size: 32upx;font-weight: 600;padding-bottom: 20upx;">课程推荐</view>
|
||||
<course-list :items="recommendCourses"></course-list>
|
||||
</view>
|
||||
@@ -591,6 +592,11 @@ export default {
|
||||
});
|
||||
return list;
|
||||
},
|
||||
validateManagerID(){
|
||||
const res = [366, 367, 368]. includes(Number(sessionStorage.getItem("projectid")))
|
||||
console.log(`validate projectid: `, res)
|
||||
return !res
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
//this.$watermark.set(this.userInfo.name+ this.userInfo.loginName);
|
||||
@@ -1022,17 +1028,23 @@ export default {
|
||||
this.conLink.url = con.content;
|
||||
this.conLink.openType = 1;
|
||||
}
|
||||
// todo: 暂时不知道这个 52 是干嘛的, 先写死吧
|
||||
// todo: 暂时不知道这个 52 是干嘛的, 先写死吧,openType 也是
|
||||
// if (this.conLink.openType == 2) {
|
||||
//新的窗口直接打开
|
||||
const url = this.conLink.url
|
||||
|
||||
console.log(`------- current url is : `, url)
|
||||
if (url.includes("/mobile")) {
|
||||
setTimeout(() => window.open(url.replace("/mobile", ""), "_top"))
|
||||
} else {
|
||||
location.href = url
|
||||
if (this.validateManagerID){
|
||||
console.log(`------- current url is : `, url)
|
||||
if (url.includes("/mobile")) {
|
||||
setTimeout(() => window.open(url.replace("/mobile", ""), "_top"))
|
||||
} else {
|
||||
location.href = url
|
||||
}
|
||||
}else{
|
||||
this.$refs.messager.show({message: '不可访问外部链接', type: 'error'});
|
||||
return
|
||||
}
|
||||
|
||||
// }
|
||||
} else if (con.contentType == 10 || con.contentType == 20) {
|
||||
if (con.content.startsWith('\{')) {
|
||||
|
||||
Reference in New Issue
Block a user