...
|
...
|
@@ -15,6 +15,7 @@ const queryString = require('querystring'); |
|
|
|
|
|
const studentsApi = require('./students-api');
|
|
|
const stuHandler = require('./students-handler');
|
|
|
const helpers = global.yoho.helpers;
|
|
|
|
|
|
// const productProcess = require(`${utils}/product-process`);
|
|
|
// const _ = require('lodash');
|
...
|
...
|
@@ -92,163 +93,6 @@ exports.getStudentsData = (channel, req) => { |
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 测试数据
|
|
|
*/
|
|
|
exports.getTestData = () => {
|
|
|
let respData = {
|
|
|
module: 'product',
|
|
|
page: 'students',
|
|
|
headerData: {
|
|
|
Header: true,
|
|
|
headerType: 'boys'
|
|
|
},
|
|
|
footerTop: true
|
|
|
};
|
|
|
|
|
|
respData.realData = {
|
|
|
mainBanner: {
|
|
|
list: [{src: 'http://img11.static.yhbimg.com/yhb-img01/2016/06/01/20/' +
|
|
|
'01a88a4e626a954eb5ec0302a0470e0b3f.jpg?imageView2/2/w/1920/h/450/q/70',
|
|
|
url: 'http://www.yohobuy.com'},
|
|
|
{src: 'http://img11.static.yhbimg.com/yhb-img01/2016/06/01/20/' +
|
|
|
'01a88a4e626a954eb5ec0302a0470e0b3f.jpg?imageView2/2/w/1920/h/450/q/70',
|
|
|
url: 'http://www.yohobuy.com'},
|
|
|
{src: 'http://img11.static.yhbimg.com/yhb-img01/2016/06/01/20/' +
|
|
|
'01a88a4e626a954eb5ec0302a0470e0b3f.jpg?imageView2/2/w/1920/h/450/q/70',
|
|
|
url: 'http://www.yohobuy.com'}]
|
|
|
},
|
|
|
sortItem: [{title: '学生权益介绍', href: 'stu-rights'}, {title: '我要验证身份', href: 'stu-identity'},
|
|
|
{title: '学生热门单品', href: 'stu-good'}, {title: '更多活动推荐', href: 'stu-activity'}],
|
|
|
rightsItem: [{src: '//img12.static.yhbimg.com/goodsimg/2015/12/02/10/' +
|
|
|
'0256adbb54c5a9b657485b972cc94ceb99.jpg?imageView/1/w/235/h/314', title: '1、原价商品享9折优惠'},
|
|
|
{src: '//img12.static.yhbimg.com/goodsimg/2015/12/02/10/' +
|
|
|
'0256adbb54c5a9b657485b972cc94ceb99.jpg?imageView/1/w/235/h/314', title: '2、满100元返100个有货币'},
|
|
|
{src: '//img12.static.yhbimg.com/goodsimg/2015/12/02/10/' +
|
|
|
'0256adbb54c5a9b657485b972cc94ceb99.jpg?imageView/1/w/235/h/314', title: '3、每月3个免单名额'},
|
|
|
{src: '//img12.static.yhbimg.com/goodsimg/2015/12/02/10/' +
|
|
|
'0256adbb54c5a9b657485b972cc94ceb99.jpg?imageView/1/w/235/h/314', title: '4、不定期学生专享活动'}],
|
|
|
proItem: [
|
|
|
{url: '',
|
|
|
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/07/15/07/02a68330998a4a28b67060d349e08d216f.jpg?' +
|
|
|
'imageView/2/w/280/h/373',
|
|
|
productName: 'Dickies 炫色小脚裤',
|
|
|
marketPrice: 12.3,
|
|
|
salesPrice: 12.3,
|
|
|
forStu: true},
|
|
|
{url: '',
|
|
|
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/07/15/07/02a68330998a4a28b67060d349e08d216f.jpg?' +
|
|
|
'imageView/2/w/280/h/373',
|
|
|
productName: 'Dickies 炫色小脚裤',
|
|
|
marketPrice: 12.3,
|
|
|
salesPrice: 12.3,
|
|
|
forStu: true},
|
|
|
{url: '',
|
|
|
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/07/15/07/02a68330998a4a28b67060d349e08d216f.jpg?' +
|
|
|
'imageView/2/w/280/h/373',
|
|
|
productName: 'Dickies 炫色小脚裤',
|
|
|
marketPrice: 12.3,
|
|
|
salesPrice: 12.3,
|
|
|
forStu: true},
|
|
|
{url: '',
|
|
|
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/07/15/07/02a68330998a4a28b67060d349e08d216f.jpg?' +
|
|
|
'imageView/2/w/280/h/373',
|
|
|
productName: 'Dickies 炫色小脚裤',
|
|
|
marketPrice: 12.3,
|
|
|
salesPrice: 12.3,
|
|
|
forStu: true},
|
|
|
{url: '',
|
|
|
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/07/15/07/02a68330998a4a28b67060d349e08d216f.jpg?' +
|
|
|
'imageView/2/w/280/h/373',
|
|
|
productName: 'Dickies 炫色小脚裤',
|
|
|
marketPrice: 12.3,
|
|
|
salesPrice: 12.3,
|
|
|
forStu: true},
|
|
|
{url: '',
|
|
|
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/07/15/07/02a68330998a4a28b67060d349e08d216f.jpg?' +
|
|
|
'imageView/2/w/280/h/373',
|
|
|
productName: 'Dickies 炫色小脚裤',
|
|
|
marketPrice: 12.3,
|
|
|
salesPrice: 12.3,
|
|
|
forStu: true},
|
|
|
{url: '',
|
|
|
thumb: 'http://img12.static.yhbimg.com/goodsimg/2015/07/15/07/02a68330998a4a28b67060d349e08d216f.jpg?' +
|
|
|
'imageView/2/w/280/h/373',
|
|
|
productName: 'Dickies 炫色小脚裤',
|
|
|
marketPrice: 12.3,
|
|
|
salesPrice: 12.3,
|
|
|
forStu: true}],
|
|
|
couponItem: [
|
|
|
{
|
|
|
url: 'http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681',
|
|
|
img: '//img10.static.yhbimg.com/yhb-img01/2016/07/29/17/01cfa4035101b5c8f46efd9c0fbf8ef0c8.jpg',
|
|
|
id: '优惠券',
|
|
|
normal: true
|
|
|
},
|
|
|
{
|
|
|
url: 'http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681',
|
|
|
img: '//img10.static.yhbimg.com/yhb-img01/2016/07/29/17/01cfa4035101b5c8f46efd9c0fbf8ef0c8.jpg',
|
|
|
id: '优惠券',
|
|
|
got: true
|
|
|
},
|
|
|
{
|
|
|
url: 'http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681',
|
|
|
img: '//img10.static.yhbimg.com/yhb-img01/2016/07/29/17/01cfa4035101b5c8f46efd9c0fbf8ef0c8.jpg',
|
|
|
id: '优惠券',
|
|
|
empty: true
|
|
|
},
|
|
|
{
|
|
|
url: 'http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681',
|
|
|
img: '//img10.static.yhbimg.com/yhb-img01/2016/07/29/17/01cfa4035101b5c8f46efd9c0fbf8ef0c8.jpg',
|
|
|
id: '优惠券',
|
|
|
normal: true
|
|
|
},
|
|
|
{
|
|
|
url: 'http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681',
|
|
|
img: '//img10.static.yhbimg.com/yhb-img01/2016/07/29/17/01cfa4035101b5c8f46efd9c0fbf8ef0c8.jpg',
|
|
|
id: '优惠券',
|
|
|
got: true
|
|
|
},
|
|
|
{
|
|
|
url: 'http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681',
|
|
|
img: '//img10.static.yhbimg.com/yhb-img01/2016/07/29/17/01cfa4035101b5c8f46efd9c0fbf8ef0c8.jpg',
|
|
|
id: '优惠券',
|
|
|
empty: true
|
|
|
},
|
|
|
{
|
|
|
url: 'http://www.yohobuy.com/coupon/index?contentCode=bb7268bd46dd46d304c2917309814681',
|
|
|
img: '//img10.static.yhbimg.com/yhb-img01/2016/07/29/17/01cfa4035101b5c8f46efd9c0fbf8ef0c8.jpg',
|
|
|
id: '优惠券',
|
|
|
normal: true
|
|
|
}
|
|
|
],
|
|
|
activityItem: [
|
|
|
{
|
|
|
imgUrl: '//img11.static.yhbimg.com/yhb-img01/2016/06/01/20/01a88a4e626a954eb5ec0302a0470e0b3f.jpg?' +
|
|
|
'imageView2/2/w/1920/h/450/q/70/q/70'
|
|
|
},
|
|
|
{
|
|
|
imgUrl: '//img11.static.yhbimg.com/yhb-img01/2016/06/01/20/01a88a4e626a954eb5ec0302a0470e0b3f.jpg?' +
|
|
|
'imageView2/2/w/1920/h/450/q/70/q/70'
|
|
|
},
|
|
|
{
|
|
|
imgUrl: '//img11.static.yhbimg.com/yhb-img01/2016/06/01/20/01a88a4e626a954eb5ec0302a0470e0b3f.jpg?' +
|
|
|
'imageView2/2/w/1920/h/450/q/70/q/70'
|
|
|
}
|
|
|
],
|
|
|
identityItem: {
|
|
|
sendCoin: 10,
|
|
|
stuNum: [1, 2, 3, 4, 5, 6, 7]
|
|
|
},
|
|
|
verifyRusult: {
|
|
|
status: true,
|
|
|
rank: 20
|
|
|
}
|
|
|
};
|
|
|
return respData;
|
|
|
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* 获取学校地区数据
|
|
|
* @return Object 接口数据
|
|
|
*/
|
...
|
...
|
@@ -286,7 +130,7 @@ exports.getEduLevel = () => { |
|
|
* @return Object 接口数据
|
|
|
*/
|
|
|
exports.verifyIdentity = (uid, params) => {
|
|
|
let pageUrl = 'http://localhost:6002/product/students?' +
|
|
|
let pageUrl = helpers.formatUrl('/product/students?') +
|
|
|
queryString.stringify({collegeName: params.collegeName,
|
|
|
educationDegree: params.educationDegree, enrollmentYear: params.enrollmentYear});
|
|
|
|
...
|
...
|
|