Authored by zhangxiaoru

注册成功

... ... @@ -118,21 +118,23 @@ exports.friendInvite = (req, res, next) => {
}).catch(next);
};
exports.inviteReg = (req, res) => {
let isApp = req.yoho.isApp;
exports.inviteReg = (req, res, next) => {
let isApp = req.yoho.isApp,
uid = req.user.uid;
// uid = req.user.uid;
res.render('expand-new/invite-reg', {
pageHeader: headerModel.setNav({
navTitle: '注册完成'
}),
isApp: isApp,
width750: true,
localCss: true,
title: '注册完成',
page: 'invite-reg'
});
req.ctx(expandModel).promotionData(uid, isApp).then(result => {
res.render('expand-new/invite-reg', {
pageHeader: headerModel.setNav({
navTitle: '注册完成'
}),
isApp: isApp,
width750: true,
localCss: true,
title: '注册完成',
page: 'invite-reg',
inviteRegData: result
});
}).catch(next);
};
// 设置潮流口令
... ...
... ... @@ -267,8 +267,8 @@ router.get('/my-reward', auth, expand.myReward); // 拓展新客 我的奖励页
router.get('/reward-list', expand.rewardList); // 拓展新客 我的奖励列表
router.get('/reward-detail', auth, expand.rewardDetail); // 拓展新客 我的奖励详情页
router.get('/friend-invite', expand.friendInvite); // 拓展新客 好友邀请页
router.get('/invite-reg', expand.inviteReg); // 注册成功
router.get('/set-trend-world', expand.setTrendWorld); // 注册成功页
router.get('/invite-reg', expand.inviteReg); // 注册成功页
router.get('/set-trend-world', expand.setTrendWorld); // 设置潮流口令
router.get('/invite-uesr-info', expand.inviteUserInfo); // 根据邀请码获取个人信息
module.exports = router;
... ...
<div class="invite-reg-page yoho-page">
{{#inviteRegData}}
<div class="tip-top">
<div class="iconfont">&#xe648;</div>
<span class="tip-ward">您已经成功注册为有货会员199元优惠券已到账</span>
<span class="tip-ward"></span>
</div>
<div class="invite-pass">
<div class="instructions">
1.潮流口令是专属于你一人的潮流身份ID,代表你独 一无二的潮流态度。<br>
1.潮流口令是专属于你一人的潮流身份ID,代表你独 一无二的潮流态度。
{{{trendWordSetReason}}}
</div>
<textarea name="" class="command-textarea" placeholder="请设置15位字符以内的潮流口令"></textarea>
<span class="set btn">先逛逛</span>
<span class="guang btn">设置</span>
</div>
<span class="guang btn">先逛逛</span>
<span class="set btn">设置</span>
</div>
{{/inviteRegData}}
</div>
\ No newline at end of file
... ...
... ... @@ -13,9 +13,8 @@
<div class="title">方法二:使用邀请码</div>
<div class="code-content">
<div class="invite-content">
<span class="code">{{inviteCode}}</span>
<span class="code">{{#if trendWorld}}{{trendWorld}}{{else}}{{inviteCode}}{{/if}}</span>
<span class="modify button">修改</span>
{{log isApp}}
{{#if isApp}}
<a class="copy button" href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{inviteCode}}","message":"复制成功"}}'>复制</a>
{{/if}}
... ...
... ... @@ -158,7 +158,6 @@ let verifyMobile = (req, res, next) => {
inviteCode: inviteCode
});
}
return res.json(result);
}).catch(next);
};
... ... @@ -171,7 +170,7 @@ let codeAction = (req, res, next) => {
let token = req.query.token;
let mobile = +req.query.phoneNum;
let area = +(req.query.areaCode || 86);
let inviteCode = +req.query.inviteCode || '';
let inviteCode = req.query.inviteCode || '';
// 判断是否允许访问, 不允许则跳转到错误页面
if (!_.isString(token) || !_.isNumber(mobile) || !sign.verifyToken(mobile, token)) {
... ... @@ -277,7 +276,7 @@ let verifyCode = (req, res, next) => {
let mobile = +req.body.phoneNum;
let area = +(req.body.areaCode || 86);
let code = +req.body.code;
let inviteCode = +req.body.inviteCode || '';
let inviteCode = req.body.inviteCode || '';
/* 判断参数是否合法 */
if (!_.isNumber(mobile) || !_.isNumber(area) || !_.isNumber(code)) {
... ... @@ -330,7 +329,7 @@ let passwordAction = (req, res, next) => {
let mobile = +req.query.phoneNum;
let area = +(req.query.areaCode || 86);
let smsCode = +req.query.smsCode;
let inviteCode = +req.query.inviteCode || '';
let inviteCode = req.query.inviteCode || '';
// 判断是否允许访问, 不允许则跳转到错误页面
if (!smsCode || !_.isString(token) || !_.isNumber(mobile) ||
... ... @@ -429,7 +428,6 @@ let setPassword = (req, res, next) => {
refer = utils.refererLimit(refer);
}
delete req.session.phoneNum;
return res.json({
... ... @@ -437,7 +435,8 @@ let setPassword = (req, res, next) => {
message: '注册成功',
data: {
session: refer,
href: refer
href: '//m.yohobuy.com/activity/invite-reg',
msqDelivery: _.get(resultCopy, 'data.msqDelivery', '')
}
});
}).catch(next);
... ...
'use strict';
require('activity/invite-reg.page.css');
require('common');
let tip = require('plugin/tip');
$('.set').click(function() {
$.ajax({
type: 'GET',
url: '/activity/set-trend-world',
data: {
trendWord: $('.command-textarea').val()
},
success: function(result) {
tip.show(result.message);
}
});
});
$('.guang').click(function() {
location.href = window.cookie('refer');
});
(function() {
if (window.cookie('msqDelivery')) {
$('.tip-ward').html(window.cookie('msqDelivery'));
}
}());
... ...
... ... @@ -8,8 +8,6 @@ let inviteCode = window.queryString.inviteCode;
(function() {
let inviteShare = require('common/invite-share.hbs');
console.log('qqqqqqqqqq');
if (inviteCode) {
$.ajax({
type: 'GET',
... ...
... ... @@ -11,6 +11,14 @@ $('.close').click(function() {
$('.command-textarea').val('');
});
$('.command-textarea').bind('input', function() {
if ($('.command-textarea').val() === '') {
$('.close').hide();
} else {
$('.close').show();
}
});
$('.save').click(function() {
trendWord = $('.command-textarea').val();
... ...
... ... @@ -83,6 +83,9 @@ function setPassword() {
if (data.code === 200) {
showErrTip('注册成功');
window.setCookie('refer', data.session);
window.setCookie('msqDelivery', data.msqDelivery);
// 统计代码:用于统计从哪个渠道注册成功的
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
... ...
... ... @@ -30,9 +30,10 @@
padding: 174px 65px 0 70px;
.instructions {
line-height: 40px;
line-height: 42px;
margin-bottom: 30px;
font-size: 24px;
font-weight: 700;
}
.command-textarea {
... ... @@ -60,12 +61,12 @@
text-align: center;
}
.set {
.guang {
background-color: #b0b0b0;
margin-right: 70px;
}
.guang {
.set {
background-color: #000;
}
}
... ...