|
@@ -18,7 +18,10 @@
|
|
|
class="return-home"
|
|
class="return-home"
|
|
|
@click="onClickReturnHome"
|
|
@click="onClickReturnHome"
|
|
|
/>
|
|
/>
|
|
|
- <button class="game-rule" />
|
|
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="game-rule"
|
|
|
|
|
+ @click="isShowRule = true"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 卡牌列表 -->
|
|
<!-- 卡牌列表 -->
|
|
|
<div
|
|
<div
|
|
@@ -87,6 +90,12 @@
|
|
|
:bonus-count="bonusPoint"
|
|
:bonus-count="bonusPoint"
|
|
|
@replay="replay"
|
|
@replay="replay"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <GameRule
|
|
|
|
|
+ v-show="isShowRule"
|
|
|
|
|
+ game-title="企业翻翻看"
|
|
|
|
|
+ :rich-text="store.state.gameRuleList[2].rtf"
|
|
|
|
|
+ @close="isShowRule=false"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -99,6 +108,7 @@ import dayjs from 'dayjs'
|
|
|
import { shuffle } from 'lodash'
|
|
import { shuffle } from 'lodash'
|
|
|
import PairUpOver from '@/components/PairUpOver.vue'
|
|
import PairUpOver from '@/components/PairUpOver.vue'
|
|
|
import { addScore, getScore } from '@/api.js'
|
|
import { addScore, getScore } from '@/api.js'
|
|
|
|
|
+import GameRule from '@/components/GameRule.vue'
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -109,6 +119,8 @@ const {
|
|
|
windowSizeWhenDesignForRef,
|
|
windowSizeWhenDesignForRef,
|
|
|
} = useSizeAdapt(390, 752)
|
|
} = useSizeAdapt(390, 752)
|
|
|
|
|
|
|
|
|
|
+const isShowRule = ref(false)
|
|
|
|
|
+
|
|
|
function onClickReturnHome() {
|
|
function onClickReturnHome() {
|
|
|
router.push({
|
|
router.push({
|
|
|
name: 'HomeView',
|
|
name: 'HomeView',
|
|
@@ -123,6 +135,9 @@ const isOver = ref(false)
|
|
|
const timeCount = ref(store.state.gameRuleList[2].second)
|
|
const timeCount = ref(store.state.gameRuleList[2].second)
|
|
|
let timeCountIntervalId = null
|
|
let timeCountIntervalId = null
|
|
|
timeCountIntervalId = setInterval(() => {
|
|
timeCountIntervalId = setInterval(() => {
|
|
|
|
|
+ if (isShowRule.value) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
timeCount.value--
|
|
timeCount.value--
|
|
|
if (timeCount.value === 0) {
|
|
if (timeCount.value === 0) {
|
|
|
clearInterval(timeCountIntervalId)
|
|
clearInterval(timeCountIntervalId)
|
|
@@ -160,6 +175,9 @@ function replay() {
|
|
|
bonusPoint.value = 0
|
|
bonusPoint.value = 0
|
|
|
timeCount.value = store.state.gameRuleList[2].second
|
|
timeCount.value = store.state.gameRuleList[2].second
|
|
|
timeCountIntervalId = setInterval(() => {
|
|
timeCountIntervalId = setInterval(() => {
|
|
|
|
|
+ if (isShowRule.value) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
timeCount.value--
|
|
timeCount.value--
|
|
|
if (timeCount.value === 0) {
|
|
if (timeCount.value === 0) {
|
|
|
clearInterval(timeCountIntervalId)
|
|
clearInterval(timeCountIntervalId)
|