From 10c3bce9528daaf45682efa8b163e63c5006a72f Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期四, 21 十二月 2023 18:36:05 +0800 Subject: [PATCH] 必填只能编辑数量,非必填编辑销售单价,成本单价,数量+成本单价不填写可以通过校验填写则需要校验大于0 --- src/common/untils/request.js | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/common/untils/request.js b/src/common/untils/request.js index 9cb4874..9b321b2 100644 --- a/src/common/untils/request.js +++ b/src/common/untils/request.js @@ -33,7 +33,7 @@ prod:`//${window.location.hostname}:9080`, test:`//192.168.20.119:9080`, // 鎯宠烦鍒版湰鍦板惎鍔ㄧ殑鐧诲綍椤电殑璇濋渶瑕佹妸dev鏀规垚浣犳湰鍦伴」鐩矾寰� - dev: `//192.168.20.124:8081` + dev: `//192.168.8.111:8081` } return loginPathMap[environmentType()] @@ -64,13 +64,18 @@ (res) => { /* //瀵瑰搷搴旀暟鎹仛浜涗簨 */ if (res.data.code === 200) { - return res.data ? res.data : {} + if(res.config.IsHeader){ + return res; + }else{ + return res.data ? res.data : {} + } } else if (res.data.code === 700001 || res.data.code === 700005) { console.log("瀹㈡埛鍚嶇О閲嶅") return res } else if([2012,2013,2014,2015].includes(res.data.code)){ if (isDev){ - alert("JWT澶辨晥") + alert("JWT澶辨晥") + // window.location = getApsPage()+'/' }else { // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉 window.location = getApsPage()+'/login' @@ -88,7 +93,8 @@ (error) => { if (error.response.status === 401){ if (isDev){ - alert("JWT澶辨晥") + alert("JWT澶辨晥") + // window.location = getApsPage()+'/' }else { // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉 window.location = getApsPage()+'/login' -- Gitblit v1.8.0