...
|
...
|
@@ -29,7 +29,6 @@ function appJump(where, option) { |
|
|
$anchor.delay(2000).remove();
|
|
|
}
|
|
|
|
|
|
|
|
|
var page = {
|
|
|
rollTimer: null,
|
|
|
init: function() {
|
...
|
...
|
@@ -62,10 +61,29 @@ var page = { |
|
|
|
|
|
|
|
|
$student.on('click', '.in-button-bg1', function(e) {
|
|
|
var url;
|
|
|
|
|
|
e.preventDefault();
|
|
|
$.post('/activity/vip-day10/isStudent').done(result => {
|
|
|
if (yoho.isApp) {
|
|
|
url = '/activity/vip-day1028/isStudent?app_version=1&uid=' + (yoho.getUid() || 0);
|
|
|
} else {
|
|
|
url = '/activity/vip-day1028/isStudent';
|
|
|
}
|
|
|
$.post(url).done(result => {
|
|
|
if (result.code === 401) {
|
|
|
window.location = '/signin.html?refer=' + location.href;
|
|
|
if (yoho.isApp && !yoho.getUid()) {
|
|
|
appJump('m.yohobuy.com/signin.html', {
|
|
|
action: 'go.weblogin',
|
|
|
params: {
|
|
|
url: 'http://m.yohobuy.com/signin.html',
|
|
|
jumpurl: {
|
|
|
url: 'http://m.yohobuy.com/activity/vip-day1028'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
} else if (!yoho.isApp && !yoho.getUid()) {
|
|
|
window.location = '/signin.html?refer=' + location.href;
|
|
|
}
|
|
|
} else {
|
|
|
$.yAlert({
|
|
|
content: '请至APP“我的”页面,右上角点击“学生认证”进行认证',
|
...
|
...
|
@@ -78,15 +96,15 @@ var page = { |
|
|
$student.on('click', '.in-button-bg2', function(e) {
|
|
|
e.preventDefault();
|
|
|
if (yoho.isApp) {
|
|
|
return appJump('/activity/vip-day10/crazy-wheel', {
|
|
|
return appJump('/activity/vip-day1028/crazy-wheel', {
|
|
|
action: 'go.h5',
|
|
|
params: {
|
|
|
url: 'http://m.yohobuy.com/activity/vip-day10/crazy-wheel',
|
|
|
url: 'http://m.yohobuy.com/activity/vip-day1028/crazy-wheel',
|
|
|
islogin: 'Y'
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
window.location = '/activity/vip-day10/crazy-wheel';
|
|
|
window.location = '/activity/vip-day1028/crazy-wheel';
|
|
|
});
|
|
|
},
|
|
|
|
...
|
...
|
@@ -98,14 +116,14 @@ var page = { |
|
|
params: {
|
|
|
url: 'http://m.yohobuy.com/signin.html',
|
|
|
jumpurl: {
|
|
|
url: 'http://m.yohobuy.com/activity/vip-day10'
|
|
|
url: 'http://m.yohobuy.com/activity/vip-day1028'
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
$.post('/activity/vip-day10/signin.json?app_version=1&uid=' + yoho.getUid()).done(function(res) {
|
|
|
$.post('/activity/vip-day1028/signin.json?app_version=1&uid=' + yoho.getUid()).done(function(res) {
|
|
|
if (res.code !== 200) {
|
|
|
tip.show(res.message || '签到失败');
|
|
|
if (res.redirect) {
|
...
|
...
|
|