|
|
/* eslint-disable vars-on-top */
|
|
|
/**
|
|
|
* @author xuan.chen@yoho.cn
|
|
|
* @author acgpiano
|
|
|
*/
|
|
|
'use strict';
|
|
|
require('plugin/modal');
|
...
|
...
|
@@ -13,7 +13,7 @@ var tip = require('plugin/tip'); |
|
|
window.tip = tip;
|
|
|
|
|
|
var $punch, $punchModal;
|
|
|
var $invite;
|
|
|
var $student, $invite;
|
|
|
|
|
|
function appJump(where, option) {
|
|
|
var $anchor = $(document.createElement('a'));
|
...
|
...
|
@@ -46,6 +46,7 @@ var page = { |
|
|
domInit: function() {
|
|
|
$punch = $('#js-qiandao');
|
|
|
$punchModal = $('#qiandao-modal');
|
|
|
$student = $('#vip-student');
|
|
|
$invite = $('#js-invite-friends');
|
|
|
},
|
|
|
|
...
|
...
|
@@ -59,11 +60,25 @@ var page = { |
|
|
okText: '立即去'
|
|
|
})
|
|
|
.on('hiden.yoho.modal', function() {
|
|
|
appJump('/home', { action: 'go.mine'});
|
|
|
appJump('/home', { action: 'go.mine' });
|
|
|
});
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$student.on('click', '.in-button-bg2', function(e) {
|
|
|
e.preventDefault();
|
|
|
if (yoho.isApp) {
|
|
|
return appJump('/activity/vip-day10/crazy-wheel', {
|
|
|
action: 'go.h5',
|
|
|
params: {
|
|
|
url: 'http://m.yohobuy.com/activity/vip-day10/crazy-wheel',
|
|
|
islogin: 'Y'
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
window.location = '/activity/vip-day10/crazy-wheel';
|
|
|
});
|
|
|
},
|
|
|
|
|
|
// 签到福利
|
...
|
...
|
@@ -92,13 +107,13 @@ var page = { |
|
|
|
|
|
$punchModal.yModal('show');
|
|
|
})
|
|
|
.fail(function() {
|
|
|
tip.show('签到失败 >_<');
|
|
|
});
|
|
|
.fail(function() {
|
|
|
tip.show('签到失败 >_<');
|
|
|
});
|
|
|
},
|
|
|
};
|
|
|
|
|
|
window.$ = $;
|
|
|
$(function() {
|
|
|
page.init();
|
|
|
}); |
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|