谢杰标 3 лет назад
Родитель
Сommit
dce92e0d76

+ 1 - 1
.env.development

@@ -5,7 +5,7 @@ VUE_APP_TITLE =中正云教育管理后台
 ENV = 'development'
 
 # 中正云教育管理后台/开发环境
-VUE_APP_BASE_API = 'http://192.168.1.7:5030/'
+VUE_APP_BASE_API = 'http://120.79.166.78:19013/'
 # VUE_APP_BASE_API = 'http://localhost:5030/'
 VUE_APP_IMG_API = 'https://file-dev.xyyxt.net'
 

+ 8 - 7
src/views/Marketing/goods/spec/compoent/configTable.vue

@@ -86,7 +86,13 @@ export default {
           placeholder: "商品编号",
         },
       ],
-      formData: {},
+      formData: {
+        status: "0,1",
+        pageSize: 10,
+        pageNum: 1,
+        businessId: this.businessId,
+        educationTypeId: this.educationTypeId,
+      },
       loading: false,
       total: 0,
       tableRadio: "",
@@ -143,6 +149,7 @@ export default {
         pageNum: 1,
         businessId: this.businessId,
         educationTypeId: this.educationTypeId,
+        status: "0,1",
       };
       this.search();
     },
@@ -284,12 +291,6 @@ export default {
   },
   created() {
     this.getRowIndex();
-    this.formData = {
-      pageSize: 10,
-      pageNum: 1,
-      businessId: this.businessId,
-      educationTypeId: this.educationTypeId,
-    };
   },
   components: { searchBoxNew, tableList, pagination },
 };

+ 10 - 2
src/views/Marketing/goods/spec/specAdd.vue

@@ -93,7 +93,7 @@
 <script>
 import SpecBox from "./compoent/SpecBox.vue";
 import ConfigTable from "./compoent/configTable.vue";
-import {changeSpec } from "@/api/resource/good";
+import { getSpecDetail, changeSpec } from "@/api/resource/good";
 export default {
   data() {
     var checkList = (rule, value, callback) => {
@@ -160,7 +160,8 @@ export default {
       this.checkSpecBox() &&
         changeSpec(this.ruleForm).then((res) => {
           this.isNext = true;
-          this.ruleForm.specTemplateId = res.data[0].specTemplateId;
+          // this.ruleForm.specTemplateId = res.data[0].specTemplateId;
+          this.getSpecDetail(res.data[0].specTemplateId)
           res.data.map((ele) => {
             ele.attrListVos.map((e, i) => {
               ele["value" + i] = e.value;
@@ -179,6 +180,13 @@ export default {
       }
       return result;
     },
+    getSpecDetail(id) {
+      getSpecDetail(id).then((res) => {
+        Object.keys(this.ruleForm).map((e) => {
+          this.ruleForm[e] = res.data[e];
+        });
+      });
+    },
     back() {
       this.$router.go(-1);
     },