Commit c014e875 by txy

'调整js'

parent ece095bb
......@@ -16,7 +16,7 @@ function getToken() {
}
// 页面跳转
function transPage(_pageNumber, _activityCode, _token, _urlParam) {
function transPage(_pageNumber, _activityCode, _token, _addParam) {
var url = ''
// if (typeof _urlParam !== 'undefined' && _urlParam !== '') {
// url = baseUrl + "/ACTIVITY/view/" + _activityCode + "/" + _pageNumber + '?' + _urlParam;
......@@ -24,10 +24,12 @@ function transPage(_pageNumber, _activityCode, _token, _urlParam) {
// url = baseUrl + "/ACTIVITY/view/" + _activityCode + "/" + _pageNumber;
// }
var _urlParam = location.search;
if (typeof _urlParam !== 'undefined' && _urlParam !== '') {
url = "/ACTIVITY/view/" + _pageNumber + "/" + _activityCode + '?' + _urlParam;
url = "/ACTIVITY/view/" + _pageNumber + "/" + _activityCode + _urlParam + (_addParam !== undefined ? ('&' + _addParam) : '');
} else {
url = "/ACTIVITY/view/" + _pageNumber + "/" + _activityCode;
url = "/ACTIVITY/view/" + _pageNumber + "/" + _activityCode + (_addParam !== undefined ? ('?' + _addParam) : '');
}
var _form = document.createElement('form');
......@@ -53,6 +55,7 @@ function getQueryString(name) {
return null;
}
// 加载HTML结构
function loadHtmlJson() {
$('body').prepend(json2html(data.htmlJson));
......
......@@ -22,6 +22,12 @@ $(function(){
getAjaxListSearch('rank',1,function(rankListData){
getRangeList(rankListData);
}); // 排行榜列表
// 打开排行榜
debugger
if(getQueryString("toRanger") === '1') {
$("#act3152823482970").click()
}
});
// 微信鉴权
......@@ -128,10 +134,8 @@ function btnBindClick() {
// 报名按钮
$("#act31527459124456").off("click").on("click",function(){
// window.location.href = '/signup.html'
var _t = getToken();
transPage(activityCode,'2',_t);
transPage('2',activityCode,_t);
});
// 继续投票
......@@ -164,12 +168,16 @@ function btnBindClick() {
// 排行榜
$("#act2165045664554").off('click').on("click", function(){
window.location.href = '/index.html'
var _t = getToken();
var _addParam = 'toRanger=1'
transPage('1',activityCode,_t,_addParam);
});
// 选手主页
$("#act21650126678793").off("click").on("click", function(){
window.location.href = '/user.html'
var _t = getToken();
var urlParam = 'UserId='+user.id;
transPage('3',activityCode,_t,urlParam);
});
// 活动秘籍
......@@ -368,7 +376,7 @@ function voteClickFn(){
// 选手主页
function playPageFn() {
var id = $(this).attr('id');
var urlParam = '?UserId='+id;
var urlParam = 'UserId='+id;
var _t = getToken();
transPage('3',activityCode,_t,urlParam);
}
\ No newline at end of file
......@@ -62,16 +62,21 @@ function wxpermission() {
function btnBindClick() {
// 返回首页
$("#act11534485971254").off("click").on("click", function () {
window.location.href = '/index.html'
var _t = getToken();
transPage('1',activityCode,_t);
});
// 排行榜
$("#act41612547506702").off('click').on("click", function () {
window.location.href = '/index.html'
var _t = getToken();
var _addParam = 'toRanger=1'
transPage('1',activityCode,_t,_addParam);
});
// 选手主页
$("#act4161336684689").off("click").on("click", function () {
window.location.href = '/user.html'
var _t = getToken();
var urlParam = 'UserId='+user.id;
transPage('3',activityCode,_t,urlParam);
});
// 活动秘籍
......
......@@ -64,7 +64,8 @@ function wxpermission() {
function btnBindClick() {
// 返回首页
$("#act3110143885264").off("click").on("click",function(){
window.location.href = '/index.html'
var _t = getToken();
transPage('1',activityCode,_t);
});
// 拉票
$('#act31119351441050').off("click").on("click",function(){
......@@ -93,12 +94,16 @@ function btnBindClick() {
// 排行榜
$("#act41612547506702").off('click').on("click", function(){
window.location.href = '/index.html'
var _t = getToken();
var _addParam = 'toRanger=1'
transPage('1',activityCode,_t,_addParam);
});
// 选手主页
$("#act4161336684689").off("click").on("click", function(){
window.location.href = '/user.html'
var _t = getToken();
var urlParam = 'UserId='+user.id;
transPage('3',activityCode,_t,urlParam);
});
// 活动秘籍
......
......@@ -4,19 +4,7 @@ var data = {
"backgroundColor": "",
"htmlJson": {"node":"root","child":[{"node":"element","tag":"div","attr":{"id":"html-template-3","class":"container"},"child":[{"node":"element","tag":"div","attr":{"class":"full-width"},"child":[{"node":"element","tag":"img","attr":{"id":"act31044562973012","c_typename":"logo","c_type":"image","c_width":"135","c_height":"50","c_desc":"建议上传135X50的图片","src":"http://qnfile.icareyou.net/f6ec1cb23c0740d0995c91de7a9964c21560411548597.jpg","class":"act-logo"}},{"node":"text","text":" "},{"node":"element","tag":"img","attr":{"id":"act3105344332423","c_typename":"mainBanner","c_type":"image","c_width":"375","c_height":"367","c_desc":"建议上传375X367的图片","src":"http://qnfile.icareyou.net/6e233bff93d94f0b98e15447fcda3f931562124610970.jpg","class":"full-width"}},{"node":"text","text":" "},{"node":"element","tag":"img","attr":{"id":"act3110143885264","c_typename":"returnBack","c_type":"image","c_width":"154","c_height":"64","c_desc":"建议上传154X64的图片","src":"http://qnfile.icareyou.net/fa5b58b475bf40b9968804c3496845631560913467100","class":"return-back"}}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":"content"},"child":[{"node":"element","tag":"div","attr":{"id":"act31142119991744","class":"countdown"},"child":[{"node":"text","text":" 投票结束倒计时:"},{"node":"element","tag":"span","child":[{"node":"text","text":"0天00时00分"}]}]},{"node":"text","text":" "},{"node":"element","tag":"ul","attr":{"class":["tab-list","m-b"]},"child":[{"node":"element","tag":"li","child":[{"node":"element","tag":"img","attr":{"id":"act31119351441050","c_typename":"playerVotingBtn","c_type":"image","c_width":"184","c_height":"82","c_desc":"建议上传184X82的图片","src":"http://qnfile.icareyou.net/2706845413b541fcbcaaaea37a8a5a061560914799693"}}]},{"node":"text","text":" "},{"node":"element","tag":"li","child":[{"node":"element","tag":"img","attr":{"id":"act31119414834381","c_typename":"playerVotedBtn","c_type":"image","c_width":"184","c_height":"82","c_desc":"建议上传184X82的图片","src":"http://qnfile.icareyou.net/fcec94d65cb145518fd1b701465796f21560914835104"}}]}]},{"node":"text","text":" "},{"node":"element","tag":"form","attr":{"id":"act3932189955","class":"sign-form"},"child":[{"node":"element","tag":"div","attr":{"class":["user-info","m-b"]},"child":[{"node":"element","tag":"img","attr":{"src":"http://qnfile.icareyou.net/e1e347fa1d3a4eb79839e40c6ba312531560307520219.jpg","class":"inner-pic"}},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":"inner-info"},"child":[{"node":"element","tag":"div","attr":{"class":"userName"},"child":[{"node":"text","text":" 姓名:"},{"node":"element","tag":"span","child":[{"node":"text","text":"hehe"}]}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":"userNo"},"child":[{"node":"text","text":" 编号:"},{"node":"element","tag":"span","child":[{"node":"text","text":"hehe"}]}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":"userRank"},"child":[{"node":"text","text":" 排名:"},{"node":"element","tag":"span","child":[{"node":"text","text":"hehe"}]}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":"userVoteNum"},"child":[{"node":"text","text":" 票数:"},{"node":"element","tag":"span","child":[{"node":"text","text":"hehe"}]}]}]}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":["form-row","m-b"]},"child":[{"node":"element","tag":"div","attr":{"class":"form-input-group"},"child":[{"node":"element","tag":"div","attr":{"class":"form-input-group-inner"},"child":[{"node":"element","tag":"input","attr":{"type":"text","name":"note","c_remove":"readonly","placeholder":"请输入介绍/拉票宣言等,字数仅限XXX","class":"userState"}}]}]}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":["form-row","text-center","m-b"]},"child":[{"node":"element","tag":"img","attr":{"src":"http://qnfile.icareyou.net/728ba828fe094d4c8dac41828561bdd61560926221478","class":"show-pic"}}]}]}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":"index-bottom"},"child":[{"node":"element","tag":"div","attr":{"class":"btn-group-info"},"child":[{"node":"element","tag":"img","attr":{"id":"act41612547506702","c_typename":"rangeListBtn","c_type":"image","c_width":"154","c_height":"64","c_desc":"建议上传154x64的图片","src":"http://qnfile.icareyou.net/1b560d6dfe2d4e8e8a05fe90336cc5f61560411872708.jpg"}}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":"btn-group-info"},"child":[{"node":"element","tag":"img","attr":{"id":"act4161336684689","c_typename":"playerIndexBtn","c_type":"image","c_width":"154","c_height":"64","c_desc":"建议上传154x64的图片","src":"http://qnfile.icareyou.net/1c24d979349f482aafd737c2d5acb8e11560411839686.jpg"}}]},{"node":"text","text":" "},{"node":"element","tag":"div","attr":{"class":"btn-group-info"},"child":[{"node":"element","tag":"img","attr":{"id":"act41613113951133","c_typename":"ruleBtn","c_type":"image","c_width":"154","c_height":"64","c_desc":"建议上传154x64的图片","src":"http://qnfile.icareyou.net/c5f549aeb74749ac9529b28cc78c715f1560411823738.jpg"}}]}]}]}]},
"dataJson": {"page":{"id":"html-template-3","style":""},"logo":{"id":"act31044562973012","c_typename":"logo","c_type":"image","c_width":"135","c_height":"50","c_desc":"建议上传135X50的图片","src":"http://qnfile.icareyou.net/f6ec1cb23c0740d0995c91de7a9964c21560411548597.jpg"},"mainBanner":{"id":"act3105344332423","c_typename":"mainBanner","c_type":"image","c_width":"375","c_height":"367","c_desc":"建议上传375X367的图片","src":"http://qnfile.icareyou.net/6e233bff93d94f0b98e15447fcda3f931562124610970.jpg"},"returnBack":{"id":"act3110143885264","c_typename":"returnBack","c_type":"image","c_width":"154","c_height":"64","c_desc":"建议上传154X64的图片","src":"http://qnfile.icareyou.net/fa5b58b475bf40b9968804c3496845631560913467100"},"playerVotingBtn":{"id":"act31119351441050","c_typename":"playerVotingBtn","c_type":"image","src":"http://qnfile.icareyou.net/2706845413b541fcbcaaaea37a8a5a061560914799693","c_width":"184","c_height":"82","c_desc":"建议上传184X82的图片"},"playerVotedBtn":{"id":"act31119414834381","c_typename":"playerVotedBtn","c_type":"image","src":"http://qnfile.icareyou.net/fcec94d65cb145518fd1b701465796f21560914835104","c_width":"184","c_height":"82","c_desc":"建议上传184X82的图片"},"countDownSet":{"id":"act31142119991744","c_typename":"countDownSet","c_type":"text","style":""},"rangeListBtn":{"id":"act41612547506702","c_typename":"rangeListBtn","c_type":"image","src":"http://qnfile.icareyou.net/1b560d6dfe2d4e8e8a05fe90336cc5f61560411872708.jpg","c_width":"154","c_height":"64","c_desc":"建议上传154x64的图片"},"playerIndexBtn":{"id":"act4161336684689","c_typename":"playerIndexBtn","c_type":"image","src":"http://qnfile.icareyou.net/1c24d979349f482aafd737c2d5acb8e11560411839686.jpg","c_width":"154","c_height":"64","c_desc":"建议上传154x64的图片"},"ruleBtn":{"id":"act41613113951133","c_typename":"ruleBtn","c_type":"image","src":"http://qnfile.icareyou.net/c5f549aeb74749ac9529b28cc78c715f1560411823738.jpg","c_width":"154","c_height":"64","c_desc":"建议上传154x64的图片"}},
"relationship": {
pageNumber: '3',
page: 'index',
name: '活动首页',
type: 'page',
childs: [
{ pageNumber: '4', page: 'playerVote1', name: '参与者投票-有票', type: 'dialog' },
{ pageNumber: '5', page: 'playerVote2', name: '参与者投票-无票', type: 'dialog' },
{ pageNumber: '6', page: 'touristVote1', name: '投票者-有票', type: 'dialog' },
{ pageNumber: '7', page: 'touristVote2', name: '投票者-无票', type: 'dialog' },
{ pageNumber: '8', page: 'solicitVote', name: '拉票/活动秘籍', type: 'dialog' }
]
},
"relationship": '{"pageNumber": "3","page": "player","name": "参赛选手", "type": "page","childs": [{ "pageNumber": "4", "page": "playerVote1", "name": "参与者投票-有票", "type": "dialog" },{ "pageNumber": "5", "page": "playerVote2", "name": "参与者投票-无票", "type": "dialog" },{ "pageNumber": "6", "page": "touristVote1", "name": "投票者-有票", "type": "dialog" },{ "pageNumber": "7", "page": "touristVote2", "name": "投票者-无票", "type": "dialog" },{ "pageNumber": "8", "page": "solicitVote", "name": "拉票/活动秘籍", "type": "dialog" }]}',
"playerVote1": {
"id": "18",
"pageNumber": "4",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment