|
@@ -2,8 +2,8 @@
|
|
|
<view class="red_packet" catchtouchmove="true">
|
|
|
<image src="../../static/icon/red_packet_background.jpg" class="read_packet_background" />
|
|
|
<view class="rule" @click="showRule">活动规则</view>
|
|
|
- <view class="get_content">
|
|
|
- <view class="custom_button"> 立即领取 </view>
|
|
|
+ <view class="get_content" v-if="!showReward">
|
|
|
+ <view class="custom_button" @click="showRectangle"> 立即领取 </view>
|
|
|
<text>点击领取后,红包将自动到账余额</text>
|
|
|
</view>
|
|
|
<uni-popup ref="lotteryRule" type="center">
|
|
@@ -17,6 +17,13 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
+ <div :class="['rectangle', { show: showReward }]">
|
|
|
+ <image src="../../static/icon/red_packet_bottom.png" class="read_packet_background" />
|
|
|
+ <view class="text_content">
|
|
|
+ <view> <text style="font-size: 50rpx; font-weight: bold">8.88 </text>元 </view>
|
|
|
+ <view style="margin-top: 20rpx; color: #02a7f0" @click="_goWithdraw">已存入余额,去提现</view>
|
|
|
+ </view>
|
|
|
+ </div>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -24,6 +31,7 @@
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
const lotteryRule = ref();
|
|
|
+const showReward = ref(false);
|
|
|
|
|
|
const closeRule = () => {
|
|
|
lotteryRule.value.close();
|
|
@@ -32,6 +40,16 @@ const closeRule = () => {
|
|
|
const showRule = () => {
|
|
|
lotteryRule.value.open("center");
|
|
|
};
|
|
|
+
|
|
|
+const showRectangle = () => {
|
|
|
+ showReward.value = true;
|
|
|
+};
|
|
|
+
|
|
|
+const _goWithdraw = () => {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: "/pages/user/withdraw",
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -143,5 +161,23 @@ const showRule = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .rectangle {
|
|
|
+ width: 100%;
|
|
|
+ height: 250px;
|
|
|
+ position: absolute;
|
|
|
+ bottom: -250px; /* 初始位置在视图之外 */
|
|
|
+ left: 0;
|
|
|
+ transition: bottom 1s ease; /* 添加过渡效果 */
|
|
|
+ &.show {
|
|
|
+ bottom: 0; /* 目标位置 */
|
|
|
+ }
|
|
|
+ .text_content {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -35%);
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|