|
|
@ -246,8 +246,9 @@ export default { |
|
|
async getScreenSetting() { |
|
|
async getScreenSetting() { |
|
|
const res = await FetchInitScreenSetting({ libcode: config.LIB_CODE }); |
|
|
const res = await FetchInitScreenSetting({ libcode: config.LIB_CODE }); |
|
|
|
|
|
|
|
|
if (res.data.wechar_qr_code && res.data.wechar_qr_code.context) { |
|
|
|
|
|
const imageUrl = this.baseUrl + '/api/fileRelevant/getImg?imgType=1&imgId=' + res.data.wechar_qr_code.context; |
|
|
|
|
|
|
|
|
if (res.data.wechat_qr_code && res.data.wechat_qr_code.context) { |
|
|
|
|
|
// const imageUrl = this.baseUrl + '/api/fileRelevant/getImg?imgType=1&imgId=' + res.data.wechat_qr_code.context; |
|
|
|
|
|
const imageUrl = this.baseUrl + '/files/' + res.data.wechat_qr_code.context; |
|
|
try { |
|
|
try { |
|
|
const base64 = await this.urlToBase64(imageUrl); |
|
|
const base64 = await this.urlToBase64(imageUrl); |
|
|
this.wecharQRCode = base64; |
|
|
this.wecharQRCode = base64; |
|
|
@ -367,15 +368,17 @@ export default { |
|
|
|
|
|
|
|
|
for (let i = 0; i < displayBooks.length; i++) { |
|
|
for (let i = 0; i < displayBooks.length; i++) { |
|
|
let item = displayBooks[i]; |
|
|
let item = displayBooks[i]; |
|
|
if (item.imgPath) { |
|
|
|
|
|
const imageUrl = this.baseUrl + '/api/fileRelevant/getImg?imgType=2&imgId=' + item.imgPath; |
|
|
|
|
|
|
|
|
if (item.imgVxPath) { |
|
|
|
|
|
// const imageUrl = this.baseUrl + '/api/fileRelevant/getImg?imgType=2&imgId=' + item.imgPath; |
|
|
|
|
|
const imageUrl = this.baseUrl + '/files/' + item.imgVxPath; |
|
|
console.log('imageUrl:', imageUrl); |
|
|
console.log('imageUrl:', imageUrl); |
|
|
try { |
|
|
|
|
|
const base64 = await this.urlToBase64(imageUrl); |
|
|
|
|
|
item.base64Cover = base64; |
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
item.base64Cover = ''; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
item.base64Cover = imageUrl; |
|
|
|
|
|
// try { |
|
|
|
|
|
// const base64 = await this.urlToBase64(imageUrl); |
|
|
|
|
|
// item.base64Cover = base64; |
|
|
|
|
|
// } catch (err) { |
|
|
|
|
|
// item.base64Cover = ''; |
|
|
|
|
|
// } |
|
|
} else { |
|
|
} else { |
|
|
item.base64Cover = ''; |
|
|
item.base64Cover = ''; |
|
|
} |
|
|
} |
|
|
|