diff --git a/config/index.js b/config/index.js index 0267b32..3e6f40c 100644 --- a/config/index.js +++ b/config/index.js @@ -8,7 +8,6 @@ export const DefaultAppConfigs = { authorConfig: {}, appConfig: {}, pluginConfig: {}, - adConfig: {}, } /** diff --git a/pages/tabbar/about/about.vue b/pages/tabbar/about/about.vue index ae54bc6..f1c40ea 100644 --- a/pages/tabbar/about/about.vue +++ b/pages/tabbar/about/about.vue @@ -181,37 +181,38 @@ export default { // #ifdef MP-WEIXIN _isWx = true; // #endif - this.navList = [{ - key: 'archives', - title: '文章归档', - leftIcon: 'halocoloricon-classify', - leftIconColor: 'red', - rightText: '已归档的文章', - path: '/pagesA/archives/archives', - isAdmin: false, - type: 'page', - show: false - }, { - key: 'love', - title: '恋爱日记', - leftIcon: 'halocoloricon-attent', - leftIconColor: 'red', - rightText: '甜蜜恋人的专属', - path: '/pagesA/love/love', - isAdmin: false, - type: 'page', - show: this.haloConfigs.loveConfig.loveEnabled - }, { - key: 'disclaimers', - title: '友情链接', - leftIcon: 'icon-lianjie', - leftIconColor: 'blue', - rightText: '看看朋友们吧', - path: '/pagesA/friend-links/friend-links', - isAdmin: false, - type: 'page', - show: true - }, + this.navList = [ + { + key: 'archives', + title: '文章归档', + leftIcon: 'halocoloricon-classify', + leftIconColor: 'red', + rightText: '已归档的文章', + path: '/pagesA/archives/archives', + isAdmin: false, + type: 'page', + show: false + }, { + key: 'love', + title: '恋爱日记', + leftIcon: 'halocoloricon-attent', + leftIconColor: 'red', + rightText: '甜蜜恋人的专属', + path: '/pagesA/love/love', + isAdmin: false, + type: 'page', + show: this.haloConfigs.loveConfig.loveEnabled + }, { + key: 'disclaimers', + title: '友情链接', + leftIcon: 'icon-lianjie', + leftIconColor: 'blue', + rightText: '看看朋友们吧', + path: '/pagesA/friend-links/friend-links', + isAdmin: false, + type: 'page', + show: true + }, { key: 'disclaimers', title: '免责声明', @@ -232,7 +233,7 @@ export default { path: '/pagesA/contact/contact', isAdmin: false, type: 'page', - show: true + show: this.haloConfigs.authorConfig.social.enabled }, { key: 'session', @@ -291,28 +292,28 @@ export default { // type: 'poup', // show: true // }, - { - key: 'setting', - title: '应用设置', - leftIcon: 'icon-cog', - leftIconColor: 'indigo', - rightText: `进入系统常用设置`, - path: '/pagesA/setting/setting', - isAdmin: false, - type: 'page', - show: false - }, - { - key: 'admin', - title: '后台管理', - leftIcon: 'icon-lock', - leftIconColor: 'gray', - rightText: '博客后台系统入口', - path: '/pagesB/admin/admin', - isAdmin: true, - type: 'page', - show: this.globalAppSettings.about.showAdmin - } + // { + // key: 'setting', + // title: '应用设置', + // leftIcon: 'icon-cog', + // leftIconColor: 'indigo', + // rightText: `进入系统常用设置`, + // path: '/pagesA/setting/setting', + // isAdmin: false, + // type: 'page', + // show: false + // }, + // { + // key: 'admin', + // title: '后台管理', + // leftIcon: 'icon-lock', + // leftIconColor: 'gray', + // rightText: '博客后台系统入口', + // path: '/pagesB/admin/admin', + // isAdmin: true, + // type: 'page', + // show: false + // } ]; }, fnGetData() { diff --git a/pagesA/contact/contact.vue b/pagesA/contact/contact.vue index 7587e5e..977100e 100644 --- a/pagesA/contact/contact.vue +++ b/pagesA/contact/contact.vue @@ -26,7 +26,6 @@ - @@ -37,9 +36,9 @@ - - - + + + @@ -137,36 +136,47 @@ export default { return blogger; }, socialConfig() { - return this.authorConfig.social + return this.authorConfig.social; }, calcIsNotEmpty() { return this.result.some((item) => item.value !== ""); } }, + watch: { + socialConfig: { + handler(newVal) { + if (!newVal) return; + this.fnGetData(); + }, + deep: true, + immediate: true + } + }, onLoad() { this.fnSetPageTitle('联系博主'); }, - created() { - this.fnGetData(); - }, methods: { fnGetData() { for (let key in this.socialConfig) { + if (key === 'enabled') { + continue; + } this.result.find(x => x.key === key).value = this.socialConfig[key]; } }, fnOnClick(item) { - if (this.globalAppSettings.contact.isLinkCopy && this.$utils.checkIsUrl(item.value)) { - uni.navigateTo({ - url: '/pagesC/website/website?data=' + - JSON.stringify({ - title: item.name, - url: item.value - }) - }); - } else { - this.$utils.copyText(item.value, item.name + ' 已复制!'); - } + this.$utils.copyText(item.value, item.name + ' 已复制!'); + // if (this.globalAppSettings.contact.isLinkCopy && this.$utils.checkIsUrl(item.value)) { + // uni.navigateTo({ + // url: '/pagesC/website/website?data=' + + // JSON.stringify({ + // title: item.name, + // url: item.value + // }) + // }); + // } else { + // this.$utils.copyText(item.value, item.name + ' 已复制!'); + // } } } };