|
@ -215,14 +215,11 @@ export default { |
|
|
watch: { |
|
|
watch: { |
|
|
baseSetting: { |
|
|
baseSetting: { |
|
|
handler(result) { |
|
|
handler(result) { |
|
|
// 首先检查result是否存在 |
|
|
|
|
|
if (!result) return |
|
|
if (!result) return |
|
|
|
|
|
|
|
|
// 检查每个属性是否存在,避免访问undefined的属性 |
|
|
|
|
|
this.pageOneVisitBase = result.visit_base?.context || '0' |
|
|
this.pageOneVisitBase = result.visit_base?.context || '0' |
|
|
this.wecharQrCodeSrc = result.wechar_qr_code?.context || '' |
|
|
this.wecharQrCodeSrc = result.wechar_qr_code?.context || '' |
|
|
|
|
|
|
|
|
// 确保必要属性存在才执行初始化方法 |
|
|
|
|
|
if (result.visit_base && result.wechar_qr_code) { |
|
|
if (result.visit_base && result.wechar_qr_code) { |
|
|
this.initLeftPreview(result) |
|
|
this.initLeftPreview(result) |
|
|
} |
|
|
} |
|
@ -273,8 +270,7 @@ export default { |
|
|
// iNotice 公告 |
|
|
// iNotice 公告 |
|
|
const linkSrc = process.env.NODE_ENV === 'production' ? window.g.ApiUrl : process.env.VUE_APP_BASE_API |
|
|
const linkSrc = process.env.NODE_ENV === 'production' ? window.g.ApiUrl : process.env.VUE_APP_BASE_API |
|
|
console.log('linkSrc', linkSrc) |
|
|
console.log('linkSrc', linkSrc) |
|
|
// const doorCodes = this.$route.query.doorCodes |
|
|
|
|
|
FetchInitScreenData({ libcode: this.libcode }).then(res => { |
|
|
|
|
|
|
|
|
FetchInitScreenData({ 'libcode': this.libcode, 'doorCodes': doorCodes || null }).then(res => { |
|
|
const result = res.data.settings |
|
|
const result = res.data.settings |
|
|
this.pageOneVisitBase = result.visit_base.context |
|
|
this.pageOneVisitBase = result.visit_base.context |
|
|
this.wecharQrCodeSrc = result.wechar_qr_code.context |
|
|
this.wecharQrCodeSrc = result.wechar_qr_code.context |
|
|