Authored by 郝肖肖

'有赚申请失败页面'

... ... @@ -103,6 +103,30 @@ class HaveGain {
});
}
// 审核拒绝
fail(req, res) {
return res.render('have-gain/fail', {
module: 'activity',
page: 'have-gain-fail',
width750: true,
localCss: true,
title: '有货有赚',
pageHeader: !req.yoho.isApp && headerModel.setNav({
navTitle: '有货有赚',
navBtn: false
}),
});
}
// 审核拒绝,重新申请API
resetApply(req, res, next) {
let uid = req.user.uid;
return req.ctx(haveGainModel).resetApply({uid}).then(result => {
return res.json(result);
}).catch(next);
}
submitApply(req, res, next) {
let body = req.body || {};
let uid = req.user.uid;
... ...
... ... @@ -17,13 +17,13 @@ module.exports = class extends global.yoho.BaseModel {
let gainList = [
{
url: _.get(res[0], 'data.url', ''),
img: '//img10.static.yhbimg.com/article/2017/06/20/12/01a50a1f45b97365e758d6890858998310.jpg?imageView2/{mode}/w/{width}/h/{height}', // eslint-disable-line
img: '//img11.static.yhbimg.com/yhb-img01/2018/07/09/10/010d4f185b1a155449966ef12d3ed41490.jpg?imageView2/{mode}/w/{width}/h/{height}', // eslint-disable-line
totalUser: _.get(share, '[0]', 0),
totalCouponNum: _.get(share, '[1]', 0),
isShow: true
}, {
url: _.get(res[1], 'data.checkUrl', ''),
img: '//img10.static.yhbimg.com/article/2017/06/20/12/01a50a1f45b97365e758d6890858998310.jpg?imageView2/{mode}/w/{width}/h/{height}', // eslint-disable-line
img: '//img11.static.yhbimg.com/yhb-img01/2018/07/09/10/018092224dc2f48195e3ad15269f981d1f.jpg?imageView2/{mode}/w/{width}/h/{height}', // eslint-disable-line
isShow: false
}
];
... ... @@ -64,7 +64,10 @@ module.exports = class extends global.yoho.BaseModel {
if (checkStatus === 1) { // 审核中
checkUrl = helpers.urlFormat('/activity/have-gain/verify', {});
} else if (checkStatus === 2) { // 审核成功
// checkUrl = 'https://m.yohobuy.com?title=有货有赚&openby:yohobuy={"action":"go.minealliance","params":{"title":"有货有赚"}}';
checkUrl = 'https://activity.yoho.cn/feature/2213.html?title=说明详情&openby:yohobuy={"action":"go.h5","params":{"title": "说明详情", url":"https://activity.yoho.cn/feature/2213.html"}}'; // eslint-disable-line
} else if (checkStatus === 3) { // 申请拒绝
checkUrl = helpers.urlFormat('/activity/have-gain/fail', {});
}
_.set(res, 'data.checkUrl', checkUrl);
... ... @@ -74,6 +77,19 @@ module.exports = class extends global.yoho.BaseModel {
}
/**
* [审核拒绝,重新申请API]
* @param {[type]} params [{uid:'']}]
* @return {[type]} [{}]
*/
resetApply(params) {
return this.get({
data: Object.assign({
method: 'app.union.shareOrder.resetApply'
}, params)
});
}
/**
* [提交-申请]
* @param {[type]} params [{uid:'',name:'',mobile:'',socialMediaList:[{type:'',account:'',fans:200}]}]
* @return {[type]} [{}]
... ...
... ... @@ -332,7 +332,9 @@ router.get('/grouth-new/init', auth, grouthNew.grouthInit); // 成长值初始
router.get('/have-gain/index', auth, haveGain.index); // 有货有赚列表
router.get('/have-gain/apply', auth, haveGain.apply); // 有货有赚申请
router.get('/have-gain/verify', haveGain.verify); // 有货有赚审核趾
router.get('/have-gain/verify', haveGain.verify); // 有货有赚审核
router.get('/have-gain/fail', auth, haveGain.fail); // 有货有赚审核不通过
router.post('/have-gain/resetApply', auth, haveGain.resetApply); // 有货有赚审核不通过,重新申请API
router.post('/have-gain/submitApply', auth, haveGain.submitApply); // 有货有赚-申请开通
module.exports = router;
... ...
<div class="have-gain-fail">
<div class="esp-header">审核未通过</div>
<div class="esp-explain">
<div class="explain-title">我们将通过您在有货的历史购物,浏览,分享等行为进行系统及人工筛选,没有通过的原因可能如下:</div>
<ul class="explain-sub">
<li>1.您提供的基本信息有误,请提供真实有效的姓名和手机号码。</li>
<li>2.您提供的完善信息,经工作人员核实后,与事实不符。</li>
<li>3.根据您提供的完善信息,不符合我们对参与用户门槛的最低要求。</li>
<li>4.您在有货的活跃度偏低。</li>
</ul>
</div>
<div class="esp-go">
<div class="reset-btn">重新申请</div>
<div class="again-title">您可以重新提交资料,再次申请</div>
</div>
</div>
... ...
<div class="have-gain-verify">
<div class="esp-audit">审核中,请耐心等待</div>
<div class="esp-progress">您可以关注“有货有赚”服务号,了解申请进度</div>
<div class="esp-progress">审核会在7个工作日内完成,您可以关注“有货有赚”服务号,了解申请进度</div>
<div class="esp-go">
<div class="add-btn">去添加</div>
</div>
... ...
import 'activity/have-gain-fail.page.css';
import Page from 'yoho-page';
import $ from 'yoho-jquery';
import tip from 'plugin/tip';
class HaveGainFailPage extends Page {
constructor() {
super();
this.selector = {
$resetBtn: $('.esp-go .reset-btn')
};
this.init();
}
init() {
this.bindEvents();
}
bindEvents() {
this.selector.$resetBtn.on('click', this.tapReset.bind(this));
}
tapReset() {
if (this.selector.isFlag) {
return false;
}
this.selector.isFlag = true;
return this.ajax({
type: 'post',
url: '/activity/have-gain/resetApply',
data: {}
}).then(res => {
this.selector.isFlag = false;
if (res.code !== 200) {
return tip.show(res.message || '请稍后再试');
}
window.location.href = '//m.yohobuy.com/activity/have-gain/apply';
}).catch(() => {
this.selector.isFlag = false;
});
}
}
$(() => {
new HaveGainFailPage();
});
... ...
.have-gain-fail {
text-align: center;
.esp-header {
font-family: PingFang-SC-Medium, sans-serif;
font-size: 40px;
color: #444;
letter-spacing: 0;
text-align: center;
margin: 120px 0 20px;
}
.esp-explain {
font-family: PingFang-SC-Regular, sans-serif;
letter-spacing: 0;
padding: 0 40px;
text-align: left;
.explain-title {
font-size: 28px;
color: #444;
margin-bottom: 40px;
}
ul li {
font-size: 28px;
color: #b0b0b0;
padding: 0 10px;
margin-bottom: 20px;
line-height: 44px;
}
}
.reset-btn {
font-family: PingFang-SC-Regular, sans-serif;
font-size: 32px;
color: #fff;
text-align: center;
width: 400px;
height: 100px;
line-height: 100px;
background-color: #444;
border-radius: 8px;
margin: 60px auto 20px;
}
.again-title {
font-family: PingFangSC-Regular, sans-serif;
font-size: 28px;
color: #b0b0b0;
letter-spacing: 0;
text-align: center;
}
}
... ...