diff --git a/src/views/product/info/index.vue b/src/views/product/info/index.vue index db91d99..e9aabb8 100644 --- a/src/views/product/info/index.vue +++ b/src/views/product/info/index.vue @@ -256,19 +256,19 @@ 添加商品属性 - 添加自有属性 - + 添加自有属性 + - + - + - + - 确定 + 确定 @@ -337,6 +337,7 @@ import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/product/i import {listBrand} from "@/api/product/brand"; import {getTemplateAttribute, listCategory} from "@/api/product/category"; import {listRule} from "@/api/product/rule"; +import {addAttribute} from "@/api/product/attribute"; export default { name: "Info", @@ -393,10 +394,10 @@ export default { categoryOptionValue: [], ruleList: [], activeName: "attributeGroup", - customPropertiesForm: { + customAttributeForm: { }, - customPropertiesFormStatus: false, + customAttributeFormStatus: false, attributeIdCheckedList: [], attributeCheckedList: [], categoryCommonElement: { @@ -440,6 +441,18 @@ export default { this.getList(); }, methods: { + saveCustomAttribute(){ + addAttribute({"code": this.customAttributeForm.code, "name": this.customAttributeForm.name}).then(response => { + if (response.code === 200){ + // 添加逻辑 + let attributeId = response.data, + code = this.customAttributeForm.code, + name = this.customAttributeForm.name, + value = this.customAttributeForm.value; + + } + }) + }, attributeCheckedFun() { // attributeIdCheckedList -> attributeCheckedList 不在 // 1 -> ID 1 : attributeCheckedList[] -> 1