123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <div class="question" :class="{qmobile:isMobile}">
- <div
- class="qcon"
- :style="{
- backgroundImage: `url(${require('@/assets/images/question/bg.jpg')})`,
- }"
- >
- <div v-if="!dati" class="qbody">
- <div class="start_page">
- <img
- class="qicon"
- :src="require('@/assets/images/question/icon.png')"
- alt=""
- />
- <div class="qbtn" @click="dati = true">
- <span>开始答题</span>
- <img
- :src="require('@/assets/images/question/jiantou.png')"
- alt=""
- />
- </div>
- </div>
- </div>
- <div v-else class="qbody">
- <datiing @lingjiang="datiing = false" v-if="datiing" />
- <prize v-else />
- </div>
- <img
- class="qclose"
- :src="require('@/assets/images/question/close.png')"
- alt=""
- @click="$emit('close')"
- />
- </div>
- </div>
- </template>
- <script>
- import datiing from "./datiing";
- import prize from "./prize";
- import browser from '@/util/browser'
- export default {
- components: {
- datiing,
- prize,
- },
- data() {
- return {
- dati: false,
- datiing: true,
- isMobile: browser.mobile,
- };
- },
- created(){}
- };
- </script>
- <style lang="less" scoped>
- .question {
- position: fixed;
- width: 100%;
- height: 100%;
- left: 0;
- color: #fff;
- .qcon {
- width: 930px;
- height: 550px;
- background-size: 100% auto;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- position: fixed;
- .qbody {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 100%;
- height: 100%;
- text-align: center;
- .start_page {
- width: 100%;
- top: 48%;
- position: absolute;
- left: 50%;
- transform: translate(-50%, -50%);
- .qicon {
- margin-bottom: 50px;
- }
- }
- }
- .qclose {
- position: absolute;
- right: 10px;
- top: 10px;
- cursor: pointer;
- }
- }
- }
- .qmobile {
- position: relative;
- height:calc(100% - 35px);
- .qcon {
- width: 96%;
- height: 98%;
- position: absolute;
- }
- }
- </style>
|