Authored by 郭成尧

Merge branch 'feature/usercenter' of git.yoho.cn:fe/yohobuywap-node into feature/usercenter

... ... @@ -36,7 +36,7 @@ let favProduct = (req, res, next) => {
favoriteModel.favProduct(uid, page, limit).then((result) => {
if (typeof(result.total) === "undefined") {
if (typeof(result.total) === "undefined" && typeof(result.more) === "undefined") {
res.render('favorite/favorite-product', {
layout: false,
hasFavProduct: result.hasFavProduct
... ... @@ -54,7 +54,7 @@ let favfavBrand = (req, res, next) => {
favoriteModel.favfavBrand(uid, page, limit).then((result) => {
if (typeof(result.total) === "undefined") {
if (typeof(result.total) === "undefined" && typeof(result.more) === "undefined") {
res.render('favorite/favorite-brand', {
layout: false,
hasFavBrand: result.hasFavBrand
... ...
... ... @@ -104,7 +104,7 @@ const favProduct = (uid, page, limit) => {
});
} else {
resu.end = true;
resu.more = true;
}
return resu;
... ... @@ -122,7 +122,7 @@ const favfavBrand = (uid, page, limit) => {
page: page,
limit: limit
}).then((result) => {
console.log(result)
let resu = {
hasFavBrand: []
}
... ... @@ -188,10 +188,9 @@ const favfavBrand = (uid, page, limit) => {
});
} else {
resu.end = true;
resu.more = true;
}
console.log(resu);
return resu;
} else {
logger.error('收藏品牌 cood 不是 200');
... ...
... ... @@ -38,4 +38,8 @@
</div>
{{/if}}
</div>
{{/ hasFavBrand}}
\ No newline at end of file
{{/ hasFavBrand}}
{{!-- {{#if more}}
<div class="fav-brand-load-more">没有更多了</div>
{{/if}} --}}
\ No newline at end of file
... ...
... ... @@ -30,4 +30,7 @@
</div>
</a>
</li>
{{/ hasFavProduct}}
\ No newline at end of file
{{/ hasFavProduct}}
{{!-- {{#if more}}
<div class="fav-brand-load-more">没有更多了</div>
{{/if}} --}}
\ No newline at end of file
... ...
... ... @@ -18,8 +18,8 @@ module.exports = {
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/',
api: 'http://testapi.yoho.cn:28078/',
service: 'http://testservice.yoho.cn:28077/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
singleApi: 'http://192.168.102.31:8092/'
},
subDomains: {
... ...
... ... @@ -96,7 +96,8 @@ function loadData($parent, url, page) {
$loadingMask.addClass('hide');
$parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
window.rePosFooter();
} else if (data.end === true) {
} else if (data.more === true) {
console.log(0)
//处理data等于end时如果loadingMask存在且没有hide样式的情况
if ($loadingMask && !$loadingMask.hasClass('hide')) {
... ... @@ -204,6 +205,7 @@ favContentHammer.on('tap', function(e) {
dialogText: '已经取消收藏'
});
$(e.target).closest('li').remove();
location.reload();
} else if (data.code === 400) {
diaLog.showDialog({
autoHide: true,
... ...