添加 逛-【plus/star】、【品牌关注】模块代码
Showing
10 changed files
with
1371 additions
and
2 deletions
@@ -34,6 +34,7 @@ var urlObj = { | @@ -34,6 +34,7 @@ var urlObj = { | ||
34 | 'guangGetSortList':'/guang/article/getSortList', // 逛-获取作者 | 34 | 'guangGetSortList':'/guang/article/getSortList', // 逛-获取作者 |
35 | 'guangGetTagCategoryByStatus':'/guang/tagSort/getTagItems', | 35 | 'guangGetTagCategoryByStatus':'/guang/tagSort/getTagItems', |
36 | 'guangCommentGetFilterItems':'/guang/comment/getItems', // 逛-评论列表-获取筛选条件 | 36 | 'guangCommentGetFilterItems':'/guang/comment/getItems', // 逛-评论列表-获取筛选条件 |
37 | + 'guangPlusSatrChannel':'/guang/plustarcategory/getCategoryNames', // 逛-plus star 频道 | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | var minimumResultsForSearch=["sortbybrand","getjitSup","sortsize2"]; | 40 | var minimumResultsForSearch=["sortbybrand","getjitSup","sortsize2"]; |
@@ -79,7 +79,7 @@ $(document).on('click', '.info-del', function() { | @@ -79,7 +79,7 @@ $(document).on('click', '.info-del', function() { | ||
79 | function articleCategoryOP(prefix, url, item) { | 79 | function articleCategoryOP(prefix, url, item) { |
80 | 80 | ||
81 | var a =new common.edit(".confirm", { | 81 | var a =new common.edit(".confirm", { |
82 | - "bucket" : "color" | 82 | + "bucket" : "author" |
83 | }); | 83 | }); |
84 | 84 | ||
85 | common.dialog.confirm(prefix+'作者', common.util.__template2($("#template").html(), item), function () { | 85 | common.dialog.confirm(prefix+'作者', common.util.__template2($("#template").html(), item), function () { |
client/js/guang/brandConcern.js
0 → 100644
1 | +/** | ||
2 | + * Created by wangqianjun on 16/3/30. | ||
3 | + */ | ||
4 | + | ||
5 | +var $ = require('jquery'); | ||
6 | +common = require('../common/common'); | ||
7 | + | ||
8 | +var imgArr = []; | ||
9 | + | ||
10 | +var ENUM = { | ||
11 | + HotEnum: { | ||
12 | + '1': '是', | ||
13 | + '0': '否', | ||
14 | + }, | ||
15 | + | ||
16 | + StatusEnum: { | ||
17 | + 1:'可用', | ||
18 | + 2:'不可用', | ||
19 | + }, | ||
20 | + | ||
21 | + GenderEnum: { | ||
22 | + 1:'男', | ||
23 | + 2:'女', | ||
24 | + 3:'通用', | ||
25 | + }, | ||
26 | +} | ||
27 | + | ||
28 | +//下拉框 | ||
29 | +new common.dropDown({ | ||
30 | + el: "#g-brandId", | ||
31 | + ajax: 'brand', | ||
32 | + params : { | ||
33 | + status: 1 | ||
34 | + } | ||
35 | +}); | ||
36 | + | ||
37 | +var g = new common.grid({ | ||
38 | + el: '#basicTable', | ||
39 | + size: 10, | ||
40 | + parms: function () { | ||
41 | + | ||
42 | + return { | ||
43 | + brandId: common.util.__input('g-brandId'), | ||
44 | + }; | ||
45 | + }, | ||
46 | + columns: [ | ||
47 | + { | ||
48 | + display: 'ID', | ||
49 | + name: "id" | ||
50 | + }, { | ||
51 | + display: '品牌名称', | ||
52 | + name: "brandName" | ||
53 | + }, { | ||
54 | + display: '新品', | ||
55 | + render: function (item) { | ||
56 | + var value = (item.brandType == 1) ? "是" : "否"; | ||
57 | + | ||
58 | + return "<p>" + value + "</p>"; | ||
59 | + } | ||
60 | + },{ | ||
61 | + display: '折扣', | ||
62 | + render: function (item) { | ||
63 | + var value = (item.brandType == 2) ? "是" : "否"; | ||
64 | + | ||
65 | + return "<p>" + value + "</p>"; | ||
66 | + } | ||
67 | + },{ | ||
68 | + display: '推荐', | ||
69 | + render: function (item) { | ||
70 | + var value = (item.brandType == 3) ? "是" : "否"; | ||
71 | + | ||
72 | + return "<p>" + value + "</p>"; | ||
73 | + } | ||
74 | + },{ | ||
75 | + display: '活动', | ||
76 | + render: function (item) { | ||
77 | + var value = (item.brandType == 4) ? "是" : "否"; | ||
78 | + | ||
79 | + return "<p>" + value + "</p>"; | ||
80 | + } | ||
81 | + },{ | ||
82 | + display: '折扣价', | ||
83 | + name: "discount" | ||
84 | + }, { | ||
85 | + display: '时间', | ||
86 | + render: function (item) { | ||
87 | + var t = new Date(item.createTime * 1000); | ||
88 | + var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss"); | ||
89 | + return "<p>" + formatted + "</p>"; | ||
90 | + } | ||
91 | + }, | ||
92 | + | ||
93 | + { | ||
94 | + display: '操作', | ||
95 | + //} | ||
96 | + name: "status", | ||
97 | + render: function (items) { | ||
98 | + var HtmArr = []; | ||
99 | + | ||
100 | + HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-modify">编辑</a>'); | ||
101 | + HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs info-del">删除</a>'); | ||
102 | + | ||
103 | + return HtmArr.join(''); | ||
104 | + } | ||
105 | + }] | ||
106 | +}); | ||
107 | +g.init('/guang/relationship/getList'); | ||
108 | + | ||
109 | +//==================== 按钮点击事件 =====================// | ||
110 | + | ||
111 | +$("#filter-btn").click(function() { | ||
112 | + g.reload(1); | ||
113 | +}); | ||
114 | + | ||
115 | +//添加 | ||
116 | +$(document).on('click', '#add-btn', function() { | ||
117 | + plusStarOP("新增", '/guang/relationship/addRel', {}); | ||
118 | + | ||
119 | +}); | ||
120 | + | ||
121 | +//编辑 | ||
122 | +$(document).on('click', '.info-modify', function() { | ||
123 | + var item = g.rows[$(this).data("index")]; | ||
124 | + plusStarOP("编辑", '/guang/relationship/updateRel', item); | ||
125 | +}); | ||
126 | + | ||
127 | +//删除 | ||
128 | +$(document).on('click', '.info-del', function() { | ||
129 | + var item = g.rows[$(this).data("index")]; | ||
130 | + | ||
131 | + common.dialog.confirm("温馨提示","确定要删除该品牌?" , function() { | ||
132 | + common.util.__ajax({ | ||
133 | + url: '/guang/relationship/delRel', | ||
134 | + data: { | ||
135 | + id: item.id, | ||
136 | + } | ||
137 | + }, function(res) { | ||
138 | + if (res.code == 200) { | ||
139 | + g.reload(); | ||
140 | + } | ||
141 | + }); | ||
142 | + }); | ||
143 | +}); | ||
144 | + | ||
145 | + | ||
146 | +// 根据选择的类型来动态展示页面 | ||
147 | +$(document).on('click', 'input[name="brandType"]', function () { | ||
148 | + console.log(); | ||
149 | + var val = $(this).val(); | ||
150 | + | ||
151 | + $('#discount').css('display', 'none'); | ||
152 | + $('#activity').css('display', 'none'); | ||
153 | + $('#activity-name').css('display', 'none'); | ||
154 | + switch (val) { | ||
155 | + // 折扣 | ||
156 | + case '2': | ||
157 | + { | ||
158 | + $('#discount').css('display', 'inline'); | ||
159 | + | ||
160 | + } | ||
161 | + break; | ||
162 | + | ||
163 | + // 活动 | ||
164 | + case '4': | ||
165 | + { | ||
166 | + $('#activity').css('display', 'block'); | ||
167 | + $('#activity-name').css('display', 'block'); | ||
168 | + } | ||
169 | + break; | ||
170 | + | ||
171 | + default : | ||
172 | + break; | ||
173 | + } | ||
174 | + | ||
175 | +}) | ||
176 | + | ||
177 | +function plusStarOP(prefix, url, item) { | ||
178 | + | ||
179 | + if(prefix == "编辑") { | ||
180 | + imgArr = item.activityImg||[]; | ||
181 | + } else { | ||
182 | + imgArr = []; | ||
183 | + } | ||
184 | + | ||
185 | + var a = new common.edit('#templete-top'); | ||
186 | + common.dialog.confirm(prefix+'品牌', common.util.__template2($("#template").html(), item), function () { | ||
187 | + | ||
188 | + return a.submit(url,function(option){ | ||
189 | + //设置图片 | ||
190 | + if(imgArr.length) { | ||
191 | + option.data.activityImg = imgArr.toString(); | ||
192 | + } | ||
193 | + imgArr = []; | ||
194 | + option.success=function(res){ | ||
195 | + res=res.data; | ||
196 | + if(res.code=="200"){ | ||
197 | + a.$tip("提交成功", function() { | ||
198 | + g.reload(); | ||
199 | + }, 'growl-success'); | ||
200 | + }else{ | ||
201 | + a.$tip(res.message); | ||
202 | + } | ||
203 | + return false; | ||
204 | + }, | ||
205 | + option.error=function(res){ | ||
206 | + a.$tip(res.message); | ||
207 | + } | ||
208 | + }); | ||
209 | + | ||
210 | + }); | ||
211 | + | ||
212 | + a.init(); | ||
213 | + | ||
214 | + var val = $('#brandType').val(); | ||
215 | + $('#discount').css('display', 'none'); | ||
216 | + $('#activity').css('display', 'none'); | ||
217 | + $('#activity-name').css('display', 'none'); | ||
218 | + $('input[name="brandType"][value="' + val + '"]').trigger('click'); | ||
219 | + | ||
220 | + | ||
221 | + rendBoList(imgArr); | ||
222 | + | ||
223 | + | ||
224 | + // 图片上传 | ||
225 | + uploadImage(); | ||
226 | + | ||
227 | + new common.dropDown({ | ||
228 | + el: "#brandId", | ||
229 | + ajax: 'brand', | ||
230 | + params : { | ||
231 | + status: 1 | ||
232 | + } | ||
233 | + | ||
234 | + }); | ||
235 | + | ||
236 | +} | ||
237 | + | ||
238 | +function rendBoList (pictureBoList) { | ||
239 | + $(".image-list").html(''); | ||
240 | + $("#addPic").append(common.util.__template2($("#imgeUpload").html(), | ||
241 | + { | ||
242 | + pictureBoList: pictureBoList | ||
243 | + } | ||
244 | + )); | ||
245 | +} | ||
246 | + | ||
247 | +function uploadImage() { | ||
248 | + common.edit.ajaxfileupload(".picfile", { | ||
249 | + params: { | ||
250 | + __type: "upload", | ||
251 | + bucket: "relationship" | ||
252 | + }, | ||
253 | + valid_extensions: ['png', 'jpg', 'jpeg'], | ||
254 | + onComplete: function (response) { | ||
255 | + | ||
256 | + if (response.status && response.code == 200) { | ||
257 | + console.log("response", response); | ||
258 | + | ||
259 | + if(response.data) { | ||
260 | + imgArr.push(response.data); | ||
261 | + rendBoList(imgArr); | ||
262 | + } | ||
263 | + | ||
264 | + } | ||
265 | + else { | ||
266 | + common.util.__tip(response.message, 'warning'); | ||
267 | + } | ||
268 | + } | ||
269 | + }); | ||
270 | +} | ||
271 | + | ||
272 | +//删除单张图片 | ||
273 | +$(document).on('click', '.remove1', function () { | ||
274 | + var index = $(this).data("index"); | ||
275 | + imgArr.splice(index, 1); | ||
276 | + rendBoList(imgArr); | ||
277 | +}); |
client/js/guang/plusStarCategory.js
0 → 100644
1 | +/** | ||
2 | + * Created by wangqianjun on 16/3/30. | ||
3 | + */ | ||
4 | + | ||
5 | +var $ = require('jquery'); | ||
6 | +common = require('../common/common'); | ||
7 | + | ||
8 | + | ||
9 | +var ENUM = { | ||
10 | + HotEnum: { | ||
11 | + '1': '是', | ||
12 | + '0': '否', | ||
13 | + }, | ||
14 | + | ||
15 | + StatusEnum: { | ||
16 | + 1:'可用', | ||
17 | + 2:'不可用', | ||
18 | + }, | ||
19 | + | ||
20 | + GenderEnum: { | ||
21 | + 1:'男', | ||
22 | + 2:'女', | ||
23 | + 3:'通用', | ||
24 | + }, | ||
25 | + | ||
26 | +} | ||
27 | + | ||
28 | +//下拉框 | ||
29 | +new common.dropDown({ | ||
30 | + el: "#g-brandId", | ||
31 | + ajax: 'brand', | ||
32 | + params : { | ||
33 | + status: 1 | ||
34 | + } | ||
35 | +}); | ||
36 | + | ||
37 | +var g = new common.grid({ | ||
38 | + el: '#basicTable', | ||
39 | + size: 10, | ||
40 | + parms: function () { | ||
41 | + | ||
42 | + return { | ||
43 | + brandType: common.util.__input('g-brandType'), | ||
44 | + status: common.util.__input('g-status'), | ||
45 | + brandId: common.util.__input('g-brandId'), | ||
46 | + gender: common.util.__input('g-gender'), | ||
47 | + }; | ||
48 | + }, | ||
49 | + columns: [ | ||
50 | + { | ||
51 | + display: 'ID', | ||
52 | + name: "id" | ||
53 | + }, { | ||
54 | + display: '品牌名称', | ||
55 | + name: "brandName" | ||
56 | + }, { | ||
57 | + display: '品牌ID', | ||
58 | + name: "brandId" | ||
59 | + }, { | ||
60 | + display: '频道名称', | ||
61 | + name: "categoryName" | ||
62 | + }, { | ||
63 | + display: '性别', | ||
64 | + render: function (item) { | ||
65 | + return "<p>" + ENUM.GenderEnum[item.gender] + "</p>"; | ||
66 | + } | ||
67 | + }, { | ||
68 | + display: '是否可用', | ||
69 | + render: function (item) { | ||
70 | + return "<p>" + ENUM.StatusEnum[item.status] + "</p>"; | ||
71 | + } | ||
72 | + }, | ||
73 | + { | ||
74 | + display: '更新时间', | ||
75 | + render: function (item) { | ||
76 | + var t = new Date(item.updateTime * 1000); | ||
77 | + var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss"); | ||
78 | + return "<p>" + formatted + "</p>"; | ||
79 | + } | ||
80 | + }, | ||
81 | + | ||
82 | + { | ||
83 | + display: '操作', | ||
84 | + //} | ||
85 | + name: "status", | ||
86 | + render: function (items) { | ||
87 | + var HtmArr = []; | ||
88 | + | ||
89 | + HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-copy">复制链接</a>'); | ||
90 | + HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-modify">查看/编辑</a>'); | ||
91 | + HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs info-del">删除</a>'); | ||
92 | + | ||
93 | + return HtmArr.join(''); | ||
94 | + } | ||
95 | + }] | ||
96 | +}); | ||
97 | +g.init('/guang/plustar/getList'); | ||
98 | + | ||
99 | +//==================== 按钮点击事件 =====================// | ||
100 | + | ||
101 | +$("#filter-btn").click(function() { | ||
102 | + g.reload(1); | ||
103 | +}); | ||
104 | + | ||
105 | +//添加 | ||
106 | +$(document).on('click', '#add-btn', function() { | ||
107 | + plusStarOP("新增", '/guang/plustar/addPlustar', {}); | ||
108 | + | ||
109 | +}); | ||
110 | + | ||
111 | +//编辑 | ||
112 | +$(document).on('click', '.info-modify', function() { | ||
113 | + var item = g.rows[$(this).data("index")]; | ||
114 | + plusStarOP("编辑", '/guang/plustar/updatePlustar', item); | ||
115 | +}); | ||
116 | + | ||
117 | +//删除 | ||
118 | +$(document).on('click', '.info-del', function() { | ||
119 | + var item = g.rows[$(this).data("index")]; | ||
120 | + | ||
121 | + common.dialog.confirm("温馨提示","确定要删除该品牌?" , function() { | ||
122 | + common.util.__ajax({ | ||
123 | + url: '/guang/plustar/delPlustar', | ||
124 | + data: { | ||
125 | + id: item.id, | ||
126 | + } | ||
127 | + }, function(res) { | ||
128 | + if (res.code == 200) { | ||
129 | + g.reload(); | ||
130 | + } | ||
131 | + }); | ||
132 | + }); | ||
133 | +}); | ||
134 | + | ||
135 | + | ||
136 | +function plusStarOP(prefix, url, item) { | ||
137 | + | ||
138 | + var a =new common.edit(".confirm"); | ||
139 | + | ||
140 | + common.dialog.confirm(prefix+'品牌', common.util.__template2($("#template").html(), item), function () { | ||
141 | + | ||
142 | + // | ||
143 | + return a.submit(url,function(option){ | ||
144 | + option.success=function(res){ | ||
145 | + res=res.data; | ||
146 | + if(res.code=="200"){ | ||
147 | + a.$tip("提交成功", function() { | ||
148 | + g.reload(); | ||
149 | + }, 'growl-success'); | ||
150 | + }else{ | ||
151 | + a.$tip(res.message); | ||
152 | + } | ||
153 | + return false; | ||
154 | + }, | ||
155 | + option.error=function(res){ | ||
156 | + a.$tip(res.message); | ||
157 | + } | ||
158 | + }); | ||
159 | + | ||
160 | + }); | ||
161 | + | ||
162 | + a.init(); | ||
163 | + | ||
164 | + | ||
165 | + new common.dropDown({ | ||
166 | + el: "#brandType", | ||
167 | + ajax: 'guangPlusSatrChannel', | ||
168 | + params : { | ||
169 | + status: 1 | ||
170 | + } | ||
171 | + | ||
172 | + }); | ||
173 | + | ||
174 | + new common.dropDown({ | ||
175 | + el: "#brandId", | ||
176 | + ajax: 'brand', | ||
177 | + params : { | ||
178 | + status: 1 | ||
179 | + } | ||
180 | + | ||
181 | + }); | ||
182 | + | ||
183 | + | ||
184 | + | ||
185 | +} |
client/js/guang/plusStarManager.js
0 → 100644
1 | +/** | ||
2 | + * Created by wangqianjun on 16/3/30. | ||
3 | + */ | ||
4 | + | ||
5 | +var $ = require('jquery'); | ||
6 | +common = require('../common/common'); | ||
7 | + | ||
8 | +var imgArr = []; | ||
9 | + | ||
10 | +var ENUM = { | ||
11 | + HotEnum: { | ||
12 | + '1': '是', | ||
13 | + '0': '否', | ||
14 | + }, | ||
15 | + | ||
16 | + StatusEnum: { | ||
17 | + 1:'可用', | ||
18 | + 2:'不可用', | ||
19 | + }, | ||
20 | + | ||
21 | + GenderEnum: { | ||
22 | + 1:'男', | ||
23 | + 2:'女', | ||
24 | + 3:'通用', | ||
25 | + }, | ||
26 | + | ||
27 | +} | ||
28 | + | ||
29 | +//下拉框 | ||
30 | +new common.dropDown({ | ||
31 | + el: "#g-status" | ||
32 | +}); | ||
33 | + | ||
34 | +new common.dropDown({ | ||
35 | + el: "#g-gender" | ||
36 | +}); | ||
37 | + | ||
38 | + | ||
39 | +new common.dropDown({ | ||
40 | + el: "#g-brandType", | ||
41 | + ajax: 'guangPlusSatrChannel', | ||
42 | + params : { | ||
43 | + status: 1 | ||
44 | + } | ||
45 | + | ||
46 | +}); | ||
47 | + | ||
48 | +new common.dropDown({ | ||
49 | + el: "#g-brandId", | ||
50 | + ajax: 'brand', | ||
51 | + params : { | ||
52 | + status: 1 | ||
53 | + } | ||
54 | + | ||
55 | +}); | ||
56 | + | ||
57 | +var g = new common.grid({ | ||
58 | + el: '#basicTable', | ||
59 | + size: 10, | ||
60 | + parms: function () { | ||
61 | + | ||
62 | + return { | ||
63 | + brandType: common.util.__input('g-brandType'), | ||
64 | + status: common.util.__input('g-status'), | ||
65 | + brandId: common.util.__input('g-brandId'), | ||
66 | + gender: common.util.__input('g-gender'), | ||
67 | + }; | ||
68 | + }, | ||
69 | + columns: [ | ||
70 | + { | ||
71 | + display: 'ID', | ||
72 | + name: "id" | ||
73 | + }, | ||
74 | + | ||
75 | + { | ||
76 | + display: '品牌ID', | ||
77 | + name: "brandId" | ||
78 | + }, { | ||
79 | + display: '品牌名称', | ||
80 | + name: "brandName" | ||
81 | + },{ | ||
82 | + display: '频道名称', | ||
83 | + name: "categoryName" | ||
84 | + }, { | ||
85 | + display: '性别', | ||
86 | + render: function (item) { | ||
87 | + return "<p>" + ENUM.GenderEnum[item.gender] + "</p>"; | ||
88 | + } | ||
89 | + }, { | ||
90 | + display: '是否可用', | ||
91 | + render: function (item) { | ||
92 | + return "<p>" + ENUM.StatusEnum[item.status] + "</p>"; | ||
93 | + } | ||
94 | + }, | ||
95 | + { | ||
96 | + display: '更新时间', | ||
97 | + render: function (item) { | ||
98 | + var t = new Date(item.updateTime * 1000); | ||
99 | + var formatted = common.util.__dateFormat(t, "yyyy-MM-dd hh:mm:ss"); | ||
100 | + return "<p>" + formatted + "</p>"; | ||
101 | + } | ||
102 | + }, | ||
103 | + | ||
104 | + { | ||
105 | + display: '操作', | ||
106 | + //} | ||
107 | + name: "status", | ||
108 | + render: function (items) { | ||
109 | + var HtmArr = []; | ||
110 | + | ||
111 | + HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-copy">复制链接</a>'); | ||
112 | + HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-primary btn-xs info-modify">查看/编辑</a>'); | ||
113 | + HtmArr.push('<a data-index="' + items.__index + '" href="JavaScript:;" class="btn btn-danger btn-xs info-del">删除</a>'); | ||
114 | + | ||
115 | + return HtmArr.join(''); | ||
116 | + } | ||
117 | + }] | ||
118 | +}); | ||
119 | +g.init('/guang/plustar/getList'); | ||
120 | + | ||
121 | +//==================== 按钮点击事件 =====================// | ||
122 | + | ||
123 | +$("#filter-btn").click(function() { | ||
124 | + g.reload(1); | ||
125 | +}); | ||
126 | + | ||
127 | +//添加 | ||
128 | +$(document).on('click', '#add-btn', function() { | ||
129 | + plusStarOP("新增", '/guang/plustar/addPlustar', {}); | ||
130 | + | ||
131 | +}); | ||
132 | + | ||
133 | +//编辑 | ||
134 | +$(document).on('click', '.info-modify', function() { | ||
135 | + var item = g.rows[$(this).data("index")]; | ||
136 | + common.util.__ajax( | ||
137 | + { | ||
138 | + url: '/guang/plustar/getDetail', | ||
139 | + data: { | ||
140 | + id: item.id, | ||
141 | + } | ||
142 | + }, function(res) { | ||
143 | + | ||
144 | + //var item = res.data; | ||
145 | + plusStarOP("编辑", '/guang/plustar/updatePlustar', res.data); | ||
146 | + }); | ||
147 | + | ||
148 | +}); | ||
149 | + | ||
150 | +//删除 | ||
151 | +$(document).on('click', '.info-del', function() { | ||
152 | + var item = g.rows[$(this).data("index")]; | ||
153 | + | ||
154 | + common.dialog.confirm("温馨提示","确定要删除该品牌?" , function() { | ||
155 | + common.util.__ajax({ | ||
156 | + url: '/guang/plustar/delPlustar', | ||
157 | + data: { | ||
158 | + id: item.id, | ||
159 | + } | ||
160 | + }, function(res) { | ||
161 | + if (res.code == 200) { | ||
162 | + g.reload(); | ||
163 | + } | ||
164 | + }); | ||
165 | + }); | ||
166 | +}); | ||
167 | + | ||
168 | + | ||
169 | +function plusStarOP(prefix, url, item) { | ||
170 | + | ||
171 | + if(prefix == "编辑") { | ||
172 | + imgArr = item.bannerImg||[]; | ||
173 | + } else { | ||
174 | + imgArr = []; | ||
175 | + } | ||
176 | + | ||
177 | + var a =new common.edit("#templete-top", { | ||
178 | + "bucket" : "plustar" | ||
179 | + }); | ||
180 | + | ||
181 | + common.dialog.confirm(prefix+'品牌', common.util.__template2($("#template").html(), item), function () { | ||
182 | + | ||
183 | + // | ||
184 | + return a.submit(url,function(option){ | ||
185 | + | ||
186 | + if(imgArr.length) { | ||
187 | + option.data.bannerImg = imgArr.toString(); | ||
188 | + } | ||
189 | + imgArr = []; | ||
190 | + | ||
191 | + option.success=function(res){ | ||
192 | + res=res.data; | ||
193 | + if(res.code=="200"){ | ||
194 | + a.$tip("提交成功", function() { | ||
195 | + g.reload(); | ||
196 | + }, 'growl-success'); | ||
197 | + }else{ | ||
198 | + a.$tip(res.message); | ||
199 | + } | ||
200 | + return false; | ||
201 | + }, | ||
202 | + option.error=function(res){ | ||
203 | + a.$tip(res.message); | ||
204 | + } | ||
205 | + }); | ||
206 | + | ||
207 | + }); | ||
208 | + | ||
209 | + a.init(); | ||
210 | + | ||
211 | + uploadImage(); | ||
212 | + rendBoList(imgArr); | ||
213 | + | ||
214 | + | ||
215 | + new common.dropDown({ | ||
216 | + el: "#brandType", | ||
217 | + ajax: 'guangPlusSatrChannel', | ||
218 | + params : { | ||
219 | + status: 1 | ||
220 | + } | ||
221 | + | ||
222 | + }); | ||
223 | + | ||
224 | + new common.dropDown({ | ||
225 | + el: "#brandId", | ||
226 | + ajax: 'brand', | ||
227 | + params : { | ||
228 | + status: 1 | ||
229 | + } | ||
230 | + | ||
231 | + }); | ||
232 | + | ||
233 | +} | ||
234 | + | ||
235 | +// 图片上传 | ||
236 | +function uploadImage() { | ||
237 | + common.edit.ajaxfileupload(".picfile", { | ||
238 | + params: { | ||
239 | + __type: "upload", | ||
240 | + bucket: "plustar" | ||
241 | + }, | ||
242 | + valid_extensions: ['png', 'jpg', 'jpeg'], | ||
243 | + onComplete: function (response) { | ||
244 | + | ||
245 | + if (response.status && response.code == 200) { | ||
246 | + console.log("response", response); | ||
247 | + if(response.data) { | ||
248 | + imgArr.push(response.data); | ||
249 | + rendBoList(imgArr); | ||
250 | + } | ||
251 | + } | ||
252 | + else { | ||
253 | + common.util.__tip(response.message, 'warning'); | ||
254 | + } | ||
255 | + } | ||
256 | + }); | ||
257 | +} | ||
258 | + | ||
259 | +function rendBoList (pictureBoList) { | ||
260 | + $(".image-list").html(''); | ||
261 | + $("#addPic").append(common.util.__template2($("#imgeUpload").html(), | ||
262 | + { | ||
263 | + pictureBoList: pictureBoList | ||
264 | + } | ||
265 | + )); | ||
266 | +} | ||
267 | + | ||
268 | +//删除单张图片 | ||
269 | +$(document).on('click', '.remove1', function () { | ||
270 | + var index = $(this).data("index"); | ||
271 | + imgArr.splice(index, 1); | ||
272 | + rendBoList(imgArr); | ||
273 | +}); |
@@ -47,7 +47,7 @@ var g = new common.grid({ | @@ -47,7 +47,7 @@ var g = new common.grid({ | ||
47 | name: "classifyName" | 47 | name: "classifyName" |
48 | }, { | 48 | }, { |
49 | display: '所属标签数', | 49 | display: '所属标签数', |
50 | - name: "classifyName" | 50 | + name: "sortNum" |
51 | }, { | 51 | }, { |
52 | display: '状态', | 52 | display: '状态', |
53 | render: function (item) { | 53 | render: function (item) { |
@@ -341,8 +341,151 @@ exports.res = [ | @@ -341,8 +341,151 @@ exports.res = [ | ||
341 | ] | 341 | ] |
342 | }, | 342 | }, |
343 | 343 | ||
344 | +//=================================【Plus/Star列表】 | ||
345 | + {//逛->Plus/Star列表 空白页 | ||
346 | + route: '/guang/plustar/index', | ||
347 | + method: 'GET', | ||
348 | + view: 'pages/guang/plusStarManager', | ||
349 | + src: '/guang/plusStarManager', | ||
350 | + data: { | ||
351 | + iscreate: true | ||
352 | + } | ||
353 | + },{ | ||
354 | + | ||
355 | + // Plus/Star 列表数据 | ||
356 | + route: '/guang/plustar/getList', | ||
357 | + method: 'POST', | ||
358 | + url: '/guang/plustar/getList', | ||
359 | + params: [ | ||
360 | + {name: 'page', type: 'Number'}, | ||
361 | + {name: 'size', type: 'Number'}, | ||
362 | + {name: 'brandType', type: 'String'}, | ||
363 | + {name: 'status', type: 'String'}, | ||
364 | + {name: 'brandId', type: 'String'}, | ||
365 | + {name: 'gender', type: 'String'}, | ||
366 | + ] | ||
367 | + }, { | ||
368 | + // Plus/Star列表-添加 | ||
369 | + route: '/guang/plustar/addPlustar', | ||
370 | + method: 'POST', | ||
371 | + url: '/guang/plustar/addPlustar', | ||
372 | + params: [ | ||
373 | + {name: 'brandType', type: 'String'}, | ||
374 | + {name: 'status', type: 'String'}, | ||
375 | + {name: 'brandId', type: 'String'}, | ||
376 | + {name: 'gender', type: 'String'}, | ||
377 | + {name: 'coverImg', type: 'String'}, | ||
378 | + {name: 'bannerImg', type: 'String'}, | ||
379 | + {name: 'bannerTitle', type: 'String'}, | ||
380 | + {name: 'orderBy', type: 'String'}, | ||
381 | + ] | ||
382 | + }, { | ||
383 | + // Plus/Star列表-编辑 | ||
384 | + route: '/guang/plustar/getDetail', | ||
385 | + method: 'POST', | ||
386 | + url: '/guang/plustar/getDetail', | ||
387 | + params: [ | ||
388 | + {name: 'id', type: 'Number'}, | ||
389 | + {name: 'brandType', type: 'String'}, | ||
390 | + {name: 'status', type: 'String'}, | ||
391 | + {name: 'brandId', type: 'String'}, | ||
392 | + {name: 'gender', type: 'String'}, | ||
393 | + {name: 'coverImg', type: 'String'}, | ||
394 | + {name: 'bannerImg', type: 'String'}, | ||
395 | + {name: 'bannerTitle', type: 'String'}, | ||
396 | + {name: 'orderBy', type: 'String'}, | ||
397 | + ] | ||
398 | + },{ | ||
344 | 399 | ||
400 | + // Plus/Star列表-获取详情 | ||
401 | + route: '/guang/plustar/delPlustar', | ||
402 | + method: 'POST', | ||
403 | + url: '/guang/plustar/delPlustar', | ||
404 | + params: [ | ||
405 | + {name: 'id', type: 'Number'} | ||
406 | + ] | ||
407 | + }, | ||
408 | + { | ||
345 | 409 | ||
410 | + // Plus/Star列表-删除 | ||
411 | + route: '/guang/plustar/delPlustar', | ||
412 | + method: 'POST', | ||
413 | + url: '/guang/plustar/delPlustar', | ||
414 | + params: [ | ||
415 | + {name: 'id', type: 'Number'} | ||
416 | + ] | ||
417 | + }, | ||
418 | + | ||
419 | +//=================================【Plus/Star分类】 | ||
420 | + {//逛->Plus/Star分类 空白页 | ||
421 | + route: '/guang/plustarcategory/index', | ||
422 | + method: 'GET', | ||
423 | + view: 'pages/guang/plusStarCategory', | ||
424 | + src: '/guang/plusStarCategory', | ||
425 | + data: { | ||
426 | + iscreate: true | ||
427 | + } | ||
428 | + }, | ||
429 | + | ||
430 | +//=================================【品牌关注】 | ||
431 | + {//逛->品牌关注 空白页 | ||
432 | + route: '/guang/relationship/index', | ||
433 | + method: 'GET', | ||
434 | + view: 'pages/guang/brandConcern', | ||
435 | + src: '/guang/brandConcern', | ||
436 | + data: { | ||
437 | + iscreate: true | ||
438 | + } | ||
439 | + },{ | ||
440 | + | ||
441 | + // 品牌关注 列表数据 | ||
442 | + route: '/guang/relationship/getList', | ||
443 | + method: 'POST', | ||
444 | + url: '/guang/relationship/getList', | ||
445 | + params: [ | ||
446 | + {name: 'page', type: 'Number'}, | ||
447 | + {name: 'size', type: 'Number'}, | ||
448 | + {name: 'brandType', type: 'String'}, | ||
449 | + {name: 'status', type: 'String'}, | ||
450 | + {name: 'brandId', type: 'String'}, | ||
451 | + {name: 'gender', type: 'String'}, | ||
452 | + ] | ||
453 | + }, { | ||
454 | + // 品牌关注-添加 | ||
455 | + route: '/guang/relationship/addRel', | ||
456 | + method: 'POST', | ||
457 | + url: '/guang/relationship/addRel', | ||
458 | + params: [ | ||
459 | + {name: 'brandType', type: 'Number'}, | ||
460 | + {name: 'activityName', type: 'String'}, | ||
461 | + {name: 'brandId', type: 'String'}, | ||
462 | + {name: 'discount', type: 'Number'}, | ||
463 | + {name: 'activityImg', type: 'String'}, | ||
464 | + ] | ||
465 | + }, { | ||
466 | + // 品牌关注列表-编辑 | ||
467 | + route: '/guang/relationship/updateRel', | ||
468 | + method: 'POST', | ||
469 | + url: '/guang/relationship/updateRel', | ||
470 | + params: [ | ||
471 | + {name: 'id', type: 'Number'}, | ||
472 | + {name: 'brandType', type: 'Number'}, | ||
473 | + {name: 'activityName', type: 'String'}, | ||
474 | + {name: 'brandId', type: 'String'}, | ||
475 | + {name: 'discount', type: 'Number'}, | ||
476 | + {name: 'activityImg', type: 'String'}, | ||
477 | + ] | ||
478 | + }, | ||
479 | + { | ||
480 | + | ||
481 | + // 品牌关注列表-删除 | ||
482 | + route: '/guang/relationship/delRel', | ||
483 | + method: 'POST', | ||
484 | + url: '/guang/relationship/delRel', | ||
485 | + params: [ | ||
486 | + {name: 'id', type: 'Number'} | ||
487 | + ] | ||
488 | + }, | ||
346 | //================================= [下拉框调用的接口] | 489 | //================================= [下拉框调用的接口] |
347 | {// 作者 | 490 | {// 作者 |
348 | route: '/guang/article/getAuthorList', | 491 | route: '/guang/article/getAuthorList', |
@@ -370,6 +513,15 @@ exports.res = [ | @@ -370,6 +513,15 @@ exports.res = [ | ||
370 | 513 | ||
371 | }, | 514 | }, |
372 | 515 | ||
516 | + {// plus star 频道 | ||
517 | + route: '/guang/plustarcategory/getCategoryNames', | ||
518 | + method: 'POST', | ||
519 | + url: '/guang/plustarcategory/getCategoryNames', | ||
520 | + params: [ | ||
521 | + {name: 'status', type: 'Number'}, | ||
522 | + ] | ||
523 | + | ||
524 | + }, | ||
373 | 525 | ||
374 | ]; | 526 | ]; |
375 | 527 |
server/views/pages/guang/brandConcern.html
0 → 100644
1 | +<div class="pageheader"> | ||
2 | + <div class="media"> | ||
3 | + <div class="pageicon pull-left"> | ||
4 | + <i class="fa fa-th-list"></i> | ||
5 | + </div> | ||
6 | + <div class="media-body"> | ||
7 | + <ul class="breadcrumb"> | ||
8 | + <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li> | ||
9 | + <li><a href="">品牌关系管理</a></li> | ||
10 | + <li>品牌关系列表</li> | ||
11 | + </ul> | ||
12 | + | ||
13 | + <div> | ||
14 | + <div style="width: 30%;float: left;"> | ||
15 | + <h4>品牌关系列表</h4> | ||
16 | + </div> | ||
17 | + </div> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | +</div> | ||
21 | + | ||
22 | +<div class="contentpanel"> | ||
23 | + <div class="panel panel-default" style="margin-bottom:10px;"> | ||
24 | + <div class="panel-body"> | ||
25 | + <a id="add-btn" href="javascript:;" class="btn btn-info">添加</a> | ||
26 | + </div> | ||
27 | + <div class="panel-body"> | ||
28 | + | ||
29 | + <div class="row"> | ||
30 | + | ||
31 | + <div class="panel-col"> | ||
32 | + <select id="g-brandId" class="form-control"> | ||
33 | + <option value="-1">全部品牌</option> | ||
34 | + </select> | ||
35 | + </div> | ||
36 | + | ||
37 | + <div class="panel-col"> | ||
38 | + <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | ||
39 | + <a id="all-btn" href="" class="btn btn-info">全部</a> | ||
40 | + </div> | ||
41 | + | ||
42 | + </div> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="panel panel-primary-head"> | ||
46 | + <div id="basicTable_wrapper" class="dataTables_wrapper no-footer"> | ||
47 | + <div class="dataTables_length" id="basicTable"> | ||
48 | + </div> | ||
49 | + <nav> | ||
50 | + <ul id="pagination" class="pagination pagination-lg"></ul> | ||
51 | + </nav> | ||
52 | + </div> | ||
53 | + </div> | ||
54 | +</div> | ||
55 | + | ||
56 | + | ||
57 | +<script type="text/template" id="template"> | ||
58 | + | ||
59 | + <div id="templete-top"> | ||
60 | + <input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title=""> | ||
61 | + <div class="form-group"> | ||
62 | + <label for="brandId" class="col-sm-2 control-label">品牌名称*:</label> | ||
63 | + | ||
64 | + <div class="col-sm-10"> | ||
65 | + <select required="required" id="brandId" value="[[brandId]]" class="form-control"> | ||
66 | + <option value="[[brandId||-1]]">[[brandName||"请选择"]]</option> | ||
67 | + </select> | ||
68 | + </div> | ||
69 | + </div> | ||
70 | + | ||
71 | + | ||
72 | + <div class="form-group"> | ||
73 | + <label class="col-sm-2 control-label">类型 <span class="asterisk">*</span></label> | ||
74 | + <div class="col-sm-9"> | ||
75 | + <input for="radio" type="hidden" id="brandType" value="[[brandType]]"/> | ||
76 | + <div class="rdio rdio-primary"> | ||
77 | + <input type="radio" id="int_new" value="1" name="brandType" required=""> | ||
78 | + <label for="int_new">新品</label> | ||
79 | + </div><!-- rdio --> | ||
80 | + <div class="rdio rdio-primary"> | ||
81 | + <input type="radio" value="2" id="int_sale" name="brandType"> | ||
82 | + <label for="int_sale">折扣</label> | ||
83 | + <select name="discount" id="discount" value="[[discount]]" style="display:none;"> | ||
84 | + | ||
85 | + <option value="0">请选择</option> | ||
86 | + <option value="1">1折</option> | ||
87 | + <option value="2">2折</option> | ||
88 | + <option value="3">3折</option> | ||
89 | + <option value="4">4折</option> | ||
90 | + <option value="5">5折</option> | ||
91 | + <option value="6">6折</option> | ||
92 | + <option value="7">7折</option> | ||
93 | + <option value="8">8折</option> | ||
94 | + <option value="9">9折</option> | ||
95 | + </select> | ||
96 | + </div><!-- rdio --> | ||
97 | + | ||
98 | + <div class="rdio rdio-primary"> | ||
99 | + <input type="radio" value="3" id="int_recommend" name="brandType"> | ||
100 | + <label for="int_recommend">推荐</label> | ||
101 | + </div><!-- rdio --> | ||
102 | + | ||
103 | + <div class="rdio rdio-primary"> | ||
104 | + <input type="radio" value="4" id="int_activity" name="brandType"> | ||
105 | + <label for="int_activity">活动</label> | ||
106 | + </div><!-- rdio --> | ||
107 | + <label id="genderError" class="error"></label> | ||
108 | + </div> | ||
109 | + | ||
110 | + </div> | ||
111 | + | ||
112 | + | ||
113 | + <div class="form-group" id="activity-name" style=""> | ||
114 | + <label class="col-sm-3 control-label">活动名称<span class="asterisk">*</span></label> | ||
115 | + <div class="col-sm-9"> | ||
116 | + <input type="text" id="activityName" name="activityName" value="[[activityName]]" class="form-control" placeholder="请填写活动名称" value=""> | ||
117 | + | ||
118 | + </div> | ||
119 | + </div> | ||
120 | + </div> | ||
121 | + | ||
122 | + | ||
123 | + <div id="activity"> | ||
124 | + | ||
125 | + <div class="form-group" style="" id="activity_url"> | ||
126 | + <label class="col-sm-3 control-label">活动图片<span class="asterisk">*</span></label> | ||
127 | + <div class="col-sm-9"> | ||
128 | + <ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;"> | ||
129 | + <!-- 修改时不存在 --> | ||
130 | + | ||
131 | + <li class="cover-image-item fileinput-button"> | ||
132 | + <div class="goods-img"> | ||
133 | + <a class="fileinput-button-icon" href="javascript:void(0);">+</a> | ||
134 | + | ||
135 | + <input type="file" class="goods-img-upload picfile" id="picfile" name="picfile"></div> | ||
136 | + </li> | ||
137 | + | ||
138 | + </ul> | ||
139 | + | ||
140 | + </div> | ||
141 | + </div> | ||
142 | + </div> | ||
143 | + | ||
144 | + | ||
145 | +</script> | ||
146 | + | ||
147 | +<script type="text/template" id="imgeUpload"> | ||
148 | + [[each pictureBoList as _item _index]] | ||
149 | + <li class="cover-image-item image-list" data-index=[[_index]]> | ||
150 | + <div class="goods-img"> | ||
151 | + <a class="fileinput-button-icon" href="javascript:void(0);"> | ||
152 | + <img src="[[_item]]"> | ||
153 | + </a> | ||
154 | + <i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[_index]]"></i> | ||
155 | + </div> | ||
156 | + </li> | ||
157 | + [[/each]] | ||
158 | +</script> |
1 | +<div class="pageheader"> | ||
2 | + <div class="media"> | ||
3 | + <div class="pageicon pull-left"> | ||
4 | + <i class="fa fa-th-list"></i> | ||
5 | + </div> | ||
6 | + <div class="media-body"> | ||
7 | + <ul class="breadcrumb"> | ||
8 | + <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li> | ||
9 | + <li><a href="">品牌关系管理</a></li> | ||
10 | + <li>品牌关系列表</li> | ||
11 | + </ul> | ||
12 | + | ||
13 | + <div> | ||
14 | + <div style="width: 30%;float: left;"> | ||
15 | + <h4>品牌关系列表</h4> | ||
16 | + </div> | ||
17 | + </div> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | +</div> | ||
21 | + | ||
22 | +<div class="contentpanel"> | ||
23 | + <div class="panel panel-default" style="margin-bottom:10px;"> | ||
24 | + <div class="panel-body"> | ||
25 | + <a id="add-btn" href="javascript:;" class="btn btn-info">添加</a> | ||
26 | + </div> | ||
27 | + <div class="panel-body"> | ||
28 | + | ||
29 | + <div class="row"> | ||
30 | + | ||
31 | + <div class="panel-col"> | ||
32 | + <select id="g-brandId" class="form-control"> | ||
33 | + <option value="-1">全部品牌</option> | ||
34 | + </select> | ||
35 | + </div> | ||
36 | + | ||
37 | + <div class="panel-col"> | ||
38 | + <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | ||
39 | + <a id="all-btn" href="" class="btn btn-info">全部</a> | ||
40 | + </div> | ||
41 | + | ||
42 | + </div> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="panel panel-primary-head"> | ||
46 | + <div id="basicTable_wrapper" class="dataTables_wrapper no-footer"> | ||
47 | + <div class="dataTables_length" id="basicTable"> | ||
48 | + </div> | ||
49 | + <nav> | ||
50 | + <ul id="pagination" class="pagination pagination-lg"></ul> | ||
51 | + </nav> | ||
52 | + </div> | ||
53 | + </div> | ||
54 | +</div> | ||
55 | + | ||
56 | + | ||
57 | +<script type="text/template" id="template"> | ||
58 | + | ||
59 | + | ||
60 | + <div class="form-group"> | ||
61 | + <label for="brandType" class="col-sm-2 control-label">频道类别:</label> | ||
62 | + <div class="col-sm-10"> | ||
63 | + <input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title=""> | ||
64 | + <select id="brandType" value="[[brandType]]" class="form-control"> | ||
65 | + <option value="[[brandType||-1]]">[[categoryName||"请选择"]]</option> | ||
66 | + </select> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + | ||
70 | + <div class="form-group"> | ||
71 | + <label for="brandType" class="col-sm-2 control-label">品牌名称:</label> | ||
72 | + <div class="col-sm-10"> | ||
73 | + <select id="brandId" value="[[brandId]]" class="form-control"> | ||
74 | + <option value="[[brandId||-1]]">[[brandName||"请选择"]]</option> | ||
75 | + </select> | ||
76 | + </div> | ||
77 | + </div> | ||
78 | + | ||
79 | + <div class="form-group"> | ||
80 | + <label for="brandType" class="col-sm-2 control-label">上传封面图:</label> | ||
81 | + | ||
82 | + <div class="col-sm-10"> | ||
83 | + <p>只需上传1张</p> | ||
84 | + <ul class="upload-image-list" style="margin-left: -40px;"> | ||
85 | + <li class="fileinput-button" style="width: 300px;height:150px;"> | ||
86 | + <a class="fileinput-button-icon" id="coverImg" href="javascript:;">+</a></li> | ||
87 | + </ul> | ||
88 | + </div> | ||
89 | + </div> | ||
90 | + | ||
91 | + <div class="form-group"> | ||
92 | + <label for="brandType" class="col-sm-2 control-label">上传banner图:</label> | ||
93 | + | ||
94 | + <div class="col-sm-10"> | ||
95 | + <p>最多上传2张(只有明星潮品需上传2张)</p> | ||
96 | + <ul class="upload-image-list" id="bannerImgBox" style="margin-left: -40px;"> | ||
97 | + <li class="fileinput-button"><a class="fileinput-button-icon" id="bannerImg" href="javascript:;">+</a></li> | ||
98 | + </ul> | ||
99 | + </div> | ||
100 | + </div> | ||
101 | + | ||
102 | + <div class="form-group"> | ||
103 | + <label for="bannerTitle" class="col-sm-2 control-label">品牌banner标题:</label> | ||
104 | + <div class="col-sm-10"> | ||
105 | + <input type="text" value="[[bannerTitle]]" name="content" id="bannerTitle" placeholder="品牌banner标题" required="required" class="form-control"> | ||
106 | + </div> | ||
107 | + </div> | ||
108 | + | ||
109 | + <div class="form-group"> | ||
110 | + <label for="orderBy" class="col-sm-2 control-label">排序:</label> | ||
111 | + <div class="col-sm-10"> | ||
112 | + <input type="number" value="" name="content" id="orderBy" placeholder="排序" required="required" class="form-control"> | ||
113 | + </div> | ||
114 | + </div> | ||
115 | + | ||
116 | + <div class="form-group"> | ||
117 | + <label for="gender" class="col-sm-2 control-label">性别:</label> | ||
118 | + <div class="radio"> | ||
119 | + <label><input type="radio" value="1" name="gender" kl_vkbd_parsed="true">男</label> | ||
120 | + <label><input type="radio" value="2" name="gender" kl_vkbd_parsed="true">女</label> | ||
121 | + <label><input type="radio" value="3" name="gender" kl_vkbd_parsed="true">通用</label> | ||
122 | + </div> | ||
123 | + <input id="gender" type="hidden" value="[[gender]]" for="radio" required="required" kl_vkbd_parsed="true"> | ||
124 | + </div> | ||
125 | + | ||
126 | + <div class="form-group"> | ||
127 | + <label for="status" class="col-sm-2 control-label">是否可用:</label> | ||
128 | + <div class="radio"> | ||
129 | + <label><input type="radio" value="1" name="status" kl_vkbd_parsed="true">可用</label> | ||
130 | + <label><input type="radio" value="2" name="status" kl_vkbd_parsed="true">不可用</label> | ||
131 | + </div> | ||
132 | + <input id="status" type="hidden" value="[[status]]" for="radio" required="required" kl_vkbd_parsed="true"> | ||
133 | + </div> | ||
134 | + | ||
135 | +</script> |
1 | +<div class="pageheader"> | ||
2 | + <div class="media"> | ||
3 | + <div class="pageicon pull-left"> | ||
4 | + <i class="fa fa-th-list"></i> | ||
5 | + </div> | ||
6 | + <div class="media-body"> | ||
7 | + <ul class="breadcrumb"> | ||
8 | + <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li> | ||
9 | + <li><a href="">Plus</a></li> | ||
10 | + <li>Star</li> | ||
11 | + </ul> | ||
12 | + | ||
13 | + <div> | ||
14 | + <div style="width: 30%;float: left;"> | ||
15 | + <h4>品牌列表管理</h4> | ||
16 | + </div> | ||
17 | + </div> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | +</div> | ||
21 | + | ||
22 | +<div class="contentpanel"> | ||
23 | + <div class="panel panel-default" style="margin-bottom:10px;"> | ||
24 | + <div class="panel-body"> | ||
25 | + <a id="add-btn" href="javascript:;" class="btn btn-info">添加</a> | ||
26 | + </div> | ||
27 | + <div class="panel-body"> | ||
28 | + | ||
29 | + | ||
30 | + <div class="row"> | ||
31 | + | ||
32 | + <div class="panel-col"> | ||
33 | + <select id="g-brandType" class="form-control"> | ||
34 | + <option value="-1">请选择频道</option> | ||
35 | + </select> | ||
36 | + </div> | ||
37 | + | ||
38 | + <div class="panel-col"> | ||
39 | + <select id="g-status" class="form-control"> | ||
40 | + <option value="-1">选择品牌状态</option> | ||
41 | + <option value="1">可用</option> | ||
42 | + <option value="2">不可用</option> | ||
43 | + </select> | ||
44 | + </div> | ||
45 | + | ||
46 | + | ||
47 | + <div class="panel-col"> | ||
48 | + <select id="g-brandId" class="form-control"> | ||
49 | + <option value="-1">全部品牌</option> | ||
50 | + </select> | ||
51 | + </div> | ||
52 | + | ||
53 | + <div class="panel-col"> | ||
54 | + <select id="g-gender" class="form-control"> | ||
55 | + <option value="-1">性别</option> | ||
56 | + <option value="1">男</option> | ||
57 | + <option value="2">女</option> | ||
58 | + <option value="3">通用</option> | ||
59 | + | ||
60 | + </select> | ||
61 | + </div> | ||
62 | + | ||
63 | + <div class="panel-col"> | ||
64 | + <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | ||
65 | + <a id="all-btn" href="" class="btn btn-info">全部</a> | ||
66 | + </div> | ||
67 | + | ||
68 | + </div> | ||
69 | + </div> | ||
70 | + </div> | ||
71 | + <div class="panel panel-primary-head"> | ||
72 | + <div id="basicTable_wrapper" class="dataTables_wrapper no-footer"> | ||
73 | + <div class="dataTables_length" id="basicTable"> | ||
74 | + </div> | ||
75 | + <nav> | ||
76 | + <ul id="pagination" class="pagination pagination-lg"></ul> | ||
77 | + </nav> | ||
78 | + </div> | ||
79 | + </div> | ||
80 | +</div> | ||
81 | + | ||
82 | + | ||
83 | +<script type="text/template" id="template"> | ||
84 | + | ||
85 | + <div id="templete-top"> | ||
86 | + <div class="form-group"> | ||
87 | + <label for="brandType" class="col-sm-2 control-label">频道类别:</label> | ||
88 | + <div class="col-sm-10"> | ||
89 | + <input type="hidden" name="" value="[[id]]" id="id" class="form-control" pattern="" title=""> | ||
90 | + <select id="brandType" value="[[brandType]]" class="form-control"> | ||
91 | + <option value="[[brandType||-1]]">[[categoryName||"请选择"]]</option> | ||
92 | + </select> | ||
93 | + </div> | ||
94 | + </div> | ||
95 | + | ||
96 | + <div class="form-group"> | ||
97 | + <label for="brandId" class="col-sm-2 control-label">品牌名称:</label> | ||
98 | + <div class="col-sm-10"> | ||
99 | + <select id="brandId" value="[[brandId]]" class="form-control"> | ||
100 | + <option value="[[brandId||-1]]">[[brandName||"请选择"]]</option> | ||
101 | + </select> | ||
102 | + </div> | ||
103 | + </div> | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + <div class="form-group"> | ||
108 | + <label for="bannerTitle" class="col-sm-2 control-label">品牌banner标题:</label> | ||
109 | + <div class="col-sm-10"> | ||
110 | + <input type="text" value="[[bannerTitle]]" name="content" id="bannerTitle" placeholder="品牌banner标题" required="required" class="form-control"> | ||
111 | + </div> | ||
112 | + </div> | ||
113 | + | ||
114 | + <div class="form-group"> | ||
115 | + <label for="orderBy" class="col-sm-2 control-label">排序:</label> | ||
116 | + <div class="col-sm-10"> | ||
117 | + <input type="number" value="[[orderBy]]" name="content" id="orderBy" placeholder="排序" required="required" class="form-control"> | ||
118 | + </div> | ||
119 | + </div> | ||
120 | + | ||
121 | + <div class="form-group"> | ||
122 | + <label for="gender" class="col-sm-2 control-label">性别:</label> | ||
123 | + <div class="radio"> | ||
124 | + <label><input type="radio" value="1" name="gender" kl_vkbd_parsed="true">男</label> | ||
125 | + <label><input type="radio" value="2" name="gender" kl_vkbd_parsed="true">女</label> | ||
126 | + <label><input type="radio" value="3" name="gender" kl_vkbd_parsed="true">通用</label> | ||
127 | + </div> | ||
128 | + <input id="gender" type="hidden" value="[[gender]]" for="radio" required="required" kl_vkbd_parsed="true"> | ||
129 | + </div> | ||
130 | + | ||
131 | + <div class="form-group"> | ||
132 | + <label for="status" class="col-sm-2 control-label">是否可用:</label> | ||
133 | + <div class="radio"> | ||
134 | + <label><input type="radio" value="1" name="status" kl_vkbd_parsed="true">可用</label> | ||
135 | + <label><input type="radio" value="2" name="status" kl_vkbd_parsed="true">不可用</label> | ||
136 | + </div> | ||
137 | + <input id="status" type="hidden" value="[[status]]" for="radio" required="required" kl_vkbd_parsed="true"> | ||
138 | + </div> | ||
139 | + | ||
140 | + | ||
141 | + <div class="form-group"> | ||
142 | + <label for="coverImg" class="col-sm-2 control-label">上传封面图:</label> | ||
143 | + <div class="col-sm-8" id="colorUrlBox"> | ||
144 | + <input type="file" id="coverImg" name="coverImg" value="[[coverImg]]"> | ||
145 | + </div> | ||
146 | + </div> | ||
147 | + | ||
148 | + | ||
149 | + </div> | ||
150 | + | ||
151 | + | ||
152 | + <div id="mutil-image"> | ||
153 | + <div class="form-group"> | ||
154 | + <label for="brandType" class="col-sm-2 control-label">上传banner图:</label> | ||
155 | + | ||
156 | + <div class="col-sm-10"> | ||
157 | + <p>最多上传2张(只有明星潮品需上传2张)</p> | ||
158 | + <ul class="cover-image-list col-sm-10" id="addPic" style="padding: 0;margin: 0;"> | ||
159 | + <!-- 修改时不存在 --> | ||
160 | + | ||
161 | + <li class="cover-image-item fileinput-button"> | ||
162 | + <div class="goods-img"> | ||
163 | + <a class="fileinput-button-icon" href="javascript:void(0);">+</a> | ||
164 | + | ||
165 | + <input type="file" class="goods-img-upload picfile" id="picfile" name="picfile"></div> | ||
166 | + </li> | ||
167 | + | ||
168 | + </ul> | ||
169 | + </div> | ||
170 | + </div> | ||
171 | + </div> | ||
172 | + | ||
173 | + | ||
174 | +</script> | ||
175 | + | ||
176 | + | ||
177 | +<script type="text/template" id="imgeUpload"> | ||
178 | + [[each pictureBoList as _item _index]] | ||
179 | + <li class="cover-image-item image-list" data-index=[[_index]]> | ||
180 | + <div class="goods-img"> | ||
181 | + <a class="fileinput-button-icon" href="javascript:void(0);"> | ||
182 | + <img src="[[_item]]"> | ||
183 | + </a> | ||
184 | + <i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[_index]]"></i> | ||
185 | + </div> | ||
186 | + </li> | ||
187 | + [[/each]] | ||
188 | +</script> |
-
Please register or login to post a comment