YY 2 년 전
부모
커밋
dcc49abfe2
2개의 변경된 파일21개의 추가작업 그리고 19개의 파일을 삭제
  1. 2 1
      src/components/usual/c-form.vue
  2. 19 18
      src/views/platSettings/config/index.vue

+ 2 - 1
src/components/usual/c-form.vue

@@ -108,7 +108,7 @@
               </template>
             </el-form-item>
           </template>
-          <el-form-item label="" class="btn">
+          <el-form-item label="" class="btn" v-if="isSave">
             <slot name="submit">
               <el-row type="flex" align="middle" justify="start">
                 <el-col :span="6">
@@ -134,6 +134,7 @@ export default {
     submitText: { type: String, default: '保存' },
     form: null,
     reset: { type: Boolean, default: false },
+    isSave: { type: Boolean, default: true },
     span: { type: Number, default: 24 }, // 限制两侧的距离,24就是整行全用
   },
   model: {

+ 19 - 18
src/views/platSettings/config/index.vue

@@ -12,10 +12,8 @@
       <template #agree>
         <editor v-model="form.agree" url="/files/point/config/upload" />
       </template>
-      <template #bottom_menu>
-        <el-radio-group v-model="form.bottom_menu.is_use">
-          <el-radio v-for="(item, index) in useList" :key="index" :label="item.value">{{ item.label }}</el-radio>
-        </el-radio-group>
+      <template #bottom_title>
+        <data-form :span="24" :fields="testfields" v-model="form.bottom_title" labelWidth="auto" :isSave="false"> </data-form>
       </template>
     </data-form>
   </div>
@@ -37,14 +35,17 @@ export default {
         { label: '购物赠送积分', model: 'buyPoint', custom: true },
         { label: '自动关闭订单时间', model: 'autoCloseOrder', custom: true },
         // { label: '积分计划', model: 'pointPlan' },
-        { label: '底部文字', model: 'bottom_title' },
+        { label: '底部文字', model: 'bottom_title', custom: true },
+        { label: '底部菜单', model: 'bottom_menu', custom: true },
         { label: '分享图片', model: 'share', type: 'upload', limit: 1, url: '/files/point/config/upload' },
         { label: '用户协议', model: 'agree', custom: true },
-        { label: '底部菜单', model: 'bottom_menu', custom: true },
       ],
       rules: {},
-      form: { bottom_menu: {} },
-      useList: [],
+      form: {},
+      testfields: [
+        { label: '是否使用', model: 'is_use', type: 'radio' },
+        { label: '菜单列表', model: 'list', custom: true },
+      ],
     };
   },
   computed: {
@@ -62,16 +63,16 @@ export default {
       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,
-        //   };
-        // }
+        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 }) {