|
@@ -46,7 +46,12 @@ import com.develop.common.data_repo.db.FilterSortModel
|
|
|
import com.develop.common.data_repo.db.FoodContentModel
|
|
|
import com.develop.common.data_repo.db.HomeHeader
|
|
|
import com.develop.common.data_repo.db.SortedType
|
|
|
+import com.develop.common.data_repo.db.entity.DevAccessory
|
|
|
+import com.develop.common.data_repo.db.entity.DevRecipe
|
|
|
import com.develop.common.data_repo.db.entity.DevRecipeCategory
|
|
|
+import com.develop.common.data_repo.db.entity.DevRecipeFood
|
|
|
+import com.develop.common.data_repo.db.entity.DevRecipeNutrition
|
|
|
+import com.develop.common.data_repo.db.entity.DevRecipePortionSize
|
|
|
import com.develop.common.data_repo.db.getTime
|
|
|
import com.develop.common.dialog.CancelConfirmDialog
|
|
|
import com.develop.common.dialog.CommonDialog
|
|
@@ -55,6 +60,7 @@ import com.develop.common.food_sdk.GlobalDevEvent
|
|
|
import com.develop.common.router.Screens
|
|
|
import com.develop.common.tag.CURRENT_LANGUAGE
|
|
|
import com.develop.common.tuya_bean.CategoryBean
|
|
|
+import com.develop.common.tuya_bean.RecipesBean
|
|
|
import com.develop.common.tuya_bean.RecipesListBean
|
|
|
import com.develop.common.ui.CommonBVMActivity
|
|
|
import com.develop.common.utils.AppVersionUtil
|
|
@@ -394,12 +400,7 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
|
|
|
binding.ivLogo.setOnClickListener {
|
|
|
|
|
|
// pageSize++
|
|
|
-
|
|
|
- var pointer = TuyaApi.INSTANCE.http_common_post_simple(
|
|
|
- "tuya.device.menu.category.list", "2.0", "{\"lang\":\"en\"}", ""
|
|
|
- )
|
|
|
-// Log.i("tuya_iot", "data:" + pointer.getString(0))
|
|
|
- Log.i("tuya_iot", "po:"+ pointer.toString())
|
|
|
+ getCook("3898712")
|
|
|
|
|
|
weightAlignCount++
|
|
|
if (weightAlignCount >= 7) {
|
|
@@ -482,6 +483,10 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
|
|
|
}
|
|
|
|
|
|
binding.tvAppVersion.setOnClickListener {
|
|
|
+
|
|
|
+ getCook("3899112")
|
|
|
+
|
|
|
+
|
|
|
adbCount++
|
|
|
if (adbCount >= 7) {
|
|
|
adbCount = 0
|
|
@@ -511,9 +516,7 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
|
|
|
|
|
|
|
|
|
binding.devSn.setOnClickListener {
|
|
|
-// searchRecipes()
|
|
|
- getRecipes()
|
|
|
-// getappLog()
|
|
|
+ getCook("3858012")
|
|
|
|
|
|
|
|
|
testCount++
|
|
@@ -569,6 +572,32 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ fun getCook(number : String){
|
|
|
+ var lang = MMkvUtils.getString(CURRENT_LANGUAGE) ?: "en"
|
|
|
+
|
|
|
+ var map = HashMap<String, Any>()
|
|
|
+ map["lang"] = lang
|
|
|
+ map["menuId"] = number
|
|
|
+
|
|
|
+
|
|
|
+ var gson = Gson()
|
|
|
+ var json = gson.toJson(map)
|
|
|
+ CommonUtils.getTuyaBean<RecipesBean>("tuya.device.menu.get", "1.0",
|
|
|
+ json, RecipesBean::class.java, object : CommonUtils.TuyaHttp<RecipesBean> {
|
|
|
+ override fun bean(t: RecipesBean) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ override fun fail() {
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
fun getappLog() {
|
|
|
var lang = MMkvUtils.getString(CURRENT_LANGUAGE) ?: "en"
|
|
|
var titleMap = HashMap<String, Any>()
|