cyc
This commit is contained in:
parent
3d05276026
commit
7099f45d36
@ -39,6 +39,16 @@ var bookinfo ={
|
|||||||
data: params,
|
data: params,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 集合
|
||||||
|
json: (params) =>{
|
||||||
|
|
||||||
|
return request({
|
||||||
|
url :`${prefix}/smile/get/remote/book/jsom/url`,
|
||||||
|
method :'GET',
|
||||||
|
data : params
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 笔记
|
// 笔记
|
||||||
|
|||||||
@ -112,6 +112,9 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.bookId = this.$route.query.bookId
|
this.bookId = this.$route.query.bookId
|
||||||
|
|
||||||
|
if (this.$route.query.chapterId){
|
||||||
|
this.chapterId = this.$route.query.chapterId
|
||||||
|
}
|
||||||
// this.userType = this.$route.query.userType || 'student'
|
// this.userType = this.$route.query.userType || 'student'
|
||||||
this.$store.state.redirecturl = this.$route.query.redirecturl
|
this.$store.state.redirecturl = this.$route.query.redirecturl
|
||||||
var userType = getStore("userType")
|
var userType = getStore("userType")
|
||||||
@ -160,34 +163,66 @@ export default {
|
|||||||
// this.location = locationData.location
|
// this.location = locationData.location
|
||||||
|
|
||||||
|
|
||||||
|
var res = await bookApi.bookinfo.json({bookId:this.bookId})
|
||||||
|
|
||||||
|
// res = JSON.stringify(res)
|
||||||
|
// res = res.replaceAll("https://smile-ebook.oss-cn-qingdao.aliyuncs.com/", "fileapi/")
|
||||||
|
// res = JSON.parse(res)
|
||||||
|
|
||||||
try {
|
if (res){
|
||||||
this.textBookData = await bookApi.bookinfo.detail({bookId:this.bookId})
|
var res1 = await fetch(res.LOCAL_VIEW_DETAIL,{
|
||||||
this.$store.state.textBookData = this.textBookData
|
mode: 'cors'
|
||||||
|
})
|
||||||
|
this.textBookData = await res1.json()
|
||||||
|
var res2 = await fetch (res.LOCAL_VIEW_CATALOG,{
|
||||||
|
mode: 'cors'
|
||||||
|
})
|
||||||
|
debugger
|
||||||
|
this.catalogList = await res2.json()
|
||||||
|
var res3 = await fetch(res.LOCAL_VIEW_DATA,{
|
||||||
|
mode: 'cors'
|
||||||
|
})
|
||||||
|
|
||||||
} catch (error) {
|
console.log(this.catalogList)
|
||||||
this.fullscreenLoading = false
|
this.looseLeafData = await res3.json()
|
||||||
this.show= false
|
|
||||||
this.showError = true
|
|
||||||
this.errormsg = error
|
|
||||||
this.$message.error(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
this.basisPath = res.basisPath
|
||||||
|
debugger
|
||||||
|
}
|
||||||
|
|
||||||
|
debugger
|
||||||
|
|
||||||
|
// debugger
|
||||||
|
// console.log(res)
|
||||||
|
// return
|
||||||
|
// try {
|
||||||
|
// this.textBookData = await bookApi.bookinfo.detail({bookId:this.bookId})
|
||||||
|
// this.$store.state.textBookData = this.textBookData
|
||||||
|
|
||||||
|
// } catch (error) {
|
||||||
|
// this.fullscreenLoading = false
|
||||||
|
// this.show= false
|
||||||
|
// this.showError = true
|
||||||
|
// this.errormsg = error
|
||||||
|
// this.$message.error(error);
|
||||||
|
// }
|
||||||
|
debugger
|
||||||
this.basisPath = this.textBookData.basisPath
|
this.basisPath = this.textBookData.basisPath
|
||||||
this.catalogList = await bookApi.bookinfo.category({bookId:this.bookId})
|
// this.catalogList = await bookApi.bookinfo.category({bookId:this.bookId})
|
||||||
this.looseLeafData = await bookApi.bookinfo.data({bookId:this.bookId})
|
// this.looseLeafData = await bookApi.bookinfo.data({bookId:this.bookId})
|
||||||
this.show = true
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
|
|
||||||
this.data.resources.list = await bookApi.resource.list({bookId:this.bookId})
|
this.data.resources.list = await bookApi.resource.list({bookId:this.bookId})
|
||||||
|
|
||||||
this.digitalTeaching = true
|
|
||||||
|
|
||||||
if (this.$route.query.chapterId){
|
if (this.$route.query.chapterId){
|
||||||
this.chapterId = this.$route.query.chapterId
|
this.chapterId = this.$route.query.chapterId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.show = true
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
this.digitalTeaching = true
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,26 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
console.log('Proxy response:', res.statusCode);
|
console.log('Proxy response:', res.statusCode);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'/remote':{
|
||||||
|
target : "https://smile-ebook.oss-cn-qingdao.aliyuncs.com",
|
||||||
|
changeOrigin : true,
|
||||||
|
pathRewrite: {
|
||||||
|
'^/remote': '/'
|
||||||
|
},
|
||||||
|
logLevel : 'debug',
|
||||||
|
onProxyRes(proxyRes, req, res) {
|
||||||
|
let responseBody = '';
|
||||||
|
proxyRes.on('data', (chunk) => {
|
||||||
|
responseBody += chunk;
|
||||||
|
});
|
||||||
|
proxyRes.on('end', () => {
|
||||||
|
// console.log('Proxy response body:', responseBody);
|
||||||
|
});
|
||||||
|
console.log('Proxy response:', res.statusCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user