Authored by 王水玲

星潮gulp ge

@@ -719,6 +719,7 @@ require("js/guang/detail"); @@ -719,6 +719,7 @@ require("js/guang/detail");
719 require("js/guang/star-classroom"); 719 require("js/guang/star-classroom");
720 require("js/guang/calendar"); 720 require("js/guang/calendar");
721 require("js/guang/collocation-list"); 721 require("js/guang/collocation-list");
  722 +require("js/guang/check-top");
722 }); 723 });
723 define("js/guang/plus-star/list", ["jquery","lazyload","swiper","index"], function(require, exports, module){ 724 define("js/guang/plus-star/list", ["jquery","lazyload","swiper","index"], function(require, exports, module){
724 /** 725 /**
@@ -2242,6 +2243,39 @@ $(document).on('touchstart', '.collection', function(event) { @@ -2242,6 +2243,39 @@ $(document).on('touchstart', '.collection', function(event) {
2242 }); 2243 });
2243 2244
2244 }); 2245 });
  2246 +define("js/guang/check-top", ["jquery"], function(require, exports, module){
  2247 +/**
  2248 + * 星潮教室-top100
  2249 + * @author: wsl<shuiling.wang@yoho.cn>
  2250 + * @date: 2016/4/12
  2251 + */
  2252 +
  2253 +var $ = require("jquery");
  2254 +
  2255 +$('body').addClass('star-class-body');
  2256 +
  2257 +function setAvatar($userAvatar) {
  2258 + var myImage = new Image(),
  2259 + avatar;
  2260 +
  2261 + // 部分老用户没有头像,显示默认头像
  2262 + avatar = $userAvatar.data('avatar');
  2263 + myImage.src = avatar;
  2264 + myImage.onload = function() {
  2265 + $userAvatar.css('background-image', 'url(' + avatar + ')');
  2266 + };
  2267 +}
  2268 +
  2269 +if ($('.ranking-area li').length > 0) {
  2270 + $.each($('.ranking-area li'), function(key, item) {
  2271 + setAvatar($(item).find('.rank-avatar'));
  2272 + });
  2273 +}
  2274 +
  2275 +if ($('.user-avatar').attr('data-avatar') !== '') {
  2276 + setAvatar($('.user-avatar'));
  2277 +}
  2278 +});
2245 define("js/home/entry", ["jquery","swiper","lazyload","hammer","index"], function(require, exports, module){ 2279 define("js/home/entry", ["jquery","swiper","lazyload","hammer","index"], function(require, exports, module){
2246 /** 2280 /**
2247 * 首页打包入口 2281 * 首页打包入口
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.