소스 검색

Merge branch 'pre'

sunlupeng 1 년 전
부모
커밋
c1c4696dce

+ 29 - 0
src/api/qixiFestival.js

@@ -0,0 +1,29 @@
+import request from '@/utils/request'
+
+
+// 首页数据
+export function homeData(query) {
+  return request({
+    url: 'Valentine/answer/top',
+    method: 'get',
+    params:query
+  })
+}
+
+// 获取题目
+export function questionList(query) {
+  return request({
+    url: 'Valentine/answer/room',
+    method: 'get',
+    params:query
+  })
+}
+
+// 提交答案
+export function submitAnswer(data) {
+  return request({
+    url: 'Valentine/answer/submit',
+    method: 'post',
+    data
+  })
+}

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


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


+ 1 - 0
src/permission.js

@@ -4,6 +4,7 @@ import { getToken, setToken } from '@/utils/auth' // getToken from cookie
 import { lockStatus,unlock } from "@/api/allApi";
 //路由跳转之前
 router.beforeEach((to, _from, next) => {
+  // setToken('aad99e8f2a2997d2bdc2a9ac6c87ec8d');
   setToken('59a8efd4d32e874869451ddc1c5d98ba');
   const path = to.path;
   const Authorization = to.query.Authorization

+ 0 - 1
src/utils/request.js

@@ -8,7 +8,6 @@ let prodBaseURL = 'https://xiaoyou.dgtis.com/admin';//正式地址
 
 let devBaseURL = 'https://xiaoyou.dgtis.com/admin';//测试地址
 
-// let devBaseURL = 'http://47.103.79.143:9085/admin';//阿里云地址
 // create an axios instance
 const service = axios.create({
   baseURL: process.env.NODE_ENV === 'production' ? prodBaseURL : devBaseURL,// api 的 base_url

+ 13 - 9
src/views/HomeView/AnswerGame/QiXiAnswerGame.vue

@@ -61,7 +61,8 @@
     </div>
 </template>
 <script>
-import { homeData,questionList,submitAnswer } from "@/api/allApi";
+import { homeData,questionList,submitAnswer } from "@/api/qixiFestival";
+import AES from "@/utils/AES.js";
 import SiderInfo from '@/components/SiderInfo.vue';
 import { mapGetters } from 'vuex';
 export default{
@@ -112,9 +113,13 @@ export default{
     },
     getQuestionList(){
         questionList({}).then(response=>{
-                console.log(response.data.data);
-                this.questions = response.data.data.questions;
-                this.roomId = response.data.data.roomId;
+                 //解密
+                let resData = JSON.parse(AES.decrypt(response.data.data));
+                console.log(resData);
+                this.questions = resData.questions;
+                this.roomId = resData.roomId;
+                this.timerCountdown();
+                this.isShowItem = true;
             })
     },
     getHomeData(){
@@ -145,7 +150,7 @@ export default{
                         this.result.push('');
                     }
                     this.isDim = true;
-                    this.isFailWrapper = true;
+                    this.isConfirmWrapper = true;
                     this.saveAnswer();
                     console.log(this.result);
                 }
@@ -187,8 +192,7 @@ export default{
     },
     clickAnswer(){
         this.getQuestionList();
-            this.isShowItem = true;
-            this.timerCountdown();
+           
         // if(this.top){
         //     this.$message({
         //         message: '今日已答题!',
@@ -426,7 +430,7 @@ export default{
     cursor: pointer;
     position: absolute;
     width: 200px;
-    bottom: 10%;
+    bottom: 17%;
     left: 0;
     right: 0;
     margin:auto;
@@ -435,7 +439,7 @@ export default{
     cursor: pointer;
     position: absolute;
     width: 200px;
-    bottom: 2%;
+    bottom: 8%;
     left: 0;
     right: 0;
     margin:auto;

+ 50 - 33
src/views/HomeView/FestiveEvents.vue

@@ -78,50 +78,67 @@ export default {
             console.log(val);
             //节日游戏
             if(val.type=='1'){
-                this.$router.push({
-                    path: '/home/festiveEvents/game',
-                    query: {
-                        url: val.activityUrl,
-                        actId:val.actId
-                    }
-                });
+                 //元宵节答题
+                if(val.actId==13){
+                    this.$router.push({
+                        path: '/home/festiveEvents/lanternFestival',
+                        query: {
+                            actId:val.actId
+                        }
+                    });
+                }
+                //七夕节答题
+                else if(val.actId==20){
+                    this.$router.push({
+                        path: '/home/festiveEvents/qiXiGame',
+                        query: {
+                            actId:val.actId
+                        }
+                    });
+                }
+                //每周竞技
+                else{
+                    this.$router.push({
+                        path: '/home/festiveEvents/game',
+                        query: {
+                            url: val.activityUrl,
+                            actId:val.actId
+                        }
+                    });
+                }
             }
             //答题
             if(val.type=='2'){
+                //每日答题
                 this.$router.push({
                     path: '/home/festiveEvents/answerGame',
                     query: {
                         actId:val.actId
                     }
                 });
-            }
-             //元宵节
-             if(val.actId==13){
-                this.$router.push({
-                    path: '/home/festiveEvents/lanternFestival',
-                    query: {
-                        actId:val.actId
-                    }
-                });
             }
             //抽奖
-            if(val.type=='3'&&val.actId!=12){
-                this.$router.push({
-                    path: '/home/festiveEvents/drawCarouselGame',
-                    query: {
-                        actId:val.actId
-                    }
-                });
-            }
-            //春节抽签
-            if(val.actId==12){
-                this.$router.push({
-                    path: '/home/festiveEvents/game',
-                    query: {
-                        url: val.activityUrl,
-                        actId:val.actId
-                    }
-                });
+            if(val.type=='3'){
+                //春节抽签
+                if(val.actId==12){
+                    this.$router.push({
+                        path: '/home/festiveEvents/game',
+                        query: {
+                            url: val.activityUrl,
+                            actId:val.actId
+                        }
+                    });
+                }
+                //每月抽奖
+                else{
+                    this.$router.push({
+                        path: '/home/festiveEvents/drawCarouselGame',
+                        query: {
+                            actId:val.actId
+                        }
+                    });
+                }
+                
             }
         }
     }

+ 2 - 2
src/views/HomeView/PointsMall.vue

@@ -6,9 +6,9 @@
                     <!-- arrow="never" indicator-position="none" -->
                     <el-carousel indicator-position="none" height="250px" :interval="5000" v-if="bannerList.length > 0">
                         <el-carousel-item v-for="(item, index) in bannerList" :key="index">
-                            <!-- <router-link to="/productTrials"> -->
+                            <router-link :to="item.remark">
                                 <img style="width: 100%; height: 100%" :src="item.dictValue" class="banner" />
-                            <!-- </router-link> -->
+                            </router-link>
                         </el-carousel-item>
                     </el-carousel>
                 </div>

+ 1 - 0
src/views/HomeView/SignIn.vue

@@ -95,6 +95,7 @@ export default {
   },
   data() {
     return {
+      continuousSignCount:'',
       signDays:'',
       integral:'',
       markDate: [],

+ 5 - 1
src/views/HomeView/postInteract/detail.vue

@@ -11,7 +11,11 @@
                             {{ data.createTime }}
                         </div>
                     </div>
-
+                    <div class="author-info-block">
+                        <div class="meta-box" style="color: black;">
+                            {{ data.content }}
+                        </div>
+                    </div>
                     <div class="quesList">
                         <div class="listItem" v-for="(item, index) in dataList" :key="index">
                             <div v-if="item.type == 'SCQ'">