Authored by 陈轩

fix

... ... @@ -109,6 +109,11 @@ exports.fetchOrders = (req, res) => {
.then(result => {
imModel.handleOrderList(result.data);
res.json(result);
}, () =>{
return res.json({
code: 500,
data: []
});
});
};
... ... @@ -136,7 +141,8 @@ exports.queryGlobalOrder = (req, res) => {
let emptyOrder = {
code: 200,
data: []
data: [],
message: '获取失败'
};
imApi.queryGlobalOrder(uid)
... ...
... ... @@ -60,6 +60,6 @@
<div class="no-orders">
<i class="no-orders-pic"></i>
<p>您暂时没有订单</p>
<a href="//m.yohobuy.com/product/new">随便逛逛</a>
{{#unless isApp}}<a href="//m.yohobuy.com/product/new">随便逛逛</a>{{/unless}}
</div>
{{/each}}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@ const loading = require('../../plugin/loading'),
require('../../common');
import {EventEmitter, api} from './store';
import qs from 'yoho-qs';
import appBridge from 'yoho-app';
const LeaveMSGView = function(elem) {
... ... @@ -255,7 +255,8 @@ OrderListView.prototype = $.extend({}, EventEmitter.prototype, {
api.fetchOrders(type).done(
result => {
let html = self.orderListT({
orders: result.data
orders: result.data,
isApp: appBridge.isApp
});
orderState.totalCount = result.data.length;
... ...