diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/login/model/LoginModel.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/login/model/LoginModel.kt index 2d5235085b..07af16189c 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/login/model/LoginModel.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/login/model/LoginModel.kt @@ -12,9 +12,11 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant +import com.mogo.eagle.core.utilcode.util.AppUtils import com.mogo.eagle.core.utilcode.util.DateTimeUtils import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.eagle.core.utilcode.util.NetworkUtils +import com.mogo.eagle.core.utilcode.util.Utils import com.mogo.och.biz.R import com.mogo.och.biz.login.bean.DriverStatusQueryRespBean import com.mogo.och.biz.login.bean.TaxiLoginReqBean @@ -35,10 +37,13 @@ import com.mogo.och.common.module.utils.DateTimeUtil import com.mogo.och.common.module.utils.ToastUtilsOch import com.mogo.och.common.module.wigets.toast.ToastCharterUtils import com.mogo.och.data.manager.cache.CacheDataManager +import com.mogo.skin.Skin +import com.mogo.skin.SkinManager import io.reactivex.Observable import io.reactivex.disposables.Disposable import java.util.concurrent.TimeUnit + /** * Created by pangfan on 2021/8/19 * @@ -183,6 +188,14 @@ object LoginModel { OchCommonServiceManager.queryDriverServiceStatus(it, object : OchCommonServiceCallback { override fun onSuccess(data: DriverStatusQueryRespBean?) { go2LoginInfo(data) + // TODO yangyakun 根据后台配置的用户租户对应的皮肤包进行下载换肤 + val skin = Skin( + "f97d8076dcedd2cb5c30149da28cf863", + "YiXin-skin.skin", + "https://carlife-static-1255510688.cos.ap-beijing.myqcloud.com/MoGoEagleEye/YiXin-skin.skin" + ) + //换肤 + SkinManager.getInstance().selectSkin(Utils.getApp(), skin) } override fun onError() { diff --git a/config.gradle b/config.gradle index 5fe07c2dfa..5ce7f621f8 100644 --- a/config.gradle +++ b/config.gradle @@ -158,6 +158,7 @@ ext { mogoaicloudtrafficlive : "com.mogo.cloud:trafficlive:${MOGO_TRAFFICLIVE_VERSION}", mogoaicloudlocation : "com.mogo.cloud:location:${MOGO_LOCATION_VERSION}", mogoaicloudtelematic : "com.mogo.cloud:telematic:${MOGO_TELEMATIC_VERSION}", + mogo_aicloud_skin : "com.mogo.cloud:skin:${MOGO_SKIN_VERSION}", //========================= 新架构的 Maven 版本管理 ========================= mogo_core_function_devatools : "com.mogo.eagle.core.function.impl:devatools:${MOGO_CORE_FUNCTION_DEVATOOLS_VERSION}", diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java index 06f18ce8cf..9a70142658 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java @@ -19,6 +19,7 @@ import com.mogo.eagle.core.function.main.threadopt.ThreadOptInitializer; import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; +import com.mogo.skin.SkinManager; import java.util.HashMap; @@ -33,6 +34,10 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { @Override public void onCreate() { super.onCreate(); + + // 动态换肤 + SkinManager.init(this); + if (!shouldInit()) { return; } diff --git a/core/mogo-core-res/build.gradle b/core/mogo-core-res/build.gradle index 8a87222931..d850b9edae 100644 --- a/core/mogo-core-res/build.gradle +++ b/core/mogo-core-res/build.gradle @@ -73,6 +73,7 @@ dependencies { api rootProject.ext.dependencies.livesdk implementation 'com.android.support:cardview-v7:26.1.0' + api rootProject.ext.dependencies.mogo_aicloud_skin if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { implementation rootProject.ext.dependencies.mogo_core_utils diff --git a/gradle.properties b/gradle.properties index 4146a020b8..e8ac5052b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -64,21 +64,23 @@ bytex.ASM_API=ASM7 LOGLIB_VERSION=1.10.18 ######## MogoAiCloudSDK Version ######## # 网络请求LOGLIB_VERSION -MOGO_NETWORK_VERSION=1.4.7.40 +MOGO_NETWORK_VERSION=1.4.7.42 # 鉴权 -MOGO_PASSPORT_VERSION=1.4.7.40 +MOGO_PASSPORT_VERSION=1.4.7.42 # 长链接 -MOGO_SOCKET_VERSION=1.4.7.40 +MOGO_SOCKET_VERSION=1.4.7.42 # 数据采集 -MOGO_REALTIME_VERSION=1.4.7.40 +MOGO_REALTIME_VERSION=1.4.7.42 # 直播推流 -MOGO_LIVE_VERSION=1.4.7.40 +MOGO_LIVE_VERSION=1.4.7.42 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.4.7.40 +MOGO_TRAFFICLIVE_VERSION=1.4.7.42 # 定位服务 -MOGO_LOCATION_VERSION=1.4.7.40 +MOGO_LOCATION_VERSION=1.4.7.42 # 远程通讯模块 -MOGO_TELEMATIC_VERSION=1.4.7.40 +MOGO_TELEMATIC_VERSION=1.4.7.42 +# 动态换肤SDK +MOGO_SKIN_VERSION=1.4.7.42 ######## MogoAiCloudSDK Version ######## # 自研地图 MAP_SDK_VERSION=3.4.1.2 diff --git a/settings.gradle b/settings.gradle index b54bd67017..5f7182469d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -90,3 +90,7 @@ include ':OCH:offline:driver' include ':core:function-impl:mogo-core-function-patch' + + +// 以下是项目定制中的不同皮肤项目,皮肤项目独立打包并通过 COS 发布,后续借助运营平台能力进行动态维护 +include ':skin:YiXin-skin' diff --git a/skin/README.md b/skin/README.md new file mode 100644 index 0000000000..8db220cb8b --- /dev/null +++ b/skin/README.md @@ -0,0 +1,4 @@ +# 应用皮肤包 +> 这里按照不同的项目(mogo、德清、易鑫)需要的皮肤包 +> 皮肤包均为无代码的项目资源包, +- diff --git a/skin/YiXin-skin/.gitignore b/skin/YiXin-skin/.gitignore new file mode 100644 index 0000000000..796b96d1c4 --- /dev/null +++ b/skin/YiXin-skin/.gitignore @@ -0,0 +1 @@ +/build diff --git a/skin/YiXin-skin/build.gradle b/skin/YiXin-skin/build.gradle new file mode 100644 index 0000000000..b65caba527 --- /dev/null +++ b/skin/YiXin-skin/build.gradle @@ -0,0 +1,30 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 26 + + defaultConfig { + applicationId "com.dongnao.app.skin" + minSdkVersion 21 + targetSdkVersion 26 + versionCode 1 + versionName "1.0" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + + lintOptions { + abortOnError false + } + +} + +dependencies { + implementation fileTree(include: ['*.jar'], dir: 'libs') + testImplementation 'junit:junit:4.12' +} diff --git a/skin/YiXin-skin/proguard-rules.pro b/skin/YiXin-skin/proguard-rules.pro new file mode 100644 index 0000000000..f1b424510d --- /dev/null +++ b/skin/YiXin-skin/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/skin/YiXin-skin/src/main/AndroidManifest.xml b/skin/YiXin-skin/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..f5abfd51b0 --- /dev/null +++ b/skin/YiXin-skin/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_1080x1920.png b/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_1080x1920.png new file mode 100644 index 0000000000..26130175b7 Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_1080x1920.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_1920x1080.png b/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_1920x1080.png new file mode 100644 index 0000000000..75df2ac20e Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_1920x1080.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_2560x1600.png b/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_2560x1600.png new file mode 100644 index 0000000000..c535403510 Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-nodpi/biz_login_passenger_2560x1600.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_bus_passenger_logo.png b/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_bus_passenger_logo.png new file mode 100644 index 0000000000..0f4ddadf67 Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_bus_passenger_logo.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_notice_default.png b/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_notice_default.png new file mode 100644 index 0000000000..829e350d71 Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_notice_default.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_passenger_operation.png b/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_passenger_operation.png new file mode 100644 index 0000000000..92db26899b Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_passenger_operation.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_qr_center_logo.png b/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_qr_center_logo.png new file mode 100644 index 0000000000..66ae02a303 Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-xhdpi/icon_qr_center_logo.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-xhdpi/mogo_slogan.png b/skin/YiXin-skin/src/main/res/drawable-xhdpi/mogo_slogan.png new file mode 100644 index 0000000000..86a703b7c9 Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-xhdpi/mogo_slogan.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-xhdpi/road_video_bg.png b/skin/YiXin-skin/src/main/res/drawable-xhdpi/road_video_bg.png new file mode 100644 index 0000000000..99bfcefc6f Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-xhdpi/road_video_bg.png differ diff --git a/skin/YiXin-skin/src/main/res/drawable-xhdpi/shuttle_p_m2_status_bar_logo.png b/skin/YiXin-skin/src/main/res/drawable-xhdpi/shuttle_p_m2_status_bar_logo.png new file mode 100644 index 0000000000..6029163ee7 Binary files /dev/null and b/skin/YiXin-skin/src/main/res/drawable-xhdpi/shuttle_p_m2_status_bar_logo.png differ diff --git a/skin/YiXin-skin/src/main/res/values/colors.xml b/skin/YiXin-skin/src/main/res/values/colors.xml new file mode 100644 index 0000000000..42f0fd6956 --- /dev/null +++ b/skin/YiXin-skin/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #1F1F1F + #373935 + + #ffffff + + + #FFA500 + diff --git a/skin/YiXin-skin/src/main/res/values/strings.xml b/skin/YiXin-skin/src/main/res/values/strings.xml new file mode 100644 index 0000000000..8746b270c1 --- /dev/null +++ b/skin/YiXin-skin/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + + 易鑫 + \ No newline at end of file