处理立减金添加者权限

This commit is contained in:
Apple 2022-07-12 22:22:05 +08:00
parent 14dafd4d67
commit b84a491aec
2 changed files with 15 additions and 3 deletions

View File

@ -238,8 +238,8 @@ const req = (method, url, params, responseType) => {
window.location.href = '/' window.location.href = '/'
}, 2000) }, 2000)
} else if (response.code == 401) { } else if (response.code == 401) {
Notify.clear() // Notify.clear()
Notify.error(response.message) // Notify.error(response.message)
} }
}) })
.catch() .catch()

View File

@ -12,6 +12,7 @@ import {
getProductInfoSelect, getProductInfoSelect,
postsendLoginCode, postsendLoginCode,
postLoginCode, postLoginCode,
getVoucherWarningAccount
} from "../../assets/api.js"; } from "../../assets/api.js";
import { import {
FormInputField, FormInputField,
@ -44,7 +45,17 @@ function FormDom(props) {
const authorizationCode = useRef(auth); const authorizationCode = useRef(auth);
authorizationCode.current = 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 onSubmit = React.useCallback((form) => {
const value = form.getValue(); const value = form.getValue();
let subdata = { let subdata = {
@ -68,6 +79,7 @@ function FormDom(props) {
//首次进来进行商品获取 //首次进来进行商品获取
getProductList(); getProductList();
getAccountList()
sessionStorage.setItem("showflag", true); sessionStorage.setItem("showflag", true);
let menuList = response.menu; let menuList = response.menu;
if (response.menu && response.menu.length > 0) { if (response.menu && response.menu.length > 0) {