|
@@ -346,6 +346,59 @@ export default {
|
|
|
this.imgA = require("../assets/img/drgB.png");
|
|
this.imgA = require("../assets/img/drgB.png");
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ async cocoNoteif(){
|
|
|
|
|
+ if (this.cocoNoteType && this.courseId) {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ cid: this.courseId,
|
|
|
|
|
+ classid: '1',
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ let res = await getCourseGroup(params);
|
|
|
|
|
+ if (res.data && res.data[1].length) {
|
|
|
|
|
+ let groupPerson = res.data[1]
|
|
|
|
|
+ let groupCid = ''
|
|
|
|
|
+ for (var i = 0; i < groupPerson.length; i++) {
|
|
|
|
|
+ if (groupPerson[i].userid == this.roleUser.userid) {
|
|
|
|
|
+ groupCid = groupPerson[i].groupCid
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (groupCid) {
|
|
|
|
|
+ this.openApp3({
|
|
|
|
|
+ stateL: true,
|
|
|
|
|
+ toolId: "synergyCourse",
|
|
|
|
|
+ clearL: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ window.topU.postMessage(
|
|
|
|
|
+ {
|
|
|
|
|
+ tools: "opencCscl",
|
|
|
|
|
+ cid: this.courseId,
|
|
|
|
|
+ gid: groupCid,
|
|
|
|
|
+ },
|
|
|
|
|
+ "*"
|
|
|
|
|
+ );
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId , type: (this.roleUser.type == 1 ? '_teacher' : '_student') + "CocoNote_open" }, "success")
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error("没有加入分组请先加入分组");
|
|
|
|
|
+ this.goToCourse3(this.courseId)
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId , type: (this.roleUser.type == 1 ? '_teacher' : '_student') + "CocoNote_open" }, '没有加入分组请先加入分组')
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error("没有加入分组请先加入分组");
|
|
|
|
|
+ this.goToCourse3(this.courseId)
|
|
|
|
|
+ this.addOp3('1', "", { courseid: this.courseId , type: (this.roleUser.type == 1 ? '_teacher' : '_student') + "CocoNote_open" }, '没有加入分组请先加入分组')
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.addOp3(
|
|
|
|
|
+ "1",
|
|
|
|
|
+ "",
|
|
|
|
|
+ { courseid: this.courseId ,type: (this.roleUser.type == 1 ? '_teacher' : '_student') + "CocoNote_open" },
|
|
|
|
|
+ error
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 跳转
|
|
// 跳转
|
|
|
async goMsg(){
|
|
async goMsg(){
|
|
|
console.log('去通知页');
|
|
console.log('去通知页');
|
|
@@ -469,52 +522,6 @@ export default {
|
|
|
async handleLoad(){
|
|
async handleLoad(){
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
console.log('iframe加载完成');
|
|
console.log('iframe加载完成');
|
|
|
- if (this.cocoNoteType && this.courseId) {
|
|
|
|
|
- let params = {
|
|
|
|
|
- cid: this.courseId,
|
|
|
|
|
- classid: '1',
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- try {
|
|
|
|
|
- let res = await getCourseGroup(params);
|
|
|
|
|
- if (res.data && res.data[1].length) {
|
|
|
|
|
- let groupPerson = res.data[1]
|
|
|
|
|
- let groupCid = ''
|
|
|
|
|
- for (var i = 0; i < groupPerson.length; i++) {
|
|
|
|
|
- if (groupPerson[i].userid == this.roleUser.userid) {
|
|
|
|
|
- groupCid = groupPerson[i].groupCid
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if (groupCid) {
|
|
|
|
|
- window.topU.postMessage(
|
|
|
|
|
- {
|
|
|
|
|
- tools: "opencCscl",
|
|
|
|
|
- cid: this.courseId,
|
|
|
|
|
- gid: groupCid,
|
|
|
|
|
- },
|
|
|
|
|
- "*"
|
|
|
|
|
- );
|
|
|
|
|
- this.addOp3('1', "", { courseid: this.courseId , type: (this.roleUser.type == 1 ? '_teacher' : '_student') + "CocoNote_open" }, "success")
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error("没有加入分组请先加入分组");
|
|
|
|
|
- this.goToCourse3(this.courseId)
|
|
|
|
|
- this.addOp3('1', "", { courseid: this.courseId , type: (this.roleUser.type == 1 ? '_teacher' : '_student') + "CocoNote_open" }, '没有加入分组请先加入分组')
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error("没有加入分组请先加入分组");
|
|
|
|
|
- this.goToCourse3(this.courseId)
|
|
|
|
|
- this.addOp3('1', "", { courseid: this.courseId , type: (this.roleUser.type == 1 ? '_teacher' : '_student') + "CocoNote_open" }, '没有加入分组请先加入分组')
|
|
|
|
|
- }
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- this.addOp3(
|
|
|
|
|
- "1",
|
|
|
|
|
- "",
|
|
|
|
|
- { courseid: this.courseId ,type: (this.roleUser.type == 1 ? '_teacher' : '_student') + "CocoNote_open" },
|
|
|
|
|
- error
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
},
|
|
},
|
|
|
goToCourse3() {
|
|
goToCourse3() {
|
|
|
|
|
|
|
@@ -813,11 +820,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
// this.getMsg()
|
|
// this.getMsg()
|
|
|
if(this.cocoNoteType){
|
|
if(this.cocoNoteType){
|
|
|
- this.openApp3({
|
|
|
|
|
- stateL: true,
|
|
|
|
|
- toolId: "synergyCourse",
|
|
|
|
|
- clearL: true,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.cocoNoteif()
|
|
|
return
|
|
return
|
|
|
}else if (this.courseId) {
|
|
}else if (this.courseId) {
|
|
|
this.openApp2({
|
|
this.openApp2({
|