|
@@ -33,18 +33,18 @@ export const myMixin = {
|
|
|
return "Other Browser";
|
|
return "Other Browser";
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- async addOp3(userTime, loadTime, object, status) {
|
|
|
|
|
|
|
+ async addOp3(userTime, loadTime, object, status,api = 'selectUser') {
|
|
|
if (!this.$route.query.userid) return
|
|
if (!this.$route.query.userid) return
|
|
|
try {
|
|
try {
|
|
|
if(!this.userJson || !this.userJson.accountNumber){
|
|
if(!this.userJson || !this.userJson.accountNumber){
|
|
|
- let res = await this.ajax.get(this.$store.state.api + "selectUser", {
|
|
|
|
|
|
|
+ let res = await this.ajax.get(this.$store.state.api + api, {
|
|
|
userid: this.$route.query.userid
|
|
userid: this.$route.query.userid
|
|
|
});
|
|
});
|
|
|
this.userJson = res.data[0][0]
|
|
this.userJson = res.data[0][0]
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
- return this.addOp3(userTime, loadTime, object, status);
|
|
|
|
|
|
|
+ return this.addOp3(userTime, loadTime, object, status,'selectUser2');
|
|
|
}
|
|
}
|
|
|
let _time = new Date()
|
|
let _time = new Date()
|
|
|
.toLocaleString("zh-CN", { hour12: false, timeZone: "Asia/Shanghai" })
|
|
.toLocaleString("zh-CN", { hour12: false, timeZone: "Asia/Shanghai" })
|
|
@@ -63,7 +63,7 @@ export const myMixin = {
|
|
|
object: JSON.stringify(object), //执行信息传json
|
|
object: JSON.stringify(object), //执行信息传json
|
|
|
status: status //成功返回success。失败返回error的信息
|
|
status: status //成功返回success。失败返回error的信息
|
|
|
};
|
|
};
|
|
|
- console.log('params',params);
|
|
|
|
|
|
|
+ // console.log('params',params);
|
|
|
|
|
|
|
|
this.ajax
|
|
this.ajax
|
|
|
.post(this.$store.state.apiM + 'updateUserData2', [params])
|
|
.post(this.$store.state.apiM + 'updateUserData2', [params])
|
|
@@ -80,18 +80,18 @@ export const myMixin = {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 新增:上课/备课数据实时同步接口
|
|
// 新增:上课/备课数据实时同步接口
|
|
|
- async syncClassData(classData) {
|
|
|
|
|
|
|
+ async syncClassData(classData,api = 'selectUser') {
|
|
|
if (!this.$route.query.userid) return
|
|
if (!this.$route.query.userid) return
|
|
|
try {
|
|
try {
|
|
|
if(!this.userJson || !this.userJson.accountNumber){
|
|
if(!this.userJson || !this.userJson.accountNumber){
|
|
|
- let res = await this.ajax.get(this.$store.state.api + "selectUser", {
|
|
|
|
|
|
|
+ let res = await this.ajax.get(this.$store.state.api + api, {
|
|
|
userid: this.$route.query.userid
|
|
userid: this.$route.query.userid
|
|
|
});
|
|
});
|
|
|
this.userJson = res.data[0][0]
|
|
this.userJson = res.data[0][0]
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
- return this.syncClassData(classData);
|
|
|
|
|
|
|
+ return this.syncClassData(classData,'selectUser2');
|
|
|
}
|
|
}
|
|
|
let courseGrade = classData.courseGrade ? await this.ajax.get(this.$store.state.api + "getClassById", { id: classData.courseGrade }) : '';
|
|
let courseGrade = classData.courseGrade ? await this.ajax.get(this.$store.state.api + "getClassById", { id: classData.courseGrade }) : '';
|
|
|
let coursePackageName = await this.ajax.get(this.$store.state.api + "getCopyCourseName", { id: classData.courseId });
|
|
let coursePackageName = await this.ajax.get(this.$store.state.api + "getCopyCourseName", { id: classData.courseId });
|
|
@@ -124,18 +124,18 @@ export const myMixin = {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 新增:上课/备课数据实时同步接口
|
|
// 新增:上课/备课数据实时同步接口
|
|
|
- async syncClassData2(classData) {
|
|
|
|
|
|
|
+ async syncClassData2(classData,api = 'selectUser') {
|
|
|
if (!this.$route.query.userid) return
|
|
if (!this.$route.query.userid) return
|
|
|
try {
|
|
try {
|
|
|
if(!this.userJson || !this.userJson.accountNumber){
|
|
if(!this.userJson || !this.userJson.accountNumber){
|
|
|
- let res = await this.ajax.get(this.$store.state.api + "selectUser", {
|
|
|
|
|
|
|
+ let res = await this.ajax.get(this.$store.state.api + api, {
|
|
|
userid: this.$route.query.userid
|
|
userid: this.$route.query.userid
|
|
|
});
|
|
});
|
|
|
this.userJson = res.data[0][0]
|
|
this.userJson = res.data[0][0]
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
- return this.syncClassData(classData);
|
|
|
|
|
|
|
+ return this.syncClassData(classData,'selectUser2');
|
|
|
}
|
|
}
|
|
|
let courseGrade = classData.courseGrade ? await this.ajax.get(this.$store.state.api + "getClassById", { id: classData.courseGrade }) : '';
|
|
let courseGrade = classData.courseGrade ? await this.ajax.get(this.$store.state.api + "getClassById", { id: classData.courseGrade }) : '';
|
|
|
let coursePackageName = await this.ajax.get(this.$store.state.api + "getCopyCourseName", { id: classData.courseId });
|
|
let coursePackageName = await this.ajax.get(this.$store.state.api + "getCopyCourseName", { id: classData.courseId });
|