上架2.0.01版本,增加会员协议功能
This commit is contained in:
@@ -99,7 +99,25 @@
|
||||
</view>
|
||||
</template>
|
||||
</common-goods-nav>
|
||||
<view class="agree_wo">
|
||||
<radio-group class="agree">
|
||||
<view v-for="(item, index) in argee" :key="index">
|
||||
<radio class="agreeRadio" :value="item.id" :checked="item.id == radioValue" color="#7dc1f0"
|
||||
@click="radioCheck(index)"></radio>
|
||||
</view>
|
||||
</radio-group>
|
||||
<view>* 我已阅读并同意<span class="highlight" @click="showXieyi">《会员服务协议》</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 会员协议 -->
|
||||
<u-popup :show="xieyiShow" :round="10" @close="xieyiShow = false">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">{{ xieyi.title }}</view>
|
||||
<view style="max-height: 1000rpx; overflow-y: scroll">
|
||||
<view v-html="xieyi.content"></view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -220,6 +238,14 @@
|
||||
color: "#fff",
|
||||
}, ],
|
||||
activeIndex: 0, //选择付款 下标
|
||||
|
||||
argee: [{value: false, id: "1"}], // 同意权限
|
||||
radioValue: "",
|
||||
xieyi: {
|
||||
title: "",
|
||||
content: "",
|
||||
},
|
||||
xieyiShow: false,
|
||||
};
|
||||
},
|
||||
created(){
|
||||
@@ -371,6 +397,14 @@
|
||||
setTimeout(() => {
|
||||
this.nowClick = true;
|
||||
}, 5000);
|
||||
|
||||
if(that.radioValue!='1'){
|
||||
uni.showToast({
|
||||
title: "请勾选 已阅读会员服务协议",
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let xiaBiao = [];
|
||||
if (this.payType == 4 && this.initData.user.peanutCoin < this.dataInfo.lastFee) {
|
||||
uni.showToast({
|
||||
@@ -689,6 +723,32 @@
|
||||
this.twoCateList = [];
|
||||
this.curTwoCateIndex = 0;
|
||||
},
|
||||
|
||||
//勾选会员协议
|
||||
radioCheck(index) {
|
||||
this.argee.forEach((item) => {
|
||||
item.isCheck = false;
|
||||
});
|
||||
if (this.radioValue == this.argee[index].id) {
|
||||
this.radioValue = null;
|
||||
} else {
|
||||
this.radioValue = this.argee[index].id;
|
||||
}
|
||||
},
|
||||
//会员协议
|
||||
async showXieyi() {
|
||||
var data = await this.$commonJS.getAgreement(107);
|
||||
if (data.content) {
|
||||
data.content = data.content.replace(
|
||||
/<h5>/g,
|
||||
'<view style="font-weight: bold;font-size: 32rpx;margin-top: 20rpx;margin-bottom: 20rpx;">'
|
||||
);
|
||||
data.content = data.content.replace(/<\/h5>/g, "</view>");
|
||||
}
|
||||
|
||||
this.xieyi = data;
|
||||
this.xieyiShow = true;
|
||||
},
|
||||
},
|
||||
onBackPress() {
|
||||
// #ifdef APP-PLUS
|
||||
@@ -1262,4 +1322,35 @@
|
||||
border:1rpx solid #ff1f00;
|
||||
color: #ff1f00;
|
||||
}
|
||||
.agree_wo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
color: #aaa;
|
||||
line-height: 30rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 10rpx 10rpx 20rpx 0;
|
||||
}
|
||||
.agreeRadio {
|
||||
zoom: 0.8;
|
||||
}
|
||||
.agree {
|
||||
width: auto !important;
|
||||
}
|
||||
.highlight {
|
||||
color: $uni-color-primary;
|
||||
}
|
||||
|
||||
.tanchu {
|
||||
padding: 40rpx 30rpx 40rpx 30rpx;
|
||||
position: relative;
|
||||
|
||||
.dp_title {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 50rpx;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user