@@ -4,7 +4,7 @@ type ServiceEnv = Record<ServiceEnvType, ServiceEnvConfig>;
/** 不同请求服务的环境配置 */
const serviceEnv: ServiceEnv = {
dev: {
- url: 'http://localhost:8080'
+ url: 'http://eas-api.edu.koobietech.com'
},
test: {
url: 'http://localhost:8080'
@@ -15,7 +15,7 @@ dist.zip
coverage
*.local
stats.html
-
+target
/cypress/videos/
/cypress/screenshots/
@@ -28,10 +28,10 @@ export default class CustomAxiosInstance {
constructor(
axiosConfig: AxiosRequestConfig,
backendConfig: Service.BackendResultConfig = {
- codeKey: 'code',
+ codeKey: 'status',
dataKey: 'data',
- msgKey: 'message',
- successCode: 200
+ msgKey: 'code',
+ successCode: true
}
) {
this.backendConfig = backendConfig;
@@ -27,7 +27,7 @@ declare namespace Service {
/** 表示后端消息的属性字段 */
msgKey: string;
/** 后端业务上定义的成功请求的状态 */
- successCode: number | string;
+ successCode: boolean;
/** 自定义的请求成功结果 */