Merge branch 'release/1.6' of git.dev.yoho.cn:platform/yohobuy-portal-fe into release/1.6
Showing
29 changed files
with
295 additions
and
799 deletions
@@ -89,7 +89,7 @@ gulp.task("buildjs",["js"],function(){ | @@ -89,7 +89,7 @@ gulp.task("buildjs",["js"],function(){ | ||
89 | }); | 89 | }); |
90 | //发布静态资源 | 90 | //发布静态资源 |
91 | gulp.task('assets', function() { | 91 | gulp.task('assets', function() { |
92 | - gulp.src(public_dir + '/img/**') | 92 | + gulp.src(public_dir + '/images/**') |
93 | .pipe(gulp.dest(dist_dir.image)); | 93 | .pipe(gulp.dest(dist_dir.image)); |
94 | gulp.src(public_dir + '/fonts/*') | 94 | gulp.src(public_dir + '/fonts/*') |
95 | .pipe(gulp.dest(dist_dir.font)); | 95 | .pipe(gulp.dest(dist_dir.font)); |
client/js/common/dialogs/emotion.js
deleted
100644 → 0
1 | - | ||
2 | -var $=require('jquery'); | ||
3 | - | ||
4 | -(function(){ | ||
5 | - | ||
6 | - var editor = null; | ||
7 | - | ||
8 | - UM.registerWidget('emotion',{ | ||
9 | - | ||
10 | - tpl: "<link type=\"text/css\" rel=\"stylesheet\" href=\"<%=emotion_url%>emotion.css\">" + | ||
11 | - "<div class=\"edui-emotion-tab-Jpanel edui-emotion-wrapper\">" + | ||
12 | - "<ul class=\"edui-emotion-Jtabnav edui-tab-nav\">" + | ||
13 | - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab0\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_choice%></a></li>" + | ||
14 | - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab1\" class=\"edui-tab-text\"><%=lang_input_Tuzki%></a></li>" + | ||
15 | - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab2\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_lvdouwa%></a></li>" + | ||
16 | - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab3\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_BOBO%></a></li>" + | ||
17 | - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab4\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_babyCat%></a></li>" + | ||
18 | - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab5\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_bubble%></a></li>" + | ||
19 | - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab6\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_youa%></a></li>" + | ||
20 | - "<li class=\"edui-emotion-tabs\"></li>" + | ||
21 | - "</ul>" + | ||
22 | - "<div class=\"edui-tab-content edui-emotion-JtabBodys\">" + | ||
23 | - "<div class=\"edui-emotion-Jtab0 edui-tab-pane\"></div>" + | ||
24 | - "<div class=\"edui-emotion-Jtab1 edui-tab-pane\"></div>" + | ||
25 | - "<div class=\"edui-emotion-Jtab2 edui-tab-pane\"></div>" + | ||
26 | - "<div class=\"edui-emotion-Jtab3 edui-tab-pane\"></div>" + | ||
27 | - "<div class=\"edui-emotion-Jtab4 edui-tab-pane\"></div>" + | ||
28 | - "<div class=\"edui-emotion-Jtab5 edui-tab-pane\"></div>" + | ||
29 | - "<div class=\"edui-emotion-Jtab6 edui-tab-pane\"></div>" + | ||
30 | - "</div>" + | ||
31 | - "<div class=\"edui-emotion-JtabIconReview edui-emotion-preview-box\">" + | ||
32 | - "<img src=\"<%=cover_img%>\" class=\'edui-emotion-JfaceReview edui-emotion-preview-img\'/>" + | ||
33 | - "</div>", | ||
34 | - | ||
35 | - sourceData: { | ||
36 | - emotion: { | ||
37 | - tabNum:7, //切换面板数量 | ||
38 | - SmilmgName:{ 'edui-emotion-Jtab0':['j_00', 84], 'edui-emotion-Jtab1':['t_00', 40], 'edui-emotion-Jtab2':['w_00', 52], 'edui-emotion-Jtab3':['B_00', 63], 'edui-emotion-Jtab4':['C_00', 20], 'edui-emotion-Jtab5':['i_f', 50], 'edui-emotion-Jtab6':['y_00', 40] }, //图片前缀名 | ||
39 | - imageFolders:{ 'edui-emotion-Jtab0':'jx2/', 'edui-emotion-Jtab1':'tsj/', 'edui-emotion-Jtab2':'ldw/', 'edui-emotion-Jtab3':'bobo/', 'edui-emotion-Jtab4':'babycat/', 'edui-emotion-Jtab5':'face/', 'edui-emotion-Jtab6':'youa/'}, //图片对应文件夹路径 | ||
40 | - imageCss:{'edui-emotion-Jtab0':'jd', 'edui-emotion-Jtab1':'tsj', 'edui-emotion-Jtab2':'ldw', 'edui-emotion-Jtab3':'bb', 'edui-emotion-Jtab4':'cat', 'edui-emotion-Jtab5':'pp', 'edui-emotion-Jtab6':'youa'}, //图片css类名 | ||
41 | - imageCssOffset:{'edui-emotion-Jtab0':35, 'edui-emotion-Jtab1':35, 'edui-emotion-Jtab2':35, 'edui-emotion-Jtab3':35, 'edui-emotion-Jtab4':35, 'edui-emotion-Jtab5':25, 'edui-emotion-Jtab6':35}, //图片偏移 | ||
42 | - SmileyInfor:{ | ||
43 | - 'edui-emotion-Jtab0':['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'], | ||
44 | - 'edui-emotion-Jtab1':['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'], | ||
45 | - 'edui-emotion-Jtab2':['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'], | ||
46 | - 'edui-emotion-Jtab3':['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'], | ||
47 | - 'edui-emotion-Jtab4':['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'], | ||
48 | - 'edui-emotion-Jtab5':['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'], | ||
49 | - 'edui-emotion-Jtab6':['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上'] | ||
50 | - } | ||
51 | - } | ||
52 | - }, | ||
53 | - initContent:function( _editor, $widget ){ | ||
54 | - | ||
55 | - var me = this, | ||
56 | - emotion = me.sourceData.emotion, | ||
57 | - lang = _editor.getLang( 'emotion' )['static'], | ||
58 | - emotionUrl = UMEDITOR_CONFIG.UMEDITOR_HOME_URL + 'dialogs/emotion/', | ||
59 | - options = $.extend( {}, lang, { | ||
60 | - emotion_url: emotionUrl | ||
61 | - }), | ||
62 | - $root = me.root(); | ||
63 | - | ||
64 | - if( me.inited ) { | ||
65 | - me.preventDefault(); | ||
66 | - this.switchToFirst(); | ||
67 | - return; | ||
68 | - } | ||
69 | - | ||
70 | - me.inited = true; | ||
71 | - | ||
72 | - editor = _editor; | ||
73 | - this.widget = $widget; | ||
74 | - | ||
75 | - emotion.SmileyPath = _editor.options.emotionLocalization === true ? emotionUrl + 'images/' : "http://img.baidu.com/hi/"; | ||
76 | - emotion.SmileyBox = me.createTabList( emotion.tabNum ); | ||
77 | - emotion.tabExist = me.createArr( emotion.tabNum ); | ||
78 | - | ||
79 | - options['cover_img'] = emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif' : 'default/0.gif'); | ||
80 | - | ||
81 | - $root.html( $.parseTmpl( me.tpl, options ) ); | ||
82 | - | ||
83 | - me.tabs = $.eduitab({selector:".edui-emotion-tab-Jpanel"}); | ||
84 | - | ||
85 | - //缓存预览对象 | ||
86 | - me.previewBox = $root.find(".edui-emotion-JtabIconReview"); | ||
87 | - me.previewImg = $root.find(".edui-emotion-JfaceReview"); | ||
88 | - | ||
89 | - me.initImgName(); | ||
90 | - | ||
91 | - }, | ||
92 | - initEvent:function(){ | ||
93 | - | ||
94 | - var me = this; | ||
95 | - | ||
96 | - //防止点击过后关闭popup | ||
97 | - me.root().on('click', function(e){ | ||
98 | - return false; | ||
99 | - }); | ||
100 | - | ||
101 | - //移动预览 | ||
102 | - me.root().delegate( 'td', 'mouseover mouseout', function( evt ){ | ||
103 | - | ||
104 | - var $td = $( this), | ||
105 | - url = $td.attr('data-surl') || null; | ||
106 | - | ||
107 | - if( url ) { | ||
108 | - me[evt.type]( this, url , $td.attr('data-posflag') ); | ||
109 | - } | ||
110 | - | ||
111 | - return false; | ||
112 | - | ||
113 | - } ); | ||
114 | - | ||
115 | - //点击选中 | ||
116 | - me.root().delegate( 'td', 'click', function( evt ){ | ||
117 | - | ||
118 | - var $td = $( this), | ||
119 | - realUrl = $td.attr('data-realurl') || null; | ||
120 | - | ||
121 | - if( realUrl ) { | ||
122 | - me.insertSmiley( realUrl.replace( /'/g, "\\'" ), evt ); | ||
123 | - } | ||
124 | - | ||
125 | - return false; | ||
126 | - | ||
127 | - } ); | ||
128 | - | ||
129 | - //更新模板 | ||
130 | - me.tabs.edui().on("beforeshow", function( evt ){ | ||
131 | - | ||
132 | - var contentId = $(evt.target).attr('data-context').replace( /^.*\.(?=[^\s]*$)/, '' ); | ||
133 | - | ||
134 | - evt.stopPropagation(); | ||
135 | - | ||
136 | - me.updateTab( contentId ); | ||
137 | - | ||
138 | - }); | ||
139 | - | ||
140 | - this.switchToFirst(); | ||
141 | - | ||
142 | - }, | ||
143 | - initImgName: function() { | ||
144 | - | ||
145 | - var emotion = this.sourceData.emotion; | ||
146 | - | ||
147 | - for ( var pro in emotion.SmilmgName ) { | ||
148 | - var tempName = emotion.SmilmgName[pro], | ||
149 | - tempBox = emotion.SmileyBox[pro], | ||
150 | - tempStr = ""; | ||
151 | - | ||
152 | - if ( tempBox.length ) return; | ||
153 | - | ||
154 | - for ( var i = 1; i <= tempName[1]; i++ ) { | ||
155 | - tempStr = tempName[0]; | ||
156 | - if ( i < 10 ) tempStr = tempStr + '0'; | ||
157 | - tempStr = tempStr + i + '.gif'; | ||
158 | - tempBox.push( tempStr ); | ||
159 | - } | ||
160 | - } | ||
161 | - | ||
162 | - }, | ||
163 | - /** | ||
164 | - * 切换到第一个tab | ||
165 | - */ | ||
166 | - switchToFirst: function(){ | ||
167 | - this.root().find(".edui-emotion-Jtabnav .edui-tab-text:first").trigger('click'); | ||
168 | - }, | ||
169 | - updateTab: function( contentBoxId ) { | ||
170 | - | ||
171 | - var me = this, | ||
172 | - emotion = me.sourceData.emotion; | ||
173 | - | ||
174 | - me.autoHeight( contentBoxId ); | ||
175 | - | ||
176 | - if ( !emotion.tabExist[ contentBoxId ] ) { | ||
177 | - | ||
178 | - emotion.tabExist[ contentBoxId ] = true; | ||
179 | - me.createTab( contentBoxId ); | ||
180 | - | ||
181 | - } | ||
182 | - | ||
183 | - }, | ||
184 | - autoHeight: function( ) { | ||
185 | - this.widget.height(this.root() + 2); | ||
186 | - }, | ||
187 | - createTabList: function( tabNum ) { | ||
188 | - var obj = {}; | ||
189 | - for ( var i = 0; i < tabNum; i++ ) { | ||
190 | - obj["edui-emotion-Jtab" + i] = []; | ||
191 | - } | ||
192 | - return obj; | ||
193 | - }, | ||
194 | - mouseover: function( td, srcPath, posFlag ) { | ||
195 | - | ||
196 | - posFlag -= 0; | ||
197 | - | ||
198 | - $(td).css( 'backgroundColor', '#ACCD3C' ); | ||
199 | - | ||
200 | - this.previewImg.css( "backgroundImage", "url(" + srcPath + ")" ); | ||
201 | - posFlag && this.previewBox.addClass('edui-emotion-preview-left'); | ||
202 | - this.previewBox.show(); | ||
203 | - | ||
204 | - }, | ||
205 | - mouseout: function( td ) { | ||
206 | - $(td).css( 'backgroundColor', 'transparent' ); | ||
207 | - this.previewBox.removeClass('edui-emotion-preview-left').hide(); | ||
208 | - }, | ||
209 | - insertSmiley: function( url, evt ) { | ||
210 | - var obj = { | ||
211 | - src: url | ||
212 | - }; | ||
213 | - obj._src = obj.src; | ||
214 | - editor.execCommand( 'insertimage', obj ); | ||
215 | - if ( !evt.ctrlKey ) { | ||
216 | - //关闭预览 | ||
217 | - this.previewBox.removeClass('edui-emotion-preview-left').hide(); | ||
218 | - this.widget.edui().hide(); | ||
219 | - } | ||
220 | - }, | ||
221 | - createTab: function( contentBoxId ) { | ||
222 | - | ||
223 | - var faceVersion = "?v=1.1", //版本号 | ||
224 | - me = this, | ||
225 | - $contentBox = this.root().find("."+contentBoxId), | ||
226 | - emotion = me.sourceData.emotion, | ||
227 | - imagePath = emotion.SmileyPath + emotion.imageFolders[ contentBoxId ], //获取显示表情和预览表情的路径 | ||
228 | - positionLine = 11 / 2, //中间数 | ||
229 | - iWidth = iHeight = 35, //图片长宽 | ||
230 | - iColWidth = 3, //表格剩余空间的显示比例 | ||
231 | - tableCss = emotion.imageCss[ contentBoxId ], | ||
232 | - cssOffset = emotion.imageCssOffset[ contentBoxId ], | ||
233 | - textHTML = ['<table border="1" class="edui-emotion-smileytable">'], | ||
234 | - i = 0, imgNum = emotion.SmileyBox[ contentBoxId ].length, imgColNum = 11, faceImage, | ||
235 | - sUrl, realUrl, posflag, offset, infor; | ||
236 | - | ||
237 | - for ( ; i < imgNum; ) { | ||
238 | - textHTML.push( '<tr>' ); | ||
239 | - for ( var j = 0; j < imgColNum; j++, i++ ) { | ||
240 | - faceImage = emotion.SmileyBox[ contentBoxId ][i]; | ||
241 | - if ( faceImage ) { | ||
242 | - sUrl = imagePath + faceImage + faceVersion; | ||
243 | - realUrl = imagePath + faceImage; | ||
244 | - posflag = j < positionLine ? 0 : 1; | ||
245 | - offset = cssOffset * i * (-1) - 1; | ||
246 | - infor = emotion.SmileyInfor[ contentBoxId ][i]; | ||
247 | - | ||
248 | - textHTML.push( '<td class="edui-emotion-' + tableCss + '" data-surl="'+ sUrl +'" data-realurl="'+ realUrl +'" data-posflag="'+ posflag +'" align="center">' ); | ||
249 | - textHTML.push( '<span>' ); | ||
250 | - textHTML.push( '<img style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' ); | ||
251 | - textHTML.push( '</span>' ); | ||
252 | - } else { | ||
253 | - textHTML.push( '<td bgcolor="#FFFFFF">' ); | ||
254 | - } | ||
255 | - textHTML.push( '</td>' ); | ||
256 | - } | ||
257 | - textHTML.push( '</tr>' ); | ||
258 | - } | ||
259 | - textHTML.push( '</table>' ); | ||
260 | - textHTML = textHTML.join( "" ); | ||
261 | - $contentBox.html( textHTML ); | ||
262 | - }, | ||
263 | - createArr: function( tabNum ) { | ||
264 | - var arr = []; | ||
265 | - for ( var i = 0; i < tabNum; i++ ) { | ||
266 | - arr[i] = 0; | ||
267 | - } | ||
268 | - return arr; | ||
269 | - }, | ||
270 | - width:603, | ||
271 | - height:400 | ||
272 | - }); | ||
273 | - | ||
274 | -})(); | ||
275 | - |
client/js/common/dialogs/formula.js
deleted
100644 → 0
1 | -var $=require('jquery'); | ||
2 | -(function () { | ||
3 | - | ||
4 | - var editor = null; | ||
5 | - | ||
6 | - UM.registerWidget('formula', { | ||
7 | - | ||
8 | - tpl: "<link type=\"text/css\" rel=\"stylesheet\" href=\"<%=formula_url%>formula.css\">" + | ||
9 | - "<div class=\"edui-formula-wrapper\">" + | ||
10 | - "<ul class=\"edui-tab-nav\"></ul>" + | ||
11 | - "<div class=\"edui-tab-content\"></div>" + | ||
12 | - "</div>", | ||
13 | - | ||
14 | - sourceData: { | ||
15 | - formula: { | ||
16 | - 'common': [ | ||
17 | - "{/}frac{ }{ }", "^{ }/_{ }", "x^{ }", "x_{ }", "x^{ }_{ }", "{/}bar{ }", "{/}sqrt{ }", "{/}nthroot{ }{ }", | ||
18 | - "{/}sum^{ }_{n=}", "{/}sum", "{/}log_{ }", "{/}ln", "{/}int_{ }^{ }", "{/}oint_{ }^{ }" | ||
19 | - ], | ||
20 | - 'symbol': [ | ||
21 | - "+", "-", "{/}pm", "{/}times", "{/}ast", "{/}div", "/", "{/}bigtriangleup", | ||
22 | - "=", "{/}ne", "{/}approx", ">", "<", "{/}ge", "{/}le", "{/}infty", | ||
23 | - "{/}cap", "{/}cup", "{/}because", "{/}therefore", "{/}subset", "{/}supset", "{/}subseteq", "{/}supseteq", | ||
24 | - "{/}nsubseteq", "{/}nsupseteq", "{/}in", "{/}ni", "{/}notin", "{/}mapsto", "{/}leftarrow", "{/}rightarrow", | ||
25 | - "{/}Leftarrow", "{/}Rightarrow", "{/}leftrightarrow", "{/}Leftrightarrow" | ||
26 | - ], | ||
27 | - 'letter': [ | ||
28 | - "{/}alpha", "{/}beta", "{/}gamma", "{/}delta", "{/}varepsilon", "{/}varphi", "{/}lambda", "{/}mu", | ||
29 | - "{/}rho", "{/}sigma", "{/}omega", "{/}Gamma", "{/}Delta", "{/}Theta", "{/}Lambda", "{/}Xi", | ||
30 | - "{/}Pi", "{/}Sigma", "{/}Upsilon", "{/}Phi", "{/}Psi", "{/}Omega" | ||
31 | - ] | ||
32 | - } | ||
33 | - }, | ||
34 | - initContent: function (_editor, $widget) { | ||
35 | - | ||
36 | - var me = this, | ||
37 | - formula = me.sourceData.formula, | ||
38 | - lang = _editor.getLang('formula').static, | ||
39 | - formulaUrl = UMEDITOR_CONFIG.UMEDITOR_HOME_URL + 'dialogs/formula/', | ||
40 | - options = $.extend({}, lang, { 'formula_url': formulaUrl }), | ||
41 | - $root = me.root(); | ||
42 | - | ||
43 | - if (me.inited) { | ||
44 | - me.preventDefault(); | ||
45 | - return; | ||
46 | - } | ||
47 | - me.inited = true; | ||
48 | - | ||
49 | - editor = _editor; | ||
50 | - me.$widget = $widget; | ||
51 | - | ||
52 | - $root.html($.parseTmpl(me.tpl, options)); | ||
53 | - me.tabs = $.eduitab({selector: "#edui-formula-tab-Jpanel"}); | ||
54 | - | ||
55 | - /* 初始化popup的内容 */ | ||
56 | - var headHtml = [], xMax = 0, yMax = 0, | ||
57 | - $tabContent = me.root().find('.edui-tab-content'); | ||
58 | - $.each(formula, function (k, v) { | ||
59 | - var contentHtml = []; | ||
60 | - $.each(v, function (i, f) { | ||
61 | - contentHtml.push('<li class="edui-formula-latex-item" data-latex="' + f + '" style="background-position:-' + (xMax * 30) + 'px -' + (yMax * 30) + 'px"></li>'); | ||
62 | - if (++xMax >=8) { | ||
63 | - ++yMax; xMax = 0; | ||
64 | - } | ||
65 | - }); | ||
66 | - yMax++; xMax = 0; | ||
67 | - $tabContent.append('<div class="edui-tab-pane"><ul>' + contentHtml.join('') + '</ul>'); | ||
68 | - headHtml.push('<li class="edui-tab-item"><a href="javascript:void(0);" class="edui-tab-text">' + lang['lang_tab_' + k] + '</a></li>'); | ||
69 | - }); | ||
70 | - headHtml.push('<li class="edui-formula-clearboth"></li>'); | ||
71 | - $root.find('.edui-tab-nav').html(headHtml.join('')); | ||
72 | - $root.find('.edui-tab-content').append('<div class="edui-formula-clearboth"></div>'); | ||
73 | - | ||
74 | - /* 选中第一个tab */ | ||
75 | - me.switchTab(0); | ||
76 | - }, | ||
77 | - initEvent: function () { | ||
78 | - var me = this; | ||
79 | - | ||
80 | - //防止点击过后关闭popup | ||
81 | - me.root().on('click', function (e) { | ||
82 | - return false; | ||
83 | - }); | ||
84 | - | ||
85 | - //点击tab切换菜单 | ||
86 | - me.root().find('.edui-tab-nav').delegate('.edui-tab-item', 'click', function (evt) { | ||
87 | - me.switchTab(this); | ||
88 | - return false; | ||
89 | - }); | ||
90 | - | ||
91 | - //点击选中公式 | ||
92 | - me.root().find('.edui-tab-pane').delegate('.edui-formula-latex-item', 'click', function (evt) { | ||
93 | - var $item = $(this), | ||
94 | - latex = $item.attr('data-latex') || ''; | ||
95 | - | ||
96 | - if (latex) { | ||
97 | - me.insertLatex(latex.replace("{/}", "\\")); | ||
98 | - } | ||
99 | - me.$widget.edui().hide(); | ||
100 | - return false; | ||
101 | - }); | ||
102 | - }, | ||
103 | - switchTab:function(index){ | ||
104 | - var me = this, | ||
105 | - $root = me.root(), | ||
106 | - index = $.isNumeric(index) ? index:$.inArray(index, $root.find('.edui-tab-nav .edui-tab-item')); | ||
107 | - | ||
108 | - $root.find('.edui-tab-nav .edui-tab-item').removeClass('edui-active').eq(index).addClass('edui-active'); | ||
109 | - $root.find('.edui-tab-content .edui-tab-pane').removeClass('edui-active').eq(index).addClass('edui-active'); | ||
110 | - | ||
111 | - /* 自动长高 */ | ||
112 | - me.autoHeight(0); | ||
113 | - }, | ||
114 | - autoHeight: function () { | ||
115 | - this.$widget.height(this.root() + 2); | ||
116 | - }, | ||
117 | - insertLatex: function (latex) { | ||
118 | - editor.execCommand('formula', latex ); | ||
119 | - }, | ||
120 | - width: 350, | ||
121 | - height: 400 | ||
122 | - }); | ||
123 | - | ||
124 | -})(); | ||
125 | - |
@@ -247,13 +247,9 @@ $('#editProductName').on('click', function() { | @@ -247,13 +247,9 @@ $('#editProductName').on('click', function() { | ||
247 | // }); | 247 | // }); |
248 | 248 | ||
249 | 249 | ||
250 | - | ||
251 | -/*陈超*/ | ||
252 | - | ||
253 | -var ag = new common.grid({ | ||
254 | - el: "#attributeTable", | ||
255 | - columns: [{ | 250 | +var common_columns=[{ |
256 | display: "名称", | 251 | display: "名称", |
252 | + width:'10%', | ||
257 | name: "attributeName", | 253 | name: "attributeName", |
258 | render: function(item) { | 254 | render: function(item) { |
259 | item.required = item.isMust == "Y" ? "required" : ""; | 255 | item.required = item.isMust == "Y" ? "required" : ""; |
@@ -264,31 +260,31 @@ var ag = new common.grid({ | @@ -264,31 +260,31 @@ var ag = new common.grid({ | ||
264 | } | 260 | } |
265 | return arr.join(''); | 261 | return arr.join(''); |
266 | } | 262 | } |
267 | - }, { | 263 | + }] |
264 | + | ||
265 | +/*陈超*/ | ||
266 | + | ||
267 | +var ag = new common.grid({ | ||
268 | + el: "#attributeTable", | ||
269 | + columns: common_columns.concat([{ | ||
268 | display: "属性", | 270 | display: "属性", |
269 | render: function(item) { | 271 | render: function(item) { |
270 | item.required = item.isMust == "Y" ? "required" : ""; | 272 | item.required = item.isMust == "Y" ? "required" : ""; |
271 | - // item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){ | ||
272 | - // return {name:elem} | ||
273 | - // }); | ||
274 | 273 | ||
275 | var attrs = NETSALEDATA.productStandardRelationBoList; | 274 | var attrs = NETSALEDATA.productStandardRelationBoList; |
276 | if (attrs) { | 275 | if (attrs) { |
277 | for (var i in attrs) { | 276 | for (var i in attrs) { |
278 | if (attrs[i].standardId == item.attributeId) { | 277 | if (attrs[i].standardId == item.attributeId) { |
279 | - item.val = attrs[i].standardVal; | 278 | + item.val = attrs[i].parameterMakeId; |
280 | item.__val = attrs[i].parameterMakeId; | 279 | item.__val = attrs[i].parameterMakeId; |
281 | } | 280 | } |
282 | } | 281 | } |
283 | } | 282 | } |
284 | 283 | ||
285 | - // item.attributeValues={name:}; | 284 | + item.__name="attributeTable"; |
286 | return common.util.__template2($("#template33").html(), item); | 285 | return common.util.__template2($("#template33").html(), item); |
287 | } | 286 | } |
288 | - }, { | ||
289 | - display: "备注", | ||
290 | - name: "remark" | ||
291 | - }], | 287 | + }]), |
292 | complete: function() { | 288 | complete: function() { |
293 | ag.__edit.init(); | 289 | ag.__edit.init(); |
294 | } | 290 | } |
@@ -314,43 +310,24 @@ common.util.__ajax({ | @@ -314,43 +310,24 @@ common.util.__ajax({ | ||
314 | console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne); | 310 | console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne); |
315 | var ag2 = new common.grid({ | 311 | var ag2 = new common.grid({ |
316 | el: "#goodsParamWrap", | 312 | el: "#goodsParamWrap", |
317 | - columns: [{ | ||
318 | - display: "名称", | ||
319 | - name: "attributeName", | ||
320 | - render: function(item) { | ||
321 | - item.required = item.isMust == "Y" ? "required" : ""; | ||
322 | - var arr = []; | ||
323 | - arr.push(item.attributeName); | ||
324 | - if (item.required) { | ||
325 | - arr.push("<span class='red'>*</span>"); | ||
326 | - } | ||
327 | - return arr.join(''); | ||
328 | - } | ||
329 | - }, { | 313 | + columns: common_columns.concat([{ |
330 | display: "属性", | 314 | display: "属性", |
331 | render: function(item) { | 315 | render: function(item) { |
332 | item.required = item.isMust == "Y" ? "required" : ""; | 316 | item.required = item.isMust == "Y" ? "required" : ""; |
333 | item.id = item.parameterMakeId; | 317 | item.id = item.parameterMakeId; |
334 | - // item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){ | ||
335 | - // return {name:elem} | ||
336 | - // }); | ||
337 | var attrs = NETSALEDATA.attributeProValuesBosOne; | 318 | var attrs = NETSALEDATA.attributeProValuesBosOne; |
338 | if (attrs) { | 319 | if (attrs) { |
339 | for (var i in attrs) { | 320 | for (var i in attrs) { |
340 | if (attrs[i].attributeId == item.attributeId) { | 321 | if (attrs[i].attributeId == item.attributeId) { |
341 | - item.val = attrs[i].standardVal; | 322 | + item.val = attrs[i].attributeValueId; |
342 | item.__val = attrs[i].attributeValueId.replace(/,/g, '|'); | 323 | item.__val = attrs[i].attributeValueId.replace(/,/g, '|'); |
343 | } | 324 | } |
344 | } | 325 | } |
345 | } | 326 | } |
346 | - | ||
347 | - // item.attributeValues={name:}; | 327 | + item.__name="goodsParamWrap"; |
348 | return common.util.__template2($("#template33").html(), item); | 328 | return common.util.__template2($("#template33").html(), item); |
349 | } | 329 | } |
350 | - }, { | ||
351 | - display: "备注", | ||
352 | - name: "remark" | ||
353 | - }], | 330 | + }]), |
354 | complete: function() { | 331 | complete: function() { |
355 | ag2.__edit.init(); | 332 | ag2.__edit.init(); |
356 | } | 333 | } |
@@ -372,19 +349,64 @@ common.util.__ajax({ | @@ -372,19 +349,64 @@ common.util.__ajax({ | ||
372 | }); | 349 | }); |
373 | }, true); | 350 | }, true); |
374 | 351 | ||
352 | +// console.log(basicInfo); | ||
353 | + | ||
354 | +var ag3 = new common.grid({ | ||
355 | + el: "#goodsParamWrap2", | ||
356 | + columns: common_columns.concat([{ | ||
357 | + display: "属性", | ||
358 | + render: function(item) { | ||
359 | + item.required = item.isMust == "Y" ? "required" : ""; | ||
360 | + item.id = item.parameterMakeId; | ||
361 | + var attrs = NETSALEDATA.specialAttrBo; | ||
362 | + if (attrs&&attrs.materialList) { | ||
363 | + var _arr=[]; | ||
364 | + for (var i in attrs.materialList) { | ||
365 | + _arr.push(attrs.materialList[i].id); | ||
366 | + } | ||
367 | + item.__val = _arr.join('|'); | ||
368 | + } | ||
369 | + | ||
370 | + item.__name="goodsParamWrap2"; | ||
371 | + return common.util.__template2($("#template33").html(), item); | ||
372 | + } | ||
373 | + }]), | ||
374 | + complete: function() { | ||
375 | + ag3.__edit.init(); | ||
376 | + } | ||
377 | +}); | ||
378 | +ag3.__edit = new common.edit("#goodsParamWrap2"); | ||
379 | +common.util.__ajax({ | ||
380 | + url: '/base/goods/queryMaterialList', | ||
381 | + data: { | ||
382 | + categoryId: basicInfo.maxSortId | ||
383 | + } | ||
384 | +}, function(res) { | ||
385 | + console.log("接口queryMaterialList",res.data); | ||
386 | + ag3.init([res.data]); | ||
387 | +}, true); | ||
388 | + | ||
389 | + | ||
375 | $(document).on("change", "#goodsParamWrap .attr_input", function() { | 390 | $(document).on("change", "#goodsParamWrap .attr_input", function() { |
376 | var item = ag2.rows[$(this).data("index")]; | 391 | var item = ag2.rows[$(this).data("index")]; |
377 | item.val = $(this).val(); | 392 | item.val = $(this).val(); |
378 | }); | 393 | }); |
379 | -$(document).on("change", "#goodsParamWrap .attr_checkobx_class", function() { | ||
380 | - var item = ag2.rows[$(this).data("index")]; | ||
381 | - item.val = $("#attr_" + $(this).data("index")).val().replace(/\|/g, ','); | ||
382 | -}) | 394 | + |
383 | $(document).on("change", "#attributeTable .attr_input", function() { | 395 | $(document).on("change", "#attributeTable .attr_input", function() { |
384 | var item = ag.rows[$(this).data("index")]; | 396 | var item = ag.rows[$(this).data("index")]; |
385 | item.val = $(this).val(); | 397 | item.val = $(this).val(); |
386 | }); | 398 | }); |
387 | 399 | ||
400 | +$(document).on("change", "#goodsParamWrap .attr_checkobx_class", function() { | ||
401 | + var item = ag2.rows[$(this).data("index")]; | ||
402 | + item.val = $("#goodsParamWrap_attr_" + $(this).data("index")).val().replace(/\|/g, ','); | ||
403 | +}) | ||
404 | + | ||
405 | +$(document).on("change", "#goodsParamWrap2 .attr_checkobx_class", function() { | ||
406 | + var item = ag3.rows[$(this).data("index")]; | ||
407 | + item.val = $("#goodsParamWrap2_attr_" + $(this).data("index")).val().replace(/\|/g, ','); | ||
408 | +}) | ||
409 | + | ||
388 | 410 | ||
389 | /*保存*/ | 411 | /*保存*/ |
390 | GOLABDATA.on("TYgoodsParams", function() { | 412 | GOLABDATA.on("TYgoodsParams", function() { |
@@ -393,18 +415,19 @@ GOLABDATA.on("TYgoodsParams", function() { | @@ -393,18 +415,19 @@ GOLABDATA.on("TYgoodsParams", function() { | ||
393 | return ag.__edit.errMessage; | 415 | return ag.__edit.errMessage; |
394 | } | 416 | } |
395 | if (!ag2.__edit.validate(true)) { | 417 | if (!ag2.__edit.validate(true)) { |
396 | - return ag.__edit.errMessage; | 418 | + return ag2.__edit.errMessage; |
419 | + } | ||
420 | + if (!ag3.__edit.validate(true)) { | ||
421 | + return ag3.__edit.errMessage; | ||
397 | } | 422 | } |
398 | 423 | ||
399 | var productStandardRelationStr = []; | 424 | var productStandardRelationStr = []; |
400 | if (ag.rows.length > 0) { | 425 | if (ag.rows.length > 0) { |
401 | for (var i in ag.rows) { | 426 | for (var i in ag.rows) { |
402 | if (ag.rows[i].val) { | 427 | if (ag.rows[i].val) { |
403 | - var arr = ag.rows[i].val.split('|'); | ||
404 | var idNameList = ag.rows[i].idNameList; | 428 | var idNameList = ag.rows[i].idNameList; |
405 | for (var x in idNameList) { | 429 | for (var x in idNameList) { |
406 | - for (var y in arr) { | ||
407 | - if (arr[y] == idNameList[x].id) { | 430 | + if (ag.rows[i].val == idNameList[x].id) { |
408 | productStandardRelationStr.push({ | 431 | productStandardRelationStr.push({ |
409 | standardId: ag.rows[i].attributeId, | 432 | standardId: ag.rows[i].attributeId, |
410 | standardVal: idNameList[x].text, | 433 | standardVal: idNameList[x].text, |
@@ -415,7 +438,6 @@ GOLABDATA.on("TYgoodsParams", function() { | @@ -415,7 +438,6 @@ GOLABDATA.on("TYgoodsParams", function() { | ||
415 | } | 438 | } |
416 | } | 439 | } |
417 | } | 440 | } |
418 | - } | ||
419 | data.productStandardRelationStr = JSON.stringify(productStandardRelationStr); | 441 | data.productStandardRelationStr = JSON.stringify(productStandardRelationStr); |
420 | 442 | ||
421 | var goodsParamArr = []; | 443 | var goodsParamArr = []; |
@@ -433,8 +455,14 @@ GOLABDATA.on("TYgoodsParams", function() { | @@ -433,8 +455,14 @@ GOLABDATA.on("TYgoodsParams", function() { | ||
433 | } | 455 | } |
434 | } | 456 | } |
435 | data.attributeProValuesOne = JSON.stringify(goodsParamArr); | 457 | data.attributeProValuesOne = JSON.stringify(goodsParamArr); |
458 | + | ||
459 | + data.productMaterial=""; | ||
460 | + if (ag3.rows.length > 0) { | ||
461 | + data.productMaterial=ag3.rows[0].val; | ||
462 | + } | ||
463 | + | ||
436 | data.productSkn = $('#productSkn').val(); | 464 | data.productSkn = $('#productSkn').val(); |
437 | - console.log(data); | 465 | + console.log("data",data); |
438 | return data; | 466 | return data; |
439 | 467 | ||
440 | }); | 468 | }); |
1 | -.edui-popup-emotion .edui-emotion-jd img{ | ||
2 | - background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top; | ||
3 | - cursor:pointer;width:35px;height:35px;display:block; | ||
4 | -} | ||
5 | -.edui-popup-emotion .edui-emotion-pp img{ | ||
6 | - background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top; | ||
7 | - cursor:pointer;width:25px;height:25px;display:block; | ||
8 | -} | ||
9 | - | ||
10 | -.edui-popup-emotion .edui-emotion-ldw img{ | ||
11 | - background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top; | ||
12 | - cursor:pointer;width:35px;height:35px;display:block; | ||
13 | -} | ||
14 | - | ||
15 | -.edui-popup-emotion .edui-emotion-tsj img{ | ||
16 | - background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top; | ||
17 | - cursor:pointer;width:35px;height:35px;display:block; | ||
18 | -} | ||
19 | - | ||
20 | -.edui-popup-emotion .edui-emotion-cat img{ | ||
21 | - background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top; | ||
22 | - cursor:pointer;width:35px;height:35px;display:block; | ||
23 | -} | ||
24 | - | ||
25 | -.edui-popup-emotion .edui-emotion-bb img{ | ||
26 | - background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top; | ||
27 | - cursor:pointer;width:35px;height:35px;display:block; | ||
28 | -} | ||
29 | - | ||
30 | -.edui-popup-emotion .edui-emotion-youa img{ | ||
31 | - background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top; | ||
32 | - cursor:pointer;width:35px;height:35px;display:block; | ||
33 | -} | ||
34 | - | ||
35 | -.edui-popup-emotion .edui-emotion-smileytable { | ||
36 | - width: 100%; | ||
37 | - border-spacing: 0; | ||
38 | - border-collapse: collapse; | ||
39 | - table-layout: fixed; | ||
40 | -} | ||
41 | - | ||
42 | -.edui-popup-emotion .edui-emotion-wrapper { | ||
43 | - padding: 15px; | ||
44 | -} | ||
45 | - | ||
46 | -.edui-popup-emotion .edui-tab-nav{ | ||
47 | - height: auto; | ||
48 | - *height: 31px; | ||
49 | -} | ||
50 | -.edui-popup-emotion .edui-emotion-tabs{ | ||
51 | - clear: both; | ||
52 | - width: 0; | ||
53 | - height: 0; | ||
54 | -} | ||
55 | - | ||
56 | -.edui-popup-emotion .edui-tab-content { | ||
57 | - padding: 15px 0; | ||
58 | -} | ||
59 | - | ||
60 | -.edui-popup-emotion .edui-emotion-preview-box { | ||
61 | - width:90px; | ||
62 | - height:76px; | ||
63 | - border:2px solid #9cb945; | ||
64 | - background:#FFFFFF; | ||
65 | - background-position:center; | ||
66 | - background-repeat:no-repeat; | ||
67 | - position: absolute; | ||
68 | - top: 67px; | ||
69 | - left: 494px; | ||
70 | - display: none; | ||
71 | -} | ||
72 | - | ||
73 | -.edui-popup-emotion .edui-tab-text { | ||
74 | - font-size: 12px; | ||
75 | -} | ||
76 | - | ||
77 | -.edui-popup-emotion .edui-emotion-preview-left { | ||
78 | - left: 15px; | ||
79 | -} | ||
80 | - | ||
81 | -.edui-popup-emotion .edui-emotion-preview-img { | ||
82 | - width: 100%; | ||
83 | - height: 100%; | ||
84 | - display: block; | ||
85 | - background-repeat: no-repeat; | ||
86 | - background-position: center center; | ||
87 | -} |
1 | -.edui-popup-formula .edui-formula-wrapper { | ||
2 | - padding: 15px; | ||
3 | -} | ||
4 | -.edui-popup-formula .edui-formula-wrapper .edui-tab-nav{ | ||
5 | - height: auto; | ||
6 | - *height: 31px; | ||
7 | -} | ||
8 | -.edui-popup-formula .edui-formula-wrapper .edui-tab-text { | ||
9 | - font-size: 12px; | ||
10 | -} | ||
11 | -.edui-popup-formula .edui-formula-wrapper .edui-formula-clearboth { | ||
12 | - clear: both; | ||
13 | - width: 0; | ||
14 | - height: 0; | ||
15 | -} | ||
16 | -.edui-popup-formula .edui-formula-wrapper .edui-tab-pane ul { | ||
17 | - margin: 0px; | ||
18 | - padding: 0px; | ||
19 | -} | ||
20 | -.edui-popup-formula .edui-formula-wrapper .edui-tab-content { | ||
21 | - padding: 5px 0px 0px 0px; | ||
22 | -} | ||
23 | -.edui-popup-formula .edui-formula-wrapper .edui-tab-pane .edui-formula-latex-item { | ||
24 | - display: block; | ||
25 | - float: left; | ||
26 | - margin: 0px 3px 3px 0px; | ||
27 | - width: 30px; | ||
28 | - height: 30px; | ||
29 | - border:1px solid #cccccc; | ||
30 | - background-image: url("images/formula.png"); | ||
31 | - cursor: pointer; | ||
32 | -} |
public/img/app-icon72x72@2x.png
deleted
100644 → 0
7.05 KB
public/img/examples/admin-chrome.png
deleted
100644 → 0
3.51 KB
3.94 KB
public/img/examples/admin-ie.png
deleted
100644 → 0
3.91 KB
public/img/examples/admin-opera.png
deleted
100644 → 0
3.66 KB
public/img/examples/admin-safari.png
deleted
100644 → 0
3.96 KB
public/img/examples/adminPage.png
deleted
100644 → 0
2.64 KB
public/img/examples/blogPage.png
deleted
100644 → 0
2.52 KB
public/img/examples/landing.png
deleted
100644 → 0
4.41 KB
public/img/examples/landingPage.png
deleted
100644 → 0
2.44 KB
public/img/examples/loginPage.png
deleted
100644 → 0
2.03 KB
public/img/examples/sidebarPage.png
deleted
100644 → 0
2.31 KB
public/img/excel.png
deleted
100644 → 0
2.87 KB
public/img/favicon.png
deleted
100644 → 0
1 KB
public/img/startup-640x1096.png
deleted
100644 → 0
9.37 KB
public/sea.js
deleted
100644 → 0
1 | -if (typeof seajs === 'undefined') { | ||
2 | -/* | ||
3 | - SeaJS - A Module Loader for the Web | ||
4 | - v2.3.0 | seajs.org | MIT Licensed | ||
5 | -*/ | ||
6 | -!function(a,b){function c(a){return function(b){return{}.toString.call(b)=="[object "+a+"]"}}function d(){return z++}function e(a){return a.match(C)[0]}function f(a){for(a=a.replace(D,"/"),a=a.replace(F,"$1/");a.match(E);)a=a.replace(E,"/");return a}function g(a){var b=a.length-1,c=a.charAt(b);return"#"===c?a.substring(0,b):".js"===a.substring(b-2)||a.indexOf("?")>0||"/"===c?a:a+".js"}function h(a){var b=u.alias;return b&&w(b[a])?b[a]:a}function i(a){var b=u.paths,c;return b&&(c=a.match(G))&&w(b[c[1]])&&(a=b[c[1]]+c[2]),a}function j(a){var b=u.vars;return b&&a.indexOf("{")>-1&&(a=a.replace(H,function(a,c){return w(b[c])?b[c]:a})),a}function k(a){var b=u.map,c=a;if(b)for(var d=0,e=b.length;e>d;d++){var f=b[d];if(c=y(f)?f(a)||a:a.replace(f[0],f[1]),c!==a)break}return c}function l(a,b){var c,d=a.charAt(0);if(I.test(a))c=a;else if("."===d)c=f((b?e(b):u.cwd)+a);else if("/"===d){var g=u.cwd.match(J);c=g?g[0]+a.substring(1):a}else c=u.base+a;return 0===c.indexOf("//")&&(c=location.protocol+c),c}function m(a,b){if(!a)return"";a=h(a),a=i(a),a=j(a),a=g(a);var c=l(a,b);return c=k(c)}function n(a){return a.hasAttribute?a.src:a.getAttribute("src",4)}function o(a,b,c){var d=K.createElement("script");if(c){var e=y(c)?c(a):c;e&&(d.charset=e)}p(d,b,a),d.async=!0,d.src=a,R=d,Q?P.insertBefore(d,Q):P.appendChild(d),R=null}function p(a,b,c){function d(){a.onload=a.onerror=a.onreadystatechange=null,u.debug||P.removeChild(a),a=null,b()}var e="onload"in a;e?(a.onload=d,a.onerror=function(){B("error",{uri:c,node:a}),d()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&d()}}function q(){if(R)return R;if(S&&"interactive"===S.readyState)return S;for(var a=P.getElementsByTagName("script"),b=a.length-1;b>=0;b--){var c=a[b];if("interactive"===c.readyState)return S=c}}function r(a){var b=[];return a.replace(U,"").replace(T,function(a,c,d){d&&b.push(d)}),b}function s(a,b){this.uri=a,this.dependencies=b||[],this.exports=null,this.status=0,this._waitings={},this._remain=0}if(!a.seajs){var t=a.seajs={version:"2.3.0"},u=t.data={},v=c("Object"),w=c("String"),x=Array.isArray||c("Array"),y=c("Function"),z=0,A=u.events={};t.on=function(a,b){var c=A[a]||(A[a]=[]);return c.push(b),t},t.off=function(a,b){if(!a&&!b)return A=u.events={},t;var c=A[a];if(c)if(b)for(var d=c.length-1;d>=0;d--)c[d]===b&&c.splice(d,1);else delete A[a];return t};var B=t.emit=function(a,b){var c=A[a],d;if(c){c=c.slice();for(var e=0,f=c.length;f>e;e++)c[e](b)}return t},C=/[^?#]*\//,D=/\/\.\//g,E=/\/[^/]+\/\.\.\//,F=/([^:/])\/+\//g,G=/^([^/:]+)(\/.+)$/,H=/{([^{]+)}/g,I=/^\/\/.|:\//,J=/^.*?\/\/.*?\//,K=document,L=location.href&&0!==location.href.indexOf("about:")?e(location.href):"",M=K.scripts,N=K.getElementById("seajsnode")||M[M.length-1],O=e(n(N)||L);t.resolve=m;var P=K.head||K.getElementsByTagName("head")[0]||K.documentElement,Q=P.getElementsByTagName("base")[0],R,S;t.request=o;var T=/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\/\*[\S\s]*?\*\/|\/(?:\\\/|[^\/\r\n])+\/(?=[^\/])|\/\/.*|\.\s*require|(?:^|[^$])\brequire\s*\(\s*(["'])(.+?)\1\s*\)/g,U=/\\\\/g,V=t.cache={},W,X={},Y={},Z={},$=s.STATUS={FETCHING:1,SAVED:2,LOADING:3,LOADED:4,EXECUTING:5,EXECUTED:6};s.prototype.resolve=function(){for(var a=this,b=a.dependencies,c=[],d=0,e=b.length;e>d;d++)c[d]=s.resolve(b[d],a.uri);return c},s.prototype.load=function(){var a=this;if(!(a.status>=$.LOADING)){a.status=$.LOADING;var c=a.resolve();B("load",c);for(var d=a._remain=c.length,e,f=0;d>f;f++)e=s.get(c[f]),e.status<$.LOADED?e._waitings[a.uri]=(e._waitings[a.uri]||0)+1:a._remain--;if(0===a._remain)return a.onload(),b;var g={};for(f=0;d>f;f++)e=V[c[f]],e.status<$.FETCHING?e.fetch(g):e.status===$.SAVED&&e.load();for(var h in g)g.hasOwnProperty(h)&&g[h]()}},s.prototype.onload=function(){var a=this;a.status=$.LOADED,a.callback&&a.callback();var b=a._waitings,c,d;for(c in b)b.hasOwnProperty(c)&&(d=V[c],d._remain-=b[c],0===d._remain&&d.onload());delete a._waitings,delete a._remain},s.prototype.fetch=function(a){function c(){t.request(g.requestUri,g.onRequest,g.charset)}function d(){delete X[h],Y[h]=!0,W&&(s.save(f,W),W=null);var a,b=Z[h];for(delete Z[h];a=b.shift();)a.load()}var e=this,f=e.uri;e.status=$.FETCHING;var g={uri:f};B("fetch",g);var h=g.requestUri||f;return!h||Y[h]?(e.load(),b):X[h]?(Z[h].push(e),b):(X[h]=!0,Z[h]=[e],B("request",g={uri:f,requestUri:h,onRequest:d,charset:u.charset}),g.requested||(a?a[g.requestUri]=c:c()),b)},s.prototype.exec=function(){function a(b){return s.get(a.resolve(b)).exec()}var c=this;if(c.status>=$.EXECUTING)return c.exports;c.status=$.EXECUTING;var e=c.uri;a.resolve=function(a){return s.resolve(a,e)},a.async=function(b,c){return s.use(b,c,e+"_async_"+d()),a};var f=c.factory,g=y(f)?f(a,c.exports={},c):f;return g===b&&(g=c.exports),delete c.factory,c.exports=g,c.status=$.EXECUTED,B("exec",c),g},s.resolve=function(a,b){var c={id:a,refUri:b};return B("resolve",c),c.uri||t.resolve(c.id,b)},s.define=function(a,c,d){var e=arguments.length;1===e?(d=a,a=b):2===e&&(d=c,x(a)?(c=a,a=b):c=b),!x(c)&&y(d)&&(c=r(""+d));var f={id:a,uri:s.resolve(a),deps:c,factory:d};if(!f.uri&&K.attachEvent){var g=q();g&&(f.uri=g.src)}B("define",f),f.uri?s.save(f.uri,f):W=f},s.save=function(a,b){var c=s.get(a);c.status<$.SAVED&&(c.id=b.id||a,c.dependencies=b.deps||[],c.factory=b.factory,c.status=$.SAVED,B("save",c))},s.get=function(a,b){return V[a]||(V[a]=new s(a,b))},s.use=function(b,c,d){var e=s.get(d,x(b)?b:[b]);e.callback=function(){for(var b=[],d=e.resolve(),f=0,g=d.length;g>f;f++)b[f]=V[d[f]].exec();c&&c.apply(a,b),delete e.callback},e.load()},t.use=function(a,b){return s.use(a,b,u.cwd+"_use_"+d()),t},s.define.cmd={},a.define=s.define,t.Module=s,u.fetchedList=Y,u.cid=d,t.require=function(a){var b=s.get(s.resolve(a));return b.status<$.EXECUTING&&(b.onload(),b.exec()),b.exports},u.base=O,u.dir=O,u.cwd=L,u.charset="utf-8",t.config=function(a){for(var b in a){var c=a[b],d=u[b];if(d&&v(d))for(var e in c)d[e]=c[e];else x(d)?c=d.concat(c):"base"===b&&("/"!==c.slice(-1)&&(c+="/"),c=l(c)),u[b]=c}return B("config",a),t}}}(this); | ||
7 | - | ||
8 | -/*! Seajs-css 1.0.4 */ | ||
9 | -!function(){function a(a){return function(b){return{}.toString.call(b)=="[object "+a+"]"}}function b(a){return"[object Function]"=={}.toString.call(a)}function c(a,c,e){var f=u.test(a),g=r.createElement(f?"link":"script");if(e){var h=b(e)?e(a):e;h&&(g.charset=h)}d(g,c,f,a),f?(g.rel="stylesheet",g.href=a):(g.async=!0,g.src=a),p=g,t?s.insertBefore(g,t):s.appendChild(g),p=null}function d(a,b,c,d){function f(){a.onload=a.onerror=a.onreadystatechange=null,c||seajs.data.debug||s.removeChild(a),a=null,b()}var g="onload"in a;return!c||!v&&g?(g?(a.onload=f,a.onerror=function(){seajs.emit("error",{uri:d,node:a}),f()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&f()},void 0):(setTimeout(function(){e(a,b)},1),void 0)}function e(a,b){var c,d=a.sheet;if(v)d&&(c=!0);else if(d)try{d.cssRules&&(c=!0)}catch(f){"NS_ERROR_DOM_SECURITY_ERR"===f.name&&(c=!0)}setTimeout(function(){c?b():e(a,b)},20)}function f(a){return a.match(x)[0]}function g(a){for(a=a.replace(y,"/"),a=a.replace(A,"$1/");a.match(z);)a=a.replace(z,"/");return a}function h(a){var b=a.length-1,c=a.charAt(b);return"#"===c?a.substring(0,b):".js"===a.substring(b-2)||a.indexOf("?")>0||".css"===a.substring(b-3)||"/"===c?a:a+".js"}function i(a){var b=w.alias;return b&&q(b[a])?b[a]:a}function j(a){var b,c=w.paths;return c&&(b=a.match(B))&&q(c[b[1]])&&(a=c[b[1]]+b[2]),a}function k(a){var b=w.vars;return b&&a.indexOf("{")>-1&&(a=a.replace(C,function(a,c){return q(b[c])?b[c]:a})),a}function l(a){var c=w.map,d=a;if(c)for(var e=0,f=c.length;f>e;e++){var g=c[e];if(d=b(g)?g(a)||a:a.replace(g[0],g[1]),d!==a)break}return d}function m(a,b){var c,d=a.charAt(0);if(D.test(a))c=a;else if("."===d)c=g((b?f(b):w.cwd)+a);else if("/"===d){var e=w.cwd.match(E);c=e?e[0]+a.substring(1):a}else c=w.base+a;return 0===c.indexOf("//")&&(c=location.protocol+c),c}function n(a,b){if(!a)return"";a=i(a),a=j(a),a=k(a),a=h(a);var c=m(a,b);return c=l(c)}function o(a){return a.hasAttribute?a.src:a.getAttribute("src",4)}var p,q=a("String"),r=document,s=r.head||r.getElementsByTagName("head")[0]||r.documentElement,t=s.getElementsByTagName("base")[0],u=/\.css(?:\?|$)/i,v=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;seajs.request=c;var w=seajs.data,x=/[^?#]*\//,y=/\/\.\//g,z=/\/[^/]+\/\.\.\//,A=/([^:/])\/+\//g,B=/^([^/:]+)(\/.+)$/,C=/{([^{]+)}/g,D=/^\/\/.|:\//,E=/^.*?\/\/.*?\//,r=document,F=location.href&&0!==location.href.indexOf("about:")?f(location.href):"",G=r.scripts,H=r.getElementById("seajsnode")||G[G.length-1];f(o(H)||F),seajs.resolve=n,define("seajs/seajs-css/1.0.4/seajs-css",[],{})}(); | ||
10 | -} | ||
11 | - | ||
12 | -if (typeof g_spm_init === 'undefined') { | ||
13 | -(function() { | ||
14 | - var cache = []; | ||
15 | - var timer = null; | ||
16 | - g_spm_init = function(entry) { | ||
17 | - cache.push(entry); | ||
18 | - timer && clearTimeout(timer); | ||
19 | - timer = setTimeout(init, 100); | ||
20 | - }; | ||
21 | - function init() { | ||
22 | - var entry = cache.shift(); | ||
23 | - if (entry) { | ||
24 | - seajs.use(entry, init); | ||
25 | - } | ||
26 | - } | ||
27 | -})(); | ||
28 | -} |
@@ -17,13 +17,13 @@ var config = { | @@ -17,13 +17,13 @@ var config = { | ||
17 | // domain:'http://172.16.6.240:8088/platform',// 王书生 | 17 | // domain:'http://172.16.6.240:8088/platform',// 王书生 |
18 | // domain: 'http://172.16.6.124:8088/platform',//陈超 | 18 | // domain: 'http://172.16.6.124:8088/platform',//陈超 |
19 | //http://172.16.6.124:8088/platform/product/queryAllProductAttr | 19 | //http://172.16.6.124:8088/platform/product/queryAllProductAttr |
20 | - //domain: 'http://172.16.6.227:8088/platform', //玛丽 | 20 | + // domain: 'http://172.16.6.227:8088/platform', //玛丽 |
21 | // domain: 'http://192.168.102.202:8088/platform', | 21 | // domain: 'http://192.168.102.202:8088/platform', |
22 | //domain:'http://172.16.6.197:8080/yohobuy-platform-web',//葛超 | 22 | //domain:'http://172.16.6.197:8080/yohobuy-platform-web',//葛超 |
23 | - domain: 'http://192.168.102.202:8088/platform', | ||
24 | // domain: 'http://192.168.102.202:8088/platform', | 23 | // domain: 'http://192.168.102.202:8088/platform', |
25 | - //domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超 | ||
26 | // domain: 'http://192.168.102.202:8088/platform', | 24 | // domain: 'http://192.168.102.202:8088/platform', |
25 | + //domain:'http://172.16.9.8:8080/yohobuy-platform-web',//葛超 | ||
26 | + domain: 'http://192.168.102.202:8088/platform', | ||
27 | //domain: 'http://172.16.6.239:8080', //孙杰翔 | 27 | //domain: 'http://172.16.6.239:8080', //孙杰翔 |
28 | loggers: { | 28 | loggers: { |
29 | api: { | 29 | api: { |
@@ -166,7 +166,8 @@ exports.res = [{ //基础商品列表 | @@ -166,7 +166,8 @@ exports.res = [{ //基础商品列表 | ||
166 | url: '/productColor/queryProductColors', | 166 | url: '/productColor/queryProductColors', |
167 | data: { | 167 | data: { |
168 | pageTitle: "创建基础商品", | 168 | pageTitle: "创建基础商品", |
169 | - action: "/base/goods/ajax/add" | 169 | + action: "/base/goods/ajax/add", |
170 | + btnText:"提交审核" | ||
170 | }, | 171 | }, |
171 | src: '/basegoods/edit' | 172 | src: '/basegoods/edit' |
172 | }, { //添加接口 | 173 | }, { //添加接口 |
@@ -265,7 +266,8 @@ exports.res = [{ //基础商品列表 | @@ -265,7 +266,8 @@ exports.res = [{ //基础商品列表 | ||
265 | src: '/basegoods/edit', | 266 | src: '/basegoods/edit', |
266 | data: { | 267 | data: { |
267 | pageTitle: "修改基础商品", | 268 | pageTitle: "修改基础商品", |
268 | - action: "/base/goods/ajax/update" | 269 | + action: "/base/goods/ajax/update", |
270 | + btnText:"保存" | ||
269 | } | 271 | } |
270 | }, { //删除 | 272 | }, { //删除 |
271 | route: '/base/goods/ajax/delete', | 273 | route: '/base/goods/ajax/delete', |
@@ -493,6 +495,15 @@ exports.res = [{ //基础商品列表 | @@ -493,6 +495,15 @@ exports.res = [{ //基础商品列表 | ||
493 | } | 495 | } |
494 | ] | 496 | ] |
495 | }, { | 497 | }, { |
498 | + route: '/base/goods/queryMaterialList', | ||
499 | + method: 'POST', | ||
500 | + url: '/product/queryMaterialList', | ||
501 | + params: [{ | ||
502 | + name: 'categoryId', | ||
503 | + type: 'Number' | ||
504 | + } | ||
505 | + ] | ||
506 | + },{ | ||
496 | route: '/goods/query/querySortBySmallSort', | 507 | route: '/goods/query/querySortBySmallSort', |
497 | method: 'POST', | 508 | method: 'POST', |
498 | url: '/product/querySortBySmallSort', | 509 | url: '/product/querySortBySmallSort', |
@@ -334,6 +334,9 @@ exports.res = [{ | @@ -334,6 +334,9 @@ exports.res = [{ | ||
334 | }, { | 334 | }, { |
335 | name: 'productStandardRelationStr', | 335 | name: 'productStandardRelationStr', |
336 | type: 'string' | 336 | type: 'string' |
337 | + },{ | ||
338 | + name: 'productMaterial', | ||
339 | + type: 'string' | ||
337 | }] | 340 | }] |
338 | }, { | 341 | }, { |
339 | //网销信息 -> 保存基本信息接口 | 342 | //网销信息 -> 保存基本信息接口 |
@@ -701,6 +704,193 @@ exports.res = [{ | @@ -701,6 +704,193 @@ exports.res = [{ | ||
701 | name: 'brandId', | 704 | name: 'brandId', |
702 | type: 'Number' | 705 | type: 'Number' |
703 | }] | 706 | }] |
707 | + }, | ||
708 | + //***********************************陶雨******************************* | ||
709 | + { | ||
710 | + //保存搜索顺序 | ||
711 | + route: '/netSale/saveSearchSort', | ||
712 | + method: 'POST', | ||
713 | + url: '/product/saveSearchSort', | ||
714 | + params: [{ | ||
715 | + name: 'searchSortList', | ||
716 | + type: 'string' | ||
717 | + }] | ||
718 | +}, { | ||
719 | + //查找热搜词 | ||
720 | + route: '/netSale/queryHotSearchTerms', | ||
721 | + method: 'POST', | ||
722 | + url: '/searchWords/queryHotSearchTerms', | ||
723 | + params: [{ | ||
724 | + name: 'page', | ||
725 | + type: 'number' | ||
726 | + }, { | ||
727 | + name: 'size', | ||
728 | + type: 'number', | ||
729 | + def: 10 | ||
730 | + }] | ||
731 | +}, { | ||
732 | + //查找洗涤提示 | ||
733 | + route: '/netSale/getAll4Select', | ||
734 | + method: 'POST', | ||
735 | + url: '/washTips/getAll4Select/', | ||
736 | + params: [] | ||
737 | +}, { | ||
738 | + //查找材质参数 | ||
739 | + route: '/netSale/queryAllBySortId4Select', | ||
740 | + method: 'POST', | ||
741 | + url: '/productMaterial/queryAllBySortId4Select', | ||
742 | + params: [{ | ||
743 | + name: 'param', | ||
744 | + type: 'number' | ||
745 | + }] | ||
746 | +}, { | ||
747 | + //查找所有商品参数信息 //暂时没用 | ||
748 | + route: '/netSale/queryAllGoodsParams', | ||
749 | + method: 'POST', | ||
750 | + apis: { | ||
751 | + washTipsList: { | ||
752 | + url: '/washTips/getAll4Select/' | ||
753 | + }, | ||
754 | + materialList: { | ||
755 | + url: 'productMaterial/queryAllBySortId4Select', | ||
756 | + params: [{ | ||
757 | + name: 'param', | ||
758 | + type: 'number' | ||
759 | + }], | ||
760 | + isJsonRaw: true | ||
704 | } | 761 | } |
762 | + } | ||
763 | +}, { | ||
764 | + //保存搜索关键词 | ||
765 | + route: '/netSale/saveNetSaleSearchKeys', | ||
766 | + method: 'POST', | ||
767 | + url: '/product/saveNetSaleSearchKeys', | ||
768 | + params: [{ | ||
769 | + name: 'productSkn', | ||
770 | + type: 'number' | ||
771 | + }, { | ||
772 | + name: 'searchKeys', | ||
773 | + type: 'string' | ||
774 | + }] | ||
775 | +}, { | ||
776 | + //保存商品参数 | ||
777 | + route: '/netSale/saveProductParam', | ||
778 | + method: 'POST', | ||
779 | + url: '/product/saveProductParam', | ||
780 | + params: [{ | ||
781 | + name: 'productSkn', | ||
782 | + type: 'number' | ||
783 | + }, { | ||
784 | + name: 'attributeProValuesOne', | ||
785 | + type: 'string' | ||
786 | + }, { | ||
787 | + name: 'productStandardRelationStr', | ||
788 | + type: 'string' | ||
789 | + },{ | ||
790 | + name: 'productMaterial', | ||
791 | + type: 'string' | ||
792 | + }] | ||
793 | +}, | ||
794 | +//************************************weiqingting********************** | ||
795 | +//商品描述 | ||
796 | + { | ||
797 | + route: '/netSale/saveProductDesc', | ||
798 | + method: 'POST', | ||
799 | + url: '/product/saveProductDesc', | ||
800 | + params: [{ | ||
801 | + name: 'productSkn', | ||
802 | + type: 'Number' | ||
803 | + }, { | ||
804 | + name: 'productDesc', | ||
805 | + type: 'String' | ||
806 | + }] | ||
807 | + }, | ||
808 | + //小编推荐 | ||
809 | + { | ||
810 | + route: '/netSale/saveNetSaleRecommend', | ||
811 | + method: 'POST', | ||
812 | + url: '/product/saveNetSaleRecommend', | ||
813 | + params: [{ | ||
814 | + name: 'productSkn', | ||
815 | + type: 'Number' | ||
816 | + }, { | ||
817 | + name: 'recommend', | ||
818 | + type: 'String' | ||
819 | + }] | ||
820 | + }, | ||
705 | 821 | ||
822 | + { //查询搭配列表 | ||
823 | + route: "/netSale/selectCollocationListBySkn", | ||
824 | + method: 'POST', | ||
825 | + url: '/collocation/selectCollocationListBySkn', | ||
826 | + params: [{ | ||
827 | + name: 'productSkn', | ||
828 | + type: 'Number' | ||
829 | + }, { | ||
830 | + name: 'page', | ||
831 | + type: 'Number' | ||
832 | + }, { | ||
833 | + name: 'size', | ||
834 | + type: 'Number' | ||
835 | + }] | ||
836 | + }, { //获取单个商品搭配信息 | ||
837 | + route: '/netSale/selectCollocationById', | ||
838 | + method: 'POST', | ||
839 | + url: '/collocation/selectCollocationById', | ||
840 | + params: [{ | ||
841 | + name: 'param', | ||
842 | + type: 'Number' | ||
843 | + }] | ||
844 | + }, { //添加单个搭配 | ||
845 | + route: '/netSale/insertCollocation', | ||
846 | + method: 'POST', | ||
847 | + url: '/collocation/insertCollocation', | ||
848 | + params: [{ | ||
849 | + name: 'productSkn', | ||
850 | + type: 'Number' | ||
851 | + }, { | ||
852 | + name: 'imageUrl', | ||
853 | + type: 'String' | ||
854 | + }, { | ||
855 | + name: 'content', | ||
856 | + type: 'String' | ||
857 | + }, { | ||
858 | + name: 'infoStr', | ||
859 | + type: 'String' | ||
860 | + }] | ||
861 | + }, { //更新单个搭配 | ||
862 | + route: '/netSale/updateCollocation', | ||
863 | + method: 'POST', | ||
864 | + url: '/collocation/updateCollocation', | ||
865 | + params: [{ | ||
866 | + name: 'id', | ||
867 | + type: 'Number' | ||
868 | + }, { | ||
869 | + name: 'imageUrl', | ||
870 | + type: 'String' | ||
871 | + }, { | ||
872 | + name: 'content', | ||
873 | + type: 'String' | ||
874 | + }, { | ||
875 | + name: 'infoStr', | ||
876 | + type: 'String' | ||
877 | + }] | ||
878 | + }, { //删除单个搭配 | ||
879 | + route: '/netSale/delCollocationById', | ||
880 | + method: 'POST', | ||
881 | + url: '/collocation/delCollocationById', | ||
882 | + params: [{ | ||
883 | + name: 'param', | ||
884 | + type: 'Number' | ||
885 | + }] | ||
886 | + }, { //单独维护封面信息 | ||
887 | + //http://172.16.6.227:8083/yohobuy-platform-web/product/manageProductImg | ||
888 | + route: '/netSale/manageProductImg', | ||
889 | + method: 'POST', | ||
890 | + url: '/product/manageProductImg', | ||
891 | + params: [{ | ||
892 | + name: 'goodsImagesReq', | ||
893 | + type: 'string' | ||
894 | + }] | ||
895 | + } | ||
706 | ]; | 896 | ]; |
server/interface/netSaleTy.js
deleted
100644 → 0
1 | -exports.domain = require('../config/common.js').domain; | ||
2 | -//exports.domain = "http://172.16.6.227:8088/platform/"; | ||
3 | -//exports.domain = 'http://172.16.6.227:8088/platform'; //马力 | ||
4 | - | ||
5 | -exports.res = [{ | ||
6 | - //保存搜索顺序 | ||
7 | - route: '/netSale/saveSearchSort', | ||
8 | - method: 'POST', | ||
9 | - url: '/product/saveSearchSort', | ||
10 | - params: [{ | ||
11 | - name: 'searchSortList', | ||
12 | - type: 'string' | ||
13 | - }] | ||
14 | -}, { | ||
15 | - //查找热搜词 | ||
16 | - route: '/netSale/queryHotSearchTerms', | ||
17 | - method: 'POST', | ||
18 | - url: '/searchWords/queryHotSearchTerms', | ||
19 | - params: [{ | ||
20 | - name: 'page', | ||
21 | - type: 'number' | ||
22 | - }, { | ||
23 | - name: 'size', | ||
24 | - type: 'number', | ||
25 | - def: 10 | ||
26 | - }] | ||
27 | -}, { | ||
28 | - //查找洗涤提示 | ||
29 | - route: '/netSale/getAll4Select', | ||
30 | - method: 'POST', | ||
31 | - url: '/washTips/getAll4Select/', | ||
32 | - params: [] | ||
33 | -}, { | ||
34 | - //查找材质参数 | ||
35 | - route: '/netSale/queryAllBySortId4Select', | ||
36 | - method: 'POST', | ||
37 | - url: '/productMaterial/queryAllBySortId4Select', | ||
38 | - params: [{ | ||
39 | - name: 'param', | ||
40 | - type: 'number' | ||
41 | - }] | ||
42 | -}, { | ||
43 | - //查找所有商品参数信息 //暂时没用 | ||
44 | - route: '/netSale/queryAllGoodsParams', | ||
45 | - method: 'POST', | ||
46 | - apis: { | ||
47 | - washTipsList: { | ||
48 | - url: '/washTips/getAll4Select/' | ||
49 | - }, | ||
50 | - materialList: { | ||
51 | - url: 'productMaterial/queryAllBySortId4Select', | ||
52 | - params: [{ | ||
53 | - name: 'param', | ||
54 | - type: 'number' | ||
55 | - }], | ||
56 | - isJsonRaw: true | ||
57 | - } | ||
58 | - } | ||
59 | -}, { | ||
60 | - //保存搜索关键词 | ||
61 | - route: '/netSale/saveNetSaleSearchKeys', | ||
62 | - method: 'POST', | ||
63 | - url: '/product/saveNetSaleSearchKeys', | ||
64 | - params: [{ | ||
65 | - name: 'productSkn', | ||
66 | - type: 'number' | ||
67 | - }, { | ||
68 | - name: 'searchKeys', | ||
69 | - type: 'string' | ||
70 | - }] | ||
71 | -}, { | ||
72 | - //保存商品参数 | ||
73 | - route: '/netSale/saveProductParam', | ||
74 | - method: 'POST', | ||
75 | - url: '/product/saveProductParam', | ||
76 | - params: [{ | ||
77 | - name: 'productSkn', | ||
78 | - type: 'number' | ||
79 | - }, { | ||
80 | - name: 'attributeProValuesOne', | ||
81 | - type: 'string' | ||
82 | - }, { | ||
83 | - name: 'productStandardRelationStr', | ||
84 | - type: 'string' | ||
85 | - }] | ||
86 | -}]; |
server/interface/netSaleWq.js
deleted
100644 → 0
1 | -exports.domain = require('../config/common.js').domain; | ||
2 | -//exports.domain = 'http://172.16.6.227:8083/yohobuy-platform-web'; | ||
3 | -exports.res = [ | ||
4 | - //商品描述 | ||
5 | - { | ||
6 | - route: '/netSale/saveProductDesc', | ||
7 | - method: 'POST', | ||
8 | - url: '/product/saveProductDesc', | ||
9 | - params: [{ | ||
10 | - name: 'productSkn', | ||
11 | - type: 'Number' | ||
12 | - }, { | ||
13 | - name: 'productDesc', | ||
14 | - type: 'String' | ||
15 | - }] | ||
16 | - }, | ||
17 | - //小编推荐 | ||
18 | - { | ||
19 | - route: '/netSale/saveNetSaleRecommend', | ||
20 | - method: 'POST', | ||
21 | - url: '/product/saveNetSaleRecommend', | ||
22 | - params: [{ | ||
23 | - name: 'productSkn', | ||
24 | - type: 'Number' | ||
25 | - }, { | ||
26 | - name: 'recommend', | ||
27 | - type: 'String' | ||
28 | - }] | ||
29 | - }, | ||
30 | - | ||
31 | - { //查询搭配列表 | ||
32 | - route: "/netSale/selectCollocationListBySkn", | ||
33 | - method: 'POST', | ||
34 | - url: '/collocation/selectCollocationListBySkn', | ||
35 | - params: [{ | ||
36 | - name: 'productSkn', | ||
37 | - type: 'Number' | ||
38 | - }, { | ||
39 | - name: 'page', | ||
40 | - type: 'Number' | ||
41 | - }, { | ||
42 | - name: 'size', | ||
43 | - type: 'Number' | ||
44 | - }] | ||
45 | - }, { //获取单个商品搭配信息 | ||
46 | - route: '/netSale/selectCollocationById', | ||
47 | - method: 'POST', | ||
48 | - url: '/collocation/selectCollocationById', | ||
49 | - params: [{ | ||
50 | - name: 'param', | ||
51 | - type: 'Number' | ||
52 | - }] | ||
53 | - }, { //添加单个搭配 | ||
54 | - route: '/netSale/insertCollocation', | ||
55 | - method: 'POST', | ||
56 | - url: '/collocation/insertCollocation', | ||
57 | - params: [{ | ||
58 | - name: 'productSkn', | ||
59 | - type: 'Number' | ||
60 | - }, { | ||
61 | - name: 'imageUrl', | ||
62 | - type: 'String' | ||
63 | - }, { | ||
64 | - name: 'content', | ||
65 | - type: 'String' | ||
66 | - }, { | ||
67 | - name: 'infoStr', | ||
68 | - type: 'String' | ||
69 | - }] | ||
70 | - }, { //更新单个搭配 | ||
71 | - route: '/netSale/updateCollocation', | ||
72 | - method: 'POST', | ||
73 | - url: '/collocation/updateCollocation', | ||
74 | - params: [{ | ||
75 | - name: 'id', | ||
76 | - type: 'Number' | ||
77 | - }, { | ||
78 | - name: 'imageUrl', | ||
79 | - type: 'String' | ||
80 | - }, { | ||
81 | - name: 'content', | ||
82 | - type: 'String' | ||
83 | - }, { | ||
84 | - name: 'infoStr', | ||
85 | - type: 'String' | ||
86 | - }] | ||
87 | - }, { //删除单个搭配 | ||
88 | - route: '/netSale/delCollocationById', | ||
89 | - method: 'POST', | ||
90 | - url: '/collocation/delCollocationById', | ||
91 | - params: [{ | ||
92 | - name: 'param', | ||
93 | - type: 'Number' | ||
94 | - }] | ||
95 | - }, { //单独维护封面信息 | ||
96 | - //http://172.16.6.227:8083/yohobuy-platform-web/product/manageProductImg | ||
97 | - route: '/netSale/manageProductImg', | ||
98 | - method: 'POST', | ||
99 | - url: '/product/manageProductImg', | ||
100 | - params: [{ | ||
101 | - name: 'goodsImagesReq', | ||
102 | - type: 'string' | ||
103 | - }] | ||
104 | - } | ||
105 | -]; |
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | <div class="row"> | 64 | <div class="row"> |
65 | <div class="col-sm-8 col-sm-offset-2"> | 65 | <div class="col-sm-8 col-sm-offset-2"> |
66 | <a class="btn btn-default" href="/supplier/baseproduct/index">取消</a> | 66 | <a class="btn btn-default" href="/supplier/baseproduct/index">取消</a> |
67 | - <button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">保存</button> | 67 | + <button type="submit" class="btn btn-success mr5" data-loading-text="保存中..." id="btnReview">{{btnText}}</button> |
68 | </div> | 68 | </div> |
69 | </div> | 69 | </div> |
70 | </div> | 70 | </div> |
@@ -6,10 +6,15 @@ | @@ -6,10 +6,15 @@ | ||
6 | </div> | 6 | </div> |
7 | <h2 class="panel-title">商品参数</h2> | 7 | <h2 class="panel-title">商品参数</h2> |
8 | </div> | 8 | </div> |
9 | + <div class="panel-body"> | ||
10 | + <div id="attributeTable" class="panel-body nopadding"> | ||
11 | + </div> | ||
9 | <div id="goodsParamWrap" class="panel-body nopadding"> | 12 | <div id="goodsParamWrap" class="panel-body nopadding"> |
10 | </div> | 13 | </div> |
11 | - <div id="attributeTable" class="panel-body nopadding"> | 14 | + <div id="goodsParamWrap2" class="panel-body nopadding"> |
12 | </div> | 15 | </div> |
16 | + </div> | ||
17 | + | ||
13 | <div class="panel-footer" id="goodsParams-footer"> | 18 | <div class="panel-footer" id="goodsParams-footer"> |
14 | <a href="javascript:;" class="btn btn-primary" id="propertySave">保存</a> | 19 | <a href="javascript:;" class="btn btn-primary" id="propertySave">保存</a> |
15 | </div> | 20 | </div> |
@@ -67,17 +72,17 @@ | @@ -67,17 +72,17 @@ | ||
67 | [[if inputType=='checkbox']] | 72 | [[if inputType=='checkbox']] |
68 | [[each idNameList as item index ]] | 73 | [[each idNameList as item index ]] |
69 | <label class="radio-inline"> | 74 | <label class="radio-inline"> |
70 | - <input type="checkbox" name="attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label> | 75 | + <input type="checkbox" name="[[__name]]_attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label> |
71 | [[/each]] | 76 | [[/each]] |
72 | - <input type="hidden" id="attr_[[__index]]" value="[[__val||'']]" [[required]] for="checkbox" placeholder="[[attributeName]]"/> | 77 | + <input type="hidden" id="[[__name]]_attr_[[__index]]" value="[[__val||'']]" [[required]] for="checkbox" placeholder="[[attributeName]]"/> |
73 | [[/if]] | 78 | [[/if]] |
74 | 79 | ||
75 | [[if inputType=='radio']] | 80 | [[if inputType=='radio']] |
76 | [[each idNameList as item index ]] | 81 | [[each idNameList as item index ]] |
77 | <label class="radio-inline"> | 82 | <label class="radio-inline"> |
78 | - <input type="radio" name="attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.id]]">[[item.text]]</label> | 83 | + <input type="radio" name="[[__name]]_attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.id]]">[[item.text]]</label> |
79 | [[/each]] | 84 | [[/each]] |
80 | -<input type="hidden" id="attr_[[__index]]" data-index='[[__index]]' value="[[__val||'']]" [[required]] for="radio" placeholder="[[attributeName]]" /> | 85 | +<input type="hidden" id="[[__name]]_attr_[[__index]]" data-index='[[__index]]' value="[[__val||'']]" [[required]] for="radio" placeholder="[[attributeName]]" /> |
81 | [[/if]] | 86 | [[/if]] |
82 | 87 | ||
83 | [[if inputType=='select']] | 88 | [[if inputType=='select']] |
-
Please register or login to post a comment