站长之家官网查询,便宜的seo网站优化排名,搭建网站吧,装修设计公司电话异步查询数据#xff0c;需要对返回的数据进行后续步骤操作#xff0c;使用使用方法#xff1a; 1、new promise方法使用。 2、回调函数使用 使用方式#xff1a; pageGetDeviceTreeInfo({deviceTypeAry:[1]},this.getTreeData); 函数#xff1a; 1 export function p…异步查询数据需要对返回的数据进行后续步骤操作使用使用方法 1、new promise方法使用。 2、回调函数使用 使用方式 pageGetDeviceTreeInfo({deviceTypeAry:[1]},this.getTreeData); 函数 1 export function pageGetDeviceTreeInfo(param,callback){ // 区域树接口查询,const param {deviceType:1};//deviceType:1,人脸抓拍;2,车辆抓拍;3,WIFI感知;4,门禁感知
2 getRegionTree(param).then(rsp {
3 if(rsp.status200){
4 callback(rsp.data);
5 } else {
6 callback([]);
7 }
8 });
9 }; 回调函数 getTreeData(rstData){ // 回调函数console.log(rstData); } 转载于:https://www.cnblogs.com/luoxuemei/p/10931306.html