From 624036bf0dae17f29fc862c1f8c3dcae1c9c556d Mon Sep 17 00:00:00 2001 From: 396316021 <396316021@qq.com> Date: Mon, 4 Dec 2023 14:12:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9A=90=E7=A7=81=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/Sign/Sign.js | 43 ++++++++++++++++++++++++++++++++++++++-- pages/Sign/Sign.wxml | 47 +++++++++++++++++++++++++++++++++++++++++++- pages/Sign/Sign.wxss | 16 ++++++++++++++- 3 files changed, 102 insertions(+), 4 deletions(-) diff --git a/pages/Sign/Sign.js b/pages/Sign/Sign.js index efaf399..863dbea 100644 --- a/pages/Sign/Sign.js +++ b/pages/Sign/Sign.js @@ -1,3 +1,5 @@ +import until from "../../utils/common"; + let common = getApp().globalData.commonFun; let util = getApp().globalData.utilFun; Page({ @@ -7,7 +9,10 @@ Page({ */ data: { tel:"",//手机号 - password:""// 密码 + password:"",// 密码 + isRead:false, + privateStatus:false, + showPrivate:true, }, /** @@ -15,6 +20,18 @@ Page({ */ onLoad: function(options) { + }, + showTips(){ + until.showTimeToast('请先阅读隐私协议'); + }, + clickPrivate(){ + this.setData({ + isRead:!this.data.isRead + }); + console.log(this.data.isRead) + }, + showPrivate(){ + wx.openPrivacyContract({}); }, // 手机号 tel (e) { @@ -90,11 +107,33 @@ Page({ } }) }, + handleAgreePrivacyAuthorization() { + this.setData({ + privateStatus: false, + showPrivate: false, + }); + }, + showPrivatePopup() { + this.setData({ + showPrivate: true, + }); + }, + handleDisagree() { + this.setData({showPrivate: false}); + }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function() { - + wx.getPrivacySetting({ + success: res => { + console.log("是否需要授权:", res.needAuthorization, "隐私协议的名称为:", res.privacyContractName) + this.setData({privateStatus:res.needAuthorization}) + }, + fail: () => { + }, + complete: () => {}, + }) }, /** diff --git a/pages/Sign/Sign.wxml b/pages/Sign/Sign.wxml index 7258ef0..8d9a5b9 100644 --- a/pages/Sign/Sign.wxml +++ b/pages/Sign/Sign.wxml @@ -10,10 +10,55 @@ - 登录 + 登录 + 登录 + 登录 忘记密码 + + + + + + + 请阅读并同意 + 《小程序隐私协议》 + + + + + + + + + + + + + + 《小程序隐私保护指引》 + + + + 当您点击同意并开始使用产品服务时,即表示你已理解并同意该条款内容,该条款将对您产生法律约束力。如您拒绝,将无法更好的体验产品。 + + + + + + + + + + + + + + + + diff --git a/pages/Sign/Sign.wxss b/pages/Sign/Sign.wxss index b93e313..4c296d7 100644 --- a/pages/Sign/Sign.wxss +++ b/pages/Sign/Sign.wxss @@ -38,4 +38,18 @@ left: 50%; transform: translate(-50%,-90%) } - +.privatePopup{ + position: fixed; + bottom:0rpx; + left:0; + box-sizing:border-box; + width:100%; + height:100%; + background-color:rgba(0,0,0,.5) +} +.privatePopup .popup-box{ + position: absolute; + bottom:30rpx; + border-radius:30rpx; + background-color:#fff; +}