Authored by 郭成尧

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

... ... @@ -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,
... ...
... ... @@ -39,6 +39,9 @@ const dist = {
font: `${distRoot}/assets/font`
};
// webpack 内嵌的样式中的雪碧图,写文件的时候会有冲突,这边使用单实例
let postcssSprites;
/**
* postcss plugins for both dev and pro
* @parem et Symbol
... ... @@ -93,9 +96,12 @@ const postcssPlugin = (et) => {
});
}
if (!postcssSprites) {
postcssSprites = require('postcss-sprites').default(sprites);
}
plugins = [
require('precss'),
require('postcss-sprites').default(sprites),
postcssSprites,
require('postcss-assets')(assets),
require('postcss-calc'),
require('postcss-pxtorem')({
... ...
... ... @@ -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;
... ...
... ... @@ -7,3 +7,8 @@
color: #b0b0b0;
}
}
.return select {
background: transparent;
border: 0;
}
... ...
<template>
<div class="upload">
<form v-el:form v-on:change="upload">
<input id="{{inputId}}" type="file" name="filename">
<input id="{{inputId}}" type="file" name="filename" accept="image/*">
</form>
</div>
</template>
<script>
const yoho = require('yoho');
const $ = require('jquery');
const modal = require('common/modal');
const tip = require('common/tip');
module.exports = {
props: ['imageList', 'bucket'],
... ... @@ -21,6 +24,7 @@
const formData = new FormData(this.$els.form);
formData.append('bucket', this.bucket || '');
yoho.showLoading(true)
$.ajax({
method: 'POST',
url: '/api/upload/image',
... ... @@ -37,7 +41,21 @@
} else {
modal.alert(res.message);
}
});
})
.fail((jqXhr, textStatus, errorThrow)=> {
let message;
switch (jqXhr.status) {
case 413:
message = '图片太大了~';
break;
default:
message = '上传出错~'
}
tip(message);
})
.always(()=>yoho.showLoading(false));
}
}
};
... ...
<template>
<div class="return">
<div class="return return-exchange">
<product-list :list="goodsArr" :data="exchangeData" type="exchange">
</product-list>
<!--换货信息-->
... ...
<template>
<div class="refund">
<div class="return return-refund">
<product-list :list="list" :data="refundData" type="refund"></product-list>
<div class="return-amount">
<!-- TODO:退货信息优化为组件 -->
... ... @@ -184,7 +184,7 @@
background: #f6f6f6;
}
.refund {
.return-refund {
.return-amount {
margin: 30px 0;
padding: 0 30px;
... ...
... ... @@ -81,7 +81,7 @@
page: nextPage
}, this.filter, locationQuery))
.done(res => {
if (res.code === 200) {
if (res.data) {
self.page = res.data.page;
self.totalPage = res.data.pageTotal;
self.$set('productList', self.productList.concat(res.data.productList));
... ...