|  | @@ -37,6 +37,16 @@
 | 
	
		
			
				|  |  |          :class="['inner', fullscreen ? 'inner-full' : '']"
 | 
	
		
			
				|  |  |          v-loading="loading"
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  | +        <el-image
 | 
	
		
			
				|  |  | +          :src="pictureUrl"
 | 
	
		
			
				|  |  | +          fit="scale-down"
 | 
	
		
			
				|  |  | +          class="img_url"
 | 
	
		
			
				|  |  | +          v-if="!chapterId && pictureUrl"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <div slot="placeholder" class="image-slot">
 | 
	
		
			
				|  |  | +            <img src="../assets/common/icon-imgloading.png" />
 | 
	
		
			
				|  |  | +          </div>
 | 
	
		
			
				|  |  | +        </el-image>
 | 
	
		
			
				|  |  |          <!-- 显示答案按钮 -->
 | 
	
		
			
				|  |  |          <!-- <a v-if="chapterId" :class="['answerShow',isAnswerShow?'answerShowTrue':'']" @click="handleAnswerShow">显示答案</a> -->
 | 
	
		
			
				|  |  |          <!-- <a class="edit-btn" @click="handleEdit">编辑</a> -->
 | 
	
	
		
			
				|  | @@ -136,7 +146,7 @@
 | 
	
		
			
				|  |  |  import Header from "@/components/inputModules/common/Header";
 | 
	
		
			
				|  |  |  import Nav from "@/components/inputModules/common/Nav";
 | 
	
		
			
				|  |  |  import TreeView from "@/components/inputModules/common/TreeView";
 | 
	
		
			
				|  |  | -import { getContent,getLogin } from "@/api/ajax";
 | 
	
		
			
				|  |  | +import { getContent, getLogin } from "@/api/ajax";
 | 
	
		
			
				|  |  |  import Cookies from "js-cookie";
 | 
	
		
			
				|  |  |  // import Preview from '@/componentsAnswer/PreviewAnswer.vue'
 | 
	
		
			
				|  |  |  import Preview from "@/components/Preview";
 | 
	
	
		
			
				|  | @@ -189,7 +199,7 @@ export default {
 | 
	
		
			
				|  |  |        name: "",
 | 
	
		
			
				|  |  |        loading: false,
 | 
	
		
			
				|  |  |        bookFontSize: "",
 | 
	
		
			
				|  |  | -      showContent:false,
 | 
	
		
			
				|  |  | +      showContent: false,
 | 
	
		
			
				|  |  |        bookName: [
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |            name: "新实用汉语课本1",
 | 
	
	
		
			
				|  | @@ -249,54 +259,67 @@ export default {
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |        ],
 | 
	
		
			
				|  |  |        isAnswerItemShow: false,
 | 
	
		
			
				|  |  | +      pictureUrl: "",
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
		
			
				|  |  |      const _this = this;
 | 
	
		
			
				|  |  | -    if(_this.$route.query.encryption&&_this.$route.query.encryption!='undefined'&&_this.$route.query.type){
 | 
	
		
			
				|  |  | -        getLogin('login_control-CheckValidDateEncryptionString', {encryption_string:_this.$route.query.encryption}).then((res) => {
 | 
	
		
			
				|  |  | -            if(res.is_check_pass=='true'){
 | 
	
		
			
				|  |  | -                _this.bookId = this.$route.query.bookId;
 | 
	
		
			
				|  |  | -                _this.type = this.$route.query.type;
 | 
	
		
			
				|  |  | -                const MethodName = "book-book_manager-GetBook";
 | 
	
		
			
				|  |  | -                const data = {
 | 
	
		
			
				|  |  | -                    id: _this.bookId,
 | 
	
		
			
				|  |  | -                };
 | 
	
		
			
				|  |  | -                getContent(MethodName, data).then((res) => {
 | 
	
		
			
				|  |  | -                    this.showContent = true
 | 
	
		
			
				|  |  | -                    _this.name = res.name;
 | 
	
		
			
				|  |  | -                });
 | 
	
		
			
				|  |  | -            }else{
 | 
	
		
			
				|  |  | -                _this.$message({
 | 
	
		
			
				|  |  | -                    message: "链接已失效",
 | 
	
		
			
				|  |  | -                    type: "warning",
 | 
	
		
			
				|  |  | -                });
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        }).catch(()=>{
 | 
	
		
			
				|  |  | +    if (
 | 
	
		
			
				|  |  | +      _this.$route.query.encryption &&
 | 
	
		
			
				|  |  | +      _this.$route.query.encryption != "undefined" &&
 | 
	
		
			
				|  |  | +      _this.$route.query.type
 | 
	
		
			
				|  |  | +    ) {
 | 
	
		
			
				|  |  | +      getLogin("login_control-CheckValidDateEncryptionString", {
 | 
	
		
			
				|  |  | +        encryption_string: _this.$route.query.encryption,
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +        .then((res) => {
 | 
	
		
			
				|  |  | +          if (res.is_check_pass == "true") {
 | 
	
		
			
				|  |  | +            _this.bookId = this.$route.query.bookId;
 | 
	
		
			
				|  |  | +            _this.type = this.$route.query.type;
 | 
	
		
			
				|  |  | +            const MethodName = "book-book_manager-GetBook";
 | 
	
		
			
				|  |  | +            const data = {
 | 
	
		
			
				|  |  | +              id: _this.bookId,
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  | +            getContent(MethodName, data).then((res) => {
 | 
	
		
			
				|  |  | +              this.showContent = true;
 | 
	
		
			
				|  |  | +              _this.name = res.name;
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          } else {
 | 
	
		
			
				|  |  |              _this.$message({
 | 
	
		
			
				|  |  | -                message: "链接已失效",
 | 
	
		
			
				|  |  | -                type: "warning",
 | 
	
		
			
				|  |  | +              message: "链接已失效",
 | 
	
		
			
				|  |  | +              type: "warning",
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -    }else if(_this.$route.query.showCourse){
 | 
	
		
			
				|  |  | -        _this.bookId = this.$route.query.bookId;
 | 
	
		
			
				|  |  | -        _this.type = this.$route.query.type;
 | 
	
		
			
				|  |  | -        const MethodName = "book-book_manager-GetBook";
 | 
	
		
			
				|  |  | -        const data = {
 | 
	
		
			
				|  |  | -            id: _this.bookId,
 | 
	
		
			
				|  |  | -        };
 | 
	
		
			
				|  |  | -        getContent(MethodName, data).then((res) => {
 | 
	
		
			
				|  |  | -            this.showContent = true
 | 
	
		
			
				|  |  | -            _this.name = res.name;
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -    }else {
 | 
	
		
			
				|  |  | -        _this.$message({
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        .catch(() => {
 | 
	
		
			
				|  |  | +          _this.$message({
 | 
	
		
			
				|  |  |              message: "链接已失效",
 | 
	
		
			
				|  |  |              type: "warning",
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | +    } else if (_this.$route.query.showCourse) {
 | 
	
		
			
				|  |  | +      _this.bookId = this.$route.query.bookId;
 | 
	
		
			
				|  |  | +      _this.type = this.$route.query.type;
 | 
	
		
			
				|  |  | +      const MethodName = "book-book_manager-GetBook";
 | 
	
		
			
				|  |  | +      const data = {
 | 
	
		
			
				|  |  | +        id: _this.bookId,
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      getContent(MethodName, data).then((res) => {
 | 
	
		
			
				|  |  | +        this.showContent = true;
 | 
	
		
			
				|  |  | +        _this.name = res.name;
 | 
	
		
			
				|  |  | +        _this.pictureUrl = res.picture_url;
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    } else {
 | 
	
		
			
				|  |  | +      _this.$message({
 | 
	
		
			
				|  |  | +        message: "链接已失效",
 | 
	
		
			
				|  |  | +        type: "warning",
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      let userInfor = JSON.parse(getToken());
 | 
	
		
			
				|  |  | -    if (userInfor && (userInfor.user_type == "TEACHER"||userInfor.user_type == "INNER")) {
 | 
	
		
			
				|  |  | +    if (
 | 
	
		
			
				|  |  | +      userInfor &&
 | 
	
		
			
				|  |  | +      (userInfor.user_type == "TEACHER" || userInfor.user_type == "INNER")
 | 
	
		
			
				|  |  | +    ) {
 | 
	
		
			
				|  |  |        _this.isAnswerItemShow = true;
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  |        _this.isAnswerItemShow = false;
 | 
	
	
		
			
				|  | @@ -622,6 +645,10 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +.img_url {
 | 
	
		
			
				|  |  | +  width: 1000px;
 | 
	
		
			
				|  |  | +  height: 700px;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </style>
 | 
	
		
			
				|  |  |  <style lang="scss">
 | 
	
		
			
				|  |  |  .GCLS-BOOK-Container {
 | 
	
	
		
			
				|  | @@ -651,4 +678,4 @@ export default {
 | 
	
		
			
				|  |  |      font-size: 16px;
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -</style>
 | 
	
		
			
				|  |  | +</style>
 |