Browse Source

update 课程详情

dusenyao 3 năm trước cách đây
mục cha
commit
9f249999ab
2 tập tin đã thay đổi với 8 bổ sung5 xóa
  1. 7 4
      src/components/payment/Audit.vue
  2. 1 1
      src/views/course_details/index.vue

+ 7 - 4
src/components/payment/Audit.vue

@@ -62,10 +62,13 @@ export default {
     id: {
       default: '',
       type: String
+    },
+    goodsType: {
+      default: '201',
+      type: String
     }
   },
   data() {
-    // 这里存放数据
     return {
       discount_code: '', // 优惠码
       discount_money: 0.0, // 优惠金额
@@ -78,9 +81,9 @@ export default {
     buy() {
       ApplyJoinCourse({
         course_id: this.id, // 课程 ID
-        discount_code: '' // 优惠码 (目前暂时没有用到)
-      }).then(res => {
-        console.log(res);
+        discount_code: this.discount_code // 优惠码 (目前暂时没有用到)
+      }).then(() => {
+        this.$message.success('申请加入课程成功');
       });
     }
   }

+ 1 - 1
src/views/course_details/index.vue

@@ -525,7 +525,7 @@
         width="720px"
         :before-close="closeaudit"
       >
-        <audit :id="id" :data="CourseData" :goods_type="$route.query.goodsType" />
+        <audit :id="id" :data="CourseData" :goods-type="$route.query.goodsType" />
       </el-dialog>
     </div>
   </div>