Authored by dongjunjie

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

@@ -22,13 +22,12 @@ common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: param[ @@ -22,13 +22,12 @@ common.util.__ajax({url: '/meterManage/tryInfo/info1', data: {productSkn: param[
22 for (var i = 0; i < modelLists.length; i++) { 22 for (var i = 0; i < modelLists.length; i++) {
23 if (tryInfo[modelLists[i].id]) { 23 if (tryInfo[modelLists[i].id]) {
24 modelLists[i].tryInfo = {}; 24 modelLists[i].tryInfo = {};
25 - tryInfo[modelLists[i].id].feel_id = feelIds[tryInfo[modelLists[i].id].feel_id];  
26 modelLists[i].tryInfo = tryInfo[modelLists[i].id]; 25 modelLists[i].tryInfo = tryInfo[modelLists[i].id];
  26 + modelLists[i].tryInfo.fell_name = feelIds[tryInfo[modelLists[i].id].feel_id];
27 } 27 }
28 else { 28 else {
29 modelLists[i].tryInfo = {}; 29 modelLists[i].tryInfo = {};
30 modelLists[i].tryInfo.fit_size = ""; 30 modelLists[i].tryInfo.fit_size = "";
31 - modelLists[i].tryInfo.feel_id = "";  
32 modelLists[i].tryInfo.fit_remark = ""; 31 modelLists[i].tryInfo.fit_remark = "";
33 } 32 }
34 } 33 }
@@ -52,32 +51,44 @@ $(document).on("change", ".tryInfo1", function () { @@ -52,32 +51,44 @@ $(document).on("change", ".tryInfo1", function () {
52 var item = modelLists[_index].tryInfo; 51 var item = modelLists[_index].tryInfo;
53 var name = $(this).data('name'); 52 var name = $(this).data('name');
54 item[name] = $(this).val(); 53 item[name] = $(this).val();
55 - console.log("item", item);  
56 }); 54 });
  55 +//保存试穿信息
57 $(document).on("click", "#addInfo", function () { 56 $(document).on("click", "#addInfo", function () {
58 - console.log("modelLists", modelLists);  
59 - //var newList = [];  
60 - //for (var i = 0; i < modelLists.length; i++) {  
61 - // console.log("modelLists");  
62 - // console.log(modelLists[i]);  
63 - // newList[i]={};  
64 - // newList[i].model_id = modelLists[i].id;  
65 - // newList[i].feel_id = modelLists[i].tryInfo.feel_id;  
66 - // newList[i].fit_size = modelLists[i].tryInfo.fit_size;  
67 - // newList[i].fit_remark = modelLists[i].tryInfo.fit_remark;  
68 - //}  
69 - //console.log("newList");  
70 - //console.log(newList); 57 + var newList = [];
  58 + for (var i = 0; i < modelLists.length; i++) {
  59 + newList[i] = {};
  60 + newList[i].model_id = modelLists[i].id;
  61 + if (modelLists[i].tryInfo) {
  62 + newList[i].feel_id = modelLists[i].tryInfo.feel_id;
  63 + newList[i].fit_size = modelLists[i].tryInfo.fit_size;
  64 + newList[i].fit_remark = modelLists[i].tryInfo.fit_remark;
  65 + }
  66 + else {
  67 + newList[i].feel_id = "";
  68 + newList[i].fit_size = "";
  69 + newList[i].fit_remark = "";
  70 + }
  71 + }
71 common.util.__ajax({ 72 common.util.__ajax({
72 url: '/meterManage/tryInfo/add', 73 url: '/meterManage/tryInfo/add',
73 data: { 74 data: {
74 productSkn: param[2], 75 productSkn: param[2],
75 - productModelTry: JSON.stringify(modelLists) 76 + productModelTry: JSON.stringify(newList)
  77 + }
  78 + }, function (res) {
  79 + if (res.code == '200') {
  80 + window.location.href = "/meterManage/tryInfo/index"
  81 + }
  82 + else {
  83 +
76 } 84 }
77 - }, function () {  
78 - console.log("成功")  
79 }); 85 });
80 -}) 86 +});
  87 +//返回
  88 +$(document).on("click", ".back", function () {
  89 + window.location.href = "/meterManage/tryInfo/index"
  90 +});
  91 +
81 92
82 93
83 94
@@ -17,7 +17,7 @@ var g = new common.grid({ @@ -17,7 +17,7 @@ var g = new common.grid({
17 modelName: common.util.__input('content-filter1'), 17 modelName: common.util.__input('content-filter1'),
18 englishName: common.util.__input('content-filter2'), 18 englishName: common.util.__input('content-filter2'),
19 status: common.util.__input('status-filter'), 19 status: common.util.__input('status-filter'),
20 - modelType: $("#aa").val() 20 + modelType: parseInt($("#aa").val())
21 }; 21 };
22 }, 22 },
23 23
@@ -27,7 +27,6 @@ var g = new common.grid({ @@ -27,7 +27,6 @@ var g = new common.grid({
27 {display: "英文名", name: "englishName"}, 27 {display: "英文名", name: "englishName"},
28 { 28 {
29 display: "头像", name: "avatar", render: function (item) { 29 display: "头像", name: "avatar", render: function (item) {
30 - console.log(item);  
31 return '<img src="' + item.avatar + '" width="100" height="60"/>' 30 return '<img src="' + item.avatar + '" width="100" height="60"/>'
32 } 31 }
33 },//图片显示 32 },//图片显示
@@ -105,7 +104,6 @@ var Bll = { @@ -105,7 +104,6 @@ var Bll = {
105 option.data.weight = parseInt($("#weight").val());//模特体重 104 option.data.weight = parseInt($("#weight").val());//模特体重
106 option.data.status = 1;//模特状态,默认启用 105 option.data.status = 1;//模特状态,默认启用
107 option.data.vitalStatistics = $("#Bust").val() + '|' + $("#waist").val() + "|" + $("#hips").val();//模特三围,拼接字符串 106 option.data.vitalStatistics = $("#Bust").val() + '|' + $("#waist").val() + "|" + $("#hips").val();//模特三围,拼接字符串
108 - //console.log("data", option.data);  
109 //option.debug = true;//调试状态 107 //option.debug = true;//调试状态
110 option.success = function (res) { 108 option.success = function (res) {
111 //判断接口请求状态 109 //判断接口请求状态
@@ -61,27 +61,50 @@ var g = new common.grid({ @@ -61,27 +61,50 @@ var g = new common.grid({
61 ] 61 ]
62 }); 62 });
63 g.init("/shotManage/proPhoto/index2"); 63 g.init("/shotManage/proPhoto/index2");
64 -var pictureBoList = []; 64 +
  65 +
65 var Bll = { 66 var Bll = {
66 - toast: function (url, item, hint) {  
67 - var a = common.dialog.confirm(hint,  
68 - common.util.__template2($("#template1").html(), item),  
69 - function () {  
70 - console.log("JSON.stringify(pictureBoList)", typeof(JSON.stringify(pictureBoList)));  
71 - common.util.__ajax({  
72 - url: url,  
73 - data: {  
74 - productSku: parseInt($("#Sku").val()),  
75 - productPhotoAddStrList: JSON.stringify(pictureBoList)  
76 - }  
77 - }, function (res) {  
78 - if(res.code=='200'){  
79 - g.reload();  
80 - a.close();  
81 - }  
82 - });  
83 - return false;  
84 - }); 67 + pictureBoList: [],
  68 + selectedBoId: [],
  69 + //重新渲染图片列表
  70 + rendBoList: function (pictureBoList) {
  71 + $(".image-list").html('');
  72 + $("#addPic").append(common.util.__template2($("#template2").html(),
  73 + {
  74 + pictureBoList: pictureBoList
  75 + }
  76 + ));
  77 + },
  78 + toast: function (url, item, datacall) {
  79 + Bll.pictureBoList = item.pictureBoList || [];
  80 + Bll.selectedBoId = [];
  81 + var a = new common.dialog({
  82 + title: "图片",
  83 + width: '80%',
  84 + content: common.util.__template2($("#template1").html(), item),
  85 + button: [
  86 + {
  87 + value: "提交", callback: function () {
  88 + var data = datacall && datacall(Bll.pictureBoList, Bll.selectedBoId);
  89 + common.util.__ajax({
  90 + url: url,
  91 + data: data
  92 + }, function (res) {
  93 + if (res.code == '200') {
  94 + g.reload();
  95 + a.close();
  96 + }
  97 + });
  98 + return false;
  99 + }, css: "btn-primary"
  100 + },
  101 + {
  102 + "value":"取消",
  103 + css: "btn-info"
  104 + }
  105 + ]
  106 + });
  107 + Bll.rendBoList(Bll.pictureBoList);
85 common.edit.ajaxfileupload(".picfile", { 108 common.edit.ajaxfileupload(".picfile", {
86 params: { 109 params: {
87 __type: "upload", 110 __type: "upload",
@@ -90,74 +113,57 @@ var Bll = { @@ -90,74 +113,57 @@ var Bll = {
90 valid_extensions: ['png', 'jpg', 'jpeg'], 113 valid_extensions: ['png', 'jpg', 'jpeg'],
91 onComplete: function (response) { 114 onComplete: function (response) {
92 if (response.status && response.code == 200) { 115 if (response.status && response.code == 200) {
93 - console.log("response",response); 116 + console.log("response", response);
94 var data = { 117 var data = {
95 "fileName": response.data, 118 "fileName": response.data,
96 "originalName": "1035027.jpg" 119 "originalName": "1035027.jpg"
97 }; 120 };
98 - pictureBoList.push(data);  
99 - $("#addPic").html(common.util.__template2($("#template2").html(),  
100 - {  
101 - pictureBoList: pictureBoList  
102 - }  
103 - )); 121 + Bll.pictureBoList.push(data);
  122 + Bll.rendBoList(Bll.pictureBoList);
104 } 123 }
105 else { 124 else {
106 common.util.__tip(response.message, 'warning'); 125 common.util.__tip(response.message, 'warning');
107 } 126 }
108 } 127 }
109 }); 128 });
110 - $(document).on('click', '.remove-item-btn', function () {  
111 - var index = $(this).parents(".cover-image-item").index();  
112 - //界面删除  
113 - $(this).parents('.cover-image-item').remove();  
114 - //数组中删除  
115 - pictureBoList.splice(index, 1);  
116 - }); 129 +
117 } 130 }
118 }; 131 };
119 //上传图片--点击事件 132 //上传图片--点击事件
120 $('#upload-btn').on('click', function () { 133 $('#upload-btn').on('click', function () {
121 - var item = {};  
122 - Bll.toast('/shotManage/proPhoto/add', item, "上传图片"); 134 + var item = {
  135 + __state: "add"
  136 + };
  137 + Bll.toast('/shotManage/proPhoto/add', item, function (pictureBoList, selectedBoId) {
  138 + return {
  139 + productSku: parseInt($("#Sku").val()),
  140 + productPhotoAddStrList: JSON.stringify(pictureBoList)
  141 + }
  142 + });
123 }); 143 });
124 -  
125 -  
126 -//查询按钮--点击事件  
127 -$(document).on('click', '#filter-btn', function () {  
128 - g.reload(1); 144 +//删除单张图片
  145 +$(document).on('click', '.remove1', function () {
  146 + var index = $(this).data("index");
  147 + Bll.selectedBoId.push(Bll.pictureBoList[index].id);
  148 + Bll.pictureBoList.splice(index, 1);
  149 + Bll.rendBoList(Bll.pictureBoList);
129 }); 150 });
130 -////删除单张图  
131 -  
132 151
133 //编辑 152 //编辑
134 $(document).on('click', '.update', function () { 153 $(document).on('click', '.update', function () {
135 - var ids = [];  
136 var item = g.rows[$(this).data("index")]; 154 var item = g.rows[$(this).data("index")];
137 - var pics = item.pictureBoList || [];  
138 - $(document).on('click', '.remove-item-btn', function () {  
139 - var index = $(this).parents(".cover-image-item").index();  
140 - //界面删除  
141 - $(this).parents('.cover-image-item').remove();  
142 - ids.push(pics[index].id);  
143 - pics.splice(index, 1);  
144 - console.log("ids",ids); 155 + item.__state = "update";
  156 + Bll.toast('/shotManage/proPhoto/update', item, function (pictureBoList, selectedBoId) {
  157 + return {
  158 + productSkn: item.productSkn,
  159 + ids: JSON.stringify(selectedBoId)
  160 + }
145 }); 161 });
146 - var b = common.dialog.confirm("编辑", common.util.__template2($("#template3").html(), item),  
147 - function () {  
148 - common.util.__ajax({  
149 - url: "/shotManage/proPhoto/update",  
150 - data: {  
151 - productSkn: item.productSkn,  
152 - ids: JSON.stringify(ids)  
153 - }  
154 - }, function (res) {  
155 - ids=[];  
156 - g.reload();  
157 - });  
158 -  
159 - })  
160 }); 162 });
161 163
  164 +//查询按钮--点击事件
  165 +$(document).on('click', '#filter-btn', function () {
  166 + g.reload(1);
  167 +});
162 168
163 169
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 * 模特管理 3 * 模特管理
4 */ 4 */
5 //exports.domain = require('../config/common.js').domain; 5 //exports.domain = require('../config/common.js').domain;
6 -exports.domain = 'http://172.16.6.162:8088/platform'; //李建  
7 -//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境 6 +//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
  7 +exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
8 8
9 exports.res = [ 9 exports.res = [
10 //主界面 10 //主界面
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 * 试穿信息管理 3 * 试穿信息管理
4 */ 4 */
5 //exports.domain = require('../config/common.js').domain; 5 //exports.domain = require('../config/common.js').domain;
6 -//exports.domain = 'http://172.16.6.162:8088/platform'; //李建  
7 -exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境 6 +exports.domain = 'http://172.16.6.162:8088/platform'; //李建
  7 +//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
8 8
9 exports.res = [ 9 exports.res = [
10 //主界面 10 //主界面
@@ -34,8 +34,8 @@ exports.res = [ @@ -34,8 +34,8 @@ exports.res = [
34 view: 'pages/meterManage/info', 34 view: 'pages/meterManage/info',
35 src: '/meterManage/info' 35 src: '/meterManage/info'
36 }, 36 },
  37 + // 获取商品详情数据
37 { 38 {
38 - // 获取商品详情数据  
39 route: '/meterManage/tryInfo/info1', 39 route: '/meterManage/tryInfo/info1',
40 method: 'POST', 40 method: 'POST',
41 url: '/productExtraInfo/queryProdExtraInfo', 41 url: '/productExtraInfo/queryProdExtraInfo',
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 * 试穿模特管理 3 * 试穿模特管理
4 */ 4 */
5 //exports.domain = require('../config/common.js').domain; 5 //exports.domain = require('../config/common.js').domain;
6 -//exports.domain = 'http://172.16.6.162:8080/platform'; //李建 6 +//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
7 exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境 7 exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
8 8
9 exports.res = [ 9 exports.res = [
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 </div> 20 </div>
21 <div class="col-sm-4"> 21 <div class="col-sm-4">
22 <a class="btn btn-info addInfo" id="addInfo">保存</a> 22 <a class="btn btn-info addInfo" id="addInfo">保存</a>
23 - <!--<a class="btn btn-primary back" >返回</a>--> 23 + <a class="btn btn-primary back" >返回</a>
24 </div> 24 </div>
25 </div> 25 </div>
26 26
@@ -41,10 +41,18 @@ @@ -41,10 +41,18 @@
41 </select> 41 </select>
42 </th> 42 </th>
43 <th> 43 <th>
44 - <select name="status" value="[[item.tryInfo.feel_id]]" data-name="feel_id" data-index="[[index]]" title="" class="select2-offscreen brandBtn-group tryInfo1"> 44 + [[if item.tryInfo.feel_id]]
  45 + <select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
  46 + <option value="[[item.tryInfo.feel_id]]">[[item.tryInfo.fell_name]]</option>
  47 + </select>
  48 + [[else]]
  49 + <select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
45 <option value="-1">[['请选择试穿描述']]</option> 50 <option value="-1">[['请选择试穿描述']]</option>
46 - 51 + <option value="1">[['合适']]</option>
  52 + <option value="2">[['偏大']]</option>
  53 + <option value="3">[['偏小']]</option>
47 </select> 54 </select>
  55 + [[/if]]
48 </th> 56 </th>
49 <th> 57 <th>
50 <input type="text" data-name="fit_remark" data-index="[[index]]" value="[[item.tryInfo.fit_remark]]" name="fit_remark" id="fit_remark" class="tryInfo1 " 58 <input type="text" data-name="fit_remark" data-index="[[index]]" value="[[item.tryInfo.fit_remark]]" name="fit_remark" id="fit_remark" class="tryInfo1 "
@@ -42,7 +42,6 @@ @@ -42,7 +42,6 @@
42 <option value="1">启用</option> 42 <option value="1">启用</option>
43 </select> 43 </select>
44 </div> 44 </div>
45 - <input id="route" type="hidden" value="/operation/terms/searchWordsList">  
46 <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a> 45 <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
47 </div> 46 </div>
48 </div> 47 </div>
@@ -58,7 +57,7 @@ @@ -58,7 +57,7 @@
58 <input type="hidden" value="[[id]]" id="id"/> 57 <input type="hidden" value="[[id]]" id="id"/>
59 58
60 <div class="col-sm-6"> 59 <div class="col-sm-6">
61 - <input type="file" value="[[avatar]]" class="form-control avatar" id="avatar" name="avatar" /> 60 + <input type="file" value="[[avatar]]" class="form-control avatar" id="avatar" name="avatar" required="required"/>
62 </div> 61 </div>
63 </div> 62 </div>
64 <div class="form-group"> 63 <div class="form-group">
@@ -130,7 +129,7 @@ @@ -130,7 +129,7 @@
130 <label class="col-sm-2 control-label" for="modelCard">模特卡</label> 129 <label class="col-sm-2 control-label" for="modelCard">模特卡</label>
131 130
132 <div class="col-sm-10"> 131 <div class="col-sm-10">
133 - <input type="file" value="[[modelCard]]" class="form-control modelCard" id="modelCard" name="modelCard"/> 132 + <input type="file" value="[[modelCard]]" class="form-control modelCard" id="modelCard" name="modelCard" required="required"/>
134 </div> 133 </div>
135 </div> 134 </div>
136 </div> 135 </div>
@@ -23,14 +23,14 @@ @@ -23,14 +23,14 @@
23 <div class="panel panel-default" style="..."> 23 <div class="panel panel-default" style="...">
24 <div class="panel-body"> 24 <div class="panel-body">
25 <div class="row"> 25 <div class="row">
26 - <div class="panel-col2">  
27 - <input type="text" id="starttime" class="form-control panel-input hasDatepicker" name="start_time"  
28 - placeholder="开始时间" value="">  
29 - </div>  
30 - <div class="panel-col2">  
31 - <input type="text" id="endtime" class="form-control panel-input hasDatepicker" name="end_time"  
32 - placeholder="结束时间" value="">  
33 - </div> 26 + <!--<div class="panel-col2">-->
  27 + <!--<input type="text" id="starttime" class="form-control panel-input hasDatepicker" name="start_time"-->
  28 + <!--placeholder="开始时间" value="">-->
  29 + <!--</div>-->
  30 + <!--<div class="panel-col2">-->
  31 + <!--<input type="text" id="endtime" class="form-control panel-input hasDatepicker" name="end_time"-->
  32 + <!--placeholder="结束时间" value="">-->
  33 + <!--</div>-->
34 <div class="panel-col"> 34 <div class="panel-col">
35 <input type="text" value="" name="productSkn" id="content-filter1" placeholder="skn" 35 <input type="text" value="" name="productSkn" id="content-filter1" placeholder="skn"
36 class="form-control"> 36 class="form-control">
@@ -47,7 +47,6 @@ @@ -47,7 +47,6 @@
47 <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a> 47 <a id="filter-btn" href="javascript:;" class="btn btn-info">查询</a>
48 <a id="upload-btn" href="javascript:;" class="btn btn-info">上传图片</a> 48 <a id="upload-btn" href="javascript:;" class="btn btn-info">上传图片</a>
49 </div> 49 </div>
50 -  
51 </div> 50 </div>
52 </div> 51 </div>
53 </div> 52 </div>
@@ -57,6 +56,7 @@ @@ -57,6 +56,7 @@
57 <!--上传图片--> 56 <!--上传图片-->
58 <script type="text/template" id="template1"> 57 <script type="text/template" id="template1">
59 <div class="rows" style="height: 400px;overflow: auto"> 58 <div class="rows" style="height: 400px;overflow: auto">
  59 + [[if __state=='add']]
60 <div class="form-group"> 60 <div class="form-group">
61 <label class="col-sm-2 control-label" for="Sku">SKU</label> 61 <label class="col-sm-2 control-label" for="Sku">SKU</label>
62 62
@@ -64,65 +64,44 @@ @@ -64,65 +64,44 @@
64 <input type="text" value="[[productSku]]" class="form-control" id="Sku"/> 64 <input type="text" value="[[productSku]]" class="form-control" id="Sku"/>
65 </div> 65 </div>
66 </div> 66 </div>
67 - <div class="form-group">  
68 - <label class="col-sm-2 control-label">图片</label>  
69 -  
70 - <div class="cover-image-list col-sm-10" id="addPic">  
71 - </div>  
72 - </div>  
73 - <div class="form-group">  
74 - <label class="col-sm-2 control-label"></label>  
75 - <ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">  
76 - <li class="cover-image-item fileinput-button">  
77 - <div class="goods-img">  
78 - <a class="fileinput-button-icon" href="javascript:void(0);">+</a>  
79 - <input type="file" class="goods-img-upload picfile" name="picfile">  
80 - </div>  
81 - </li>  
82 - </ul>  
83 - </div>  
84 -</script>  
85 -  
86 -<script type="text/template" id="template2">  
87 - <ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">  
88 - [[each pictureBoList as _item _index]]  
89 - <li class="cover-image-item" data-index=[[_index]] >  
90 - <div class="goods-img">  
91 - <a class="fileinput-button-icon" href="javascript:void(0);">  
92 - <img src="[[_item.fileName]]">  
93 - </a>  
94 - <i class="remove-item-btn glyphicon glyphicon-remove-circle" ></i>  
95 - </div>  
96 - </li>  
97 - [[/each]]  
98 - </ul>  
99 -</script>  
100 -  
101 -<script type="text/template" id="template3">  
102 - <div class="row" style="height: 400px;overflow: auto"> 67 + [[else]]
103 <div class="form-group"> 68 <div class="form-group">
104 <label class="col-sm-2">SKN</label> 69 <label class="col-sm-2">SKN</label>
  70 +
105 <div class="col-sm-6"> 71 <div class="col-sm-6">
106 - <input type="text" value=[[productSkn]] disabled="disabled"> 72 + <input type="text" value=[[productSkn]] class="form-control" disabled="disabled">
107 </div> 73 </div>
108 -  
109 </div> 74 </div>
  75 + [[/if]]
110 <div class="form-group"> 76 <div class="form-group">
111 - <label class="col-sm-2">图片</label>  
112 - <div class="col-sm-10">  
113 - <ul class="cover-image-list col-sm-10" style="padding: 0;margin: 0;">  
114 - [[each pictureBoList as _item _index]]  
115 - <li class="cover-image-item" data-index=[[_index]]> 77 + <label class="col-sm-2 control-label">图片</label>
  78 + <div class="cover-image-list col-sm-10">
  79 + <!-- 用于修改 -->
  80 + <ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;">
  81 + <!-- 修改时不存在 -->
  82 + [[if __state=='add']]
  83 + <li class="cover-image-item fileinput-button">
116 <div class="goods-img"> 84 <div class="goods-img">
117 - <a class="fileinput-button-icon" href="javascript:void(0);">  
118 - <img src="[[_item.fileName]]">  
119 - </a>  
120 - <i class="remove-item-btn glyphicon glyphicon-remove-circle"></i> 85 + <a class="fileinput-button-icon" href="javascript:void(0);">+</a>
  86 + <input type="file" class="goods-img-upload picfile" name="picfile">
121 </div> 87 </div>
122 </li> 88 </li>
123 - [[/each]] 89 + [[/if]]
124 </ul> 90 </ul>
125 </div> 91 </div>
126 </div> 92 </div>
127 </div> 93 </div>
128 </script> 94 </script>
  95 +<!--图片列表-->
  96 +<script type="text/template" id="template2">
  97 + [[each pictureBoList as _item _index]]
  98 + <li class="cover-image-item image-list" data-index=[[_index]]>
  99 + <div class="goods-img">
  100 + <a class="fileinput-button-icon" href="javascript:void(0);">
  101 + <img src="[[_item.fileName]]">
  102 + </a>
  103 + <i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[_index]]"></i>
  104 + </div>
  105 + </li>
  106 + [[/each]]
  107 +</script>