Modify: 删除无用文件,现在是一个无项目相关性的可修改直接复用的MVVM架构框架
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
package com.quyunshuo.common.bean
|
||||
|
||||
data class TestBean(val msgTest: String)
|
||||
@ -6,6 +6,4 @@ package com.quyunshuo.common.constant
|
||||
* @Class: NetUrl
|
||||
* @Remark: 请求公共地址 统一放在此类
|
||||
*/
|
||||
object NetUrl {
|
||||
const val url1 = "https://api.com/"
|
||||
}
|
||||
object NetUrl
|
||||
@ -6,6 +6,4 @@ package com.quyunshuo.common.constant
|
||||
* @Class: RouteKey
|
||||
* @Remark: 路由使用中 用到的Key 统一写在此类中
|
||||
*/
|
||||
object RouteKey {
|
||||
const val KEY_NAME = "key_name"
|
||||
}
|
||||
object RouteKey
|
||||
@ -6,11 +6,4 @@ package com.quyunshuo.common.constant
|
||||
* @Class: RoutePath
|
||||
* @Remark: 路由地址
|
||||
*/
|
||||
object RouteUrl {
|
||||
|
||||
// MainActivity
|
||||
const val MainActivity: String = "/lib_splash/SplashActivity"
|
||||
|
||||
// MainActivity2
|
||||
const val MainActivity2: String = "/lib_splash/SplashActivity2"
|
||||
}
|
||||
object RouteUrl
|
||||
@ -6,6 +6,4 @@ package com.quyunshuo.common.constant
|
||||
* @Class: SpKey
|
||||
* @Remark: 本地存储的键 放在此类中
|
||||
*/
|
||||
object SpKey {
|
||||
const val IS_FIRST_START = "is_first_start"
|
||||
}
|
||||
object SpKey
|
||||
@ -1,7 +1,6 @@
|
||||
package com.quyunshuo.common.net
|
||||
|
||||
import com.quyunshuo.common.net.api.ApiCommonService
|
||||
import com.quyunshuo.common.net.api.ApiHomeService
|
||||
|
||||
/**
|
||||
* @Author: QuYunShuo
|
||||
@ -11,11 +10,6 @@ import com.quyunshuo.common.net.api.ApiHomeService
|
||||
*/
|
||||
object NetRequest {
|
||||
|
||||
// Home Service
|
||||
val homeService by lazy(mode = LazyThreadSafetyMode.NONE) {
|
||||
NetServiceCreator.create(ApiHomeService::class.java)
|
||||
}
|
||||
|
||||
// 公共接口
|
||||
val commonService by lazy(mode = LazyThreadSafetyMode.NONE) {
|
||||
NetServiceCreator.create(ApiCommonService::class.java)
|
||||
|
||||
@ -2,7 +2,6 @@ package com.quyunshuo.common.net
|
||||
|
||||
import com.quyunshuo.base.BaseApplication
|
||||
import com.quyunshuo.base.BuildConfig
|
||||
import com.quyunshuo.common.constant.NetUrl
|
||||
import com.readystatesoftware.chuck.ChuckInterceptor
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.logging.HttpLoggingInterceptor
|
||||
@ -18,7 +17,7 @@ import java.util.concurrent.TimeUnit
|
||||
*/
|
||||
object NetServiceCreator {
|
||||
|
||||
private const val BASE_URL = NetUrl.url1
|
||||
private const val BASE_URL = ""
|
||||
|
||||
private const val CONNECT_TIME_OUT = 15L
|
||||
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
package com.quyunshuo.common.net.api
|
||||
|
||||
import com.quyunshuo.common.bean.TestBean
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Query
|
||||
|
||||
/**
|
||||
* @Author: QuYunShuo
|
||||
* @Time: 2020/8/29
|
||||
* @Class: ApiService
|
||||
* @Remark: Home接口
|
||||
*/
|
||||
interface ApiHomeService {
|
||||
|
||||
// Retrofit 2.6版本开始支持协程 只需要将抽象方法写成挂起函数即可
|
||||
@GET()
|
||||
suspend fun getTestData(@Query("test") test: String): TestBean
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user