此module为android端通用代码封装
使用前必须先在Application中注册
class App: Application() {
override fun onCreate() {
super.onCreate()
// 在此注册后方可在应用内使用
CommonModule.regist(this)
// 打开调试
CommonModule.setDebugModeEnable(true)
// 初始化封装的Toast
ToastCompat.init(this)
}
}
封装了网络请求相关的数据模型,与后台返回接口对应
封装了AES&Base64 加密解密(AES有默认加密密钥)
封装了调用系统相册和相机获取图片功能
封住了SharedPreference的操作和单例非空验证的类
封装了KProgressHUD和dip转换工具
Retrofit封装