Ver Fonte

修改课程中心banner接口

11wqe1 há 3 dias atrás
pai
commit
7efe2caa51
5 ficheiros alterados com 36 adições e 12 exclusões
  1. 2 2
      src/components/courseDetail.vue
  2. 30 6
      src/components/index.vue
  3. 1 1
      src/lang/cn.json
  4. 2 2
      src/lang/en.json
  5. 1 1
      src/lang/hk.json

+ 2 - 2
src/components/courseDetail.vue

@@ -82,14 +82,14 @@
                 <div
                   style="display: flex; align-items: center; margin-left: 32px"
                 >
-                  <div style="color: #717c8d; font-weight: 400">{{ lang.ssParticipants }}</div>
+                  <div style="color: #717c8d; font-weight: 400">{{ lang.ssParticipants }}:</div>
                   <!-- <div class="man">
                     <img src="../assets/people.png" alt />
                   </div> -->
                   <div class="person" style="font-weight: bold; color: #0e1e33">
                     {{
                       courseDetail.vcount != null ? courseDetail.vcount : 0
-                    }} {{ lang.ssPerson }}
+                    }} <span v-if="lang.lang != 'com'">{{ lang.ssPerson }}</span>
                   </div>
                 </div>
               </div>

+ 30 - 6
src/components/index.vue

@@ -379,6 +379,29 @@ export default {
           console.error(err);
         });
     },
+    //获取banner
+    getbanndBanner() {
+      // const loading = this.openLoading(document.querySelector(".main_box"));
+      let params = {
+        oid: this.oid,
+        lang: this.lang.lang,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectBarOid", params)
+        .then((res) => {
+          console.log(res);
+          if (res.data[0].length > 0) {
+            this.bannerList = res.data[0];
+          }else if(res.data[1].length > 0){
+            this.bannerList = res.data[1];
+          }else{
+            this.bannerList = res.data[2];
+          }
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
     getCourse(typeName, ftypeId, typeid, type) {
       this.page = 1;
       this.zoneClass = [];
@@ -677,9 +700,9 @@ export default {
           // this.selectType({
           //   data: [res.data[1], res.data[2], res.data[3], res.data[4]],
           // });
-          this.getBanner({
-            data: [res.data[6], res.data[5], res.data[7]],
-          });
+          // this.getBanner({
+          //   data: [res.data[6], res.data[5], res.data[7]],
+          // });
         })
         .catch((err) => {
           console.error(err);
@@ -717,9 +740,9 @@ export default {
           // this.selectType({
           //   data: [res.data[1], res.data[2], res.data[3], res.data[4]],
           // });
-          this.getBanner({
-            data: [res.data[6], res.data[5], res.data[7]],
-          });
+          // this.getBanner({
+          //   data: [res.data[6], res.data[5], res.data[7]],
+          // });
         })
         .catch((err) => {
           console.error(err);
@@ -972,6 +995,7 @@ export default {
     let typea = this.$route.query.typea
     let typeb = this.$route.query.typeb
     let typed = this.$route.query.typed
+    this.getbanndBanner()
     if(this.oidArray.indexOf(this.oid) !== -1){
       this.typeCheck2 = true
     }

+ 1 - 1
src/lang/cn.json

@@ -182,7 +182,7 @@
   "ssGrade": "年级",
   "ssSubjectName": "学科",
   "ssCreator": "创建者:",
-  "ssParticipants": "参与人数",
+  "ssParticipants": "参与人数",
   "ssCollaborativeMembers": "协同成员:",
   "ssExpandText": "展开",
   "ssCollapseText": "收起",

+ 2 - 2
src/lang/en.json

@@ -180,7 +180,7 @@
   "ssGrade": "Grade",
   "ssSubjectName": "Subject",
   "ssCreator": "Creator:",
-  "ssParticipants": "Participants:",
+  "ssParticipants": "Number of Participants",
   "ssCollaborativeMembers": "Collabotators:",
   "ssExpandText": "More",
   "ssCollapseText": "Collapse",
@@ -228,7 +228,7 @@
   "ssCategoryColon": "Category:",
   "ssStageText": "Stage",
   "ssTaskText": "Task",
-  "ssStageNumFormat": "stage(s) *",
+  "ssStageNumFormat": "Stage(s) *",
   "ssTaskNumFormat": "task(s) *:",
   "ssStepNumFormat": "Step *:",
   "ssTasksFormat": "task(s) *",

+ 1 - 1
src/lang/hk.json

@@ -180,7 +180,7 @@
   "ssGrade": "年級",
   "ssSubjectName": "學科",
   "ssCreator": "創建者:",
-  "ssParticipants": "參與人數",
+  "ssParticipants": "參與人數",
   "ssCollaborativeMembers": "協同成員:",
   "ssExpandText": "展開",
   "ssCollapseText": "收起",