cyc
This commit is contained in:
parent
3d05276026
commit
7099f45d36
@ -38,7 +38,17 @@ var bookinfo ={
|
||||
method: 'GET',
|
||||
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() {
|
||||
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.$store.state.redirecturl = this.$route.query.redirecturl
|
||||
var userType = getStore("userType")
|
||||
@ -160,34 +163,66 @@ export default {
|
||||
// this.location = locationData.location
|
||||
|
||||
|
||||
|
||||
var res = await bookApi.bookinfo.json({bookId:this.bookId})
|
||||
|
||||
try {
|
||||
this.textBookData = await bookApi.bookinfo.detail({bookId:this.bookId})
|
||||
this.$store.state.textBookData = this.textBookData
|
||||
// res = JSON.stringify(res)
|
||||
// res = res.replaceAll("https://smile-ebook.oss-cn-qingdao.aliyuncs.com/", "fileapi/")
|
||||
// res = JSON.parse(res)
|
||||
|
||||
} catch (error) {
|
||||
this.fullscreenLoading = false
|
||||
this.show= false
|
||||
this.showError = true
|
||||
this.errormsg = error
|
||||
this.$message.error(error);
|
||||
}
|
||||
if (res){
|
||||
var res1 = await fetch(res.LOCAL_VIEW_DETAIL,{
|
||||
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'
|
||||
})
|
||||
|
||||
console.log(this.catalogList)
|
||||
this.looseLeafData = await res3.json()
|
||||
|
||||
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.catalogList = await bookApi.bookinfo.category({bookId:this.bookId})
|
||||
this.looseLeafData = await bookApi.bookinfo.data({bookId:this.bookId})
|
||||
this.show = true
|
||||
this.fullscreenLoading = false
|
||||
// this.catalogList = await bookApi.bookinfo.category({bookId:this.bookId})
|
||||
// this.looseLeafData = await bookApi.bookinfo.data({bookId:this.bookId})
|
||||
|
||||
|
||||
this.data.resources.list = await bookApi.resource.list({bookId:this.bookId})
|
||||
|
||||
this.digitalTeaching = true
|
||||
|
||||
if (this.$route.query.chapterId){
|
||||
this.chapterId = this.$route.query.chapterId
|
||||
}
|
||||
|
||||
this.show = true
|
||||
this.fullscreenLoading = false
|
||||
this.digitalTeaching = true
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
@ -19,7 +19,26 @@ module.exports = {
|
||||
});
|
||||
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