课程详情studyIndex和detail传递用户所有受众id

This commit is contained in:
nisen
2023-08-09 18:45:33 +08:00
parent fdf16e86dc
commit 55e117b2c2
4 changed files with 51 additions and 4 deletions

View File

@@ -320,6 +320,7 @@
},
data() {
return {
audiences:'',
isCrowd:false,
cutOrgNamePath,
scormUrl:'',//当前播放的scormUrl
@@ -396,6 +397,10 @@
}
},
mounted() {
// 增加的用户受众id
let localKey = "user_" + this.userInfo.sysId + "_gids";
let hasIds = sessionStorage.getItem(localKey);
this.audiences = hasIds ?? ''
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
this.courseId = this.$route.query.id;
this.initContentId = this.$route.query.contentId;
@@ -1141,7 +1146,11 @@
// 获取数据信息
loadData() {
let $this=this;
apiStudy.studyIndex(this.courseId).then(rs => {
apiStudy.studyIndexPost({
cid: this.courseId,
addView:true,
audiences:this.audiences
}).then(rs => {
if (rs.status == 200) {
if(rs.result.contents.length==0){
$this.$message.error('课程内容已删除或课程已不再使用');