...
|
...
|
@@ -154,34 +154,34 @@ const recordContent = (uid, udid, page, limit) => { |
|
|
|
|
|
return api.get('', {
|
|
|
method: 'app.browse.product',
|
|
|
uid: uid || 6228593, // TODO
|
|
|
uid: uid,
|
|
|
limit: limit,
|
|
|
page: page
|
|
|
}, {code: 200}).then((result) => {
|
|
|
|
|
|
let resu = {
|
|
|
browseRecord: []
|
|
|
};
|
|
|
let resu = {};
|
|
|
|
|
|
if (result && result.code === 200) {
|
|
|
|
|
|
let list = result;
|
|
|
|
|
|
// 不能再查到结果了
|
|
|
if (page > 1 && list === []) {
|
|
|
if (!result || page === '1' && result.data.total === 0) {
|
|
|
resu.walkwayUrl = helpers.urlFormat('/product/new');
|
|
|
resu.noRecord = true;
|
|
|
}
|
|
|
|
|
|
if (result.data.total === 0) {
|
|
|
resu.total = 0;
|
|
|
return resu;
|
|
|
}
|
|
|
|
|
|
if (list.data && list.data.product_list) {
|
|
|
resu = {
|
|
|
browseRecord: []
|
|
|
};
|
|
|
|
|
|
_.forEach(list.data.product_list, function(val) {
|
|
|
let obj = {
|
|
|
productList: []
|
|
|
};
|
|
|
|
|
|
|
|
|
obj = _.assign(obj, {
|
|
|
product_name: val.product_name,
|
|
|
product_skn: val.product_skn,
|
...
|
...
|
@@ -195,6 +195,8 @@ const recordContent = (uid, udid, page, limit) => { |
|
|
|
|
|
resu.browseRecord.push(obj);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return resu;
|
|
|
}
|
|
|
});
|
...
|
...
|
|