Authored by 陈峰

精简

... ... @@ -169,9 +169,7 @@ try {
const tdkUrl = require('./doraemon/middleware/redis-url');
const user = require('./doraemon/middleware/user');
const reqParamsFilter = require('./doraemon/middleware/req-params-filter');
const urlRewrite = require('./doraemon/middleware/url-rewrite');
const subDomain = require('./doraemon/middleware/sub-domain');
const itemNameHandler = require('./doraemon/middleware/item-name-handler');
const setYohoData = require('./doraemon/middleware/set-yoho-data');
const errorHanlder = require('./doraemon/middleware/error-handler');
const setPageInfo = require('./doraemon/middleware/set-pageinfo');
... ... @@ -189,9 +187,7 @@ try {
// YOHO 前置中间件
app.use(tdkUrl());
app.use(reqParamsFilter());
app.use(urlRewrite());
app.use(subDomain());
app.use(itemNameHandler);
app.use(setYohoData());
app.use(user());
... ...
... ... @@ -13,9 +13,10 @@ const isTest = process.env.NODE_ENV === 'test3' || process.env.NODE_ENV === 'tes
const domains = {
// api: 'http://api.yoho.cn/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
// service: 'http://service.yoho.cn/',
// yoLuck: 'https://action.yoho.cn',
// liveApi: 'http://testapi.live.yohops.com:9999/',
... ... @@ -27,8 +28,8 @@ const domains = {
// platformApi: 'http://172.16.6.210:8088/',
api: 'http://api-test3.dev.yohocorp.com/',
service: 'http://api-test3.dev.yohocorp.com/',
// api: 'http://api-test3.dev.yohocorp.com/',
// service: 'http://api-test3.dev.yohocorp.com/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.dev.yohocorp.com/',
ufo: 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',
... ... @@ -52,7 +53,7 @@ module.exports = {
appName: 'yohobuywap-node',
port: 6001,
siteUrl: '//m.yohobuy.com',
assetUrl: '//m.yohobuy.com:5001/yohobuywap-node/',
assetUrl: '//activity.yoho.cn:5001/yohobuywap-node/',
testCode: 'yoho4946abcdef#$%&!@',
domains: domains,
... ...
... ... @@ -8,33 +8,15 @@ module.exports = app => {
// 公共服务
// 四个频道页,频道选择页面 /boys,/girls,/,/kids,/lifestyle 等页面,就直接占用路由了
app.use(require('./apps/channel'));
app.use(require('./apps/passport'));
app.use(require('./apps/api')); // 一些只返回json的通用api
// 业务模块
app.use('/product', require('./apps/product'));
app.use('/guang/news', require('./apps/news'));// seo-潮流资讯页
app.use('/guang', require('./apps/guang'));
app.use('/activity', require('./apps/activity'));
app.use('/cart', require('./apps/cart'));
// 微信支付的 URL 处理
app.use('/shopping', require('./apps/cart'));
// 分期付款
app.use('/home', require('./apps/home'));
// 第三方服务处理
app.use('/3party', require('./apps/3party'));
// 用户服务: 在线客服
app.use('/service', require('./apps/service'));
// MIP
app.use('/mip', require('./apps/mip'));
// 一些公用页面,比如离线页面
app.use(require('./apps/common'));
};
... ...
module.exports = {
context: './js',
regx: ['**/*.page.js', '**/index.js']
regx: ['activity/feature.page.js']
};
... ...