Browse Source

feat:我的企业菜单控制

wangchuanjin 3 years ago
parent
commit
4aa028612d
2 changed files with 4 additions and 4 deletions
  1. 2 2
      src/jfw/front/dataExport.go
  2. 2 2
      src/web/staticres/js/login.js

+ 2 - 2
src/jfw/front/dataExport.go

@@ -859,7 +859,7 @@ func (this *DataExport) GetPcEntAuth() {
 					if hideUsers[util.IntAll(val["id"])] {
 					if hideUsers[util.IntAll(val["id"])] {
 						entnicheMenu = false
 						entnicheMenu = false
 					} else {
 					} else {
-						if  util.IntAll(val["isNew"])==1{
+						if util.IntAll(val["isNew"]) == 1 {
 							isNew = true
 							isNew = true
 						}
 						}
 						entnicheMenu = true
 						entnicheMenu = true
@@ -883,7 +883,7 @@ func (this *DataExport) GetPcEntAuth() {
 									if hideUsers[util.IntAll(vv["id"])] {
 									if hideUsers[util.IntAll(vv["id"])] {
 										entnicheMenu = false
 										entnicheMenu = false
 									} else {
 									} else {
-										if  util.IntAll(vv["isNew"])==1{
+										if util.IntAll(vv["isNew"]) == 1 {
 											isNew = true
 											isNew = true
 										}
 										}
 										entnicheMenu = true
 										entnicheMenu = true

+ 2 - 2
src/web/staticres/js/login.js

@@ -340,14 +340,14 @@ function checkMenuForEnt () {
     $.ajax({
     $.ajax({
         type: 'get',
         type: 'get',
         url: '/entbase/ent/mySelectent?t=' + new Date().getTime(),
         url: '/entbase/ent/mySelectent?t=' + new Date().getTime(),
-        success: function () {
+        success: function (er) {
             $.ajax({
             $.ajax({
                 type: 'get',
                 type: 'get',
                 url: '/front/entExportAuth/getAuth?t=' + new Date().getTime(),
                 url: '/front/entExportAuth/getAuth?t=' + new Date().getTime(),
                 success: function (r) {
                 success: function (r) {
 					$(".myorderDiv[data-ent-menu]").remove()
 					$(".myorderDiv[data-ent-menu]").remove()
 					var tempHtml = ''
 					var tempHtml = ''
-                    if(r.myEntMenu){
+                    if(er.data!=null && er.data.status==1){
                         tempHtml += "<div data-ent-menu class=\"myorderDiv\" onclick=\"window.location.href='/entpc/myent'\">"
                         tempHtml += "<div data-ent-menu class=\"myorderDiv\" onclick=\"window.location.href='/entpc/myent'\">"
                         +"<span>我的企业</span>"
                         +"<span>我的企业</span>"
                         +"</div>"
                         +"</div>"