Authored by 2586703@qq.com

04 23 10:00代码提交

... ... @@ -3,7 +3,7 @@ var gutil = require('gulp-util');
var ftp = require('gulp-ftp');
var fs = require('fs');
var uglify = require('gulp-uglify'),
rename = require('gulp-rename');
rename = require('gulp-rename');
var concat = require('gulp-concat');
var exec = require('child_process').exec;
var compass = require('gulp-compass');
... ... @@ -13,63 +13,56 @@ var stylish = require('jshint-stylish');
//获取package.json的配置参数
var config = JSON.parse(fs.readFileSync('./package.json').toString());
var dist_assets_dir = 'dist/'+config.name+'/assets';
var dist_seajs_dir='dist/'+config.name+'/'+config.version+"/min";
var dist_js_dir='dist/'+config.name+'/'+config.version;
var source_js_dir='js/';
var dist_assets_dir = 'dist/' + config.name + '/assets';
var dist_seajs_dir = 'dist/' + config.name + '/' + config.version + "/min";
var dist_js_dir = 'dist/' + config.name + '/' + config.version;
var source_js_dir = 'js/';
var dist_dir =
{
css: 'dist/'+config.name+'/'+config.version,
image: dist_assets_dir+'/images',
font: dist_assets_dir+'/fonts'
var dist_dir = {
css: 'dist/' + config.name + '/' + config.version,
image: dist_assets_dir + '/images',
font: dist_assets_dir + '/fonts'
};
var ftpConfig =
{
host: '218.94.77.166',
user: 'php',
pass: 'yoho9646'
var ftpConfig = {
host: '218.94.77.166',
user: 'php',
pass: 'yoho9646'
};
gulp.task('default',function(){
gulp.watch(['sass/scss/**','js/**'],['compass-dist','build']);
gulp.task('default', function() {
gulp.watch(['sass/scss/**', 'js/**'], ['compass-dist', 'build']);
});
//compass的watch
gulp.task('cw',function(cb)
{
/*exec('compass watch', function(err)
{
if (err) return cb(err);
cb();
});*/
gulp.watch(['sass/scss/**','js/**'],['compass-dist','build']);
gulp.task('cw', function(cb) {
/*exec('compass watch', function(err)
{
if (err) return cb(err);
cb();
});*/
gulp.watch(['sass/scss/**'], ['compass-dist']);
});
//js代码验证
gulp.task('lint',function()
{
return gulp.src(['js/*.js','js/**/*.js'])
.pipe(jshint())
.pipe(jshint.reporter(stylish));
gulp.task('lint', function() {
return gulp.src(['js/*.js', 'js/**/*.js'])
.pipe(jshint())
.pipe(jshint.reporter(stylish));
});
//编译部署compass
gulp.task('compass-dist',['assets'],function()
{
gulp.src('sass/scss/**')
.pipe(compass(
{
gulp.task('compass-dist', ['assets'], function() {
gulp.src('sass/scss/**')
.pipe(compass({
css: dist_dir.css,
sass: 'sass/scss',
image: dist_dir.image,
font: dist_dir.font,
style:'compressed'
style: 'compressed'
}))
.on('error', function(error)
{
.on('error', function(error) {
console.log(error);
this.emit('end');
});
... ... @@ -77,85 +70,79 @@ gulp.task('compass-dist',['assets'],function()
//执行spm的build
gulp.task('spm',function(cb)
{
exec('spm build --include all', function(err)
{
if (err) return cb(err);
cb();
});
gulp.task('spm', function(cb) {
exec('spm build --include all', function(err) {
if (err) return cb(err);
cb();
});
});
gulp.task('js',['seajs','copy','concat'],function(){
console.log("压缩合并完成");
gulp.task('js', ['seajs', 'copy', 'concat'], function() {
console.log("压缩合并完成");
});
gulp.task('seajs',function(){
gulp.src('js/util/seajs_dev.js')
.pipe(uglify())
.pipe(rename('seajs.min.js'))
.pipe(gulp.dest(dist_seajs_dir));
gulp.task('seajs', function() {
gulp.src('js/util/seajs_dev.js')
.pipe(uglify())
.pipe(rename('seajs.min.js'))
.pipe(gulp.dest(dist_seajs_dir));
});
gulp.task('copy',function(){
gulp.src(dist_js_dir+'/index.js')
.pipe(rename('z_index.js'))
.pipe(gulp.dest(dist_seajs_dir));
gulp.src(source_js_dir+'/yas.js')
.pipe(gulp.dest(dist_js_dir));
gulp.task('copy', function() {
gulp.src(dist_js_dir + '/index.js')
.pipe(rename('z_index.js'))
.pipe(gulp.dest(dist_seajs_dir));
gulp.src(source_js_dir + '/yas.js')
.pipe(gulp.dest(dist_js_dir));
});
gulp.task('concat',function(){
gulp.src(dist_seajs_dir+'/*.js')
.pipe(concat('index.min.js'))
.pipe(gulp.dest(dist_js_dir));
gulp.task('concat', function() {
gulp.src(dist_seajs_dir + '/*.js')
.pipe(concat('index.min.js'))
.pipe(gulp.dest(dist_js_dir));
});
//拷贝assets到发布目录
gulp.task('assets',function()
{
gulp.src('assets/**')
gulp.task('assets', function() {
gulp.src('assets/**')
.pipe(gulp.dest(dist_assets_dir));
});
gulp.task('yangshi',['assets','compass-dist'],function(){
gulp.task('yangshi', ['assets', 'compass-dist'], function() {
});
//spm build
gulp.task('build', function() {
exec('spm build --include all', function() {
exec('gulp build-debug');
exec('gulp build-production');
});
exec('spm build --include all', function() {
exec('gulp build-debug');
exec('gulp build-production');
});
});
//generate all-debug.js for development ENV
gulp.task('build-debug', function() {
gulp.src(['js/util/seajs.js', 'dist/yohogirls-frontend-web/0.0.1/index-debug.js'])
.pipe(concat('all-debug.js'))
.pipe(gulp.dest('dist/yohogirls-frontend-web/0.0.1'))
gulp.src(['js/util/seajs.js', 'dist/yohogirls-frontend-web/0.0.1/index-debug.js'])
.pipe(concat('all-debug.js'))
.pipe(gulp.dest('dist/yohogirls-frontend-web/0.0.1'))
});
//generate all.js for production ENV
gulp.task('build-production', function() {
gulp.src(['js/util/seajs.js', 'dist/dist/yohogirls-frontend-web/0.0.1/index.js'])
.pipe(concat('all.js'))
.pipe(gulp.dest('dist/yohogirls-frontend-web/0.0.1'))
gulp.src(['js/util/seajs.js', 'dist/dist/yohogirls-frontend-web/0.0.1/index.js'])
.pipe(concat('all.js'))
.pipe(gulp.dest('dist/yohogirls-frontend-web/0.0.1'))
});
//发布到CDN
gulp.task('dist',['compass-dist'], function ()
{
var ftpstream = ftp(ftpConfig);
return gulp.src('dist/**')
gulp.task('dist', ['compass-dist'], function() {
var ftpstream = ftp(ftpConfig);
return gulp.src('dist/**')
.pipe(ftpstream)
.pipe(gutil.noop());
});
//发布到CDN
gulp.task('comp',['compass-dist','js'], function ()
{
//编译到本地
console.log("将文件编译到本地!!!!");
});
gulp.task('comp', ['compass-dist', 'js'], function() {
//编译到本地
console.log("将文件编译到本地!!!!");
});
\ No newline at end of file
... ...
... ... @@ -24,8 +24,8 @@ exports.init = function() {
share.init({
shareUrl: shareUrl,
img: shareCover,
sinaText:'【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
fbTextFunction: function(){
sinaText: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
fbTextFunction: function() {
return {
des: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
name: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
... ... @@ -67,7 +67,7 @@ exports.init = function() {
//图片轮播
if ($(".detail-slide-body").size() > 0) {
$(".detail-slide-ctrl-tabs").find("img.lazy").lazyload();
$(".detail-slide-body").ImgZoom();
$(".detail-slide-body").ImgZoom();
$(".detail-slide-piclist").slider({
pageCtrl: $(".detail-slide-ctrl-tabs"),
... ... @@ -76,15 +76,15 @@ exports.init = function() {
};
//调用评论插件
$(".stats-btn").on("click",".comments",function() {
$(".stats-btn").on("click", ".comments", function() {
var cidNum = $(".comments-box").attr("cid");
if($(".comments-box").find(".comment-textarea").size() > 0) {
if($(".comments-box").css("display") === "none") {
if ($(".comments-box").find(".comment-textarea").size() > 0) {
if ($(".comments-box").css("display") === "none") {
$(".comments-box").show();
}else{
} else {
$(".comments-box").hide();
}
}else{
} else {
$(".comments-box").comment({
cid: cidNum,
thirdLogin: true,
... ...
... ... @@ -10,6 +10,7 @@ var $ = require('jquery'),
require('lazyload');
require('../plugin/imgslider');
require('../plugin/imgzoom');
exports.init = function() {
var shareUrl = $('.share').attr('data-link'),
... ... @@ -24,8 +25,8 @@ exports.init = function() {
share.init({
shareUrl: shareUrl,
img: shareCover,
sinaText:'【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
fbTextFunction: function(){
sinaText: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text(),
fbTextFunction: function() {
return {
des: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
name: '【Yoho!Girls】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YohoGirl',
... ... @@ -38,34 +39,34 @@ exports.init = function() {
});
//图片懒加载
$('img.lazy').lazyload({
$('img.lazy').lazyload({
placeholder: 'data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=='
});
//显示控制箭头
(function() {
$('.column-slide').on('mouseenter',function() {
$('.column-slide').on('mouseenter', function() {
$('.column-slide').find('.slide-ctrl').hide();
if ($(this).find('li').size() <= 4) return;
clearTimeout(timer);
$(this).find('.slide-ctrl').show();
}).on('mouseleave',function(event) {
}).on('mouseleave', function(event) {
var $that = $(this);
timer = setTimeout(function() {
$that.find('.slide-ctrl').hide();
$that.find('.slide-ctrl').hide();
}, 1000)
});
$('.column-slide .slide-ctrl').on('mouseenter',function() {
$('.column-slide .slide-ctrl').on('mouseenter', function() {
clearTimeout(timer);
$(this).show();
}).on('mouseleave',function() {
timer=setTimeout(function() {
$(this).hide();
}).on('mouseleave', function() {
timer = setTimeout(function() {
$(this).hide();
}, 100)
});
})();
})();
//封面杂志图滚动
magazineSlide = new swiper('.mags-slide .swiper-container', {
... ... @@ -80,7 +81,7 @@ exports.init = function() {
});
$('.column-slide.magazine-list').imgSlider({
itemClass:'magazine'
itemClass: 'magazine'
});
//当页面改变大小,ipad横竖屏切换重新加载插件
... ... @@ -92,14 +93,14 @@ exports.init = function() {
});
$.ajax({
type:'GET',
url:'/channel/magazine/ezine',
success:function(response) {
type: 'GET',
url: '/channel/magazine/ezine',
success: function(response) {
var data = response.data,
len = data.length;
item ='',
ulNum = Math.ceil(len/16),
ulItem ='',
item = '',
ulNum = Math.ceil(len / 16),
ulItem = '',
ulAnimateIndex = 0;
var animateWidth,
... ... @@ -107,32 +108,34 @@ exports.init = function() {
itemIndexStart,
itemIndexEnd,
i;
$('.e-zine .slide-box').html('<div class="slide-piclist-wrap clearfix" style="position:relative;top:0;left:0;"></div>');
//添加4个ul
for (var i=0; i<ulNum; i++) {
for (var i = 0; i < ulNum; i++) {
ulItem += '<ul class="slide-piclist clearfix"></ul>';
}
$('.slide-piclist-wrap').html(ulItem);
animateWidth = $('.mags-column').find('.slide-piclist').outerWidth();
slideWrapWidth = animateWidth * ulNum;
$('.slide-piclist-wrap').css({'width': slideWrapWidth});
slideWrapWidth = animateWidth * ulNum;
$('.slide-piclist-wrap').css({
'width': slideWrapWidth
});
//分别插入数据到4个ul
for (i=0; i<ulNum; i++) {
for (i = 0; i < ulNum; i++) {
itemIndexStart = i * 16,
itemIndexEnd = i * 16 + 16;
itemIndexEnd = i * 16 + 16;
item = '';
if (itemIndexEnd > len) {
itemIndexEnd = len;
}
for(var j = itemIndexStart;j<itemIndexEnd;j++){
item += '<li data-type='+data[j].magazineType+'><a href="javascript:;" title="'+data[j].releaseDate+'"><div class="img-wrap"><img src="'+data[j].cover+'" alt="" /></div><span>'+data[j].releaseDate+'</span></a></li>';
for (var j = itemIndexStart; j < itemIndexEnd; j++) {
item += '<li data-type=' + data[j].magazineType + '><a href="javascript:;" title="' + data[j].releaseDate + '"><div class="img-wrap"><img src="' + data[j].cover + '" alt="" /></div><span>' + data[j].releaseDate + '</span></a></li>';
}
$('.slide-piclist-wrap').find('.slide-piclist').eq(i).html(item);
}
... ... @@ -142,20 +145,22 @@ exports.init = function() {
$(window).resize(function() {
animateWidth = $('.mags-column').find('.slide-piclist').outerWidth();
slideWrapWidth = animateWidth * ulNum;
$('.mags-column').on('click.next','.slide-ctrl-next',function() {
if (ulAnimateIndex >= ulNum-1) return;
slideWrapWidth = animateWidth * ulNum;
$('.mags-column').on('click.next', '.slide-ctrl-next', function() {
if (ulAnimateIndex >= ulNum - 1) return;
if ($('.slide-piclist-wrap').is(':animated')) return;
if (ulAnimateIndex==ulNum-2) {
if (ulAnimateIndex == ulNum - 2) {
$(this).hide();
}
$(this).siblings('.slide-ctrl-prev').show();
ulAnimateIndex++;
$('.slide-piclist-wrap').stop().animate({'left':-animateWidth * ulAnimateIndex}, 500);
$('.slide-piclist-wrap').stop().animate({
'left': -animateWidth * ulAnimateIndex
}, 500);
});
$('.mags-column').on('click.prev','.slide-ctrl-prev',function() {
$('.mags-column').on('click.prev', '.slide-ctrl-prev', function() {
if (ulAnimateIndex <= 0) return;
if ($('.slide-piclist-wrap').is(':animated')) return;
if (ulAnimateIndex === 1) {
... ... @@ -163,15 +168,21 @@ exports.init = function() {
}
$(this).siblings('.slide-ctrl-next').show();
ulAnimateIndex--;
$('.slide-piclist-wrap').stop().animate({'left':-animateWidth * ulAnimateIndex}, 500);
$('.slide-piclist-wrap').stop().animate({
'left': -animateWidth * ulAnimateIndex
}, 500);
});
clearTimeout(timer);
timer = setTimeout(function() {
$('.slide-piclist-wrap').css({'width': slideWrapWidth});
$('.slide-piclist-wrap').css({'left':-animateWidth * ulAnimateIndex}, 500);
}, 0)
$('.slide-piclist-wrap').css({
'width': slideWrapWidth
});
$('.slide-piclist-wrap').css({
'left': -animateWidth * ulAnimateIndex
}, 500);
}, 0)
}).resize();
/*for(var i=0;i<len;i++){
item += '<li data-type='+data[i].magazineType+'><a href='javascript:;' title=''+data[i].releaseDate+''><div class='img-wrap'><img src=''+data[i].cover+'' alt='' /></div><span>'+data[i].releaseDate+'</span></a></li>';
... ... @@ -181,10 +192,29 @@ exports.init = function() {
*/
$('.mags-column .slide-piclist').find('li').each(function() {
if($(this).data('type') ==2) {
if ($(this).data('type') == 2) {
$('<em class="border"></em><i class="special-icon"></i>').appendTo($(this).find('.img-wrap'));
};
});
});
}
})
});
$(".magazine-list").on("click", ".magazine", function() {
if (!$(this).find("img").attr("data-slide")) return;
if ($(this).find("ul").size() >= 1) return;
var data = decodeURIComponent($(this).find("img").attr("data-slide")),
arr = eval("(" + data + ")"),
len = arr.length,
$picList = $('<ul style="display:none;" class="magazine-content"></ul').appendTo($(this)),
item = '';
for (i = 0; i < len; i++) {
item += '<li><img src="" data-imgzoom="' + arr[i] + '" alt="" /></li>';
}
$(item).appendTo($picList);
$(this).ImgZoom({
isContainFather: true
});
});
}
\ No newline at end of file
... ...
... ... @@ -2,26 +2,317 @@
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);
! 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(
{
seajs.config({
/*alias:
{
'jquery': 'lib/jquery',
'jquery-2.1.3': 'lib/jquery-2.1.3'
},*/
base: 'localhost:8000/dist',
base: 'http://localhost:8000/',
charset: 'utf-8'
});
var YohoConfig =
{
baseUrl:'/',
domain:"yohoboys.com",
resdomain:"res.yohoboys.com",
mainUrl:"http://localhost:3000",
resUrl:"http://res.yohoboys.com",
uploadUrl:"http://www.yohoboys.com/upload"
var YohoConfig = {
baseUrl: '/',
domain: "yohoboys.com",
resdomain: "res.yohoboys.com",
mainUrl: "http://localhost:3000",
resUrl: "http://res.yohoboys.com",
uploadUrl: "http://www.yohoboys.com/upload"
};
\ No newline at end of file
... ...
... ... @@ -658,7 +658,7 @@
top: 295px;
left: 50%;
margin-left: -502px;
z-index:9999;
z-index:998;
h4{
line-height: 23px;
font-size: 13px;
... ...