|
|
@@ -1,25 +1,67 @@
|
|
|
<template>
|
|
|
- <view class="agreement-box">
|
|
|
+ <view class="agreement-box" @touchmove.stop.prevent="moveHandle">
|
|
|
<view class="input-agreement animate__animated" :class="{'animate__shakeX':consentShake}" @click="setIsConsent" >
|
|
|
<image class="agreement-agree" v-if="isConsent" src="/static/img/login/Checked1@3x.png" mode="aspectFill"></image>
|
|
|
<image class="agreement-agree" v-else src="/static/img/login/Checked2@3x.png" mode="aspectFill"></image>
|
|
|
<view class="agreement-text text-color-666 sys-size-24">已阅读并同意</view>
|
|
|
- <view class="agreement-text text-color-dominant sys-size-24">《隐私政策》</view>
|
|
|
+ <view class="agreement-text text-color-dominant sys-size-24" @click.stop="showContent">《隐私政策》</view>
|
|
|
</view>
|
|
|
+ <view >
|
|
|
+ <uni-popup ref="consentObj">
|
|
|
+ <view class="iPhone-padding agreement-data sys-background-fff">
|
|
|
+ <image class="data-title" src="/static/img/login/consent_bg.png" mode="widthFix"></image>
|
|
|
+ <view class="data-content">
|
|
|
+ <scroll-view class="content-box" scroll-y="true" scroll-left="120">
|
|
|
+ <rich-text :nodes="content"></rich-text>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+ <view class="data-but text-color-fff sys-background-dominant sys-size-30 sys-weight-500 sys-radius-100" @click.stop="setConsent()">同意</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </uni-popup>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import tools from "@/service/tools";
|
|
|
+import {getMessage} from "@/api/common";
|
|
|
+
|
|
|
export default {
|
|
|
name:'agreement',
|
|
|
data() {
|
|
|
return {
|
|
|
isConsent:false,
|
|
|
- consentShake:false
|
|
|
+ consentShake:false,
|
|
|
+ content:''
|
|
|
};
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.getMessage()
|
|
|
+ },
|
|
|
methods:{
|
|
|
+ setConsent(){
|
|
|
+ this.isConsent=true
|
|
|
+ this.$emit('input', this.isConsent)
|
|
|
+ this.$refs.consentObj.close('bottom')
|
|
|
+ },
|
|
|
+ async getMessage() {
|
|
|
+ const res = await getMessage({
|
|
|
+ type: 2
|
|
|
+ })
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.content = tools.imgDeal(res.data)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showContent(){
|
|
|
+ this.$refs.consentObj.open('bottom')
|
|
|
+ },
|
|
|
+ moveHandle() {
|
|
|
+ console.log('--------------------------------hhhhhhhhhhhhhh')
|
|
|
+ return false
|
|
|
+ },
|
|
|
setIsConsent(){
|
|
|
this.isConsent=!this.isConsent
|
|
|
this.$emit('input', this.isConsent)
|
|
|
@@ -52,6 +94,25 @@ export default {
|
|
|
margin-left: 18rpx;
|
|
|
}
|
|
|
}
|
|
|
+ .agreement-data{
|
|
|
+ border-radius: 30rpx 30rpx 0 0;
|
|
|
+ .data-title{
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 30rpx 30rpx 0 0;
|
|
|
+ }
|
|
|
+ .data-content{
|
|
|
+ padding: 20rpx 40rpx;
|
|
|
+ .content-box{
|
|
|
+ height: 600rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .data-but{
|
|
|
+ height: 96rpx;
|
|
|
+ line-height: 96rpx;
|
|
|
+ text-align: center;
|
|
|
+ margin: 0 75rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
</style>
|