dusenyao преди 3 години
родител
ревизия
219051ae38
променени са 2 файла, в които са добавени 9 реда и са изтрити 7 реда
  1. 8 6
      src/views/course_details/index.vue
  2. 1 1
      src/views/main/curricula_list/teacher.vue

+ 8 - 6
src/views/course_details/index.vue

@@ -318,7 +318,7 @@
         width="720px"
         :before-close="closeaudit"
       >
-        <audit :id="id" :data="CourseData" :goods-type="goodsType" />
+        <audit :id="id" :data="CourseData" :goods-type="goods_type" />
       </el-dialog>
     </div>
   </div>
@@ -333,10 +333,12 @@ export default {
     Audit
   },
   data() {
+    let query = this.$route.query;
+
     return {
-      id: this.$route.query.id,
-      goodsType: this.$route.query.goodsType,
-      readonly: 'readonly' in this.$route.query ? this.$route.query.readonly : false,
+      goods_id: query.goods_id,
+      goods_type: query.goods_type,
+      readonly: 'readonly' in query ? query.readonly : false,
       enshrine: false,
       SelectShow: '1', // 选择展示课程资源还是下载
       openList: [],
@@ -351,12 +353,12 @@ export default {
   created() {
     // 获取课程详情
     this.loading = true;
-    CheckMyGoodsBuyStatus({ goods_type: Number(this.goodsType), goods_id: this.id }).then(
+    CheckMyGoodsBuyStatus({ goods_type: Number(this.goods_type), goods_id: this.goods_id }).then(
       ({ is_buy }) => {
         this.is_buy = is_buy === 'true';
       }
     );
-    GetCourseInfoBox({ id: this.id })
+    GetCourseInfoBox({ id: this.goods_id })
       .then(res => {
         this.CourseData = res;
         this.getBackTime();

+ 1 - 1
src/views/main/curricula_list/teacher.vue

@@ -166,7 +166,7 @@ export default {
       this.$router.push(`/create_course_step_table/course_info?id=${id}`);
     },
     view(id) {
-      this.$router.push(`/GoodsDetail?id=${id}&goodsType=201&readonly=true`);
+      this.$router.push(`/GoodsDetail?goods_id=${id}&goods_type=201&readonly=true`);
     },
     releaseCourse(course_id, is_release) {
       ReleaseCourse({ course_id, is_release }).then(() => {