微信小程序 request能传递二维数组吗
发布网友
发布时间:2022-04-23 02:19
我来回答
共2个回答
热心网友
时间:2022-05-02 06:34
请求头设置
header:{
"Accept": "application/json, text/javascript, */*; q=0.01",
"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"
}
热心网友
时间:2022-05-02 07:52
html:
<text class="numberli" wx:for="{{opencode[index]}}" wx:key="opencode">{{item}}</text>
js:
success: function(res) {
var arrs = [];
res.data.data.map(function(item){
arrs.push(item.data.opencode.split(','))
}),
that.setData({
opencode:arrs,
}),
console.log(arrs);
}