From 5fecc9e46d448df3de987504440c4fdd582f858e Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Tue, 31 Oct 2023 10:35:40 +0800 Subject: [PATCH] fix:小程序秒级数据和登录授权 --- pages/login/login.vue | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index 04a8c27..97bcf15 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 => {}) }, //������ -- Gitblit v1.8.0