首页 / 浏览问题 / / 问题详情
iportal第三方数据服务如何使用?
3月21

例如,我需要在大屏中添加天气信息,使用了一个免费的天气接口  aider.meizu.com/app/weather/listWeather?cityIds=101110103

浏览器返回的是:

{"code":"200","message":"","redirect":"","value":[{"alarms":[],"city":"临潼","cityid":101110103,"indexes":[{"abbreviation":"ct","alias":"","content":"预计今日天气有点冷,请穿秋冬过渡的服装出门吧。建议着风衣,外套,加绒卫衣等,既舒适,又时尚。","level":"风衣","name":"穿衣指数"},{"abbreviation":"gm","alias":"","content":"感冒高发期,尽量避免外出,外出戴口罩防护。","level":"高发","name":"感冒指数"},{"abbreviation":"xc","alias":"","content":"预计今日适宜洗车,未来持续两天无雨天气较好,适合擦洗汽车,晴日将伴您的车子连日洁净。","level":"适宜","name":"洗车指数"},{"abbreviation":"yd","alias":"","content":"预计今日整体气象条件尚可,大部分人可以外出锻炼,但敏感人群要注意天气变化,提前做好调整。","level":"适宜","name":"运动指数"},{"abbreviation":"uv","alias":"","content":"紫外线强度较弱,建议出门前涂擦SPF 在12-15之间、PA+的防晒护肤品。","level":"弱","name":"紫外线强度指数"},{"abbreviation":"pp","alias":"","content":"","level":"暂无","name":"化妆指数"}],"pm25":{"advice":"0","aqi":"95","citycount":401,"cityrank":13,"co":"0.6","color":"0","level":"0","no2":"24","o3":"17","pm10":"95","pm25":"71","quality":"良","so2":"7","timestamp":"","upDateTime":"2022-03-20 10:46:21"},"provinceName":"西安市","realtime":{"img":"1","sD":"66","sendibleTemp":"6","temp":"7","time":"2022-03-20 10:50:19","wD":"西南风","wS":"1级","weather":"多云","ziwaixian":"N/A"},"weatherDetailsInfo":{"publishTime":"2022-03-20 10:00:00","weather3HoursDetailsInfos":[{"endTime":"2022-03-20 14:00:00","highestTemperature":"8","img":"1","isRainFall":"","lowerestTemperature":"8","precipitation":"0","startTime":"2022-03-20 11:00:00","wd":"","weather":"多云","ws":""},{"endTime":"2022-03-20 17:00:00","highestTemperature":"12","img":"2","isRainFall":"","lowerestTemperature":"12","precipitation":"0","startTime":"2022-03-20 14:00:00","wd":"","weather":"阴","ws":""},{"endTime":"2022-03-20 20:00:00","highestTemperature":"14","img":"2","isRainFall":"","lowerestTemperature":"14","precipitation":"0","startTime":"2022-03-20 17:00:00","wd":"","weather":"阴","ws":""},{"endTime":"2022-03-20 23:00:00","highestTemperature":"12","img":"18","isRainFall":"","lowerestTemperature":"12","precipitation":"0","startTime":"2022-03-20 20:00:00","wd":"","weather":"雾","ws":""},{"endTime":"2022-03-21 02:00:00","highestTemperature":"11","img":"18","isRainFall":"","lowerestTemperature":"11","precipitation":"0","startTime":"2022-03-20 23:00:00","wd":"","weather":"雾","ws":""},{"endTime":"2022-03-21 05:00:00","highestTemperature":"9","img":"18","isRainFall":"","lowerestTemperature":"9","precipitation":"0","startTime":"2022-03-21 02:00:00","wd":"","weather":"雾","ws":""},{"endTime":"2022-03-21 08:00:00","highestTemperature":"8","img":"18","isRainFall":"","lowerestTemperature":"8","precipitation":"0","startTime":"2022-03-21 05:00:00","wd":"","weather":"雾","ws":""}]},"weathers":[{"date":"2022-03-20","img":"1","sun_down_time":"18:54","sun_rise_time":"06:46","temp_day_c":"14","temp_day_f":"57.2","temp_night_c":"6","temp_night_f":"42.8","wd":"","weather":"多云","week":"星期日","ws":""},{"date":"2022-03-21","img":"2","sun_down_time":"18:54","sun_rise_time":"06:46","temp_day_c":"12","temp_day_f":"53.6","temp_night_c":"7","temp_night_f":"44.6","wd":"","weather":"阴","week":"星期一","ws":""},{"date":"2022-03-22","img":"2","sun_down_time":"18:54","sun_rise_time":"06:46","temp_day_c":"15","temp_day_f":"59.0","temp_night_c":"4","temp_night_f":"39.2","wd":"","weather":"阴","week":"星期二","ws":""},{"date":"2022-03-23","img":"1","sun_down_time":"18:54","sun_rise_time":"06:46","temp_day_c":"18","temp_day_f":"64.4","temp_night_c":"8","temp_night_f":"46.4","wd":"","weather":"多云","week":"星期三","ws":""},{"date":"2022-03-24","img":"2","sun_down_time":"18:54","sun_rise_time":"06:46","temp_day_c":"21","temp_day_f":"69.8","temp_night_c":"6","temp_night_f":"42.8","wd":"","weather":"阴","week":"星期四","ws":""},{"date":"2022-03-25","img":"2","sun_down_time":"18:54","sun_rise_time":"06:46","temp_day_c":"21","temp_day_f":"69.8","temp_night_c":"8","temp_night_f":"46.4","wd":"","weather":"阴","week":"星期五","ws":""},{"date":"2022-03-19","img":"2","sun_down_time":"18:54","sun_rise_time":"06:46","temp_day_c":"12","temp_day_f":"53.6","temp_night_c":"5","temp_night_f":"41.0","wd":"","weather":"阴","week":"星期六","ws":""}]}]}

我通过添加在线服务,添加url,但图表的数据选择仅限于 code  message  redirect  和value,实际上我需要的是value内部的数据,比如city":"临潼"、"content":"预计今日天气有点冷,请穿秋冬过渡的服装出门吧。建议着风衣,外套,加绒卫衣等,既舒适,又时尚。之类的,如何做到呢?

1个回答

您好,文本列表组件添加三方服务可以参考给的示例格式(包含geojson格式和简单的json格式),可以根据示例格式进行对应调整。

苏打青柠  (1,087分)  名扬四海
3月21
...