Authored by 陈轩

Merge remote-tracking branch 'origin/develop' 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;
... ...
... ... @@ -42,7 +42,6 @@
.sidebar {
position: fixed;
width: 100%;
margin-top: 40px;
background: $white;
overflow-x: hidden;
... ... @@ -63,7 +62,7 @@
bottom: -1px;
width: 100%;
height: 0;
border-top: 1px solid #eee;
border-top: 2PX solid #eee;
}
&:last-child:after {
... ... @@ -79,4 +78,10 @@
border-bottom: 1px solid #eee;
}
}
.app.ios {
.sidebar {
margin-top: 40px;
}
}
</style>
... ...
... ... @@ -15,7 +15,7 @@
<div class="bottom clearfix">
<span class="icon time-icon">&#xe612;</span>
<span class="time">{{editorial.publishTime}}</span>
<span class="icon icon-share share" @click="share(editorial.title, editorial.intro, editorial.src, editorial.share.url)"></span>
<span class="icon icon-share share" @click="share(editorial.title, editorial.intro, editorial.src, editorial.id)"></span>
</div>
</div>
</div>
... ... @@ -126,7 +126,7 @@
title: title,
des: des,
img: img,
url: url
url: `//m.yohoblk.com/editorial/${id}.html`
});
}
},
... ...
... ... @@ -94,7 +94,8 @@
yoho.goShare({
title: this.article.articleTitle,
des: '优质精选,BLK潮流资讯为你呈现',
img: util.getImgUrl(this.article.coverImage, 300, 300, 2)
img: util.getImgUrl(this.article.coverImage, 300, 300, 2),
url: `//m.yohoblk.com/editorial/${this.article.id}.html`
});
}
},
... ...
... ... @@ -43,17 +43,17 @@
</ul>
</div>
<div class="order-button" v-show="order.status != 1 && order.status != 2 && order.status != 3">
<button v-if="order.isCancel === 'Y'" @click="deleteOrder(order,index)" class="normal">删除订单</button>
<button v-if="order.isCancel === 'Y'" @click="deleteOrder(order.orderCode)" class="normal">删除订单</button>
<template v-else>
<button v-if="order.status == 0" @click="cancelOrder(order.orderCode)">取消订单</button>
<button v-if="order.status == 0 " class="countdown" @click="goBuy(order.orderCode)">去支付 <span v-count-down v-bind:left-time="order.payLefttime" v-bind:callback="autoCancel(order.orderCode)"></span></button>
<button v-if="order.status == 0 " class="countdown" @click="goBuy(order)">去支付 <span v-count-down v-bind:left-time="order.payLefttime" v-bind:callback="autoCancel(order.orderCode)"></span></button>
<a v-if="order.status === 4 || order.status === 5 " href="/me/logistic?order_code={{order.orderCode}}">查看物流</a>
<button v-if="order.status == 4 || order.status == 5 " class="black" @click="confirmGoods(order.orderCode)">确认收货</button>
<button v-if="order.status == 6" @click="deleteOrder(order,index)" class="normal">删除订单</button>
<button v-if="order.status == 6" @click="deleteOrder(order.orderCode)" class="normal">删除订单</button>
<button v-if="order.isSupportRefund == 'Y' || order.isSupportExchange == 'Y'" class="normal" @click="applyRefund()">申请售后</button>
</template>
</div>
<select id="cancel-reason" class="cancel-reason" v-on:blur="reasonChange" v-model="selected">
<select id="cancel-reason" class="cancel-reason" v-on:blur="reasonChange" v-on:change="reasonChange" v-model="selected">
<option v-for="option in options" v-bind:value="{id:option.id,reason:option.reason}">{{option.reason}}</option>
</select>
</template>
... ... @@ -74,7 +74,8 @@
show: false,
order: {},
options: [],
selected: {}
selected: {},
cancelbusy: false
};
},
created() {
... ... @@ -123,6 +124,11 @@
});
},
reasonChange() {
if (this.cancelbusy) {
return false;
}
this.cancelbusy = true;
this.orderDetail().cancel({
orderCode: this.order.orderCode,
reasonId: this.selected.id || this.options[0].id,
... ... @@ -133,6 +139,7 @@
} else if (result.code !== 500) {
tip(result.message);
}
this.cancelbusy = false;
}, () => {
tip('操作失败');
});
... ... @@ -191,7 +198,7 @@
}
}).then(result => {
if (result.code === 200) {
interceptClick.intercept('/me/order?type=1');
yohoAPI.goBack(true);
return false;
} else if (result.code !== 500) {
tip(result.message);
... ... @@ -218,8 +225,11 @@
tip('操作失败');
});
},
goBuy(code) {
yohoAPI.goPay({orderid: code});
goBuy(order) {
yohoAPI.goPay({
orderid: order.orderCode,
amount: order.amount
});
},
applyRefund() {
genderSel.show(item => {
... ...
... ... @@ -34,7 +34,7 @@
<button v-if="order.isCancel === 'Y'" @click="deleteOrder(order,index)" class="normal">删除订单</button>
<template v-else>
<button v-if="order.status === 0" @click="cancelOrder(order.orderCode)">取消订单</button>
<button v-if="order.status === 0 " class="countdown" @click="goBuy(order.orderCode)">去支付
<button v-if="order.status === 0 " class="countdown" @click="goBuy(order)">去支付
<span v-count-down v-bind:left-time="order.payLefttime" v-bind:callback="autoCancel(order.orderCode)"></span>
</button>
<a v-if="order.status === 4 || order.status === 5 "
... ... @@ -53,7 +53,7 @@
<p>Your do not have an order <br>for the time being</p>
<a href="/product/new">随便逛逛</a>
</div>
<select id="cancel-reason" class="cancel-reason" v-on:blur="reasonChange" v-model="selected">
<select id="cancel-reason" class="cancel-reason" v-on:blur="reasonChange" v-on:change="reasonChange" v-model="selected">
<option v-for="option in options" v-bind:value="{id:option.id,reason:option.reason}">{{option.reason}}</option>
</select>
</template>
... ... @@ -78,7 +78,8 @@
emptybox: 'hide',
selected: {},
options: [],
currentCode: ''
currentCode: '',
cancelbusy: false
};
},
... ... @@ -115,6 +116,11 @@
});
},
reasonChange() {
if (this.cancelbusy) {
return false;
}
this.cancelbusy = true;
this.order().cancel({
orderCode: this.currentCode,
reasonId: this.selected.id || this.options[0].id,
... ... @@ -125,6 +131,7 @@
} else if (result.code !== 500) {
tip(result.message);
}
this.cancelbusy = false;
}, () => {
tip('操作失败');
});
... ... @@ -215,8 +222,11 @@
tip('操作失败');
});
},
goBuy(code) {
yohoAPI.goPay({orderid: code});
goBuy(order) {
yohoAPI.goPay({
orderid: order.orderCode,
amount: order.amount
});
},
dropDown(elementId){
let dropdown = document.getElementById(elementId);
... ...
... ... @@ -58,7 +58,7 @@
if (res.code !== 200) {
tip(res.message || '网络错误');
} else {
yoho.goBack();
yoho.goBack(true);
}
});
return false;
... ...