WXML中:
<view wx:if="{{orderstate}} = ‘待送检‘ " data-no="{{orderstate}}" bindtap="quxiaosongjian">
<view>取消送检</view>
</view>
当前页面显示为待送检
js中:
quxiaosongjian:function(e) {
var that = this;
var orderstate = e.currentTarget.dataset.no;
that.setData({
orderstate: "用户取消"
})
},
这时,页面显示为: