Authored by 沈志敏

fix bug

@@ -6,7 +6,6 @@ @@ -6,7 +6,6 @@
6 const refundModel = require('../models/refund'); 6 const refundModel = require('../models/refund');
7 const notLoginCode = 400; 7 const notLoginCode = 400;
8 const notLoginTip = '抱歉,您暂未登录!'; 8 const notLoginTip = '抱歉,您暂未登录!';
9 -const testUid = 8039837; // 测试uid  
10 9
11 const refund = { 10 const refund = {
12 refund(req, res) { 11 refund(req, res) {
@@ -16,7 +15,7 @@ const refund = { @@ -16,7 +15,7 @@ const refund = {
16 }); 15 });
17 }, 16 },
18 order(req, res, next) { 17 order(req, res, next) {
19 - const uid = req.user.uid || 8050882; 18 + const uid = req.user.uid;
20 const orderCode = req.query.orderCode; 19 const orderCode = req.query.orderCode;
21 20
22 if (!orderCode) { 21 if (!orderCode) {
@@ -28,7 +27,7 @@ const refund = { @@ -28,7 +27,7 @@ const refund = {
28 }).catch(next); 27 }).catch(next);
29 }, 28 },
30 submit(req, res, next) { 29 submit(req, res, next) {
31 - const uid = req.user.uid || 8050882; 30 + const uid = req.user.uid;
32 31
33 refundModel.submitRefundData(uid, req.body).then(result => { 32 refundModel.submitRefundData(uid, req.body).then(result => {
34 res.json(result); 33 res.json(result);
@@ -106,11 +105,10 @@ const refund = { @@ -106,11 +105,10 @@ const refund = {
106 * @returns {*|{read, write}} 105 * @returns {*|{read, write}}
107 */ 106 */
108 getRefundOrders(req, res) { 107 getRefundOrders(req, res) {
109 - let uid = req.query.id; 108 + let uid = req.user.uid;
110 let page = req.query.page; 109 let page = req.query.page;
111 let limit = req.query.limit; 110 let limit = req.query.limit;
112 111
113 - uid = testUid;  
114 if (!uid && req.xhr) { 112 if (!uid && req.xhr) {
115 return res.json({ 113 return res.json({
116 code: notLoginCode, 114 code: notLoginCode,
@@ -137,7 +135,6 @@ const refund = { @@ -137,7 +135,6 @@ const refund = {
137 let uid = req.user.uid; 135 let uid = req.user.uid;
138 let id = req.body.id; 136 let id = req.body.id;
139 137
140 - uid = testUid;  
141 if (!uid && req.xhr) { 138 if (!uid && req.xhr) {
142 return res.json({ 139 return res.json({
143 code: notLoginCode, 140 code: notLoginCode,
@@ -65,8 +65,6 @@ module.exports = { @@ -65,8 +65,6 @@ module.exports = {
65 shopId: req.body.shopId, 65 shopId: req.body.shopId,
66 favId: req.body.favId, 66 favId: req.body.favId,
67 uid: req.user.uid, 67 uid: req.user.uid,
68 -  
69 - // uid: '8050882',  
70 type: 'shop', 68 type: 'shop',
71 isFav: req.body.isFav 69 isFav: req.body.isFav
72 }).then(result => { 70 }).then(result => {
@@ -20,7 +20,9 @@ const prettyFilter = require(`${global.utils}/beautify/filters`); @@ -20,7 +20,9 @@ const prettyFilter = require(`${global.utils}/beautify/filters`);
20 const getShopData = params => { 20 const getShopData = params => {
21 let finalResult = {}; 21 let finalResult = {};
22 22
23 - return shopApi.getBrandInfoByDomain({domain: params.domain}).then(result => { 23 + return shopApi.getBrandInfoByDomain({
  24 + domain: params.domain
  25 + }).then(result => {
24 26
25 if (result.data) { 27 if (result.data) {
26 28
@@ -41,8 +43,6 @@ const getShopData = params => { @@ -41,8 +43,6 @@ const getShopData = params => {
41 return shopApi.getShopInfoData({ 43 return shopApi.getShopInfoData({
42 shopId: result.data.shop_id, 44 shopId: result.data.shop_id,
43 uid: params.uid 45 uid: params.uid
44 -  
45 - // uid: '8050882'  
46 }).then(subResult => { 46 }).then(subResult => {
47 47
48 if (subResult.data) { 48 if (subResult.data) {
@@ -56,7 +56,9 @@ const getShopData = params => { @@ -56,7 +56,9 @@ const getShopData = params => {
56 }); 56 });
57 57
58 /* 取资源位店铺背景图 */ 58 /* 取资源位店铺背景图 */
59 - return shopApi.getShopsDecoratorList({shopId: result.data.shop_id}).then(thResult => { 59 + return shopApi.getShopsDecoratorList({
  60 + shopId: result.data.shop_id
  61 + }).then(thResult => {
60 if (thResult.data) { 62 if (thResult.data) {
61 _.forEach(thResult.data.list, value => { 63 _.forEach(thResult.data.list, value => {
62 64
@@ -97,7 +99,9 @@ const getShopData = params => { @@ -97,7 +99,9 @@ const getShopData = params => {
97 const getBrandShopGoodsData = params => { 99 const getBrandShopGoodsData = params => {
98 let finalResult = {}; 100 let finalResult = {};
99 101
100 - return shopApi.getBrandInfoByDomain({domain: params.domain}).then(result => { 102 + return shopApi.getBrandInfoByDomain({
  103 + domain: params.domain
  104 + }).then(result => {
101 105
102 if (result.data) { 106 if (result.data) {
103 return shopApi.getBrandShopGoodsOriginData(Object.assign(params, { 107 return shopApi.getBrandShopGoodsOriginData(Object.assign(params, {