Ver Fonte

054 需求处理

zhangshenjie há 3 dias atrás
pai
commit
73be9c0061

+ 1 - 1
BusinessAirFryer/src/main/assets/config_054.json

@@ -76,7 +76,7 @@
     {
       "type": "TURBO",
       "name": "turbo",
-      "bg": "ic_mode_turbo_054",
+      "bg": "ic_mode_turbo_054_1",
       "icon": "ic_grid_turbo_054",
       "devMode": "SOUP",
       "listShow": true

BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/ic_mode_turbo_054_1.png


+ 7 - 114
BusinessMain/src/main/java/com/develop/main/ui/ModeEntranceActivity.kt

@@ -342,7 +342,11 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
                 binding.entranceRecycle.apply {
                     linear(RecyclerView.HORIZONTAL)
                     setup {
-                        addType<EntranceData>(com.develop.common.R.layout.item_entrance_night_view)
+                        if (sn.startsWith("054")){
+                            addType<EntranceData>(com.develop.common.R.layout.item_entrance_night_view_054)
+                        }else{
+                            addType<EntranceData>(com.develop.common.R.layout.item_entrance_night_view)
+                        }
                         onBind {
                             val model = getModel<EntranceData>()
                             findView<ImageView>(com.develop.common.R.id.iv_bg).src = model.bgResId
@@ -451,6 +455,7 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
                     }
                 }.models =
                     if (sn.startsWith("011")) DataFactory.get011NightEntranceData()
+                    else if (sn.startsWith("054")) DataFactory.get054NightEntranceData()
                     else DataFactory.getNightEntranceData()
             }
 
@@ -727,119 +732,7 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
                     }
                 }
             }.models = DataFactory.get029CEntranceData()
-        }  else if (sn.startsWith("054")) {
-            binding.entranceRecycle.apply {
-                linear(RecyclerView.HORIZONTAL)
-                setup {
-                    addType<EntranceData>(com.develop.common.R.layout.item_entrance_night_view_054)
-                    onBind {
-                        val model = getModel<EntranceData>()
-                        findView<ImageView>(com.develop.common.R.id.iv_bg).src = model.bgResId
-                        var appCompatTextView =
-                            findView<AppCompatTextView>(com.develop.common.R.id.tv_title)
-                        if (sn.startsWith("025")) {
-                            appCompatTextView.setGone()
-                        } else {
-                            appCompatTextView.setText(model.titleStrId)
-                        }
-                    }
-                    R.id.content_view.onClick {
-                        val clickModel = getModel<EntranceData>()
-                        title = getString(clickModel.title2StrId)
-                        when (clickModel.type) {
-                            EntranceType.automatic_recipes -> {
-                                if (FoodDataProvider.checkDataExit()) {
-                                    val bundle = Bundle()
-                                    bundle.putInt(MODE_ENTRANCE, Recipes)
-                                    bundle.putInt(RECIPES_TYPE, LocalFood)
-                                    bundle.putString(HOME_TITLE, title)
-                                    navigateTo(Screens.Main.HOME) {
-                                        with(bundle)
-                                    }
-                                } else {
-                                    showLoading()
-                                }
-                            }
-
-                            EntranceType.automatic_programmes -> {
-                                if (FoodDataProvider.checkDataExit()) {
-                                    val bundle = Bundle()
-                                    bundle.putInt(MODE_ENTRANCE, Mode)
-                                    bundle.putString(HOME_TITLE, title)
-                                    navigateTo(Screens.Main.HOME) {
-                                        with(bundle)
-                                    }
-                                } else {
-                                    showLoading()
-                                }
-                            }
-
-                            EntranceType.manual_cooking -> {
-                                if (FoodDataProvider.checkDataExit()) {
-
-
-                                    var modeName =
-                                        if (sn.startsWith("011")) resources.getString(com.develop.common.R.string.manual_cooking_011)
-                                            .replace(
-                                                "\n",
-                                                " "
-                                            ) else resources.getString(com.develop.common.R.string.adapted_cooking)
-                                    navigateTo(Screens.Cook.COOK_MODES) {
-
-                                        if (DevModes.SOUP == CofarSDK.devInfo().devMode) {
-                                            val bundle = Bundle()
-                                            bundle.putString(
-                                                MODE_TYPE,
-                                                WorkModes.ADAPTED_COOKING
-                                            )
-                                            bundle.putString(
-                                                "mode_name",
-                                                modeName
-                                            )
-                                            with(bundle)
-                                        } else {
-                                            val bundle = Bundle()
-                                            bundle.putString(MODE_TYPE, WorkModes.AF_DIY)
-                                            with(bundle)
-                                        }
-
-
-                                    }
-                                } else {
-                                    showLoading()
-                                }
-                            }
-
-                            EntranceType.download_new_recipes -> {
-                                if (sn.startsWith("011")) {
-                                    if (NetworkUtils.isWifiConnected()) {
-                                        if (!AppVersionUtil.dialogRecipeUpdate.isShow) {
-                                            AppVersionUtil.checkAboutRecipeUpdate(true)
-                                        }
-                                    } else {
-                                        GlobalToast.showToast(getString(com.develop.common.R.string.network_error))
-
-                                    }
-                                } else {
-                                    if (FoodDataProvider.checkDataExit()) {
-                                        val bundle = Bundle()
-                                        bundle.putInt(MODE_ENTRANCE, Recipes)
-                                        bundle.putInt(RECIPES_TYPE, NetFood)
-                                        bundle.putString(HOME_TITLE, title)
-                                        navigateTo(Screens.Main.HOME) {
-                                            with(bundle)
-                                        }
-                                    } else {
-                                        showLoading()
-                                    }
-                                }
-
-                            }
-                        }
-                    }
-                }
-            }.models = DataFactory.get054NightEntranceData()
-        }else if (sn.startsWith("049")) {
+        } else if (sn.startsWith("049")) {
             binding.entranceRecycle049.apply {
 //                linear(RecyclerView.HORIZONTAL)
                 grid(4)

+ 20 - 20
app/build.gradle

@@ -20,9 +20,9 @@ ext {
     versionCode = Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
 //    brandCode="000B"
-    brandCode = "033H"
-//    model = "5037"
-    model = "1039"
+    brandCode = "054A"
+    model = "5037"
+//    model = "1039"
 
 }
 
@@ -615,7 +615,7 @@ android {
             manifestPlaceholders = [channelName: "brand054A5037Tuya"]
             dimension "platform"
             applicationId "com.develop.foodcooking"
-            buildConfigField("String", "UpdatePlatform", "\"night\"")
+            buildConfigField("String", "UpdatePlatform", "\"011\"")
             resValue("string", "app_theme", "@style/Splash054ATheme")
             buildConfigField("String", "model", "\"5037\"")
             buildConfigField("String", "brandCode", "\"054A\"")
@@ -896,14 +896,14 @@ android {
 //            //appCode 1.01 指向bug修复,2.01指向功能变更
 //            buildConfigField("String", "appCode", "\"1.01\"")
 
-            manifestPlaceholders = [channelName: "brand010I"]
-            buildConfigField("String", "UpdatePlatform", "\"normal\"")
-            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
-            buildConfigField("String", "model", "\"1039\"")
-            buildConfigField("String", "brandCode", "\"010I\"")
-            //appCode 1.01 指向bug修复,2.01指向功能变更
-            buildConfigField("String", "appCode", "\"1.01\"")
-            buildConfigField("String", "time", "\"${getCurrentTime()}\"")
+//            manifestPlaceholders = [channelName: "brand010I"]
+//            buildConfigField("String", "UpdatePlatform", "\"normal\"")
+//            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
+//            buildConfigField("String", "model", "\"1039\"")
+//            buildConfigField("String", "brandCode", "\"010I\"")
+//            //appCode 1.01 指向bug修复,2.01指向功能变更
+//            buildConfigField("String", "appCode", "\"1.01\"")
+//            buildConfigField("String", "time", "\"${getCurrentTime()}\"")
 
 
 //            buildConfigField("String", "UpdatePlatform", "\"normal\"")
@@ -1035,14 +1035,14 @@ android {
 //            //appCode 1.01 指向bug修复,2.01指向功能变更
 //            buildConfigField("String", "appCode", "\"1.01\"")
 
-//            manifestPlaceholders = [channelName: "brand054ATuya"]
-//            buildConfigField("String", "UpdatePlatform", "\"night\"")
-//            resValue("string", "app_theme", "@style/Splash054ATheme")
-//            buildConfigField("String", "model", "\"5037\"")
-//            buildConfigField("String", "brandCode", "\"054A\"")
-//            //appCode 1.01 指向bug修复,2.01指向功能变更
-//            buildConfigField("String", "appCode", "\"1.01\"")
-//            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
+            manifestPlaceholders = [channelName: "brand054ATuya"]
+            buildConfigField("String", "UpdatePlatform", "\"011\"")
+            resValue("string", "app_theme", "@style/Splash054ATheme")
+            buildConfigField("String", "model", "\"5037\"")
+            buildConfigField("String", "brandCode", "\"054A\"")
+            //appCode 1.01 指向bug修复,2.01指向功能变更
+            buildConfigField("String", "appCode", "\"1.01\"")
+            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
 
 //            manifestPlaceholders = [channelName: "brand025ATuya"]
 //            buildConfigField("String", "UpdatePlatform", "\"night\"")

+ 3 - 3
libBase/src/main/java/com/develop/base/ext/GlobaExt.kt

@@ -232,7 +232,7 @@ fun getSN(): String {
 
 //        return "000B10390020123010190001"
 //        return "025A10390020123010190001"
-//        return "054A50370020123010190001"
+        return "054A50370020123010190001"
 //        return "054A10390020123010190001"
 //        return "010D10390020123010190001"
 //        return "010F10390020123010190001"
@@ -250,7 +250,7 @@ fun getSN(): String {
 //    return  "017A20060020123010190001"
 //        return  "017A10390020123010190001"
 //    return "010D10390020123010190001"
-        return "010I10390020123010190001"
+//        return "010I10390020123010190001"
 //        return "010D10390020123010190001"
 //    return "000A10390020123010190009"
 //        return "032E21060020123010190001"
@@ -277,7 +277,7 @@ fun getSN(): String {
 //        return  "049B10390020123010190001"
 //        return "000A50370020123010190017"
 //        return  "053A10390020123010190088"
-//          return "053A103 90020123010190001"
+//          return "053A10390020123010190001"
 //        return  "000A10390020123010190023"
 //        return  "000A21050020123010190023"
 //        return "000A50670020123010190005"