diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js index 111c7d10..b90b53c0 100644 --- a/pc4mobx/hrmSalary/layout.js +++ b/pc4mobx/hrmSalary/layout.js @@ -11,7 +11,6 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaLocaleProvider, WeaTools } from "ecCom"; import Authority from "./pages/mySalary/authority"; -import stores from "./stores"; const { ls } = WeaTools; const { getLabel } = WeaLocaleProvider; @@ -44,8 +43,8 @@ class Layout extends Component { let header = document.getElementById("container"); header.appendChild(link); top.$(".ant-message").remove(); - window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission(); - window.location.hash.indexOf("mobilepayroll") !== -1 && stores.taxAgentStore.initPageAndOptAuth(); + (window.location.hash.indexOf("mobilepayroll") === -1 || window.location.hash.indexOf("_lingyue") === -1) && allStore.taxAgentStore.getPermission(); + (window.location.hash.indexOf("mobilepayroll") !== -1 && window.location.hash.indexOf("_lingyue") !== -1) && allStore.taxAgentStore.initPageAndOptAuth(); } window.addEventListener("storage", this.setFontSize); } diff --git a/pc4mobx/hrmSalary/single.js b/pc4mobx/hrmSalary/single.js index 1de2325b..743d3ed2 100644 --- a/pc4mobx/hrmSalary/single.js +++ b/pc4mobx/hrmSalary/single.js @@ -10,7 +10,6 @@ import { RouterStore, syncHistoryWithStore } from "mobx-react-router"; import { Provider } from "mobx-react"; import Module from "weaHrmSalary"; -import stores from "./stores"; const routing = new RouterStore(); @@ -30,16 +29,16 @@ const Home = props => props.children; class Root extends React.Component { componentWillMount() { - const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css" - const link = document.createElement("link") - link.setAttribute('rel','stylesheet'); - link.setAttribute('type','text/css'); - link.setAttribute('href',src); - let header = document.getElementById("container") - header.appendChild(link) + const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css"; + const link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("type", "text/css"); + link.setAttribute("href", src); + let header = document.getElementById("container"); + header.appendChild(link); top.$(".ant-message").remove(); - window.location.hash.indexOf("mobilepayroll") === -1 && allStore.taxAgentStore.getPermission(); - window.location.hash.indexOf("mobilepayroll") !== -1 && allStore.taxAgentStore.initPageAndOptAuth(); + (window.location.hash.indexOf("mobilepayroll") === -1 || window.location.hash.indexOf("_lingyue") === -1) && allStore.taxAgentStore.getPermission(); + (window.location.hash.indexOf("mobilepayroll") !== -1 && window.location.hash.indexOf("_lingyue") !== -1) && allStore.taxAgentStore.initPageAndOptAuth(); if (window.location.hash.indexOf("payroll") !== -1) { window.localStorage.removeItem("template-basedata"); window.localStorage.removeItem("salary-showset");