1.动态添加class
<view class="step2 {{indication == 2 ?'on':''}}">
<view class='tc left'>
<view>喷洒泡沫</view>
<view>(min)</view>
</view>
<view class='right'>{{foam}}</view>
</view>
2.传递多个参数
第一个参数用的是? 后面用的是& ?orderid=' + e.currentTarget.dataset.orderid
<view class="btn-area" bindtap='carWashOrder' data-washing="{{washing}}" data-foam="{{foam}}" data-cleaner="{{cleaner}}" data-all_money="{{all_money}}" data-orderid='{{orderid}}'>
carWashOrder:function(e){
var that = this;
wx.navigateTo({
url: '/pages/carWashOrder/carWashOrder?orderid=' + e.currentTarget.dataset.orderid + "&washing=" + e.currentTarget.dataset.washing + "&foam=" + e.currentTarget.dataset.foam + "&cleaner=" + e.currentTarget.dataset.cleaner ,
})
}
3.请求接口成功 页面渲染一定要加that.setData({})
var parma = {
orderid: that.data.orderid,
token: app.globalData.token ,
off_on: that.data.off_on
}
// ajax
app.requsetUrl('/Order/settlement', parma, function (res) {
if(res.data.code == ){
console.log(JSON.stringify(res))
that.setData({
all_money: that.data.all_money//结算金额
})
}
})