Authored by 周少峰

Merge branch 'feature/students-modify'

... ... @@ -121,12 +121,14 @@ exports.stuProducts = (data) => {
exports.stuVerify = (result) => {
let data = {};
if (result.code === 200) {
data.isError = false;
data = result.data;
data.isStudent = data.isStudent === 1 ? true : false;
} else {
data.msg = result.message;
data.isError = true;
data.errorMsg = result.message;
}
return data;
... ...
... ... @@ -67,14 +67,20 @@
</form>
{{#verifyRusult}}
<div class="identity-back-wrap">
{{#if isStudent}}
<div id="identity-success" class="identity-back-icon success-icon"></div>
<p class="identity-back-title">恭喜您,您的验证成功啦!</p>
<p class="identity-back-subtitle"><span>{{prompt}}</span></p>
{{else}}
<div id="identity-fail" class="identity-back-icon fail-icon"></div>
<p id="identity-fail-text" class="identity-back-title">{{#if msg}} {{msg}} {{else}} 太遗憾了,您的学校信息未通过审核!{{/if}}</p>
{{#if isError}}
<div id="identity-fail" class="identity-back-icon fail-icon"></div>
<p id="identity-fail-text" class="identity-back-title">{{errorMsg}}</p>
<p class="identity-back-subtitle">您可以<span class="backForm">重新验证></span></p>
{{else}}
{{#if isStudent}}
<div id="identity-success" class="identity-back-icon success-icon"></div>
<p class="identity-back-title">恭喜您,您的验证成功啦!</p>
<p class="identity-back-subtitle"><span>{{prompt}}</span></p>
{{else}}
<div id="identity-fail" class="identity-back-icon fail-icon"></div>
<p id="identity-fail-text" class="identity-back-title">太遗憾了,您的学校信息未通过审核!</p>
<p class="identity-back-subtitle">您可以<span class="backForm">重新验证></span></p>
{{/if}}
{{/if}}
</div>
{{/verifyRusult}}
... ...
... ... @@ -118,9 +118,9 @@ function givePoint(op, parameter) {
}, true);
}
function createStuDialog(cont) {
function createStuDialog(cName, cont) {
var opt = {
className: 'stu-dialog',
className: 'stu-dialog ' + cName,
content: cont
};
... ... @@ -438,17 +438,26 @@ $couponDia.on('click', function() {
'<p>(2) 学校在可选的范围内,有部分学校可能暂未收录,后期尽快增加;</p>' +
'<p>(3) 每个学号只能认证一个账户;</p>';
createStuDialog(cont);
createStuDialog('stu-agree-dialog', cont);
});
$rightDia.on('click', function() {
var cont = '<h3 class="dia-title">特权详细说明</h3>' +
'<p>(1) 学生购买原价商品,可享受9折优惠,与vip折扣不可同时享受,但取低;</p>' +
'<p>(2) 学生购物每1元可赠送1个有货币;</p>' +
'<p>(3) 学生所在学校购物金额当月累计最高,可获得3个免单名额,每月抽奖;</p>' +
'<p>(4) 不定期学生专享活动;</p>';
createStuDialog(cont);
'<p>权益1:新品立享9折</p>' +
'<p>学生购买原价新品时,可立即享受9折优惠,与VIP折扣不可同时享受。</p><br>' +
'<p>权益2:每1元返1个有货币</p>' +
'<p>学生购买商品时,以商品的实际成交金额计算,每1元返1个有货币;</p>' +
'<p>返有货币时间:确认收货7日后,系统将自动将对应数量的有货币返至购买账户;</p>' +
'<p>有货币有效期:获得当日至次年12月31日,逾期自动作废;</p>' +
'<p>查看有货币:登录后,点击“个人中心”在“我的有货币”中可以查看有货币余额及明细。</p><br>' +
'<p>权益3:免单抽奖</p>' +
'<p>每月将在累计购物金额最高的学校中,抽取3名幸运学生用户,获得免单资格;</p>' +
'<p>免单用户名单将在每月第1个工作日公布在有货微信公众号上,可关注【有货YOHOBUY】;</p>' +
'<p>免单用户将在中奖次日获得与实付金额等额的现金券,使用时间:中奖当月。</p><br>' +
'<p>权益4:学生专享活动</p>' +
'<p>每月不定期的开展学生专享活动,可打开有货APP推送,及时查收学生专享活动通知。</p>';
createStuDialog('stu-rights-dialog', cont);
// xls-5学生营销,页面加载埋点
givePoint('YB_STUDENT_VIP_FLR', {F_ID: 'stu-rights-box', F_NAME: '学生权益',
... ... @@ -508,6 +517,7 @@ $('#identity-Btn').on('click', function() {
var identData = {
name: $('#stu-name').val(),
certNo: $('#stu-idNum').val(),
provName: $('#stu-province').val(),
collegeName: $('#stu-school').val(),
educationDegree: $('#stu-edu').val(),
enrollmentYear: $('#stu-entrance-year').val()
... ... @@ -541,8 +551,16 @@ $('#identity-Btn').on('click', function() {
givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
return;
}
if (identData.provName === '') {
failText = '请选择省份';
$prompt.html(failText);
// xls-3埋点
givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
return;
}
if (identData.collegeName === '') {
failText = '学校名称不能为空';
failText = '请选择学校名称';
$prompt.html(failText);
// xls-3埋点
... ... @@ -550,7 +568,7 @@ $('#identity-Btn').on('click', function() {
return;
}
if (identData.educationDegree === '') {
failText = '学历程度不能为空';
failText = '请选择学历程度';
$prompt.html(failText);
// xls-3埋点
... ... @@ -558,7 +576,7 @@ $('#identity-Btn').on('click', function() {
return;
}
if (identData.enrollmentYear === '') {
failText = '入学年份不能为空';
failText = '请选择入学年份';
$prompt.html(failText);
// xls-3埋点
... ...
... ... @@ -227,7 +227,7 @@
position: absolute;
left: 93px;
top: 0;
width: 161px;
width: 181px;
&.gray-p {
color: #a2a2a2;
... ... @@ -502,7 +502,6 @@
.stu-dialog {
border: 3px solid #000;
width: 580px;
.content {
text-align: left;
... ... @@ -512,7 +511,7 @@
.dia-title {
display: inline-block;
padding-bottom: 7px;
margin: 10px 0 25px;
margin: 10px 0;
font-size: 18px;
font-weight: bold;
border-bottom: 3px solid;
... ... @@ -525,6 +524,14 @@
}
}
.stu-rights-dialog {
width: 600px;
}
.stu-agree-dialog {
width: 500px;
}
.stu-alert .content p {
margin-top: 50px;
}
... ...