Procházet zdrojové kódy

涂鸦功能调试

zhangshenjie před 2 týdny
rodič
revize
33261d93e4

+ 22 - 1
BusinessSetting/src/main/java/com/develop/setting/ui/AboutActivity.kt

@@ -102,6 +102,9 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
     private var name = "A"
     private var sn = getSN()
     private var pageSize = 80
+    private var menuId = 3858012
+
+
     private val cancelConfirmDialog by lazy {
         CancelConfirmDialog()
     }
@@ -504,7 +507,7 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
 
         binding.devSn.setOnClickListener {
 //            searchRecipes()
-//            getRecipes()
+            getRecipes()
 //            getappLog()
 
 
@@ -608,6 +611,24 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
         }
 
 
+    }
+
+    fun getRecipesMenu(){
+        var map = HashMap<String, Any>()
+        map["lang"] = "PL"
+        map["menuId"] = 3858012
+        var json = GsonUtils.GsonString(map)
+        Log.e("TAG recipes", "json:$json")
+        appGlobalScope.launch(Dispatchers.IO) {
+            var httpResponse = TuyaUtils.ioTSDKManager.httpRequest("tuya.device.menu.get", "1.0", json)
+            var str = httpResponse.result
+            withContext(Dispatchers.Main) {
+                Log.d("TAG", "json:$str")
+            }
+
+        }
+
+
     }
 
     fun searchRecipes(){