[更新]修改产品表单

This commit is contained in:
Anyon 2018-05-03 17:24:01 +08:00
parent a510511a2b
commit be8a9f18fa

View File

@ -279,10 +279,10 @@
var specName = specs[i];
var specTitle = (specName === 'default:default') ? '默认规格' : specName.replace(/,/ig, ';').replace(/:/ig, ':');
var specAttrs = [], lines = specTitle.split(';');
for (var i in lines) {
var line = lines[i].split(':');
for (var j in lines) {
var line = lines[].split(':');
specAttrs.push({name: line[0], value: (line[1] || '').split(',')});
}
}j
list.push({
spec_name: specName, spec_title: specTitle, spec_attrs: specAttrs,
market_price: parseFloat(this.getData(specs[i], 'market_price') || '0').toFixed(2),