guessRiddle.vue 2.33 KB
<!--
 * @Author: 前端 qianduan01@didihu.com.cn
 * @Date: 2023-01-31 15:41:18
 * @LastEditors: yangming yangming@didihu.com.cn
 * @LastEditTime: 2023-02-23 13:56:05
 * @FilePath: \h5Demo\src\components\KnowledgeSports\guessRiddle.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <Pop
    name="猜谜语"
    :isEnd="isEnd"
    :isFinish="isFinish"
    :dataObject="answerData"
    :isError="isError"
    :isSuccess="isSuccess"
    @reStart="reStart"
  >
    <div v-if="answerData.body.question" class="slot">
      <div class="slot-question">{{ answerData.body.question }}</div>
      <Answer
        :isError="isError"
        :isSuccess="isSuccess"
        :answerData="answerData"
        :selectResult="selectResult"
        :isSelectSeat="isSelectSeat"
        :answerOption="answerOption"
        @cursorEven="cursorEven"
        @optionsHandle="optionsHandle"
        @answerGame="answerGame"
      ></Answer>
    </div>
  </Pop>
</template>

<script>
import Pop from "../Popups/index";
import Answer from "../AnswerType/index";
import mixin from "../../mixins/fill.js";
export default {
  mixins: [mixin],
  components: {
    Pop,
    Answer,
  },
  name: "guessRiddle",
  watch: {
    dataObject(data) {
      GPJSSDK.Game.knowAction({
        data,
        status: (info) => {
          if (info.gameStatus == 0 && !info.gameType) {
            if (this.answerOption && this.answerOption.length > 0) {
              this.timer = null;
              // this.answerData = {
              //   body: {
              //     size: null,
              //     currentSize: null,
              //     timeLimit: null,
              //     rightNum: null,
              //     question: null,
              //     choice: [],
              //   },
              // };
            }
          }
        },
      });
    },
  },
};
</script>

<style lang="less" scoped>
/deep/ .slot {
  width: 100%;
  .next-btn {
    margin: 10vh auto 0px;
  }
  &-question {
    width: 304px;
    margin: 0 auto;
    color: #111;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    padding: 35px 20px 15px;
  }
}
.qtips {
  color: #e25470;
  color: #e25470;
  margin-top: 16px;
  font-weight: bold;
  text-align: center;
}
</style>