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