Forráskód Böngészése

fix: 修复组件加载时不调用接口的问题

pangqijun 3 hónapja
szülő
commit
98115b822d

+ 1 - 1
src/api/facility/facility.js

@@ -34,7 +34,7 @@ export const remove = (ids) => {
 
 export const add = (row) => {
   return request({
-    url: '/api/facility/submit',
+    url: '/api/facility/save',
     method: 'post',
     data: row
   })

+ 1 - 1
src/config/env.js

@@ -10,7 +10,7 @@ if (env.NODE_ENV === 'development') {
 } else if (env.NODE_ENV === 'production') {
     baseUrl = `http://manage.changgengkeji.com/`; //生产环境地址
 } else if (env.NODE_ENV === 'test') {
-    baseUrl = `http://sellwine.gzzzyd.com/`; //测试环境地址
+    baseUrl = `https://sellwine.gzzzyd.com/`; //测试环境地址
 }
 export {
     baseUrl,

+ 4 - 2
src/views/business/facilitycargoway.vue

@@ -189,8 +189,10 @@
         return ids.join(",");
       }
     },
-    created() {
-      this.onLoad(this.page)
+    watch: {
+      facilityId: function () {
+        this.onLoad(this.page)
+      }
     },
     methods: {
       rowSave(row, done, loading) {

+ 4 - 2
src/views/business/view-shop.vue

@@ -175,8 +175,10 @@
         return ids.join(",");
       }
     },
-    created() {
-      this.onLoad(this.page)
+    watch: {
+      merchantId: function () {
+        this.onLoad(this.page)
+      }
     },
     methods: {
       rowSave(row, done, loading) {

+ 4 - 2
src/views/system/childAccount.vue

@@ -98,8 +98,10 @@
         return ids.join(",");
       }
     },
-    created() {
-      this.onLoad(this.page);
+    watch: {
+      parentId: function () {
+        this.onLoad(this.page)
+      }
     },
     methods: {
       rowSave(row, done, loading) {