From b84a491aeced5ca29e78240f6f651d98d3623454 Mon Sep 17 00:00:00 2001 From: Apple <> Date: Tue, 12 Jul 2022 22:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=AB=8B=E5=87=8F=E9=87=91?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=80=85=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/api.js | 4 ++-- src/pages/login/loginform.js | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) 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) {