Closed hloong closed 4 years ago
多谢, 欢迎合作!
顺祝工作顺利,生活愉快! 王志强:15601326781 .
------------------ 原始邮件 ------------------ 发件人: "wzqjava/MVVMSmart" <notifications@github.com>; 发送时间: 2020年7月3日(星期五) 晚上9:49 收件人: "wzqjava/MVVMSmart"<MVVMSmart@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [wzqjava/MVVMSmart] 我已经在用这个框架了,开发过程中碰到的问题我修改了下,看你那边有无必要合并 (#41)
我在用这个框架,然后看到代码只有按照打包的方式配置的baseUrl,所以我在引入了一个针对单个请求动态设置baseurl的库 https://github.com/JessYanCoding/RetrofitUrlManager
因为我项目里的接口baseurl都是通过配置文件下发的,每个模块的baseurl不一样,用的比较急所以还没时间细看源码,不过知道是通过拦截固定header来替换baseUrl的,然后我把HttpCommonInterceptor 这个类的打印参数改了下,需要知道原来的请求url和实际响应的url
最后我增加了BooleanTypeAdapter和StringTypeAdapter,这个因为之前提过的,顺便加了
You can view, comment on, or merge this pull request online at:
https://github.com/wzqjava/MVVMSmart/pull/41
Commit Summary
增加Gson解析 Boolean和String的null处理
增加示例代码
增加动态BaseUrl示例代码,不依赖BaseResponse解析
添加Gson转义测试代码
修改boolean 默认值1表示true
Update README.md
修改boolean 默认值1表示true
Merge branch 'MVVMSmart-kotlin' of https://github.com/hloong/MVVMSmart into MVVMSmart-kotlin
File Changes
M README.md (3)
A app/src/main/java/com/wzq/sample/bean/BaseUrlData.kt (7)
A app/src/main/java/com/wzq/sample/bean/TestGson.kt (22)
M app/src/main/java/com/wzq/sample/net/DemoApiService.kt (13)
M app/src/main/java/com/wzq/sample/net/MRequest.java (11)
M app/src/main/java/com/wzq/sample/ui/MainActivity.kt (24)
M app/src/main/java/com/wzq/sample/ui/testnet/TestNetFragment.kt (25)
M app/src/main/java/com/wzq/sample/ui/testnet/TestNetViewModel.kt (30)
M app/src/main/res/layout/fragment_test_net.xml (22)
M mvvmsmart/build.gradle (1)
M mvvmsmart/src/main/java/com/wzq/mvvmsmart/net/interceptor/HttpCommonInterceptor.java (56)
M mvvmsmart/src/main/java/com/wzq/mvvmsmart/net/net_utils/GsonUtil.java (5)
M mvvmsmart/src/main/java/com/wzq/mvvmsmart/net/net_utils/OkHttpUtil.java (3)
A mvvmsmart/src/main/java/com/wzq/mvvmsmart/net/net_utils/gsontypeadapter/BooleanTypeAdapter.java (57)
A mvvmsmart/src/main/java/com/wzq/mvvmsmart/net/net_utils/gsontypeadapter/StringTypeAdapter.java (43)
M mvvmsmart/src/main/java/com/wzq/mvvmsmart/net/observer/DefaultObserver.java (3)
A mvvmsmart/src/main/java/com/wzq/mvvmsmart/utils/constant/NetConstants.kt (30)
Patch Links:
https://github.com/wzqjava/MVVMSmart/pull/41.patch
https://github.com/wzqjava/MVVMSmart/pull/41.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
我在用这个框架,然后看到代码只有按照打包的方式配置的baseUrl,所以我在引入了一个针对单个请求动态设置baseurl的库 https://github.com/JessYanCoding/RetrofitUrlManager
因为我项目里的接口baseurl都是通过配置文件下发的,每个模块的baseurl不一样,用的比较急所以还没时间细看源码,不过知道是通过拦截固定header来替换baseUrl的,然后我把HttpCommonInterceptor 这个类的打印参数改了下,需要知道原来的请求url和实际响应的url
最后我增加了BooleanTypeAdapter和StringTypeAdapter,这个因为之前提过的,顺便加了