Authored by 沈志敏

fix bug

... ... @@ -6,7 +6,6 @@
const refundModel = require('../models/refund');
const notLoginCode = 400;
const notLoginTip = '抱歉,您暂未登录!';
const testUid = 8039837; // 测试uid
const refund = {
refund(req, res) {
... ... @@ -16,7 +15,7 @@ const refund = {
});
},
order(req, res, next) {
const uid = req.user.uid || 8050882;
const uid = req.user.uid;
const orderCode = req.query.orderCode;
if (!orderCode) {
... ... @@ -28,7 +27,7 @@ const refund = {
}).catch(next);
},
submit(req, res, next) {
const uid = req.user.uid || 8050882;
const uid = req.user.uid;
refundModel.submitRefundData(uid, req.body).then(result => {
res.json(result);
... ... @@ -106,11 +105,10 @@ const refund = {
* @returns {*|{read, write}}
*/
getRefundOrders(req, res) {
let uid = req.query.id;
let uid = req.user.uid;
let page = req.query.page;
let limit = req.query.limit;
uid = testUid;
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ... @@ -137,7 +135,6 @@ const refund = {
let uid = req.user.uid;
let id = req.body.id;
uid = testUid;
if (!uid && req.xhr) {
return res.json({
code: notLoginCode,
... ...
... ... @@ -65,8 +65,6 @@ module.exports = {
shopId: req.body.shopId,
favId: req.body.favId,
uid: req.user.uid,
// uid: '8050882',
type: 'shop',
isFav: req.body.isFav
}).then(result => {
... ...
... ... @@ -20,7 +20,9 @@ const prettyFilter = require(`${global.utils}/beautify/filters`);
const getShopData = params => {
let finalResult = {};
return shopApi.getBrandInfoByDomain({domain: params.domain}).then(result => {
return shopApi.getBrandInfoByDomain({
domain: params.domain
}).then(result => {
if (result.data) {
... ... @@ -41,8 +43,6 @@ const getShopData = params => {
return shopApi.getShopInfoData({
shopId: result.data.shop_id,
uid: params.uid
// uid: '8050882'
}).then(subResult => {
if (subResult.data) {
... ... @@ -56,7 +56,9 @@ const getShopData = params => {
});
/* 取资源位店铺背景图 */
return shopApi.getShopsDecoratorList({shopId: result.data.shop_id}).then(thResult => {
return shopApi.getShopsDecoratorList({
shopId: result.data.shop_id
}).then(thResult => {
if (thResult.data) {
_.forEach(thResult.data.list, value => {
... ... @@ -97,7 +99,9 @@ const getShopData = params => {
const getBrandShopGoodsData = params => {
let finalResult = {};
return shopApi.getBrandInfoByDomain({domain: params.domain}).then(result => {
return shopApi.getBrandInfoByDomain({
domain: params.domain
}).then(result => {
if (result.data) {
return shopApi.getBrandShopGoodsOriginData(Object.assign(params, {
... ...