diff --git a/src/assets/api.js b/src/assets/api.js index 81daec13..2ea1094b 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -238,8 +238,8 @@ const req = (method, url, params, responseType) => { window.location.href = '/' }, 2000) } else if (response.code == 401) { - Notify.clear() - Notify.error(response.message) + // Notify.clear() + // Notify.error(response.message) } }) .catch() diff --git a/src/pages/login/loginform.js b/src/pages/login/loginform.js index 8cfc4f72..0f1f3f3f 100644 --- a/src/pages/login/loginform.js +++ b/src/pages/login/loginform.js @@ -12,6 +12,7 @@ import { getProductInfoSelect, postsendLoginCode, postLoginCode, + getVoucherWarningAccount } from "../../assets/api.js"; import { FormInputField, @@ -44,7 +45,17 @@ function FormDom(props) { const authorizationCode = useRef(auth); authorizationCode.current = auth; - +//获取预警人权限 +const getAccountList = () => { + getVoucherWarningAccount().then(res =>{ + if(!res){ + sessionStorage.setItem('isEarlyWarningMan',false); + }else{ + sessionStorage.setItem('isEarlyWarningMan',true); + } + } + ) +} const onSubmit = React.useCallback((form) => { const value = form.getValue(); let subdata = { @@ -68,6 +79,7 @@ function FormDom(props) { //首次进来进行商品获取 getProductList(); + getAccountList() sessionStorage.setItem("showflag", true); let menuList = response.menu; if (response.menu && response.menu.length > 0) {