ソースを参照

修改预览显示

lex-xin 4 年 前
コミット
d372769c9c
2 ファイル変更37 行追加13 行削除
  1. 33 9
      src/views/resetTeaming/modals/subject-preview.vue
  2. 4 4
      vue.config.js

+ 33 - 9
src/views/resetTeaming/modals/subject-preview.vue

@@ -257,7 +257,8 @@ export default {
             courseViewType: 0, // 收费模式,0 课程显示,1 AMR系统
             leBaoStatus: false,
 			buyMaintenance: false, // 是否开启乐保
-            isClickStatus: false
+            isClickStatus: false,
+            accessStatus: false, // 是否有辅件乐保
         };
     },
     mounted() {
@@ -434,9 +435,26 @@ export default {
                             }
                         })
 
+                        // 判断辅件是否有乐器维护(编号固定76)
+                        let accessStatus = false // 是否有乐保
+                        this.accessOries.forEach(item => {
+                            // 判断子商品是否有乐保
+                            if(item.childGoodsList && item.childGoodsList.length > 0) {
+                                item.childGoodsList.forEach(child => {
+                                    if(child.id == 76) {
+                                        accessStatus = true
+                                    }
+                                })
+                            }
+                            if(item.goodsIdList == 76) {
+                                accessStatus = true
+                            }
+                        })
+                        this.accessStatus = accessStatus
+
                         // 乐保服务初始化
                         this.instrumentResult.forEach(item => {
-                            if(item.checked && item.kitType == "GROUP") {
+                            if(item.checked && item.kitType == "GROUP" && !accessStatus) {
                                 this.leBaoStatus = true
                                 this.buyMaintenance = true
                             }
@@ -510,13 +528,16 @@ export default {
                 item.checked = false
             })
             item.checked = true
-            if(item.kitType == "GROUP") {
-                this.leBaoStatus = true
-                this.buyMaintenance = true
-            } else {
-                this.leBaoStatus = false
-                this.buyMaintenance = false
+            if(!this.accessStatus) {
+                if(item.kitType != "owned") {
+                    this.leBaoStatus = true
+                    this.buyMaintenance = true
+                } else {
+                    this.leBaoStatus = false
+                    this.buyMaintenance = false
+                }
             }
+
             // 重新计算金额
             this.calcPrice()
         },
@@ -571,6 +592,7 @@ export default {
                             tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
                         }
                     });
+                    marketPrice += parseFloat(m)
                     buyList.unshift({
                         name: this.chargeTypeName,
                         type: paymentPatternType[this.paymentPattern],
@@ -581,13 +603,15 @@ export default {
                     csi.forEach(item => {
                         if (item.isStatus) {
                             musicClassFee += parseFloat(item.courseCurrentPrice)
-                            marketPrice += parseFloat(item.courseOriginalPrice)
+                            // marketPrice += parseFloat(item.courseOriginalPrice)
                             if (item.id > 0) {
                                 courseKeys.push(item.id)
                             }
                             // 不可选的课程才会减免课程费用
                             if (!item.isStudentOptional) {
                                 tempGroupRemissionCourseFee += parseFloat(item.courseCurrentPrice)
+                            } else {
+                                marketPrice += parseFloat(item.courseOriginalPrice)
                             }
                         }
                     })

+ 4 - 4
vue.config.js

@@ -20,8 +20,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 测试服
-// let target = 'http://47.114.176.40:8000' //开发环境
+// let target = 'http://dev.dayaedu.com' // 测试服
+let target = 'https://test.dayaedu.com' //开发环境
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -55,7 +55,7 @@ module.exports = {
     //   warnings: false,
     //   errors: true
     // },
-    // https: true,
+    https: true,
     proxy: {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy
@@ -64,7 +64,7 @@ module.exports = {
       // http://192.168.3.134
       // http://47.114.176.40:8000
       '/api-auth': {
-        target: 'http://dev.dayaedu.com',
+        target: 'https://test.dayaedu.com',
         changeOrigin: true,
         pathRewrite: {
           '^api-auth': ''