...
|
...
|
@@ -5,6 +5,7 @@ import tip from 'plugin/tip'; |
|
|
import dialog from 'plugin/dialog';
|
|
|
import fillInHbs from 'activity/have-gain/fill-in.hbs';
|
|
|
import yoho from 'yoho-app';
|
|
|
import parse from 'yoho-qs/parse';
|
|
|
|
|
|
class HaveGainApplyPage extends Page {
|
|
|
constructor() {
|
...
|
...
|
@@ -20,6 +21,7 @@ class HaveGainApplyPage extends Page { |
|
|
$agreement: $('.agreement-section .agreement'),
|
|
|
$applyBtn: $('.apply-btn'),
|
|
|
};
|
|
|
this.query = parse(window.location.search.substr(1));
|
|
|
this.init();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -35,7 +37,6 @@ class HaveGainApplyPage extends Page { |
|
|
this.selector.$mobileInput.on('input', this.changeBtnStatus.bind(this));
|
|
|
this.selector.$fillIn.on('click', that.tapFillIn);
|
|
|
this.selector.$agreement.on('click', that.tapAgreement);
|
|
|
this.selector.$added.on('click', this.tapAdded.bind(this));
|
|
|
this.selector.$applyBtn.on('click', this.apply.bind(this));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -44,16 +45,34 @@ class HaveGainApplyPage extends Page { |
|
|
let jumpUrl = this.selector.$apply.data('url');
|
|
|
|
|
|
if (jump) {
|
|
|
|
|
|
// app内审核通过跳转区分处理
|
|
|
if (yoho.isApp && jumpUrl.indexOf('go.minealliance') > -1) {
|
|
|
|
|
|
// 若指定跳转
|
|
|
if (this.query.passJump === 'Y') {
|
|
|
jumpUrl = `//m.yohobuy.com/?openby:yohobuy={"action":"go.h5","params":{"title":"${this.query.title}","url":"${this.query.jumpUrl}"}}`; // eslint-disable-line
|
|
|
}
|
|
|
|
|
|
$('body').append('<a id="jump-url" href="javascript:;" style="display: none;"></a>');
|
|
|
$('#jump-url').attr('href', jumpUrl);
|
|
|
|
|
|
setTimeout(() => {
|
|
|
if (window.yohoInterface) {
|
|
|
yoho.invokeMethod('go.back');
|
|
|
}
|
|
|
$('#jump-url')[0].click();
|
|
|
}, 500);
|
|
|
const jumpFn = () => {
|
|
|
setTimeout(() => {
|
|
|
$('#jump-url')[0].click();
|
|
|
|
|
|
// ios暂不支持go.back关闭前置webview
|
|
|
if (yoho.isAndroid) {
|
|
|
yoho.invokeMethod('go.back');
|
|
|
}
|
|
|
}, 500);
|
|
|
};
|
|
|
|
|
|
if (window.yohoInterface) {
|
|
|
jumpFn();
|
|
|
} else {
|
|
|
yoho.ready(jumpFn);
|
|
|
}
|
|
|
} else {
|
|
|
window.location.href = jumpUrl;
|
|
|
}
|
...
|
...
|
@@ -157,7 +176,6 @@ class HaveGainApplyPage extends Page { |
|
|
}
|
|
|
|
|
|
apply() {
|
|
|
let that = this;
|
|
|
let errStatus = this.changeBtnStatus();
|
|
|
let socialMediaList = [];
|
|
|
|
...
|
...
|
@@ -219,10 +237,10 @@ class HaveGainApplyPage extends Page { |
|
|
dialogText: '请等待工作人员审核,您可以关注“有货有赚”服务号,了解进度',
|
|
|
hasFooter: {
|
|
|
leftBtnText: '取消',
|
|
|
rightBtnText: '去添加'
|
|
|
rightBtnText: '确定'
|
|
|
}
|
|
|
}, function() {
|
|
|
that.awakeWeixin();
|
|
|
window.location.href = '//m.yohobuy.com/activity/have-gain/verify';
|
|
|
}, function() {
|
|
|
window.location.href = '//m.yohobuy.com/activity/have-gain/verify';
|
|
|
});
|
...
|
...
|
|