微信小程序調(diào)用json數(shù)據(jù)漢字亂碼的解決方法:接口獲取數(shù)據(jù)后如果有中文編碼必須使用decodeURI或decodeURIComponent解碼
在success中將數(shù)據(jù)按下面的方法處理一下即可,
success: function (res) {
var news= JSON.parse(decodeURIComponent(JSON.stringify(res.data)));
that.setData({news: news})
}