Authored by michaelcao

update

... ... @@ -22,7 +22,6 @@
i,
search = window.location.search,
hashes = search ? decodeURIComponent(search).slice(1).split('&') : [];
for (i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars[hash[0]] = hash[1];
... ... @@ -83,15 +82,17 @@
var Request = new Object();
Request = GetRequest();
uid = Request['uid'];
var url ="";
if (!uid){
var locationUrl = cutUrl(window.location.href);
var url = locationUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'
url = locationUrl + '?app_version=1&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'
+ locationUrl +'","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}';
if ($("#collocation-link").length <= 0) {
$("body").append('<a href=\'' + url + '\' style="display:none;" id="collocation-link">' +
'<span class="collocation-link"></span>' +
'</a>');
}
$(".collocation-link").click();
}else{
var boxData = $(boxObj).data("boxData");
... ...
... ... @@ -462,16 +462,30 @@
}
});
$.getJSON(dataRequestUrl+"?callback=?", function(json) {
if (json.code != 200) {
return;
}
if (!json.data) {
return;
}
if (!isApp) {
$.getJSON(dataRequestUrl+"?callback=?", function(json) {
if (json.code != 200) {
return;
}
if (!json.data) {
return;
}
setSelectValue(uid);
});
}else{
var Request = new Object();
Request = GetRequest();
uid = Request['uid'];
if(uid){
setSelectValue(uid);
}
}
//根据uid设置已经选择的记录
function setSelectValue(uid){
$.post("/activity/ActVoteResultController/getActVoteNumByUid", {
uid : json.data
uid : uid
}, function(data) {
if (!data || data.code != 200) {
return;
... ... @@ -485,8 +499,7 @@
$("div[id='"+ item.voteItemId +"']").addClass("vote_click");
});
}, "json");
});
}
//活动细则
$('.detail_click').click(function(){
... ... @@ -520,7 +533,7 @@
//点击投票跟提交投票都要验证登录
if (!isApp) {
var dataRequestUrl = "http://m.yohobuy.com/passport/login/user";
// var dataRequestUrl = "http://m.yohobuy.com/passport/login/user";
$.getJSON(dataRequestUrl+"?callback=?",
function(json) {
if (json.code === 200) {
... ... @@ -543,7 +556,7 @@
uid = Request['uid'];
if (!uid){
var locationUrl = cutUrl(window.location.href);
var url = locationUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'
var url = locationUrl + '?app_version=1&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'
+ locationUrl +'","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}';
if ($("#collocation-link").length <= 0) {
$("body").append('<a href=\'' + url + '\' style="display:none;" id="collocation-link">' +
... ... @@ -565,7 +578,7 @@
}
if (!isApp) {
var dataRequestUrl = "http://m.yohobuy.com/passport/login/user";
// var dataRequestUrl = "http://m.yohobuy.com/passport/login/user";
$.getJSON(dataRequestUrl+"?callback=?",
function(json) {
if (json.code === 200) {
... ...
... ... @@ -133,7 +133,7 @@
var uid = Request['uid'];
if (!uid){
var locationUrl = cutUrl(window.location.href);
var url = locationUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'
var url = locationUrl + '?app_version=1&openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'
+ locationUrl +'","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}';
//window.location.href=url;
if ($("#collocation-link").length <= 0) {
... ...