qfw.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. //是否有新活动
  2. var hasNewActive = new Date() >= Date.parse(new Date("2015/12/14 00:00:00")) && new Date() < Date.parse(new Date("2016/1/14 00:00:00"));
  3. //网站初始化状态
  4. var webSiteInitFlag = true;
  5. //登录状态 false--未登录,true--已登录
  6. var isLogined = false;
  7. //0默认,1微官网,2员工邀请,3绑定微信,4注册,5预约,6投标,7登录之后跳转到用户中心首页
  8. var loginBackType = null;
  9. //登录完之后强制刷新
  10. var compulsoryreRresh = false;
  11. //顶部是否加载完毕
  12. var topLoadOver = false;
  13. //表单验证的参数
  14. var cssctlObj = null;
  15. var ValidDatatype = {
  16. //正数
  17. "f": function(gets,obj,curform,regxp){
  18. return !!gets.match("^[0-9].*$");
  19. },
  20. //手机号
  21. "m": function(gets,obj,curform,regxp){
  22. return !!gets.match("^[1][3-9][0-9]{9}$");
  23. },
  24. //邮箱
  25. "e": function(gets,obj,curform,regxp){
  26. return !!gets.match("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");
  27. },
  28. "*4": /^[^\s]{4,4}$/,//四位任意字符
  29. "n4": /^\d{4,4}$/, //四位数字
  30. "n6": /^\d{6,6}$/, //六位数字
  31. "ns6-14": function(gets,obj,curform,regxp){//6~14个字符的数字、字母、可输入特殊字符的两种组合
  32. var msg = "长度为6~14个字符的数字、字母组合,区分大小写";
  33. if(obj.attr("recheck")){
  34. msg = "两次输入的密码不一致";
  35. }
  36. if(gets.length == 0){
  37. return false;
  38. }else if(gets.indexOf(" ") > -1){
  39. return "密码中不能包含有空格";
  40. }else if(regxp.n.test(gets) || /^[A-Za-z]+$/.test(gets)){
  41. return msg;
  42. }else if(/((?=[\x21-\x7e]+)[^A-Za-z0-9])/.test(gets) && !/\d/.test(gets) && !/[\u4E00-\u9FA5\uf900-\ufa2d\w\.\s]/.test(gets)){
  43. return msg;
  44. }
  45. return true;
  46. }
  47. }
  48. //浏览器窗口大小变化重新加载
  49. window.onresize=webSiteInit;
  50. serializeObject = function(form) {
  51. var o = {};
  52. $.each(form.serializeArray(),function() {
  53. if (this['value']) {
  54. o[this['name']] = this['value'];
  55. }
  56. });
  57. return o;
  58. };
  59. //
  60. $(function(){
  61. if(webSiteInitFlag){
  62. webSiteInit();
  63. }
  64. Date.prototype.Format = function (fmt) { //author: meizz
  65. var o = {
  66. "M+": this.getMonth() + 1, //月份
  67. "d+": this.getDate(), //日
  68. "h+": this.getHours(), //小时
  69. "m+": this.getMinutes(), //分
  70. "s+": this.getSeconds(), //秒
  71. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  72. "S": this.getMilliseconds() //毫秒
  73. };
  74. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  75. for (var k in o)
  76. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  77. return fmt;
  78. }
  79. });
  80. function makeData(d,_this,b){
  81. var s=$("#immediately")
  82. var res=makeImmediately(d,b);
  83. if(res){
  84. if(s.size()==0){
  85. var w=_this[0].offsetWidth;
  86. s=$("<div id='immediately' style='position:absolute;top:40px;display:none;z-index:9999;width:"+w+"px'/>")
  87. s.appendTo(_this.parent())
  88. _this.blur(function(event){
  89. $("#immediately").animate({opacity:"toggle"},700);
  90. })
  91. }
  92. s.html(res).show()
  93. }else{
  94. s.html("").hide()
  95. }
  96. }
  97. //即时搜索时的事件处理
  98. function imFind(obj){
  99. var val=$(obj).val();
  100. if(val){
  101. $.post("/search/sim",$.extend(serializeObject($("#searchform")),{words:val}),function(d){
  102. makeData(d,$(obj))
  103. })
  104. }else{
  105. if(isLogined){
  106. $.post("/mermber/searchlog",function(d){
  107. makeData(d,$(obj),true)
  108. })
  109. }else{
  110. var s=$("#immediately")
  111. if(s.size()==1){
  112. s.html("").hide()
  113. }
  114. }
  115. }
  116. return false;
  117. }
  118. //调用搜索按钮查询
  119. function iq(obj){
  120. //$("#immediately").stop(true,true).hide();
  121. var namew=$("input[name='words']").val($(obj).text())
  122. var nf=namew.closest("form");
  123. if(nf.size()==1){
  124. nf.submit();
  125. }else{
  126. $("#c_words").click();
  127. }
  128. return false;
  129. }
  130. //删除历史数据
  131. function delLogs(){
  132. $.get("/mermber/delLog");
  133. }
  134. var delLog="<div style='text-align:right;text-decoration:underline;cursor:auto'><small style='cursor:pointer' class='text-muted' onclick='delLogs()'>删除历史记录</small></div>";
  135. //组织数据
  136. function makeImmediately(data,b){
  137. var res="";
  138. if(data&&data.length>0&&!(typeof data == "string")){
  139. for(var i=0;i<data.length;i++){
  140. var ds=data[i].split("_")
  141. //res+="<div onclick='iq(this)'>"+ds[0]+"</div>"
  142. res+="<div onclick='window.open(\"/enterprise/"+ds[1]+".html\")'>"+ds[0]+"</div>"
  143. }
  144. if(b){
  145. res+=delLog
  146. }
  147. }
  148. return res;
  149. }
  150. //网站初始化的一些设置
  151. function webSiteInit(){
  152. var waitTopLoadOver = null;
  153. var clear_waitTopLoadOver = function(){
  154. if(waitTopLoadOver != null){
  155. clearInterval(waitTopLoadOver);
  156. waitTopLoadOver = null;
  157. }
  158. }
  159. try{
  160. var setBottomPadding = function(){
  161. $("#qfw-bottom").css("padding-top","0px");
  162. var testBottom_offsetTop = $("#testBottom").offset().top;
  163. var windowHeight = $(window).height();
  164. if (windowHeight < document.body.clientHeight){
  165. windowHeight = document.body.clientHeight;
  166. }
  167. if(testBottom_offsetTop < windowHeight){
  168. $("#qfw-bottom").css("padding-top",(windowHeight - testBottom_offsetTop)+"px");
  169. }
  170. }
  171. //设置底部不留空白
  172. if($("#qfw-bottom").length > 0){
  173. if(typeof(topLoadOver) != "undefined") {
  174. waitTopLoadOver = setInterval(function(){
  175. if(topLoadOver){
  176. clear_waitTopLoadOver();
  177. setBottomPadding();
  178. }
  179. },100);
  180. setTimeout(clear_waitTopLoadOver,5000);
  181. }else{
  182. setBottomPadding();
  183. }
  184. }
  185. //设置左右布局
  186. if($("#loginStatus").is(":visible") && $(".a-content").length == 1 && $(".a-c-left").length == 1 && $(".a-c-right").length == 1){
  187. $(".a-c-left").css("width",$(".a-content").width() - 265);
  188. if($(".a-content").children(".clearfix").length == 0){
  189. $(".a-content").append('<div class="clearfix"></div>');
  190. }
  191. }
  192. //设置用户用心左右布局
  193. var memberLeft_marginLeft = 0;
  194. if($(".member-content").length == 1 && $(".member-content>.member-left").length == 1 && $(".member-content>.member-right").length == 1){
  195. $(".member-right").width($(".member-content").width() - 200 - 15);
  196. if($(".member-content").children(".clearfix").length == 0){
  197. $(".member-content").append('<div class="clearfix"></div>');
  198. }
  199. }
  200. }catch(e){
  201. clear_waitTopLoadOver();
  202. }
  203. }
  204. //发送验证码
  205. var SendIdentCode = {
  206. name: null,
  207. flag: false,
  208. init: function(obj,userName,parentId,c,checkCodeObj){
  209. var sendType = null;
  210. if(ValidDatatype.m(userName)){
  211. sendType = "短信";
  212. }else if(ValidDatatype.e(userName)){
  213. sendType = "邮箱";
  214. }else{
  215. return;
  216. }
  217. this.name = userName;
  218. var thisClass = this;
  219. var parentNode = $((parentId?(parentId+" "):"")+".afterSendIdentCode").show();
  220. var childNode = parentNode.children("div");
  221. if(c == -1){
  222. thisClass.flag = true;
  223. childNode.addClass("text-primary").html('抱歉,您今天发送的验证码次数已超限制,请明天再来。');
  224. return;
  225. }
  226. thisClass.flag = false;
  227. if(checkCodeObj){
  228. checkCodeObj.attr("disabled","disabled");
  229. }
  230. $(obj).addClass("text-muted").removeClass("cursor-pointer").text("已发送");
  231. var count = 59;
  232. childNode.removeClass("text-primary").text("校验码已通过"+sendType+"发出,如果没有收到,您可在"+count--+"秒后重新发送");
  233. var intgerval = setInterval(function (){
  234. if(count == 0){
  235. if(checkCodeObj){
  236. checkCodeObj.removeAttr("disabled");
  237. }
  238. $(obj).removeClass("text-muted").addClass("cursor-pointer");
  239. $(obj).text("获取"+sendType+"验证码");
  240. parentNode.hide();
  241. clearInterval(intgerval);
  242. }else{
  243. childNode.removeClass("text-primary").text("校验码已通过"+sendType+"发出,如果没有收到,您可在"+count--+"秒后重新发送");
  244. }
  245. },1000);
  246. }
  247. }
  248. //绑定表单验证
  249. function bindValidForm(setting,clas,ajaxConfig){
  250. $("[datatype]").focus(function(){
  251. if($(this).val().length == 0){
  252. var obj = $(this).parent("div").next().find(".Validform_checktip");
  253. var checktipText = obj.text();
  254. if(typeof(obj.attr("checktip")) != "undefined"){
  255. checktipText = obj.attr("checktip");
  256. }
  257. if(checktipText.length > 0 && !obj.hasClass("Validform_wrong") && !obj.hasClass("Validform_right")){
  258. obj.attr("checktip",obj.text()).text(checktipText).show();
  259. }
  260. }
  261. });
  262. //表单input获得焦点后,右侧出现提示信息
  263. var settings = {
  264. tiptype:2,
  265. tiptype:function(msg,o,cssctl){
  266. var obj = $(o.obj).parent().next().children(".Validform_checktip")
  267. cssctlObj = cssctl;
  268. cssctl(obj,o.type);
  269. obj.text(msg).show();
  270. },
  271. datatype:ValidDatatype
  272. };
  273. if(setting){
  274. $.extend(settings,setting);
  275. }
  276. var validForm = $("."+(clas?clas:"validForm")).Validform(settings);
  277. validForm.tipmsg.r=" ";
  278. validForm.tipmsg.c=" ";
  279. var ajaxUrl = {
  280. async:false,
  281. error:function (data,obj){
  282. $(obj).parent().next().children(".Validform_wrong").text("服务器端错误");
  283. }
  284. }
  285. if(ajaxConfig){
  286. $.extend(ajaxUrl,ajaxConfig);
  287. }
  288. validForm.config({
  289. ajaxurl:ajaxUrl
  290. });
  291. return validForm;
  292. }
  293. function errorProcess(obj,msg){
  294. obj = obj.parent().next().children(".Validform_checktip")
  295. cssctlObj(obj,3);
  296. obj.text(msg).show();
  297. }
  298. //替换input中的非数字
  299. function rePlaceUnDigital(obj){
  300. if(/[^\d]/g.test(obj.value)){
  301. var pos = getCursorPos(obj);
  302. var array = obj.value.split("");
  303. for(var i in array){
  304. if(/[^\d]/g.test(array[i])){
  305. pos--;
  306. }
  307. }
  308. obj.value = obj.value.replace(/[^\d]/g,'');
  309. setCursorPos(obj,pos);
  310. }
  311. }
  312. //替换input中的空格
  313. function rePlaceSpace(obj){
  314. if(obj.value.indexOf(' ')>-1){
  315. var pos = getCursorPos(obj);
  316. var array = obj.value.split("");
  317. for(var i in array){
  318. if(array[i] == " "){
  319. pos--;
  320. }
  321. }
  322. obj.value = obj.value.replace(new RegExp(' ','gm'),'');
  323. setCursorPos(obj,pos);
  324. }
  325. }
  326. /**
  327. * 设置光标在短连接输入框中的位置
  328. * @param inpObj 输入框
  329. * @param pos
  330. */
  331. function setCursorPos(inpObj, pos){
  332. if(navigator.userAgent.indexOf("MSIE") > -1){
  333. var range = document.selection.createRange();
  334. var textRange = inpObj.createTextRange();
  335. textRange.moveStart('character',pos);
  336. textRange.collapse();
  337. textRange.select();
  338. }else{
  339. inpObj.setSelectionRange(pos,pos);
  340. }
  341. }
  342. /**
  343. * 获取光标在短连接输入框中的位置
  344. * @param inpObj 输入框
  345. */
  346. function getCursorPos(inpObj){
  347. if(navigator.userAgent.indexOf("MSIE") > -1) { // IE
  348. var range = document.selection.createRange();
  349. range.text = '';
  350. range.setEndPoint('StartToStart',inpObj.createTextRange());
  351. return range.text.length;
  352. } else {
  353. return inpObj.selectionStart;
  354. }
  355. }
  356. //获取cookie
  357. function getCookie(name){
  358. var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
  359. if(arr=document.cookie.match(reg))
  360. return unescape(arr[2]);
  361. else
  362. return null;
  363. }
  364. //QQ登陆
  365. function qqLogin(){
  366. window.location.href = 'https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101228008&redirect_uri=http%3A%2F%2Fwww.qimingxing.info%2FqqCallBack%3FloginBackType='+loginBackType+'&scope=get_user_info';
  367. }
  368. //微信登录
  369. function weixinLogin(){
  370. window.location.href = 'https://open.weixin.qq.com/connect/qrconnect?appid=wx5553bf4febae85e4&redirect_uri=http%3a%2f%2fwww.qimingxing.info/weixinCallBack%3FloginBackType='+loginBackType+'&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect';
  371. }
  372. /**
  373. * 正则表达式实现endWith效果函数
  374. * @param str 要判断的字符
  375. **/
  376. String.prototype.endWith = function(str){
  377. var reg = new RegExp(str+"$");
  378. return reg.test(this);
  379. }
  380. /**
  381. * 正则表达式实现startWith效果函数
  382. * @param str 要判断的字符
  383. **/
  384. String.prototype.startWith = function(str){
  385. var reg = new RegExp("^"+str);
  386. return reg.test(this);
  387. }
  388. //动态加载css
  389. function addCssByLink(url){
  390. var links=document.getElementsByTagName('link')
  391. for(var i=0;i<links.length;i++){
  392. if(links[i].href&&links[i].href.indexOf(url)>-1){
  393. return;
  394. }
  395. }
  396. var doc=document;
  397. var link=doc.createElement("link");
  398. link.setAttribute("rel", "stylesheet");
  399. link.setAttribute("type", "text/css");
  400. link.setAttribute("href", url);
  401. var heads = doc.getElementsByTagName("head");
  402. if(heads.length)
  403. heads[0].appendChild(link);
  404. else
  405. doc.documentElement.appendChild(link);
  406. }
  407. //动态加载js
  408. function loadJS(url, success) {
  409. var scripts=document.getElementsByTagName('script')
  410. for(var i=0;i<scripts.length;i++){
  411. if(scripts[i].src&&scripts[i].src.indexOf(url)>-1){
  412. if(success) success();
  413. return;
  414. }
  415. }
  416. var domScript = document.createElement('script');
  417. domScript.src = url;
  418. success = success || function(){};
  419. domScript.onload = domScript.onreadystatechange = function() {
  420. if (!this.readyState || 'loaded' === this.readyState || 'complete' === this.readyState) {
  421. success();
  422. this.onload = this.onreadystatechange = null;
  423. //this.parentNode.removeChild(this);
  424. }
  425. }
  426. document.getElementsByTagName('head')[0].appendChild(domScript);
  427. }
  428. //判断对象是否为空对象{}
  429. function isNullObj(obj){
  430. for(var i in obj){
  431. if(obj.hasOwnProperty(i)){
  432. return false;
  433. }
  434. }
  435. return true;
  436. }
  437. //根据id去后台查询评论个数、投标状态
  438. function advertAjaxRqe(position){
  439. var data = "position="+position;
  440. $("#hotService ul").each(function(){
  441. var id = $(this).attr("data-id");
  442. if(id != ""){
  443. data += "&serviceId="+id;
  444. }
  445. });
  446. $("#hotDemand>div").each(function(){
  447. var id = $(this).attr("data-id");
  448. if(id != ""){
  449. data += "&demandId="+id;
  450. }
  451. });
  452. if(data != ""){
  453. $.post("/front/advertAjaxRqe",data,function(r){
  454. if(r.service){
  455. var service = r.service;
  456. for(var i in service){
  457. $('#hotService [data-id="'+service[i].id+'"]>.a-com-last').children("font").text(service[i].comments?service[i].comments:0);
  458. if(service[i].online == "y"){
  459. $('#hotService [data-id="'+service[i].id+'"]>.a-com-name>i').addClass("text-primary")
  460. }
  461. }
  462. }
  463. if(r.demand){
  464. var demand = r.demand;
  465. for(var i in demand){
  466. var status = demand[i].status;
  467. var html = null;
  468. if(status == 1){
  469. html = '<img src="/images/u385.png"/>';
  470. }else if(status == 2){
  471. html = '<img src="/images/u347.png"/>';
  472. }else if(status == 3){
  473. html = '<span class="a-bg-gray">任务超时</span>';
  474. }else if(status == 4){
  475. html = '<span class="a-bg-gray">已撤销</span>';
  476. }
  477. if(html != null){
  478. $('#hotDemand [data-id="'+demand[i].id+'"] .a-com-last').html(html);
  479. }
  480. if(demand[i].online == "y"){
  481. $('#hotDemand [data-id="'+demand[i].id+'"]>.a-com-name>i').addClass("text-primary");
  482. }
  483. }
  484. }
  485. });
  486. }
  487. }
  488. //认证完之后首次登录
  489. function afterAutheFirstLogin(result){
  490. var identType = result.identType;
  491. var entId = result.entId;
  492. if(identType == 2){//个人认证
  493. $("body").append('{{include "/common/ploginmodal.html"}}');
  494. $("#fristAutheLoginModal .com-nickName").text(result.nickName);
  495. $("#fristAutheLoginModal .com-entName").text(result.entName+"店铺");
  496. $("#fristAutheLoginModal .com-entCard a").attr("href","/member/yellowpage/edit/enterprise/"+entId);
  497. }else{
  498. $("body").append('{{include "/common/ologinmodal.html"}}');
  499. $("#fristAutheLoginModal .com-nickName").text(result.nickName);
  500. $("#fristAutheLoginModal .com-entName").text(result.entName);
  501. var comAuthentType = result.comAuthentType;
  502. //企业认证标识:1:营业执照;2:企业名片;3:企业邮箱
  503. var comAuthentText = comAuthentType==1?"营业执照认证":comAuthentType==2?"名片认证":comAuthentType==3?"邮箱认证":"";
  504. var flag = comAuthentText!="";
  505. $("#fristAutheLoginModal .com-identTypeText").html(",恭喜您完成"+(identType==1?"企业":identType==3?"机构":"")+"认证"+(flag?"-":"")+comAuthentText);
  506. $("#fristAutheLoginModal .com-identTypeImg").append('<i class="glyphicon '+(identType==1?"qy":identType==3?"jg":"")+'rz"></i><font class="text-muted">已认证'+(identType==1?"企业":identType==3?"机构":"")+'</font>');
  507. if(flag){
  508. $("#fristAutheLoginModal .com-identTypeImg").append('<i class="glyphicon margin-r-5 '+(comAuthentType==1?"margin-r-10 yyzz":comAuthentType==2?"mp":comAuthentType==3?"yj":"")+'rz"></i><font class="text-muted">'+comAuthentText+'</font>');
  509. }
  510. if(hasNewActive){
  511. $("#fristAutheLoginModal .com-who").text("完成以下操作,就可以领取红包啦:");
  512. }else{
  513. $("#fristAutheLoginModal .com-entCard").removeClass("hide");
  514. $("#fristAutheLoginModal .com-entCard a").attr("href","/member/yellowpage/edit/enterprise/"+entId);
  515. }
  516. }
  517. $("#fristAutheLoginModal .com-releaseService a").attr("href","/member/yellowpage/show/showService/"+entId);
  518. $("#fristAutheLoginModal").modal('show');
  519. }
  520. //
  521. function b_loadTop(){
  522. $.ajax({
  523. type: "POST",
  524. url: "/front/getWebSiteTop",
  525. dataType: "json",
  526. async: false,
  527. success: function(result){
  528. topLoadOver = true;
  529. if(result.status == "y"){
  530. isLogined = true;
  531. var msgCount = result.msgCount;
  532. var hasMsgCount = msgCount > 0;
  533. msgCount = msgCount>999?'...':msgCount;
  534. var avatar = null;
  535. if(avatar != ""){
  536. avatar = result.avatar;
  537. }
  538. var html = '<span><img class="img-circle headimg" src="'+avatar+'" onerror="this.src=\'/images/swordfish/headimg.png\'">';
  539. if(hasMsgCount){
  540. html += '<a class="b-round-dot"></a>';
  541. }
  542. html += '</span><a href="/member/show/memberindex">'+result.nickName+'</a>';
  543. html += '<div id="head-hideMenu" class="head-hideMenu"><ul>'
  544. +'<li onclick="window.location.href=\'/member/msgcenter\'"><i class="glyphicon youjian"></i><span>消息中心';
  545. if(hasMsgCount){
  546. html += '<a class="b-round-dot"></a>';
  547. }
  548. html += '</span></li>'
  549. +'<li onclick="window.location.href=\'/member/show/memberindex\'"><i class="glyphicon ren1"></i>用户中心</li>'
  550. +'<li onclick="window.location.href=\'/front/logout\'" class="border-b-0"><i class="glyphicon tuichu"></i>退出</li>';
  551. +'</ul></div>';
  552. $("#b-loginStatus").html(html)
  553. .mouseover(function(){
  554. $("#head-hideMenu").show();
  555. }).mouseleave(function(){
  556. $("#head-hideMenu").hide();
  557. });
  558. $("#head-hideMenu").mouseover(function(){
  559. $(this).show();
  560. }).mouseleave(function(){
  561. $(this).hide();
  562. });
  563. //处理公用底部扫码登录按钮
  564. $("#bottom-bar>li:first").addClass("invisible");
  565. //处理认证完之后第一次登录弹出提示框
  566. if(result.auditType == "y"){
  567. afterAutheFirstLogin(result);
  568. }
  569. }else{
  570. isLogined = false;
  571. var html = '<a onclick="loginModalShow();">登录/注册</a>';
  572. $("#b-loginStatus").html(html);
  573. $("#bottom-bar>li").removeClass("invisible");
  574. }
  575. try{
  576. b_loadTopCallBack(result);
  577. }catch(e){}
  578. },
  579. error: function(e){
  580. topLoadOver = true;
  581. }
  582. });
  583. }