This commit is contained in:
caoyuchun 2024-09-13 13:22:40 +08:00
parent b44955ea36
commit 08086690bf
8 changed files with 53 additions and 11 deletions

6
.env.sub Normal file
View File

@ -0,0 +1,6 @@
# NODE_ENV=sub
VUE_APP_BASE_URL=/reading/
# VUE_APP_BASE_URL1=/dist/
# VUE_APP_NAME=caoyuchun
# VUE_APP_EMAIL=caoyuchun2003@qq.com
# // base: process.env.NODE_ENV == "sub"? process.env.VUE_APP_BASE_URL:"",

View File

@ -5,6 +5,7 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build-sub": "vue-cli-service build --mode sub",
"lint": "vue-cli-service lint"
},
"dependencies": {

View File

@ -5,6 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- <link rel="https://axdbook.zxkedu.com/bundles/app/images/zwsjimg2_06.png"> -->
<!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
<title>电子书阅读器</title>
</head>
@ -12,6 +14,26 @@
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<script>
setFavion = () => {
var link = document.querySelector("link[rel*='icon']")
// <link rel="icon" href="https://axdbook.zxkedu.com/bundles/app/images/zwsjimg2_06.png">
if (window.location.hostname.includes("axdbook")
||window.location.hostname.includes("local")
){
// if (window.location.hostname.includes("local")){
document.title = "翱翔书苑-电子书阅读"
link.href = "../favicon.ico"
console.log(window.location.hostname)
}
}
setFavion()
</script>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>

View File

@ -1,11 +1,15 @@
<template>
<el-dialog
title="思维导图"
title="导图"
:visible.sync="dialogVisible"
width="80%"
@close="handleClose"
>
<div ref="mindElixirContainer" id="mindContainerID" style="width: 100%; height: 500px;"></div>
<div style="display: flex; width: 100%; justify-content: space-between; margin-top: -30px;margin-bottom: 10px;">
<p>说明请点击右键进行操作编辑完成后需保存</p>
<!-- <el-button type="primary" @click="save"> 保存</el-button> -->
</div>
<div ref="mindElixirContainer" id="mindContainerID" style="width: 100%; height: 50vh;"></div>
<template slot="footer">

View File

@ -1,7 +1,8 @@
<template>
<div id="nav">
<div>
<a :href=this.$store.state.redirecturl>返回首页</a>
<a :href="backUrl">返回首页</a>
</div>
<!-- <router-link to="/book">书籍</router-link> | -->
<h3>{{this.$store.state.textBookData.textBooksName}}</h3>
@ -46,6 +47,13 @@ export default {
mindData:{},
}
},
computed:{
backUrl(){
return this.$store.state.redirecturl?this.$store.state.redirecturl:"../"
}
},
async mounted() {
this.bookId = this.$route.query.bookId

View File

@ -15,7 +15,7 @@ const routes = [
name: 'Book',
component: () => import(/* webpackChunkName: "about" */ '../views/Book.vue'),
meta:{
title:"新思课堂电子书阅读"
// title:"新思课堂电子书阅读"
}
},
{
@ -27,10 +27,11 @@ const routes = [
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
}
]
// base: process.env.NODE_ENV == "sub"? process.env.VUE_APP_BASE_URL:""
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
base: process.env.VUE_APP_BASE_URL,
// base: "/dist/",
routes
})

View File

@ -128,7 +128,7 @@ export default {
userInfo:{},
userId:{},
classList:[],
classId:'',
classId:0,
className:'',
teacherData:{},
studentData:{}
@ -137,7 +137,6 @@ export default {
created() {
document.title = "新思课堂电子书阅读"
this.bookId = this.$route.query.bookId
this.userId = getStore("userId")
@ -175,10 +174,10 @@ export default {
this.location = localStorage.getItem(this.textBookData.id)
this.request()//
setTimeout(() => {
setTimeout( async() => {
// this.getData()
this.getMineData()
this.studySituation()
await this.getMineData()
await this.studySituation()
// this.getSetting()
}, 800)
},

View File

@ -1,5 +1,6 @@
module.exports = {
lintOnSave: false,
publicPath: './', // 设置公共路径为相对路径
devServer: {
proxy: {
'/api': {