|
@@ -511,12 +511,11 @@ class CookDetailViewModel : BaseViewModel() {
|
|
|
parts.let {string->
|
|
|
string.forEach { str ->
|
|
|
val (number, name) = str.split("#")
|
|
|
- val accessory = accessoryList.find { access -> access.number == number }
|
|
|
- accessory?.let { bean ->
|
|
|
+ //赛选
|
|
|
includeAccessory.add(
|
|
|
DevAccessory(
|
|
|
- bean.code, bean.number, bean.lang, bean.name,bean.photo,
|
|
|
- bean.photoPath, bean.updateTime, bean.createTime
|
|
|
+ "$number#$name", number, lang, name,"$name#$number",
|
|
|
+ "",0, 0
|
|
|
)
|
|
|
)
|
|
|
}
|
|
@@ -524,7 +523,6 @@ class CookDetailViewModel : BaseViewModel() {
|
|
|
}
|
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
@@ -577,6 +575,49 @@ class CookDetailViewModel : BaseViewModel() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ //涂鸦配件图片
|
|
|
+ fun tuyaAccessoryPhoto(number: String?) :Int{
|
|
|
+ var photo = when(number){
|
|
|
+ "1"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_1
|
|
|
+ }
|
|
|
+ "2"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_2
|
|
|
+ }
|
|
|
+ "3"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_3
|
|
|
+ }
|
|
|
+ "4"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_4
|
|
|
+ }
|
|
|
+ "5"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_5
|
|
|
+ }
|
|
|
+ "6"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_6
|
|
|
+ }
|
|
|
+ "7"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_7
|
|
|
+ }
|
|
|
+ "8"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_8
|
|
|
+ }
|
|
|
+ "9"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_9
|
|
|
+ }
|
|
|
+ "10"->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_10
|
|
|
+ }
|
|
|
+ else->{
|
|
|
+ com.develop.common.R.drawable.tuya_accessory_1
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return photo
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
fun getRecipeLiveData(): LiveData<CookDetailInfo> {
|
|
|
return recipeLiveData
|