flyx/components/buy-notice/buy-notice.vue
2024-07-07 16:19:19 +08:00

155 lines
2.8 KiB
Vue

<!--
* @Date: 2023-11-21 09:31:27
* @LastEditTime: 2023-12-02 11:28:07
* @Description: content
-->
<template>
<uni-popup ref="_buy_notice" type="center">
<view
class="_buy_notice">
<view class="_buy_notice_hd center">平台消费规则</view>
<scroll-view class="_buy_notice_bd" scroll-y>
<view v-html="ruleData.content"></view>
</scroll-view>
<view @click="isAgree = !isAgree" class="_buy_notice_agree">
<view class="check icon">
<image
v-if="isAgree"
:src="$img1('common/check_act.png')"
lazy-load
></image>
<image v-else :src="$img1('common/check.png')" lazy-load></image>
</view>
不再弹出消费规则
</view>
<view class="_buy_notice_ft">
<view class="_buy_notice_ft_btn" @click="close">退出</view>
<view class="_buy_notice_ft_btn confirm" @click="confirm">
<text>同意规则并继续支付</text>
</view>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
data() {
return {
isAgree: false,
ruleData: ''
}
},
methods: {
confirm() {
this.close()
if (this.isAgree) {
uni.setStorageSync('_agree_buy_notice', true)
}
this.$emit('confirm')
},
close() {
this.$refs._buy_notice.close()
},
open(opt) {
this.ruleData = opt
this.$refs._buy_notice.open()
},
async getRule(id, title = '') {
let res = await this.$c.getRule(id, true)
this.open({
title: title,
content: res.data
})
}
}
}
</script>
<style lang="scss">
._buy_notice {
width: 650rpx;
background: #313133;
border-radius: 30rpx;
._buy_notice_hd {
height: 140rpx;
font-size: 50rpx;
font-family: YouSheBiaoTiHei;
color: #FFFFFF;
}
._buy_notice_bd {
height: 400rpx;
width: 570rpx;
margin: 0 auto;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
._buy_notice_agree {
margin-top: 30rpx;
padding: 0 40rpx;
display: flex;
.check {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #d0d1ff;
line-height: 32rpx;
}
._buy_notice_ft {
height: 90rpx;
display: flex;
border-top: 1rpx solid #333;
margin-top: 30rpx;
._buy_notice_ft_btn {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #dddddd;
}
.confirm {
border-left: 1rpx solid #333;
text {
color: transparent;
background: #F6C0FF;
background-clip: text;
}
}
}
}
.common_bg {
}
</style>