guhongwei 2 years ago
parent
commit
b204c09f48
1 changed files with 20 additions and 13 deletions
  1. 20 13
      src/views/platSettings/config/index.vue

+ 20 - 13
src/views/platSettings/config/index.vue

@@ -12,6 +12,9 @@
       <template #agree>
       <template #agree>
         <editor v-model="form.agree" url="/files/point/config/upload" />
         <editor v-model="form.agree" url="/files/point/config/upload" />
       </template>
       </template>
+      <template #bottom_title>
+        <data-form :span="24" :fields="testfields" v-model="form.bottom_title" labelWidth="auto" :isSave="false"> </data-form>
+      </template>
     </data-form>
     </data-form>
   </div>
   </div>
 </template>
 </template>
@@ -31,12 +34,16 @@ export default {
         { label: '购物赠送积分', model: 'buyPoint', custom: true },
         { label: '购物赠送积分', model: 'buyPoint', custom: true },
         { label: '自动关闭订单时间', model: 'autoCloseOrder', custom: true },
         { label: '自动关闭订单时间', model: 'autoCloseOrder', custom: true },
         // { label: '积分计划', model: 'pointPlan' },
         // { label: '积分计划', model: 'pointPlan' },
-        { label: '底部文字', model: 'bottom_title' },
+        { label: '底部文字', model: 'bottom_title', custom: true },
         { label: '分享图片', model: 'share', type: 'upload', limit: 1, url: '/files/point/config/upload' },
         { label: '分享图片', model: 'share', type: 'upload', limit: 1, url: '/files/point/config/upload' },
         { label: '用户协议', model: 'agree', custom: true },
         { label: '用户协议', model: 'agree', custom: true },
       ],
       ],
       rules: {},
       rules: {},
-      form: {},
+      form: { bottom_title: {} },
+      testfields: [
+        { label: '是否使用', model: 'is_use' },
+        { label: '菜单列表', model: 'list' },
+      ],
     };
     };
   },
   },
   computed: {
   computed: {
@@ -51,17 +58,17 @@ export default {
     async search() {
     async search() {
       const res = await this.fetch();
       const res = await this.fetch();
       if (this.$checkRes(res)) {
       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,
-          };
-        }
+        // 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,
+        //   };
+        // }
       }
       }
     },
     },
     async toSave({ data }) {
     async toSave({ data }) {