Authored by zhangxiaoru

资源码统一

... ... @@ -18,8 +18,7 @@ let channels = {
exports.promotion = (req, res, next) => {
let uid = req.user.uid,
isApp = req.yoho.isApp,
contentCode = req.app.locals.isProduction ? 'b2b5cde8144aff3073573c3b323344ab' :
'fa046a09b7c2c0e06927162404d95111'; // 产品线上线下配的资源码不一样
contentCode = 'b2b5cde8144aff3073573c3b323344ab';
req.ctx(expandModel).promotionData(uid, isApp, contentCode).then(result => {
res.render('expand-new/my-promotion', {
... ... @@ -100,8 +99,7 @@ exports.friendInvite = (req, res, next) => {
let page = req.query.page || 1;
let isApp = req.yoho.isApp;
let inciteCode = req.query.inviteCode;
let contentCode = req.app.locals.isProduction ? '319f92c4b072c3c40ea4cb4499b78bb4' :
'bc31b5d58b5af4e3999e8b994fb2bbc1';
let contentCode = '319f92c4b072c3c40ea4cb4499b78bb4';
req.ctx(expandModel).friendInvite(inciteCode, yhChannel, limit, page, contentCode).then(result => {
res.render('expand-new/friend-invite', {
... ...
... ... @@ -21,7 +21,8 @@ exports.index = (req, res, next) => {
let params = {
uid: req.user.uid,
channel: req.query.channel || 1,
udid: require('yoho-md5')(req.ip)
udid: require('yoho-md5')(req.ip),
contentCode: 'b2b5cde8144aff3073573c3b323344ab'
};
let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true);
... ...
... ... @@ -5,8 +5,7 @@ const tideCommandModel = require('../models/tide-command');
exports.tideCommand = (req, res, next) => {
let uid = req.user.uid,
contentCode = req.app.locals.isProduction ? '29958987ef0c0f830fad03d7e54f6061' :
'29958987ef0c0f830fad03d7e5';
contentCode = '29958987ef0c0f830fad03d7e54f6061';
req.ctx(tideCommandModel).invitionData(uid, contentCode).then(result => {
res.render('tide-command', {
... ...
... ... @@ -123,9 +123,9 @@ const _getCode = (uid) => {
});
};
const _getTrendPop = () => {
const _getTrendPop = (contentCode) => {
return service.get('operations/api/v5/resource/get', {
content_code: 'fa046a09b7c2c0e06927162404d95111',
content_code: contentCode,
}).then(result => {
if (result && result.code === 200 && result.data) {
return result.data[0];
... ... @@ -163,7 +163,7 @@ const index = (params) => {
_getAddressData(params),
_getRes(),
_getCode(params.uid),
_getTrendPop()
_getTrendPop(params.contentCode)
]).then(result => {
if (result[0] && result[0].data) {
Object.assign(finalResult, {
... ...
... ... @@ -11,14 +11,17 @@ const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const domains = {
api: 'http://192.168.103.59:8080/gateway',
service: 'http://192.168.103.59:8080/gateway',
// api: 'http://192.168.103.59:8080/gateway',
// service: 'http://192.168.103.59:8080/gateway',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
api: 'http://api.gray.yohops.com',
service: 'http://service.gray.yohops.com',
singleApi: 'http://api-test3.yohops.com:9999/',
global: 'http://global-test-soa.yohops.com:9999',
liveApi: 'http://testapi.live.yohops.com:9999/',
... ...