Authored by ccbikai(👎🏻🍜)

Merge branch 'release/5.1' into grey

... ... @@ -87,7 +87,7 @@ let switchChannel = (req, res, next) => {
}
// 设置浏览器缓存5分钟 300000ms
res.set('Expires', (new Date(_.now() + 300000)).toGMTString());
// res.set('Expires', (new Date(_.now() + 300000)).toGMTString());
next();
};
... ...
... ... @@ -47,6 +47,7 @@ const editor = (req, res, next) => {
if (articleListData.data && articleListData.data.list && articleListData.data.list.artList) {
articleListData.data.list.artList.forEach(articleData => {
articleData.reqPath = `${req.path}?id=${id}`;
build.push(guangProcess.formatArticle(articleData, true, isApp, false, uid));
});
res.render('index/list', Object.assign({
... ... @@ -194,11 +195,10 @@ const tag = (req, res, next) => {
gender: req.query.gender || '1,3',
uid: req.user.uid || req.query.uid || 0,
udid: req.sessionID,
type: req.query.type || 0
type: req.query.type || 0,
path: req.path
};
responseData.pageHeader.navTitle = param.tag || '标签';
... ...
... ... @@ -290,6 +290,10 @@ const getTagEditor = (param) => {
let infoList = result[0].data.list.artList;
infoList.forEach(val => {
val.reqPath = param.path;
if (param.tag) {
val.reqPath = `${val.reqPath}?query=${param.tag}`;
}
inf.push(guangProcess.formatArticle(val, true, param.isApp, true));
});
... ...
... ... @@ -180,6 +180,9 @@ const _shopCouponsList = (shopId, uid) => {
* @private
*/
const getBrandFavStatus = (params) => {
if (params.uid === 'undefined') {
params.uid = 0;
}
return api.get('', {
method: 'app.favorite.isFavorite',
uid: params.uid || 0,
... ...
... ... @@ -4,7 +4,7 @@
</a>
<div class="descripition">
{{shop_intro}}
{{{shop_intro}}}
</div>
<p class="sign-icon">
... ...
... ... @@ -12,6 +12,7 @@ var scrollFn,
scrollTop,
RECPOSE,
isApp,
searching = false,
speckParamApp = {
udid: '',
apt: '',
... ... @@ -165,6 +166,7 @@ plusstar = {
this.common.codeDefault = code;// 记住最后一次的tab code
this.common.page = 1;// 商品列表从第一页开始
searching = false;
$.ajax({
type: 'GET',
... ... @@ -223,6 +225,12 @@ plusstar = {
var that = this,
skn = [];
if (searching) {
return true;
}
searching = true;
if (that.common.page > that.common.pageTotal) {
return false;
}
... ... @@ -243,6 +251,7 @@ plusstar = {
dataType: 'html',
success: function(data) {
skn = [];
searching = false;
loading.hideLoadingMask();
if (data === '') {
... ... @@ -272,6 +281,7 @@ plusstar = {
$('.resources .goods .page-total').remove();
},
error: function() {
searching = false;
tip.show('网络断开连接了~');
loading.hideLoadingMask();
}
... ...
... ... @@ -80,7 +80,7 @@ const formatArticle = (articleData, showTag, isApp, showAuthor, uid, reqQueryStr
if (isApp) {
result.collect = {};
result.collect.isCollected = articleData.isFavor === true;
let originUrl = helpers.urlFormat('/author/index', null, 'guang'); // 跳转回的链接
let originUrl = helpers.urlFormat(articleData.reqPath || '/author/index', null, 'guang'); // 跳转回的链接
let collectUrl = 'javascript:;'; // 根据用户是否登录做处理的链接
if (!uid) {
... ...