Commit 7efaa0a2 authored by raca's avatar raca
parents 218aa7e7 c71f181b
......@@ -127,7 +127,7 @@ const GameCompleteHead = () => {
const text = useMemo(() => {
const { text: _text, second, color } = getLevelText(gameResult?.level)
if (getWeight(gameResult?.levelBefore) < getWeight(gameResult?.level)) {
if (gameResult?.levelBefore !== null) {
return { text: second, color }
}
return { text: _text, color }
......
......@@ -5,8 +5,8 @@
display: flex;
align-items: center;
box-sizing: border-box;
z-index: 1;
box-shadow: 0 1px 14px rgba(0, 81, 231, 0.1);
z-index: 20;
box-shadow: 0 1px 14px rgba(0, 81, 231, .5);
position: relative;
overflow: hidden;
......
......@@ -5,11 +5,22 @@ import { useFocus } from '@/hooks'
import {
usePageScroll, createIntersectionObserver, getCurrentInstance,
getMenuButtonBoundingClientRect, IntersectionObserver, nextTick,
createInnerAudioContext
createInnerAudioContext, onAppHide, onAppShow
} from '@tarojs/taro'
import audio from '@/assets/oss/assets-audio'
let isHide = false
onAppHide(() => {
isHide = true
})
onAppShow(() => {
isHide = false
})
function palyAudio (src: string) {
if (isHide) return
// @ts-ignore
const innerAudioContext = createInnerAudioContext({ useWebAudioImplement: true })
innerAudioContext.src = src
......
......@@ -36,7 +36,7 @@ const StudyMarket = () => {
const list: ExchangeGoods[] = useMemo(() => {
return [
{
title: '答题卡',
title: '道具',
subTitle: '答题卡',
description: '答题卡是不断追求更高档位与排名的必备道具',
price: setting.pointToCard,
......@@ -45,7 +45,7 @@ const StudyMarket = () => {
},
{
title: '月度神秘大礼',
title: '礼品屋',
subTitle: '神秘大礼',
description: '兑换神秘大礼,线下领取超级大礼',
price: 1000,
......@@ -71,7 +71,7 @@ const StudyMarket = () => {
const pric = item.price
let disabledText = '积分不足'
let disabled = point < pric || (item.stock !== null && item.stock < 1)
if (item.title === '月度神秘大礼') {
if (item.subTitle === '神秘大礼') {
disabled = true
if (point >= pric) {
disabledText = '敬请期待'
......
import { createInnerAudioContext } from '@tarojs/taro'
import { createInnerAudioContext, onAppHide, onAppShow } from '@tarojs/taro'
const innerAudioContext = createInnerAudioContext()
let isHide = false
onAppHide(() => {
isHide = true
innerAudioContext.pause()
})
onAppShow(() => {
isHide = false
})
export function palyAudio (src: string) {
innerAudioContext.src = src
if (!isHide) {
innerAudioContext.play()
}
return innerAudioContext
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment