Merge branch 'test6.8.7' of http://git.yoho.cn/platform/platform-cms into test6.8.7
Showing
2 changed files
with
110 additions
and
38 deletions
@@ -50,7 +50,10 @@ | @@ -50,7 +50,10 @@ | ||
50 | <td > | 50 | <td > |
51 | <div style="float: left;width:600px;" > | 51 | <div style="float: left;width:600px;" > |
52 | <span style="color:red">*</span><label>选择用户</label> <br> | 52 | <span style="color:red">*</span><label>选择用户</label> <br> |
53 | - <input id="articleUid" name="authorUid" style="width:100% " class="easyui-textbox" /> <br> | 53 | + <input id="articleUid" name="authorUid" style="width:100% " class="easyui-textbox" /> |
54 | + <a id="userBotton" class="btn btn-small" style="font-size: 18px; " >确认</a> | ||
55 | + | ||
56 | + <br> | ||
54 | <span style="color:red"> 必填项,选择某个用户身份后,才能发布</span> | 57 | <span style="color:red"> 必填项,选择某个用户身份后,才能发布</span> |
55 | </div> | 58 | </div> |
56 | <div id="userInfo" style="float: left;margin-left: 30px;"> | 59 | <div id="userInfo" style="float: left;margin-left: 30px;"> |
@@ -179,26 +182,24 @@ | @@ -179,26 +182,24 @@ | ||
179 | } | 182 | } |
180 | }); | 183 | }); |
181 | 184 | ||
182 | - $("#articleUid").textbox({ | ||
183 | - required: true, | ||
184 | - missingMessage: "发布用户不能为空", | ||
185 | - prompt: "请输入发布用户", | ||
186 | - onChange: function () { | 185 | + $("#userBotton").linkbutton({ |
186 | + iconCls : "icon-search", | ||
187 | + onClick : function() { | ||
187 | //发送请求 | 188 | //发送请求 |
188 | $.ajax({ | 189 | $.ajax({ |
189 | type: "POST", | 190 | type: "POST", |
190 | url: serverContextPath + "/grassArticle/getUserInfo", //提交到后端的url | 191 | url: serverContextPath + "/grassArticle/getUserInfo", //提交到后端的url |
191 | dataType: 'json', | 192 | dataType: 'json', |
192 | data:{ | 193 | data:{ |
193 | - uid : $(this).textbox("getValue") | 194 | + uid : $("#articleUid").textbox("getValue") |
194 | }, | 195 | }, |
195 | success: function (result) { | 196 | success: function (result) { |
196 | if(result.code == 200) { | 197 | if(result.code == 200) { |
197 | if(result.data !=null && result.data !=''){ | 198 | if(result.data !=null && result.data !=''){ |
198 | var headIco = result.data.headIco.substring(0, result.data.headIco.indexOf("?")); | 199 | var headIco = result.data.headIco.substring(0, result.data.headIco.indexOf("?")); |
199 | var html = ''; | 200 | var html = ''; |
200 | - html += "<span style='font-size: 18px;'>头像:  <img src='"+headIco+"' width='80px;' height='80px;'></span>    "; | ||
201 | - html += "<span style='font-size: 18px;'>昵称:  <label>"+result.data.nickName+"</label></span>"; | 201 | + html += "<span style='font-size: 18px;'>  <img src='"+headIco+"' width='80px;' height='80px;'></span>    "; |
202 | + html += "<span style='font-size: 18px;'>  <label>"+result.data.nickName+"</label></span>"; | ||
202 | $("#userInfo").html(html); | 203 | $("#userInfo").html(html); |
203 | }else{ | 204 | }else{ |
204 | var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请检查uid输入是否正确</span>'; | 205 | var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请检查uid输入是否正确</span>'; |
@@ -215,6 +216,42 @@ | @@ -215,6 +216,42 @@ | ||
215 | } | 216 | } |
216 | }); | 217 | }); |
217 | 218 | ||
219 | + $("#articleUid").textbox({ | ||
220 | + required: true, | ||
221 | + missingMessage: "发布用户不能为空", | ||
222 | + prompt: "请输入发布用户", | ||
223 | + onChange: function () { | ||
224 | + //发送请求 | ||
225 | + // $.ajax({ | ||
226 | + // type: "POST", | ||
227 | + // url: serverContextPath + "/grassArticle/getUserInfo", //提交到后端的url | ||
228 | + // dataType: 'json', | ||
229 | + // data:{ | ||
230 | + // uid : $(this).textbox("getValue") | ||
231 | + // }, | ||
232 | + // success: function (result) { | ||
233 | + // if(result.code == 200) { | ||
234 | + // if(result.data !=null && result.data !=''){ | ||
235 | + // var headIco = result.data.headIco.substring(0, result.data.headIco.indexOf("?")); | ||
236 | + // var html = ''; | ||
237 | + // html += "<span style='font-size: 18px;'>  <img src='"+headIco+"' width='80px;' height='80px;'></span>    "; | ||
238 | + // html += "<span style='font-size: 18px;'>  <label>"+result.data.nickName+"</label></span>"; | ||
239 | + // $("#userInfo").html(html); | ||
240 | + // }else{ | ||
241 | + // var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请检查uid输入是否正确</span>'; | ||
242 | + // $("#userInfo").html(html); | ||
243 | + // } | ||
244 | + // } | ||
245 | + // else { | ||
246 | + // var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请稍后重试</span>'; | ||
247 | + // $("#userInfo").html(html); | ||
248 | + // } | ||
249 | + // | ||
250 | + // } | ||
251 | + // }); | ||
252 | + } | ||
253 | + }); | ||
254 | + | ||
218 | /*字数限制*/ | 255 | /*字数限制*/ |
219 | // $("#content").on("input propertychange", function() { | 256 | // $("#content").on("input propertychange", function() { |
220 | // debugger | 257 | // debugger |
@@ -61,9 +61,11 @@ | @@ -61,9 +61,11 @@ | ||
61 | 61 | ||
62 | <tr style="height: 60px"> | 62 | <tr style="height: 60px"> |
63 | <td style="width:100% "> | 63 | <td style="width:100% "> |
64 | - <div style="float: left;width:600px;" > | 64 | + <div style="float: left;width:700px;" > |
65 | <span style="color:red">*</span><label>选择用户</label> <br> | 65 | <span style="color:red">*</span><label>选择用户</label> <br> |
66 | - <input id="articleUid" name="authorUid" style="width:100% " class="easyui-textbox" /> <br> | 66 | + <input id="articleUid" name="authorUid" style="width:600px " class="easyui-textbox" /> |
67 | + <a id="userBotton" class="btn btn-small" style="font-size: 18px; " >确认</a> | ||
68 | + <br> | ||
67 | <span style="color:red"> 必填项,选择某个用户身份后,才能发布</span> | 69 | <span style="color:red"> 必填项,选择某个用户身份后,才能发布</span> |
68 | </div> | 70 | </div> |
69 | <div id="userInfo" style="float: left;margin-left: 30px;"> | 71 | <div id="userInfo" style="float: left;margin-left: 30px;"> |
@@ -189,6 +191,39 @@ | @@ -189,6 +191,39 @@ | ||
189 | getEditDialog(); | 191 | getEditDialog(); |
190 | } | 192 | } |
191 | }); | 193 | }); |
194 | + $("#userBotton").linkbutton({ | ||
195 | + iconCls : "icon-search", | ||
196 | + onClick : function() { | ||
197 | + //发送请求 | ||
198 | + $.ajax({ | ||
199 | + type: "POST", | ||
200 | + url: serverContextPath + "/grassArticle/getUserInfo", //提交到后端的url | ||
201 | + dataType: 'json', | ||
202 | + data:{ | ||
203 | + uid : $("#articleUid").textbox("getValue") | ||
204 | + }, | ||
205 | + success: function (result) { | ||
206 | + if(result.code == 200) { | ||
207 | + if(result.data !=null && result.data !=''){ | ||
208 | + var headIco = result.data.headIco.substring(0, result.data.headIco.indexOf("?")); | ||
209 | + var html = ''; | ||
210 | + html += "<span style='font-size: 18px;'>  <img src='"+headIco+"' width='80px;' height='80px;'></span>    "; | ||
211 | + html += "<span style='font-size: 18px;'>  <label>"+result.data.nickName+"</label></span>"; | ||
212 | + $("#userInfo").html(html); | ||
213 | + }else{ | ||
214 | + var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请检查uid输入是否正确</span>'; | ||
215 | + $("#userInfo").html(html); | ||
216 | + } | ||
217 | + } | ||
218 | + else { | ||
219 | + var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请稍后重试</span>'; | ||
220 | + $("#userInfo").html(html); | ||
221 | + } | ||
222 | + | ||
223 | + } | ||
224 | + }); | ||
225 | + } | ||
226 | + }); | ||
192 | 227 | ||
193 | $("#timerBotton").linkbutton({ | 228 | $("#timerBotton").linkbutton({ |
194 | iconCls : "icon-search", | 229 | iconCls : "icon-search", |
@@ -231,33 +266,33 @@ | @@ -231,33 +266,33 @@ | ||
231 | prompt: "请输入发布用户", | 266 | prompt: "请输入发布用户", |
232 | onChange: function () { | 267 | onChange: function () { |
233 | //发送请求 | 268 | //发送请求 |
234 | - $.ajax({ | ||
235 | - type: "POST", | ||
236 | - url: serverContextPath + "/grassArticle/getUserInfo", //提交到后端的url | ||
237 | - dataType: 'json', | ||
238 | - data:{ | ||
239 | - uid : $(this).textbox("getValue") | ||
240 | - }, | ||
241 | - success: function (result) { | ||
242 | - if(result.code == 200) { | ||
243 | - if(result.data !=null && result.data !=''){ | ||
244 | - var headIco = result.data.headIco.substring(0, result.data.headIco.indexOf("?")); | ||
245 | - var html = ''; | ||
246 | - html += "<span style='font-size: 18px;'>头像:  <img src='"+headIco+"' width='80px;' height='80px;'></span>    "; | ||
247 | - html += "<span style='font-size: 18px;'>昵称:  <label>"+result.data.nickName+"</label></span>"; | ||
248 | - $("#userInfo").html(html); | ||
249 | - }else{ | ||
250 | - var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请检查uid输入是否正确</span>'; | ||
251 | - $("#userInfo").html(html); | ||
252 | - } | ||
253 | - } | ||
254 | - else { | ||
255 | - var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请稍后重试</span>'; | ||
256 | - $("#userInfo").html(html); | ||
257 | - } | ||
258 | - | ||
259 | - } | ||
260 | - }); | 269 | + // $.ajax({ |
270 | + // type: "POST", | ||
271 | + // url: serverContextPath + "/grassArticle/getUserInfo", //提交到后端的url | ||
272 | + // dataType: 'json', | ||
273 | + // data:{ | ||
274 | + // uid : $(this).textbox("getValue") | ||
275 | + // }, | ||
276 | + // success: function (result) { | ||
277 | + // if(result.code == 200) { | ||
278 | + // if(result.data !=null && result.data !=''){ | ||
279 | + // var headIco = result.data.headIco.substring(0, result.data.headIco.indexOf("?")); | ||
280 | + // var html = ''; | ||
281 | + // html += "<span style='font-size: 18px;'>  <img src='"+headIco+"' width='80px;' height='80px;'></span>    "; | ||
282 | + // html += "<span style='font-size: 18px;'>  <label>"+result.data.nickName+"</label></span>"; | ||
283 | + // $("#userInfo").html(html); | ||
284 | + // }else{ | ||
285 | + // var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请检查uid输入是否正确</span>'; | ||
286 | + // $("#userInfo").html(html); | ||
287 | + // } | ||
288 | + // } | ||
289 | + // else { | ||
290 | + // var html = '<span style="color:red;font-size: 18px;">获取用户信息失败,请稍后重试</span>'; | ||
291 | + // $("#userInfo").html(html); | ||
292 | + // } | ||
293 | + // | ||
294 | + // } | ||
295 | + // }); | ||
261 | } | 296 | } |
262 | }); | 297 | }); |
263 | 298 |
-
Please register or login to post a comment