Эх сурвалжийг харах

fix: 修复画像菜单重复问题

zhangyuhan 3 жил өмнө
parent
commit
7107017a65

+ 10 - 8
src/web/staticres/js/login.js

@@ -345,25 +345,26 @@ function checkMenuForEnt () {
                 type: 'get',
                 url: '/front/entExportAuth/getAuth?t=' + new Date().getTime(),
                 success: function (r) {
-                    var tempHtml = ''
+					$(".myorderDiv[data-ent-menu]").remove()
+					var tempHtml = ''
                     if(r.myEntMenu){
-                        tempHtml += "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/myent'\">"
+                        tempHtml += "<div data-ent-menu class=\"myorderDiv\" onclick=\"window.location.href='/entpc/myent'\">"
                         +"<span>我的企业</span>"
                         +"</div>"
                     }
                     if(r.entnicheMenu){
                         if (r.isNew) {
-                            tempHtml+= "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/newBus'\">"
+                            tempHtml+= "<div data-ent-menu class=\"myorderDiv\" onclick=\"window.location.href='/entpc/newBus'\">"
                                 +"<span>商机管理</span>"
                                 +"</div>"
                         } else {
-                            tempHtml+= "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/bus'\">"
+                            tempHtml+= "<div data-ent-menu class=\"myorderDiv\" onclick=\"window.location.href='/entpc/bus'\">"
                                 +"<span>商机管理</span>"
                                 +"</div>"
                         }
                     }
                     if(r.privatedata){
-                      tempHtml+= "<div class=\"myorderDiv\" onclick=\"window.location.href='/swordfish/page_big_pc/free/custom_search'\">"
+                      tempHtml+= "<div data-ent-menu class=\"myorderDiv\" onclick=\"window.location.href='/swordfish/page_big_pc/free/custom_search'\">"
                           +"<span>画像分析系统</span>"
                           +"</div>"
                     }
@@ -758,13 +759,14 @@ var haslogin = function(num,kyorpn,url){
 				+"</div>"
 			$("#login").html(hhtml);
 			try{
-        checkBigStatus()
-        checkMenuForEnt()
+				checkBigStatus()
+				checkMenuForEnt()
 				infoListCss();
 				commonMouseEvent();
                 message.init()
 			}catch(e){}
-		}else{
+		}
+		else{
 			$("#login").html("<button class='loginBtn' data-toggle='modal' onclick='openLoginDig()'>登录</button>");
 			loginBtnType();
 			//pc限制登陆