|
|
var $ = require('yoho-jquery'),
|
|
|
tip = require('../plugin/tip'),
|
|
|
Swiper = require('yoho-swiper'),
|
|
|
Swiper = require('yoho-swiper2'),
|
|
|
loading = require('../plugin/loading'),
|
|
|
debounce = require('lodash/debounce');
|
|
|
|
...
|
...
|
@@ -15,6 +15,8 @@ var scrollFn, |
|
|
resourcesTp = {},
|
|
|
CID;
|
|
|
|
|
|
require('guang/plusstar/index.page.css');
|
|
|
|
|
|
require('yoho-jquery-lazyload');
|
|
|
require('../common');
|
|
|
|
...
|
...
|
@@ -87,8 +89,8 @@ plusstar = { |
|
|
$tabUlDom.find('li').removeClass('focus');
|
|
|
$liDom.addClass('focus');
|
|
|
that.ParentLiDom = $liDom;// 保留当前tab先中的对象
|
|
|
that.tabNav($liDom.data('code'));
|
|
|
|
|
|
// that.tabNav($liDom.data('code'));
|
|
|
that.resInit();
|
|
|
// ent -- 默认选中
|
|
|
setTimeout(function() {
|
|
|
that._yas();
|
...
|
...
|
@@ -175,7 +177,6 @@ plusstar = { |
|
|
searching = false;// 初始化翻页
|
|
|
|
|
|
function execResData(data) {
|
|
|
var productSkns = '';
|
|
|
|
|
|
$('.plusstar-resources').html(data);
|
|
|
|
...
|
...
|
@@ -192,14 +193,6 @@ plusstar = { |
|
|
|
|
|
that.resInit();
|
|
|
|
|
|
$('.plusstar-resources').find('img.lazy').lazyload();
|
|
|
|
|
|
productSkns = $(data).find('.product-skns').val();
|
|
|
if (productSkns) {
|
|
|
that.common.productSkns = productSkns.split(',');
|
|
|
}
|
|
|
|
|
|
that.common.pageTotal = Math.ceil(that.common.productSkns.length / that.common.pagesize);
|
|
|
}
|
|
|
|
|
|
if (resourcesTp[tabId]) {
|
...
|
...
|
@@ -218,7 +211,6 @@ plusstar = { |
|
|
success: function(data) {
|
|
|
resourcesTp[tabId] = data;
|
|
|
execResData(data);
|
|
|
|
|
|
// 页面中下拉曝光
|
|
|
setTimeout(function() {
|
|
|
if (window._yas && window._yas.sendAppLogs) {
|
...
|
...
|
@@ -273,6 +265,40 @@ plusstar = { |
|
|
pagination: '.banner-top .pagination-inner'
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$('.plusstar-resources').find('img.lazy').lazyload();
|
|
|
var productSkns = '';
|
|
|
productSkns = $('.product-skns').val();
|
|
|
if (productSkns) {
|
|
|
this.common.productSkns = productSkns.split(',');
|
|
|
}
|
|
|
|
|
|
this.common.pageTotal = Math.ceil(this.common.productSkns.length / this.common.pagesize);
|
|
|
|
|
|
var that = this;
|
|
|
var tabId = that.ParentLiDom.index() + 1;
|
|
|
setTimeout(function() {
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
|
url: '/guang/plusstar/userSkn',
|
|
|
data: {
|
|
|
skns: productSkns,
|
|
|
uid: window.queryString.uid,
|
|
|
app_version: isApp,
|
|
|
yh_channel: tabId
|
|
|
},
|
|
|
dataType: 'json',
|
|
|
success: function(data) {
|
|
|
if (data) {
|
|
|
that.common.productSkns = data;
|
|
|
}
|
|
|
that.common.pageTotal = Math.ceil(that.common.productSkns.length / that.common.pagesize);
|
|
|
},
|
|
|
error: function() {
|
|
|
tip.show('网络断开连接了~');
|
|
|
}
|
|
|
});
|
|
|
}, 300);
|
|
|
},
|
|
|
goodsList: function() {
|
|
|
var that = this,
|
...
|
...
|
@@ -353,13 +379,13 @@ scrollFn = debounce(function() { |
|
|
$(function() {
|
|
|
isApp = window.queryString.app_version || window.queryString.appVersion;
|
|
|
|
|
|
if (isApp) {
|
|
|
$('.plusstar-resources').css({'margin-top': $('.tab-nav').height()});
|
|
|
} else {
|
|
|
$('.tab-nav').css({
|
|
|
position: 'relative'
|
|
|
});
|
|
|
}
|
|
|
// if (isApp) {
|
|
|
// $('.plusstar-resources').css({'margin-top': $('.tab-nav').height()});
|
|
|
// } else {
|
|
|
// $('.tab-nav').css({
|
|
|
// position: 'relative'
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
// 男:1,女:2,潮童:3,创意生活:4
|
|
|
CID = window.queryString.yh_channel || window._ChannelVary[window.cookie('_Channel')] || 1;
|
...
|
...
|
|