1、移除class 添加class
<view class="nav">
<view class="nav-ul" style=" transition-duration: 0ms; transform:translate3d({{transform}}%, 0px, 0px);">
<view class="order_nav {{type == 'ALL' ? 'current':''}}" bindtap="bindOrderNav" data-type="ALL" >全部订单</view>
<view class="order_nav {{type == 'WAIT_PAY' ? 'current':''}}" bindtap="bindOrderNav" data-type="WAIT_PAY">待付款</view>
<view class="order_nav {{type == 'WAIT_DELIVERY' ? 'current':''}}" bindtap="bindOrderNav" data-type="WAIT_DELIVERY">待发货</view>
<view class="order_nav {{type == 'SHIPPED' ? 'current':''}}" bindtap="bindOrderNav" data-type="SHIPPED">待收货</view>
<view class="order_nav {{type == 'FINISHED' ? 'current':''}}" bindtap="bindOrderNav" data-type="FINISHED">待评价</view>
<view class="order_nav {{type == 'RETURNING' ? 'current':''}}" bindtap="bindOrderNav" data-type="RETURNING" >退款中</view>
</view>
//事件处理函数
bindOrderNav: function(e) {
var that = this;
var order_type = e.target.dataset.type;
console.log(order_type);
that.setData({
type:order_type
});
},