Authored by 毕凯

Merge branch 'release/wap-optim4' into 'master'

Release/wap optim4



See merge request !42
... ... @@ -233,7 +233,9 @@ const listDynamicData = (req, res) => {
type = req.query.type;
if (req.user.uid) {
other.uid = req.user.uid || req.query.uid;
other.uid = req.user.uid;
} else if (req.query.uid) {
other.uid = req.query.uid;
}
if (query) {
... ...
... ... @@ -104,12 +104,12 @@ function initInfosEvt($container) {
$info,
yhChannel;
// e.preventDefault();
e.preventDefault && e.preventDefault();
// 点赞
$btn = $this.closest('.like-btn');
if ($btn.length > 0 && !isLoading) {
// e.preventDefault();
if ($btn.hasClass('like')) {
opt = 'cancel';
}
... ... @@ -152,7 +152,6 @@ function initInfosEvt($container) {
var uid = getUrlParam('uid');
if (uid) {
e.preventDefault();
if ($btn.hasClass('collected')) {
opt = 'cancel';
}
... ...
... ... @@ -31,6 +31,10 @@ function getDynamicByIds(ids) {
data.type = '0';
}
if (qs.uid) {
data.uid = qs.uid;
}
return $.ajax({
type: 'GET',
url: '/guang/info/listData',
... ... @@ -64,6 +68,11 @@ function renderData(data) {
$it.find('.like-btn').removeClass('like');
}
//收藏数目
if (it.isFavor === 'Y') {
$it.find('.collect-btn').addClass('collected');
}
// 点赞数目
$it.find('.like-count').text(it.praise_num);
... ...
... ... @@ -112,8 +112,9 @@ function subClassifyTapEvt($this) {
if (fCbFn) {
fCbFn({
type: $sub.data('type'),
id: id
}, true);
id: id,
filtering: true
});
}
if (hCbFn) {
... ...
... ... @@ -251,7 +251,7 @@ C_ID = window._ChannelVary[window.cookie('_Channel')];
* 需要执行search的场景:1.点选筛选项;2.relaod为true时切换导航;3.下拉加载
* @param opt {type, id}
*/
function search(opt, filtering) {
function search(opt) {
var setting = {},
ext,
att,
... ... @@ -472,7 +472,7 @@ function search(opt, filtering) {
argument = setting;
if (filtering) {
if (opt && opt.filtering) {
$fsgc.addClass('hide');
if (params.start) {
delete setting.start;
... ... @@ -877,7 +877,7 @@ $newList.on('touchstart', 'li', function(e) {
break;
}
$pre = $firstLiDom;
search({}, true);
search({filtering: true});
});
$(document).on('touchstart', function(e) {
... ...