tsrntemp 1.2.1 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/package.json +14 -5
- package/template/src/config/apiConfig.ts +5 -0
- package/template/src/config/index.ts +1 -0
- package/template/src/requestUtils/ApiService.ts +68 -0
- package/template/src/requestUtils/index.ts +1 -0
- package/template/src/requestUtils/request.ts +80 -0
- package/template/src/route/BottomTab.tsx +1 -0
- package/template/src/utils/index.ts +1 -1
- package/template/src/utils/storage.ts +3 -1
- package/template/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -2008
- package/template/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h +0 -2448
- package/template/ios/build/generated/ios/FBReactNativeSpecJSI-generated.cpp +0 -1523
- package/template/ios/build/generated/ios/FBReactNativeSpecJSI.h +0 -5509
- package/template/ios/build/generated/ios/React-Codegen.podspec.json +0 -1
- package/template/src/utils/request.ts +0 -28
@@ -1 +0,0 @@
|
|
1
|
-
{"name":"React-Codegen","version":"0.72.12","summary":"Temp pod for generated files for React Native","homepage":"https://facebook.com/","license":"Unlicense","authors":"Facebook","compiler_flags":"-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -Wno-nullability-completeness -std=c++17","source":{"git":""},"header_mappings_dir":"./","platforms":{"ios":"12.4"},"source_files":"**/*.{h,mm,cpp}","pod_target_xcconfig":{"HEADER_SEARCH_PATHS":"\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"$(PODS_ROOT)/Headers/Private/React-Fabric\" \"$(PODS_ROOT)/Headers/Private/React-RCTFabric\"","FRAMEWORK_SEARCH_PATHS":[]},"dependencies":{"React-jsiexecutor":[],"RCT-Folly":[],"RCTRequired":[],"RCTTypeSafety":[],"React-Core":[],"React-jsi":[],"ReactCommon/turbomodule/bridging":[],"ReactCommon/turbomodule/core":[],"React-NativeModulesApple":[],"glog":[],"DoubleConversion":[],"hermes-engine":[],"React-rncore":[],"FBReactNativeSpec":[]}}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
//请求工具库
|
2
|
-
/**
|
3
|
-
* 使用可参照https://www.npmjs.com/package/umi-request
|
4
|
-
*/
|
5
|
-
import {extend, ResponseError} from 'umi-request';
|
6
|
-
|
7
|
-
//错误处理
|
8
|
-
const errorHandler = (error: ResponseError) => {
|
9
|
-
if (error.response) {
|
10
|
-
// The request was made and the server responded with a status code
|
11
|
-
// that falls out of the range of 2xx
|
12
|
-
console.log(error.response.status);
|
13
|
-
console.log(error.response.headers);
|
14
|
-
console.log(error.data);
|
15
|
-
console.log(error.request);
|
16
|
-
} else {
|
17
|
-
// The request was made but no response was received or error occurs when setting up the request.
|
18
|
-
console.log(error.message);
|
19
|
-
}
|
20
|
-
};
|
21
|
-
|
22
|
-
const request = extend({
|
23
|
-
// prefix:'',
|
24
|
-
timeout: 1000,
|
25
|
-
errorHandler,
|
26
|
-
});
|
27
|
-
|
28
|
-
export default request;
|