后台给我返回来一个判断type_name分为车商和车型,车型取car_title,车商取title。请问怎么在花括号里判断?这是我写的,会报错:{{item.type_name=='车商'?item.title:item.type_name=='车型'?item.car_title:'暂无数据'}} 这是后台返回的数据:{"id":3,"uid":1,"type_id":2,"relation_id":1,"create_time":"2018年04月2521:40","car_title":null,"car_content":null,"car_pic":null,"title":"超级管理员","type_name":"车商"}
相关分类