生产域名配置
This commit is contained in:
@@ -45,7 +45,7 @@ object GlobalData {
|
|||||||
*/
|
*/
|
||||||
const val TEST_BASE_URL = "http://192.168.1.201:14801"
|
const val TEST_BASE_URL = "http://192.168.1.201:14801"
|
||||||
const val UAT_BASE_URL = "https://dev.yixiong-tech.com:8081"
|
const val UAT_BASE_URL = "https://dev.yixiong-tech.com:8081"
|
||||||
const val PROD_BASE_URL = "生产环境"
|
const val PROD_BASE_URL = "https://api.dm.yixiong-tech.com:8443"
|
||||||
var appBaseUrl: String = ""
|
var appBaseUrl: String = ""
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.sw.inbound.di
|
package com.sw.inbound.di
|
||||||
|
|
||||||
|
import com.google.gson.GsonBuilder
|
||||||
import com.sw.inbound.MyApp
|
import com.sw.inbound.MyApp
|
||||||
import com.sw.inbound.network.api.ApiService
|
import com.sw.inbound.network.api.ApiService
|
||||||
import com.sw.inbound.network.interceptor.RequestInterceptor
|
import com.sw.inbound.network.interceptor.RequestInterceptor
|
||||||
@@ -51,11 +52,15 @@ object NetworkModule {
|
|||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit {
|
fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit {
|
||||||
|
val gson = GsonBuilder()
|
||||||
|
.setLenient()
|
||||||
|
.create()
|
||||||
|
|
||||||
return Retrofit.Builder()
|
return Retrofit.Builder()
|
||||||
// .baseUrl(DEVICE_BASE_URL)
|
// .baseUrl(DEVICE_BASE_URL)
|
||||||
.baseUrl(BASE_URL)
|
.baseUrl(BASE_URL)
|
||||||
.client(okHttpClient)
|
.client(okHttpClient)
|
||||||
.addConverterFactory(GsonConverterFactory.create())
|
.addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user