diff --git a/src/api/product/attributeGroup.js b/src/api/product/attributeGroup.js index 31ad9ae..b8c5e62 100644 --- a/src/api/product/attributeGroup.js +++ b/src/api/product/attributeGroup.js @@ -12,7 +12,7 @@ export function listAttributeGroup(query) { // 查询商品属性组详细 export function getAttributeGroup(id) { return request({ - url: '/product/attributeGroup/' + id, + url: '/product/attributeGroup/getInfo?id='+ id, method: 'get' }) } diff --git a/src/api/product/category.js b/src/api/product/category.js index a8ab19f..449bfd6 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -17,6 +17,15 @@ export function getCategory(id) { }) } +//通过父类id 查询品类详情 +export function parentCategoryCommon(id) { + return request({ + url: '/product/category/parentCategoryCommon/' + id, + method: 'get' + }) +} + + // 新增品类信息 export function addCategory(data) { return request({ diff --git a/src/components/Attribute/index.vue b/src/components/Attribute/index.vue new file mode 100644 index 0000000..1f6435a --- /dev/null +++ b/src/components/Attribute/index.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/src/components/AttributeGroup/index.vue b/src/components/AttributeGroup/index.vue new file mode 100644 index 0000000..5a7f82e --- /dev/null +++ b/src/components/AttributeGroup/index.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/src/components/Brand/index.vue b/src/components/Brand/index.vue new file mode 100644 index 0000000..0968579 --- /dev/null +++ b/src/components/Brand/index.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/src/main.js b/src/main.js index 546f125..dd64c8b 100644 --- a/src/main.js +++ b/src/main.js @@ -38,6 +38,17 @@ import VueMeta from 'vue-meta' // 字典数据组件 import DictData from '@/components/DictData' + +// 属性选择 +import Attribute from "@/components/Attribute/index.vue"; + +// 品牌选择 +import Brand from "@/components/Brand/index.vue"; + +// 品牌选择 +import AttributeGroup from "@/components/AttributeGroup/index.vue"; + + // 全局方法挂载 Vue.prototype.getDicts = getDicts Vue.prototype.getConfigKey = getConfigKey @@ -48,6 +59,9 @@ Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.download = download Vue.prototype.handleTree = handleTree +Vue.component('Attribute', Attribute) +Vue.component('Brand', Brand) +Vue.component('AttributeGroup', AttributeGroup) // 全局组件挂载 Vue.component('DictTag', DictTag) diff --git a/src/views/product/attribute/index.vue b/src/views/product/attribute/index.vue index 12e71a5..18d9c46 100644 --- a/src/views/product/attribute/index.vue +++ b/src/views/product/attribute/index.vue @@ -1,5 +1,8 @@