Authored by happyhour7

Merge branch 'develop' of http://git.dev.yoho.cn/ued/yohogirls-frontend into develop

Conflicts:
	web/js/util/seajs.js
	web/package.json

1.67 KB | W: | H:

1.46 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.86 KB | W: | H:

1.51 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.02 KB | W: | H:

1.68 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.98 KB | W: | H:

1.62 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.09 KB | W: | H:

1.54 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -10,9 +10,12 @@ var $ = require('jquery'),
imgZoom = require('../plugin/imgZoom'),
tools = require('yoho-tools'),
mustache = require('mustache'),
//Handlebars = require('handlebars'),
mulLine = require('mlellipsis'),
flip = require("../plugin/flip"),
slide = require("../plugin/photoslide");
slide = require("../plugin/photoslide"),
jsonp = require('yoho-jsonp');
require('lazyload');
require('../plugin/slider');
... ... @@ -84,21 +87,22 @@ exports.init = function() {
//初始化截行插件
mulLine.init();
//分享
share.init({
shareUrl: shareUrl,
img: shareCover,
sinaText: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
sinaText: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '(来自Yoho!GIRL)',
fbTextFunction: function() {
return {
des: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
name: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
caption: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
des: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#Yoho!GIRL',
name: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#Yoho!GIRL',
caption: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#Yoho!GIRL',
url: location.href
}
},
tweetText: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
qqText: '【Yoho!Girls】' + detailTitle.text() + ' ' + detailSubtitle.text() + '(来自Yoho!Girls)'
qqText: '【Yoho!Girls】' + detailTitle.text() + ' ' + detailSubtitle.text() + '(来自Yoho!GIRL)'
});
//懒加载
... ... @@ -170,10 +174,8 @@ exports.init = function() {
};
//右侧side的数据获取
$.ajax({
url: 'http://newgirls.test.yoho.cn/channel/detail/getright?id=' + ajaxParam.id + '&type=' + ajaxParam.type + '&c=' + ajaxParam.c + '&twoc=' + ajaxParam.twoc,
dataType: 'jsonp',
jsonp: 'callback',
jsonp({
url: YohoConfig.mainUrl + '/channel/detail/getright?id=' + ajaxParam.id + '&type=' + ajaxParam.type + '&c=' + ajaxParam.c + '&twoc=' + ajaxParam.twoc,
success: function(response) {
data = response.data;
//广告
... ... @@ -205,7 +207,7 @@ exports.init = function() {
}
//边栏related-post
if (data.mosts instanceof Array) return;
if (data.mosts.length <= 0) return;
sidePostTpl = $('#side-related-posts').html();
sidePostData = {
relatedPost: {
... ... @@ -303,10 +305,8 @@ exports.init = function() {
});
//底部数据的获取
$.ajax({
url: 'http://newgirls.test.yoho.cn/channel/detail/getbottom?id=' + ajaxParam.id + '&type=' + ajaxParam.type + '&c=' + ajaxParam.c + '&twoc=' + ajaxParam.twoc,
dataType: 'jsonp',
jsonp: 'callback',
jsonp({
url: YohoConfig.mainUrl + '/channel/detail/getbottom?id=' + ajaxParam.id + '&type=' + ajaxParam.type + '&c=' + ajaxParam.c + '&twoc=' + ajaxParam.twoc,
success: function(response) {
data = response.data;
... ... @@ -316,14 +316,21 @@ exports.init = function() {
commentnum = data.commentnum;
//底部related-post
if (!data.related instanceof Array) {
if (data.related.length > 0) {
bottomPostTpl = $('#bottom-related-posts').html();
bottomPostData = {
relatedPost: {
postList: data.related
}
}
};
// console.log(bottomPostData);
// console.log(bottomPostTpl);
//console.log(Handlebars);
/*var tpl = Handlebars.compile(bottomPostTpl);
var template = tpl(bottomPostData);*/
bottomPostHtml = mustache.render(bottomPostTpl, bottomPostData);
//console.log(tpl)
$('.detail-body').append($(bottomPostHtml));
postList = $('.related-posts').find("li");
... ...
var $ = require("jquery");
require("../plugin/comment");
require("../plugin/login");
exports.init = function()
{
$('.about-nav .feedback').addClass('current');
$(".comments-box").comment({
cid:'0',
commentPageUrl:'/feedback/default/list',
publishUrl:'/feedback/default/publish',
deleteUrl:'/feedback/default/delete',
isFeedback:true
});
exports.updateLogin = function(){
$(".comments-box").login("updateLoginState");
$(".comments-box").comment("publishComment");
}
var $ = require("jquery");
require("../plugin/comment");
require("../plugin/login");
exports.init = function() {
$('.about-nav .feedback').addClass('current');
$(".comments-box").comment({
cid: '0',
commentPageUrl: '/feedback/default/list',
publishUrl: '/feedback/default/publish',
deleteUrl: '/feedback/default/delete',
thirdLogin: true
});
exports.updateLogin = function() {
$(".comments-box").login("updateLoginState");
$(".comments-box").comment("publishComment");
}
}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,9 @@
var $ = require('jquery'),
share = require('../plugin/share'),
swiper = require('yoho-idangerous.swiper');
swiper = require('yoho-idangerous.swiper'),
jsonp = require('yoho-jsonp');
require('lazyload');
... ... @@ -17,8 +19,6 @@ require('../plugin/imgZoom');
exports.init = function() {
var shareUrl = $('.share').attr('data-link'),
shareCover = $('.share').attr('cover-url'),
detailTitle = $('.detail-title').find('h1'),
detailSubtitle = $('.detail-title').find('h2'),
magazineSlide,
timer,
magazineTimer;
... ... @@ -26,18 +26,18 @@ exports.init = function() {
//分享
share.init({
shareUrl: shareUrl,
img: shareCover,
sinaText: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
img: $(".mags-slide li").eq(0).find("img").attr("src"),
sinaText: '随时引领潮流生活,我正在看《YOHO!潮流志》' + $(".date-price").find("span").text() + '期点杂志,每月7日,17日,27日出刊哦~',
fbTextFunction: function() {
return {
des: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
name: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
caption: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
des: '随时引领潮流生活,我正在看《YOHO!潮流志》' + $(".date-price").find("span").text() + '期点杂志,每月7日,17日,27日出刊哦~',
name: '随时引领潮流生活,我正在看《YOHO!潮流志》' + $(".date-price").find("span").text() + '期点杂志,每月7日,17日,27日出刊哦~',
caption: '随时引领潮流生活,我正在看《YOHO!潮流志》' + $(".date-price").find("span").text() + '期点杂志,每月7日,17日,27日出刊哦~',
url: location.href
}
},
tweetText: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
qqText: '【Yoho!Girls】' + detailTitle.text() + ' ' + detailSubtitle.text() + '(来自Yoho!Girls)'
tweetText: '随时引领潮流生活,我正在看《YOHO!潮流志》' + $(".date-price").find("span").text() + '期点杂志,每月7日,17日,27日出刊哦~',
qqText: '随时引领潮流生活,我正在看《YOHO!潮流志》' + $(".date-price").find("span").text() + '期点杂志,每月7日,17日,27日出刊哦~'
});
//图片懒加载
... ... @@ -94,10 +94,8 @@ exports.init = function() {
}, 0);
});
$.ajax({
url: 'http://newgirls.test.yoho.cn/channel/magazine/ezine',
dataType: 'jsonp',
jsonp: 'callback',
jsonp({
url: YohoConfig.mainUrl + '/channel/magazine/ezine',
success: function(response) {
var data = response.data,
len = data.length,
... ...
var $ = require("jquery");
require("../plugin/comment");
require("../plugin/login");
exports.init = function()
{
var cidNum = $(".editor-comment-content").attr("cid");
$(".comment_button").on("click",function(){
if($(".comment-area").find(".comment-textarea").size()>0){
if($(".editor-comment-content").css("display") == "none"){
$(".editor-comment-content").show();
}else{
$(".editor-comment-content").hide();
}
}else{
$(".comment-area").comment({
cid:cidNum,
isEdit:true
});
var $ = require("jquery");
require("../plugin/comment");
require("../plugin/login");
exports.init = function() {
var cidNum = $(".editor-comment-content").attr("cid");
$(".comment_button").on("click", function() {
if ($(".comment-area").find(".comment-textarea").size() > 0) {
if ($(".editor-comment-content").css("display") == "none") {
$(".editor-comment-content").show();
}
});
exports.updateLogin = function(){
$(".comment-area").login("updateLoginState");
$(".comment-area").comment("publishComment");
} else {
$(".editor-comment-content").hide();
}
} else {
$(".comment-area").comment({
cid: cidNum,
thirdLogin: true,
isEdit: true
});
$(".editor-comment-content").show();
}
});
exports.updateLogin = function() {
$(".comment-area").login("updateLoginState");
$(".comment-area").comment("publishComment");
}
var id = {id:cidNum};
$.ajax({
type:'GET',
url:YohoConfig.mainUrl+'/writer/default/comment',
data: id,
dataType:'json',
success:function(response)
{
var data = response.data;
if(data.total){
$(".comment-num").text(data.total);
}
var id = {
id: cidNum
};
$.ajax({
type: 'GET',
url: YohoConfig.mainUrl + '/writer/default/comment',
data: id,
dataType: 'json',
success: function(response) {
var data = response.data;
if (data.total) {
$(".comment-num").text(data.total);
}
})
}
}
})
}
\ No newline at end of file
... ...
... ... @@ -73,7 +73,7 @@ require("./login");
//var id = {id:this.options.cid};
$.ajax({
type: 'GET',
url: 'http://newgirls.test.yoho.cn' + this.options.commentPageUrl,
url: YohoConfig.mainUrl + this.options.commentPageUrl,
/*data: id,
dataType:'json',*/
success: function(response) {
... ...
... ... @@ -60,39 +60,6 @@ require('./lazyloadImage');
this._animate(this.width);
},
/*
* 添加节点
*/
_addDom: function() {
var _this = this;
if (!this.$element.data("url")) return;
$.ajax({
type: 'GET',
url: YohoConfig.mainUrl + _this.$element.data("url") + _this.page,
dataType: 'json',
success: function(data) {
var item = '',
msg = data.data,
len = msg.length;
for (var i = 0; i < len; i++) {
item += '<li class="' + _this.options.itemClass + '"><a href="javascript:;"><img src="" data-slide="' + msg[i].pics + '" data-original="' + msg[i].cover + '" data-imgzoom="' + msg[i].dynamic + '"/><span>' + msg[i].title + '</span></a></li>'
}
$(item).appendTo(_this.$element);
//添加节点后重新计算宽度
if (_this.options.itemClass != '') {
_this.len = _this.$element.find("li." + _this.options.itemClass).length;
} else {
_this.len = _this.$element.find("li").length;
}
_this._calculationWidth(_this.len, _this.width);
_this.page++;
}
});
},
/*
* 插件事件绑定
*/
... ... @@ -106,10 +73,6 @@ require('./lazyloadImage');
if (_this.index == _this.len - _this.options.pageNum + 1) {
$(this).hide();
};
if ((Math.ceil(_this.index / _this.options.pageNum)) % 3 == 0 && (Math.ceil((_this.index - 1) / _this.options.pageNum)) % 3 != 0) {
_this._addDom();
}
});
this.$btnPrev.on("click", function() {
... ...
... ... @@ -3,322 +3,319 @@
author:liuyue
date:2015-01-07
*/
var $=require("jquery");
var $ = require("jquery");
var validate = require("./validate");
var box = require("./box");
var tools = require("yoho-tools");
var tips=require("./tips");
;
var tips = require("./tips");;
(function(global, undefined) {
var Login = function(element, options) {
this.options = options;
this.$element = $(element);
this.init();
this.options = options;
this.$element = $(element);
this.init();
};
Login.DEFAULTS = {
};
Login.DEFAULTS = {};
Login.prototype = {
constructor: Login,
init:function(){
if($(".login-box").size()<=0){
init: function() {
if ($(".login-box").size() <= 0) {
this.creatLoginBox();
this._bindEvent();
}
this.initLoginState();
if(!$(".cookieList").size() >0){
if (!$(".cookieList").size() > 0) {
var cookieList = $('<ul class="cookieList"></ul>').appendTo($(".accountwrap"));
}
this.cookieAccount();
},
creatLoginBox:function(){
var $loginBox = $('<div class="login-box">'+
'<h2>登录</h2>'+
'<div class="input-box">'+
'<p class="accountwrap"><input class="yoho-account" type="text" placeholder="'+tips.getTips("yohoAccount")+'"></p>'+
'<p><input class="yoho-pwd" type="password" placeholder="'+tips.getTips("yohoPwd")+'" style="display:none;" /><input class="yoho-pwd-text" type="text" placeholder="'+tips.getTips("yohoPwd")+'" /></p>'+
'</div>'+
'<div class="warn">'+tips.getTips("loginError")+'</div>'+
'<div class="login-btn">'+
'<a id="login" href="javascript:;">'+tips.getTips("login")+'</a>'+
'</div>'+
'<div class="third-login">'+
'<p>'+tips.getTips("thirdLogin")+'</p>'+
'<div class="third-btn clearfix">'+
'<a class="sina" ref="/passport/partner/index/oauth/sina" href="javascript:;"></a>'+
'<a class="qq" ref="/passport/partner/index/oauth/qq" href="javascript:;"></a>'+
'<a class="fb" ref="/passport/partner/index/oauth/facebook" href="javascript:;"></a>'+
'</div>'+
'</div>'+
'<div class="close-btn"></div>'+
'</div>'+
creatLoginBox: function() {
var $loginBox = $('<div class="login-box">' +
'<h2>登录</h2>' +
'<div class="input-box">' +
'<p class="accountwrap"><input class="yoho-account" type="text" placeholder="' + tips.getTips("yohoAccount") + '"></p>' +
'<p><input class="yoho-pwd" type="password" placeholder="' + tips.getTips("yohoPwd") + '" style="display:none;" /><input class="yoho-pwd-text" type="text" placeholder="' + tips.getTips("yohoPwd") + '" /></p>' +
'</div>' +
'<div class="warn">' + tips.getTips("loginError") + '</div>' +
'<div class="login-btn">' +
'<a id="login" href="javascript:;">' + tips.getTips("login") + '</a>' +
'</div>' +
'<div class="third-login">' +
'<p>' + tips.getTips("thirdLogin") + '</p>' +
'<div class="third-btn clearfix">' +
'<a class="sina" ref="/passport/partner/index/oauth/sina" href="javascript:;"></a>' +
'<a class="qq" ref="/passport/partner/index/oauth/qq" href="javascript:;"></a>' +
'<a class="fb" ref="/passport/partner/index/oauth/facebook" href="javascript:;"></a>' +
'</div>' +
'</div>' +
'<div class="close-btn"></div>' +
'</div>' +
'<div class="login-shadow"></div>').appendTo("body");
},
_bindEvent:function(){
_bindEvent: function() {
var that = this;
//关闭登录框
$(document).on("click.closeLogin",function(event){
if($(event.target).is(".publish-btn") || $(event.target).is(".login-box") || $(event.target).parents(".login-box").length>=1 ||$(event.target).is(".yoho")||$(event.target).parents(".yoho").length>=1||$(event.target).is(".side-bar-header")) return;
$(document).on("click.closeLogin", function(event) {
if ($(event.target).is(".publish-btn") || $(event.target).is(".login-box") || $(event.target).parents(".login-box").length >= 1 || $(event.target).is(".yoho") || $(event.target).parents(".yoho").length >= 1 || $(event.target).is(".side-bar-header")) return;
that.closeLoginBox();
event.stopPropagation();
});
$(".login-box").on("click.closeLoginBox",".close-btn",function(){
$(".login-box").on("click.closeLoginBox", ".close-btn", function() {
that.closeLoginBox();
});
//输入账号时登录按钮样式变化
$(".login-box").on("focus",".yoho-account",function(){
$(".login-box").on("focus", ".yoho-account", function() {
$(".login-box").find("#login").addClass("login");
});
//账号密码输入框默认提示
$('.yoho-account').val(tips.getTips("yohoAccount")).addClass("default-tip");
$('.yoho-pwd-text').val(tips.getTips("yohoPwd")).addClass("default-tip");
$('.yoho-account').on("focus",function()
{
if ($(this).val() == tips.getTips("yohoAccount"))
{
$(this).removeClass("default-tip");
$(this).val('');
}
}).on("blur",function()
{
if ($(this).val() == '')
{
$(this).addClass("default-tip");
$(this).val(tips.getTips("yohoAccount"));
}
});
$('.yoho-pwd-text').on("focus",function()
{
if ($(this).val() == '' || $(this).val() == tips.getTips("yohoPwd"))
{
$('.yoho-pwd').val('').show().focus();
$(this).hide();
$(this).removeClass("default-tip");
}
});
$('.yoho-pwd').on("blur",function()
{
if ($(this).val() == '')
{
$(this).hide();
$('.yoho-pwd-text').addClass("default-tip");
$('.yoho-pwd-text').val(tips.getTips("yohoPwd")).show();
}
});
$('.yoho-account').on("focus", function() {
if ($(this).val() == tips.getTips("yohoAccount")) {
$(this).removeClass("default-tip");
$(this).val('');
}
}).on("blur", function() {
if ($(this).val() == '') {
$(this).addClass("default-tip");
$(this).val(tips.getTips("yohoAccount"));
}
});
$('.yoho-pwd-text').on("focus", function() {
if ($(this).val() == '' || $(this).val() == tips.getTips("yohoPwd")) {
$('.yoho-pwd').val('').show().focus();
$(this).hide();
$(this).removeClass("default-tip");
}
});
$('.yoho-pwd').on("blur", function() {
if ($(this).val() == '') {
$(this).hide();
$('.yoho-pwd-text').addClass("default-tip");
$('.yoho-pwd-text').val(tips.getTips("yohoPwd")).show();
}
});
//登录按钮点击事件
$(".login-box").on("click.login","#login",function()
{
var $this = $(this);
var account = $('.yoho-account').val();
var password = $('.yoho-pwd').val();
$.ajax
({
type:'POST',
url:YohoConfig.mainUrl+'/passport/partner/yoho',
data:{'account':account,'password':password},
dataType:'json',
success:function(response)
{
if (response&&response.status && response.data)
{
var userName;
var currentUserName=tools.cookie('userName');
var account = $(".yoho-account").val();
if(currentUserName==null||currentUserName==undefined){
tools.cookie('userName',account,{expires:5,path: '/'});
}else{
tools.cookie('userName',currentUserName+","+account,{expires:5,path: '/'});
}
that.cookieAccount();
that.setLogin(response.data);
$(".login-box").find(".warn").css({"visibility":"hidden"});
that.closeLoginBox();
$this.comment("publishComment");
}
else if (response&&response.message != '')
{
$(".login-box").find(".warn").css({"visibility":"visible"});
}
else
{
$(".login-box").find(".warn").css({"visibility":"visible"});
}
}
});
});
$(".login-box").on("click.login", "#login", function() {
var $this = $(this);
var account = $('.yoho-account').val();
var password = $('.yoho-pwd').val();
$.ajax({
type: 'POST',
url: YohoConfig.mainUrl + '/passport/partner/yoho',
data: {
'account': account,
'password': password
},
dataType: 'jsonp',
success: function(response) {
if (response && response.status && response.data) {
var userName;
var currentUserName = tools.cookie('userName');
var account = $(".yoho-account").val();
if (currentUserName == null || currentUserName == undefined) {
tools.cookie('userName', account, {
expires: 5,
path: '/'
});
} else {
tools.cookie('userName', currentUserName + "," + account, {
expires: 5,
path: '/'
});
}
that.cookieAccount();
that.setLogin(response.data);
$(".login-box").find(".warn").css({
"visibility": "hidden"
});
that.closeLoginBox();
$this.comment("publishComment");
} else if (response && response.message != '') {
$(".login-box").find(".warn").css({
"visibility": "visible"
});
} else {
$(".login-box").find(".warn").css({
"visibility": "visible"
});
}
}
});
});
//回车执行登录
$(".login-box").find(".yoho-pwd").keyup(function(e)
{
var e = e || window.event;
var k = e.keyCode || e.which;
if (k == 13)
{
$('#login').trigger("click.login");
}
});
$(".third-btn").on("click","a",function(){
$(".login-box").find(".yoho-pwd").keyup(function(e) {
var e = e || window.event;
var k = e.keyCode || e.which;
if (k == 13) {
$('#login').trigger("click.login");
}
});
$(".third-btn").on("click", "a", function() {
var _this = $(this);
if (!_this.attr('ref')) return;
window.open(_this.attr('ref'), "","width=760,height=650,top=300,left=300");
that.closeLoginBox();
return false;
if (!_this.attr('ref')) return;
window.open(_this.attr('ref'), "", "width=760,height=650,top=300,left=300");
that.closeLoginBox();
return false;
});
},
//滑出登录框
loginBoxAnimate:function(){
if($(".login-status").hasClass("login-success")) return;
if($(".side-bar-header").hasClass("login-success")) return;
loginBoxAnimate: function() {
if ($(".login-status").hasClass("login-success")) return;
if ($(".side-bar-header").hasClass("login-success")) return;
var height = $(".login-box").outerHeight();
$(".login-shadow").show();
$("body").find(".login-box").animate({"top":"50%","margin-top":-height/2},200);
$("body").find(".login-box").animate({
"top": "50%",
"margin-top": -height / 2
}, 200);
},
//隐藏登录框
closeLoginBox:function(){
closeLoginBox: function() {
var height = $(".login-box").outerHeight();
$(".login-box").css({"top":-height,"margin-top":0});
$(".login-box").css({
"top": -height,
"margin-top": 0
});
$(".login-shadow").hide();
},
//初始化登录状态
initLoginState:function()
{
var state = tools.cookie('yh_state');
var syncs = tools.cookie('yh_syncs');
if (state && syncs)
{
var data = $.parseJSON(syncs);
if (data && data.nick)
{
this.setLogin(data);
}
}
},
//更新登录信息
updateLoginState:function()
{
this.initLoginState();
},
initLoginState: function() {
var state = tools.cookie('yh_state');
var syncs = tools.cookie('yh_syncs');
if (state && syncs) {
var data = $.parseJSON(syncs);
if (data && data.nick) {
this.setLogin(data);
}
}
},
//更新登录信息
updateLoginState: function() {
this.initLoginState();
},
//登录
setLogin:function(data){
setLogin: function(data) {
var that = this;
$(".login-status .userimg").find("i").attr("class",data.type);
$(".login-status .userimg").find("i").attr("class", data.type);
$(".login-status .userinfo").find("span").text(data.nick);
//用户头像
if (data.headpic)
{
$(".login-status .userimg").find("img").attr("src",data.headpic);
}
//手机版
if (data.headpic)
{
$(".user-avatar").find("img").attr("src",data.headpic);
}
$(".login-username").text(data.nick);
$(".side-bar-header").addClass("login-success");
if (data.headpic) {
$(".login-status .userimg").find("img").attr("src", data.headpic);
}
//手机版
if (data.headpic) {
$(".user-avatar").find("img").attr("src", data.headpic);
}
$(".login-username").text(data.nick);
$(".side-bar-header").addClass("login-success");
$(".login-status .userinfo").show();
$(".login-status").addClass("login-success");
//隐藏匿名
if($(".login-status .anonymous").size()>0){
if ($(".login-status .anonymous").size() > 0) {
$(".login-status .anonymous").hide();
}
//隐藏第三方登录
$('.third-login-box').hide();
//隐藏意见反馈页登录按钮
if($(".feedback-login").size()>0){
if ($(".feedback-login").size() > 0) {
$(".feedback-login").hide();
}
$(".exit-btn").on("click",function(){
box.confirm(tips.getTips("logout"), function(){
$(".exit-btn").on("click", function() {
box.confirm(tips.getTips("logout"), function() {
that.setLogout();
});
});
},
//登出
setLogout:function(){
setLogout: function() {
$(".login-status").removeClass("login-success");
$(".login-status .userimg").find("img").attr("src",YohoConfig.resUrl+"/res/new/boys/images/detail/user-img.png");
$(".login-status .userimg").find("img").attr("src", YohoConfig.resUrl + "/assets/images/detail/user-img.png");
$(".login-status .userinfo").hide();
$(".login-status .userimg").find("i").attr("class",'');
$(".login-status .userimg").find("i").attr("class", '');
$(".comments-list").find(".delete-comment").remove();
//手机版
$(".side-bar-header").removeClass("login-success");
$(".user-avatar").find("img").attr("src",YohoConfig.resUrl+"/res/new/boys/images/detail/user-img.png");
$(".user-avatar").find("img").attr("src", YohoConfig.resUrl + "/assets/images/detail/user-img.png");
$(".login-username").text("登录");
//显示匿名
if($(".login-status .anonymous").size()>0){
if ($(".login-status .anonymous").size() > 0) {
$(".login-status .anonymous").show();
}
//显示第三方登录
$('.third-login-box').show();
//显示意见反馈页登录按钮
if($(".feedback-login").size()>0){
if ($(".feedback-login").size() > 0) {
$(".feedback-login").show();
}
$.ajax
({
type:'GET',
url:YohoConfig.mainUrl+'/passport/partner/logout',
dataType:'json'
});
$.ajax({
type: 'GET',
url: YohoConfig.mainUrl + '/passport/partner/logout',
dataType: 'json'
});
},
//cookie记入账号
cookieAccount:function(){
//cookie
var getCookie,
arrCookie;
getCookie = decodeURIComponent(tools.cookie('userName'));
if(!!tools.cookie('userName'))
{
arrCookie = tools.unique(getCookie.split(','));
$(".cookieList").empty();
for (var i=0;i<arrCookie.length;i++) {
$(".cookieList").append($('<li><a href="javascript:;">'+arrCookie[i]+'</a></li>'));
}
$(".login-box").click(function(e){
if($(e.target).is(".yoho-account")||$(e.target).is(".cookieList")|| $(e.target).closest(".cookieList").size()>0){
$(".cookieList").show();
}else{
$(".cookieList").hide();
}
})
$(".cookieList").on("click","li",function(){
$(".yoho-account").val($(this).find("a").text()).removeClass("default-tip");
$(".cookieList").hide();
return false;
});
}
cookieAccount: function() {
//cookie
var getCookie,
arrCookie;
getCookie = decodeURIComponent(tools.cookie('userName'));
if (!!tools.cookie('userName')) {
arrCookie = tools.unique(getCookie.split(','));
$(".cookieList").empty();
for (var i = 0; i < arrCookie.length; i++) {
$(".cookieList").append($('<li><a href="javascript:;">' + arrCookie[i] + '</a></li>'));
}
$(".login-box").click(function(e) {
if ($(e.target).is(".yoho-account") || $(e.target).is(".cookieList") || $(e.target).closest(".cookieList").size() > 0) {
$(".cookieList").show();
} else {
$(".cookieList").hide();
}
})
$(".cookieList").on("click", "li", function() {
$(".yoho-account").val($(this).find("a").text()).removeClass("default-tip");
$(".cookieList").hide();
return false;
});
}
}
};
... ... @@ -336,7 +333,7 @@ var tips=require("./tips");
};
$.fn.login = Plugin;
$.fn.login.Constructor = Login;
$.fn.login = Plugin;
$.fn.login.Constructor = Login;
})(this);
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@
*/
var $ = require("jquery");
require("lazyload");
require("yoho-imagesloaded");
var tmpInfo = null;
window.onresize = function() {
if (tmpInfo != null) {
... ...
... ... @@ -11,75 +11,70 @@
* fbAppId:YohoConfig.girl.fbAppId,'657464311006064',
fbUrl:YohoConfig.girl.mainUrl+'/channel/yohood/closedialog',
*/
var $=require("jquery");
exports.init=function(info){
var defaults={
width:800,
height:500,
img:"",
imgFunction:null,
sinaText:"",
sinaTextFunction:null,
tweetText:"",
tweetTextFunction:null,
fbCaption:"",
fbDescription:"",
fbName:"",
fbTextFunction:null,
shareUrl:"",
shareUrlFunction:null,
fbAppId:"",
fbUrl:"",
qqText:""
}
var options=$.extend(defaults,info);
var $ = require("jquery");
exports.init = function(info) {
var defaults = {
width: 800,
height: 500,
img: "",
imgFunction: null,
sinaText: "",
sinaTextFunction: null,
tweetText: "",
tweetTextFunction: null,
fbCaption: "",
fbDescription: "",
fbName: "",
fbTextFunction: null,
shareUrl: "",
shareUrlFunction: null,
fbAppId: "",
fbUrl: "",
qqText: ""
}
var options = $.extend(defaults, info);
$(".yohoo-share-button-sina").unbind().on("click", function() {
if (options.sinaTextFunction != null) {
options.sinaText = (function() {
return options.sinaTextFunction.apply($(".yohoo-share-button-sina"));
})();
}
options.sinaText = options.sinaText.replace(/[ ]/g, "%20")
.replace(/[&]/g, "%26")
.replace(/[#]/g, "%23")
.replace(/[+]/g, "%2B");
$(".yohoo-share-button-sina").unbind().on("click", function()
{
if(options.sinaTextFunction!=null)
{
options.sinaText=(function(){
return options.sinaTextFunction.apply($(".yohoo-share-button-sina"));
})();
}
options.sinaText=options.sinaText.replace(/[ ]/g, "%20")
.replace(/[&]/g,"%26")
.replace(/[#]/g,"%23")
.replace(/[+]/g,"%2B");
window.sharetitle = options.sinaText;
if(options.imgFunction!=null)
{
options.img=(function(){
return options.imgFunction.apply($(".yohoo-share-button-sina"));
})();
if (options.imgFunction != null) {
options.img = (function() {
return options.imgFunction.apply($(".yohoo-share-button-sina"));
})();
}
window.shareUrl = options.img
share();
});
if(options.shareUrlFunction!=null)
{
options.shareUrl=(function(){
return options.shareUrlFunction.apply({sina:$(".yohoo-share-button-sina"),
facebook:$(".yohoo-share-button-facebook"),
tweet:$(".yohoo-share-button-tweet")});
})();
}
else
{
options.shareUrl=options.shareUrl==""?document.location.href:options.shareUrl;
if (options.shareUrlFunction != null) {
options.shareUrl = (function() {
return options.shareUrlFunction.apply({
sina: $(".yohoo-share-button-sina"),
facebook: $(".yohoo-share-button-facebook"),
tweet: $(".yohoo-share-button-tweet")
});
})();
} else {
options.shareUrl = options.shareUrl == "" ? document.location.href : options.shareUrl;
}
function share()
{
function share() {
(function(s, d, e) {
try {
} catch (e) {
}
var f = 'http://v.t.sina.com.cn/share/share.php?', u = options.shareUrl, p = ['url=', e(u), '&title=', e(window.sharetitle+' @YOHO潮流志'), '&appkey=2924220432', '&pic=', e(window.shareUrl)].join('');
try {} catch (e) {}
var f = 'http://v.t.sina.com.cn/share/share.php?',
u = options.shareUrl,
p = ['url=', e(u), '&title=', e(window.sharetitle), '&appkey=2924220432', '&pic=', e(window.shareUrl)].join('');
function a() {
if (!window.open([f, p].join(''), 'mb', ['toolbar=0,status=0,resizable=1,width=620,height=450,left=', (s.width - 620) / 2, ',top=', (s.height - 450) / 2].join('')))
u.href = [f, p].join('');
... ... @@ -94,104 +89,98 @@ exports.init=function(info){
var iTop = (window.screen.availHeight - 30 - options.height) / 2; //获得窗口的垂直位置;
var iLeft = (window.screen.availWidth - 10 - options.width) / 2; //获得窗口的水平位置;
$(".yohoo-share-button-facebook").unbind().on("click",function() {
if(options.imgFunction!=null)
{
options.img=(function(){
$(".yohoo-share-button-facebook").unbind().on("click", function() {
if (options.imgFunction != null) {
options.img = (function() {
return options.imgFunction.apply($(".yohoo-share-button-facebook"));
})();
}
var tmpResult={des:"",name:"",caption:""};
if(options.fbTextFunction!=null)
{
tmpResult=(function(){
var tmpResult = {
des: "",
name: "",
caption: ""
};
if (options.fbTextFunction != null) {
tmpResult = (function() {
return options.fbTextFunction.apply($(".yohoo-share-button-facebook"));
})();
if (!tmpResult.url)
{
options.fbCaption=tmpResult.caption;
options.fbDescription=tmpResult.des;
options.fbName=tmpResult.name;
}
else
{
if (!tmpResult.url) {
options.fbCaption = tmpResult.caption;
options.fbDescription = tmpResult.des;
options.fbName = tmpResult.name;
} else {
options.fbUrl = tmpResult.url;
}
}
if (options.fbUrl)
{
if (options.fbUrl) {
window.open("https://www.facebook.com/sharer/sharer.php?u=" + options.fbUrl, "",
"height="+options.height+",width="+options.width+",left=" + iLeft + ",top=" + iTop);
}
else
{
options.fbCaption=options.fbCaption.replace(/[ ]/g, "%20")
.replace(/[&]/g,"%26")
.replace(/[#]/g,"%23")
.replace(/[+]/g,"%2B");
options.fbDescription=tmpResult.des.replace(/[ ]/g, "%20")
.replace(/[&]/g,"%26")
.replace(/[#]/g,"%23")
.replace(/[+]/g,"%2B");
options.fbName=tmpResult.name.replace(/[ ]/g, "%20")
.replace(/[&]/g,"%26")
.replace(/[#]/g,"%23")
.replace(/[+]/g,"%2B");
"height=" + options.height + ",width=" + options.width + ",left=" + iLeft + ",top=" + iTop);
} else {
options.fbCaption = options.fbCaption.replace(/[ ]/g, "%20")
.replace(/[&]/g, "%26")
.replace(/[#]/g, "%23")
.replace(/[+]/g, "%2B");
options.fbDescription = tmpResult.des.replace(/[ ]/g, "%20")
.replace(/[&]/g, "%26")
.replace(/[#]/g, "%23")
.replace(/[+]/g, "%2B");
options.fbName = tmpResult.name.replace(/[ ]/g, "%20")
.replace(/[&]/g, "%26")
.replace(/[#]/g, "%23")
.replace(/[+]/g, "%2B");
window.open("http://www.facebook.com/dialog/feed?app_id=1431491300468916&redirect_uri=http://www.yohoboys.com/channel/yohood/closedialog&" +
"link=" + options.shareUrl +
"&picture=" + options.img+
"&caption=" +options.fbName+
"&description="+options.fbDescription+(options.fbDescription==""?"":"(分享自 @yohoboy)")+
"&name="+options.fbCaption,
"&picture=" + options.img +
"&caption=" + options.fbName +
"&description=" + options.fbDescription + (options.fbDescription == "" ? "" : "(分享自 @yohoboy)") +
"&name=" + options.fbCaption,
"",
"height="+options.height+",width="+options.width+",left=" + iLeft + ",top=" + iTop);
"height=" + options.height + ",width=" + options.width + ",left=" + iLeft + ",top=" + iTop);
}
});
$(".yohoo-share-button-tweet").unbind().on("click",function() {
if(options.tweetTextFunction!=null)
{
options.tweetText=(function(){
return options.tweetTextFunction.apply($(".yohoo-share-button-tweet"));
})();
}
options.tweetText=options.tweetText.replace(/[ ]/g, "%20")
.replace(/[&]/g,"%26")
.replace(/[#]/g,"%23")
.replace(/[+]/g,"%2B");
window.open("http://twitter.com/intent/tweet?url=" + options.shareUrl +
"&text="+options.tweetText,
"",
"height="+options.height+",width="+options.width+",left=" + iLeft + ",top=" + iTop);
$(".yohoo-share-button-tweet").unbind().on("click", function() {
if (options.tweetTextFunction != null) {
options.tweetText = (function() {
return options.tweetTextFunction.apply($(".yohoo-share-button-tweet"));
})();
}
options.tweetText = options.tweetText.replace(/[ ]/g, "%20")
.replace(/[&]/g, "%26")
.replace(/[#]/g, "%23")
.replace(/[+]/g, "%2B");
window.open("http://twitter.com/intent/tweet?url=" + options.shareUrl +
"&text=" + options.tweetText,
"",
"height=" + options.height + ",width=" + options.width + ",left=" + iLeft + ",top=" + iTop);
});
$(".yohoo-share-button-qq").unbind().on("click",function(){
window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+ encodeURIComponent(location.href)+
'&title='+options.qqText+
'&pics='+options.img,'_blank','height='+options.height+',width='+options.width+',left='+iLeft+',top='+iTop);
$(".yohoo-share-button-qq").unbind().on("click", function() {
window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(location.href) +
'&title=' + options.qqText +
'&pics=' + options.img, '_blank', 'height=' + options.height + ',width=' + options.width + ',left=' + iLeft + ',top=' + iTop);
});
};
$(".yohoo-share-button-wx").on("mouseover",function(){
$(".wx-qrcode-dialog").show();
}).on("mouseout",function(){
$(".wx-qrcode-dialog").hide();
});
$(".yohoo-share-button-wx").on("mouseover", function() {
$(".wx-qrcode-dialog").show();
}).on("mouseout", function() {
$(".wx-qrcode-dialog").hide();
});
//ipad微信
$(".detail-container").on("click.closeWxDialog",function(event){
if($(event.target).is(".yohoo-share-button-wx") || $(event.target).parents(".yohoo-share-button-wx").size()>0){
$(".detail-container").on("click.closeWxDialog", function(event) {
if ($(event.target).is(".yohoo-share-button-wx") || $(event.target).parents(".yohoo-share-button-wx").size() > 0) {
$(".wx-qrcode-dialog").show();
}else{
} else {
$(".wx-qrcode-dialog").hide();
}
})
$(".bottom-content").on("click.closeWxDialog",function(){
$(".bottom-content").on("click.closeWxDialog", function() {
$(".detail-container").trigger("click.closeWxDialog");
})
$(".enterprise").on("click.closeWxDialog",function(){
$(".enterprise").on("click.closeWxDialog", function() {
$(".detail-container").trigger("click.closeWxDialog");
})
})
\ No newline at end of file
... ...
/*
SeaJS - A Module Loader for the Web
v2.3.0 | seajs.org | MIT Licensed
*/
! function(a, b) {
function c(a) {
return function(b) {
return {}.toString.call(b) == "[object " + a + "]"
}
}
function d() {
return z++
}
function e(a) {
return a.match(C)[0]
}
function f(a) {
for (a = a.replace(D, "/"), a = a.replace(F, "$1/"); a.match(E);) a = a.replace(E, "/");
return a
}
function g(a) {
var b = a.length - 1,
c = a.charAt(b);
return "#" === c ? a.substring(0, b) : ".js" === a.substring(b - 2) || a.indexOf("?") > 0 || "/" === c ? a : a + ".js"
}
function h(a) {
var b = u.alias;
return b && w(b[a]) ? b[a] : a
}
function i(a) {
var b = u.paths,
c;
return b && (c = a.match(G)) && w(b[c[1]]) && (a = b[c[1]] + c[2]), a
}
function j(a) {
var b = u.vars;
return b && a.indexOf("{") > -1 && (a = a.replace(H, function(a, c) {
return w(b[c]) ? b[c] : a
})), a
}
function k(a) {
var b = u.map,
c = a;
if (b)
for (var d = 0, e = b.length; e > d; d++) {
var f = b[d];
if (c = y(f) ? f(a) || a : a.replace(f[0], f[1]), c !== a) break
}
return c
}
function l(a, b) {
var c, d = a.charAt(0);
if (I.test(a)) c = a;
else if ("." === d) c = f((b ? e(b) : u.cwd) + a);
else if ("/" === d) {
var g = u.cwd.match(J);
c = g ? g[0] + a.substring(1) : a
} else c = u.base + a;
return 0 === c.indexOf("//") && (c = location.protocol + c), c
}
function m(a, b) {
if (!a) return "";
a = h(a), a = i(a), a = j(a), a = g(a);
var c = l(a, b);
return c = k(c)
}
function n(a) {
return a.hasAttribute ? a.src : a.getAttribute("src", 4)
}
function o(a, b, c) {
var d = K.createElement("script");
if (c) {
var e = y(c) ? c(a) : c;
e && (d.charset = e)
}
p(d, b, a), d.async = !0, d.src = a, R = d, Q ? P.insertBefore(d, Q) : P.appendChild(d), R = null
}
function p(a, b, c) {
function d() {
a.onload = a.onerror = a.onreadystatechange = null, u.debug || P.removeChild(a), a = null, b()
}
var e = "onload" in a;
e ? (a.onload = d, a.onerror = function() {
B("error", {
uri: c,
node: a
}), d()
}) : a.onreadystatechange = function() {
/loaded|complete/.test(a.readyState) && d()
}
}
function q() {
if (R) return R;
if (S && "interactive" === S.readyState) return S;
for (var a = P.getElementsByTagName("script"), b = a.length - 1; b >= 0; b--) {
var c = a[b];
if ("interactive" === c.readyState) return S = c
}
}
function r(a) {
var b = [];
return a.replace(U, "").replace(T, function(a, c, d) {
d && b.push(d)
}), b
}
function s(a, b) {
this.uri = a, this.dependencies = b || [], this.exports = null, this.status = 0, this._waitings = {}, this._remain = 0
}
if (!a.seajs) {
var t = a.seajs = {
version: "2.3.0"
},
u = t.data = {},
v = c("Object"),
w = c("String"),
x = Array.isArray || c("Array"),
y = c("Function"),
z = 0,
A = u.events = {};
t.on = function(a, b) {
var c = A[a] || (A[a] = []);
return c.push(b), t
}, t.off = function(a, b) {
if (!a && !b) return A = u.events = {}, t;
var c = A[a];
if (c)
if (b)
for (var d = c.length - 1; d >= 0; d--) c[d] === b && c.splice(d, 1);
else delete A[a];
return t
};
var B = t.emit = function(a, b) {
var c = A[a],
d;
if (c) {
c = c.slice();
for (var e = 0, f = c.length; f > e; e++) c[e](b)
}
return t
},
C = /[^?#]*\//,
D = /\/\.\//g,
E = /\/[^/]+\/\.\.\//,
F = /([^:/])\/+\//g,
G = /^([^/:]+)(\/.+)$/,
H = /{([^{]+)}/g,
I = /^\/\/.|:\//,
J = /^.*?\/\/.*?\//,
K = document,
L = location.href && 0 !== location.href.indexOf("about:") ? e(location.href) : "",
M = K.scripts,
N = K.getElementById("seajsnode") || M[M.length - 1],
O = e(n(N) || L);
t.resolve = m;
var P = K.head || K.getElementsByTagName("head")[0] || K.documentElement,
Q = P.getElementsByTagName("base")[0],
R, S;
t.request = o;
var T = /"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\/\*[\S\s]*?\*\/|\/(?:\\\/|[^\/\r\n])+\/(?=[^\/])|\/\/.*|\.\s*require|(?:^|[^$])\brequire\s*\(\s*(["'])(.+?)\1\s*\)/g,
U = /\\\\/g,
V = t.cache = {},
W, X = {},
Y = {},
Z = {},
$ = s.STATUS = {
FETCHING: 1,
SAVED: 2,
LOADING: 3,
LOADED: 4,
EXECUTING: 5,
EXECUTED: 6
};
s.prototype.resolve = function() {
for (var a = this, b = a.dependencies, c = [], d = 0, e = b.length; e > d; d++) c[d] = s.resolve(b[d], a.uri);
return c
}, s.prototype.load = function() {
var a = this;
if (!(a.status >= $.LOADING)) {
a.status = $.LOADING;
var c = a.resolve();
B("load", c);
for (var d = a._remain = c.length, e, f = 0; d > f; f++) e = s.get(c[f]), e.status < $.LOADED ? e._waitings[a.uri] = (e._waitings[a.uri] || 0) + 1 : a._remain--;
if (0 === a._remain) return a.onload(), b;
var g = {};
for (f = 0; d > f; f++) e = V[c[f]], e.status < $.FETCHING ? e.fetch(g) : e.status === $.SAVED && e.load();
for (var h in g) g.hasOwnProperty(h) && g[h]()
}
}, s.prototype.onload = function() {
var a = this;
a.status = $.LOADED, a.callback && a.callback();
var b = a._waitings,
c, d;
for (c in b) b.hasOwnProperty(c) && (d = V[c], d._remain -= b[c], 0 === d._remain && d.onload());
delete a._waitings, delete a._remain
}, s.prototype.fetch = function(a) {
function c() {
t.request(g.requestUri, g.onRequest, g.charset)
}
function d() {
delete X[h], Y[h] = !0, W && (s.save(f, W), W = null);
var a, b = Z[h];
for (delete Z[h]; a = b.shift();) a.load()
}
var e = this,
f = e.uri;
e.status = $.FETCHING;
var g = {
uri: f
};
B("fetch", g);
var h = g.requestUri || f;
return !h || Y[h] ? (e.load(), b) : X[h] ? (Z[h].push(e), b) : (X[h] = !0, Z[h] = [e], B("request", g = {
uri: f,
requestUri: h,
onRequest: d,
charset: u.charset
}), g.requested || (a ? a[g.requestUri] = c : c()), b)
}, s.prototype.exec = function() {
function a(b) {
return s.get(a.resolve(b)).exec()
}
var c = this;
if (c.status >= $.EXECUTING) return c.exports;
c.status = $.EXECUTING;
var e = c.uri;
a.resolve = function(a) {
return s.resolve(a, e)
}, a.async = function(b, c) {
return s.use(b, c, e + "_async_" + d()), a
};
var f = c.factory,
g = y(f) ? f(a, c.exports = {}, c) : f;
return g === b && (g = c.exports), delete c.factory, c.exports = g, c.status = $.EXECUTED, B("exec", c), g
}, s.resolve = function(a, b) {
var c = {
id: a,
refUri: b
};
return B("resolve", c), c.uri || t.resolve(c.id, b)
}, s.define = function(a, c, d) {
var e = arguments.length;
1 === e ? (d = a, a = b) : 2 === e && (d = c, x(a) ? (c = a, a = b) : c = b), !x(c) && y(d) && (c = r("" + d));
var f = {
id: a,
uri: s.resolve(a),
deps: c,
factory: d
};
if (!f.uri && K.attachEvent) {
var g = q();
g && (f.uri = g.src)
}
B("define", f), f.uri ? s.save(f.uri, f) : W = f
}, s.save = function(a, b) {
var c = s.get(a);
c.status < $.SAVED && (c.id = b.id || a, c.dependencies = b.deps || [], c.factory = b.factory, c.status = $.SAVED, B("save", c))
}, s.get = function(a, b) {
return V[a] || (V[a] = new s(a, b))
}, s.use = function(b, c, d) {
var e = s.get(d, x(b) ? b : [b]);
e.callback = function() {
for (var b = [], d = e.resolve(), f = 0, g = d.length; g > f; f++) b[f] = V[d[f]].exec();
c && c.apply(a, b), delete e.callback
}, e.load()
}, t.use = function(a, b) {
return s.use(a, b, u.cwd + "_use_" + d()), t
}, s.define.cmd = {}, a.define = s.define, t.Module = s, u.fetchedList = Y, u.cid = d, t.require = function(a) {
var b = s.get(s.resolve(a));
return b.status < $.EXECUTING && (b.onload(), b.exec()), b.exports
}, u.base = O, u.dir = O, u.cwd = L, u.charset = "utf-8", t.config = function(a) {
for (var b in a) {
var c = a[b],
d = u[b];
if (d && v(d))
for (var e in c) d[e] = c[e];
else x(d) ? c = d.concat(c) : "base" === b && ("/" !== c.slice(-1) && (c += "/"), c = l(c)), u[b] = c
}
return B("config", a), t
}
}
}(this);
/**
* @fileOverview SeaJS 配置
*/
seajs.config({
/*alias:
{
'jquery': 'lib/jquery',
'jquery-2.1.3': 'lib/jquery-2.1.3'
},*/
base: 'http://localhost:8000/',
charset: 'utf-8'
});
var YohoConfig = {
baseUrl: '/',
domain: "newgirls.test.yoho.cn",
resdomain: "res.yohoboys.com",
mainUrl: "http://newgirls.test.yoho.cn",
resUrl: "http://res.yohoboys.com",
uploadUrl: "http://www.yohoboys.com/upload"
};
\ No newline at end of file
/*
SeaJS - A Module Loader for the Web
v2.3.0 | seajs.org | MIT Licensed
*/
! function(a, b) {
function c(a) {
return function(b) {
return {}.toString.call(b) == "[object " + a + "]"
}
}
function d() {
return z++
}
function e(a) {
return a.match(C)[0]
}
function f(a) {
for (a = a.replace(D, "/"), a = a.replace(F, "$1/"); a.match(E);) a = a.replace(E, "/");
return a
}
function g(a) {
var b = a.length - 1,
c = a.charAt(b);
return "#" === c ? a.substring(0, b) : ".js" === a.substring(b - 2) || a.indexOf("?") > 0 || "/" === c ? a : a + ".js"
}
function h(a) {
var b = u.alias;
return b && w(b[a]) ? b[a] : a
}
function i(a) {
var b = u.paths,
c;
return b && (c = a.match(G)) && w(b[c[1]]) && (a = b[c[1]] + c[2]), a
}
function j(a) {
var b = u.vars;
return b && a.indexOf("{") > -1 && (a = a.replace(H, function(a, c) {
return w(b[c]) ? b[c] : a
})), a
}
function k(a) {
var b = u.map,
c = a;
if (b)
for (var d = 0, e = b.length; e > d; d++) {
var f = b[d];
if (c = y(f) ? f(a) || a : a.replace(f[0], f[1]), c !== a) break
}
return c
}
function l(a, b) {
var c, d = a.charAt(0);
if (I.test(a)) c = a;
else if ("." === d) c = f((b ? e(b) : u.cwd) + a);
else if ("/" === d) {
var g = u.cwd.match(J);
c = g ? g[0] + a.substring(1) : a
} else c = u.base + a;
return 0 === c.indexOf("//") && (c = location.protocol + c), c
}
function m(a, b) {
if (!a) return "";
a = h(a), a = i(a), a = j(a), a = g(a);
var c = l(a, b);
return c = k(c)
}
function n(a) {
return a.hasAttribute ? a.src : a.getAttribute("src", 4)
}
function o(a, b, c) {
var d = K.createElement("script");
if (c) {
var e = y(c) ? c(a) : c;
e && (d.charset = e)
}
p(d, b, a), d.async = !0, d.src = a, R = d, Q ? P.insertBefore(d, Q) : P.appendChild(d), R = null
}
function p(a, b, c) {
function d() {
a.onload = a.onerror = a.onreadystatechange = null, u.debug || P.removeChild(a), a = null, b()
}
var e = "onload" in a;
e ? (a.onload = d, a.onerror = function() {
B("error", {
uri: c,
node: a
}), d()
}) : a.onreadystatechange = function() {
/loaded|complete/.test(a.readyState) && d()
}
}
function q() {
if (R) return R;
if (S && "interactive" === S.readyState) return S;
for (var a = P.getElementsByTagName("script"), b = a.length - 1; b >= 0; b--) {
var c = a[b];
if ("interactive" === c.readyState) return S = c
}
}
function r(a) {
var b = [];
return a.replace(U, "").replace(T, function(a, c, d) {
d && b.push(d)
}), b
}
function s(a, b) {
this.uri = a, this.dependencies = b || [], this.exports = null, this.status = 0, this._waitings = {}, this._remain = 0
}
if (!a.seajs) {
var t = a.seajs = {
version: "2.3.0"
},
u = t.data = {},
v = c("Object"),
w = c("String"),
x = Array.isArray || c("Array"),
y = c("Function"),
z = 0,
A = u.events = {};
t.on = function(a, b) {
var c = A[a] || (A[a] = []);
return c.push(b), t
}, t.off = function(a, b) {
if (!a && !b) return A = u.events = {}, t;
var c = A[a];
if (c)
if (b)
for (var d = c.length - 1; d >= 0; d--) c[d] === b && c.splice(d, 1);
else delete A[a];
return t
};
var B = t.emit = function(a, b) {
var c = A[a],
d;
if (c) {
c = c.slice();
for (var e = 0, f = c.length; f > e; e++) c[e](b)
}
return t
},
C = /[^?#]*\//,
D = /\/\.\//g,
E = /\/[^/]+\/\.\.\//,
F = /([^:/])\/+\//g,
G = /^([^/:]+)(\/.+)$/,
H = /{([^{]+)}/g,
I = /^\/\/.|:\//,
J = /^.*?\/\/.*?\//,
K = document,
L = location.href && 0 !== location.href.indexOf("about:") ? e(location.href) : "",
M = K.scripts,
N = K.getElementById("seajsnode") || M[M.length - 1],
O = e(n(N) || L);
t.resolve = m;
var P = K.head || K.getElementsByTagName("head")[0] || K.documentElement,
Q = P.getElementsByTagName("base")[0],
R, S;
t.request = o;
var T = /"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\/\*[\S\s]*?\*\/|\/(?:\\\/|[^\/\r\n])+\/(?=[^\/])|\/\/.*|\.\s*require|(?:^|[^$])\brequire\s*\(\s*(["'])(.+?)\1\s*\)/g,
U = /\\\\/g,
V = t.cache = {},
W, X = {},
Y = {},
Z = {},
$ = s.STATUS = {
FETCHING: 1,
SAVED: 2,
LOADING: 3,
LOADED: 4,
EXECUTING: 5,
EXECUTED: 6
};
s.prototype.resolve = function() {
for (var a = this, b = a.dependencies, c = [], d = 0, e = b.length; e > d; d++) c[d] = s.resolve(b[d], a.uri);
return c
}, s.prototype.load = function() {
var a = this;
if (!(a.status >= $.LOADING)) {
a.status = $.LOADING;
var c = a.resolve();
B("load", c);
for (var d = a._remain = c.length, e, f = 0; d > f; f++) e = s.get(c[f]), e.status < $.LOADED ? e._waitings[a.uri] = (e._waitings[a.uri] || 0) + 1 : a._remain--;
if (0 === a._remain) return a.onload(), b;
var g = {};
for (f = 0; d > f; f++) e = V[c[f]], e.status < $.FETCHING ? e.fetch(g) : e.status === $.SAVED && e.load();
for (var h in g) g.hasOwnProperty(h) && g[h]()
}
}, s.prototype.onload = function() {
var a = this;
a.status = $.LOADED, a.callback && a.callback();
var b = a._waitings,
c, d;
for (c in b) b.hasOwnProperty(c) && (d = V[c], d._remain -= b[c], 0 === d._remain && d.onload());
delete a._waitings, delete a._remain
}, s.prototype.fetch = function(a) {
function c() {
t.request(g.requestUri, g.onRequest, g.charset)
}
function d() {
delete X[h], Y[h] = !0, W && (s.save(f, W), W = null);
var a, b = Z[h];
for (delete Z[h]; a = b.shift();) a.load()
}
var e = this,
f = e.uri;
e.status = $.FETCHING;
var g = {
uri: f
};
B("fetch", g);
var h = g.requestUri || f;
return !h || Y[h] ? (e.load(), b) : X[h] ? (Z[h].push(e), b) : (X[h] = !0, Z[h] = [e], B("request", g = {
uri: f,
requestUri: h,
onRequest: d,
charset: u.charset
}), g.requested || (a ? a[g.requestUri] = c : c()), b)
}, s.prototype.exec = function() {
function a(b) {
return s.get(a.resolve(b)).exec()
}
var c = this;
if (c.status >= $.EXECUTING) return c.exports;
c.status = $.EXECUTING;
var e = c.uri;
a.resolve = function(a) {
return s.resolve(a, e)
}, a.async = function(b, c) {
return s.use(b, c, e + "_async_" + d()), a
};
var f = c.factory,
g = y(f) ? f(a, c.exports = {}, c) : f;
return g === b && (g = c.exports), delete c.factory, c.exports = g, c.status = $.EXECUTED, B("exec", c), g
}, s.resolve = function(a, b) {
var c = {
id: a,
refUri: b
};
return B("resolve", c), c.uri || t.resolve(c.id, b)
}, s.define = function(a, c, d) {
var e = arguments.length;
1 === e ? (d = a, a = b) : 2 === e && (d = c, x(a) ? (c = a, a = b) : c = b), !x(c) && y(d) && (c = r("" + d));
var f = {
id: a,
uri: s.resolve(a),
deps: c,
factory: d
};
if (!f.uri && K.attachEvent) {
var g = q();
g && (f.uri = g.src)
}
B("define", f), f.uri ? s.save(f.uri, f) : W = f
}, s.save = function(a, b) {
var c = s.get(a);
c.status < $.SAVED && (c.id = b.id || a, c.dependencies = b.deps || [], c.factory = b.factory, c.status = $.SAVED, B("save", c))
}, s.get = function(a, b) {
return V[a] || (V[a] = new s(a, b))
}, s.use = function(b, c, d) {
var e = s.get(d, x(b) ? b : [b]);
e.callback = function() {
for (var b = [], d = e.resolve(), f = 0, g = d.length; g > f; f++) b[f] = V[d[f]].exec();
c && c.apply(a, b), delete e.callback
}, e.load()
}, t.use = function(a, b) {
return s.use(a, b, u.cwd + "_use_" + d()), t
}, s.define.cmd = {}, a.define = s.define, t.Module = s, u.fetchedList = Y, u.cid = d, t.require = function(a) {
var b = s.get(s.resolve(a));
return b.status < $.EXECUTING && (b.onload(), b.exec()), b.exports
}, u.base = O, u.dir = O, u.cwd = L, u.charset = "utf-8", t.config = function(a) {
for (var b in a) {
var c = a[b],
d = u[b];
if (d && v(d))
for (var e in c) d[e] = c[e];
else x(d) ? c = d.concat(c) : "base" === b && ("/" !== c.slice(-1) && (c += "/"), c = l(c)), u[b] = c
}
return B("config", a), t
}
}
}(this);
/**
* @fileOverview SeaJS 配置
*/
seajs.config({
/*alias:
{
'jquery': 'lib/jquery',
'jquery-2.1.3': 'lib/jquery-2.1.3'
},*/
base: 'http://localhost:8000/',
charset: 'utf-8'
});
var YohoConfig = {
baseUrl: '/',
domain: "newgirls.test.yoho.cn",
resdomain: "res.yohoboys.com",
mainUrl: "http://newgirls.test.yoho.cn",
resUrl: "http://res.yohoboys.com",
uploadUrl: "http://www.yohoboys.com/upload"
... ...
... ... @@ -28,7 +28,12 @@
"jquery.autocomplete": "~0.0.2",
"mlellipsis": "~0.0.3",
"jquery.rotate2d": "0.0.3",
<<<<<<< HEAD
"yoho-jsonp": "~0.0.1"
=======
"yoho-jsonp": "0.0.1",
"yoho-imagesloaded": "0.0.2"
>>>>>>> 1d6dd7c0cda324d6366cab6432207b764910b822
},
"devDependencies": {
"expect.js": "0.3.1"
... ...
... ... @@ -70,12 +70,19 @@
}
}
.feedback .comment-textarea {
width: 558px;
.anonymous-info {
input {
width: 259px;
}
input:first-child {
width: 258px;
}
}
textarea {
width: 542px;
width: 538px;
}
.login-status {
width: 558px;
width: 554px;
}
}
}
\ No newline at end of file
... ...
... ... @@ -372,7 +372,7 @@ $shareicons: sprite-map('share/*.png', $spacing:5px);
li.yohoo-share-button-sina {
@include retina-sprite ($shareicons, share-sina-btn, 28/32);
}
li.yohoo-share-button-fb {
li.yohoo-share-button-facebook {
@include retina-sprite ($shareicons, share-fb-btn, 28/32);
}
li.yohoo-share-button-wx {
... ... @@ -381,7 +381,7 @@ $shareicons: sprite-map('share/*.png', $spacing:5px);
li.yohoo-share-button-qq {
@include retina-sprite ($shareicons, share-qq-btn, 28/32);
}
li.yohoo-share-button-tt {
li.yohoo-share-button-tweet {
@include retina-sprite ($shareicons, share-tt-btn, 28/32);
}
}
... ...
... ... @@ -113,7 +113,22 @@
}
.comment-area{
width:709px;
float:left;
.anonymous-info {
input {
width: 333px;
}
input:first-child {
width: 333px;
}
}
textarea {
width: 687px;
}
.login-status{
margin: 0;
width: 703px;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -84,12 +84,19 @@
}
}
.feedback .comment-textarea {
width: 370px;
.anonymous-info {
input {
width: 172px;
}
input:first-child {
width: 171px;
}
}
textarea {
width: 354px;
width: 356px;
}
.login-status {
width: 100%;
width: 364px;
}
}
}
\ No newline at end of file
... ...
... ... @@ -304,13 +304,13 @@
border-top: none;
.userimg {
float: left;
margin: 3px 0 0 10px;
margin: 1px 0 0 10px;
width: 20px;
height: 20px;
i {
width: 7px;
height: 7px;
left: 15px;
left: 15px;
background-size: 100% 100%;
}
}
... ... @@ -593,7 +593,7 @@
background: #000;
color: #fff;
font-size: 12px;
text-align: center;
text-align: center;
}
}
}
... ...
... ... @@ -113,11 +113,24 @@
margin-top:20px;
}
}
.comment-area{
width:440px;
float:left;
.comment-textarea{
width:100%;
width:498px;
.anonymous-info {
input {
width: 236px;
}
input:first-child {
width: 235px;
}
}
textarea {
width: 484px;
}
.login-status{
margin: 0;
width: 492px;
}
}
}
... ...
... ... @@ -121,11 +121,18 @@
}
.feedback .comment-textarea {
width: 500px;
.anonymous-info {
input {
width: 229px;
}
input:first-child {
width: 228px;
}
}
textarea {
width: 484px;
width: 478px;
}
.login-status {
width: 500px\0;
width: 494px;
}
}
\ No newline at end of file
... ...
... ... @@ -62,7 +62,7 @@
background: #fff;
padding: 20px 10px 10px;
z-index: 100;
object{
object{
width: 246px;
height: 138px;
}
... ... @@ -238,7 +238,7 @@
border-left: none;
}
}
$statusicon: sprite-map('status/*.png', $spacing:5px);
$statusicon: sprite-map('status/*.png', $spacing:5px);
/*统计栏*/
.stats-btn{
margin: 33px 0 0 0;
... ... @@ -306,7 +306,7 @@ $statusicon: sprite-map('status/*.png', $spacing:5px);
background-size: 100% 100%;
}
span {
background: sprite($statusicon, wtf-icon);
background: sprite($statusicon, wtf-icon);
&.hasNum {
background: none;
}
... ... @@ -320,14 +320,14 @@ $statusicon: sprite-map('status/*.png', $spacing:5px);
margin: 0 0 0 8px;
padding: 0 0 0 6px;
border-left: 1px solid #000;
strong {
strong {
background: image-url("detail/comments-icon.png") no-repeat center center;
}
span {
position: absolute;
top: 9px;
right: 10px;
background: image-url("detail/comments-icon2.png") no-repeat center center;
background: image-url("detail/comments-icon2.png") no-repeat center center;
}
.hasNum {
background: none;
... ... @@ -469,7 +469,7 @@ $statusicon: sprite-map('status/*.png', $spacing:5px);
padding: 10px;
overflow: hidden;
}
textarea.default-tip {
color: #999;
}
... ... @@ -478,6 +478,7 @@ $statusicon: sprite-map('status/*.png', $spacing:5px);
width: 624px;
height: 34px;
padding: 2px;
margin: -6px 0 0 0;
border: 1px solid #000;
border-top: none;
.userimg{
... ... @@ -689,11 +690,17 @@ $shareicons: sprite-map('share/*.png', $spacing:5px);
height: 28px;
margin-bottom: 10px;
background-repeat: no-repeat;
a {
display:block;
width:100%;
height:100%;
}
}
li.yohoo-share-button-sina {
background: sprite($shareicons, share-sina-btn);
}
li.yohoo-share-button-fb {
}
li.yohoo-share-button-facebook {
background: sprite($shareicons, share-fb-btn);
}
li.yohoo-share-button-wx {
... ... @@ -702,7 +709,7 @@ $shareicons: sprite-map('share/*.png', $spacing:5px);
li.yohoo-share-button-qq {
background: sprite($shareicons, share-qq-btn);
}
li.yohoo-share-button-tt {
li.yohoo-share-button-tweet {
background: sprite($shareicons, share-tt-btn);
}
.wx-qrcode-dialog{
... ... @@ -848,7 +855,7 @@ $icons: sprite-map('detail-icon/*.png', $spacing:5px);
left: -60px;
top: 18px;
line-height: 129px;
background-image: url("./assets/images/weixinbackground.png");
background: image-url("weixinbackground.png");
text-align: center;
em{
display: block;
... ...
... ... @@ -115,6 +115,22 @@
width:608px;
margin: 45px 0 0 0;
float:left;
.anonymous-info {
input {
width: 283px;
}
input:first-child {
width: 282px;
}
}
textarea {
width: 586px;
}
.login-status{
margin: 0;
width: 602px;
}
}
... ...