From 5c1da90137421e87c944a435849f87d0b47b99c0 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Sat, 13 Aug 2022 22:00:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E5=90=8D=E7=A7=B0=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 38 ++++++++++++++++++++++++++++++++++---- pages/index/index.vue | 2 +- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/App.vue b/App.vue index 3bb39fee..c3a1a8f1 100644 --- a/App.vue +++ b/App.vue @@ -49,7 +49,7 @@ // 请求地址 request_url: 'http://shopxo.com/', // 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/) - static_url: 'https://d1.shopxo.vip/', + static_url: 'http://shopxo.com/', // 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立) system_type: 'default', // 基础信息 @@ -1374,15 +1374,45 @@ } } return true; + }, + + // app标题 + get_application_title() { + var value = null; + // 根据终端类型获取对应数据 + var type = this.application_client_type() || null; + if(type !== null) { + value = this.get_config('config.common_app_mini_'+type+'_title') || null; + } + // 获取公共数据 + if(value === null) { + value = this.get_config('config.home_site_name', this.data.application_title); + } + return value; + }, + + // app描述 + get_application_describe() { + var value = null; + // 根据终端类型获取对应数据 + var type = this.application_client_type() || null; + if(type !== null) { + value = this.get_config('config.common_app_mini_'+type+'_describe') || null; + } + // 获取公共数据 + if(value === null) { + value = this.data.application_describe; + } + return value; }, - + // 分享内容处理 share_content_handle(data) { // 获取插件配置信息 var share_config = this.get_config('plugins_base.share.data') || {}; var result = { - title: data.title || share_config.title || this.data.application_title, - desc: data.desc || share_config.desc || this.data.application_describe, + title: data.title || share_config.title || this.get_application_title(), + desc: data.desc || share_config.desc || this.get_application_describe(), path: data.path || this.data.tabbar_pages[0], query: this.share_query_handle(data.query || ''), img: data.img || share_config.pic || this.get_config('config.home_site_logo_square') diff --git a/pages/index/index.vue b/pages/index/index.vue index e3b222b8..c1f7abf0 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -412,7 +412,7 @@ common_app_is_enable_answer: app.globalData.get_config('config.common_app_is_enable_answer'), common_app_is_header_nav_fixed: app.globalData.get_config('config.common_app_is_header_nav_fixed'), common_app_is_online_service: app.globalData.get_config('config.common_app_is_online_service'), - application_title: app.globalData.get_config('config.home_site_name', app.globalData.data.application_title) + application_title: app.globalData.get_application_title() }); } else { app.globalData.is_config(this, 'init_config');