Commit a40d227e authored by Facius's avatar Facius

feat: 会员服务协议

parent c39447a5
Pipeline #7854 canceled with stages
......@@ -18,6 +18,16 @@
</view>
</view>
<view class="botton-view">
<view class="agree-view" @tap="handleClickAgree">
<view class="icon-view">
<view class="check-circle-view" v-if="!agree"></view>
<icon v-else class="icon-small" type="success" size="18" color="#02a074"></icon>
</view>
<view class="agree-text-view">
我已阅读并同意
<text class="name-text" @tap.stop.prevent="handleClickAgreement" data-type="protocol">《会员服务协议》</text>
</view>
</view>
<button class="buy-button" @tap="handleClickBuy">立即购买</button>
</view>
</view>
......@@ -35,6 +45,7 @@
data() {
return {
show: false,
agree: false,
list: [ {
image: '/static/image/mine/zhifubaozhifu@3x.png',
title: '支付宝',
......@@ -84,6 +95,14 @@
this.changeVisibleValue(false)
},
handleClickBuy() {
if (!this.agree) {
uni.showToast({
title: '请阅读并同意《会员服务协议》',
icon: 'none',
duration: 2000
});
return
}
for (var item of this.list) {
if (item.select) {
this.$emit('buy', item)
......@@ -91,6 +110,14 @@
break
}
}
},
handleClickAgree() {
this.agree = !this.agree
},
handleClickAgreement() {
uni.navigateTo({
url: '/pages/login/agreement/agreement?type=vip'
});
}
},
}
......@@ -157,7 +184,30 @@
.botton-view {
margin-top: 220rpx;
.agree-view {
font-size: 28rpx;
color: #8d8d8d;
display: flex;
align-items: center;
.check-circle-view {
border-radius: 50%;
border: 2rpx solid $default-color;;
width: 36rpx;
height: 36rpx;
}
.icon-view {
width: 56rpx;
height: 56rpx;
display: flex;
justify-content: center;
align-items: center;
}
.agree-text-view {
}
.name-text {
color: $default-color;;
}
}
.buy-button {
background-color: $default-color;
border-radius: 16rpx;
......
......@@ -10,6 +10,7 @@ export default {
webUrl:"",
protocol:"https://api-book.kaying.cc/protocol.html",//用户协议
policy:"https://api-book.kaying.cc/policy.html",//隐私政策
vip: 'https://api-book.kaying.cc/vip_protocol.html', // 会员服务协议
};
},
onLoad(options) {
......@@ -21,6 +22,9 @@ export default {
}else if(options.type==="policy"){
this.webUrl=this.policy
title="隐私政策"
} else if (options.type == 'vip') {
this.webUrl=this.vip
title="会员服务协议"
}
uni.setNavigationBarTitle({
title
......
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