From 6d9652287b1aaf1fbb2423921b4ea036839c5a74 Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Tue, 31 Oct 2023 14:26:06 +0800 Subject: [PATCH] fix:小程序分享功能 --- pages/login/login.vue | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index 04a8c27..4a89982 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -29,6 +29,7 @@ <u-button @click="submit">������</u-button> </view> </view> + <ws-wx-privacy id="privacy-popup" enableAutoProtocol></ws-wx-privacy> </view> </template> <script> @@ -44,6 +45,7 @@ export default { data() { return { + titlePrivacy: '������������������������', labelStyle: { color: '#fff' }, @@ -81,9 +83,23 @@ uni.hideHomeButton() }, methods: { + doRequire() { + uni.requirePrivacyAuthorize({ + success: () => { + console.log('������') + // ������������������ + // ��������������������� + this.getlogin() + }, + fail: () => { + console.log('������') + }, // ������������������ + complete: () => {} + }) + }, submit() { this.$refs.uForm.validate().then(res => { - this.getlogin() + this.doRequire() }).catch(errors => {}) }, //������ @@ -92,7 +108,6 @@ console.log('openId', value) if (value) { this.logining(value) - console.log('openId', openId) } }, logining(openId) { -- Gitblit v1.8.0