Commit 99ae6c14 authored by 武广's avatar 武广

fix: 修改属性为数字不传的问题

parent 0a3152f9
......@@ -439,9 +439,16 @@ class goodsManage extends Component {
item[key].forEach(attr => {
try {
const json = JSON.parse(attr);
if (typeof json === 'object') {
if (this.checkInAttrList(json.attributeValueId)) {
attrs.push(json);
}
} else {
if (`${json}` && `${json}`.length > 30) {
isMaxLength = true;
}
attrs.push({ attributeValueName: json });
}
} catch {
if (attr && attr.length > 30) {
isMaxLength = true;
......@@ -452,9 +459,16 @@ class goodsManage extends Component {
} else {
try {
const json = JSON.parse(item[key]);
if (typeof json === 'object') {
if (this.checkInAttrList(json.attributeValueId)) {
attrs = [json];
}
} else {
if (`${json}` && `${json}`.length > 30) {
isMaxLength = true;
}
attrs.push({ attributeValueName: json });
}
} catch {
if (item[key] && item[key].length > 30) {
isMaxLength = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment