码迷,mamicode.com
首页 > 编程语言 > 详细

调接口时遇到三维数组该怎么处理

时间:2018-06-14 11:43:19      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:处理   数组   str   string   ogr   sha   php   post   pos   

var proholeid = [];
var arrtt = {};
arrtt[‘name‘] = namecc ;
arrtt[‘num‘] = numc ;
arrtt[‘gname‘] = gname;
arrtt[‘gscale‘] = gscale;
arrtt[‘holdshare‘] = holdsharec;
arrtt[‘holdshare_propor‘] = holdshare_proporc;
arrtt[‘gcode‘] = gcode;
arrtt[‘type‘] = 1;
var arrtt1 = {};
arrtt1[‘name‘] = namecc1 ;
arrtt1[‘num‘] = numc1 ;
arrtt1[‘gname‘] = gname1;
arrtt1[‘gscale‘] = gscale1;
arrtt1[‘holdshare‘] = holdsharec1;
arrtt1[‘holdshare_propor‘] = holdshare_proporc1;
arrtt1[‘gcode‘] = gcode1;
arrtt1[‘type‘] = 1;
var arrtt2 = {};
arrtt2[‘name‘] = namecc2 ;
arrtt2[‘num‘] = numc2 ;
arrtt2[‘gname‘] = gname2;
arrtt2[‘gscale‘] = gscale2;
arrtt2[‘holdshare‘] = holdsharec2;
arrtt2[‘holdshare_propor‘] = holdshare_proporc2;
arrtt2[‘gcode‘] = gcode2;
arrtt2[‘type‘] = 1;

proholeid.push(arrtt);
proholeid.push(arrtt1);
proholeid.push(arrtt2);
data[‘proholeid‘]=proholeid;

data = JSON.stringify(data);

 

$.ajax({
type:"POST",
dataType:"json",
data: {contents:data},
url:"/cifcogroup/application/web/index.php?r=future-org/trade-code&userId="+userId,

调接口时遇到三维数组该怎么处理

标签:处理   数组   str   string   ogr   sha   php   post   pos   

原文地址:https://www.cnblogs.com/ppm0325/p/9181266.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!