Pārlūkot izejas kodu

Merge branch 'dev-online' into 'PrivateReleaseOfXC'

Dev online

See merge request crowd-2019/crowd-test-service-front!199
郭超 4 gadi atpakaļ
vecāks
revīzija
5f024f9377

+ 22 - 22
src/pages/DetailPage/TestTypeDetail.vue

@@ -15,29 +15,29 @@
   import {getAllServiceTypes} from '@/js/index.js'
 
   export default {
-        name: "TestTypeDetail",
-        data() {
-            return {
-                isLogin: false,
-                fields: [],
-            }
-        },
-        methods: {
-            setFields(){
-                getAllServiceTypes().then((res) => {
-                    this.fields = res
-                })
-            },
-            goToTask(testType){
-              console.log(testType)
-              //type=1 表示是从测试类型跳转过去的
-                this.$router.push({path:'/square',query:{type:testType}})
-            }
-        },
-        mounted() {
-            this.setFields();
-        }
+    name: "TestTypeDetail",
+    data() {
+      return {
+        isLogin: false,
+        fields: [],
+      }
+    },
+    methods: {
+      setFields(){
+        getAllServiceTypes().then((res) => {
+          this.fields = res
+        })
+      },
+      goToTask(testType){
+        console.log(testType)
+        //type=1 表示是从测试类型跳转过去的
+        this.$router.push({path:'/square',query:{type:testType}})
+      }
+    },
+    mounted() {
+      this.setFields();
     }
+  }
 </script>
 
 <style scoped>

+ 1 - 1
src/pages/Homepage/Homepage.vue

@@ -47,7 +47,7 @@
       <el-row :gutter="15">
         <el-col :span="19" class="test-type-wrapper">
           <TestMenu :testTypeList="homeData.testTypeList" v-if="HOME_DISPLAY.test_menu && homeData.testTypeList"></TestMenu>
-          <RankingCard></RankingCard>
+          <RankingCard v-if="HOME_DISPLAY.mooctest_rank"></RankingCard>
           <TestCard :applicationTypeList="homeData.applicationTypeList" v-if="HOME_DISPLAY.test_card && homeData.applicationTypeList"></TestCard>
           <el-row style="margin-top: 10px" v-if="HOME_DISPLAY.resource_and_tool">
             <ResourceAndTool :resourceList="homeData.toolList && homeData.toolList"></ResourceAndTool>

+ 1 - 1
src/pages/Homepage/HomepagePrivate.vue

@@ -52,7 +52,7 @@
         </el-col>
         <el-col :span="19" class="test-type-wrapper">
           <TestMenu :testTypeList="homeData.testTypeList" v-if="HOME_DISPLAY.test_menu && homeData.testTypeList"></TestMenu>
-          <RankingCard></RankingCard>
+          <RankingCard v-if="HOME_DISPLAY.mooctest_rank"></RankingCard>
           <TestCard :applicationTypeList="homeData.applicationTypeList" v-if="HOME_DISPLAY.test_card && homeData.applicationTypeList"></TestCard>
           <el-row style="margin-top: 10px" v-if="HOME_DISPLAY.resource_and_tool">
             <ResourceAndTool :resourceList="homeData.toolList && homeData.toolList"></ResourceAndTool>

+ 1 - 1
src/pages/Homepage/HotTask.vue

@@ -29,7 +29,7 @@
 
 <script>
   export default {
-    name: 'HotCrowd',
+    name: 'HotTask',
     props:['applicationTypeRank'],
     methods:{
         getMore(){

+ 1 - 1
src/pages/Homepage/HotUser.vue

@@ -32,7 +32,7 @@
   import {defaultValue} from '@/js/index.js'
 
   export default {
-    name: 'HotCrowd',
+    name: 'HotUser',
     props:['userRank'],
     data() {
       return{

+ 5 - 5
src/pages/Homepage/RankingCard.vue

@@ -2,20 +2,20 @@
   <el-row :gutter="20" style="margin-bottom: 20px">
     <el-col :span="8">
       <div class="ranking-card ranking-card1"
-           onclick="window.open('http://47.98.174.59:8200/#/list?field=BASESF&code=OS')">
+           onclick="window.open('http://139.224.0.118:8200/#/list?field=BASESF&code=OS')">
         <div class="wrap-mask">操作系统排行榜</div>
       </div>
     </el-col>
     <el-col :span="8">
       <div class="ranking-card ranking-card2"
-           onclick="window.open('http://47.98.174.59:8200/#/list?field=BASESF&code=DATABASE')">
-        <div class="wrap-mask">数据库排行榜</div>
+           onclick="window.open('http://139.224.0.118:8200/#/list?field=BASESF&code=OFFICE')">
+        <div class="wrap-mask">办公软件排行榜</div>
       </div>
     </el-col>
     <el-col :span="8">
       <div class="ranking-card ranking-card3"
-           onclick="window.open('http://47.98.174.59:8200/#/list?field=APPSF&code=OFFICE')">
-        <div class="wrap-mask">办公软件排行榜</div>
+           onclick="window.open('http://139.224.0.118:8200/#/list?field=BASESF&code=ANTIVIRUS')">
+        <div class="wrap-mask">防病毒软件排行榜</div>
       </div>
     </el-col>
   </el-row>

+ 7 - 9
src/pages/Square/Square2.0.vue

@@ -78,7 +78,6 @@
     data(){
       return {
         logoTitle:CONFIG.logoTitle,
-        logo_transparent:CONFIG.logo_transparent,
         SQUARE_DISPLAY:CONFIG.SQUARE_DISPLAY,
         logo_transparent:CONFIG.logo_transparent,
         mooctest_rank_url: CONFIG.mooctest_rank_url,
@@ -172,20 +171,19 @@
           this.getHotData();
       },
 
-      getTestTask(type) {
-        Http.get(`/api/square/task/${type}`).then((res)=>{
-          this.projectAndTaskArr = res.data.crowdTestTaskVOS;
-          this.hotCrowdTestProjectVOs = res.data.hotCrowdTestProjectVOs;
-          this.hotCrowdTaskVOs = res.data.hotCrowdTaskVOs;
-        })
-      },
-
       getHotData(){
           Http.get('/api/square/hotTaskAndProject').then((res)=>{
               this.hotCrowdTestProjectVOs = res.data.hotCrowdTestProjectVOs;
               this.hotCrowdTaskVOs = res.data.hotCrowdTaskVOs;
           })
       },
+
+      getTestTask(type) {
+        Http.get(`/api/square/task/${type}`).then((res)=>{
+          this.projectAndTaskArr = res.data.crowdTestTaskVOS;
+        })
+      },
+
       checkLogin() {
         this.checkCreateProjectAuth();
       },