import common from '../../utils/util'; import main from '../../utils/main'; const app = getApp(); Page({ data: { }, onLoad: function (options) { var that = this; that.setData({ Containnerheight: main.getWindowHeight(), ListType:options.ListType, AgentCategory:options.AgentCategory, IsWithdraw:false, IsPromotion:false, User:app.globalData.userInfo, RefundTotal:0, }); wx.setNavigationBarTitle({ title: that.data.ListType }); this.getList(); }, getList:function(e){ var that = this; var url=""; if (that.data.ListType=="近期报名"){ that.setData({ Info: app.globalData.NewUserApplyArray, }); getLen(that,app.globalData.NewUserApplyArray.List); } else if (that.data.ListType=="预估新增收益"){ that.setData({ Info: app.globalData.EstimatedNewRevenue, Len:app.globalData.EstimatedNewRevenue.Length, Total:"0", }); getLen(that,app.globalData.EstimatedNewRevenue.List); } else if (that.data.ListType=="可提现收益"){ that.setData({ Info: app.globalData.WithdrawableEarnings, Total:app.globalData.WithdrawableEarnings.Total, }); getLen(that,app.globalData.WithdrawableEarnings.List); //查看是否有退款返还奖励 url="GetRefundList?AgentCategory="+that.data.AgentCategory; url+="&UserID=" + app.globalData.userInfo.UserID; main.getData(url, function (data) { if (data) { var list=data.List; var num=0,refundTotal=0; for(var i=0;i0){ num++; refundTotal+=list[i].Money; } } that.setData({ RefundNum:num, RefundTotal:refundTotal, }); } }); } else{ if (that.data.ListType=="退款记录") url="GetRefundList?AgentCategory="+that.data.AgentCategory; else if (that.data.ListType=="未续费记录") url="GetIntroducerUserList2?ListType="+that.data.ListType+"&AgentCategory="+that.data.AgentCategory; else if (that.data.ListType=="报名步骤没做完") url="GetIntroducerUserList2?ListType="+that.data.ListType+"&AgentCategory="+that.data.AgentCategory; url+="&UserID=" + app.globalData.userInfo.UserID; main.getData(url, function (data) { if (data) { that.setData({ Info: data, }); getLen(that,data.List); } }); } function getLen(obj,list){ var len=0; if (that.data.AgentCategory=="ambassador"){ for(var i=0;i=0 && ispay==undefined){ return; } if (!gotoType) { wx.navigateTo({ url: url, }); } else { wx.redirectTo({ url: url, }) } }, ShowImage:function(e){ var url=e.currentTarget.dataset.url; wx.downloadFile({ url: url, success(res) { wx.previewImage({ current: res.tempFilePath, // 当前显示图片的http链接 urls: [res.tempFilePath] // 需要预览的图片http链接列表 }); } }); }, onShareAppMessage: function () { return { title: app.globalData.ShareTitle, path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID, imageUrl: app.globalData.ShareImage, } }, })