Authored by 沈志敏

feedback

... ... @@ -114,12 +114,11 @@ const component = {
res.render('feedback', {
module: 'me',
page: 'feedback',
suggestSub: true,
noLocalCSS: true
});
},
saveFeedback: (req, res, next) => {
let saveFeedbackPara = {
const saveFeedbackPara = {
uid: req.user.uid,
udid: req.sessionID,
content: req.body.content,
... ...
... ... @@ -139,7 +139,7 @@ exports.getHelpDetail = (data) => {
* @param data
*/
exports.saveFeedback = (data) => {
return serviceAPI.post('/suggest/api/v1/suggest/saveSuggest', data).then(result => {
return serviceAPI.post('suggest/api/v1/suggest/saveSuggest', data).then(result => {
return {
code: result.code,
message: result.message
... ...
<div class="yoho-suggest-sub-page yoho-page">
{{# suggestSub}}
<div class="suggest-sub-form">
<textarea name="" id="suggest-textarea" placeholder="请写下对于BLK的意见和建议,我们将及时根据您的意见作出改进"></textarea>
</div>
{{/ suggestSub}}
</div>
<style>
html,
... ...
... ... @@ -23,7 +23,9 @@ function tip(param) {
};
if (typeof param === 'string') {
$.extend(viewData, { txt: param });
$.extend(viewData, {
txt: param
});
} else {
$.extend(viewData, param);
}
... ...
... ... @@ -19,6 +19,7 @@ $(() => {
return;
}
$('#suggest-textarea').blur();
$.ajax({
type: 'post',
url: '/me/save-feedback',
... ... @@ -28,6 +29,9 @@ $(() => {
}).then(function(data) {
if (data.code === 200) {
tip('提交成功');
setTimeout(() => {
yoho.goBack();
}, 2000)
} else {
tip('提交失败~');
}
... ...
... ... @@ -19,7 +19,7 @@
max-height: 255px;
min-height: 255px;
padding: 30px;
font-size: 26px;
font-size: 30px;
line-height: 48px;
color: #000;
display: block;
... ...