From 0e198534be67983111bd8f36a472c5cec2108e30 Mon Sep 17 00:00:00 2001 From: yanyilin Date: Sat, 26 Oct 2024 16:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E9=9A=90=E7=A7=81=E6=94=BF=E7=AD=96?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E7=A4=BA=E4=BE=8B=E5=85=A5=E5=8F=A3=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=88=B0button=E5=92=8Cprivacy=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/privacy/privacy.uvue | 8 ++++++++ pages/component/button/button.uvue | 10 +++++++++- pages/tabBar/API.uvue | 8 ++------ pages/tabBar/generateMenu.uts | 13 +------------ 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/pages/API/privacy/privacy.uvue b/pages/API/privacy/privacy.uvue index c21ed220..6e0b620f 100644 --- a/pages/API/privacy/privacy.uvue +++ b/pages/API/privacy/privacy.uvue @@ -15,6 +15,9 @@ + @@ -63,6 +66,11 @@ }, resetPrivacyAuthorization(){ uni.resetPrivacyAuthorization() + }, + openPrivacyDialog(){ + uni.openDialogPage({ + url: '/pages/component/button/privacy', + }) } } } diff --git a/pages/component/button/button.uvue b/pages/component/button/button.uvue index 30f43790..8aa7f219 100644 --- a/pages/component/button/button.uvue +++ b/pages/component/button/button.uvue @@ -38,6 +38,11 @@ uni.navigateTo({ url: 'buttonstatus', }) + }, + openPrivacyDialog() { + uni.openDialogPage({ + url: '/pages/component/button/privacy', + }) }, //用于自动化测试 checkUniButtonElement() : boolean { @@ -71,7 +76,10 @@ - + + + + diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue index ea687b48..8ac278c1 100644 --- a/pages/tabBar/API.uvue +++ b/pages/tabBar/API.uvue @@ -79,11 +79,7 @@ goPage(url : string) { if (url == '/set-tab-bar') { this.showPop() - }else if (url == '/show-privacy-dialog') { - uni.openDialogPage({ - url: '/pages/component/button/privacy', - }) - } else { + }else { if (this.hasLeftWin) { uni.reLaunch({ url }) } else { @@ -137,4 +133,4 @@ display: none; background-color: rgba(16, 16, 16, 0.5); } - + diff --git a/pages/tabBar/generateMenu.uts b/pages/tabBar/generateMenu.uts index 61e33409..85db1e2e 100644 --- a/pages/tabBar/generateMenu.uts +++ b/pages/tabBar/generateMenu.uts @@ -158,16 +158,5 @@ function addSetTabBarPage(menuItem : MenuItem) { group: null, items: [] } as MenuItem) - menuItem.items.push({ - id: 'show-privacy-dialog', - name: '隐私政策', - index: 0, - path: 'show-privacy-dialog', - style: { - navigationBarTitleText: '隐私政策弹框' - }, - group: null, - items: [] - } as MenuItem) } -} +} -- GitLab