diff --git a/pages/togoin/togoin.js b/pages/togoin/togoin.js index 2f09226..394568e 100644 --- a/pages/togoin/togoin.js +++ b/pages/togoin/togoin.js @@ -64,6 +64,14 @@ Page({ //-- 会员授权 -- bindGetUserInfo: function(ee) { + + if(!this.data.isAgree) { + wx.showToast({ + title: '请先勾选同意协议', + icon: 'none', + }); + return false; + } var that = this; //-- 点击授权 -- that.getUserProfile(function(res){ @@ -286,7 +294,30 @@ Page({ close_pop_back:function(){ this.close_pop(); wx.navigateBack({ delta: 1}) - } + }, + + + // 是否同意协议 + isAgree(e) { + let isAgree = null; + if(e.detail.value[0]) { + isAgree = true; + } else { + isAgree = false; + }; + // this.data.isAgree = isAgree; + this.setData({ + isAgree, + }); + }, + + + //通过路径跳转到其他页面 + goto: function(e) { + console.log('xxxx', e); + var url = e.currentTarget.dataset.url; + getApp().goto(url); + }, diff --git a/pages/togoin/togoin.wxml b/pages/togoin/togoin.wxml index 6973d20..67d1786 100644 --- a/pages/togoin/togoin.wxml +++ b/pages/togoin/togoin.wxml @@ -2,7 +2,7 @@ - + @@ -14,6 +14,13 @@ + + + + + + 我已阅读同意 《用户使用协议》《隐私政策》 + diff --git a/pages/togoin/togoin.wxss b/pages/togoin/togoin.wxss index 4563ed4..cc8ac75 100644 --- a/pages/togoin/togoin.wxss +++ b/pages/togoin/togoin.wxss @@ -4,7 +4,7 @@ page{ } .logins { width: 100%; - padding-bottom: 130rpx; + /* padding-bottom: 130rpx; */ background-position: center; background-repeat: no-repeat; background-size: cover @@ -26,7 +26,7 @@ page{ border-radius: 48rpx; color: rgb(255,255,255); font-size: 32rpx; - margin-top:150rpx; + margin-top: 40rpx; } .we_chat{ width: 55rpx; @@ -65,3 +65,9 @@ button{ .middle_view{ position: absolute; left: 0; width: 100%; text-align: center; } + +/*checkbox 选项框大小 */ +checkbox .wx-checkbox-input { + width: 30rpx; + height: 30rpx; +}