guhongwei 2 gadi atpakaļ
vecāks
revīzija
ad6eef635a
1 mainītis faili ar 11 papildinājumiem un 12 dzēšanām
  1. 11 12
      src/views/platSettings/config/index.vue

+ 11 - 12
src/views/platSettings/config/index.vue

@@ -62,20 +62,19 @@ export default {
     async search() {
       const res = await this.fetch();
       if (this.$checkRes(res)) {
-        this.$set(this, `form`, res.data);
-        if (this.form.config) {
-          this.form = {
-            ...this.form,
-            logo: this.form.config.logo,
-            buyPoint: this.form.config.buyPoint,
-            pointPlan: this.form.config.pointPlan,
-            share: this.form.config.share,
-            autoCloseOrder: this.form.config.autoCloseOrder,
+        let data = res.data;
+        if (data.config) {
+          data = {
+            ...data,
+            logo: data.config.logo,
+            buyPoint: data.config.buyPoint,
+            pointPlan: data.config.pointPlan,
+            share: data.config.share,
+            autoCloseOrder: data.config.autoCloseOrder,
           };
         }
-        if (!this.form.bottom_menu) {
-          console.log('1');
-        }
+        if (!data.bottom_menu) data.bottom_menu = {};
+        this.$set(this, `form`, data);
       }
     },
     async toSave({ data }) {