YY há 2 anos atrás
pai
commit
fe489c5d42
1 ficheiros alterados com 32 adições e 13 exclusões
  1. 32 13
      src/views/platSettings/config/index.vue

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

@@ -12,6 +12,11 @@
       <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>
     </data-form>
   </div>
 </template>
@@ -19,6 +24,7 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: config } = createNamespacedHelpers('config');
+const { mapActions: dictData } = createNamespacedHelpers('dictData');
 export default {
   name: 'index',
   props: {},
@@ -34,34 +40,38 @@ export default {
         { label: '底部文字', model: 'bottom_title' },
         { 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: {},
+      form: { bottom_menu: {} },
+      useList: [],
     };
   },
   computed: {
     ...mapState(['user']),
   },
-  created() {
-    this.search();
+  async created() {
+    await this.searchOther();
+    await this.search();
   },
   methods: {
     ...config(['query', 'fetch', 'update']),
+    ...dictData({ dictQuery: 'query' }),
     //执行查询
     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,
-          };
-        }
+        // 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 }) {
@@ -70,6 +80,15 @@ export default {
       const res = await this.update(data);
       this.$checkRes(res, '操作成功', '操作失败');
     },
+    // 查询其他信息
+    async searchOther() {
+      let res;
+      // 是否使用
+      // res = await this.dictQuery({ code: 'use' });
+      // if (this.$checkRes(res)) {
+      //   this.$set(this, `useList`, res.data);
+      // }
+    },
   },
   metaInfo() {
     return { title: this.$route.meta.title };