diff --git a/src/api/product/info.js b/src/api/product/info.js
index e15e6f7..0f1cf09 100644
--- a/src/api/product/info.js
+++ b/src/api/product/info.js
@@ -36,7 +36,7 @@ export function addInfo(data) {
// 修改商品信息
export function updateInfo(data) {
return request({
- url: '/product/info/'+data.id,
+ url: '/product/info/'+data.projectAddModel.id,
method: 'put',
data: data
})
diff --git a/src/views/product/category/index.vue b/src/views/product/category/index.vue
index 1cbcb67..a348143 100644
--- a/src/views/product/category/index.vue
+++ b/src/views/product/category/index.vue
@@ -153,14 +153,15 @@
-
+
-
+ {{form}}
+
-
-
+
+
@@ -723,6 +723,11 @@ export default {
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data;
+ this.categoryOptionValue = [
+ this.form.mianType ,
+ this.form.parentType ,
+ this.form.type ,
+ ]
this.open = true;
this.title = "修改商品信息";
});
@@ -733,11 +738,11 @@ export default {
if (valid) {
let attrValueList = [];
for (const templateAttributeGroup of this.categoryCommonElement.templateAttributeGroupList) {
- templateAttributeGroup.attributeList.map(attribute => attrValueList.push({id: attribute.id, value: attribute.value}))
+ templateAttributeGroup.attributeList.map(attribute => attrValueList.push({id: attribute.id, name: attribute.name}))
}
- this.categoryCommonElement.templateAttributeList.map(attribute => attrValueList.push({id: attribute.id, value: attribute.value}))
- this.attributeCheckedList.map(attribute => attrValueList.push({id: attribute.id, value: attribute.value}))
+ this.categoryCommonElement.templateAttributeList.map(attribute => attrValueList.push({id: attribute.id, name: attribute.name}))
+ this.attributeCheckedList.map(attribute => attrValueList.push({id: attribute.id, name: attribute.name}))
let ruleInfo = this.ruleList.find(ruleInfo => ruleInfo.id === this.form.ruleId);
const {ruleAttrList} = ruleInfo;
let ruleAttrSize = ruleAttrList.length;
@@ -766,13 +771,13 @@ export default {
console.log(productAddReq)
if (this.form.id != null) {
updateInfo(productAddReq).then(response => {
- this.$modal.msgSuccess("修改成功");
+ this.$modal.msgSuccess(response.msg);
this.open = false;
this.getList();
});
} else {
addInfo(productAddReq).then(response => {
- this.$modal.msgSuccess("新增成功");
+ this.$modal.msgSuccess(response.msg);
this.open = false;
this.getList();
});