小程序动态添加class及调接口传递多个参数

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//结算金额
})
}
})
上一篇:【Oracle 数据迁移】环境oracle 11gR2,exp无法导出空表的表结构【转载】


下一篇:Quartz动态添加,修改,删除任务(暂停,任务状态,恢复,最近触发时间)