Prechádzať zdrojové kódy

修改 收藏和订单新增参数

秦鹏 3 rokov pred
rodič
commit
6728755198

+ 3 - 1
src/components/payment/Confirmorder.vue

@@ -73,7 +73,7 @@ import { LearnWebSI } from "@/api/api";
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
-  props: ["data", "changeOrderNumber", "goods_type"],
+  props: ["data", "changeOrderNumber", "goods_type","goods_detail_type"],
   data() {
     //这里存放数据
     return {
@@ -153,6 +153,8 @@ export default {
         goods_person_name_desc: this.data.pymentTeacher, //老师
         price: item.price, //价格
         discount_code: this.back_discount_code,
+        goods_detail_type: this.goods_detail_type,
+
       })
         .then((res) => {
           this.changeOrderNumber(

+ 14 - 0
src/views/teacher-dev/Preview.vue

@@ -79,6 +79,7 @@
         :data="data"
         :goods_type="401"
         :changeOrderNumber="changeOrderNumber"
+        :goods_detail_type="goods_detail_type"
       />
     </el-dialog>
     <el-dialog
@@ -132,6 +133,7 @@ export default {
       IsDownload: false, //是否可以下载
       allList: null,
       isData: false,
+      goods_detail_type: null,
     };
   },
   computed: {},
@@ -241,6 +243,7 @@ export default {
           goods_person_name_desc: this.data.teacher,
           goods_picture_id: this.data.coverFileId,
           goods_price: this.data.price,
+          goods_detail_type: this.goods_detail_type,
         })
           .then((res) => {
             this.$message({
@@ -303,6 +306,7 @@ export default {
               this.getNumPages();
             }
             this.changePrice(this.data.price * 1, 24, 16);
+            this.goods_detail_type = this.getimgurl(this.data);
           }
         })
         .catch((res) => {
@@ -351,6 +355,16 @@ export default {
           this.loading = false;
         });
     },
+    getimgurl(item) {
+      let index = item.tag.indexOf("downloadable");
+      let type = "";
+      if (index != -1) {
+        type = item.tag[2];
+      } else {
+        type = item.tag[1];
+      }
+      return type;
+    },
   },
   async created() {
     await updateWordPack({

+ 1 - 0
src/views/teacher-dev/index.vue

@@ -230,6 +230,7 @@ export default {
     img {
       width: 18px;
       height: 18px;
+      cursor:pointer;
     }
   }
   .nav_title {

+ 2 - 0
src/views/teacher-devEntering/index.vue

@@ -455,6 +455,8 @@ export default {
       img {
         width: 18px;
         height: 18px;
+      cursor:pointer;
+        
       }
     }
     .btn {