时间:2019-05-07 来源:小程序工厂
最简单直接粗糙的话那就直接循环tag,单个取出就好了
666666
两种方法,一种是在.js里先处理成数组。
另外一种是定一个一个wxs函数处理 https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxs/
关键的问题这个数组是通过请求后台返回来给我的,是个列表内容,里面不单只有一个对象字符串,那wxml里面应该怎么绑数据进去?
"modelList": [ { "saleID": 640939, "houseType": 1, "ImgUrl": "", "CommunityName": "富仕江南", "CommunityAddress": "江南-同乐大道,近智和路-富仕江南", "Floor": 15, "FloorCount": 31, "ToWard": "南", "Title": "降价了》4号地铁口50米《智美家园》就***富乐小学,三十八中", "Tag": "a,b,c,d,e,f",
},
{ "saleID": 640939, "houseType": 1, "ImgUrl": "", "CommunityName": "富仕江南", "CommunityAddress": "江南-同乐大道,近智和路-富仕江南", "Floor": 15, "FloorCount": 31, "ToWard": "南", "Title": "降价了》4号地铁口50米《智美家园》就***富乐小学,三十八中", "Tag": "a,b,c,d,e,f",
},
{ "saleID": 640939, "houseType": 1, "ImgUrl": "", "CommunityName": "富仕江南", "CommunityAddress": "江南-同乐大道,近智和路-富仕江南", "Floor": 15, "FloorCount": 31, "ToWard": "南", "Title": "降价了》4号地铁口50米《智美家园》就***富乐小学,三十八中", "Tag": "a,b,c,d,e,f",
},
{ "saleID": 640939, "houseType": 1, "ImgUrl": "", "CommunityName": "富仕江南", "CommunityAddress": "江南-同乐大道,近智和路-富仕江南", "Floor": 15, "FloorCount": 31, "ToWard": "南", "Title": "降价了》4号地铁口50米《智美家园》就***富乐小学,三十八中", "Tag": "a,b,c,d,e,f",
},
]
对请求结果进行二次加工啊,js 不会写么?
3Q3Q,一下子想明白怎么搞了