zhangshenjie 2 týždňov pred
rodič
commit
1ffcb68d7b

+ 326 - 0
BusinessAirFryer/src/main/assets/config_000B.json

@@ -0,0 +1,326 @@
+{
+  "baseQrUrl": "https://icook.cofarcn.com/h5/index.html",
+  "workModes": [
+    {
+      "type": "ADAPTED_COOKING",
+      "name": "adapted_cooking",
+      "bg": "ic_mode_diy_054",
+      "icon": "ic_grid_adapted_cooking_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "BROWN",
+      "name": "brown",
+      "bg": "cm_icon_roast",
+      "icon": "cm_icon_roast",
+      "devMode": "SOUP",
+      "listShow": false
+    },
+    {
+      "type": "ROAST",
+      "name": "roast",
+      "bg": "cm_icon_roast",
+      "icon": "cm_icon_roast",
+      "devMode": "SOUP",
+      "listShow": false
+    },
+
+    {
+      "type": "COOK_EGGS",
+      "name": "cook_eggs",
+      "bg": "cm_icon_cook_eggs_bg",
+      "icon": "cm_icon_cook_eggs",
+      "devMode": "SOUP",
+      "listShow": false
+    },
+    {
+      "type": "WIGHT",
+      "name": "wight",
+      "bg": "ic_mode_weight_054",
+      "icon": "ic_grid_weight_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "BOIL_WATER",
+      "name": "boil_water",
+      "bg": "ic_mode_boil_water_054",
+      "icon": "ic_grid_boil_water_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "CHOP",
+      "name": "chop",
+      "bg": "ic_mode_chop_054",
+      "icon": "ic_grid_chop_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "SLOW_COOK",
+      "name": "slow_cook",
+      "bg": "ic_mode_slow_cook_054",
+      "icon": "ic_grid_slow_cook_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "KNEAD_TOUGH",
+      "name": "knead_dough",
+      "bg": "ic_mode_knead_dough_054",
+      "icon": "ic_grid_knead_dough_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "STEAM",
+      "name": "steam",
+      "bg": "ic_mode_steam_054",
+      "icon": "ic_grid_steam_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "FOOD_PROCESSOR",
+      "name": "food_processor",
+      "bg": "ic_mode_food_processor_054",
+      "icon": "ic_grid_food_processor_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "TURBO",
+      "name": "turbo",
+      "bg": "ic_mode_turbo_054",
+      "icon": "ic_grid_turbo_054",
+      "devMode": "SOUP",
+      "listShow": true
+    },
+    {
+      "type": "CITRUS_JUICER",
+      "name": "citrus_juicer",
+      "bg": "ic_mode_citrus_juicer",
+      "icon": "ic_grid_citrus_juicer",
+      "devMode": "SOUP",
+      "listShow": false
+    },
+    {
+      "type": "DICING",
+      "name": "dicing",
+      "bg": "ic_mode_dicing",
+      "icon": "ic_grid_dicing",
+      "devMode": "SOUP",
+      "listShow": false
+    },
+
+    {
+      "type": "POTATO_PEELER",
+      "name": "potato_peeler",
+      "bg": "ic_mode_potato_peeler",
+      "icon": "ic_grid_potato_peeler",
+      "devMode": "SOUP",
+      "listShow": false
+    },
+
+
+
+    {
+      "type": "AF_DIY",
+      "name": "af_diy",
+      "bg": "af_diy_bg",
+      "icon": "af_diy",
+      "devMode": "AIR_FRYER",
+      "listShow": false
+    },
+    {
+      "type": "AF_AIR_FRYER",
+      "name": "af_air_fryer",
+       "bg": "af_air_fryer_bg",
+      "icon": "af_air_fryer",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "WIGHT",
+      "name": "wight",
+      "bg": "ic_mode_weight",
+      "icon": "ic_grid_weight",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_BAKE",
+      "name": "af_bake",
+      "bg": "af_bake_bg",
+      "icon": "af_bake",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_DRUMSTICKS",
+      "name": "af_drumsticks",
+      "bg": "af_drumsticks_bg",
+      "icon": "af_drumsticks",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_EGG_TART",
+      "name": "af_egg_tart",
+      "bg": "af_egg_tart_bg",
+      "icon": "af_egg_tart",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_PIZZA",
+      "name": "af_pizza",
+      "bg": "af_pizza_bg",
+      "icon": "af_pizza",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_DEHYDRATE",
+      "name": "af_dehydrate",
+      "bg": "af_dehydrate_bg",
+      "icon": "af_dehydrate",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_REHEAT",
+      "name": "af_reheat",
+      "bg": "af_reheat_bg",
+      "icon": "af_reheat",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_CHICKEN_WING",
+      "name": "af_chicken_wing",
+      "bg": "af_chicken_wing_bg",
+      "icon": "af_chicken_wing",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_STEAK",
+      "name": "af_steak",
+      "bg": "af_steak_bg",
+      "icon": "af_steak",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_SEA_FOOD",
+      "name": "af_sea_food",
+      "bg": "af_sea_food_bg",
+      "icon": "af_sea_food",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_VEGETABLE",
+      "name": "af_vegetable",
+      "bg": "af_vegetable_bg",
+      "icon": "af_vegetable",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+    {
+      "type": "AF_MUTTON_CHOP",
+      "name": "af_mutton_chop",
+      "bg": "af_mutton_chop_bg",
+      "icon": "af_mutton_chop",
+      "devMode": "AIR_FRYER",
+      "listShow": true
+    },
+
+
+    {
+      "type": "SM_DIY",
+      "name": "sm_diy",
+      "bg": "ic_special_diy_mode_bg",
+      "icon": "ic_special_diy_mode",
+      "devMode": "STAND_MIXER",
+      "listShow": true
+    },
+    {
+      "type": "SM_KNEAD",
+      "name": "sm_knead",
+      "bg": "ic_sm_knead_bg",
+      "icon": "ic_sm_knead",
+      "devMode": "STAND_MIXER",
+      "listShow": true
+    },
+    {
+      "type": "SM_WHISK",
+      "name": "sm_whisk",
+      "bg": "ic_sm_whisk_bg",
+      "icon": "ic_sm_whisk",
+      "devMode": "STAND_MIXER",
+      "listShow": true
+    },
+    {
+      "type": "SM_BEATER",
+      "name": "sm_beater",
+      "bg": "ic_sm_beater_bg",
+      "icon": "ic_sm_beater",
+      "devMode": "STAND_MIXER",
+      "listShow": true
+    },
+    {
+      "type": "SM_SHREDDER",
+      "name": "sm_shredder",
+      "bg": "ic_sm_shredder_bg",
+      "icon": "ic_sm_shredder",
+      "devMode": "STAND_MIXER",
+      "listShow": false
+    },
+    {
+      "type": "SM_MEAT_GRUBDER",
+      "name": "sm_meat_grubder",
+      "bg": "ic_sm_meat_grubder_bg",
+      "icon": "ic_sm_meat_grubder",
+      "devMode": "STAND_MIXER",
+      "listShow": false
+    },
+    {
+      "type": "SM_BLENDER",
+      "name": "sm_blender",
+      "bg": "ic_sm_blender_bg",
+      "icon": "ic_sm_blender",
+      "devMode": "STAND_MIXER",
+      "listShow": false
+    },
+    {
+      "type": "SM_PASTA_MAKER",
+      "name": "sm_pasta_maker",
+      "bg": "ic_sm_pasta_maker_bg",
+      "icon": "ic_sm_pasta_maker",
+      "devMode": "STAND_MIXER",
+      "listShow": false
+    },
+    {
+      "type": "SM_TURBO",
+      "name": "turbo",
+      "bg": "ic_sm_turbo_bg",
+      "icon": "ic_sm_turbo",
+      "devMode": "STAND_MIXER",
+      "listShow": false
+    },
+    {
+      "type": "SM_WIGHT",
+      "name": "wight",
+      "bg": "ic_sm_wight_bg",
+      "icon": "ic_sm_wight",
+      "devMode": "STAND_MIXER",
+      "listShow": true
+    }
+
+
+  ]
+}

+ 18 - 1
BusinessCommon/src/main/java/com/develop/common/data_repo/db/DataFactory.kt

@@ -691,7 +691,12 @@ val dataSn = getSN()
         R.drawable.entrance_bg_3,
         R.drawable.entrance_bg_4
     )
-
+    private var bg000ResIds = arrayListOf<Int>(
+        R.drawable.entrance_bg_000_1,
+        R.drawable.entrance_bg_000_2,
+        R.drawable.entrance_bg_000_3,
+        R.drawable.entrance_bg_000_4
+    )
     private var bg029ResIds = arrayListOf<Int>(
         R.drawable.entrance_bg_029_1,
         R.drawable.entrance_bg_029_2,
@@ -924,6 +929,18 @@ val dataSn = getSN()
         return dataList
     }
 
+    fun get000BEntranceData(): MutableList<EntranceData> {
+        val dataList = mutableListOf<EntranceData>()
+        for (i in iconResIds.indices) {
+            dataList.add(
+                EntranceData(
+                    bg000ResIds[i], iconResIds[i], titleStrIds[i], title2StrIds[i], typeList[i]
+                )
+            )
+        }
+        return dataList
+    }
+
     fun get036IEntranceData(): MutableList<EntranceData> {
         val dataList = mutableListOf<EntranceData>()
         for (i in iconResIds.indices) {

+ 10 - 4
BusinessCommon/src/main/java/com/develop/common/utils/ConfigUtils.kt

@@ -36,11 +36,17 @@ object ConfigUtils {
             val fileList = GlobalApp().assets.list("") ?: arrayOf()
             var inputStream: InputStream? = null
 
-            if (fileList.contains("config_${brandNum}.json")) {
-                inputStream = GlobalApp().assets.open("config_${brandNum}.json")
-            } else {
-                inputStream = GlobalApp().assets.open("config.json")
+            if (sn.startsWith("000B")){
+                //由于000B 是要黑色风格,因为皮肤包问题,估在这添加多000B配置
+                inputStream = GlobalApp().assets.open("config_000B.json")
+            }else{
+                if (fileList.contains("config_${brandNum}.json")) {
+                    inputStream = GlobalApp().assets.open("config_${brandNum}.json")
+                } else {
+                    inputStream = GlobalApp().assets.open("config.json")
+                }
             }
+
 //            inputStream = GlobalApp().assets.open("config_036.json")
 
             val size = inputStream.available()

BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/entrance_bg_000_1.webp


BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/entrance_bg_000_2.webp


BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/entrance_bg_000_3.webp


BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/entrance_bg_000_4.webp


BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/entrance_bg_1.webp


BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/entrance_bg_2.webp


BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/entrance_bg_3.webp


BIN
BusinessCommon/src/main/res/drawable-xxxhdpi/entrance_bg_4.webp


+ 8 - 2
BusinessMain/src/main/java/com/develop/main/ui/ModeEntranceActivity.kt

@@ -134,7 +134,11 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
         }
 
         if (isNightTheme()) {
-            if (sn.startsWith("053") || sn.startsWith("045")) {
+            if (sn.startsWith("053") || sn.startsWith("045")||sn.startsWith("000B")) {
+                if (sn.startsWith("000B")){
+                    binding.ivTab.setImageResource(com.develop.common.R.drawable.ic_tab_000)
+                }
+
                 binding.entranceRecycle.apply {
                     grid(2)
                     setup {
@@ -231,7 +235,9 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
                         }
                     }
                 }.models =
-                    if (sn.startsWith("045")) DataFactory.get045AEntranceData() else DataFactory.get053AEntranceData()
+                    if (sn.startsWith("045")) DataFactory.get045AEntranceData()
+                    else if (sn.startsWith("000B")) DataFactory.get000BEntranceData()
+                    else DataFactory.get053AEntranceData()
             } else if (sn.startsWith("077")||sn.startsWith("025")) {
                 binding.contentView.setBackgroundColor(resources.getColor(com.develop.common.R.color.white))
                 binding.ivTab.setImageResource(com.develop.common.R.drawable.ic_tab_000)

+ 1 - 1
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -331,7 +331,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
 //                ).into(binding.ivBanner)
             }
         } else {
-            if (sn.startsWith("054A")||sn.startsWith("053A")) {
+            if (sn.startsWith("054A")||sn.startsWith("053A")||sn.startsWith("000B")) {
                 workMode?.let {
                     if (!(it.bg==null ||""==it.bg|| "null"==it.bg)){
                         binding.ivBanner.setImageResource(

+ 1 - 1
app/build.gradle

@@ -94,7 +94,7 @@ android {
             manifestPlaceholders = [channelName: "brand000BTuya"]
             dimension "platform"
             applicationId "com.develop.foodcooking"
-            buildConfigField("String", "UpdatePlatform", "\"normal\"")
+            buildConfigField("String", "UpdatePlatform", "\"night\"")
             resValue("string", "app_theme", "@style/SplashTheme")
             buildConfigField("String", "model", "\"1039\"")
             buildConfigField("String", "brandCode", "\"000B\"")