上架2.0.01版本,增加会员协议功能

This commit is contained in:
liuyuan
2025-03-26 14:29:31 +08:00
parent b5d626fcf5
commit 539895f210
2 changed files with 93 additions and 2 deletions

View File

@@ -12,8 +12,8 @@
"src" : "图片路径" "src" : "图片路径"
} }
], ],
"versionName" : "1.0.65", "versionName" : "2.0.1",
"versionCode" : 1065, "versionCode" : 2001,
"app-plus" : { "app-plus" : {
"nvueCompiler" : "uni-app", "nvueCompiler" : "uni-app",
"compatible" : { "compatible" : {

View File

@@ -99,7 +99,25 @@
</view> </view>
</template> </template>
</common-goods-nav> </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> </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> </view>
</template> </template>
@@ -220,6 +238,14 @@
color: "#fff", color: "#fff",
}, ], }, ],
activeIndex: 0, //选择付款 下标 activeIndex: 0, //选择付款 下标
argee: [{value: false, id: "1"}], // 同意权限
radioValue: "",
xieyi: {
title: "",
content: "",
},
xieyiShow: false,
}; };
}, },
created(){ created(){
@@ -371,6 +397,14 @@
setTimeout(() => { setTimeout(() => {
this.nowClick = true; this.nowClick = true;
}, 5000); }, 5000);
if(that.radioValue!='1'){
uni.showToast({
title: "请勾选 已阅读会员服务协议",
icon: "none",
});
return false;
}
let xiaBiao = []; let xiaBiao = [];
if (this.payType == 4 && this.initData.user.peanutCoin < this.dataInfo.lastFee) { if (this.payType == 4 && this.initData.user.peanutCoin < this.dataInfo.lastFee) {
uni.showToast({ uni.showToast({
@@ -689,6 +723,32 @@
this.twoCateList = []; this.twoCateList = [];
this.curTwoCateIndex = 0; 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() { onBackPress() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
@@ -1262,4 +1322,35 @@
border:1rpx solid #ff1f00; border:1rpx solid #ff1f00;
color: #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> </style>