Forráskód Böngészése

报纸列表年份 课程排序

natasha 1 éve
szülő
commit
94046aa3d8

+ 1 - 1
src/views/content_manage/course_manage/LiveCourse.vue

@@ -59,7 +59,7 @@
                         sortable="custom">
                     </el-table-column>
                     <el-table-column
-                        prop="price"
+                        prop="price_discount"
                         label="价格"
                         width="154" 
                         sortable="custom">

+ 5 - 2
src/views/content_manage/course_manage/RecordedCourse.vue

@@ -81,10 +81,13 @@
                         sortable="custom">
                     </el-table-column>
                     <el-table-column
-                        prop="study_phase_name"
+                        prop="study_phase"
                         label="学段"
                         width="80"
                         sortable="custom">
+                        <template slot-scope="scope">
+                            {{scope.row.study_phase_name}}
+                        </template>
                     </el-table-column>
                     <el-table-column
                         prop="type"
@@ -98,7 +101,7 @@
                         </template>
                     </el-table-column>
                     <el-table-column
-                        prop="price"
+                        prop="price_discount"
                         label="价格"
                         width="154" 
                         sortable="custom">

+ 23 - 8
src/views/content_manage/newspaper_manage/index.vue

@@ -474,16 +474,31 @@ export default {
     },
     // 获取年份列表
     getYearList(){
-        let nowYear = new Date().getFullYear()
+        this.yearList = [
+            {
+                value: -1,
+                label: '全部'
+            }
+        ]
         let yearList = []
-        for(let i = 0; i < 20; i++){
-            let obj = {
-                value: nowYear - i,
-                label: nowYear - i
+        let MethodName = "/ShopServer/Client/ShopHomeQuery/GetIssueYearLabelList"
+        getLogin(MethodName, {})
+        .then((res) => {
+            if(res.status===1){
+                res.year_label_list.forEach(nowYear => {
+                    let obj = {
+                        value: nowYear,
+                        label: nowYear
+                    }
+                    yearList.push(obj)
+                })
+                this.yearList = this.yearList.concat(yearList)
             }
-            yearList.push(obj)
-        }
-        this.yearList = this.yearList.concat(yearList)
+        })
+        .catch(() => {
+            this.loading = false
+        });
+        
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)