Page({ dever: getApp().dever, authdialog: null, product_ids: '', cash_code: '', data: { isUseAddress: false, settlement: 0.00 }, onLoad: function (options) { var that = this; that.dever.showLoading(); //获取自定义授权组件 that.authdialog = this.selectComponent("#authdialog"); //获取兑换商品信息 that.cash_code = options.code; that.dever.request('product.api.checkCode',{ signature: that.dever.getSignature(), code: that.cash_code },{ success: function(data, res){ that.dever.setList(that, data.product); that.doSettlement(); that.dever.hideLoading(); }, fail: function(res){ that.dever.log('product.api.checkCode', res); } }); }, /** * 结算金额 */ doSettlement: function(){ var list = this.data.list; var count=0; for(var i=0; i