From 7f922eb1e96e21e72fccc651167348021af039d2 Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Mon, 13 Nov 2023 08:53:22 +0800 Subject: [PATCH] fix:小程序详情修改 --- pages/login/login.vue | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index 04a8c27..d253f90 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> @@ -41,9 +42,13 @@ httpGet } from '@/utils/http.js' import store from '@/store/index.js' + import { + subScribeMsg + } from '@/utils/subscribe.js' export default { data() { return { + titlePrivacy: '������������������������', labelStyle: { color: '#fff' }, @@ -81,9 +86,33 @@ uni.hideHomeButton() }, methods: { + // ��������������������������� + async aClick() { + let data = await subScribeMsg() + console.log('data', data) + if (data['YNqUZ1MgMvwY3G-NENVbcmIBR5dUotSdnwcz96CWrho'] === 'accept') { // ��������������������� + this.doRequire() + } else { + this.doRequire() + } + }, + doRequire() { + uni.requirePrivacyAuthorize({ + success: () => { + console.log('������') + // ������������������ + // ��������������������� + this.getlogin() + }, + fail: () => { + console.log('������') + }, // ������������������ + complete: () => {} + }) + }, submit() { this.$refs.uForm.validate().then(res => { - this.getlogin() + this.aClick() }).catch(errors => {}) }, //������ @@ -92,7 +121,6 @@ console.log('openId', value) if (value) { this.logining(value) - console.log('openId', openId) } }, logining(openId) { -- Gitblit v1.8.0