text: !function(s){for(var t="",o=window.cityList,e=0;e<o.length;e++){var a=o[e];t+='<option value="'+a+'">'+a+"</option>"}var i=s("#js_city_select").html(t).selectpicker("render");i.selectpicker("val",i.data("value")),s(".js_form_datetime").datetimepicker({format:"YYYY-MM-DD HH:mm:ss"});var u=window.common,m=new window.wangEditor("#js_details_editor");m.customConfig.menus=["bold","fontSize","fontName","italic","underline","strikeThrough","foreColor","backColor","link","list","justify","quote","emoticon","image","table","undo","redo"],m.customConfig.zIndex=2,m.customConfig.emotions=window.emotions||!1,m.customConfig.uploadImgServer="/upload",m.customConfig.uploadImgMaxSize=1048576,m.customConfig.uploadImgMaxLength=5,m.customConfig.uploadImgTimeout=6e4,m.customConfig.uploadFileName="uploadImageName",m.customConfig.customAlert=function(t){u.toast(t)},m.create(),s("#js_edit_form").on("submit",function(t){t.preventDefault();for(var o={},e=s(this).serializeArray(),a=0;a<e.length;a++){var i=e[a];o[i.name]=i.value}var n=(m.txt.html()||"").trim();""===m.txt.text().trim()&&(n=""),o.content=n,o.author=o.author||"",u.loading("show");var r=s(this).data("url");return s.ajax({url:r,type:"POST",dataType:"JSON",headers:{"Content-Type":"application/json"},data:JSON.stringify(o)}).done(function(t){"100"===t.code?u.toast("操作成功"):u.toast(t.desc)}).fail(function(t){0!==t.readyState&&u.toast("接口请求失败: "+(t.status||-1))}).always(function(){u.loading("hide")}),!1})}(window.jQuery);