feat(custom): 新增游戏内界面规则弹窗
This commit is contained in:
@@ -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