|
@@ -1784,22 +1784,22 @@ export default {
|
|
|
) {
|
|
|
this.dialogVisiblePick = true;
|
|
|
}
|
|
|
- // if (
|
|
|
- // res.data[0][0].handle &&
|
|
|
- // JSON.parse(res.data[0][0].handle).type == 1 &&
|
|
|
- // this.videoList.length
|
|
|
- // ) {
|
|
|
- // let handle = JSON.parse(res.data[0][0].handle);
|
|
|
- // let a = this.$refs.zVideo;
|
|
|
+ if (
|
|
|
+ res.data[0][0].handle &&
|
|
|
+ JSON.parse(res.data[0][0].handle).type == 1 &&
|
|
|
+ this.videoList.length
|
|
|
+ ) {
|
|
|
+ let handle = JSON.parse(res.data[0][0].handle);
|
|
|
+ let a = this.$refs.zVideo;
|
|
|
|
|
|
- // if (handle.isPlay == 1) {
|
|
|
- // a.player.play();
|
|
|
- // } else if (handle.isPlay == 2) {
|
|
|
- // a.player.pause();
|
|
|
- // }
|
|
|
- // } else if(this.$refs.zVideo){
|
|
|
- // this.$refs.zVideo.player.pause();
|
|
|
- // }
|
|
|
+ if (handle.isPlay == 1) {
|
|
|
+ a.player.play();
|
|
|
+ } else if (handle.isPlay == 2) {
|
|
|
+ a.player.pause();
|
|
|
+ }
|
|
|
+ } else if (this.$refs.zVideo) {
|
|
|
+ this.$refs.zVideo.player.pause();
|
|
|
+ }
|
|
|
|
|
|
if (this.ppage == res.data[0][0].page && this.isBlock !== 0) {
|
|
|
return;
|
|
@@ -1881,6 +1881,28 @@ export default {
|
|
|
}, 0);
|
|
|
});
|
|
|
},
|
|
|
+ getData() {
|
|
|
+ let params = {
|
|
|
+ id: this.cid,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getRealTimeClassById", params)
|
|
|
+ .then((r) => {
|
|
|
+ let res = r.data[0][0];
|
|
|
+ this.pdfUrl = res.url;
|
|
|
+ this.tools = JSON.parse(res.content);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ // this.$message.error("查询失败");
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ setData() {
|
|
|
+ let _this = this;
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ _this.setPage();
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
clearInterval(this.timer);
|
|
@@ -1888,11 +1910,7 @@ export default {
|
|
|
// window.removeEventListener("message");
|
|
|
},
|
|
|
created() {
|
|
|
- // this.selectSWork();
|
|
|
- let _this = this;
|
|
|
- this.timer = setInterval(() => {
|
|
|
- _this.setPage();
|
|
|
- }, 1000);
|
|
|
+ this.getData();
|
|
|
// window.addEventListener("message", function (e) {
|
|
|
// // 监听 message 事件
|
|
|
// if (e.data.type && e.data.type == "shishi_canvas") {
|