|
@@ -1,15 +1,38 @@
|
|
<template>
|
|
<template>
|
|
<view class="red_packet" catchtouchmove="true">
|
|
<view class="red_packet" catchtouchmove="true">
|
|
<image src="../../static/icon/red_packet_background.jpg" class="read_packet_background" />
|
|
<image src="../../static/icon/red_packet_background.jpg" class="read_packet_background" />
|
|
- <view class="rule">活动规则</view>
|
|
|
|
|
|
+ <view class="rule" @click="showRule">活动规则</view>
|
|
<view class="get_content">
|
|
<view class="get_content">
|
|
<view class="custom_button"> 立即领取 </view>
|
|
<view class="custom_button"> 立即领取 </view>
|
|
<text>点击领取后,红包将自动到账余额</text>
|
|
<text>点击领取后,红包将自动到账余额</text>
|
|
</view>
|
|
</view>
|
|
|
|
+ <uni-popup ref="lotteryRule" type="center">
|
|
|
|
+ <view class="lottery_rule_box">
|
|
|
|
+ <view class="lottery_rule_title">
|
|
|
|
+ <text>活动规则</text>
|
|
|
|
+ <view class="close_btn" @click="closeRule"> X </view>
|
|
|
|
+ </view>
|
|
|
|
+ <scroll-view class="lottery_rule_info" scroll-y="true">
|
|
|
|
+ <rich-text nodes="lotteryInfo.rule" class="rich_text"></rich-text>
|
|
|
|
+ </scroll-view>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script></script>
|
|
|
|
|
|
+<script setup>
|
|
|
|
+import { ref } from "vue";
|
|
|
|
+
|
|
|
|
+const lotteryRule = ref();
|
|
|
|
+
|
|
|
|
+const closeRule = () => {
|
|
|
|
+ lotteryRule.value.close();
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const showRule = () => {
|
|
|
|
+ lotteryRule.value.open("center");
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
.red_packet {
|
|
.red_packet {
|
|
@@ -58,27 +81,67 @@
|
|
border: 2px solid transparent;
|
|
border: 2px solid transparent;
|
|
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
|
|
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
|
|
position: relative;
|
|
position: relative;
|
|
|
|
+ &:before,
|
|
|
|
+ &:after {
|
|
|
|
+ content: "";
|
|
|
|
+ position: absolute;
|
|
|
|
+ width: 24px;
|
|
|
|
+ height: 24px;
|
|
|
|
+ background-color: #fbe6a0;
|
|
|
|
+ border: 2px solid #fbe6a0;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ top: 50%;
|
|
|
|
+ transform: translateY(-50%);
|
|
|
|
+ }
|
|
|
|
+ &:before {
|
|
|
|
+ left: -6px;
|
|
|
|
+ }
|
|
|
|
+ &:after {
|
|
|
|
+ right: -6px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
- .custom_button:before,
|
|
|
|
- .custom_button:after {
|
|
|
|
- content: "";
|
|
|
|
- position: absolute;
|
|
|
|
- width: 24px;
|
|
|
|
- height: 24px;
|
|
|
|
- background-color: #fbe6a0;
|
|
|
|
- border: 2px solid #fbe6a0;
|
|
|
|
|
|
+ .lottery_rule_box {
|
|
|
|
+ width: 500rpx;
|
|
|
|
+ display: block;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ background-color: #fc335f;
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+ line-height: 50rpx;
|
|
border-radius: 10rpx;
|
|
border-radius: 10rpx;
|
|
- top: 50%;
|
|
|
|
- transform: translateY(-50%);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .custom_button:before {
|
|
|
|
- left: -6px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .custom_button:after {
|
|
|
|
- right: -6px;
|
|
|
|
|
|
+ padding: 20rpx 25rpx 20rpx;
|
|
|
|
+ .lottery_rule_title {
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ height: 60rpx;
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-bottom: 10rpx;
|
|
|
|
+ .close_btn {
|
|
|
|
+ float: right;
|
|
|
|
+ width: 40rpx;
|
|
|
|
+ height: 40rpx;
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ margin-top: 9rpx;
|
|
|
|
+ line-height: 40rpx;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ border: 1rpx solid #ffffff;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .lottery_rule_info {
|
|
|
|
+ display: block;
|
|
|
|
+ height: 500rpx;
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ line-height: 40rpx;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ padding: 20rpx;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ background-color: #ffffff;
|
|
|
|
+ .rich_text {
|
|
|
|
+ white-space: break-spaces;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|