import pieOption from '../../option/pieOption' import pictographicOption from '../../option/pictographicOption' const color=['#0084FF','#20CC62','#FFBF00'] const app = getApp() Component({ data: { showChart: true, // sexOption: pieOption(color,dataList), // regionOption:pictographicOption(dRegion,dValue), }, lifetimes:{ attached(){ let sTimeType = wx.getStorageSync("sTimeType2") || 34; let sStartTime = wx.getStorageSync("sStartTime") || ''; let sEndTime = wx.getStorageSync("sEndTime") || ''; this.getData(sTimeType, sStartTime, sEndTime); },}, methods: { changeTime(e){ let sTimeType = e.detail.sTimeType; let sStartTime = e.detail.sStartTime; let sEndTime = e.detail.sEndTime; this.getData(sTimeType, sStartTime, sEndTime); }, getData(sTimeType, sStartTime, sEndTime){ wx.showToast({ title: '加载中', icon: 'loading', duration: 300000 }), app.globalData.request({action: 'getSexOrAttestationOrRegionHome0528',sType:'Home',sTimeType:sTimeType, sStartTime:sStartTime, sEndTime:sEndTime}).then(res => { const sex=res.sex const attestation=res.attestation const sexList=[] const attestationList=[] let sexSum=0 let attestationSum=0 const sexAccounted=[] const attestationAccounted=[] let regionSum=0 const rName1=[] const rValue1=[] const rName2=[] const rValue2=[] let pd=res.sex.length==1 // res.forEach(ele => { // }) for(let i=0;i{ wx.hideToast(); },500) }, priceSel(e){ this.setData({ intervalSel: e.currentTarget.dataset.index, }) } } })