Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop
Showing
19 changed files
with
716 additions
and
336 deletions
@@ -8,6 +8,7 @@ dialog=require('./dialog'), | @@ -8,6 +8,7 @@ dialog=require('./dialog'), | ||
8 | tab=require('./tab'), | 8 | tab=require('./tab'), |
9 | tabTree=require('./tabTree'), | 9 | tabTree=require('./tabTree'), |
10 | util=require('./util'), | 10 | util=require('./util'), |
11 | +components=require('./edit2'), | ||
11 | drag=require('./drag'); | 12 | drag=require('./drag'); |
12 | 13 | ||
13 | var common={ | 14 | var common={ |
@@ -18,7 +19,8 @@ var common={ | @@ -18,7 +19,8 @@ var common={ | ||
18 | edit:edit, | 19 | edit:edit, |
19 | util:util, | 20 | util:util, |
20 | tabTree:tabTree, | 21 | tabTree:tabTree, |
21 | - drag:drag | 22 | + drag:drag, |
23 | + components:components | ||
22 | } | 24 | } |
23 | 25 | ||
24 | module.exports=common; | 26 | module.exports=common; |
@@ -315,7 +315,7 @@ toast.close = function() { | @@ -315,7 +315,7 @@ toast.close = function() { | ||
315 | } | 315 | } |
316 | toast.defaults = { | 316 | toast.defaults = { |
317 | init: null, | 317 | init: null, |
318 | - zIndex: 1024, | 318 | + zIndex: 50, |
319 | lock: true, | 319 | lock: true, |
320 | content: 'Loading...', | 320 | content: 'Loading...', |
321 | title: '', | 321 | title: '', |
@@ -11,7 +11,7 @@ drag.prototype = { | @@ -11,7 +11,7 @@ drag.prototype = { | ||
11 | dragItemList: null, | 11 | dragItemList: null, |
12 | dragItemPos: [], | 12 | dragItemPos: [], |
13 | Initialize: function(){ | 13 | Initialize: function(){ |
14 | - this.dragItemList = $(this.el).find("li"); | 14 | + this.dragItemList = $(this.el).find(".dragItem"); |
15 | if(this.dragItemList.length > 0){ | 15 | if(this.dragItemList.length > 0){ |
16 | var elHeight = $(this.el).height(); | 16 | var elHeight = $(this.el).height(); |
17 | $(this.el).css("position","relative").css("height", elHeight + "px"); | 17 | $(this.el).css("position","relative").css("height", elHeight + "px"); |
@@ -75,8 +75,8 @@ drag.prototype = { | @@ -75,8 +75,8 @@ drag.prototype = { | ||
75 | $(oNear).css("border","0px").css("z-index", _self.minZindex++); | 75 | $(oNear).css("border","0px").css("z-index", _self.minZindex++); |
76 | $(obj).css("z-index", _self.minZindex++); | 76 | $(obj).css("z-index", _self.minZindex++); |
77 | 77 | ||
78 | - _self.move(oNear,_self.dragItemPos[obj.index]); | ||
79 | - _self.move(obj,_self.dragItemPos[oNear.index]); | 78 | + //_self.move(oNear,_self.dragItemPos[obj.index]); |
79 | + //_self.move(obj,_self.dragItemPos[oNear.index]); | ||
80 | 80 | ||
81 | //交换index | 81 | //交换index |
82 | oNear.index += obj.index; | 82 | oNear.index += obj.index; |
@@ -187,7 +187,7 @@ drag.prototype = { | @@ -187,7 +187,7 @@ drag.prototype = { | ||
187 | }, | 187 | }, |
188 | 188 | ||
189 | destroy: function(){ | 189 | destroy: function(){ |
190 | - this.dragItemList = $(this.el).find("li"); | 190 | + this.dragItemList = $(this.el).find(".dragItem"); |
191 | if(this.dragItemList.length > 0){ | 191 | if(this.dragItemList.length > 0){ |
192 | $(this.el).removeAttr("style"); | 192 | $(this.el).removeAttr("style"); |
193 | for(var i=0; i<this.dragItemList.length; i++){ | 193 | for(var i=0; i<this.dragItemList.length; i++){ |
client/js/common/edit2.js
0 → 100644
1 | +var $ = require('jquery'); | ||
2 | +var Validator = require('./validate'); | ||
3 | +require('./upload'); | ||
4 | +require('../util/datepicker'); | ||
5 | +require('../util/jquery.gritter'); | ||
6 | + | ||
7 | + | ||
8 | +var components=function(el,option){ | ||
9 | + this.registerEvent = { | ||
10 | + validate: [], | ||
11 | + render: [], | ||
12 | + file_onComplete: [] | ||
13 | + }; | ||
14 | + this.el = el; | ||
15 | + this.option = option || {}; | ||
16 | +} | ||
17 | +components.prototype={ | ||
18 | + constructor:components, | ||
19 | + on: function(name, callback) { | ||
20 | + var __self = this; | ||
21 | + var _e = __self.registerEvent[name]; | ||
22 | + if (_e) { | ||
23 | + _e.push(callback); | ||
24 | + } | ||
25 | + return _e; | ||
26 | + }, | ||
27 | + off: function(name, callback) { | ||
28 | + var __self = this; | ||
29 | + var _e = __self.registerEvent[name]; | ||
30 | + var e = []; | ||
31 | + me.each(_e, function(name, _callback) { | ||
32 | + if (_callback === callback) { | ||
33 | + e.push(name); | ||
34 | + } | ||
35 | + }); | ||
36 | + me.each(e.reverse(), function(name, _callback) { | ||
37 | + _e.splice(_callback, 1); | ||
38 | + }); | ||
39 | + }, | ||
40 | + init: function() { | ||
41 | + var __self = this; | ||
42 | + this.__fileRender(); | ||
43 | + return this; | ||
44 | + }, | ||
45 | + validate:function(){ | ||
46 | + return true; | ||
47 | + }, | ||
48 | + __fileRender:function(){ | ||
49 | + | ||
50 | + var that=this; | ||
51 | + | ||
52 | + if ($('input[type="file"]', that.el).length > 0) { | ||
53 | + | ||
54 | + $('input[type="file"]', that.el).each(function() { | ||
55 | + | ||
56 | + var bucket= $(this).data("bucket")||that.option.bucket; | ||
57 | + | ||
58 | + if(!bucket){ | ||
59 | + alert("bucket 不存在"); | ||
60 | + } | ||
61 | + | ||
62 | + $(this).wrap("<div class='fileinput-button'></div>"); | ||
63 | + var parent=$(this).parent(".fileinput-button"); | ||
64 | + | ||
65 | + | ||
66 | + if($(this).attr("value")){ | ||
67 | + parent.append('<a class="fileinput-button-icon" href="javascript:void(0);"><img src="'+$(this).attr("value")+'" width=100 height=100/></a>'); | ||
68 | + }else{ | ||
69 | + parent.append('<a class="fileinput-button-icon" href="javascript:void(0);">+</a>'); | ||
70 | + } | ||
71 | + | ||
72 | + | ||
73 | + $('input[type="file"]', that.el).ajaxfileupload({ | ||
74 | + 'action': '/ajax/upload', | ||
75 | + 'params': { | ||
76 | + "bucket": bucket, | ||
77 | + __type: "upload" | ||
78 | + }, | ||
79 | + 'onComplete': function(response) { | ||
80 | + if (response.status && response.code == 200) { | ||
81 | + that.__listen("file_onComplete", { | ||
82 | + field: $(this).data("field"), | ||
83 | + data: response.data, | ||
84 | + datas:response.datas | ||
85 | + }); | ||
86 | + var parent=$(this).parent(".fileinput-button"); | ||
87 | + if(response.data){ | ||
88 | + parent.find(".fileinput-button-icon").html("<img src='"+response.data+"' width=100 height=100/>"); | ||
89 | + } | ||
90 | + | ||
91 | + } else { | ||
92 | + that.$tip(response.message); | ||
93 | + } | ||
94 | + } | ||
95 | + }); | ||
96 | + }) | ||
97 | + | ||
98 | + } | ||
99 | + }, | ||
100 | + __listen: function(key, o, callback) { | ||
101 | + var __self = this; | ||
102 | + if (__self.registerEvent[key] && __self.registerEvent[key].length > 0) { | ||
103 | + for (_e in __self.registerEvent[key]) { | ||
104 | + var a = __self.registerEvent[key][_e](o); | ||
105 | + if (callback) { | ||
106 | + callback(a); | ||
107 | + } | ||
108 | + } | ||
109 | + } | ||
110 | + }, | ||
111 | + __err: function(msg, callback) { | ||
112 | + if (msg) { | ||
113 | + this.$tip(msg, callback); | ||
114 | + } | ||
115 | + }, | ||
116 | + $tip: function(msg, callback, type) { | ||
117 | + $.gritter.add({ | ||
118 | + title: msg, | ||
119 | + class_name: type || 'growl-warning', | ||
120 | + sticky: false, | ||
121 | + time: 1000, | ||
122 | + after_open: setTimeout(function() { | ||
123 | + callback && callback(); | ||
124 | + }, 1000) | ||
125 | + }); | ||
126 | + } | ||
127 | +} | ||
128 | +components.prototype.init.prototype = components.prototype; | ||
129 | + | ||
130 | +module.exports = components; |
@@ -20,7 +20,7 @@ if(param&¶m.length==1){ | @@ -20,7 +20,7 @@ if(param&¶m.length==1){ | ||
20 | 20 | ||
21 | console.log("ViewModel",ViewModel); | 21 | console.log("ViewModel",ViewModel); |
22 | 22 | ||
23 | -var edit = new common.edit(".modal-body", { | 23 | +var components = new common.components(".modal-body", { |
24 | bucket: "goodsimg" | 24 | bucket: "goodsimg" |
25 | }); | 25 | }); |
26 | 26 | ||
@@ -104,7 +104,7 @@ var Bll = { | @@ -104,7 +104,7 @@ var Bll = { | ||
104 | button: [{ | 104 | button: [{ |
105 | value: "保存", | 105 | value: "保存", |
106 | callback: function() { | 106 | callback: function() { |
107 | - if (edit.validate()) { | 107 | + if (components.validate()) { |
108 | //TODO | 108 | //TODO |
109 | !!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module); | 109 | !!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module); |
110 | Bll.__render("#add-content","template_content",{modules:Bll.contentDatas}); | 110 | Bll.__render("#add-content","template_content",{modules:Bll.contentDatas}); |
@@ -124,15 +124,13 @@ var Bll = { | @@ -124,15 +124,13 @@ var Bll = { | ||
124 | Bll.__editRender(); | 124 | Bll.__editRender(); |
125 | }, | 125 | }, |
126 | __editRender:function(){ | 126 | __editRender:function(){ |
127 | - edit.init(); | ||
128 | - edit.on("callback", function(obj) { | ||
129 | - if (/^file_onComplete/.test(obj.key)) { | 127 | + components.init(); |
128 | + components.on("file_onComplete", function(obj) { | ||
130 | var names=obj.field; | 129 | var names=obj.field; |
131 | Bll.module.contentData.data=common.util.__buildobj(names, '.', Bll.module.contentData.data, function(o, name) { | 130 | Bll.module.contentData.data=common.util.__buildobj(names, '.', Bll.module.contentData.data, function(o, name) { |
132 | o[name] = obj.data; | 131 | o[name] = obj.data; |
133 | }); | 132 | }); |
134 | - console.log(Bll.module.contentData); | ||
135 | - } | 133 | + console.log(obj); |
136 | }); | 134 | }); |
137 | }, | 135 | }, |
138 | rendContent: function() { | 136 | rendContent: function() { |
1 | -var Button=[ | 1 | +var Button = [ |
2 | { | 2 | { |
3 | - template_intro:"文本", | ||
4 | - data:{text:""}, | ||
5 | - template_name:"text" | 3 | + template_intro: "文本", |
4 | + data: {text: ""}, | ||
5 | + template_name: "text" | ||
6 | }, | 6 | }, |
7 | { | 7 | { |
8 | - template_intro:"一张图", | ||
9 | - template_name:"singleImage", | ||
10 | - data:[{ | 8 | + template_intro: "一张图", |
9 | + template_name: "singleImage", | ||
10 | + data: [{ | ||
11 | "url": { | 11 | "url": { |
12 | - "action":"", | ||
13 | - "url":"" | 12 | + "action": "", |
13 | + "url": "" | ||
14 | }, | 14 | }, |
15 | "alt": "", | 15 | "alt": "", |
16 | "src": "", | 16 | "src": "", |
@@ -18,20 +18,20 @@ var Button=[ | @@ -18,20 +18,20 @@ var Button=[ | ||
18 | }] | 18 | }] |
19 | }, | 19 | }, |
20 | { | 20 | { |
21 | - template_intro:"添加小图", | ||
22 | - template_name:"smallPic", | ||
23 | - data:[{ | 21 | + template_intro: "添加小图", |
22 | + template_name: "smallPic", | ||
23 | + data: [{ | ||
24 | "url": { | 24 | "url": { |
25 | - "action":"", | ||
26 | - "url":"" | 25 | + "action": "", |
26 | + "url": "" | ||
27 | }, | 27 | }, |
28 | "alt": "", | 28 | "alt": "", |
29 | "src": "", | 29 | "src": "", |
30 | "imgId": "" | 30 | "imgId": "" |
31 | - },{ | 31 | + }, { |
32 | "url": { | 32 | "url": { |
33 | - "action":"", | ||
34 | - "url":"" | 33 | + "action": "", |
34 | + "url": "" | ||
35 | }, | 35 | }, |
36 | "alt": "", | 36 | "alt": "", |
37 | "src": "", | 37 | "src": "", |
@@ -39,9 +39,9 @@ var Button=[ | @@ -39,9 +39,9 @@ var Button=[ | ||
39 | }] | 39 | }] |
40 | }, | 40 | }, |
41 | { | 41 | { |
42 | - template_intro:"焦点图", | ||
43 | - template_name:"focus", | ||
44 | - data:[ | 42 | + template_intro: "焦点图", |
43 | + template_name: "focus", | ||
44 | + data: [ | ||
45 | { | 45 | { |
46 | "src": "", | 46 | "src": "", |
47 | "alt": "", | 47 | "alt": "", |
@@ -50,12 +50,12 @@ var Button=[ | @@ -50,12 +50,12 @@ var Button=[ | ||
50 | "imgId": "0" | 50 | "imgId": "0" |
51 | } | 51 | } |
52 | ], | 52 | ], |
53 | - focus_type:"1" | 53 | + focus_type: "1" |
54 | }, | 54 | }, |
55 | { | 55 | { |
56 | - template_intro:"添加商品", | ||
57 | - template_name:"goods", | ||
58 | - data:[ | 56 | + template_intro: "添加商品", |
57 | + template_name: "goods", | ||
58 | + data: [ | ||
59 | // { | 59 | // { |
60 | // src:"", | 60 | // src:"", |
61 | // id:"" | 61 | // id:"" |
@@ -63,12 +63,12 @@ var Button=[ | @@ -63,12 +63,12 @@ var Button=[ | ||
63 | ] | 63 | ] |
64 | }, | 64 | }, |
65 | { | 65 | { |
66 | - template_intro:"推荐商品组", | ||
67 | - template_name:"goodsGroup", | ||
68 | - data:[ | 66 | + template_intro: "推荐商品组", |
67 | + template_name: "goodsGroup", | ||
68 | + data: [ | ||
69 | { | 69 | { |
70 | - cover:{cover:"",maxSortId:""}, | ||
71 | - list:[ | 70 | + cover: {cover: "", maxSortId: ""}, |
71 | + list: [ | ||
72 | // { | 72 | // { |
73 | // src:"", | 73 | // src:"", |
74 | // id:"", | 74 | // id:"", |
@@ -94,8 +94,8 @@ var Button=[ | @@ -94,8 +94,8 @@ var Button=[ | ||
94 | ] | 94 | ] |
95 | }, | 95 | }, |
96 | { | 96 | { |
97 | - template_intro:"推荐(1T-1L-4R)", | ||
98 | - template_name:"recommendContentOne", | 97 | + template_intro: "推荐(1T-1L-4R)", |
98 | + template_name: "recommendContentOne", | ||
99 | "data": { | 99 | "data": { |
100 | "title": { | 100 | "title": { |
101 | "name": "", | 101 | "name": "", |
@@ -152,8 +152,8 @@ var Button=[ | @@ -152,8 +152,8 @@ var Button=[ | ||
152 | } | 152 | } |
153 | }, | 153 | }, |
154 | { | 154 | { |
155 | - template_intro:"推荐(1T-6F)", | ||
156 | - template_name:"recommendContentTwo", | 155 | + template_intro: "推荐(1T-6F)", |
156 | + template_name: "recommendContentTwo", | ||
157 | "data": { | 157 | "data": { |
158 | "title": { | 158 | "title": { |
159 | "name": "", | 159 | "name": "", |
@@ -232,15 +232,15 @@ var Button=[ | @@ -232,15 +232,15 @@ var Button=[ | ||
232 | "title": "", | 232 | "title": "", |
233 | "src": "", | 233 | "src": "", |
234 | "url": { | 234 | "url": { |
235 | - action:"", | ||
236 | - url:"" | 235 | + action: "", |
236 | + url: "" | ||
237 | }, | 237 | }, |
238 | "alt": "" | 238 | "alt": "" |
239 | } | 239 | } |
240 | }, | 240 | }, |
241 | { | 241 | { |
242 | - template_intro:"推荐(1T-12F)", | ||
243 | - template_name:"recommendContentThree", | 242 | + template_intro: "推荐(1T-12F)", |
243 | + template_name: "recommendContentThree", | ||
244 | "data": { | 244 | "data": { |
245 | "big_image": [ | 245 | "big_image": [ |
246 | { | 246 | { |
@@ -353,18 +353,18 @@ var Button=[ | @@ -353,18 +353,18 @@ var Button=[ | ||
353 | } | 353 | } |
354 | }, | 354 | }, |
355 | { | 355 | { |
356 | - template_intro:"潮人搭配", | ||
357 | - template_name:"trendsetterCollocation", | 356 | + template_intro: "潮人搭配", |
357 | + template_name: "trendsetterCollocation", | ||
358 | data: {} | 358 | data: {} |
359 | }, | 359 | }, |
360 | { | 360 | { |
361 | - template_intro:"潮品话题", | ||
362 | - template_name:"trendgoodsTopic", | 361 | + template_intro: "潮品话题", |
362 | + template_name: "trendgoodsTopic", | ||
363 | data: {} | 363 | data: {} |
364 | }, | 364 | }, |
365 | { | 365 | { |
366 | - template_intro:"推荐品牌", | ||
367 | - template_name:"appHotBrands", | 366 | + template_intro: "推荐品牌", |
367 | + template_name: "appHotBrands", | ||
368 | "data": { | 368 | "data": { |
369 | "title": { | 369 | "title": { |
370 | "title": "" | 370 | "title": "" |
@@ -374,8 +374,8 @@ var Button=[ | @@ -374,8 +374,8 @@ var Button=[ | ||
374 | } | 374 | } |
375 | }, | 375 | }, |
376 | { | 376 | { |
377 | - template_intro:"自定义品牌", | ||
378 | - template_name:"customBrands", | 377 | + template_intro: "自定义品牌", |
378 | + template_name: "customBrands", | ||
379 | "data": { | 379 | "data": { |
380 | "title": { | 380 | "title": { |
381 | "title": "", | 381 | "title": "", |
@@ -386,22 +386,22 @@ var Button=[ | @@ -386,22 +386,22 @@ var Button=[ | ||
386 | } | 386 | } |
387 | }, | 387 | }, |
388 | { | 388 | { |
389 | - template_intro:"一个链接", | ||
390 | - template_name:"link", | ||
391 | - data:[ | ||
392 | - {"url":{"action":"","url":""}} | 389 | + template_intro: "一个链接", |
390 | + template_name: "link", | ||
391 | + data: [ | ||
392 | + {"url": {"action": "", "url": ""}} | ||
393 | ] | 393 | ] |
394 | }, | 394 | }, |
395 | { | 395 | { |
396 | - template_intro:"添加促销", | ||
397 | - template_name:"promotion", | 396 | + template_intro: "添加促销", |
397 | + template_name: "promotion", | ||
398 | data: { | 398 | data: { |
399 | "promotionId": "" | 399 | "promotionId": "" |
400 | } | 400 | } |
401 | }, | 401 | }, |
402 | { | 402 | { |
403 | - template_intro:"轮播banner", | ||
404 | - template_name:"carouselBanner", | 403 | + template_intro: "轮播banner", |
404 | + template_name: "carouselBanner", | ||
405 | "data": { | 405 | "data": { |
406 | "speed": "", | 406 | "speed": "", |
407 | "list": [ | 407 | "list": [ |
@@ -413,22 +413,25 @@ var Button=[ | @@ -413,22 +413,25 @@ var Button=[ | ||
413 | } | 413 | } |
414 | }, | 414 | }, |
415 | { | 415 | { |
416 | - template_intro:"kids推荐品牌", | ||
417 | - template_name:"kidsBrands", | 416 | + template_intro: "kids推荐品牌", |
417 | + template_name: "kidsBrands", | ||
418 | "data": { | 418 | "data": { |
419 | "params": { | 419 | "params": { |
420 | "param": "", | 420 | "param": "", |
421 | "paramValue": "", | 421 | "paramValue": "", |
422 | "title": "", | 422 | "title": "", |
423 | "more": "", | 423 | "more": "", |
424 | - "more_url": "" | 424 | + "more_url": { |
425 | + "action": "", | ||
426 | + "url": "" | ||
427 | + } | ||
425 | }, | 428 | }, |
426 | "list": [] | 429 | "list": [] |
427 | } | 430 | } |
428 | }, | 431 | }, |
429 | { | 432 | { |
430 | - template_intro:"推荐(L1-RT1-RF2)", | ||
431 | - template_name:"recommendContentFour", | 433 | + template_intro: "推荐(L1-RT1-RF2)", |
434 | + template_name: "recommendContentFour", | ||
432 | "data": { | 435 | "data": { |
433 | "left": { | 436 | "left": { |
434 | "title": "", | 437 | "title": "", |
@@ -475,8 +478,8 @@ var Button=[ | @@ -475,8 +478,8 @@ var Button=[ | ||
475 | } | 478 | } |
476 | }, | 479 | }, |
477 | { | 480 | { |
478 | - template_intro:"添加楼层", | ||
479 | - template_name:"addfloor", | 481 | + template_intro: "添加楼层", |
482 | + template_name: "addfloor", | ||
480 | data: [ | 483 | data: [ |
481 | { | 484 | { |
482 | "url": {}, | 485 | "url": {}, |
@@ -488,8 +491,8 @@ var Button=[ | @@ -488,8 +491,8 @@ var Button=[ | ||
488 | ] | 491 | ] |
489 | }, | 492 | }, |
490 | { | 493 | { |
491 | - template_intro:"推荐(标题 + 12张图)", | ||
492 | - template_name:"recommendContentFive", | 494 | + template_intro: "推荐(标题 + 12张图)", |
495 | + template_name: "recommendContentFive", | ||
493 | data: { | 496 | data: { |
494 | "title": { | 497 | "title": { |
495 | "title": "", | 498 | "title": "", |
@@ -596,13 +599,13 @@ var Button=[ | @@ -596,13 +599,13 @@ var Button=[ | ||
596 | } | 599 | } |
597 | }, | 600 | }, |
598 | { | 601 | { |
599 | - template_intro:"文本导航", | ||
600 | - template_name:"textNav", | 602 | + template_intro: "文本导航", |
603 | + template_name: "textNav", | ||
601 | data: [] | 604 | data: [] |
602 | }, | 605 | }, |
603 | { | 606 | { |
604 | - template_intro:"图片列表", | ||
605 | - template_name:"imageList", | 607 | + template_intro: "图片列表", |
608 | + template_name: "imageList", | ||
606 | "data": { | 609 | "data": { |
607 | "title": { | 610 | "title": { |
608 | "title": "", | 611 | "title": "", |
@@ -613,13 +616,29 @@ var Button=[ | @@ -613,13 +616,29 @@ var Button=[ | ||
613 | } | 616 | } |
614 | }, | 617 | }, |
615 | { | 618 | { |
616 | - template_intro:"标题标签", | ||
617 | - template_name:"", | ||
618 | - "data": {} | 619 | + template_intro: "标题标签", |
620 | + template_name: "title", | ||
621 | + "data": { | ||
622 | + "title_name": "", | ||
623 | + "more_name": "", | ||
624 | + "more_link": { | ||
625 | + "action": "", | ||
626 | + "url": "" | ||
627 | + }, | ||
628 | + "nav": [ | ||
629 | + { | ||
630 | + "name": "", | ||
631 | + "url": { | ||
632 | + "action": "", | ||
633 | + "url": "" | ||
634 | + } | ||
635 | + } | ||
636 | + ] | ||
637 | + } | ||
619 | }, | 638 | }, |
620 | { | 639 | { |
621 | - template_intro:"编辑推荐", | ||
622 | - template_name:"editorTalk", | 640 | + template_intro: "编辑推荐", |
641 | + template_name: "editorTalk", | ||
623 | "data": { | 642 | "data": { |
624 | "title": { | 643 | "title": { |
625 | "title": "", | 644 | "title": "", |
@@ -629,8 +648,8 @@ var Button=[ | @@ -629,8 +648,8 @@ var Button=[ | ||
629 | } | 648 | } |
630 | }, | 649 | }, |
631 | { | 650 | { |
632 | - template_intro:"热门品类", | ||
633 | - template_name:"hotCategory", | 651 | + template_intro: "热门品类", |
652 | + template_name: "hotCategory", | ||
634 | "data": { | 653 | "data": { |
635 | "title": { | 654 | "title": { |
636 | "name": "", | 655 | "name": "", |
@@ -731,15 +750,15 @@ var Button=[ | @@ -731,15 +750,15 @@ var Button=[ | ||
731 | } | 750 | } |
732 | }, | 751 | }, |
733 | { | 752 | { |
734 | - template_intro:"有序焦点", | ||
735 | - template_name:"debrisSlider", | 753 | + template_intro: "有序焦点", |
754 | + template_name: "debrisSlider", | ||
736 | "data": { | 755 | "data": { |
737 | "big_image": [ | 756 | "big_image": [ |
738 | { | 757 | { |
739 | "src": "", | 758 | "src": "", |
740 | "url": { | 759 | "url": { |
741 | - action:"", | ||
742 | - url:"" | 760 | + action: "", |
761 | + url: "" | ||
743 | }, | 762 | }, |
744 | "title": "" | 763 | "title": "" |
745 | } | 764 | } |
@@ -749,8 +768,8 @@ var Button=[ | @@ -749,8 +768,8 @@ var Button=[ | ||
749 | } | 768 | } |
750 | }, | 769 | }, |
751 | { | 770 | { |
752 | - template_intro:"新人专享", | ||
753 | - template_name:"newUserFloor", | 771 | + template_intro: "新人专享", |
772 | + template_name: "newUserFloor", | ||
754 | data: { | 773 | data: { |
755 | "title": { | 774 | "title": { |
756 | "name": "", | 775 | "name": "", |
@@ -774,8 +793,8 @@ var Button=[ | @@ -774,8 +793,8 @@ var Button=[ | ||
774 | } | 793 | } |
775 | }, | 794 | }, |
776 | { | 795 | { |
777 | - template_intro:"图片广告", | ||
778 | - template_name:"imageGroup", | 796 | + template_intro: "图片广告", |
797 | + template_name: "imageGroup", | ||
779 | data: { | 798 | data: { |
780 | "title": "", | 799 | "title": "", |
781 | "more": "", | 800 | "more": "", |
@@ -795,8 +814,8 @@ var Button=[ | @@ -795,8 +814,8 @@ var Button=[ | ||
795 | } | 814 | } |
796 | }, | 815 | }, |
797 | { | 816 | { |
798 | - template_intro:"自定义参数", | ||
799 | - template_name:"paramsGroup", | 817 | + template_intro: "自定义参数", |
818 | + template_name: "paramsGroup", | ||
800 | data: { | 819 | data: { |
801 | "title": "", | 820 | "title": "", |
802 | "more": "", | 821 | "more": "", |
@@ -810,17 +829,17 @@ var Button=[ | @@ -810,17 +829,17 @@ var Button=[ | ||
810 | } | 829 | } |
811 | }, | 830 | }, |
812 | { | 831 | { |
813 | - template_intro:"自定义参数图片", | ||
814 | - template_name:"", | 832 | + template_intro: "自定义参数图片", |
833 | + template_name: "", | ||
815 | data: {} | 834 | data: {} |
816 | }, | 835 | }, |
817 | { | 836 | { |
818 | - template_intro:"站内公告", | ||
819 | - template_name:"announcement" | 837 | + template_intro: "站内公告", |
838 | + template_name: "announcement" | ||
820 | }, | 839 | }, |
821 | { | 840 | { |
822 | - template_intro:"标题图片", | ||
823 | - template_name:"titleImage", | 841 | + template_intro: "标题图片", |
842 | + template_name: "titleImage", | ||
824 | data: { | 843 | data: { |
825 | "title": "", | 844 | "title": "", |
826 | "more_name": "", | 845 | "more_name": "", |
@@ -828,7 +847,7 @@ var Button=[ | @@ -828,7 +847,7 @@ var Button=[ | ||
828 | "action": "", | 847 | "action": "", |
829 | "url": "" | 848 | "url": "" |
830 | }, | 849 | }, |
831 | - "image":{ | 850 | + "image": { |
832 | "src": "", | 851 | "src": "", |
833 | "url": { | 852 | "url": { |
834 | "action": "", | 853 | "action": "", |
@@ -838,10 +857,10 @@ var Button=[ | @@ -838,10 +857,10 @@ var Button=[ | ||
838 | } | 857 | } |
839 | }, | 858 | }, |
840 | { | 859 | { |
841 | - template_intro:"多标签图片", | ||
842 | - template_name:"multiLabelImage", | 860 | + template_intro: "多标签图片", |
861 | + template_name: "multiLabelImage", | ||
843 | data: { | 862 | data: { |
844 | - "label":[ | 863 | + "label": [ |
845 | { | 864 | { |
846 | "title": "", | 865 | "title": "", |
847 | "url": { | 866 | "url": { |
@@ -850,7 +869,7 @@ var Button=[ | @@ -850,7 +869,7 @@ var Button=[ | ||
850 | } | 869 | } |
851 | } | 870 | } |
852 | ], | 871 | ], |
853 | - "image":[ | 872 | + "image": [ |
854 | { | 873 | { |
855 | "src": "", | 874 | "src": "", |
856 | "url": { | 875 | "url": { |
@@ -862,8 +881,8 @@ var Button=[ | @@ -862,8 +881,8 @@ var Button=[ | ||
862 | } | 881 | } |
863 | }, | 882 | }, |
864 | { | 883 | { |
865 | - template_intro:"搭配(2T-nF)", | ||
866 | - template_name:"matchImage", | 884 | + template_intro: "搭配(2T-nF)", |
885 | + template_name: "matchImage", | ||
867 | data: { | 886 | data: { |
868 | "title": { | 887 | "title": { |
869 | "name": "", | 888 | "name": "", |
@@ -917,22 +936,24 @@ var Button=[ | @@ -917,22 +936,24 @@ var Button=[ | ||
917 | { | 936 | { |
918 | "template_name": "getCoupon", | 937 | "template_name": "getCoupon", |
919 | "template_intro": "领券频道", | 938 | "template_intro": "领券频道", |
920 | - "data": { | ||
921 | - "title":"", | ||
922 | - "isShow":"YES", | ||
923 | - "image":{ | 939 | + "data": [ |
940 | + { | ||
941 | + "title": "", | ||
942 | + "isShow": "YES", | ||
943 | + "image": { | ||
924 | "src": "", | 944 | "src": "", |
925 | "url": { | 945 | "url": { |
926 | "action": "", | 946 | "action": "", |
927 | "url": "" | 947 | "url": "" |
928 | } | 948 | } |
929 | }, | 949 | }, |
930 | - "couponID":"", | ||
931 | - "goShopping":{ | ||
932 | - "action": "", | ||
933 | - "url": "" | ||
934 | - } | 950 | + "couponID": "" |
951 | + //"goShopping":{ | ||
952 | + // "action": "", | ||
953 | + // "url": "" | ||
954 | + //} | ||
935 | } | 955 | } |
956 | + ] | ||
936 | } | 957 | } |
937 | ]; | 958 | ]; |
938 | 959 |
@@ -36,7 +36,7 @@ var g = new common.grid({ | @@ -36,7 +36,7 @@ var g = new common.grid({ | ||
36 | 36 | ||
37 | }); | 37 | }); |
38 | 38 | ||
39 | -g.init("/resource/platform/findResPlatforms"); | 39 | +g.init("/resources/findResPlatforms"); |
40 | 40 | ||
41 | var Bll = { | 41 | var Bll = { |
42 | getLocalTime:function(nS) { | 42 | getLocalTime:function(nS) { |
@@ -83,12 +83,12 @@ var Bll = { | @@ -83,12 +83,12 @@ var Bll = { | ||
83 | 83 | ||
84 | $(document).on('click', '#add-platform', function() { | 84 | $(document).on('click', '#add-platform', function() { |
85 | var item = {}; | 85 | var item = {}; |
86 | - Bll.toast("/resource/platform/addResPlatform", item, "添加平台"); | 86 | + Bll.toast("/resources/addResPlatform", item, "添加平台"); |
87 | }); | 87 | }); |
88 | 88 | ||
89 | $(document).on('click', '.add2', function() { | 89 | $(document).on('click', '.add2', function() { |
90 | var item = g.rows[$(this).data("index")]; | 90 | var item = g.rows[$(this).data("index")]; |
91 | - Bll.toast("/resource/platform/updateResPlatform", item, "修改平台"); | 91 | + Bll.toast("/resources/updateResPlatform", item, "修改平台"); |
92 | }); | 92 | }); |
93 | 93 | ||
94 | $(document).on('click', '.delbtn', function() { | 94 | $(document).on('click', '.delbtn', function() { |
@@ -97,7 +97,7 @@ $(document).on('click', '.delbtn', function() { | @@ -97,7 +97,7 @@ $(document).on('click', '.delbtn', function() { | ||
97 | "确认删除?", | 97 | "确认删除?", |
98 | function() { | 98 | function() { |
99 | common.util.__ajax({ | 99 | common.util.__ajax({ |
100 | - url:'/resource/platform/deleteResPlatform', | 100 | + url:'/resources/deleteResPlatform', |
101 | data:{platformId:item.platformId} | 101 | data:{platformId:item.platformId} |
102 | },function() { | 102 | },function() { |
103 | g.reload(); | 103 | g.reload(); |
1 | var $ = require('jquery'), | 1 | var $ = require('jquery'), |
2 | common = require('../common/common'); | 2 | common = require('../common/common'); |
3 | -var Button=require('./partials/Button1'); | 3 | +var Button = require('./partials/Button1'); |
4 | 4 | ||
5 | /*获取数据*/ | 5 | /*获取数据*/ |
6 | -var ViewModel={}; | 6 | +var ViewModel = {}; |
7 | //资源id | 7 | //资源id |
8 | var param = location.href.substring(location.href.lastIndexOf("/") + 1); | 8 | var param = location.href.substring(location.href.lastIndexOf("/") + 1); |
9 | common.util.__ajax({ | 9 | common.util.__ajax({ |
10 | - url: "/resource/content/resContentIndex", | 10 | + url: "/resources/resContentIndex", |
11 | data: {id: param}, | 11 | data: {id: param}, |
12 | - async:false | ||
13 | -},function(res) { | 12 | + async: false |
13 | +}, function (res) { | ||
14 | ViewModel = res.data; | 14 | ViewModel = res.data; |
15 | -},true); | 15 | +}, true); |
16 | 16 | ||
17 | /*配置模块*/ | 17 | /*配置模块*/ |
18 | var edit = new common.edit(".modal-body", { | 18 | var edit = new common.edit(".modal-body", { |
19 | - bucket: "goodsimg" | 19 | + bucket: "yhb-img01" |
20 | }); | 20 | }); |
21 | 21 | ||
22 | var tempArr = []; | 22 | var tempArr = []; |
@@ -44,7 +44,7 @@ tempArr["addfloor"] = "icon-template"; | @@ -44,7 +44,7 @@ tempArr["addfloor"] = "icon-template"; | ||
44 | tempArr["recommendContentFive"] = "recommendContent-template"; | 44 | tempArr["recommendContentFive"] = "recommendContent-template"; |
45 | tempArr["textNav"] = "textNav-template"; | 45 | tempArr["textNav"] = "textNav-template"; |
46 | tempArr["imageList"] = "imageList-template"; | 46 | tempArr["imageList"] = "imageList-template"; |
47 | -tempArr["标题标签"] = "noEdit-template"; | 47 | +tempArr["title"] = "title-template"; |
48 | tempArr["editorTalk"] = "editorTalk-template"; | 48 | tempArr["editorTalk"] = "editorTalk-template"; |
49 | tempArr["hotCategory"] = "hotCategory-template"; | 49 | tempArr["hotCategory"] = "hotCategory-template"; |
50 | tempArr["debrisSlider"] = "debrisSlider-template"; | 50 | tempArr["debrisSlider"] = "debrisSlider-template"; |
@@ -58,16 +58,16 @@ tempArr["multiLabelImage"] = "multiLabelImage-template"; | @@ -58,16 +58,16 @@ tempArr["multiLabelImage"] = "multiLabelImage-template"; | ||
58 | tempArr["matchImage"] = "matchImage-template"; | 58 | tempArr["matchImage"] = "matchImage-template"; |
59 | tempArr["getCoupon"] = "getCoupon-template"; | 59 | tempArr["getCoupon"] = "getCoupon-template"; |
60 | 60 | ||
61 | -var Bll={ | 61 | +var Bll = { |
62 | Brands: [], | 62 | Brands: [], |
63 | Brands1: {}, | 63 | Brands1: {}, |
64 | Brdata: [], | 64 | Brdata: [], |
65 | - contentDatas:[], | 65 | + contentDatas: [], |
66 | module: null, | 66 | module: null, |
67 | - __render:function(selecter,templater,data){ | ||
68 | - $(selecter).html(common.util.__template2($("#"+templater).html(),data) ); | 67 | + __render: function (selecter, templater, data) { |
68 | + $(selecter).html(common.util.__template2($("#" + templater).html(), data)); | ||
69 | }, | 69 | }, |
70 | - toast: function(index, module) { | 70 | + toast: function (index, module) { |
71 | var d = new common.dialog({ | 71 | var d = new common.dialog({ |
72 | title: (!!~index ? "修改" : "添加") + module.contentData.template_intro, | 72 | title: (!!~index ? "修改" : "添加") + module.contentData.template_intro, |
73 | //content: common.util.__template2($("#" + module.contentData.dialog).html(), module), | 73 | //content: common.util.__template2($("#" + module.contentData.dialog).html(), module), |
@@ -75,11 +75,11 @@ var Bll={ | @@ -75,11 +75,11 @@ var Bll={ | ||
75 | width: '70%', | 75 | width: '70%', |
76 | button: [{ | 76 | button: [{ |
77 | value: "保存", | 77 | value: "保存", |
78 | - callback: function() { | 78 | + callback: function () { |
79 | if (edit.validate()) { | 79 | if (edit.validate()) { |
80 | //TODO | 80 | //TODO |
81 | !!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module); | 81 | !!~index ? Bll.contentDatas[index] = module : Bll.contentDatas.push(module); |
82 | - Bll.__render("#add-content","template_content",{modules:Bll.contentDatas}); | 82 | + Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas}); |
83 | d.close(); | 83 | d.close(); |
84 | } | 84 | } |
85 | return false; | 85 | return false; |
@@ -89,28 +89,26 @@ var Bll={ | @@ -89,28 +89,26 @@ var Bll={ | ||
89 | }); | 89 | }); |
90 | Bll.__editRender(); | 90 | Bll.__editRender(); |
91 | }, | 91 | }, |
92 | - renderDialog:function(templater){ | ||
93 | - Bll.__render(".modal-body",templater,Bll.module); | 92 | + renderDialog: function (templater) { |
93 | + Bll.__render(".modal-body", templater, Bll.module); | ||
94 | Bll.__editRender(); | 94 | Bll.__editRender(); |
95 | }, | 95 | }, |
96 | - __editRender:function(){ | 96 | + __editRender: function () { |
97 | edit.init(); | 97 | edit.init(); |
98 | - edit.on("callback", function(obj) { | 98 | + edit.on("callback", function (obj) { |
99 | if (/^file_onComplete/.test(obj.key)) { | 99 | if (/^file_onComplete/.test(obj.key)) { |
100 | - var names=obj.field; | ||
101 | - Bll.module.contentData.data=common.util.__buildobj(names, '.', Bll.module.contentData.data, function(o, name) { | 100 | + var names = obj.field; |
101 | + Bll.module.contentData.data = common.util.__buildobj(names, '.', Bll.module.contentData.data, function (o, name) { | ||
102 | o[name] = obj.data; | 102 | o[name] = obj.data; |
103 | }); | 103 | }); |
104 | - console.log(Bll.module.contentData.data); | ||
105 | - | ||
106 | } | 104 | } |
107 | }); | 105 | }); |
108 | }, | 106 | }, |
109 | //获取品牌 | 107 | //获取品牌 |
110 | - getBrands: function() { | 108 | + getBrands: function () { |
111 | var Brand = {}; | 109 | var Brand = {}; |
112 | - $.get("/ajax/yohosearch", function(res) { | ||
113 | - res.data.forEach(function(item, index) { | 110 | + $.get("/ajax/yohosearch", function (res) { |
111 | + res.data.forEach(function (item, index) { | ||
114 | var brandAlif = (item.brand_alif || "").toUpperCase(); | 112 | var brandAlif = (item.brand_alif || "").toUpperCase(); |
115 | if (/^[0-9]$/.test(item.brand_alif)) { | 113 | if (/^[0-9]$/.test(item.brand_alif)) { |
116 | brandAlif = "0-9"; | 114 | brandAlif = "0-9"; |
@@ -123,7 +121,7 @@ var Bll={ | @@ -123,7 +121,7 @@ var Bll={ | ||
123 | Bll.Brands1[item.id] = item; | 121 | Bll.Brands1[item.id] = item; |
124 | }); | 122 | }); |
125 | for (var i in Brand) { | 123 | for (var i in Brand) { |
126 | - Brand[i].sort(function(a, b) { | 124 | + Brand[i].sort(function (a, b) { |
127 | var aName = a.brand_name.toLowerCase(), | 125 | var aName = a.brand_name.toLowerCase(), |
128 | bName = b.brand_name.toLowerCase(); | 126 | bName = b.brand_name.toLowerCase(); |
129 | if (aName < bName) return -1; | 127 | if (aName < bName) return -1; |
@@ -137,39 +135,38 @@ var Bll={ | @@ -137,39 +135,38 @@ var Bll={ | ||
137 | } | 135 | } |
138 | }); | 136 | }); |
139 | }, | 137 | }, |
140 | - renderBrandPic: function(Brdata) { | 138 | + renderBrandPic: function (Brdata) { |
141 | var Brands2 = []; | 139 | var Brands2 = []; |
142 | - Brdata.forEach(function(item, index) { | ||
143 | - if(!item.brandIco){ | 140 | + Brdata.forEach(function (item, index) { |
141 | + if (!item.brandIco) { | ||
144 | var a = Bll.Brands1[item]; | 142 | var a = Bll.Brands1[item]; |
145 | a.brandIco = common.util.__joinImg("brandLogo", a.brand_ico); | 143 | a.brandIco = common.util.__joinImg("brandLogo", a.brand_ico); |
146 | Brands2.push(a); | 144 | Brands2.push(a); |
147 | - }else{ | ||
148 | - item.brandIco=common.util.__template(item.brandIco,{width:110,height:150}); | 145 | + } else { |
146 | + item.brandIco = common.util.__template(item.brandIco, {width: 110, height: 150}); | ||
149 | Brands2.push(item); | 147 | Brands2.push(item); |
150 | } | 148 | } |
151 | 149 | ||
152 | }); | 150 | }); |
153 | - Bll.module=Bll.module||{}; | ||
154 | - Bll.module.contentData=Bll.module.contentData||{}; | ||
155 | - Bll.module.contentData.data=Bll.module.contentData.data||{}; | ||
156 | - Bll.module.contentData.data.list=Bll.module.contentData.data.list||[]; | ||
157 | - for(var i=0;i<Brands2.length;i++){ | ||
158 | - var pic={}; | ||
159 | - if( Bll.module.contentData.template_name=="kidsBrands"){ | ||
160 | - pic={ | ||
161 | - "src":Brands2[i].brandIco, | ||
162 | - "id":Brands2[i].id, | ||
163 | - "title":Brands2[i].brand_name | 151 | + Bll.module = Bll.module || {}; |
152 | + Bll.module.contentData = Bll.module.contentData || {}; | ||
153 | + Bll.module.contentData.data = Bll.module.contentData.data || {}; | ||
154 | + Bll.module.contentData.data.list = Bll.module.contentData.data.list || []; | ||
155 | + for (var i = 0; i < Brands2.length; i++) { | ||
156 | + var pic = {}; | ||
157 | + if (Bll.module.contentData.template_name == "kidsBrands") { | ||
158 | + pic = { | ||
159 | + "src": Brands2[i].brandIco, | ||
160 | + "id": Brands2[i].id, | ||
161 | + "title": Brands2[i].brand_name | ||
164 | }; | 162 | }; |
165 | - }else{ | ||
166 | - pic={ | ||
167 | - "src":Brands2[i].brandIco, | ||
168 | - "id":Brands2[i].id, | ||
169 | - "name":Brands2[i].brand_name | 163 | + } else { |
164 | + pic = { | ||
165 | + "src": Brands2[i].brandIco, | ||
166 | + "id": Brands2[i].id, | ||
167 | + "name": Brands2[i].brand_name | ||
170 | }; | 168 | }; |
171 | } | 169 | } |
172 | - | ||
173 | Bll.module.contentData.data.list.push(pic); | 170 | Bll.module.contentData.data.list.push(pic); |
174 | } | 171 | } |
175 | Bll.renderDialog("brands-template"); | 172 | Bll.renderDialog("brands-template"); |
@@ -177,26 +174,40 @@ var Bll={ | @@ -177,26 +174,40 @@ var Bll={ | ||
177 | }; | 174 | }; |
178 | 175 | ||
179 | 176 | ||
180 | - | ||
181 | /*第一步,基础模板*/ | 177 | /*第一步,基础模板*/ |
182 | -Bll.__render("#content-list","content-template",ViewModel); | ||
183 | -Bll.__render(".contents","template_content_btns",{btns:Button}); | 178 | +Bll.__render("#content-list", "content-template", ViewModel); |
179 | +Bll.__render(".contents", "template_content_btns", {btns: Button}); | ||
184 | 180 | ||
185 | /*第二部,把楼层数据转化成数组*/ | 181 | /*第二部,把楼层数据转化成数组*/ |
186 | -ViewModel.contentData.forEach(function(item,index){ | ||
187 | - item.contentData=item.contentData.replace(/(gif|png|jpg|jpeg)\?[^"]*/g,'$1'); | ||
188 | - item.contentData=common.util.__ObjToArray(JSON.parse(item.contentData)); | 182 | +ViewModel.contentData.forEach(function (item, index) { |
183 | + item.contentData = JSON.parse(item.contentData); | ||
184 | + var temp; | ||
185 | + if (item.contentData.template_name == "kidsBrands") { | ||
186 | + temp = item.contentData.data.params.more_url; | ||
187 | + item.contentData.data.params.more_url = {}; | ||
188 | + item.contentData.data.params.more_url.action = JSON.parse(temp).action || ""; | ||
189 | + item.contentData.data.params.more_url.url = JSON.parse(temp).url || ""; | ||
190 | + } | ||
191 | + if (item.contentData.template_name == 'title') { | ||
192 | + temp = item.contentData.data.more_link; | ||
193 | + item.contentData.data.more_link = {}; | ||
194 | + item.contentData.data.more_link.action = JSON.parse(temp).action || ""; | ||
195 | + item.contentData.data.more_link.url = JSON.parse(temp).url || ""; | ||
196 | + } | ||
197 | + item.contentData = JSON.stringify(item.contentData); | ||
198 | + item.contentData = item.contentData.replace(/(gif|png|jpg|jpeg)\?[^"]*/g, '$1'); | ||
199 | + item.contentData = common.util.__ObjToArray(JSON.parse(item.contentData)); | ||
189 | Bll.contentDatas.push(item); | 200 | Bll.contentDatas.push(item); |
190 | }); | 201 | }); |
191 | 202 | ||
192 | /*第三部解析楼层*/ | 203 | /*第三部解析楼层*/ |
193 | -Bll.__render("#add-content","template_content",{modules:Bll.contentDatas}); | 204 | +Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas}); |
194 | 205 | ||
195 | 206 | ||
196 | /*第四部 操作按钮 添加 删除 修改*/ | 207 | /*第四部 操作按钮 添加 删除 修改*/ |
197 | -$(document).on("click", ".add_btn", function() { | 208 | +$(document).on("click", ".add_btn", function () { |
198 | var item = Button[$(this).data("index")]; | 209 | var item = Button[$(this).data("index")]; |
199 | - Bll.module={}; | 210 | + Bll.module = {}; |
200 | Bll.module.contentData = $.extend(true, {}, item); | 211 | Bll.module.contentData = $.extend(true, {}, item); |
201 | Bll.toast(-1, Bll.module); | 212 | Bll.toast(-1, Bll.module); |
202 | }); | 213 | }); |
@@ -206,37 +217,35 @@ $(document).on("click", ".add_btn", function() { | @@ -206,37 +217,35 @@ $(document).on("click", ".add_btn", function() { | ||
206 | //}); | 217 | //}); |
207 | $(document).on("click", ".del", function () {//删除 | 218 | $(document).on("click", ".del", function () {//删除 |
208 | var index = $(this).data("index"); | 219 | var index = $(this).data("index"); |
209 | - console.log(Bll.contentDatas); | ||
210 | common.dialog.confirm("警告", | 220 | common.dialog.confirm("警告", |
211 | common.util.__template2("是否确认删除?", {}), | 221 | common.util.__template2("是否确认删除?", {}), |
212 | - function() { | ||
213 | - if(Bll.contentDatas[index].id) { | 222 | + function () { |
223 | + if (Bll.contentDatas[index].id) { | ||
214 | common.util.__ajax({ | 224 | common.util.__ajax({ |
215 | - url: "/resource/content/delResContent", | 225 | + url: "/resources/delResContent", |
216 | data: {id: Bll.contentDatas[index].id} | 226 | data: {id: Bll.contentDatas[index].id} |
217 | }); | 227 | }); |
218 | } | 228 | } |
219 | Bll.contentDatas.splice(index, 1); | 229 | Bll.contentDatas.splice(index, 1); |
220 | - Bll.__render("#add-content","template_content",{modules:Bll.contentDatas}); | 230 | + Bll.__render("#add-content", "template_content", {modules: Bll.contentDatas}); |
221 | }); | 231 | }); |
222 | 232 | ||
223 | //$("#index_" + index).remove(); | 233 | //$("#index_" + index).remove(); |
224 | }); | 234 | }); |
225 | -$(document).on("click", ".edit", function() { | 235 | +$(document).on("click", ".edit", function () { |
226 | var index = $(this).data("index"); | 236 | var index = $(this).data("index"); |
227 | var item = Bll.contentDatas[index]; | 237 | var item = Bll.contentDatas[index]; |
228 | - console.log(Bll.contentDatas); | ||
229 | Bll.module = $.extend(true, {}, item); | 238 | Bll.module = $.extend(true, {}, item); |
230 | Bll.toast(index, Bll.module); | 239 | Bll.toast(index, Bll.module); |
231 | }); | 240 | }); |
232 | 241 | ||
233 | /*第五步 绑定监听事件*/ | 242 | /*第五步 绑定监听事件*/ |
234 | -$(document).on("change", ".observe", function() { | 243 | +$(document).on("change", ".observe", function () { |
235 | var $this = $(this); | 244 | var $this = $(this); |
236 | var name = $this.data("field"); | 245 | var name = $this.data("field"); |
237 | - Bll.module.contentData.data=common.util.__buildobj(name, '.', Bll.module.contentData.data, function(obj, name) { | 246 | + Bll.module.contentData.data = common.util.__buildobj(name, '.', Bll.module.contentData.data, function (obj, name) { |
238 | obj[name] = $this.val(); | 247 | obj[name] = $this.val(); |
239 | - if(name == "image_style") { | 248 | + if (name == "image_style") { |
240 | delete obj["default"]; | 249 | delete obj["default"]; |
241 | delete obj["T1F2"]; | 250 | delete obj["T1F2"]; |
242 | delete obj["L1R2"]; | 251 | delete obj["L1R2"]; |
@@ -246,7 +255,7 @@ $(document).on("change", ".observe", function() { | @@ -246,7 +255,7 @@ $(document).on("change", ".observe", function() { | ||
246 | }); | 255 | }); |
247 | }); | 256 | }); |
248 | 257 | ||
249 | -$(document).on("click", '#multiLabelImage-addImage', function() { | 258 | +$(document).on("click", '#multiLabelImage-addImage', function () { |
250 | Bll.module.contentData.data.image.push({ | 259 | Bll.module.contentData.data.image.push({ |
251 | "src": "", | 260 | "src": "", |
252 | "url": { | 261 | "url": { |
@@ -257,7 +266,7 @@ $(document).on("click", '#multiLabelImage-addImage', function() { | @@ -257,7 +266,7 @@ $(document).on("click", '#multiLabelImage-addImage', function() { | ||
257 | Bll.renderDialog("multiLabelImage-template"); | 266 | Bll.renderDialog("multiLabelImage-template"); |
258 | }); | 267 | }); |
259 | 268 | ||
260 | -$(document).on("click", '#multiLabelImage-addOne', function() { | 269 | +$(document).on("click", '#multiLabelImage-addOne', function () { |
261 | Bll.module.contentData.data.label.push({ | 270 | Bll.module.contentData.data.label.push({ |
262 | "src": "", | 271 | "src": "", |
263 | "url": { | 272 | "url": { |
@@ -268,7 +277,7 @@ $(document).on("click", '#multiLabelImage-addOne', function() { | @@ -268,7 +277,7 @@ $(document).on("click", '#multiLabelImage-addOne', function() { | ||
268 | Bll.renderDialog("multiLabelImage-template"); | 277 | Bll.renderDialog("multiLabelImage-template"); |
269 | }); | 278 | }); |
270 | 279 | ||
271 | -$(document).on("click", '#imageGroup-addOne', function() { | 280 | +$(document).on("click", '#imageGroup-addOne', function () { |
272 | Bll.module.contentData.data.list.push({ | 281 | Bll.module.contentData.data.list.push({ |
273 | "src": "", | 282 | "src": "", |
274 | "title": "", | 283 | "title": "", |
@@ -280,7 +289,7 @@ $(document).on("click", '#imageGroup-addOne', function() { | @@ -280,7 +289,7 @@ $(document).on("click", '#imageGroup-addOne', function() { | ||
280 | Bll.renderDialog("imageGroup-template"); | 289 | Bll.renderDialog("imageGroup-template"); |
281 | }); | 290 | }); |
282 | 291 | ||
283 | -$(document).on("click", '#matchImage-addOne', function() { | 292 | +$(document).on("click", '#matchImage-addOne', function () { |
284 | Bll.module.contentData.data.list.push({ | 293 | Bll.module.contentData.data.list.push({ |
285 | "title": "", | 294 | "title": "", |
286 | "url": { | 295 | "url": { |
@@ -291,7 +300,7 @@ $(document).on("click", '#matchImage-addOne', function() { | @@ -291,7 +300,7 @@ $(document).on("click", '#matchImage-addOne', function() { | ||
291 | Bll.renderDialog("matchImage-template"); | 300 | Bll.renderDialog("matchImage-template"); |
292 | }); | 301 | }); |
293 | //添加一个图标 | 302 | //添加一个图标 |
294 | -$(document).on("click", '#icon-addOne', function() { | 303 | +$(document).on("click", '#icon-addOne', function () { |
295 | Bll.module.contentData.data.push({ | 304 | Bll.module.contentData.data.push({ |
296 | //"title": "", | 305 | //"title": "", |
297 | "url": { | 306 | "url": { |
@@ -302,60 +311,93 @@ $(document).on("click", '#icon-addOne', function() { | @@ -302,60 +311,93 @@ $(document).on("click", '#icon-addOne', function() { | ||
302 | Bll.renderDialog("icon-template"); | 311 | Bll.renderDialog("icon-template"); |
303 | }); | 312 | }); |
304 | //删除一个图标 | 313 | //删除一个图标 |
305 | -$(document).on("click", '#icon-delOne', function() { | 314 | +$(document).on("click", '#icon-delOne', function () { |
306 | var index = $(this).data("index"); | 315 | var index = $(this).data("index"); |
307 | - Bll.module.contentData.data.splice(index,1); | 316 | + Bll.module.contentData.data.splice(index, 1); |
308 | Bll.renderDialog("icon-template"); | 317 | Bll.renderDialog("icon-template"); |
309 | }); | 318 | }); |
319 | +//添加一个标签 | ||
320 | +$(document).on("click", '#nav-addOne', function () { | ||
321 | + Bll.module.contentData.data.nav.push({ | ||
322 | + "name": "", | ||
323 | + "url": { | ||
324 | + "action": "", | ||
325 | + "url": "" | ||
326 | + } | ||
327 | + }); | ||
328 | + Bll.renderDialog("title-template"); | ||
329 | +}); | ||
330 | +//添加领券 | ||
331 | +$(document).on("click", '#coupon-addOne', function () { | ||
332 | + var length = Bll.module.contentData.data.length; | ||
333 | + if (length >= 4) { | ||
334 | + alert("最多添加4个") | ||
335 | + } else { | ||
336 | + Bll.module.contentData.data.push({ | ||
337 | + "title": "", | ||
338 | + "isShow": "YES", | ||
339 | + "image": { | ||
340 | + "src": "", | ||
341 | + "url": { | ||
342 | + "action": "", | ||
343 | + "url": "" | ||
344 | + } | ||
345 | + }, | ||
346 | + "couponID": "" | ||
347 | + }); | ||
348 | + Bll.renderDialog("getCoupon-template"); | ||
349 | + } | ||
350 | + | ||
351 | +}); | ||
310 | //获取品牌 | 352 | //获取品牌 |
311 | Bll.getBrands(); | 353 | Bll.getBrands(); |
312 | /*渲染品牌*/ | 354 | /*渲染品牌*/ |
313 | //Bll.Brdata=ViewModel.brandList||[]; | 355 | //Bll.Brdata=ViewModel.brandList||[]; |
314 | //Bll.renderBrandPic(Bll.Brdata); | 356 | //Bll.renderBrandPic(Bll.Brdata); |
315 | //打开品牌选择模态 | 357 | //打开品牌选择模态 |
316 | -$(document).on("click", "#addBrands", function() { | 358 | +$(document).on("click", "#addBrands", function () { |
317 | var e = new common.edit("#brandForm"); | 359 | var e = new common.edit("#brandForm"); |
318 | new common.dialog({ | 360 | new common.dialog({ |
319 | - title:"选择品牌", | ||
320 | - width:"70%", | 361 | + title: "选择品牌", |
362 | + width: "70%", | ||
321 | content: common.util.__template2($("#template5").html(), { | 363 | content: common.util.__template2($("#template5").html(), { |
322 | Brands: Bll.Brands,//所有品牌数据 | 364 | Brands: Bll.Brands,//所有品牌数据 |
323 | Brdata: [] | 365 | Brdata: [] |
324 | }), | 366 | }), |
325 | - button:[ | 367 | + button: [ |
326 | { | 368 | { |
327 | - value:"确定", | ||
328 | - callback:function(){ | 369 | + value: "确定", |
370 | + callback: function () { | ||
329 | Bll.Brdata = $("#brandCheckBox").val().split('|'); | 371 | Bll.Brdata = $("#brandCheckBox").val().split('|'); |
330 | Bll.renderBrandPic(Bll.Brdata); | 372 | Bll.renderBrandPic(Bll.Brdata); |
331 | }, | 373 | }, |
332 | - css:"btn-primary" | 374 | + css: "btn-primary" |
333 | }, | 375 | }, |
334 | { | 376 | { |
335 | - value:"取消" | 377 | + value: "取消" |
336 | } | 378 | } |
337 | ] | 379 | ] |
338 | }); | 380 | }); |
339 | e.init(); | 381 | e.init(); |
340 | }); | 382 | }); |
341 | //品牌筛选 | 383 | //品牌筛选 |
342 | -$(document).on('click', '.brand-index', function() { | 384 | +$(document).on('click', '.brand-index', function () { |
343 | var brandIndex = $(this).text(); | 385 | var brandIndex = $(this).text(); |
344 | $('.brand-wrap').find('[name="' + brandIndex + '"]').show().siblings().hide(); | 386 | $('.brand-wrap').find('[name="' + brandIndex + '"]').show().siblings().hide(); |
345 | }); | 387 | }); |
346 | //删除一个品牌 | 388 | //删除一个品牌 |
347 | -$(document).on("click", '#remove_brand', function() { | 389 | +$(document).on("click", '#remove_brand', function () { |
348 | var index = $(this).data("index"); | 390 | var index = $(this).data("index"); |
349 | - Bll.module.contentData.data.list.splice(index,1); | 391 | + Bll.module.contentData.data.list.splice(index, 1); |
350 | Bll.renderDialog("brands-template"); | 392 | Bll.renderDialog("brands-template"); |
351 | }); | 393 | }); |
352 | 394 | ||
353 | /*自定义参数*/ | 395 | /*自定义参数*/ |
354 | -$(document).on("click", '.paramsGroupDel', function() { | ||
355 | - Bll.module.contentData.data.list.splice($(this).data("index"),1); | 396 | +$(document).on("click", '.paramsGroupDel', function () { |
397 | + Bll.module.contentData.data.list.splice($(this).data("index"), 1); | ||
356 | Bll.renderDialog("paramsGroup-template"); | 398 | Bll.renderDialog("paramsGroup-template"); |
357 | }); | 399 | }); |
358 | -$(document).on("click", '#paramsGroup-addOne', function() { | 400 | +$(document).on("click", '#paramsGroup-addOne', function () { |
359 | Bll.module.contentData.data.list.push( | 401 | Bll.module.contentData.data.list.push( |
360 | { | 402 | { |
361 | "title": "", | 403 | "title": "", |
@@ -365,7 +407,7 @@ $(document).on("click", '#paramsGroup-addOne', function() { | @@ -365,7 +407,7 @@ $(document).on("click", '#paramsGroup-addOne', function() { | ||
365 | Bll.renderDialog("paramsGroup-template"); | 407 | Bll.renderDialog("paramsGroup-template"); |
366 | }); | 408 | }); |
367 | /*新人专享*/ | 409 | /*新人专享*/ |
368 | -$(document).on("click", '#newUserFloor-addBanner', function() { | 410 | +$(document).on("click", '#newUserFloor-addBanner', function () { |
369 | Bll.module.contentData.data.banner_image.push( | 411 | Bll.module.contentData.data.banner_image.push( |
370 | { | 412 | { |
371 | "src": "", | 413 | "src": "", |
@@ -379,7 +421,7 @@ $(document).on("click", '#newUserFloor-addBanner', function() { | @@ -379,7 +421,7 @@ $(document).on("click", '#newUserFloor-addBanner', function() { | ||
379 | Bll.renderDialog("newUserFloor-template"); | 421 | Bll.renderDialog("newUserFloor-template"); |
380 | }); | 422 | }); |
381 | /*有序焦点添加*/ | 423 | /*有序焦点添加*/ |
382 | -$(document).on("click", '#debrisSlider-addLeft', function() { | 424 | +$(document).on("click", '#debrisSlider-addLeft', function () { |
383 | Bll.module.contentData.data.left.push( | 425 | Bll.module.contentData.data.left.push( |
384 | { | 426 | { |
385 | "src": "", | 427 | "src": "", |
@@ -392,7 +434,7 @@ $(document).on("click", '#debrisSlider-addLeft', function() { | @@ -392,7 +434,7 @@ $(document).on("click", '#debrisSlider-addLeft', function() { | ||
392 | ); | 434 | ); |
393 | Bll.renderDialog("debrisSlider-template"); | 435 | Bll.renderDialog("debrisSlider-template"); |
394 | }); | 436 | }); |
395 | -$(document).on("click", '#debrisSlider-addCenter', function() { | 437 | +$(document).on("click", '#debrisSlider-addCenter', function () { |
396 | Bll.module.contentData.data.big_image.push( | 438 | Bll.module.contentData.data.big_image.push( |
397 | { | 439 | { |
398 | "src": "", | 440 | "src": "", |
@@ -405,7 +447,7 @@ $(document).on("click", '#debrisSlider-addCenter', function() { | @@ -405,7 +447,7 @@ $(document).on("click", '#debrisSlider-addCenter', function() { | ||
405 | ); | 447 | ); |
406 | Bll.renderDialog("debrisSlider-template"); | 448 | Bll.renderDialog("debrisSlider-template"); |
407 | }); | 449 | }); |
408 | -$(document).on("click", '#debrisSlider-addRight', function() { | 450 | +$(document).on("click", '#debrisSlider-addRight', function () { |
409 | Bll.module.contentData.data.right.push( | 451 | Bll.module.contentData.data.right.push( |
410 | { | 452 | { |
411 | "src": "", | 453 | "src": "", |
@@ -420,7 +462,7 @@ $(document).on("click", '#debrisSlider-addRight', function() { | @@ -420,7 +462,7 @@ $(document).on("click", '#debrisSlider-addRight', function() { | ||
420 | }); | 462 | }); |
421 | //*****************************************************************// | 463 | //*****************************************************************// |
422 | /*热门品类*/ | 464 | /*热门品类*/ |
423 | -$(document).on("click", '#hotCategory-addLeft', function() { | 465 | +$(document).on("click", '#hotCategory-addLeft', function () { |
424 | Bll.module.contentData.data.blocks.push( | 466 | Bll.module.contentData.data.blocks.push( |
425 | { | 467 | { |
426 | "src": "", | 468 | "src": "", |
@@ -433,7 +475,7 @@ $(document).on("click", '#hotCategory-addLeft', function() { | @@ -433,7 +475,7 @@ $(document).on("click", '#hotCategory-addLeft', function() { | ||
433 | ); | 475 | ); |
434 | Bll.renderDialog("hotCategory-template"); | 476 | Bll.renderDialog("hotCategory-template"); |
435 | }); | 477 | }); |
436 | -$(document).on("click", '#hotCategory-addRight', function() { | 478 | +$(document).on("click", '#hotCategory-addRight', function () { |
437 | Bll.module.contentData.data.imgs.push( | 479 | Bll.module.contentData.data.imgs.push( |
438 | { | 480 | { |
439 | "src": "", | 481 | "src": "", |
@@ -446,17 +488,17 @@ $(document).on("click", '#hotCategory-addRight', function() { | @@ -446,17 +488,17 @@ $(document).on("click", '#hotCategory-addRight', function() { | ||
446 | ); | 488 | ); |
447 | Bll.renderDialog("hotCategory-template"); | 489 | Bll.renderDialog("hotCategory-template"); |
448 | }); | 490 | }); |
449 | -$(document).on("click", '.hotCategory-delLeft', function() { | ||
450 | - Bll.module.contentData.data.blocks.splice($(this).data("index"),1); | 491 | +$(document).on("click", '.hotCategory-delLeft', function () { |
492 | + Bll.module.contentData.data.blocks.splice($(this).data("index"), 1); | ||
451 | Bll.renderDialog("hotCategory-template"); | 493 | Bll.renderDialog("hotCategory-template"); |
452 | }); | 494 | }); |
453 | -$(document).on("click", '.hotCategory-delRight', function() { | ||
454 | - Bll.module.contentData.data.imgs.splice($(this).data("index"),1); | 495 | +$(document).on("click", '.hotCategory-delRight', function () { |
496 | + Bll.module.contentData.data.imgs.splice($(this).data("index"), 1); | ||
455 | Bll.renderDialog("hotCategory-template"); | 497 | Bll.renderDialog("hotCategory-template"); |
456 | }); | 498 | }); |
457 | //*****************************************************************// | 499 | //*****************************************************************// |
458 | /*图片列表*/ | 500 | /*图片列表*/ |
459 | -$(document).on("click", '#imageList-addOne', function() { | 501 | +$(document).on("click", '#imageList-addOne', function () { |
460 | Bll.module.contentData.data.list.push( | 502 | Bll.module.contentData.data.list.push( |
461 | { | 503 | { |
462 | "src": "", | 504 | "src": "", |
@@ -469,25 +511,21 @@ $(document).on("click", '#imageList-addOne', function() { | @@ -469,25 +511,21 @@ $(document).on("click", '#imageList-addOne', function() { | ||
469 | ); | 511 | ); |
470 | Bll.renderDialog("imageList-template"); | 512 | Bll.renderDialog("imageList-template"); |
471 | }); | 513 | }); |
472 | -$(document).on("click", '.imageList-del', function() { | ||
473 | - Bll.module.contentData.data.list.splice($(this).data("index"),1); | 514 | +$(document).on("click", '.imageList-del', function () { |
515 | + Bll.module.contentData.data.list.splice($(this).data("index"), 1); | ||
474 | Bll.renderDialog("imageList-template"); | 516 | Bll.renderDialog("imageList-template"); |
475 | }); | 517 | }); |
476 | -$(document).on("click", '.is_show_name', function() { | 518 | +$(document).on("click", '.is_show_name', function () { |
477 | Bll.module.contentData.data.title.is_show_name = $(this).val(); | 519 | Bll.module.contentData.data.title.is_show_name = $(this).val(); |
478 | Bll.renderDialog("imageList-template"); | 520 | Bll.renderDialog("imageList-template"); |
479 | }); | 521 | }); |
480 | -$(document).on("click", '#is_show_name_Y', function() { | ||
481 | - Bll.module.contentData.data.is_show_name = "Y"; | ||
482 | - Bll.renderDialog("brands-template"); | ||
483 | -}); | ||
484 | -$(document).on("click", '#is_show_name_N', function() { | ||
485 | - Bll.module.contentData.data.is_show_name = "N"; | ||
486 | - Bll.renderDialog("brands-template"); | 522 | +$(document).on("click", '.isShow_coupon', function () { |
523 | + Bll.module.contentData.data.isShow = $(this).val(); | ||
524 | + Bll.renderDialog("getCoupon-template"); | ||
487 | }); | 525 | }); |
488 | //*****************************************************************// | 526 | //*****************************************************************// |
489 | /*文本导航*/ | 527 | /*文本导航*/ |
490 | -$(document).on("click", '#textNav-addOne', function() { | 528 | +$(document).on("click", '#textNav-addOne', function () { |
491 | Bll.module.contentData.data.push( | 529 | Bll.module.contentData.data.push( |
492 | { | 530 | { |
493 | "name": "", | 531 | "name": "", |
@@ -499,19 +537,19 @@ $(document).on("click", '#textNav-addOne', function() { | @@ -499,19 +537,19 @@ $(document).on("click", '#textNav-addOne', function() { | ||
499 | ); | 537 | ); |
500 | Bll.renderDialog("textNav-template"); | 538 | Bll.renderDialog("textNav-template"); |
501 | }); | 539 | }); |
502 | -$(document).on("click", '.textNav-delOne', function() { | 540 | +$(document).on("click", '.textNav-delOne', function () { |
503 | Bll.module.contentData.data.splice($(this).data("index"), 1); | 541 | Bll.module.contentData.data.splice($(this).data("index"), 1); |
504 | Bll.renderDialog("textNav-template"); | 542 | Bll.renderDialog("textNav-template"); |
505 | }); | 543 | }); |
506 | //*****************************************************************// | 544 | //*****************************************************************// |
507 | /*推荐(标题 + 12张图)*/ | 545 | /*推荐(标题 + 12张图)*/ |
508 | -$(document).on("change", '#recommendContentFive-is_show', function() { | ||
509 | - Bll.module.contentData.data.title.is_show = 1-Bll.module.contentData.data.title.is_show; | 546 | +$(document).on("change", '#recommendContentFive-is_show', function () { |
547 | + Bll.module.contentData.data.title.is_show = 1 - Bll.module.contentData.data.title.is_show; | ||
510 | Bll.renderDialog("recommendContent-template"); | 548 | Bll.renderDialog("recommendContent-template"); |
511 | }); | 549 | }); |
512 | //*****************************************************************// | 550 | //*****************************************************************// |
513 | /*焦点图*/ | 551 | /*焦点图*/ |
514 | -$(document).on("click", '#focus-addOne', function() { | 552 | +$(document).on("click", '#focus-addOne', function () { |
515 | Bll.module.contentData.data.push( | 553 | Bll.module.contentData.data.push( |
516 | { | 554 | { |
517 | "src": "", | 555 | "src": "", |
@@ -523,17 +561,17 @@ $(document).on("click", '#focus-addOne', function() { | @@ -523,17 +561,17 @@ $(document).on("click", '#focus-addOne', function() { | ||
523 | ); | 561 | ); |
524 | Bll.renderDialog("focus-template"); | 562 | Bll.renderDialog("focus-template"); |
525 | }); | 563 | }); |
526 | -$(document).on("click", '.focus-del', function() { | 564 | +$(document).on("click", '.focus-del', function () { |
527 | Bll.module.contentData.data.splice($(this).data("index"), 1); | 565 | Bll.module.contentData.data.splice($(this).data("index"), 1); |
528 | Bll.renderDialog("focus-template"); | 566 | Bll.renderDialog("focus-template"); |
529 | }); | 567 | }); |
530 | -$(document).on("change", '#focus-select', function() { | 568 | +$(document).on("change", '#focus-select', function () { |
531 | Bll.module.contentData.focus_type = $(this).val(); | 569 | Bll.module.contentData.focus_type = $(this).val(); |
532 | Bll.renderDialog("focus-template"); | 570 | Bll.renderDialog("focus-template"); |
533 | }); | 571 | }); |
534 | //*****************************************************************// | 572 | //*****************************************************************// |
535 | /*轮播banner*/ | 573 | /*轮播banner*/ |
536 | -$(document).on("click", '#carouselBanner-addOne', function() { | 574 | +$(document).on("click", '#carouselBanner-addOne', function () { |
537 | Bll.module.contentData.data.list.push( | 575 | Bll.module.contentData.data.list.push( |
538 | { | 576 | { |
539 | "src": "", | 577 | "src": "", |
@@ -542,13 +580,13 @@ $(document).on("click", '#carouselBanner-addOne', function() { | @@ -542,13 +580,13 @@ $(document).on("click", '#carouselBanner-addOne', function() { | ||
542 | ); | 580 | ); |
543 | Bll.renderDialog("carouselBanner-template"); | 581 | Bll.renderDialog("carouselBanner-template"); |
544 | }); | 582 | }); |
545 | -$(document).on("click", '.carouselBanner-del', function() { | 583 | +$(document).on("click", '.carouselBanner-del', function () { |
546 | Bll.module.contentData.data.list.splice($(this).data("index"), 1); | 584 | Bll.module.contentData.data.list.splice($(this).data("index"), 1); |
547 | Bll.renderDialog("carouselBanner-template"); | 585 | Bll.renderDialog("carouselBanner-template"); |
548 | }); | 586 | }); |
549 | //*****************************************************************// | 587 | //*****************************************************************// |
550 | /*编辑推荐*/ | 588 | /*编辑推荐*/ |
551 | -$(document).on("click", '#editorTalk-addOne', function() { | 589 | +$(document).on("click", '#editorTalk-addOne', function () { |
552 | Bll.module.contentData.data.list.push( | 590 | Bll.module.contentData.data.list.push( |
553 | { | 591 | { |
554 | "src": "", | 592 | "src": "", |
@@ -561,41 +599,55 @@ $(document).on("click", '#editorTalk-addOne', function() { | @@ -561,41 +599,55 @@ $(document).on("click", '#editorTalk-addOne', function() { | ||
561 | ); | 599 | ); |
562 | Bll.renderDialog("editorTalk-template"); | 600 | Bll.renderDialog("editorTalk-template"); |
563 | }); | 601 | }); |
564 | -$(document).on("click", '.editorTalk-del', function() { | 602 | +$(document).on("click", '.editorTalk-del', function () { |
565 | Bll.module.contentData.data.list.splice($(this).data("index"), 1); | 603 | Bll.module.contentData.data.list.splice($(this).data("index"), 1); |
566 | Bll.renderDialog("editorTalk-template"); | 604 | Bll.renderDialog("editorTalk-template"); |
567 | }); | 605 | }); |
568 | -$(document).on("change", '#editorTalk-is_show', function() { | ||
569 | - Bll.module.contentData.data.title.is_show = 1-Bll.module.contentData.data.title.is_show; | 606 | +$(document).on("change", '#editorTalk-is_show', function () { |
607 | + Bll.module.contentData.data.title.is_show = 1 - Bll.module.contentData.data.title.is_show; | ||
570 | Bll.renderDialog("editorTalk-template"); | 608 | Bll.renderDialog("editorTalk-template"); |
571 | }); | 609 | }); |
572 | 610 | ||
573 | -$(document).on("click", "#sub_btn", function() { | 611 | +$(document).on("click", "#sub_btn", function () { |
574 | var data = { | 612 | var data = { |
575 | "content": {}, | 613 | "content": {}, |
576 | "data_id": {}, | 614 | "data_id": {}, |
577 | "rId": "" | 615 | "rId": "" |
578 | }; | 616 | }; |
579 | - for(var i = 0; i < Bll.contentDatas.length; i++) { | ||
580 | - addSuffix(Bll.contentDatas[i].contentData); | ||
581 | - data.content[i]=JSON.stringify(common.util.__ArrayToObj(Bll.contentDatas[i].contentData)); | ||
582 | - if(Bll.contentDatas[i].id) { | ||
583 | - data.data_id[i] = "id_"+Bll.contentDatas[i].id; | 617 | + for (var i = 0; i < Bll.contentDatas.length; i++) { |
618 | + var contentData = Bll.contentDatas[i].contentData; | ||
619 | + var action; | ||
620 | + var url; | ||
621 | + addSuffix(contentData); | ||
622 | + if (contentData.template_name == "kidsBrands") { | ||
623 | + action = contentData.data.params.more_url.action || ""; | ||
624 | + url = contentData.data.params.more_url.url || ""; | ||
625 | + contentData.data.params.more_url = "{\"action\":\"" + action + "\",\"url\":\"" + url + "\"}"; | ||
626 | + } | ||
627 | + if (contentData.template_name == "title") { | ||
628 | + action = contentData.data.more_link.action || ""; | ||
629 | + url = contentData.data.more_link.url || ""; | ||
630 | + contentData.data.more_link = "{\"action\":\"" + action + "\",\"url\":\"" + url + "\"}"; | ||
631 | + } | ||
632 | + data.content[i] = JSON.stringify(common.util.__ArrayToObj(contentData)); | ||
633 | + data.content[i] = JSON.stringify(common.util.__ArrayToObj(Bll.contentDatas[i].contentData)); | ||
634 | + if (Bll.contentDatas[i].id) { | ||
635 | + data.data_id[i] = "id_" + Bll.contentDatas[i].id; | ||
584 | } | 636 | } |
585 | } | 637 | } |
586 | data.rId = param; | 638 | data.rId = param; |
587 | data.content = JSON.stringify(data.content); | 639 | data.content = JSON.stringify(data.content); |
588 | data.data_id = JSON.stringify(data.data_id); | 640 | data.data_id = JSON.stringify(data.data_id); |
589 | common.util.__ajax({ | 641 | common.util.__ajax({ |
590 | - url: "/resource/content/addResContent", | 642 | + url: "/resources/addResContent", |
591 | data: data | 643 | data: data |
592 | - },function(res) { | ||
593 | - window.location.href=window.location.href; | 644 | + }, function (res) { |
645 | + window.location.href = window.location.href; | ||
594 | }); | 646 | }); |
595 | }); | 647 | }); |
596 | 648 | ||
597 | -var addSuffix = function(contentData) { | ||
598 | - if( typeof contentData == "object") { | 649 | +var addSuffix = function (contentData) { |
650 | + if (typeof contentData == "object") { | ||
599 | for (var i in contentData) { | 651 | for (var i in contentData) { |
600 | if (i == "src" && contentData[i].indexOf("?") == -1) { | 652 | if (i == "src" && contentData[i].indexOf("?") == -1) { |
601 | contentData[i] = contentData[i] + "?imageView/{mode}/w/{width}/h/{height}"; | 653 | contentData[i] = contentData[i] + "?imageView/{mode}/w/{width}/h/{height}"; |
@@ -663,7 +715,7 @@ var goodsgird = new common.grid({ | @@ -663,7 +715,7 @@ var goodsgird = new common.grid({ | ||
663 | }] | 715 | }] |
664 | }); | 716 | }); |
665 | //搜索按钮 | 717 | //搜索按钮 |
666 | -$(document).on("click", "#search", function() { | 718 | +$(document).on("click", "#search", function () { |
667 | goodsgird.reload(); | 719 | goodsgird.reload(); |
668 | }); | 720 | }); |
669 | //点击“选择标签”按钮(添加商品) | 721 | //点击“选择标签”按钮(添加商品) |
@@ -694,7 +746,7 @@ $(document).on("click", "#goodsSelectBtn", function () { | @@ -694,7 +746,7 @@ $(document).on("click", "#goodsSelectBtn", function () { | ||
694 | }); | 746 | }); |
695 | //点击“添加组”按钮(添加商品组) | 747 | //点击“添加组”按钮(添加商品组) |
696 | $(document).on("click", "#goodsaddBtn", function () { | 748 | $(document).on("click", "#goodsaddBtn", function () { |
697 | - if(Bll.module.contentData.data[0].list.length){ | 749 | + if (Bll.module.contentData.data[0].list.length) { |
698 | Bll.module.contentData.data.push(Button[5].data[0]); | 750 | Bll.module.contentData.data.push(Button[5].data[0]); |
699 | } | 751 | } |
700 | Bll.__render("#groupsgoods", "template_dialog_remgoodsgroup", Bll.module); | 752 | Bll.__render("#groupsgoods", "template_dialog_remgoodsgroup", Bll.module); |
@@ -731,9 +783,37 @@ $(document).on("click", ".goodsSelectBtn", function () { | @@ -731,9 +783,37 @@ $(document).on("click", ".goodsSelectBtn", function () { | ||
731 | goodsgird.init('/yohosearch/search'); | 783 | goodsgird.init('/yohosearch/search'); |
732 | }); | 784 | }); |
733 | //删除图片按钮 | 785 | //删除图片按钮 |
734 | -$(document).on("click", ".removepic", function() { | 786 | +$(document).on("click", ".removepic", function () { |
735 | Bll.module.contentData.data.splice($(this).data("index"), 1); | 787 | Bll.module.contentData.data.splice($(this).data("index"), 1); |
736 | $("#goodspic").html(common.util.__template2($("#template_dialog_goodsimgs").html(), { | 788 | $("#goodspic").html(common.util.__template2($("#template_dialog_goodsimgs").html(), { |
737 | datas: Bll.module.contentData.data | 789 | datas: Bll.module.contentData.data |
738 | })); | 790 | })); |
739 | }); | 791 | }); |
792 | + | ||
793 | +$(document).on("mouseover","#add-content .dragItem",function(){ | ||
794 | + var drag = new common.drag("#add-content", Bll.contentDatas, function(data){ | ||
795 | + Bll.contentDatas = data; | ||
796 | + Bll.__render("#add-content","template_content",{modules:Bll.contentDatas}); | ||
797 | + }) | ||
798 | + drag.Initialize(); | ||
799 | +}); | ||
800 | +$(document).on("mouseleave","#add-content .dragItem",function(){ | ||
801 | + new common.drag("#add-content").destroy(); | ||
802 | +}); | ||
803 | + | ||
804 | +/* | ||
805 | +$(document).on("mouseover","#sortable .dragItem",function(){ | ||
806 | + //console.log(Bll.module.contentData.data.list); | ||
807 | + var drag = new common.drag("#sortable", Bll.module.contentData.data.list, function(data){ | ||
808 | + Bll.module.contentData.data.list = data; | ||
809 | + console.log(Bll.module.contentData); | ||
810 | + console.log(Bll.module); | ||
811 | + Bll.renderDialog("paramsGroup-template"); | ||
812 | + //Bll.__render("#sortable","paramsGroup-template",{modules:Bll.module}); | ||
813 | + }) | ||
814 | + drag.Initialize(); | ||
815 | +}); | ||
816 | +$(document).on("mouseleave","#sortable .dragItem",function(){ | ||
817 | + new common.drag("#sortable").destroy(); | ||
818 | +}); | ||
819 | +*/ |
@@ -12,21 +12,21 @@ var resSorts = {}, | @@ -12,21 +12,21 @@ var resSorts = {}, | ||
12 | 12 | ||
13 | /*导航栏筛选*/ | 13 | /*导航栏筛选*/ |
14 | common.util.__ajax({ | 14 | common.util.__ajax({ |
15 | - url: "/resources/resourceManage/getResSorts",//获取所有资源 | 15 | + url: "/resources/getResSorts",//获取所有资源 |
16 | data: {} | 16 | data: {} |
17 | },function(res) { | 17 | },function(res) { |
18 | $("#category-content").html(common.util.__template2($("#search-category").html(), res)); | 18 | $("#category-content").html(common.util.__template2($("#search-category").html(), res)); |
19 | new common.dropDown({el: "#choose-category"}); | 19 | new common.dropDown({el: "#choose-category"}); |
20 | - resSorts = res; | 20 | + resSorts = res.data; |
21 | },true); | 21 | },true); |
22 | 22 | ||
23 | common.util.__ajax({ | 23 | common.util.__ajax({ |
24 | - url: "/resources/resourceManage/getResPlatforms",//获取所有平台 | 24 | + url: "/resources/getResPlatforms",//获取所有平台 |
25 | data: {} | 25 | data: {} |
26 | },function(res) { | 26 | },function(res) { |
27 | $("#platform-content").html(common.util.__template2($("#search-platform").html(), res)); | 27 | $("#platform-content").html(common.util.__template2($("#search-platform").html(), res)); |
28 | new common.dropDown({el: "#choose-platform"}); | 28 | new common.dropDown({el: "#choose-platform"}); |
29 | - resPlatforms = res; | 29 | + resPlatforms = res.data; |
30 | },true); | 30 | },true); |
31 | 31 | ||
32 | var g = new common.grid({ | 32 | var g = new common.grid({ |
@@ -59,7 +59,7 @@ var g = new common.grid({ | @@ -59,7 +59,7 @@ var g = new common.grid({ | ||
59 | ] | 59 | ] |
60 | }); | 60 | }); |
61 | 61 | ||
62 | -g.init("/resources/resourceManage/queryResource"); | 62 | +g.init("/resources/queryResource"); |
63 | 63 | ||
64 | 64 | ||
65 | var Bll = { | 65 | var Bll = { |
@@ -108,7 +108,10 @@ var Bll = { | @@ -108,7 +108,10 @@ var Bll = { | ||
108 | 108 | ||
109 | $(document).on("click", "#add-resource", function () { | 109 | $(document).on("click", "#add-resource", function () { |
110 | var item = {}; | 110 | var item = {}; |
111 | - Bll.toast("/resources/resourceManage/saveResource", item, "新增资源"); | 111 | + item.resSorts = resSorts; |
112 | + item.resPlatforms = resPlatforms; | ||
113 | + console.log(item); | ||
114 | + Bll.toast("/resources/saveResource", item, "新增资源"); | ||
112 | }); | 115 | }); |
113 | 116 | ||
114 | $(document).on("click", "#filter-btn",function() { | 117 | $(document).on("click", "#filter-btn",function() { |
@@ -117,14 +120,16 @@ $(document).on("click", "#filter-btn",function() { | @@ -117,14 +120,16 @@ $(document).on("click", "#filter-btn",function() { | ||
117 | 120 | ||
118 | $(document).on("click", ".add2", function() { | 121 | $(document).on("click", ".add2", function() { |
119 | var item = g.rows[$(this).data("index")]; | 122 | var item = g.rows[$(this).data("index")]; |
120 | - Bll.toast("/resources/resourceManage/saveResource", item, "编辑资源"); | 123 | + item.resSorts = resSorts; |
124 | + item.resPlatforms = resPlatforms; | ||
125 | + Bll.toast("/resources/saveResource", item, "编辑资源"); | ||
121 | }); | 126 | }); |
122 | 127 | ||
123 | $(document).on("click", ".delbtn", function() { | 128 | $(document).on("click", ".delbtn", function() { |
124 | var item = g.rows[$(this).data("index")]; | 129 | var item = g.rows[$(this).data("index")]; |
125 | common.dialog.confirm("警告", "是否确认删除?",function() { | 130 | common.dialog.confirm("警告", "是否确认删除?",function() { |
126 | common.util.__ajax({ | 131 | common.util.__ajax({ |
127 | - url: "/resources/resourceManage/deleteResourceById", | 132 | + url: "/resources/deleteResourceById", |
128 | data: {id: item.id} | 133 | data: {id: item.id} |
129 | }, function () { | 134 | }, function () { |
130 | g.reload(); | 135 | g.reload(); |
@@ -87,7 +87,7 @@ var Bll = { | @@ -87,7 +87,7 @@ var Bll = { | ||
87 | }, | 87 | }, |
88 | init: function() { | 88 | init: function() { |
89 | common.util.__ajax({ | 89 | common.util.__ajax({ |
90 | - url:'/resource/sort/resSortIndex', | 90 | + url:'/resources/resSortIndex', |
91 | data:{} | 91 | data:{} |
92 | },function(res){ | 92 | },function(res){ |
93 | platformList = res.data.platform; | 93 | platformList = res.data.platform; |
@@ -103,12 +103,12 @@ Bll.init(); | @@ -103,12 +103,12 @@ Bll.init(); | ||
103 | 103 | ||
104 | $(document).on('click', '#add-resource', function() { | 104 | $(document).on('click', '#add-resource', function() { |
105 | var item = {}; | 105 | var item = {}; |
106 | - Bll.toast("/resource/sort/addResSort", item, "添加资源分类"); | 106 | + Bll.toast("/resources/addResSort", item, "添加资源分类"); |
107 | }); | 107 | }); |
108 | 108 | ||
109 | $(document).on('click', '.add2', function() { | 109 | $(document).on('click', '.add2', function() { |
110 | var item = g.rows[$(this).data("index")]; | 110 | var item = g.rows[$(this).data("index")]; |
111 | - Bll.toast("/resource/sort/updateResSort", item, "修改资源分类"); | 111 | + Bll.toast("/resources/updateResSort", item, "修改资源分类"); |
112 | }); | 112 | }); |
113 | 113 | ||
114 | $(document).on('click', '.delbtn', function() { | 114 | $(document).on('click', '.delbtn', function() { |
@@ -117,7 +117,7 @@ $(document).on('click', '.delbtn', function() { | @@ -117,7 +117,7 @@ $(document).on('click', '.delbtn', function() { | ||
117 | "确认删除?", | 117 | "确认删除?", |
118 | function() { | 118 | function() { |
119 | common.util.__ajax({ | 119 | common.util.__ajax({ |
120 | - url:'/resource/sort/deleteResourcesSort', | 120 | + url:'/resources/deleteResourcesSort', |
121 | data:{sortId:item.sortId} | 121 | data:{sortId:item.sortId} |
122 | },function() { | 122 | },function() { |
123 | Bll.init(); | 123 | Bll.init(); |
@@ -20,11 +20,12 @@ var config = { | @@ -20,11 +20,12 @@ var config = { | ||
20 | //http://172.16.6.124:8088/platform/product/queryAllProductAttr | 20 | //http://172.16.6.124:8088/platform/product/queryAllProductAttr |
21 | //domain: 'http://172.16.6.146:8088/platform', //玛丽 | 21 | //domain: 'http://172.16.6.146:8088/platform', //玛丽 |
22 | //domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超 | 22 | //domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超 |
23 | - //domain: 'http://192.168.102.202:8088/platform', | 23 | + domain: 'http://192.168.102.202:8088/platform', |
24 | + //domain:'http://172.16.6.231:8080/platform',//王伟 | ||
24 | //domain: 'http://172.16.6.239:8080', //孙杰翔 | 25 | //domain: 'http://172.16.6.239:8080', //孙杰翔 |
25 | //domain:'http://172.16.6.189:8088/platform', //李健1 | 26 | //domain:'http://172.16.6.189:8088/platform', //李健1 |
26 | //domain:'http://192.168.102.216:8180/platform', //李健2 | 27 | //domain:'http://192.168.102.216:8180/platform', //李健2 |
27 | - domain: 'http://172.16.6.243:8088/platform', //谭玲 | 28 | + //domain: 'http://172.16.6.243:8088/platform', //谭玲 |
28 | //domain: 'http://172.16.6.204:8088/platform', //陆斌斌 | 29 | //domain: 'http://172.16.6.204:8088/platform', //陆斌斌 |
29 | yohoSearch: 'http://192.168.102.208:8087/yohosearch', | 30 | yohoSearch: 'http://192.168.102.208:8087/yohosearch', |
30 | loggers: { | 31 | loggers: { |
@@ -14,13 +14,13 @@ exports.res = [ | @@ -14,13 +14,13 @@ exports.res = [ | ||
14 | src: '/sourceManage/platformManage' | 14 | src: '/sourceManage/platformManage' |
15 | }, | 15 | }, |
16 | { | 16 | { |
17 | - route: '/resource/platform/findResPlatforms', | 17 | + route: '/resources/findResPlatforms', |
18 | method: 'POST', | 18 | method: 'POST', |
19 | url: '/resources/findResPlatforms', | 19 | url: '/resources/findResPlatforms', |
20 | params: [] | 20 | params: [] |
21 | }, | 21 | }, |
22 | { | 22 | { |
23 | - route: '/resource/platform/addResPlatform', | 23 | + route: '/resources/addResPlatform', |
24 | method: 'POST', | 24 | method: 'POST', |
25 | url: '/resources/addResPlatform', | 25 | url: '/resources/addResPlatform', |
26 | params: [ | 26 | params: [ |
@@ -30,7 +30,7 @@ exports.res = [ | @@ -30,7 +30,7 @@ exports.res = [ | ||
30 | ] | 30 | ] |
31 | }, | 31 | }, |
32 | { | 32 | { |
33 | - route: '/resource/platform/updateResPlatform', | 33 | + route: '/resources/updateResPlatform', |
34 | method: 'POST', | 34 | method: 'POST', |
35 | url: '/resources/updateResPlatform', | 35 | url: '/resources/updateResPlatform', |
36 | params: [ | 36 | params: [ |
@@ -41,7 +41,7 @@ exports.res = [ | @@ -41,7 +41,7 @@ exports.res = [ | ||
41 | ] | 41 | ] |
42 | }, | 42 | }, |
43 | { | 43 | { |
44 | - route: '/resource/platform/deleteResPlatform', | 44 | + route: '/resources/deleteResPlatform', |
45 | method: 'POST', | 45 | method: 'POST', |
46 | url: '/resources/deleteResPlatform', | 46 | url: '/resources/deleteResPlatform', |
47 | params: [ | 47 | params: [ |
@@ -10,13 +10,13 @@ exports.domain = 'http://172.16.6.231:8080/platform'; | @@ -10,13 +10,13 @@ exports.domain = 'http://172.16.6.231:8080/platform'; | ||
10 | 10 | ||
11 | exports.res = [ | 11 | exports.res = [ |
12 | { | 12 | { |
13 | - route: "/resource/index/index1", | 13 | + route: "/resource/index/index", |
14 | method: "GET", | 14 | method: "GET", |
15 | view: "pages/sourceManage/resourceManage", | 15 | view: "pages/sourceManage/resourceManage", |
16 | src: "/sourceManage/resourceManage" | 16 | src: "/sourceManage/resourceManage" |
17 | }, | 17 | }, |
18 | { | 18 | { |
19 | - route: "/resources/resourceManage/queryResource", | 19 | + route: "/resources/queryResource", |
20 | method: "POST", | 20 | method: "POST", |
21 | url: "/resources/queryResource", | 21 | url: "/resources/queryResource", |
22 | params: [ | 22 | params: [ |
@@ -27,19 +27,19 @@ exports.res = [ | @@ -27,19 +27,19 @@ exports.res = [ | ||
27 | ] | 27 | ] |
28 | }, | 28 | }, |
29 | { | 29 | { |
30 | - route: "/resources/resourceManage/getResSorts", | 30 | + route: "/resources/getResSorts", |
31 | method: "POST", | 31 | method: "POST", |
32 | url: "/resources/getResSorts", | 32 | url: "/resources/getResSorts", |
33 | params: [] | 33 | params: [] |
34 | }, | 34 | }, |
35 | { | 35 | { |
36 | - route: "/resources/resourceManage/getResPlatforms", | 36 | + route: "/resources/getResPlatforms", |
37 | method: "POST", | 37 | method: "POST", |
38 | url: "/resources/getResPlatforms", | 38 | url: "/resources/getResPlatforms", |
39 | params: [] | 39 | params: [] |
40 | }, | 40 | }, |
41 | { | 41 | { |
42 | - route: "/resources/resourceManage/saveResource", | 42 | + route: "/resources/saveResource", |
43 | method: "POST", | 43 | method: "POST", |
44 | url: "/resources/saveResource", | 44 | url: "/resources/saveResource", |
45 | params: [ | 45 | params: [ |
@@ -51,7 +51,7 @@ exports.res = [ | @@ -51,7 +51,7 @@ exports.res = [ | ||
51 | ] | 51 | ] |
52 | }, | 52 | }, |
53 | { | 53 | { |
54 | - route: "/resources/resourceManage/deleteResourceById", | 54 | + route: "/resources/deleteResourceById", |
55 | method: "POST", | 55 | method: "POST", |
56 | url: "/resources/deleteResourceById", | 56 | url: "/resources/deleteResourceById", |
57 | params: [ | 57 | params: [ |
@@ -66,7 +66,7 @@ exports.res = [ | @@ -66,7 +66,7 @@ exports.res = [ | ||
66 | src: '/sourceManage/resourceContentManage' | 66 | src: '/sourceManage/resourceContentManage' |
67 | }, | 67 | }, |
68 | { | 68 | { |
69 | - route: "/resource/content/resContentIndex", | 69 | + route: "/resources/resContentIndex", |
70 | method: "POST", | 70 | method: "POST", |
71 | url: "/resources/resContentIndex", | 71 | url: "/resources/resContentIndex", |
72 | params: [ | 72 | params: [ |
@@ -74,7 +74,7 @@ exports.res = [ | @@ -74,7 +74,7 @@ exports.res = [ | ||
74 | ] | 74 | ] |
75 | }, | 75 | }, |
76 | { | 76 | { |
77 | - route: "/resource/content/addResContent", | 77 | + route: "/resources/addResContent", |
78 | method: "POST", | 78 | method: "POST", |
79 | url: "/resources/addResContent", | 79 | url: "/resources/addResContent", |
80 | params: [ | 80 | params: [ |
@@ -84,7 +84,7 @@ exports.res = [ | @@ -84,7 +84,7 @@ exports.res = [ | ||
84 | ] | 84 | ] |
85 | }, | 85 | }, |
86 | { | 86 | { |
87 | - route: "/resource/content/delResContent", | 87 | + route: "/resources/delResContent", |
88 | method: "POST", | 88 | method: "POST", |
89 | url: "/resources/delResContent", | 89 | url: "/resources/delResContent", |
90 | params: [ | 90 | params: [ |
@@ -15,13 +15,13 @@ exports.res = [ | @@ -15,13 +15,13 @@ exports.res = [ | ||
15 | src: '/sourceManage/resourceSortManage' | 15 | src: '/sourceManage/resourceSortManage' |
16 | }, | 16 | }, |
17 | { | 17 | { |
18 | - route: '/resource/sort/resSortIndex', | 18 | + route: '/resources/resSortIndex', |
19 | method: 'POST', | 19 | method: 'POST', |
20 | url: '/resources/resSortIndex', | 20 | url: '/resources/resSortIndex', |
21 | params: [] | 21 | params: [] |
22 | }, | 22 | }, |
23 | { | 23 | { |
24 | - route: '/resource/sort/addResSort', | 24 | + route: '/resources/addResSort', |
25 | method: 'POST', | 25 | method: 'POST', |
26 | url: '/resources/addResSort', | 26 | url: '/resources/addResSort', |
27 | params: [ | 27 | params: [ |
@@ -31,7 +31,7 @@ exports.res = [ | @@ -31,7 +31,7 @@ exports.res = [ | ||
31 | ] | 31 | ] |
32 | }, | 32 | }, |
33 | { | 33 | { |
34 | - route: '/resource/sort/updateResSort', | 34 | + route: '/resources/updateResSort', |
35 | method: 'POST', | 35 | method: 'POST', |
36 | url: '/resources/updateResSort', | 36 | url: '/resources/updateResSort', |
37 | params: [ | 37 | params: [ |
@@ -42,7 +42,7 @@ exports.res = [ | @@ -42,7 +42,7 @@ exports.res = [ | ||
42 | ] | 42 | ] |
43 | }, | 43 | }, |
44 | { | 44 | { |
45 | - route: '/resource/sort/deleteResourcesSort', | 45 | + route: '/resources/deleteResourcesSort', |
46 | method: 'POST', | 46 | method: 'POST', |
47 | url: '/resources/deleteResourcesSort', | 47 | url: '/resources/deleteResourcesSort', |
48 | params: [ | 48 | params: [ |
@@ -348,6 +348,7 @@ | @@ -348,6 +348,7 @@ | ||
348 | [[each contentData.data as item index]] | 348 | [[each contentData.data as item index]] |
349 | <tr> | 349 | <tr> |
350 | <td>[[index+1]]</td> | 350 | <td>[[index+1]]</td> |
351 | + <!-- multiple="true" --> | ||
351 | <td><input type="file" name="file" id="src-[[index]]" value="[[item.src]]" data-field="[[index]].src" data-index="[[index]]" /></td> | 352 | <td><input type="file" name="file" id="src-[[index]]" value="[[item.src]]" data-field="[[index]].src" data-index="[[index]]" /></td> |
352 | <td> | 353 | <td> |
353 | <div class="form-group"> | 354 | <div class="form-group"> |
@@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
33 | <div class="panel-col" id="platform-content"> | 33 | <div class="panel-col" id="platform-content"> |
34 | </div> | 34 | </div> |
35 | <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | 35 | <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> |
36 | - <a id="filter-all" href="/resource/index/index1" class="btn btn-info">全部</a> | 36 | + <a id="filter-all" href="/resource/index/index" class="btn btn-info">全部</a> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
@@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
76 | <div class="col-sm-8"> | 76 | <div class="col-sm-8"> |
77 | <select id="sortId" name="sortId" style="width: 160px;" value="[[sortId]]" required> | 77 | <select id="sortId" name="sortId" style="width: 160px;" value="[[sortId]]" required> |
78 | <option value="">请选择资源分类</option> | 78 | <option value="">请选择资源分类</option> |
79 | - [[each resSorts.data as item index]] | 79 | + [[each resSorts as item index]] |
80 | <option value="[[item.sortId]]">[[item.sortName]]</option> | 80 | <option value="[[item.sortId]]">[[item.sortName]]</option> |
81 | [[/each]] | 81 | [[/each]] |
82 | </select> | 82 | </select> |
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | <div class="col-sm-8"> | 88 | <div class="col-sm-8"> |
89 | <select id="platformId" name="platformId" style="width: 160px;" value="[[platformId]]" required> | 89 | <select id="platformId" name="platformId" style="width: 160px;" value="[[platformId]]" required> |
90 | <option value="">请选择资源平台</option> | 90 | <option value="">请选择资源平台</option> |
91 | - [[each resPlatforms.data as item index]] | 91 | + [[each resPlatforms as item index]] |
92 | <option value="[[item.platformId]]">[[item.platformName]]</option> | 92 | <option value="[[item.platformId]]">[[item.platformName]]</option> |
93 | [[/each]] | 93 | [[/each]] |
94 | </select> | 94 | </select> |
@@ -64,9 +64,10 @@ | @@ -64,9 +64,10 @@ | ||
64 | <input class="col-sm-2 observe" type="text" value="[[contentData.data.title.title]]" | 64 | <input class="col-sm-2 observe" type="text" value="[[contentData.data.title.title]]" |
65 | data-field="title.title" placeholder="推荐品牌"> | 65 | data-field="title.title" placeholder="推荐品牌"> |
66 | <label class="col-sm-1 control-label">显示名称</label> | 66 | <label class="col-sm-1 control-label">显示名称</label> |
67 | - <div class="col-sm-2"> | ||
68 | - <label style="cursor: pointer;"><input type="radio" id="is_show_name_Y" name="is_show_name" value="Y">是</label> | ||
69 | - <label style="cursor: pointer;"><input type="radio" id="is_show_name_N" name="is_show_name" value="N">否</label> | 67 | + |
68 | + <div class="col-sm-2 is_show_name_brand"> | ||
69 | + <label style="cursor: pointer;"><input type="radio" name="is_show_name" value="Y">是</label> | ||
70 | + <label style="cursor: pointer;"><input type="radio" name="is_show_name" value="N">否</label> | ||
70 | </div> | 71 | </div> |
71 | <input type="hidden" id="is_show_name" value="[[contentData.data.is_show_name]]" for="radio"/> | 72 | <input type="hidden" id="is_show_name" value="[[contentData.data.is_show_name]]" for="radio"/> |
72 | </div> | 73 | </div> |
@@ -94,19 +95,22 @@ | @@ -94,19 +95,22 @@ | ||
94 | <select class="col-sm-2 observe" value="[[contentData.data.params.param]]" data-field="params.param"> | 95 | <select class="col-sm-2 observe" value="[[contentData.data.params.param]]" data-field="params.param"> |
95 | [[layout parm2_template]] | 96 | [[layout parm2_template]] |
96 | </select> | 97 | </select> |
97 | - <label class="col-sm-2 control-label">附加参数值</label> | 98 | + <label class="col-sm-1 control-label">附加参数值</label> |
98 | <input class="col-sm-2 observe" type="text" value="[[contentData.data.params.paramValue]]" | 99 | <input class="col-sm-2 observe" type="text" value="[[contentData.data.params.paramValue]]" |
99 | data-field="params.paramValue" placeholder="附加参数值"> | 100 | data-field="params.paramValue" placeholder="附加参数值"> |
100 | </div> | 101 | </div> |
101 | <div class="form-group col-sm-12"> | 102 | <div class="form-group col-sm-12"> |
103 | + <label class="col-sm-1 control-label">更多名称</label> | ||
104 | + <input class="col-sm-2 observe" type="text" value="[[contentData.data.params.more]]" | ||
105 | + data-field="params.more" placeholder="更多名称"> | ||
102 | <label class="col-sm-1 control-label">跳转目的</label> | 106 | <label class="col-sm-1 control-label">跳转目的</label> |
103 | - <select name="goTo" class="col-sm-2 observe" value="[[contentData.data.params.more]]" | ||
104 | - data-field="params.more"> | 107 | + <select name="goTo" class="col-sm-2 observe" value="[[contentData.data.params.more_url.action]]" |
108 | + data-field="params.more_url.action"> | ||
105 | [[layout action_template]] | 109 | [[layout action_template]] |
106 | </select> | 110 | </select> |
107 | <label class="col-sm-1 control-label">链接</label> | 111 | <label class="col-sm-1 control-label">链接</label> |
108 | - <input value="[[contentData.data.params.more_url]]" class="col-sm-2 observe" required="required" | ||
109 | - data-field="params.more_url"/> | 112 | + <input value="[[contentData.data.params.more_url.url]]" class="col-sm-2 observe" required="required" |
113 | + data-field="params.more_url.url"/> | ||
110 | 114 | ||
111 | <p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p> | 115 | <p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p> |
112 | </div> | 116 | </div> |
@@ -125,13 +129,16 @@ | @@ -125,13 +129,16 @@ | ||
125 | <tbody> | 129 | <tbody> |
126 | [[each contentData.data.list as item index]] | 130 | [[each contentData.data.list as item index]] |
127 | <tr> | 131 | <tr> |
128 | - <td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/> | 132 | + <td><input type="file" name="file" value="[[item.src]]" class="observe" |
133 | + data-field="list.[[index]].src"/> | ||
129 | </td> | 134 | </td> |
130 | <td> | 135 | <td> |
131 | [[if contentData.template_name=='kidsBrands']] | 136 | [[if contentData.template_name=='kidsBrands']] |
132 | - title:<input class="col-sm-8 observe" type="text" value="[[item.title]]" data-field="list.[[index]].title"> | 137 | + title:<input class="col-sm-8 observe" type="text" value="[[item.title]]" |
138 | + data-field="list.[[index]].title"> | ||
133 | [[else]] | 139 | [[else]] |
134 | - name:<input class="col-sm-8 observe" type="text" value="[[item.name]]" data-field="list.[[index]].name"> | 140 | + name:<input class="col-sm-8 observe" type="text" value="[[item.name]]" |
141 | + data-field="list.[[index]].name"> | ||
135 | [[/if]] | 142 | [[/if]] |
136 | </td> | 143 | </td> |
137 | <td> | 144 | <td> |
@@ -162,7 +169,7 @@ | @@ -162,7 +169,7 @@ | ||
162 | <div class="form-group" name="[[brand.name]]"> | 169 | <div class="form-group" name="[[brand.name]]"> |
163 | [[each brand.items as item __index ]] | 170 | [[each brand.items as item __index ]] |
164 | <a class="btn"> | 171 | <a class="btn"> |
165 | - <input type="checkbox" value="[[item.id]]" name="brandCheckBox" > | 172 | + <input type="checkbox" value="[[item.id]]" name="brandCheckBox"> |
166 | <label>[[item.brand_name]]</label> | 173 | <label>[[item.brand_name]]</label> |
167 | </a> | 174 | </a> |
168 | [[/each]] | 175 | [[/each]] |
@@ -182,3 +189,133 @@ | @@ -182,3 +189,133 @@ | ||
182 | <option value="promotion">促销id</option> | 189 | <option value="promotion">促销id</option> |
183 | <option value="msort">大分类ID</option> | 190 | <option value="msort">大分类ID</option> |
184 | </script> | 191 | </script> |
192 | +<!-- 9-1 标题标签 --> | ||
193 | +<script type="text/template" id="title-template"> | ||
194 | + <div class="rows"> | ||
195 | + <div class="form-group col-sm-12"> | ||
196 | + <label class="col-sm-1 control-label">标题名称</label> | ||
197 | + <input class="col-sm-2 observe" type="text" value="[[contentData.data.title_name]]" | ||
198 | + data-field="title_name"> | ||
199 | + <label class="col-sm-1 control-label">更多名称</label> | ||
200 | + <input class="col-sm-2 observe" type="text" value="[[contentData.data.more_name]]" | ||
201 | + data-field="more_name"> | ||
202 | + </div> | ||
203 | + <div class="form-group col-sm-12"> | ||
204 | + <label class="col-sm-1 control-label">跳转目的</label> | ||
205 | + <select name="goTo" class="col-sm-2 observe" value="[[contentData.data.more_link.action]]" | ||
206 | + data-field="more_link.action"> | ||
207 | + [[layout action_template]] | ||
208 | + </select> | ||
209 | + <label class="col-sm-1 control-label">链接</label> | ||
210 | + <input value="[[contentData.data.more_link.url]]" class="col-sm-2 observe" required="required" | ||
211 | + data-field="more_link.url"/> | ||
212 | + | ||
213 | + <p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p> | ||
214 | + </div> | ||
215 | + </div> | ||
216 | + <div class="panel-body"> | ||
217 | + <div> | ||
218 | + <table class="table table-hover table-bordered responsive dataTable no-footer"> | ||
219 | + <thead> | ||
220 | + <tr> | ||
221 | + <th>序号</th> | ||
222 | + <th>标签名称</th> | ||
223 | + <th>导航链接</th> | ||
224 | + </tr> | ||
225 | + </thead> | ||
226 | + <tbody> | ||
227 | + [[each contentData.data.nav as item index]] | ||
228 | + <tr> | ||
229 | + <td> | ||
230 | + [[index+1]] | ||
231 | + </td> | ||
232 | + <td> | ||
233 | + <input value="[[item.name]]" class="col-sm-6 observe" required="required" | ||
234 | + data-field="nav.[[index]].name" placeholder="标签名称"/> | ||
235 | + </td> | ||
236 | + <td> | ||
237 | + <div class="col-sm-12"> | ||
238 | + <select name="goTo" class="col-sm-4 observe" value="[[item.url.action]]" | ||
239 | + data-field="nav.[[index]].url.action"> | ||
240 | + [[layout action_template]] | ||
241 | + </select> | ||
242 | + | ||
243 | + <div class="col-sm-1"></div> | ||
244 | + <input value="[[item.url.url]]" class=" col-sm-4 observe" required="required" | ||
245 | + data-field="nav.[[index]].url.url" placeholder="链接"/> | ||
246 | + | ||
247 | + <p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p> | ||
248 | + </div> | ||
249 | + </td> | ||
250 | + </tr> | ||
251 | + [[/each]] | ||
252 | + </tbody> | ||
253 | + </table> | ||
254 | + </div> | ||
255 | + <a href="JavaScript:;" id="nav-addOne" class="btn btn-primary btn-xs">添加一个</a> | ||
256 | + </div> | ||
257 | +</script> | ||
258 | +<!-- 添加图标、楼层 --> | ||
259 | +<script type="text/template" id="getCoupon-template"> | ||
260 | + <div class="panel-body"> | ||
261 | + <div> | ||
262 | + <table class="table table-hover table-bordered responsive dataTable no-footer"> | ||
263 | + <thead> | ||
264 | + <tr> | ||
265 | + <th>标题内容</th> | ||
266 | + <th>图片</th> | ||
267 | + <th>选项</th> | ||
268 | + </tr> | ||
269 | + </thead> | ||
270 | + <tbody> | ||
271 | + [[each contentData.data as item index]] | ||
272 | + <tr> | ||
273 | + <td> | ||
274 | + <div class="form-group"> | ||
275 | + <input value="[[item.title]]" class="form-control observe" required="required" | ||
276 | + data-field="[[index]].title" placeholder="标题内容"/> | ||
277 | + </div> | ||
278 | + </td> | ||
279 | + <td> | ||
280 | + <div class="form-group"> | ||
281 | + <input type="file" name="file" value="[[item.image.src]]" class="form-control observe" | ||
282 | + data-field="[[index]].image.src"/> | ||
283 | + </div> | ||
284 | + </td> | ||
285 | + <td> | ||
286 | + <div class="form-group"> | ||
287 | + <div class="isShow_coupon form-control"> | ||
288 | + <label style="cursor: pointer;"><input type="radio" name="isShow" value="YES">是</label> | ||
289 | + <label style="cursor: pointer;"><input type="radio" name="isShow" value="NO">否</label> | ||
290 | + </div> | ||
291 | + <input type="hidden" id="isShow_coupon" value="[[contentData.data.isShow]]" for="radio"/> | ||
292 | + </div> | ||
293 | + | ||
294 | + <div class="form-group"> | ||
295 | + <input value="[[item.couponID]]" class="form-control observe" required="required" | ||
296 | + data-field="[[index]].couponID" placeholder="码"/> | ||
297 | + | ||
298 | + <p style="color:#999;margin-top: 5px;">多个以英文逗号隔开</p> | ||
299 | + </div> | ||
300 | + <div class="form-group"> | ||
301 | + <select name="goTo" class="form-control observe" value="[[item.image.url.action]]" | ||
302 | + data-field="[[index]].image.url.action"> | ||
303 | + [[layout action_template]] | ||
304 | + </select> | ||
305 | + </div> | ||
306 | + <div class="form-group"> | ||
307 | + <input value="[[item.image.url.url]]" class="form-control observe" required="required" | ||
308 | + data-field="[[index]].image.url.url" placeholder="图片链接"/> | ||
309 | + | ||
310 | + <p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p> | ||
311 | + </div> | ||
312 | + </td> | ||
313 | + </tr> | ||
314 | + [[/each]] | ||
315 | + </tbody> | ||
316 | + </table> | ||
317 | + </div> | ||
318 | + <a href="JavaScript:;" id="coupon-addOne" class="btn btn-primary btn-xs">添加一个</a> | ||
319 | + </div> | ||
320 | +</script> | ||
321 | + |
@@ -439,11 +439,11 @@ | @@ -439,11 +439,11 @@ | ||
439 | <div id="paramsGroup-bottom"> | 439 | <div id="paramsGroup-bottom"> |
440 | <ul id="sortable" class="sortable" style="margin:10px;width:100%;"> | 440 | <ul id="sortable" class="sortable" style="margin:10px;width:100%;"> |
441 | [[each contentData.data.list as item index]] | 441 | [[each contentData.data.list as item index]] |
442 | - <li> | 442 | + <li class="dragItem"> |
443 | <table style="width:100%;z-index:-1;"> | 443 | <table style="width:100%;z-index:-1;"> |
444 | <tbody> | 444 | <tbody> |
445 | <tr> | 445 | <tr> |
446 | - <td width="100px">标题:<input type="text" required style="width: 60px;" class="observe" value="[[item.title]]" data-field="list.[[index]].title"></td> | 446 | + <td width="100px">标题:<input class="abc" type="text" required style="width: 60px;" class="observe" value="[[item.title]]" data-field="list.[[index]].title"></td> |
447 | <td>参数:<input type="text" style="width:300px;" class="observe" value="[[item.params]]" data-field="list.[[index]].params"></td> | 447 | <td>参数:<input type="text" style="width:300px;" class="observe" value="[[item.params]]" data-field="list.[[index]].params"></td> |
448 | <td><button class="btn btn-danger btn-sm paramsGroupDel" type="button" data-index="[[index]]">删除</button></td> | 448 | <td><button class="btn btn-danger btn-sm paramsGroupDel" type="button" data-index="[[index]]">删除</button></td> |
449 | </tr> | 449 | </tr> |
1 | <script type="text/template" id="template_content"> | 1 | <script type="text/template" id="template_content"> |
2 | <!-- 文本内容 --> | 2 | <!-- 文本内容 --> |
3 | [[each modules as module index]] | 3 | [[each modules as module index]] |
4 | - <li class="form-group custom-group" data-index="[[index]]" style="width: 100%"> | 4 | + <li class="form-group custom-group dragItem" data-index="[[index]]" style="width: 100%"> |
5 | [[if module.contentData.template_name=='text']] | 5 | [[if module.contentData.template_name=='text']] |
6 | <div class="col-sm-12"><h3>[[module.contentData.data.text]]</h3></div> | 6 | <div class="col-sm-12"><h3>[[module.contentData.data.text]]</h3></div> |
7 | [[else if module.contentData.template_name=='singleImage']] | 7 | [[else if module.contentData.template_name=='singleImage']] |
@@ -260,32 +260,37 @@ | @@ -260,32 +260,37 @@ | ||
260 | 260 | ||
261 | <script type="text/template" id="template_default_1"> | 261 | <script type="text/template" id="template_default_1"> |
262 | <option value="">选择跳转目的</option> | 262 | <option value="">选择跳转目的</option> |
263 | - <option value="brand">品牌列表页</option> | ||
264 | - <option value="productDetail">商品详情页</option> | ||
265 | - <option value="coupon">优惠券页</option> | ||
266 | - <option value="fav">收藏列表页</option> | ||
267 | - <option value="mine">我的页面</option> | ||
268 | - <option value="list">列表或搜索页</option> | ||
269 | - <option value="attention">关注页</option> | ||
270 | - <option value="plus">plus页</option> | ||
271 | - <option value="star">star页</option> | ||
272 | - <option value="new">新品到着页</option> | ||
273 | - <option value="sale">折扣页</option> | ||
274 | - <option value="h5">h5网页</option> | ||
275 | - <option value="guangchannel">逛频道</option> | ||
276 | - <option value="gender">男女首页</option> | ||
277 | - <option value="activity">app活动页</option> | ||
278 | - <option value="home" selected="selected">频道首页</option> | ||
279 | - <option value="yohood">YOHOOD</option> | ||
280 | - <option value="top100">热销排行</option> | ||
281 | - <option value="activitytemplate">活动模板</option> | ||
282 | - <option value="globalpurchase">全球购</option> | ||
283 | - <option value="subchannel">二级频道</option> | ||
284 | - <option value="guangchannel">逛频道或SHOW晒单页</option> | ||
285 | - <option value="showgoods">去晒单</option> | ||
286 | - <option value="limitpurchase">尖货频道</option> | ||
287 | - <option value="vippro">会员商品</option> | ||
288 | - <option value="shortsize">断码页</option> | ||
289 | - <option value="discountmarket">折扣专区</option> | ||
290 | - <option value="discountmarketpro">折扣专区详情页</option> | 263 | + <option value="">选择跳转目标</option> |
264 | + <option value="go.brand">品牌列表页</option> | ||
265 | + <option value="go.productDetail">商品详情页</option> | ||
266 | + <option value="go.coupon">优惠券页</option> | ||
267 | + <option value="go.fav">收藏列表页</option> | ||
268 | + <option value="go.mine">我的页面</option> | ||
269 | + <option value="go.list">列表或搜索页</option> | ||
270 | + <option value="go.attention">关注页</option> | ||
271 | + <option value="go.plus">plus页</option> | ||
272 | + <option value="go.star">star页</option> | ||
273 | + <option value="go.new">新品到着页</option> | ||
274 | + <option value="go.sale">折扣页</option> | ||
275 | + <option value="go.share">分享</option> | ||
276 | + <option value="go.h5">h5网页</option> | ||
277 | + <option value="go.weblogin">h5网页调用本地登录</option> | ||
278 | + <option value="go.guangchannel">逛频道</option> | ||
279 | + <option value="go.gender">男女首页</option> | ||
280 | + <option value="go.activity">app活动页</option> | ||
281 | + <option value="go.home">频道首页</option> | ||
282 | + <option value="go.yohood">YOHOOD</option> | ||
283 | + <option value="go.top100">热销排行</option> | ||
284 | + <option value="go.activitytemplate">活动模板</option> | ||
285 | + <option value="go.globalpurchase">全球购</option> | ||
286 | + <option value="go.subchannel">二级频道</option> | ||
287 | + <option value="go.guangchannel">逛频道或SHOW晒单页</option> | ||
288 | + <option value="go.showgoods">去晒单</option> | ||
289 | + <option value="go.limitpurchase">尖货频道</option> | ||
290 | + <option value="go.vippro">会员商品</option> | ||
291 | + <option value="go.shortsize">断码页</option> | ||
292 | + <option value="go.discountmarket">折扣专区</option> | ||
293 | + <option value="go.discountmarketpro">折扣专区详情页</option> | ||
294 | + <option value="go.signin">签到页</option> | ||
295 | + <option value="go.playvideo">视频播放</option> | ||
291 | </script> | 296 | </script> |
-
Please register or login to post a comment