refactor(web):改造成vue工程
This commit is contained in:
73
public/static/home/js/common.js
Normal file
73
public/static/home/js/common.js
Normal file
@@ -0,0 +1,73 @@
|
||||
require.config({
|
||||
baseUrl:'//' + location.host + '/static/home/js/',
|
||||
paths:{
|
||||
'jquery':'jquery-1.7.2.min',
|
||||
'AlertLogin':'AlertLogin',
|
||||
'insertFlash':'inserFlash',
|
||||
'AlertVideo':'AlertVideo',
|
||||
'SuperSlide':'jquery.SuperSlide',
|
||||
'picShow1':'picShow1',
|
||||
'picShow2':'picShow2',
|
||||
'Gw_Fn':'//' + location.host + '/static/home/js/Gw_Fn',
|
||||
'top':'//' + location.host + '/static/home/js/top'
|
||||
},
|
||||
shim:{
|
||||
'jquery':{exports:'$'},
|
||||
'SuperSlide':{deps:['jquery']},
|
||||
'Gw_Fn':{deps:['jquery','SuperSlide']},
|
||||
'AlertLogin':{deps:['jquery']},
|
||||
'insertFlash':{deps:['jquery']},
|
||||
'AlertVideo':{deps:['jquery']},
|
||||
'picShow1':{deps:['jquery']},
|
||||
'picShow2':{deps:['jquery']},
|
||||
'top':{deps:['jquery','insertFlash','AlertLogin']}
|
||||
}
|
||||
});
|
||||
|
||||
require(['top'],function (top) {
|
||||
top('文网游备字〔2022〕W-RPG 001 号', '/')
|
||||
});
|
||||
|
||||
require(['jquery','Gw_Fn','SuperSlide','AlertVideo','picShow1','picShow2'], function ($,Gw){
|
||||
Gw({
|
||||
GameId : "415",
|
||||
GameName :"yscq",
|
||||
Slide:{
|
||||
SlideId : "765",
|
||||
SlideBox : $("#slideBox")
|
||||
},
|
||||
Login:{
|
||||
LoginBox:$('.log-box'),
|
||||
LoginUser:$("#username"),
|
||||
LoginPass:$("#password"),
|
||||
LoginSubmit:$("#login-sub")
|
||||
},
|
||||
SwitchTab:{
|
||||
TabNav:$("#news-nav"),
|
||||
TabContent:$("#news-con"),
|
||||
TabCurrent:"current",
|
||||
TabEvent:"hover",
|
||||
TabFind:""
|
||||
},
|
||||
Server:{
|
||||
ServerTemplate:'<li><i class="ico ico_s"></i><a href="%url%" target="_blank">%serverName%</a><span style="margin-left:30px;">%serverState%</span></li>',
|
||||
ServerBox:$("#index_server_list_ul_id"),
|
||||
ServerL:"7"
|
||||
}
|
||||
});
|
||||
$('.zf-sec').click(function(){
|
||||
"use strict";
|
||||
$(this).addClass('fadeIn').siblings().removeClass('fadeIn');
|
||||
});
|
||||
|
||||
$('#news-nav li').hover(function(){
|
||||
var url = $(this).attr('more_url');
|
||||
$('#news_more_zonghe').attr({'href':url})
|
||||
});
|
||||
|
||||
$('.job-tab-menu li').hover(function(){
|
||||
var i = $(this).index();
|
||||
$(this).addClass('on').siblings().removeClass('on');
|
||||
$('.job-con > div').removeClass('job_cur').eq(i).addClass('job_cur');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user