| @@ -19,8 +19,8 @@ android { | |||||
| // minSdkVersion 26 | // minSdkVersion 26 | ||||
| minSdkVersion 21 | minSdkVersion 21 | ||||
| targetSdkVersion 25 | targetSdkVersion 25 | ||||
| versionCode 30007 | |||||
| versionName "3.0.7" | |||||
| versionCode 30009 | |||||
| versionName "3.0.9" | |||||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||||
| // ndk { | // ndk { | ||||
| @@ -76,6 +76,22 @@ android { | |||||
| // buildConfigField "String", "BASE_URL", '"http://192.168.69.99:9009"' | // buildConfigField "String", "BASE_URL", '"http://192.168.69.99:9009"' | ||||
| // buildConfigField "String", "M_URL", '"http://192.168.69.99:8098"' | // buildConfigField "String", "M_URL", '"http://192.168.69.99:8098"' | ||||
| // buildConfigField "String", "APP_NAME", '"家校互通(测试)"' | // buildConfigField "String", "APP_NAME", '"家校互通(测试)"' | ||||
| buildConfigField "String", "MP_ID",'"4"' | |||||
| buildConfigField "String", "ENV_NAME",'"qbj"' | |||||
| } | |||||
| cszxy { | |||||
| minifyEnabled false | |||||
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |||||
| signingConfig signingConfigs.release | |||||
| buildConfigField "String", "BASE_URL", '"https://oa.educlouddata.com/api"' | |||||
| buildConfigField "String", "M_URL", '"https://m.educlouddata.com"' | |||||
| buildConfigField "String", "OA_URL", '"https://oa.educlouddata.com"' | |||||
| buildConfigField "String", "APP_NAME", '"一体化平台"' | |||||
| buildConfigField "String", "MP_APPID", '"wxbb397ddae71bb14c"' | |||||
| buildConfigField "String", "WS_URL", '"wss://oa.educlouddata.com/ws2api/"' | |||||
| buildConfigField "String", "MP_ID",'"2"' | |||||
| buildConfigField "String", "ENV_NAME",'"cszxy"' | |||||
| } | } | ||||
| debug { | debug { | ||||
| @@ -96,6 +112,9 @@ android { | |||||
| buildConfigField "String", "MP_APPID", '"wxbb397ddae71bb14c"' | buildConfigField "String", "MP_APPID", '"wxbb397ddae71bb14c"' | ||||
| // buildConfigField "String", "WS_URL", '"ws://192.168.69.114:9801/"' | // buildConfigField "String", "WS_URL", '"ws://192.168.69.114:9801/"' | ||||
| buildConfigField "String", "WS_URL", '"wss://oa.live.educlouddata.com/ws2api/"' | buildConfigField "String", "WS_URL", '"wss://oa.live.educlouddata.com/ws2api/"' | ||||
| applicationIdSuffix ".live" | |||||
| buildConfigField "String", "MP_ID",'"2"' | |||||
| buildConfigField "String", "ENV_NAME",'"qbj"' | |||||
| } | } | ||||
| yzx_test { | yzx_test { | ||||
| @@ -10,6 +10,8 @@ object Config { | |||||
| var OA_URL = BuildConfig.OA_URL | var OA_URL = BuildConfig.OA_URL | ||||
| var WS_URL = BuildConfig.WS_URL | var WS_URL = BuildConfig.WS_URL | ||||
| var MP_APPID = BuildConfig.MP_APPID | var MP_APPID = BuildConfig.MP_APPID | ||||
| var MP_ID = BuildConfig.MP_ID | |||||
| var ENV_NAME = BuildConfig.ENV_NAME | |||||
| val APP_ID = 602 | val APP_ID = 602 | ||||
| @@ -4,6 +4,7 @@ import com.blankj.utilcode.util.LogUtils | |||||
| import com.lzy.okgo.OkGo | import com.lzy.okgo.OkGo | ||||
| import com.lzy.okgo.model.Response | import com.lzy.okgo.model.Response | ||||
| import com.yzx.escreen.config.Config | import com.yzx.escreen.config.Config | ||||
| import com.yzx.escreen.config.YzxInterface | |||||
| import com.yzx.escreen.model.BaseUser | import com.yzx.escreen.model.BaseUser | ||||
| import com.yzx.escreen.model.User | import com.yzx.escreen.model.User | ||||
| import com.yzx.escreen.model.WxQrTicket | import com.yzx.escreen.model.WxQrTicket | ||||
| @@ -11,7 +12,6 @@ import com.yzx.escreen.presenter.base.BasePresenter | |||||
| import com.yzx.escreen.presenter.base.IView | import com.yzx.escreen.presenter.base.IView | ||||
| import com.yzx.escreen.presenter.base.JsonCallBack | import com.yzx.escreen.presenter.base.JsonCallBack | ||||
| import com.yzx.escreen.presenter.base.YzxResponse | import com.yzx.escreen.presenter.base.YzxResponse | ||||
| import com.yzx.escreen.config.YzxInterface | |||||
| class LoginPresenter(view: LoginView) : BasePresenter<LoginView>(view) { | class LoginPresenter(view: LoginView) : BasePresenter<LoginView>(view) { | ||||
| fun login(phone: String, psw: String) { | fun login(phone: String, psw: String) { | ||||
| @@ -158,7 +158,7 @@ class LoginPresenter(view: LoginView) : BasePresenter<LoginView>(view) { | |||||
| val url = Config.BASE_URL + YzxInterface.INTERFACE_GENERATE_WX_QR_TICKET | val url = Config.BASE_URL + YzxInterface.INTERFACE_GENERATE_WX_QR_TICKET | ||||
| OkGo.post<YzxResponse<WxQrTicket>>(url) | OkGo.post<YzxResponse<WxQrTicket>>(url) | ||||
| .tag(this) | .tag(this) | ||||
| .params("mp_id", 4) | |||||
| .params("mp_id", Config.MP_ID) | |||||
| .execute(object : JsonCallBack<YzxResponse<WxQrTicket>>() { | .execute(object : JsonCallBack<YzxResponse<WxQrTicket>>() { | ||||
| override fun onSuccess(response: Response<YzxResponse<WxQrTicket>>?) { | override fun onSuccess(response: Response<YzxResponse<WxQrTicket>>?) { | ||||
| if (response?.isSuccessful == true) { | if (response?.isSuccessful == true) { | ||||
| @@ -6,11 +6,15 @@ import android.widget.ImageView | |||||
| import com.blankj.utilcode.util.TimeUtils | import com.blankj.utilcode.util.TimeUtils | ||||
| import com.bumptech.glide.Glide | import com.bumptech.glide.Glide | ||||
| import com.yzx.escreen.R | import com.yzx.escreen.R | ||||
| import com.yzx.escreen.config.Config | |||||
| import java.text.SimpleDateFormat | import java.text.SimpleDateFormat | ||||
| import java.util.TimeZone | import java.util.TimeZone | ||||
| fun ImageView.setSrc(identity: String, key: String) { | fun ImageView.setSrc(identity: String, key: String) { | ||||
| val url = "https://${identity.ifEmpty { "filea" }}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" | |||||
| var url = "https://${identity.ifEmpty { "filea" }}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" | |||||
| if(Config.ENV_NAME == 'cszxy'){ | |||||
| url = "https://filea.educlouddata.com/edufile/imageView?uniqueKey=${key}" | |||||
| } | |||||
| Glide.with(this) | Glide.with(this) | ||||
| .load(url) | .load(url) | ||||
| .placeholder(R.color.gray_1) | .placeholder(R.color.gray_1) | ||||
| @@ -19,7 +23,11 @@ fun ImageView.setSrc(identity: String, key: String) { | |||||
| } | } | ||||
| fun String.getImgUrl(key: String):String{ | fun String.getImgUrl(key: String):String{ | ||||
| return "https://${this.ifEmpty { "filea" }}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" | |||||
| var url = "https://${this.ifEmpty { "filea" }}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" | |||||
| if(Config.ENV_NAME == 'cszxy'){ | |||||
| url = "https://filea.educlouddata.com/edufile/imageView?uniqueKey=${key}" | |||||
| } | |||||
| return url | |||||
| } | } | ||||
| @@ -2,7 +2,7 @@ | |||||
| <bitmap xmlns:android="http://schemas.android.com/apk/res/android" | <bitmap xmlns:android="http://schemas.android.com/apk/res/android" | ||||
| android:gravity="bottom" | android:gravity="bottom" | ||||
| android:dither="true" | android:dither="true" | ||||
| android:src="@mipmap/login_bg" | |||||
| android:src="@mipmap/login_bg_v2" | |||||
| android:tileMode="disabled"> | android:tileMode="disabled"> | ||||
| </bitmap> | </bitmap> | ||||