feat(custom): 新增游戏内界面规则弹窗
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
// background-color: #f5f5f5 !important;
|
||||
// }
|
||||
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
// body {
|
||||
// line-height: 1;
|
||||
// }
|
||||
|
||||
.mt-15 {
|
||||
margin-top: 15px;
|
||||
|
||||
35
src/components/Popup.vue
Normal file
35
src/components/Popup.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<view class="mask" v-if="show" @click="isShowFn">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const emits = defineEmits(['isShow'])
|
||||
|
||||
const isShowFn = () => {
|
||||
emits('isShow')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -555,3 +555,10 @@ body {
|
||||
width: 700px;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
background-color: #fff;
|
||||
width: 70%;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
import Taro from '@tarojs/taro'
|
||||
import Lottie from 'lottie-web'
|
||||
import HPopup from '../../../components/Popup.vue'
|
||||
import * as dayjs from 'dayjs'
|
||||
import dan from '../../../static/dan.png'
|
||||
import he from '../../../static/he.png'
|
||||
@@ -380,6 +381,13 @@ onBeforeUnmount(() => {
|
||||
clearInterval(time_i.value)
|
||||
innerAudioContext.stop()
|
||||
})
|
||||
|
||||
const showPopup = ref(false)
|
||||
const game_info = ref<any>({})
|
||||
|
||||
Taro.useDidShow(() => {
|
||||
game_info.value = Taro.getStorageSync('gameItem')
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -406,7 +414,7 @@ onBeforeUnmount(() => {
|
||||
<view class="dz-bg"></view>
|
||||
<view class="text">{{ user_info.pulse || 0 }}</view>
|
||||
</view>
|
||||
<view class="rule-btn"></view>
|
||||
<view class="rule-btn" @click="showPopup = true"></view>
|
||||
</view>
|
||||
<view class="kj-box">
|
||||
<text class="title">第{{ list[0]?.preDrawIssue || 0 }}期已开奖</text>
|
||||
@@ -472,5 +480,11 @@ onBeforeUnmount(() => {
|
||||
</view>
|
||||
</view>
|
||||
<view id="lottie" v-show="isLottie"></view>
|
||||
<!-- 弹窗 -->
|
||||
<HPopup :show="showPopup" @isShow="showPopup = false">
|
||||
<view class="popup-content">
|
||||
<rich-text :nodes="game_info.introduction"></rich-text>
|
||||
</view>
|
||||
</HPopup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -47,3 +47,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
background-color: #fff;
|
||||
width: 70%;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -555,3 +555,10 @@ body {
|
||||
width: 700px;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
background-color: #fff;
|
||||
width: 70%;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import { onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
import Taro from '@tarojs/taro'
|
||||
import Lottie from 'lottie-web'
|
||||
import * as dayjs from 'dayjs'
|
||||
import HPopup from '../../../components/Popup.vue'
|
||||
import dan from '../../../static/dan.png'
|
||||
import he from '../../../static/he.png'
|
||||
import shuang from '../../../static/shuang.png'
|
||||
@@ -424,6 +425,13 @@ onBeforeUnmount(() => {
|
||||
ws.value?.close()
|
||||
innerAudioContext.stop()
|
||||
})
|
||||
|
||||
const showPopup = ref(false)
|
||||
const game_info = ref<any>({})
|
||||
|
||||
Taro.useDidShow(() => {
|
||||
game_info.value = Taro.getStorageSync('gameItem')
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -450,7 +458,7 @@ onBeforeUnmount(() => {
|
||||
<view class="dz-bg"></view>
|
||||
<view class="text">{{ user_info.pulse || 0 }}</view>
|
||||
</view>
|
||||
<view class="rule-btn"></view>
|
||||
<view class="rule-btn" @click="showPopup = true"></view>
|
||||
</view>
|
||||
<view class="kj-box">
|
||||
<text class="title">第{{ list[0]?.Periods || 0 }}期已开奖</text>
|
||||
@@ -518,5 +526,12 @@ onBeforeUnmount(() => {
|
||||
</view>
|
||||
</view>
|
||||
<view id="lottie" v-show="isLottie"></view>
|
||||
|
||||
<!-- 弹窗 -->
|
||||
<HPopup :show="showPopup" @isShow="showPopup = false">
|
||||
<view class="popup-content">
|
||||
<rich-text :nodes="game_info.introduction"></rich-text>
|
||||
</view>
|
||||
</HPopup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user