From 6afbc2b03224d8675adbb688157061d3ff1a2b3a Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Thu, 3 Sep 2020 14:56:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B6=B3=E8=BF=B9=EF=BC=8C?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/shop/collect/index.vue | 8 ++++++-- src/views/shop/foot/index.vue | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/shop/collect/index.vue b/src/views/shop/collect/index.vue index 6ef6c7e..4af75ef 100644 --- a/src/views/shop/collect/index.vue +++ b/src/views/shop/collect/index.vue @@ -85,7 +85,7 @@ import pagination from '@crud/Pagination' import MaterialList from "@/components/material"; // crud交由presenter持有 -const defaultCrud = CRUD({ title: 'ProductRelation', url: 'api/yxStoreProductRelation', type:'collect',sort: 'creat_time,desc', crudMethod: { ...crudYxStoreProductRelation }}) +const defaultCrud = CRUD({ title: 'ProductRelation', url: 'api/yxStoreProductRelation', sort: 'creat_time,desc', crudMethod: { ...crudYxStoreProductRelation }}) const defaultForm = { id: null, uid: null, productId: null, type: null, category: null, createTime: null, updateTime: null, isDel: null } export default { name: 'YxStoreProductRelation', @@ -93,7 +93,9 @@ export default { mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], data() { return { - + query: { + type: 'collect', + }, permission: { add: ['admin', 'yxStoreProductRelation:add'], edit: ['admin', 'yxStoreProductRelation:edit'], @@ -116,6 +118,8 @@ export default { methods: { // 获取数据前设置好接口地址 [CRUD.HOOK.beforeRefresh]() { + const query = this.query + this.crud.params[query.type] = 'collect' return true }, // 新增与编辑前做的操作 [CRUD.HOOK.afterToCU](crud, form) { diff --git a/src/views/shop/foot/index.vue b/src/views/shop/foot/index.vue index 10228bd..2284df9 100644 --- a/src/views/shop/foot/index.vue +++ b/src/views/shop/foot/index.vue @@ -93,7 +93,9 @@ export default { mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], data() { return { - + query:{ + type: 'foot', + }, permission: { add: ['admin', 'yxStoreProductRelation:add'], edit: ['admin', 'yxStoreProductRelation:edit'], @@ -116,6 +118,8 @@ export default { methods: { // 获取数据前设置好接口地址 [CRUD.HOOK.beforeRefresh]() { + const query = this.query + this.crud.params[query.type] = 'foot' return true }, // 新增与编辑前做的操作 [CRUD.HOOK.afterToCU](crud, form) {