...
|
...
|
@@ -96,6 +96,7 @@ RatingView.prototype = $.extend({}, EventEmitter.prototype, { |
|
|
this.rankText = rankMap[curVal];
|
|
|
this.$label.text(rankMap[curVal]);
|
|
|
|
|
|
this.$ranks.removeClass('rated');
|
|
|
this.$ranks.toggleClass(index => {
|
|
|
return index <= curVal ? 'rated' : null;
|
|
|
});
|
...
|
...
|
@@ -154,7 +155,7 @@ OrderListView.prototype = $.extend({}, EventEmitter.prototype, { |
|
|
self.toggleHide(true);
|
|
|
})
|
|
|
.on('click.OrderListView.select', '[data-action=select]', function() {
|
|
|
|
|
|
self.selectOrder($(event.target));
|
|
|
});
|
|
|
|
|
|
// 被通知显示,执行显示
|
...
|
...
|
@@ -164,13 +165,13 @@ OrderListView.prototype = $.extend({}, EventEmitter.prototype, { |
|
|
/**
|
|
|
* method: 选择订单,然后关闭
|
|
|
*/
|
|
|
selectOrder: function() {
|
|
|
let $order = $(event.target).closest('.order-page');
|
|
|
selectOrder: function($btn) {
|
|
|
let $order = $btn.closest('.order-page');
|
|
|
|
|
|
// 订单数据
|
|
|
let data = {
|
|
|
imgSrc: $order.find('.thumb').attr('src'),
|
|
|
orderCode: $order.find('[data-id]'),
|
|
|
orderCode: $order.find('[data-id]').attr('data-id'),
|
|
|
cost: $order.find('.sum-cost').text(),
|
|
|
createTime: $order.find('.js-create-time').val(),
|
|
|
orderStatus: $order.find('.order-status').text()
|
...
|
...
|
@@ -205,6 +206,7 @@ OrderListView.prototype = $.extend({}, EventEmitter.prototype, { |
|
|
let html = self.orderListT({orders: result.data});
|
|
|
|
|
|
self.$localOrders.append(html);
|
|
|
lazyLoad($('img.lazy'));
|
|
|
});
|
|
|
}
|
|
|
});
|
...
|
...
|
|