首页 小程序 微信小程序数组遍历方法之forEach

微信小程序数组遍历方法之forEach

// 获取单位id和名称	getCheckInfo() {		const _data = {			communityCode:'',			registerType:'1'		}		Api.request({ url: Api.api.PARTY_MEMBERS_REPORT, data: _data,method: 'POST'}).then(res => {			if (res.code == 0) {				const result = res.data				if(result.partyRegisterInfo.length>0){					// 共建单位已报到					let registList = result.partyRegisterInfo					registList.forEach(e => {						this.setData({							deptId:e.companyId,							deptName:e.companyName,						})					});				}			}		})	},
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
特别声明:本站部分内容收集于互联网是出于更直观传递信息的目的。该内容版权归原作者所有,并不代表本站赞同其观点和对其真实性负责。如该内容涉及任何第三方合法权利,请及时与824310991@qq.com联系,我们会及时反馈并处理完毕。