|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="bookView2" v-loading="loading">
|
|
|
+ <div class="bookView2">
|
|
|
<!-- <div>
|
|
|
<el-button @click="goperview('book1')">新实用汉语课本1</el-button>
|
|
|
</div>
|
|
@@ -44,7 +44,7 @@ export default {
|
|
|
name: "新实用汉语",
|
|
|
id: "003-20210908-10-1ZWNGSASZL",
|
|
|
},
|
|
|
- loading: false,
|
|
|
+ loading: null,
|
|
|
};
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -89,21 +89,25 @@ export default {
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
- this.loading = true;
|
|
|
+ this.loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "跳转中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+
|
|
|
let codeName = "login_control-CreateTempAccessCode";
|
|
|
let access_code = null;
|
|
|
- let id = this.$route.query.bookId
|
|
|
+ let id = this.$route.query.bookId;
|
|
|
getStaticContent(codeName, {}).then((res) => {
|
|
|
access_code = res.access_code;
|
|
|
let Mname = "login_control-GetLoginInfoByAccessCode";
|
|
|
getStaticContent(Mname, {
|
|
|
access_code: access_code,
|
|
|
}).then((res) => {
|
|
|
- this.loading = false;
|
|
|
+ this.loading.close();
|
|
|
setToken(res);
|
|
|
- this.$router.push(
|
|
|
- `/courseview?bookId=${id}&type=preview`
|
|
|
- );
|
|
|
+ this.$router.push(`/courseview?bookId=${id}&type=preview`);
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -128,6 +132,8 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
/* @import url(); 引入css类 */
|
|
|
.bookView2 {
|
|
|
+ width: 100%;
|
|
|
+ height: 100vh;
|
|
|
padding-left: 30px;
|
|
|
div {
|
|
|
margin-top: 15px;
|