Authored by 周少峰

Merge branch 'hotfix/stuAndNginx'

/**
* 意见反馈 controller
* @return jsonp
* @author: gxh<xuhui.ge@yoho.cn>
* @date: 2017/04/06
*/
'use strict';
const suggestFeedBackModel = require('../models/suggestFeedBack');
const _ = require('lodash');
const getFeedBack = (req, res, next) => {
let feedbackId = req.query.feedback_id || 0;
let questionId = req.query.question_id || 0;
let answer = _.trim(req.query.answer) || '';
let solution = req.query.solution || 0;
if (!feedbackId || !questionId || !answer || !solution) {
suggestFeedBackModel.feedBackApi(feedbackId, questionId, answer, solution).then((result) => {
return res.jsonp({
code: 200,
data: result.data,
message: 'success'
});
}).catch(next);
} else {
return res.status(403).send({
message: '意见反馈失败'
});
}
};
module.exports = {
getFeedBack
};
... ...
/**
* suggestFeedBack model
* @author: gxh<xuhui.ge@yoho.cn>
* @date: 2017/04/06
*/
'use strict';
const api = global.yoho.API;
const config = global.yoho.config;
/**
* 获取用户信息
* @param uid
* @return string
*/
const feedBackApi = (feedbackId, questionId, answer, solution) => {
let params = {
method: 'open.feedback.submit',
feedback_id: feedbackId,
question_id: questionId,
answer: answer,
solution: solution
};
return api.get('', params, config.apiCache);
};
module.exports = {
feedBackApi
};
... ...
... ... @@ -17,6 +17,7 @@ const uploadCtrl = require(`${cRoot}/upload`);
const erp2goods = require(`${cRoot}/erp2goods`);
const getBanner = require(`${cRoot}/getBanner`);
const passport = require(`${cRoot}/passport`);
const suggestFeedBack = require(`${cRoot}/suggestFeedBack`);
router.get('/recentReview', rvCtrl.index); // 最近浏览
router.post('/getRecommend', rvCtrl.getRecommend); // 为你优选
... ... @@ -29,6 +30,8 @@ router.get('/getbanner', getBanner.index);
router.get('/passport', passport.index);
router.get('/suggestfeedback', suggestFeedBack.getFeedBack);
module.exports = router;
... ...
... ... @@ -68,5 +68,19 @@ module.exports = [
'www'
);
}
},
// erp2good
{
type: TYPE.rewrite,
origin: (req) => {
console.log(req.path);
return req.path === '/erp2goods'
},
target: '/common/erp2goods'
},
{
type: TYPE.redirect,
origin: '/index.html',
target: helpers.urlFormat('/')
}
];
... ...
{
"name": "yohobuy-node",
"version": "5.5.18",
"version": "5.5.23",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
<div class="content">
<div class="group">
<h3 class="dia-title">认证资格说明</h3>
<p>1、全日制大学本科、研究生、博士;</p>
<p>2、学校在可选范围之内,可能有部分学校暂未被收录,后期会尽快添加;</p>
<p>3、每个学号只能认证一个有货账户;</p>
</div>
<div class="group">
<h3 class="dia-title">特权详细说明</h3>
<p><span class="font-bold">权益一:</span>认证立赠100有货币</p>
<p>认证成功,立即赠送100有货币。</p>
<p><span class="font-bold">权益二:</span>新品立享9折</p>
<p>学生购买指定原价新品时,可立即享受9折优惠,此折扣与VIP折扣不可同时享受。</p>
<p><span class="font-bold">权益三:</span>每1元返1个有货币</p>
<p>1、学生购买指定商品时,每1元返1个有货币(以商品的实际成交金额计算);</p>
<p>2、有货币返还时间:确认收货7日后,系统自动将对应数量的有货币返还至购买账户;</p>
<p>3、有货币有效期:获得当日至次年12月31日,逾期自动作废;</p>
<p>4、查看有货币:登录后,点击“个人中心”在“我的有货币”中可以查看有货币余额及明细。</p>
<p><span class="font-bold">权益四:</span>分期付款</p>
<p>开通有货分期后,可享受部分商品30天延后付款,最长6个月的分期付款,开启任性购物模式。</p>
</div>
</div>
... ...
... ... @@ -9,6 +9,8 @@ var $ = require('yoho-jquery'),
var Dialog = require('../common/dialog').Dialog;
var authProtocolTpl = require('hbs/product/students/auth-protocol.hbs');
var $sortItem = $('.sort-item'),
$agreenShow = $('#agreen-show'),
$stuProv = $('#stu-province-show'),
... ... @@ -438,12 +440,7 @@ $('.ident-select-wrap > .arrow-down').click(function() {
});
$couponDia.on('click', function() {
var cont = '<h3 class="dia-title">认证协议</h3>' +
'<p>(1) 全日制大学生及硕士博士研究生;</p>' +
'<p>(2) 学校在可选的范围内,有部分学校可能暂未收录,后期尽快增加;</p>' +
'<p>(3) 每个学号只能认证一个账户;</p>';
createStuDialog('stu-agree-dialog', cont);
createStuDialog('stu-agree-dialog', authProtocolTpl({}));
});
$rightsItem.each(function(index, ele) {
... ... @@ -451,7 +448,7 @@ $rightsItem.each(function(index, ele) {
detail = $(ele).find('.item-detail').html(),
i = Number(index) + 1;
rightsText += '<p>权益' + i + ':' + title + '</p><p>' + detail + '</p>';
rightsText += '<p><span class="font-bold">权益' + i + ':</span>' + title + '</p><p>' + detail + '</p>';
i !== $rightsItem.length ? rightsText += '<br>' : '';
});
... ...
... ... @@ -7,8 +7,8 @@
width: 171px;
height: 40px;
display: inline-block;
background-image: url(../img/sprite.3party.png);
background-position: 0 0;
background-image: resolve(header/logo.png);
background-position: 0px 0px;
vertical-align: middle;
margin-right: 10px;
}
... ...
... ... @@ -7,8 +7,8 @@
width: 171px;
height: 40px;
display: inline-block;
background-image: url(../img/sprite0.3party.png);
background-position: 0 0;
background-image: resolve(header/logo.png);
background-position: 0px 0px;
vertical-align: middle;
margin-right: 10px;
}
... ...
... ... @@ -543,6 +543,10 @@
.content {
text-align: left;
margin: 10px;
width: inherit;
height: 400px;
overflow: hidden;
overflow-y: scroll;
}
.dia-title {
... ... @@ -557,16 +561,19 @@
p {
line-height: 35px;
font-size: 14px;
}
.font-bold {
font-weight: bold;
}
}
.stu-rights-dialog {
width: 600px;
width: 570px;
}
.stu-agree-dialog {
width: 500px;
width: 600px;
}
.stu-alert .content p {
... ...