diff --git a/config/index.js b/config/index.js index a28e728..d4d85ae 100644 --- a/config/index.js +++ b/config/index.js @@ -14,11 +14,13 @@ export const DefaultAppConfigs = { authorConfig: {}, appConfig: {}, pluginConfig: { + votePlugin: {}, toolsPlugin: {}, + linksPlugin:{}, linksSubmitPlugin: {}, doubanPlugin: { position: 'bottom' - } + }, }, pageConfig: { homeConfig: { diff --git a/pages/tabbar/about/about.vue b/pages/tabbar/about/about.vue index 2dd972d..9e31faa 100644 --- a/pages/tabbar/about/about.vue +++ b/pages/tabbar/about/about.vue @@ -165,6 +165,12 @@ calcAuditModeEnabled() { return this.haloConfigs.auditConfig.auditModeEnabled }, + calcVotePluginEnabled() { + return !!this.haloConfigs?.pluginConfig?.votePlugin?.enabled; + }, + calcLinksPluginEnabled() { + return !!this.haloConfigs?.pluginConfig?.linksPlugin?.enabled; + }, }, watch: { haloConfigs: { @@ -228,7 +234,7 @@ path: '/pagesA/votes/votes', isAdmin: false, type: 'page', - show: !this.calcAuditModeEnabled + show: !this.calcAuditModeEnabled && !!this.calcVotePluginEnabled, }, { key: 'disclaimers', title: '友情链接', @@ -238,7 +244,7 @@ path: '/pagesA/friend-links/friend-links', isAdmin: false, type: 'page', - show: true + show: !!this.calcLinksPluginEnabled, }, { key: 'disclaimers', diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index bf1ff6f..f5bcdb5 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -193,6 +193,12 @@ } return this.haloConfigs.pageConfig.homeConfig.useCategory }, + calcVotePluginEnabled() { + return !!this.haloConfigs?.pluginConfig?.votePlugin?.enabled + }, + calcLinksPluginEnabled() { + return !!this.haloConfigs?.pluginConfig?.linksPlugin?.enabled; + }, bannerConfig() { return this.haloConfigs.pageConfig.homeConfig.bannerConfig } @@ -556,7 +562,7 @@ iconColor: '', path: '/pagesA/votes/votes', type: 'page', - show: !this.calcAuditModeEnabled + show: !this.calcAuditModeEnabled && !!this.calcVotePluginEnabled, }, { key: 'disclaimers', title: '友情链接', @@ -567,7 +573,7 @@ iconColor: '', path: '/pagesA/friend-links/friend-links', type: 'page', - show: true + show: !!this.calcLinksPluginEnabled, }, { key: 'love', title: '恋爱日记',