Commit 78b14be0 authored by Facius's avatar Facius

feat: 用户协议和隐私政策

parent 0ec66805
......@@ -44,6 +44,26 @@
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
"path": "user-agreement",
"name": "user-agreement",
"style": {
"navigationBarTitleText": "用户协议",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
"path": "privacy-policy",
"name": "privacy-policy",
"style": {
"navigationBarTitleText": "隐私政策",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"disableScroll": true
}
}
]
},
......
......@@ -37,6 +37,12 @@
绑定手机
</button>
</view>
<view class="agreen u-flex">
<view class="check-view" @click="handleClickAgreen">
<view :class="['check-icon', {'checked': agreen}]"><u-icon v-if="agreen" name="checkmark-circle" size="30" color="#3878FF"></u-icon></view>
<view>我已阅读并同意 <text @click.stop="handleClick('user-agreement')" hover-class="u-hover-class" class="rule">《用户服务协议》</text>和<text @click.stop="handleClick('privacy-policy')" hover-class="u-hover-class" class="rule">《隐私政策》</text></view>
</view>
</view>
</view>
<view>
<u-toast ref="uToast" />
......@@ -52,6 +58,7 @@ export default {
host: '', //配置为自己的额服务器即可
returnUrl: '', //跳回页面
needAuth: true,
agreen: false
}
},
computed: {
......@@ -74,6 +81,10 @@ export default {
},
// 微信登录
wxLogin() {
if (!this.agreen) {
this.$u.toast('请阅读并同意《用户服务协议》和《隐私政策》');
return;
}
// 获取code 小程序专有,用户登录凭证。
uni.getUserProfile({
desc: '获取用户基本资料',
......@@ -149,6 +160,10 @@ export default {
},
// 绑定手机
getphonenumber(e) {
if (!this.agreen) {
this.$u.toast('请阅读并同意《用户服务协议》和《隐私政策》');
return;
}
if (e && e.detail) {
if (e.detail.errMsg.indexOf('user deny') > -1) {
uni.hideLoading()
......@@ -236,11 +251,19 @@ export default {
console.log(err)
})
},
handleClickAgreen() {
this.agreen = !this.agreen
},
handleClick(path) {
this.$u.route({
url: '/pages/login/' + path,
})
}
},
}
</script>
<style>
<style scoped lang="scss">
::-webkit-scrollbar {
width: 0;
height: 0;
......@@ -266,11 +289,11 @@ export default {
/* justify-content: center; */
}
.text-area {
display: flex;
justify-content: center;
position: relative;
// display: flex;
// justify-content: center;
// position: relative;
position: fixed;
bottom: 100rpx;
bottom: 160rpx;
}
.bottom {
width: 600rpx;
......@@ -307,4 +330,36 @@ export default {
.view-image {
padding-top: 200rpx;
}
.agreen {
position: fixed;
bottom: 44rpx;
color: #8D8D8D;
font-size: 24rpx;
text-align: center;
margin-bottom: 36rpx;
justify-content: center;
margin-top: 24rpx;
.check-view {
display: flex;
justify-content: center;
align-items: center;
padding: 16rpx 20rpx;
.check-icon {
width: 28rpx;
height: 28rpx;
border: 2rpx solid #cccccc;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
margin-right: 16rpx;
&.checked {
border-width: 0;
}
}
.rule {
color: #3878FF;
}
}
}
</style>
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment