Authored by ccbikai

Merge branch 'develop' into release/1.0

1 -Name | Path | Note  
2 --------- | ---------------------------------------------- | ---------  
3 -首页 | / |  
4 -侧边栏 | /sidebar | 只有 app 使用  
5 -品牌列表 | /brand |  
6 -品类 | /cate |  
7 -全部分类 | /cate-all |  
8 -商品列表 | /list?sort=1 |  
9 -品牌店铺 | /product/shop?domain=sctest1 |  
10 -品牌店铺分享页面 | /product/shop-share?domain=colormad |  
11 -商品详情 | /item/{productId}.html |  
12 -新品抢先看 | /new |  
13 -搜索页 | /search?query=xxx |  
14 -资讯列表 | /editorial/list |  
15 -资讯详情 | /editorial/{newsId}.html |  
16 -个人中心 | /me |  
17 -个人信息 | /me/mydetails |  
18 -全部订单 | /me/order?type=1 |  
19 -待付款 | /me/order?type=2 |  
20 -待发货 | /me/order?type=3 |  
21 -待收货 | /me/order?type=4 |  
22 -订单详情 | /me/order-detail?orderCode=xxx |  
23 -退换货列表 | /me/return |  
24 -退货申请 | /me/return/refund?orderId=160181661 |  
25 -换货申请 | /me/return/exchange?orderId=160181661 |  
26 -收藏商品 | /me/favorite |  
27 -收藏品牌 | /me/favorite?tab=brand |  
28 -yoho币 | /me/mycurrency |  
29 -帮助中心 | /help |  
30 -帮助中心详情 | /help?id=xxx |  
31 -意见反馈 | /me/feedback |  
32 -关于我们 | /me/about |  
33 -物流详情 | /me/logistic?order_code=1609827614 |  
34 -退换货物流详情 | /me/logistic?order_code=1609827614&type=refund |  
35 -  
36 ---------------------------------------------------------------------------------  
37 1
  2 +Name | Path | Note
  3 +-------- | ------------------------------------ | ---------
  4 +首页 | / |
  5 +侧边栏 | /sidebar | 只有 app 使用
  6 +品牌列表 | /brands |
  7 +品类 | /cate |
  8 +全部分类 | /cate-all |
  9 +商品列表 | /list?sort=1 |
  10 +品牌店铺 | /product/shop?domain=sctest1 |
  11 +品牌店铺分享页面 | /product/shop-share?domain=colormad |
  12 +商品详情 | /product/{productId} |
  13 +新品抢先看 | /new |
  14 +搜索页 | /search?query=xxx |
  15 +资讯列表 | /news |
  16 +资讯详情 | /news/{newsId} |
  17 +个人中心 | /me |
  18 +个人信息 | /me/mydetails |
  19 +全部订单 | /me/order?type=1 |
  20 +待付款 | /me/order?type=2 |
  21 +待发货 | /me/order?type=3 |
  22 +待收货 | /me/order?type=4 |
  23 +订单详情 | /me/order/detail?orderCode=xxx |
  24 +退换货列表 | /me/return |
  25 +退货申请 | /me/return/refund?orderCode=160181661 |
  26 +换货申请 | /me/return/exchange?orderCode=160181661 |
  27 +收藏商品 | /me/collection |
  28 +收藏品牌 | /me/collection?tab=brand |
  29 +yoho币 | /me/mycurrency |
  30 +帮助中心 | /help |
  31 +帮助中心详情 | /help?id=xxx |
  32 +意见反馈 | /me/feedback |
  33 +关于我们 | /me/about |
  34 +物流详情 | /me/logistic?order_code=1609827614 |
  35 +退换货物流详情| /me/logistic?order_code=1609827614&type=refund|
38 -------------------------------------------------------------------------------- 36 --------------------------------------------------------------------------------
39 37
40 ### order 常亮 38 ### order 常亮
@@ -17,13 +17,13 @@ const exchange = { @@ -17,13 +17,13 @@ const exchange = {
17 // 订单 可换货商品列表 17 // 订单 可换货商品列表
18 order(req, res, next) { 18 order(req, res, next) {
19 const uid = req.user.uid; // const udi = 8039837 //test account 19 const uid = req.user.uid; // const udi = 8039837 //test account
20 - const orderId = req.query.orderId; 20 + const orderCode = req.query.orderCode;
21 21
22 - if (!orderId) { 22 + if (!orderCode) {
23 return next(); 23 return next();
24 } 24 }
25 25
26 - exchangeModel.getOrderData(uid, orderId).then(result => { 26 + exchangeModel.getOrderData(uid, orderCode).then(result => {
27 res.json(result); 27 res.json(result);
28 }).catch(next); 28 }).catch(next);
29 }, 29 },
@@ -15,13 +15,13 @@ const refund = { @@ -15,13 +15,13 @@ const refund = {
15 }, 15 },
16 order(req, res, next) { 16 order(req, res, next) {
17 const uid = req.user.uid || 8050882; 17 const uid = req.user.uid || 8050882;
18 - const orderId = req.query.orderId; 18 + const orderCode = req.query.orderCode;
19 19
20 - if (!orderId) { 20 + if (!orderCode) {
21 return next(); 21 return next();
22 } 22 }
23 23
24 - refundModel.getOrderData(uid, orderId).then(result => { 24 + refundModel.getOrderData(uid, orderCode).then(result => {
25 res.json(result); 25 res.json(result);
26 }).catch(next); 26 }).catch(next);
27 }, 27 },
@@ -20,31 +20,30 @@ const router = expressRouter(); @@ -20,31 +20,30 @@ const router = expressRouter();
20 router.get('/me/', home.index); // 个人中心主页 20 router.get('/me/', home.index); // 个人中心主页
21 21
22 router.get('/me/order', order.orders); // 订单 22 router.get('/me/order', order.orders); // 订单
23 -router.get('/me/order-detail', order.orderDetail); // 订单详情  
24 -router.get('/me/get-orders', order.getOrderData); // 获取订单数据  
25 -router.get('/me/get-order', order.getOrderDetailData); // 获取订单详情数据  
26 -router.get('/me/order-detail', order.orderDetail); // 订单详情  
27 -router.get('/me/order/cancel-reason', order.getCancelReason); // 获取订单原因  
28 -router.post('/me/cancel-order', order.cancelOrder); // 取消订单  
29 -router.post('/me/delete-order', order.deleteOrder); // 删除订单  
30 -router.post('/me/confirm-order', order.confirmOrder); // 确认订单 23 +router.get('/me/order/detail', order.orderDetail);
  24 +router.get('/me/getOrderList', order.getOrderData); // 获取订单数据
  25 +router.get('/me/get-order', order.getOrderDetailData); // AJAX 获取订单详情数据
  26 +router.get('/me/getCancelOrderReason', order.getCancelReason); // 获取订单原因
  27 +router.post('/me/cancelOrder', order.cancelOrder); // 取消订单
  28 +router.post('/me/deleteOrder', order.deleteOrder); // AJAX 删除订单
  29 +router.post('/me/confirmReceive', order.confirmOrder); // 确认订单
31 30
32 router.get('/me/mycurrency', order.coin); // yoho币 31 router.get('/me/mycurrency', order.coin); // yoho币
33 -router.get('/me/coin-detail', order.getCoinDetail); // yoho币明细 32 +router.get('/me/coin-detail', order.getCoinDetail); // ajax yoho币明细
34 33
35 router.get('/me/service', home.service); // 在线客服 34 router.get('/me/service', home.service); // 在线客服
36 router.get('/help', home.help); // 帮助中心列表页 35 router.get('/help', home.help); // 帮助中心列表页
37 router.get('/me/feedback', home.feedback); // 个人中心-意见反馈 36 router.get('/me/feedback', home.feedback); // 个人中心-意见反馈
38 router.post('/me/save-feedback', home.saveFeedback); // 个人中心-提交意见反馈 37 router.post('/me/save-feedback', home.saveFeedback); // 个人中心-提交意见反馈
39 38
40 -router.get('/me/favorite', favorite.favorite); // 个人中心 - 收藏  
41 -router.get('/me/favorite/favpaging', favorite.favpaging); // 个人中心 - 收藏商品/品牌(翻页) 39 +router.get('/me/collection', favorite.favorite); // 个人中心 - 收藏
  40 +router.get('/me/collection/favpaging', favorite.favpaging); // 个人中心 - 收藏商品/品牌(翻页)
42 router.post('/me/del-favdel', favorite.deletefav); // 个人中心 - 收藏商品/品牌(刪除) 41 router.post('/me/del-favdel', favorite.deletefav); // 个人中心 - 收藏商品/品牌(刪除)
43 42
44 // 退换货 43 // 退换货
45 router.get('/me/return', refund.refundOrders); // 退换货 - 订单列表 44 router.get('/me/return', refund.refundOrders); // 退换货 - 订单列表
46 router.get('/me/exchange-status', refund.exchangeGoods); // 退换货 - 换货状态 45 router.get('/me/exchange-status', refund.exchangeGoods); // 退换货 - 换货状态
47 -router.get('/me/refund/get-orders', refund.getRefundOrders); // 退换货 - 获取订单列表数据 46 +router.get('/me/refund/getOrderLisst', refund.getRefundOrders); // 退换货 - 获取订单列表数据
48 47
49 // 退货申请 48 // 退货申请
50 router.get('/me/return/refund', refund.refund); // 退货申请 49 router.get('/me/return/refund', refund.refund); // 退货申请
@@ -51,11 +51,11 @@ @@ -51,11 +51,11 @@
51 </a> 51 </a>
52 </div> 52 </div>
53 <div class="group-list"> 53 <div class="group-list">
54 - <a class="list-item" href="/me/favorite"> 54 + <a class="list-item" href="/me/collection">
55 收藏的商品 55 收藏的商品
56 <span class="num">{{product_favorite_total}} <span class="icon icon-right"></span></span> 56 <span class="num">{{product_favorite_total}} <span class="icon icon-right"></span></span>
57 </a> 57 </a>
58 - <a class="list-item" href="/me/favorite?tab=brand"> 58 + <a class="list-item" href="/me/collection?tab=brand">
59 收藏的品牌 59 收藏的品牌
60 <span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span> 60 <span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span>
61 </a> 61 </a>
@@ -74,11 +74,11 @@ const titleMap = { @@ -74,11 +74,11 @@ const titleMap = {
74 }, 74 },
75 ltitle: { 75 ltitle: {
76 des: '商品', 76 des: '商品',
77 - action: origin + '/me/favorite' 77 + action: origin + '/me/collection'
78 }, 78 },
79 rtitle: { 79 rtitle: {
80 des: '品牌', 80 des: '品牌',
81 - action: origin + '/me/favorite?tab=brand' 81 + action: origin + '/me/collection?tab=brand'
82 }, 82 },
83 right: { 83 right: {
84 des: '编辑', 84 des: '编辑',
@@ -132,7 +132,7 @@ const matchHeader = (url) => { @@ -132,7 +132,7 @@ const matchHeader = (url) => {
132 return header; 132 return header;
133 } 133 }
134 134
135 - if (/\/me\/order-detail$/.test(path)) { 135 + if (/\/me\/order\/detail$/.test(path)) {
136 header = titleMap[2]; 136 header = titleMap[2];
137 header.title.des = '订单详情'; 137 header.title.des = '订单详情';
138 header.title.right.action = origin + '/me/service'; 138 header.title.right.action = origin + '/me/service';
@@ -188,7 +188,7 @@ module.exports = (url) => { @@ -188,7 +188,7 @@ module.exports = (url) => {
188 let path = url.split('?')[0]; 188 let path = url.split('?')[0];
189 189
190 // 个人中心收藏 190 // 个人中心收藏
191 - if (/\/me\/favorite$/.test(path)) { 191 + if (/\/me\/collection$/.test(path)) {
192 let u = url.split('?')[1]; 192 let u = url.split('?')[1];
193 let header = titleMap[5]; 193 let header = titleMap[5];
194 194
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 return { 50 return {
51 title: '请选择换货商品', 51 title: '请选择换货商品',
52 page: 'exchange', 52 page: 'exchange',
53 - orderCode: qs.orderId, 53 + orderCode: qs.orderCode,
54 showFeatureSelector: false, 54 showFeatureSelector: false,
55 entity: {}, 55 entity: {},
56 exchangeData: {}, 56 exchangeData: {},
@@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
81 $.ajax({ 81 $.ajax({
82 url: '/me/return/exchange/order', 82 url: '/me/return/exchange/order',
83 data: { 83 data: {
84 - orderId: this.orderCode 84 + orderCode: this.orderCode
85 } 85 }
86 }).then(res => { 86 }).then(res => {
87 const self = this; 87 const self = this;
@@ -246,7 +246,7 @@ @@ -246,7 +246,7 @@
246 data 246 data
247 }).then(result => { 247 }).then(result => {
248 if (result.code === 200) { 248 if (result.code === 200) {
249 - yoho.goNewPage({url: `/me/exchange-status?orderId=${self.orderCode}`}); 249 + yoho.goNewPage({url: `/me/exchange-status?orderCode=${self.orderCode}`});
250 } else { 250 } else {
251 modal.alert(result.message); 251 modal.alert(result.message);
252 } 252 }
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 59
60 this.busy = true; 60 this.busy = true;
61 $.ajax({ 61 $.ajax({
62 - url: '/me/favorite/favpaging', 62 + url: '/me/collection/favpaging',
63 data: { 63 data: {
64 page: ++_this.page, 64 page: ++_this.page,
65 tab: 'brand' 65 tab: 'brand'
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 64
65 this.busy = true; 65 this.busy = true;
66 $.ajax({ 66 $.ajax({
67 - url: '/me/favorite/favpaging', 67 + url: '/me/collection/favpaging',
68 data: { 68 data: {
69 page: ++_this.page 69 page: ++_this.page
70 } 70 }
@@ -87,13 +87,13 @@ @@ -87,13 +87,13 @@
87 { 87 {
88 key: this.order.isSupportRefund, 88 key: this.order.isSupportRefund,
89 val: this.order.isSupportRefund === 'Y' ? '申请退货' : '<span class="overdue">申请退货(已过期限)</span>', 89 val: this.order.isSupportRefund === 'Y' ? '申请退货' : '<span class="overdue">申请退货(已过期限)</span>',
90 - url: '/me/return/refund?orderId=' + this.order.orderCode, 90 + url: '/me/return/refund?orderCode=' + this.order.orderCode,
91 disabled: this.order.isSupportRefund !== 'Y' 91 disabled: this.order.isSupportRefund !== 'Y'
92 }, 92 },
93 { 93 {
94 key: this.order.isSupportExchange, 94 key: this.order.isSupportExchange,
95 val: this.order.isSupportExchange === 'Y' ? '申请换货' : '<span class="overdue">申请换货(已过期限)</span>', 95 val: this.order.isSupportExchange === 'Y' ? '申请换货' : '<span class="overdue">申请换货(已过期限)</span>',
96 - url: '/me/return/exchange?orderId=' + this.order.orderCode, 96 + url: '/me/return/exchange?orderCode=' + this.order.orderCode,
97 disabled: this.order.isSupportExchange !== 'Y' 97 disabled: this.order.isSupportExchange !== 'Y'
98 }, 98 },
99 { 99 {
@@ -129,7 +129,7 @@ @@ -129,7 +129,7 @@
129 let that = this; 129 let that = this;
130 130
131 $.ajax({ 131 $.ajax({
132 - url: '/me/order/cancel-reason', 132 + url: '/me/getCancelOrderReason',
133 }).then(result => { 133 }).then(result => {
134 if (result.data.length > 0) { 134 if (result.data.length > 0) {
135 that.options = result.data; 135 that.options = result.data;
@@ -142,7 +142,7 @@ @@ -142,7 +142,7 @@
142 return { 142 return {
143 cancel(param, success, fail) { 143 cancel(param, success, fail) {
144 $.ajax({ 144 $.ajax({
145 - url: '/me/cancel-order', 145 + url: '/me/cancelOrder',
146 type: 'post', 146 type: 'post',
147 data: param 147 data: param
148 }).then(success).fail(fail); 148 }).then(success).fail(fail);
@@ -174,7 +174,7 @@ @@ -174,7 +174,7 @@
174 Modal.confirm('确认删除订单?', '', function() { 174 Modal.confirm('确认删除订单?', '', function() {
175 this.hide(); 175 this.hide();
176 $.ajax({ 176 $.ajax({
177 - url: '/me/delete-order', 177 + url: '/me/deleteOrder',
178 type: 'post', 178 type: 'post',
179 data: { 179 data: {
180 orderCode: code 180 orderCode: code
@@ -192,7 +192,7 @@ @@ -192,7 +192,7 @@
192 }, 192 },
193 confirmGoods(code) { 193 confirmGoods(code) {
194 $.ajax({ 194 $.ajax({
195 - url: '/me/confirm-order', 195 + url: '/me/confirmReceive',
196 type: 'post', 196 type: 'post',
197 data: { 197 data: {
198 orderCode: code 198 orderCode: code
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <p>&yen; {{goods.goodsPrice}}</p> 22 <p>&yen; {{goods.goodsPrice}}</p>
23 <p>×{{goods.buyNumber}}</p> 23 <p>×{{goods.buyNumber}}</p>
24 </div> 24 </div>
25 - <a href="/me/order-detail?orderCode={{order.orderCode}}"></a> 25 + <a href="/me/order/detail?orderCode={{order.orderCode}}"></a>
26 </div> 26 </div>
27 </div> 27 </div>
28 <div class="order-option"> 28 <div class="order-option">
@@ -87,7 +87,7 @@ @@ -87,7 +87,7 @@
87 return; 87 return;
88 } 88 }
89 $.ajax({ 89 $.ajax({
90 - url: '/me/get-orders', 90 + url: '/me/getOrderLisst',
91 data: { 91 data: {
92 page: ++this.page, 92 page: ++this.page,
93 limit: this.limit, 93 limit: this.limit,
@@ -128,7 +128,7 @@ @@ -128,7 +128,7 @@
128 let that = this; 128 let that = this;
129 129
130 $.ajax({ 130 $.ajax({
131 - url: '/me/order/cancel-reason', 131 + url: '/me/getCancelOrderReason',
132 }).then(result => { 132 }).then(result => {
133 if (result.data.length > 0) { 133 if (result.data.length > 0) {
134 that.options = result.data; 134 that.options = result.data;
@@ -152,7 +152,7 @@ @@ -152,7 +152,7 @@
152 return { 152 return {
153 cancel(param, success, fail) { 153 cancel(param, success, fail) {
154 $.ajax({ 154 $.ajax({
155 - url: '/me/cancel-order', 155 + url: '/me/cancelOrder',
156 type: 'post', 156 type: 'post',
157 data: param 157 data: param
158 }).then(success).fail(fail); 158 }).then(success).fail(fail);
@@ -174,7 +174,7 @@ @@ -174,7 +174,7 @@
174 Modal.confirm('确认删除订单?', '', function() { 174 Modal.confirm('确认删除订单?', '', function() {
175 this.hide(); 175 this.hide();
176 $.ajax({ 176 $.ajax({
177 - url: '/me/delete-order', 177 + url: '/me/deleteOrder',
178 type: 'post', 178 type: 'post',
179 data: { 179 data: {
180 orderCode: order.orderCode 180 orderCode: order.orderCode
@@ -192,7 +192,7 @@ @@ -192,7 +192,7 @@
192 }, 192 },
193 confirmGoods(code) { 193 confirmGoods(code) {
194 $.ajax({ 194 $.ajax({
195 - url: '/me/confirm-order', 195 + url: '/me/confirmReceive',
196 type: 'post', 196 type: 'post',
197 data: { 197 data: {
198 orderCode: code 198 orderCode: code
@@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
70 return; 70 return;
71 } 71 }
72 $.ajax({ 72 $.ajax({
73 - url: '/me/refund/get-orders', 73 + url: '/me/refund/getOrderList',
74 data: { 74 data: {
75 page: ++this.page, 75 page: ++this.page,
76 limit: this.limit 76 limit: this.limit
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 }); 83 });
84 84
85 return { 85 return {
86 - order_code: qs.orderId, 86 + order_code: qs.orderCode,
87 goods: JSON.stringify(goods), 87 goods: JSON.stringify(goods),
88 payment: JSON.stringify(this.amount) 88 payment: JSON.stringify(this.amount)
89 }; 89 };
@@ -93,7 +93,7 @@ @@ -93,7 +93,7 @@
93 $.ajax({ 93 $.ajax({
94 url: '/me/return/refund/order', 94 url: '/me/return/refund/order',
95 data: { 95 data: {
96 - orderId: qs.orderId 96 + orderCode: qs.orderCode
97 } 97 }
98 }).then(res => { 98 }).then(res => {
99 if (res.data && res.data.goodsList) { 99 if (res.data && res.data.goodsList) {