ソースを参照

双十一签到活动

sunlupeng 1 年間 前
コミット
0a20b39155

+ 36 - 5
src/App.vue

@@ -7,15 +7,17 @@
       </transition>
       <AppBackTop></AppBackTop>
     </div>
-    <el-dialog width="30%" title="联系我们" :visible.sync="dialogVisible">
-      <div>座机:010-82783688转122</div>
-      <div>邮箱:guowl@dgtis.com</div>
+    <el-dialog  width="50%" title="系统规则" :visible.sync="dialogVisible">
+      <!-- <div>座机:010-82783688转122</div>
+      <div>邮箱:guowl@dgtis.com</div> -->
+      <div v-html="htmlData"></div>
     </el-dialog>
   </div>
 </template>
 <script>
 import AppHeader from '@/components/AppHeader.vue';
 import AppBackTop from '@/components/AppBackTop.vue';
+import { lockStatus } from "@/api/allApi";
 export default {
   name: 'app',
   components: {
@@ -24,6 +26,7 @@ export default {
   },
   data() {
     return {
+      htmlData:'',
       dialogVisible: false,
       transitionName: "",
       isGray: false,
@@ -35,7 +38,10 @@ export default {
   },
   methods:{
     fatherMethod() {
-      this.dialogVisible = true;
+      lockStatus().then(response=>{
+        this.htmlData = response.data.errmsg; 
+        this.dialogVisible = true;
+      })
     },
     // 保存滚动值,这是兼容的写法
     handleScroll () {
@@ -141,4 +147,29 @@ export default {
   opacity: 0;
   transform: translate3d(-100%, 0, 0);
 }
-</style>
+</style>
+
+<style scoped>
+::v-deep .el-dialog {
+  left: 50%;
+  top: 5%;
+  transform: translate(-50%, -5%);
+  margin: 0px !important;
+  border-radius: 8px;
+}
+::v-deep .el-dialog__title,::v-deep .el-dialog__headerbtn{
+  font-size: 24px;
+}
+::v-deep .el-dialog__header {
+    -webkit-box-shadow: 0 1px 4px 0 rgba(31, 45, 61, .12);
+    box-shadow: 0 1px 4px 0 rgba(31, 45, 61, .12);
+}
+::v-deep .el-dialog__body{
+    overflow: auto;
+    overflow-x: hidden;
+    max-height: 70vh!important;
+}
+::v-deep .el-dialog__footer {
+    border-top: 1px solid #d7d9dc;
+}
+</style>

BIN
src/assets/image/answerGame/shuangShiYi/answer.png


BIN
src/assets/image/answerGame/shuangShiYi/exit.png


BIN
src/assets/image/answerGame/shuangShiYi/finish.png


BIN
src/assets/image/answerGame/shuangShiYi/homeBg.jpg


BIN
src/assets/image/answerGame/shuangShiYi/homeBg.png


BIN
src/assets/image/answerGame/shuangShiYi/rules.png


+ 17 - 3
src/components/AppHeader.vue

@@ -27,11 +27,11 @@
                 </div>
             </router-link> -->
             <div class="userInfo flex-center">
-                <!-- <el-tooltip content="联系我们" effect="dark" placement="bottom">
+                <el-tooltip content="系统规则" effect="dark" placement="bottom">
                     <div style="font-size: 20px;margin-right: 10px;cursor: pointer;">
-                        <i class="el-icon-service" @click="childMethod()"></i>
+                        <i class="el-icon-question" @click="childMethod()"></i>
                     </div>
-                </el-tooltip> -->
+                </el-tooltip>
                 <el-avatar fit="fill" :size="50" :src="avatar"></el-avatar>
                 <div class="nameAndIntegral">
                     <div>姓名: {{ userInfo.userName }}</div>
@@ -71,6 +71,20 @@ export default {
 </script>
 
 <style>
+.rules{
+    margin-left: 10px;
+    display: flex;
+    align-items: center;
+    font-size: 14px;
+    font-weight: 400;
+    /* color: #4e5969; */
+    color: #1d7dfa;
+    cursor: pointer;
+    white-space: nowrap;
+}
+/* .rules:hover {
+    color: #1d7dfa;
+} */
 .logo{
     position: absolute;
     left: 80px;

+ 1 - 1
src/permission.js

@@ -4,7 +4,7 @@ import { getToken, setToken } from '@/utils/auth' // getToken from cookie
 import { lockStatus,unlock } from "@/api/allApi";
 //路由跳转之前
 router.beforeEach((to, _from, next) => {
-  // setToken('26d6869a02d7d2e5c593226ca14d6601');
+  // setToken('58be5aebe9aba9a1db7b24e052f59bf5');
   const path = to.path;
   const Authorization = to.query.Authorization
   if (path.indexOf('auth') != -1 && Authorization) { 

+ 4 - 0
src/router/index.js

@@ -82,6 +82,10 @@ const routes = [
         path: '/home/festiveEvents/game',
         component: () => import('@/views/HomeView/Game.vue')
       },
+      {
+        path: '/home/festiveEvents/shuangShiYiQianDao',
+        component: () => import('@/views/HomeView/AnswerGame/ShuangShiYIQianDao.vue')
+      },
       {
         path: '/home/festiveEvents/guoQingQianDao',
         component: () => import('@/views/HomeView/AnswerGame/GuoQingQianDao.vue')

+ 1 - 1
src/utils/request.js

@@ -6,7 +6,7 @@ let prodBaseURL = 'https://xiaoyou.dgtis.com/admin';//正式地址
 
 // let prodBaseURL = 'https://malltest.dgtis.com/admin';//阿里云地址
 
-let devBaseURL = 'https://malltest.dgtis.com/admin';//测试地址
+let devBaseURL = 'https://xiaoyou.dgtis.com/admin';//测试地址
 
 // create an axios instance
 const service = axios.create({

+ 351 - 0
src/views/HomeView/AnswerGame/ShuangShiYIQianDao.vue

@@ -0,0 +1,351 @@
+<template>
+    <div class="timeline-container">
+        <div class="timeline-content">
+            <div class="timeline-entry-list">
+                <div class="gameBox">
+                    <div class="home">
+                        <div :class="{ 'dim': isDim }">
+                            <!-- <img class="rules" src="@/assets/image/answerGame/shuangShiYi/rules.png" alt="互动规则" @click="clickRuleWrapper"> -->
+                            <img class="answer" src="@/assets/image/answerGame/shuangShiYi/answer.png" alt="答题按钮" @click="clickAnswer">
+                            <img class="exit" src="@/assets/image/answerGame/shuangShiYi/exit.png" alt="退出互动" @click="getOut">
+                        </div>
+                        
+                    </div>
+                    <div class="ruleWrapper" v-if="isRuleWrapper">
+                        <el-card class="box-card">
+                            <div slot="header" class="clearfix">
+                                <span>互动规则</span>
+                                <span style="float: right; font-size: 20px;cursor: pointer;" @click="closeRuleWrapper">
+                                    <i class="el-icon-close"></i>
+                                </span>
+                            </div>
+                            <div v-html="rule"></div>
+                        </el-card>
+                    </div>
+                    <div class="confirmWrapper" v-if="isConfirmWrapper" @click="getOut">
+                    </div>
+                </div>
+            </div>
+            <SiderInfo></SiderInfo>
+        </div>
+    </div>
+</template>
+<script>
+import { homeData,MidAutumnSignIn } from "@/api/allApi";
+import SiderInfo from '@/components/SiderInfo.vue';
+export default{
+  components: {
+    SiderInfo
+  },
+  data() {
+    return {
+        actId:this.$route.query.actId,
+        rule:'',
+        isConfirmWrapper:false,
+        isRuleWrapper: false,
+        isDim:false,
+    };
+  },
+  created(){
+    this.getHomeData();
+  },
+  methods:{
+    getOut(){
+        this.$router.push({
+                path: '/home/festiveEvents',
+            });
+    },
+    getHomeData(){
+        homeData({actId:this.actId}).then(response=>{
+                console.log(response.data.data);
+                this.rule = response.data.data.rule;
+            }).catch(err => {
+                console.log(err)
+            })
+    },
+    clickAnswer(){
+        // this.isDim = true;
+        // this.isConfirmWrapper = true;
+        MidAutumnSignIn({actId:this.actId}).then(response=>{
+            this.isDim = true;
+            this.isConfirmWrapper = true;
+        })
+    },
+    clickRuleWrapper(){
+        this.isDim = true;
+        this.isRuleWrapper = true;
+    },
+    closeRuleWrapper(){
+        this.isDim = false;
+        this.isRuleWrapper = false;
+    }
+  },
+}
+</script>
+<style scoped>
+.timeline-container{
+    margin: 0 auto;
+}
+.timeline-entry-list{
+    margin-right: 17.5rem;
+    border-radius: 2px;
+    width: 720px;
+    position: relative;
+}
+.timeline-entry-list .gameBox{
+    border-radius: 4px 4px 0 0;
+    position: relative;
+    padding: 2.667rem 0;
+    z-index: 1;
+    overflow: hidden;
+    background-color: #fff;
+    padding-left: 2.67rem;
+    padding-right: 2.67rem;
+    margin-bottom: 2rem;
+    box-sizing: border-box;
+    min-height: 280px;
+    display: flex;
+    justify-content: center;
+    align-content: center;
+}
+.gameBox .item{
+    position: relative;
+    z-index: 10;
+    background: url(@/assets/image/answerGame/item/itemBg.png) no-repeat;
+    background-size: 100% 100%;
+    width: 375px;
+    height: 667px;
+}
+.item .integralBox{
+    position: absolute;
+    top: 7.3%;
+    right: 8%;
+    width: 90px;
+    height: 35.2px;
+    /* background: greenyellow; */
+    display: flex;
+    justify-content: center;
+    line-height: 35.2px;
+}
+.integralBox .integral{
+    font-size: 16px;
+    color: orange;
+    font-weight: 600;
+}
+.item .timer{
+    position: absolute;
+    background: url(@/assets/image/answerGame/item/timer.png) no-repeat;
+    background-size: 100% 100%;
+    width: 80px;
+    height: 80px;
+    top: 15%;
+    right: 10%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.timer .second{
+    font-size: 16px;
+    color: #fff;
+    font-weight: 600;
+}
+.item .topicNum{
+    position: absolute;
+    background: url(@/assets/image/answerGame/item/topicNum.png) no-repeat;
+    background-size: 100% 100%;
+    width: 120px;
+    height: 42px;
+    top: 25%;
+    left: 4.8%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.topicNum .topic{
+    font-size: 16px;
+    color: #fff;
+    font-weight: 600;
+}
+.item .questionBox{
+    position: absolute;
+    width: 375px;
+    top: 28%;
+    left: 0;
+    right: 0;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+}
+.questionBox .title{
+    margin:auto 50px;
+    height: 180px;
+    font-size: 18px;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    /* font-weight: 600; */
+}
+.content{
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+}
+.answerItem{
+    cursor: pointer;
+    margin: 10px 0;
+    color: #3883fa;
+    background: rgb(221, 218, 218);
+    border-radius: 20px;
+    width: 80%;
+    height: 40px;
+    line-height: 40px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    position: relative;
+}
+.right {
+  /*选择正确的答案颜色*/
+  background: #3ede58;
+  color: #fff;
+}
+
+.error {
+  /*选择错误的答案颜色*/
+  background: #e53117;
+  color: #fff;
+}
+.invisible{
+    width: 25px;
+    position: absolute;
+    right: 15px;
+}
+.gameBox .home{
+    position: relative;
+    z-index: 10;
+    background: url(@/assets/image/answerGame/shuangShiYi/homeBg.png) no-repeat;
+    background-size: 100% 100%;
+    width: 375px;
+    height: 667px;
+}
+.home .rules{
+    cursor: pointer;
+    position: absolute;
+    width: 50px;
+    top: 20%;
+    left: 5%;
+}
+.home .top{
+    position: absolute;
+    bottom: 23%;
+    left: 0;
+    right: 0;
+    margin:auto;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.home .answer{
+    cursor: pointer;
+    position: absolute;
+    width: 150px;
+    bottom: 22%;
+    left: 0;
+    right: 0;
+    margin:auto;
+}
+.home .exit{
+    cursor: pointer;
+    position: absolute;
+    width: 150px;
+    bottom: 12%;
+    left: 0;
+    right: 0;
+    margin:auto;
+}
+.hidden {
+    display: none;
+}
+
+.show {
+    display: block;
+}
+
+.dim {
+    /* opacity:0.6; */
+    height:100%;
+    width:100%;
+    background: rgba(0,0,0,.4);
+    pointer-events: none;
+}
+
+  .clearfix:before,
+  .clearfix:after {
+    display: table;
+    content: "";
+  }
+  .clearfix:after {
+    clear: both
+  }
+  .ruleWrapper{
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    z-index: 12;
+  }
+  .box-card {
+    width: 350px;
+  }
+
+  .confirmWrapper{
+    cursor: pointer;
+    position: absolute;
+    background: url(@/assets/image/answerGame/shuangShiYi/finish.png) no-repeat;
+    background-size: 100% 100%;
+    width: 253px;
+    height: 213px;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    z-index: 12;
+    display: flex;
+    justify-content: center;
+    align-items: flex-end;
+  }
+  .confirmWrapper .goHome{
+    cursor: pointer;
+    width: 112px;
+    height: 55px;
+  }
+
+  .failWrapper{
+    position: absolute;
+    background: url(@/assets/image/answerGame/item/fail.png) no-repeat;
+    background-size: 100% 100%;
+    width: 240px;
+    height: 208.5px;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    z-index: 12;
+    display: flex;
+    justify-content: center;
+    align-items: flex-end;
+  }
+  .failWrapper .goHome{
+    cursor: pointer;
+    width: 112px;
+    height: 55px;
+  }
+  
+</style>
+<style>
+.el-card__header {
+    padding: 10px 20px !important;
+}
+</style>

+ 10 - 0
src/views/HomeView/FestiveEvents.vue

@@ -78,6 +78,16 @@ export default {
             console.log(val);
             //节日游戏
             if(val.type=='1'){
+                //双十一签到 测试 正式43
+                if(val.actId==43){
+                    this.$router.push({
+                        path: '/home/festiveEvents/shuangShiYiQianDao',
+                        query: {
+                            actId:val.actId
+                        }
+                    });
+                    return;
+                }
                  //国庆节签到 测试38正式36
                  if(val.actId==36){
                     this.$router.push({