- 订单流程

This commit is contained in:
sin
2019-04-08 23:17:14 +08:00
parent 6c50286477
commit 77c6edefb3
11 changed files with 920 additions and 687 deletions

View File

@@ -15,6 +15,14 @@ const serviceRouter = function(requestUrl) {
prefix: '/user-api',
target: 'http://127.0.0.1:18082/user-api',
},
'/product-api': {
prefix: '/product-api',
target: 'http://127.0.0.1:18081/product-api',
},
'/promotion-api': {
prefix: '/promotion-api',
target: 'http://127.0.0.1:18085//promotion-api',
},
};
const configProd = {
@@ -26,6 +34,14 @@ const serviceRouter = function(requestUrl) {
prefix: '/user-api',
target: 'http://127.0.0.1:18082/user-api',
},
'/product-api': {
prefix: '/product-api',
target: 'http://127.0.0.1:18081/product-api',
},
'/promotion-api': {
prefix: '/promotion-api',
target: 'http://127.0.0.1:18085//promotion-api',
},
};
if (process.env.NODE_ENV == 'development') {
@@ -57,7 +73,9 @@ const serviceRouter = function(requestUrl) {
const indexOf = requestUrl.indexOf("/", 1);
const _urlPrefix = requestUrl.substring(0, indexOf);
if (!config[_urlPrefix]) {
throw new Error(`服务路由,未找到可用服务! ${requestUrl}`);
// throw new Error(`服务路由,未找到可用服务! ${requestUrl}`);
console.error(`服务路由,未找到可用服务! ${requestUrl}`)
return ''
}
// if (!createServer[_urlPrefix]) {
// throw new Error("服务路由,未找到可用服务!");

View File

@@ -178,6 +178,13 @@ const routes = [
title: '确认订单'
}
},
{
path: '/order/success',
component: () => import('../page/shipping/order-success'),
meta: {
title: '确认订单'
}
},
{
name: 'category',
component: () => import('../page/category/index'),