...
|
...
|
@@ -6,12 +6,9 @@ |
|
|
'use strict';
|
|
|
|
|
|
const mRoot = '../models';
|
|
|
const express = require('express');
|
|
|
const app = express();
|
|
|
const plustarModel = require(`${mRoot}/plustar`);
|
|
|
const htmlProcess = require(`${global.utils}/html-process`);
|
|
|
const headerModel = require('../../../doraemon/models/header'); // 头部model
|
|
|
const crypto = global.yoho.crypto;
|
|
|
const _ = require('lodash');
|
|
|
|
|
|
let channels = {
|
...
|
...
|
@@ -93,7 +90,7 @@ const getDetailData = (req, res, next) => { |
|
|
|
|
|
if (isApp) {
|
|
|
if (req.query.uid) {
|
|
|
uid = crypto.encryption('', req.query.uid + '');
|
|
|
uid = req.query.uid;
|
|
|
}
|
|
|
} else {
|
|
|
uid = req.user.uid;
|
...
|
...
|
@@ -140,7 +137,7 @@ const getDetailData = (req, res, next) => { |
|
|
* [品牌详情异步数据]
|
|
|
*/
|
|
|
const getDetailDataAsync = (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
let uid;
|
|
|
let udid = req.sessionID || 'yoho';
|
|
|
let clientType = req.body.client_type || '';
|
|
|
let brandId = req.body.brand_id || 0;
|
...
|
...
|
@@ -148,8 +145,10 @@ const getDetailDataAsync = (req, res, next) => { |
|
|
|
|
|
if (isApp) {
|
|
|
if (req.body.uid) {
|
|
|
uid = parseInt(crypto.decrypt(null, req.body.uid));
|
|
|
uid = parseInt(req.body.uid, 10);
|
|
|
}
|
|
|
} else {
|
|
|
uid = parseInt(req.user.uid, 10);
|
|
|
}
|
|
|
|
|
|
if (!brandId) {
|
...
|
...
|
@@ -160,7 +159,7 @@ const getDetailDataAsync = (req, res, next) => { |
|
|
isLike: result.isLike,
|
|
|
infos: result.infos
|
|
|
});
|
|
|
});
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
...
|
...
|
|