Authored by 郭成尧

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

... ... @@ -46,7 +46,7 @@ const component = {
page: 'help',
noLocalJS: true,
noLocalCSS: true
}
};
data['helpDetail_' + caption] = true;
res.render('helpDetail', data);
... ...
... ... @@ -79,7 +79,7 @@ const component = {
return res.json(data);
}).catch(next);
},
service: (req, res, next) => {
service: (req, res) => {
res.redirect('http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094');
},
help: (req, res, next) => {
... ...
... ... @@ -51,7 +51,7 @@ const refund = {
const expressId = req.body.expressId;
const expressNumber = req.body.expressNumber;
refundModel.Setexpress(applyid, uid, expressCompany, expressId, expressNumber).then(data => {
refundModel.setexpress(applyid, uid, expressCompany, expressId, expressNumber).then(data => {
return res.json(data);
}).catch(next);
},
... ... @@ -96,6 +96,7 @@ const refund = {
page: 'return'
});
},
/**
* 获取退换货订单
* @param req
... ...
'use strict';
const api = global.yoho.API;
const helpers = global.yoho.helpers;
/**
* 处理用户收藏的商品数据
... ...
... ... @@ -32,7 +32,7 @@ const refund = {
code: 200
});
},
Setexpress(applyid, uid, expressCompany, expressNumber, expressId) {
setexpress(applyid, uid, expressCompany, expressNumber, expressId) {
return api.get('', {
method: 'app.refund.setexpress',
id: applyid,
... ... @@ -60,6 +60,7 @@ const refund = {
code: 200
}).then(global.yoho.camelCase);
},
/**
* 获取退换货列表
* @param param
... ...
... ... @@ -33,7 +33,7 @@ router.get('/me/mycurrency', order.coin); // yoho币
router.get('/me/coin-detail', order.getCoinDetail); // ajax yoho币明细
router.get('/me/service', home.service); // 在线客服
//router.get('/help', home.help); // 帮助中心列表页
// router.get('/help', home.help); // 帮助中心列表页
router.get('/help', help.index); // 帮助中心列表页(写死的内容)
router.get('/help-detail', help.helpDetail); // 帮助中心详情页(写死的内容)
router.get('/me/feedback', home.feedback); // 个人中心-意见反馈
... ...
<div class="my-page">
<div class="my-header">
<span class="setting icon icon-setting" id="setting"></span>
<a class="user-info" id="user-info" href='/me/mydetails'>
<a class="user-info auth" id="user-info" href='/me/mydetails'>
<span class="user-avatar" {{#if head_ico}} style="background-image: url('{{head_ico}}');" {{/if}}></span>
<span class="username">{{nickname}}</span>
</a>
</div>
<div class="my-order">
<a class="order-title" href="/me/order?type=1">
<a class="order-title auth" href="/me/order?type=1">
我的订单
<span class="read-order">
查看全部订单 <span class="icon icon-right"></span>
</span>
</a>
<div class="order-type clearfix">
<a class="type-item" href="/me/order?type=2">
<a class="type-item auth" href="/me/order?type=2">
<span class="icon icon-wait-pay"></span>
<br>待付款
{{#if wait_pay_num}}
<span class="num">{{wait_pay_num}}</span>
{{/if}}
</a>
<a class="type-item" href="/me/order?type=3">
<a class="type-item auth" href="/me/order?type=3">
<span class="icon icon-wait-cargo"></span>
<br>待发货
{{#if wait_cargo_num}}
<span class="num">{{wait_cargo_num}}</span>
{{/if}}
</a>
<a class="type-item" href="/me/order?type=4">
<a class="type-item auth" href="/me/order?type=4">
<span class="icon icon-send-cargo"></span>
<br>待收货
{{#if send_cargo_num}}
<span class="num">{{send_cargo_num}}</span>
{{/if}}
</a>
<a class="type-item" href="/me/return">
<a class="type-item auth" href="/me/return">
<span class="icon icon-refund-exchange"></span>
<br>退换货
{{#if refund_exchange_num}}
... ... @@ -45,23 +45,23 @@
</div>
</div>
<div class="group-list">
<a class="list-item" id="address">
<a class="list-item auth" id="address">
地址管理
<span class="num">{{address_num}} <span class="icon icon-right"></span></span>
</a>
</div>
<div class="group-list">
<a class="list-item" href="/me/collection">
<a class="list-item auth" href="/me/collection">
收藏的商品
<span class="num">{{product_favorite_total}} <span class="icon icon-right"></span></span>
</a>
<a class="list-item" href="/me/collection?tab=brand">
<a class="list-item auth" href="/me/collection?tab=brand">
收藏的品牌
<span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span>
</a>
</div>
<div class="group-list">
<a class="list-item" href="/me/mycurrency">
<a class="list-item auth" href="/me/mycurrency">
YOHO 币
<span class="num">{{yoho_coin_num}} <span class="icon icon-right"></span></span>
</a>
... ...
... ... @@ -94,9 +94,6 @@ const postcssPlugin = (et) => {
}
plugins = [
require('autoprefixer')({
browsers: ['> 1%']
}),
require('precss'),
require('postcss-sprites').default(sprites),
require('postcss-assets')(assets),
... ... @@ -108,6 +105,9 @@ const postcssPlugin = (et) => {
selectorBlackList: [], // 选择器黑名单,可以使用正则
propWhiteList: [] // 属性名称为空,表示替换所有属性的值
}),
require('autoprefixer')({
browsers: ['> 1%']
}),
// 可选
require('postcss-use')({
... ...
... ... @@ -2,6 +2,7 @@ const Vue = require('vue');
const infiniteScroll = require('vue-infinite-scroll');
const favBrandList = require('me/fav-brand-list.vue');
const VueTouch = require('vue-touch');
require('common/vue-filter');
Vue.use(VueTouch);
... ...
... ... @@ -2,6 +2,7 @@ const Vue = require('vue');
const infiniteScroll = require('vue-infinite-scroll');
const favProductList = require('me/fav-product-list.vue');
const VueTouch = require('vue-touch');
require('common/vue-filter');
Vue.use(VueTouch);
... ...
... ... @@ -2,8 +2,8 @@ var yoho = require('yoho');
var $ = require('jquery');
if (!yoho.isLogin) {
$('a').addClass('no-intercept');
$('a').on('click', function() {
$('.auth').addClass('no-intercept');
$('.auth').on('click', function() {
yoho.goLogin();
return false;
});
... ...
const Vue = require('vue');
const Status = require('me/refund/status.vue');
require('common/vue-filter');
new Vue({
... ...
... ... @@ -78,6 +78,13 @@
background: transparent;
border: 1px solid #ffffff;
height: 100%;
flex-direction: row-reverse;
}
.birthday::-webkit-inner-spin-button,
.birthday::-webkit-calendar-picker-indicator {
display: none;
-webkit-appearance: none;
}
}
}
... ...
... ... @@ -9,13 +9,13 @@
.my-header {
background: resolve("me/header-bg.png");
background-size: cover;
}
.setting {
float: left;
margin-top: 80px;
margin-left: 15px;
font-size: 46px;
}
.setting {
float: left;
margin-top: 40px;
margin-left: 15px;
font-size: 46px;
}
.user-info {
... ... @@ -162,3 +162,9 @@
}
}
}
.app.ios {
.setting {
margin-top: 80px;
}
}
... ...
... ... @@ -170,7 +170,7 @@
* @author: Aiden Xu<aiden.xu@yoho.cn>
* @date: 2016/07/20
*/
const $ = require('jquery');
const tip = require('common/tip');
const Overlay = require('common/overlay');
... ...
... ... @@ -65,14 +65,18 @@
tab: 'brand'
}
}).then(data => {
if (data.pageTotal && _this.page === data.pageTotal) {
if ($.isEmptyObject(data)) {
_this.busy = true;
} else {
_this.busy = false;
}
if (data.pageTotal && _this.page === data.pageTotal) {
_this.busy = true;
} else {
_this.busy = false;
}
const list = data.brandList || [];
if (data.brandList) {
data.brandList.forEach(function(o){
list.forEach(function(o) {
if (!_this.keys[o.brandId]) {
_this.keys[o.brandId] = true;
... ... @@ -160,20 +164,20 @@
let moveX = event.targetTouches[0].pageX;
let X = moveX - this.pageX;
if (this.pandata.objX == 0) {
if (this.pandata.objX === 0) {
if (X >= 0) {
this.currentX = 0;
} else {
this.currentX = -Math.min(Math.abs(X), width);
}
li.css('transform', "translateX(" + this.currentX + "px)");
li.css('transform', 'translateX(' + this.currentX + 'px)');
} else if (this.pandata.objX < 0) {
if (X >= 0) {
this.currentX = Math.min(Math.abs(X) - width, 0);
} else {
this.currentX = -width;
}
li.css('transform', "translateX(" + this.currentX + "px)");
li.css('transform', 'translateX(' + this.currentX + 'px)');
}
},
panend: function(id) {
... ... @@ -192,7 +196,7 @@
} else {
this.pandata.objX = -width;
}
li.css('transform',"translateX(" + this.pandata.objX + "px)");
li.css('transform', 'translateX(' + this.pandata.objX + 'px)');
}
},
created: function() {
... ...
... ... @@ -69,14 +69,18 @@
page: ++_this.page
}
}).then(data => {
if (data.pageTotal && _this.page === data.pageTotal) {
if ($.isEmptyObject(data)) {
_this.busy = true;
} else {
_this.busy = false;
}
if (_this.page === data.pageTotal) {
_this.busy = true;
} else {
_this.busy = false;
}
const list = data.productList || [];
if (data.productList) {
data.productList.forEach(function(o){
list.forEach(function(o) {
if (!o.productSkn) {
return;
}
... ... @@ -177,20 +181,20 @@
let moveX = event.targetTouches[0].pageX;
let X = moveX - this.pageX;
if (this.pandata.objX == 0) {
if (this.pandata.objX === 0) {
if (X >= 0) {
this.currentX = 0;
} else {
this.currentX = -Math.min(Math.abs(X), width);
}
li.css('transform', "translateX(" + this.currentX + "px)");
li.css('transform', 'translateX(' + this.currentX + 'px)');
} else if (this.pandata.objX < 0) {
if (X >= 0) {
this.currentX = Math.min(Math.abs(X) - width, 0);
} else {
this.currentX = -width;
}
li.css('transform', "translateX(" + this.currentX + "px)");
li.css('transform', 'translateX(' + this.currentX + 'px)');
}
},
panend: function(id) {
... ... @@ -209,7 +213,7 @@
} else {
this.pandata.objX = -width;
}
li.css('transform',"translateX(" + this.pandata.objX + "px)");
li.css('transform', 'translateX(' + this.pandata.objX + 'px)');
}
},
created: function() {
... ...
... ... @@ -23,7 +23,6 @@
<label>生日
<span class="details-birthday">
<input class="birthday" type="date" v-model='birthday' @change="setBirthday" required></input>
<span class="icon icon-right"></span>
</span>
</label>
</li>
... ... @@ -35,11 +34,11 @@
const yoho = require('yoho');
const tip = require('common/tip');
const genderSel = require('common/select')([{
key:'1',
val:'MEN'
key: '1',
val: 'MEN'
}, {
key:'2',
val:'WOMEN'
key: '2',
val: 'WOMEN'
}]);
module.exports = {
... ... @@ -67,7 +66,7 @@
nickname: _this.nickname,
gender: item.key
});
})
});
},
setBirthday: function() {
this.saveDetails({
... ... @@ -81,7 +80,7 @@
url: '/me/save-mydetails',
data: params
}).then(result => {
if (result.code !== 200) {
if (result.code !== 200) {
tip(result.message || '设置失败');
}
}).fail(() => {
... ...
... ... @@ -101,7 +101,7 @@
val: '在线客服'
}
]);
if (this.order.status == 0) {
if (Number(this.order.status) === 0) {
this.getCancelReason();
}
} else {
... ... @@ -111,7 +111,7 @@
tip('网络错误');
});
},
reasonChange(){
reasonChange() {
this.orderDetail().cancel({
orderCode: this.order.orderCode,
reasonId: this.selected.id
... ... @@ -162,7 +162,7 @@
});
};
},
cancelOrder(code) {
cancelOrder() {
let _that = this;
Modal.confirm('订单取消后不能恢复,确认取消订单吗?', '', function() {
... ... @@ -211,20 +211,20 @@
yohoAPI.goPay({orderid: code});
},
seeExpress(code) {
location.href = '/me/logistic?order_code='+code;
location.href = '/me/logistic?order_code=' + code;
},
/**
* 申请售后
*/
applyRefund(code) {
applyRefund() {
genderSel.show(function(item) {
console.log(item);
return;
return; // todo
location.href = item.url;
});
},
dropDown(elementId){
dropDown(elementId) {
let dropdown = document.getElementById(elementId);
try {
this.showDropdown(dropdown);
... ... @@ -233,9 +233,9 @@
}
return false;
},
showDropdown(element) {
let event;
event = document.createEvent('MouseEvents');
event.initMouseEvent('mousedown', true, true, window);
element.dispatchEvent(event);
... ... @@ -245,4 +245,4 @@
</script>
<style>
@import "../../scss/me/_order-detail.css";
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -40,12 +40,9 @@
</template>
<script>
'use strict';
const $ = require('jquery');
const tip = require('common/tip');
//const Modal = require('common/modal');
module.exports = {
data() {
return {
... ... @@ -92,7 +89,7 @@
*/
cancelApply(id, type) {
$.ajax({
url: '/me/'+(type == 2 ? 'exchange' : 'refund')+'/cancel-apply',
url: '/me/' + (Number(type) === 2 ? 'exchange' : 'refund') + '/cancel-apply',
type: 'post',
data: {
id: id
... ... @@ -118,4 +115,4 @@
@import "../../scss/me/_order.css";
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -108,6 +108,7 @@
<script>
const $ = require('jquery');
const util = require('common/util');
const tip = require('common/tip');
const yoho = require('yoho');
module.exports = {
... ... @@ -119,13 +120,12 @@
};
},
methods: {
cancel: function(){
cancel: function() {
if (!this.detail || !this.orderCode) {
return false;
}
let _this = this;
let url = ''
let url = '';
if (this.type === 'refund') {
url = '/me/refund/cancel-apply';
... ... @@ -141,8 +141,9 @@
}
}).then(function(data) {
if (data.code === 200) {
const pageurl = '/me/return';
if (yoho.isApp) {
const url = '/me/return';
yoho.goNewPage({
header: {
headerid: '1',
... ... @@ -154,10 +155,10 @@
action: ''
}
},
url: location.origin + url
url: location.origin + pageurl
});
} else {
location.href = url;
location.href = pageurl;
}
} else if (data.code === 400) {
tip(data.message);
... ... @@ -189,9 +190,9 @@
_this.orderCode = _this.detail.orderCode;
}
_this.detail.goodsList.forEach(function(d){
d.evidenceImages = d.evidenceImages.map(function(p){
return util.getImgHost(p) + '?imageView2/2/w/154/h/154'
_this.detail.goodsList.forEach(function(d) {
d.evidenceImages = d.evidenceImages.map(function(p) {
return util.getImgHost(p) + '?imageView2/2/w/154/h/154';
})
});
}
... ...