Authored by 沈志敏

退换货物流信息

... ... @@ -2,11 +2,12 @@
* 收藏商品、品牌
* @type {Object}
*/
'use strict';
const favModel = require('../models/favorite');
const helpers = global.yoho.helpers;
const fav = {
favorite: (req, res, next) => {
favorite: (req, res) => {
if (req.query.tab === 'brand') {
res.render('favorite-brand', {
module: 'home',
... ... @@ -97,7 +98,7 @@ const fav = {
const type = req.body.type;
favModel.favoriteDelete(uid, favId, type).then(data => {
return res.json(data);
});
}).catch(next);
}
}
... ...
... ... @@ -15,6 +15,12 @@ const refund = {
refundModel.getOrderData(uid, orderId).then(result => {
res.json(result);
}).catch(next);
},
logistics(req, res) {
res.render('logistics', {
module: 'home',
page: 'logistics'
});
}
};
... ...
... ... @@ -2,7 +2,6 @@
const api = global.yoho.API;
const serviceAPI = global.yoho.ServiceAPI;
const Promise = require('bluebird');
const co = Promise.coroutine;
const _ = require('lodash');
const helpers = global.yoho.helpers;
... ... @@ -76,63 +75,6 @@ exports.getUserHomeData = (uid) => {
};
/**
* 处理用户收藏的商品数据
*
* @param int uid 用户ID
* @param int page 第几页
* @param int limit 限制读取的数目,默认10
* @return array 处理之后的收藏的商品数据
*/
exports.getFavProductData = (uid, page, limit) => {
return api.get('', {
method: 'app.favorite.product',
uid: uid,
page: page,
limit: limit
}).then(result => {
return result.data;
});
};
/**
* 处理用户收藏的品牌数据
*
* @param int uid 用户ID
* @param string gender 性别 1,3表示男,2,3表示女,1,2,3表示全部
* @param int page 第几页
* @param int limit 限制读取的数目
* @return array 处理之后的收藏的品牌数据
*/
exports.getFavBrandData = (uid, gender, page, limit) => {
return api.get('', {
method: 'app.favorite.brand',
uid: uid,
gender: gender,
page: page,
limit: limit
}).then(result => {
return result.data;
})
}
/**
* 取消收藏的商品/品牌数据
*
* @param int uid 用户ID
* @param int favId 要取消的收藏id
* @param string type 取消类型(brand:品牌,product:商品)
* @return array 接口返回的数据
*/
exports.favoriteDelete = (uid, favId, type) => {
return api.get('', {
method: 'app.favorite.cancel',
uid: uid,
type: type,
fav_id: favId
});
}
/**
* 帮助中心列表页
*
* @param data
... ...
... ... @@ -31,6 +31,8 @@ router.post('/favorite/favdel', favorite.favdel); // 个人中心 - 收藏商品
router.get('/refund', refund.refund);
router.get('/refund/order', refund.order);
router.get('/refund/logistics', refund.logistics); // 退换货 - 商品寄回信息
router.get('/about-us', home.aboutUs); // 个人中心 - 关于我们
... ...
<div class="logistics-page">
<div class="edit-logistics-page">
<form class="edit-logistics">
<label class="company">
选择快递公司
<input type="text" name="company" value="{{company}}" readonly>
<span class="icon icon-right"></span>
</label>
<label class="num">
快递单号
<input type="text" name="num" value="{{num}}">
</label>
</form>
<div class="submit">确认</div>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@
@import "about-us";
@import "order";
@import "coin";
@import "logistics";
/*@import "order-detail";*/
... ...
.logistics-page {
width: 100%;
background: #f0f0f0;
.edit-logistics-page {
width: 100%;
color: #d0d0d0;
background: #f0f0f0;
.edit-logistics {
padding: 0 30px;
background: #fff;
font-size: 30px;
line-height: 88px;
border-bottom: 1px solid #e0e0e0;
label {
display: block;
position: relative;
color: #000;
font-size: 34px;
border-bottom: 1px solid #e0e0e0;
&:last-of-type:after {
content: none;
}
input {
direction: rtl;
}
}
input {
position: absolute;
top: 0;
right: 40px;
width: 360px;
height: 88px;
color: #444;
padding: 0;
border: none;
-webkit-appearance: none;
}
p {
position: absolute;
top: 0;
right: 40px;
width: 360px;
height: 88px;
color: #444;
padding: 0;
border: none;
}
}
.submit {
margin: auto 30px;
width: 100%;
height: 100px;
color: #fff;
background: #000;
text-align: center;
font-size: 28px;
line-height: 88px;
&.highlight {
background: rgba(0, 0, 0, 0.6);
}
}
}
}
... ...