商品编辑
var app = angular.module("goodApp", []);
app.controller("goodController", function ($scope, $controller) {
// 参数数据
$scope.entity = {
goods: {},
goodsDesc: {
specificationItems: []
},
itemList: []
}
// 规格属性数据
$scope.specList = [
{id: 1, text: "内存", options: [{optionName: "4G"}, {optionName: "8G"}, {optionName: "12G"}]},
{id: 2, text: "颜色", options: [{optionName: "红色"}, {optionName: "白色"}, {optionName: "蓝色"}]},
{id: 3, text: "尺寸", options: [{optionName: "5.5"}, {optionName: "6.0"}, {optionName: "6.5"}]}
];
// 点击选中后生成specificationItems中的数据
// 格式: [{specName:"内存",options:["4G","8G"]},{specName:"颜色",options:["红色