From 391f89059ae13287838c237eca608274682c2fb3 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Wed, 11 Oct 2023 16:11:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA=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 | 13 ++++- components/search/search.vue | 12 ++-- pages/index/index.css | 29 ++-------- pages/index/index.vue | 109 +++++++++++++---------------------- 4 files changed, 64 insertions(+), 99 deletions(-) diff --git a/App.vue b/App.vue index e20e4972..39c9dc99 100644 --- a/App.vue +++ b/App.vue @@ -1411,7 +1411,7 @@ get_application_logo() { var logo = this.data.application_logo || null; if (logo == null) { - logo = this.get_config('config.home_site_logo_wap'); + logo = this.get_config('config.home_site_logo_app'); } return logo; }, @@ -1901,6 +1901,17 @@ } // #endif }, + + // 计算文本宽度 + string_width(value) { + var width = 0; + var reg = /^[A-Za-z0-0]+$/; + var arr = value.split(''); + for(var i in arr) { + width += reg.test(arr[i]) ? 34 : 50; + } + return width; + } }, // 初始化完成时触发(全局只触发一次) onLaunch(params) {}, diff --git a/components/search/search.vue b/components/search/search.vue index d409dca0..be7d1a13 100644 --- a/components/search/search.vue +++ b/components/search/search.vue @@ -2,7 +2,7 @@ - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + @@ -49,16 +39,6 @@ - - - - - - - - - -