Authored by lea guo

订单列表

1 <template> 1 <template>
2 - <img v-lazy="currentSrc" :alt="alt" v-if="!refresh"> 2 + <img v-lazy="currentSrc" :alt="alt" v-if="!refresh" />
3 </template> 3 </template>
4 4
5 <script> 5 <script>
6 export default { 6 export default {
7 - name: 'ImgSize', 7 + name: "ImgSize",
8 props: { 8 props: {
9 src: String, 9 src: String,
10 width: Number, 10 width: Number,
11 height: Number, 11 height: Number,
12 - alt: String, 12 + alt: String
13 }, 13 },
14 data() { 14 data() {
15 return { 15 return {
@@ -26,15 +26,12 @@ export default { @@ -26,15 +26,12 @@ export default {
26 }, 26 },
27 computed: { 27 computed: {
28 currentSrc() { 28 currentSrc() {
29 - return (this.src || '')  
30 - .replace('http://', '//')  
31 - .replace('{width}', this.width)  
32 - .replace('{height}', this.height); 29 + return (this.src || "")
  30 + .replace("http://", "//")
  31 + .replace("{width}", this.width)
  32 + .replace("{height}", this.height);
33 } 33 }
34 } 34 }
35 }; 35 };
36 </script> 36 </script>
37 37
38 -<style>  
39 -  
40 -</style>  
1 <template> 1 <template>
2 <div class="order-item-wrapper"> 2 <div class="order-item-wrapper">
3 <div class="item-img"> 3 <div class="item-img">
4 - <img 4 + <image-format
5 alt="" 5 alt=""
6 - src="//img10.static.yhbimg.com/goodsimg/2019/06/17/16/01c74e27eab148e4731af0e53518878972.jpg?imageMogr2/thumbnail/235x314/position/center/quality/60/format/webp" 6 + :src="goodsInfo.goodImg"
  7 + :width="180"
  8 + :height="180"
7 /> 9 />
8 </div> 10 </div>
9 <div class="item-info"> 11 <div class="item-info">
10 <div class="price-status"> 12 <div class="price-status">
11 <slot name="item-price"> 13 <slot name="item-price">
12 - <span class="price">¥299.00</span> 14 + <span class="price">¥{{ goodsInfo.goodPrice }}</span>
13 </slot> 15 </slot>
14 - <slot name="orderStatus" :orderStatus="orderStatus"></slot> 16 + <slot name="orderStatus" :orderStatus="order.statuStr"></slot>
15 </div> 17 </div>
16 <p class="item-name"> 18 <p class="item-name">
17 - Nike Air Max 97 秋季限定款Kobe签名独家发售 限购 19 + {{ goodsInfo.productName }}
18 </p> 20 </p>
19 <slot name="item-spec"> 21 <slot name="item-spec">
20 <p class="item-spec"> 22 <p class="item-spec">
21 - 蓝色,39码 23 + {{ spec }}
22 </p> 24 </p>
23 </slot> 25 </slot>
24 </div> 26 </div>
@@ -27,10 +29,20 @@ @@ -27,10 +29,20 @@
27 29
28 <script> 30 <script>
29 export default { 31 export default {
30 - data() {  
31 - return {  
32 - orderStatus: "交易成功"  
33 - }; 32 + props: {
  33 + order: {
  34 + type: Object,
  35 + default: {}
  36 + }
  37 + },
  38 + computed: {
  39 + goodsInfo: function() {
  40 + return this.$props.order.goodsInfo;
  41 + },
  42 + spec: function() {
  43 + const { colorName, sizeName } = this.goodsInfo;
  44 + return `${colorName},${sizeName}码`;
  45 + }
34 } 46 }
35 }; 47 };
36 </script> 48 </script>
@@ -38,13 +50,16 @@ export default { @@ -38,13 +50,16 @@ export default {
38 <style lang="scss" scoped> 50 <style lang="scss" scoped>
39 .order-item-wrapper { 51 .order-item-wrapper {
40 display: flex; 52 display: flex;
  53 + margin: 40px 0;
41 54
42 .item-img { 55 .item-img {
  56 + min-width: 180px;
43 max-width: 180px; 57 max-width: 180px;
44 max-height: 180px; 58 max-height: 180px;
  59 + display: inline-block;
  60 + text-align: center;
45 61
46 & > img { 62 & > img {
47 - width: 100%;  
48 height: 100%; 63 height: 100%;
49 } 64 }
50 } 65 }
@@ -59,8 +74,14 @@ export default { @@ -59,8 +74,14 @@ export default {
59 74
60 .item-info { 75 .item-info {
61 display: flex; 76 display: flex;
62 - justify-content: space-between;  
63 - align-items: center; 77 + flex: 1;
  78 + flex-direction: column;
  79 + margin-left: 20px;
  80 +
  81 + .price-status {
  82 + display: flex;
  83 + justify-content: space-between;
  84 + }
64 } 85 }
65 } 86 }
66 </style> 87 </style>
1 <template> 1 <template>
2 - <div>  
3 - 订单列表  
4 - </div> 2 + <scroll :data="orderList" class="order-list-wrapper">
  3 + <order-list-item
  4 + v-for="order in orderList"
  5 + :key="order.orderCode"
  6 + :order="order"
  7 + >
  8 + <template #orderStatus="{orderStatus}">{{ orderStatus }}</template>
  9 + </order-list-item>
  10 + </scroll>
5 </template> 11 </template>
6 12
7 <script> 13 <script>
8 -import { Button } from "cube-ui"; 14 +import { Button, Scroll } from "cube-ui";
  15 +import { createNamespacedHelpers } from "vuex";
  16 +import OrderListItem from "./components/order-list-item";
  17 +
  18 +const { mapActions, mapState } = createNamespacedHelpers("order/orderList");
9 19
10 export default { 20 export default {
11 components: { 21 components: {
12 - Button 22 + Button,
  23 + Scroll,
  24 + OrderListItem
  25 + },
  26 + computed: {
  27 + ...mapState(["orderList"])
13 }, 28 },
14 // 获取订单数据 29 // 获取订单数据
15 asyncData({ store, router }) { 30 asyncData({ store, router }) {
16 const { owner, status } = router.params; 31 const { owner, status } = router.params;
17 store.dispatch("order/orderList/fetchOrderList", { owner, status }); 32 store.dispatch("order/orderList/fetchOrderList", { owner, status });
  33 + },
  34 + mounted() {
  35 + const { owner, status } = this.$route.params;
  36 + this.fetchOrderList({ owner, status });
  37 + },
  38 + methods: {
  39 + ...mapActions(["fetchOrderList"]),
  40 + fetchMore() {
  41 + const { owner, status } = this.$route.params;
  42 + this.fetchOrderList({ owner, status });
  43 + }
18 } 44 }
19 }; 45 };
20 </script> 46 </script>
21 <style lang="scss" scoped> 47 <style lang="scss" scoped>
  48 +.order-list-wrapper {
  49 + margin: 40px 20px;
  50 +}
22 </style> 51 </style>
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 import store from 'yoho-store'; 4 import store from 'yoho-store';
5 import cookie from 'yoho-cookie'; 5 import cookie from 'yoho-cookie';
6 import components from '../components'; 6 import components from '../components';
7 -import {each} from 'lodash'; 7 +import { each } from 'lodash';
8 8
9 export default { 9 export default {
10 loadGlobalComponents(Vue) { 10 loadGlobalComponents(Vue) {
@@ -28,5 +28,5 @@ export default { @@ -28,5 +28,5 @@ export default {
28 // 附加Vue原型属性 28 // 附加Vue原型属性
29 Vue.prop('store', store); 29 Vue.prop('store', store);
30 Vue.prop('cookie', cookie); 30 Vue.prop('cookie', cookie);
31 - } 31 + },
32 }; 32 };
@@ -8,7 +8,7 @@ export default function() { @@ -8,7 +8,7 @@ export default function() {
8 modules: { 8 modules: {
9 priceChange: priceChange(), 9 priceChange: priceChange(),
10 orderList: orderList(), 10 orderList: orderList(),
11 - orderConfirm: orderConfirm()  
12 - } 11 + orderConfirm: orderConfirm(),
  12 + },
13 }; 13 };
14 } 14 }
@@ -2,39 +2,44 @@ export default function() { @@ -2,39 +2,44 @@ export default function() {
2 return { 2 return {
3 namespaced: true, 3 namespaced: true,
4 state: { 4 state: {
5 - status: null, // 订单状态  
6 - owner: '', // 订单来源 5 + page: 1,
  6 + pageSize: 10,
  7 + pagetotal: 0,
  8 + orderList: [],
7 }, 9 },
8 mutations: { 10 mutations: {
9 - setRouteParam(state, { owner, status } = {}) {  
10 - state.owner = owner;  
11 - state.status = status; 11 + setOrderList(state, res = {}) {
  12 + const { page, pagetotal, data } = res;
  13 +
  14 + console.log('----------------', data);
  15 + state.page = page;
  16 + state.pagetotal = pagetotal;
  17 + state.orderList = data || [];
12 }, 18 },
13 - setOrderList() {},  
14 }, 19 },
15 actions: { 20 actions: {
16 /** 21 /**
17 * 获取订单列表 22 * 获取订单列表
18 * @param {*} param0 vue store context 23 * @param {*} param0 vue store context
19 - * @param {*} param1 服务器端预加载数据参数 24 + * @param {
  25 + * owner: 订单来源
  26 + * status: 订单状态
  27 + * }
  28 + * r
20 */ 29 */
21 - async fetchOrderList({ commit, state }, preParam) {  
22 - const { owner, status } = preParam || state;  
23 -  
24 - if (preParam) {  
25 - commit('setRouteParam');  
26 - } 30 + async fetchOrderList({ commit }, { owner, status } = {}) {
27 const res = await this.$api.get('/api/order/list', { 31 const res = await this.$api.get('/api/order/list', {
28 tabType: owner, 32 tabType: owner,
29 type: status, 33 type: status,
30 page: 1, 34 page: 1,
  35 + limit: 5,
31 36
32 // Todo 删除 37 // Todo 删除
33 uid: 600043484, 38 uid: 600043484,
34 }); 39 });
35 40
36 if (res.code === 200) { 41 if (res.code === 200) {
37 - commit('setOrderList', { list: res.data.data, owner }); 42 + commit('setOrderList', res.data);
38 } 43 }
39 }, 44 },
40 }, 45 },
@@ -3,14 +3,15 @@ const merge = require('webpack-merge'); @@ -3,14 +3,15 @@ const merge = require('webpack-merge');
3 const path = require('path'); 3 const path = require('path');
4 const HtmlWebpackPlugin = require('html-webpack-plugin'); 4 const HtmlWebpackPlugin = require('html-webpack-plugin');
5 const MiniCssExtractPlugin = require('mini-css-extract-plugin'); 5 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
6 -const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; 6 +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
  7 + .BundleAnalyzerPlugin;
7 const VueSSRClientPlugin = require('vue-server-renderer/client-plugin'); 8 const VueSSRClientPlugin = require('vue-server-renderer/client-plugin');
8 let baseConfig = require('./webpack.base.conf'); 9 let baseConfig = require('./webpack.base.conf');
9 const isProd = process.env.NODE_ENV === 'production'; 10 const isProd = process.env.NODE_ENV === 'production';
10 11
11 const webpackConfig = merge(baseConfig, { 12 const webpackConfig = merge(baseConfig, {
12 entry: { 13 entry: {
13 - app: './apps/entry-client.js' 14 + app: './apps/entry-client.js',
14 }, 15 },
15 optimization: { 16 optimization: {
16 runtimeChunk: true, 17 runtimeChunk: true,
@@ -23,7 +24,7 @@ const webpackConfig = merge(baseConfig, { @@ -23,7 +24,7 @@ const webpackConfig = merge(baseConfig, {
23 priority: -10, 24 priority: -10,
24 chunks: 'all', 25 chunks: 'all',
25 name: 'vendors', 26 name: 'vendors',
26 - test: /[\\/]node_modules[\\/]/ 27 + test: /[\\/]node_modules[\\/]/,
27 }, 28 },
28 vue: { 29 vue: {
29 priority: 1, 30 priority: 1,
@@ -48,9 +49,9 @@ const webpackConfig = merge(baseConfig, { @@ -48,9 +49,9 @@ const webpackConfig = merge(baseConfig, {
48 chunks: 'all', 49 chunks: 'all',
49 name: 'lottie', 50 name: 'lottie',
50 test: /lottie-web/, 51 test: /lottie-web/,
51 - }  
52 - }  
53 - } 52 + },
  53 + },
  54 + },
54 }, 55 },
55 module: { 56 module: {
56 rules: [ 57 rules: [
@@ -63,10 +64,12 @@ const webpackConfig = merge(baseConfig, { @@ -63,10 +64,12 @@ const webpackConfig = merge(baseConfig, {
63 { 64 {
64 loader: 'sass-loader', 65 loader: 'sass-loader',
65 options: { 66 options: {
66 - sourceMap: isProd  
67 - }  
68 - }]  
69 - }, { 67 + sourceMap: isProd,
  68 + },
  69 + },
  70 + ],
  71 + },
  72 + {
70 test: /\.styl(us)?$/, 73 test: /\.styl(us)?$/,
71 use: [ 74 use: [
72 isProd ? MiniCssExtractPlugin.loader : 'vue-style-loader', 75 isProd ? MiniCssExtractPlugin.loader : 'vue-style-loader',
@@ -77,47 +80,52 @@ const webpackConfig = merge(baseConfig, { @@ -77,47 +80,52 @@ const webpackConfig = merge(baseConfig, {
77 options: { 80 options: {
78 sourceMap: isProd, 81 sourceMap: isProd,
79 'resolve url': true, 82 'resolve url': true,
80 - import: [path.resolve(__dirname, '../apps/statics/scss/theme.styl')]  
81 - }  
82 - }]  
83 - }, { 83 + import: [
  84 + path.resolve(__dirname, '../apps/statics/scss/theme.styl'),
  85 + ],
  86 + },
  87 + },
  88 + ],
  89 + },
  90 + {
84 test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 91 test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
85 use: { 92 use: {
86 loader: 'file-loader', 93 loader: 'file-loader',
87 options: { 94 options: {
88 - name: 'static/img/[name].[hash:7].[ext]'  
89 - }  
90 - }  
91 - }, { 95 + name: 'static/img/[name].[hash:7].[ext]',
  96 + },
  97 + },
  98 + },
  99 + {
92 test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 100 test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
93 use: { 101 use: {
94 loader: 'file-loader', 102 loader: 'file-loader',
95 options: { 103 options: {
96 - name: 'static/img/[name].[hash:7].[ext]'  
97 - }  
98 - }  
99 - }  
100 - ] 104 + name: 'static/img/[name].[hash:7].[ext]',
  105 + },
  106 + },
  107 + },
  108 + ],
101 }, 109 },
102 resolve: { 110 resolve: {
103 alias: { 111 alias: {
104 'create-api': 'common/create-api-client.js', 112 'create-api': 'common/create-api-client.js',
105 - 'report-error': 'common/report-error-client.js'  
106 - } 113 + 'report-error': 'common/report-error-client.js',
  114 + },
107 }, 115 },
108 plugins: [ 116 plugins: [
109 new VueSSRClientPlugin({ 117 new VueSSRClientPlugin({
110 - filename: '../../manifest.json' 118 + filename: '../../manifest.json',
111 }), 119 }),
112 new webpack.DefinePlugin({ 120 new webpack.DefinePlugin({
113 - 'process.env.VUE_ENV': '"client"' 121 + 'process.env.VUE_ENV': '"client"',
114 }), 122 }),
115 new HtmlWebpackPlugin({ 123 new HtmlWebpackPlugin({
116 filename: isProd ? '../../degrade.html' : 'degrade.html', 124 filename: isProd ? '../../degrade.html' : 'degrade.html',
117 template: 'apps/index.html', 125 template: 'apps/index.html',
118 - inject: true  
119 - })  
120 - ] 126 + inject: true,
  127 + }),
  128 + ],
121 }); 129 });
122 130
123 if (process.argv.some(a => a === '--report')) { 131 if (process.argv.some(a => a === '--report')) {
@@ -127,8 +135,8 @@ if (isProd) { @@ -127,8 +135,8 @@ if (isProd) {
127 webpackConfig.plugins.push( 135 webpackConfig.plugins.push(
128 new MiniCssExtractPlugin({ 136 new MiniCssExtractPlugin({
129 filename: 'static/css/[name].[contenthash].css', 137 filename: 'static/css/[name].[contenthash].css',
130 - allChunks: true  
131 - }) 138 + allChunks: true,
  139 + }),
132 ); 140 );
133 } 141 }
134 module.exports = webpackConfig; 142 module.exports = webpackConfig;
@@ -10,7 +10,6 @@ const isProduction = process.env.NODE_ENV === 'production'; @@ -10,7 +10,6 @@ const isProduction = process.env.NODE_ENV === 'production';
10 const isTest = process.env.NODE_ENV === 'test3'; 10 const isTest = process.env.NODE_ENV === 'test3';
11 11
12 const domains = { 12 const domains = {
13 -  
14 // api: 'http://api.yoho.cn/', 13 // api: 'http://api.yoho.cn/',
15 // service: 'http://service.yoho.cn/', 14 // service: 'http://service.yoho.cn/',
16 // ufo: 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/', 15 // ufo: 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',
@@ -41,13 +40,13 @@ module.exports = { @@ -41,13 +40,13 @@ module.exports = {
41 yohoVerifyUdid: 'ca5c462a-e28b-407d-8061-5e204398e3cc', 40 yohoVerifyUdid: 'ca5c462a-e28b-407d-8061-5e204398e3cc',
42 signExtend: { 41 signExtend: {
43 business_line: 'yohobuy', 42 business_line: 'yohobuy',
44 - business_client: 'h5/xianyu' 43 + business_client: 'h5/xianyu',
45 }, 44 },
46 report: { 45 report: {
47 host: 'badjs.yoho.cn', 46 host: 'badjs.yoho.cn',
48 port: 80, 47 port: 80,
49 db: 'web-apm', 48 db: 'web-apm',
50 - immediate: true 49 + immediate: true,
51 }, 50 },
52 subDomains: { 51 subDomains: {
53 host: '.m.yohobuy.com', 52 host: '.m.yohobuy.com',
@@ -57,7 +56,7 @@ module.exports = { @@ -57,7 +56,7 @@ module.exports = {
57 search: '//search.m.yohobuy.com', 56 search: '//search.m.yohobuy.com',
58 huodong: '//huodong.m.yohobuy.com', 57 huodong: '//huodong.m.yohobuy.com',
59 activity: '//activity.yohobuy.com', 58 activity: '//activity.yohobuy.com',
60 - index: '//m.yohobuy.com' 59 + index: '//m.yohobuy.com',
61 }, 60 },
62 useCache: false, 61 useCache: false,
63 loggers: { 62 loggers: {
@@ -71,7 +70,7 @@ module.exports = { @@ -71,7 +70,7 @@ module.exports = {
71 maxsize: Math.pow(1024, 3), 70 maxsize: Math.pow(1024, 3),
72 timestamp() { 71 timestamp() {
73 return new Date().toString(); 72 return new Date().toString();
74 - } 73 + },
75 }, 74 },
76 errorFile: { 75 errorFile: {
77 close: true, 76 close: true,
@@ -84,14 +83,14 @@ module.exports = { @@ -84,14 +83,14 @@ module.exports = {
84 handleExceptions: true, 83 handleExceptions: true,
85 timestamp() { 84 timestamp() {
86 return new Date().toString(); 85 return new Date().toString();
87 - } 86 + },
88 }, 87 },
89 console: { 88 console: {
90 level: 'debug', 89 level: 'debug',
91 colorize: 'all', 90 colorize: 'all',
92 prettyPrint: true, 91 prettyPrint: true,
93 - debugStdout: true  
94 - } 92 + debugStdout: true,
  93 + },
95 }, 94 },
96 zookeeperServer: '127.0.0.1:2181', 95 zookeeperServer: '127.0.0.1:2181',
97 jsSdk: '//cdn.yoho.cn/js-sdk/1.3.10/jssdk.js', 96 jsSdk: '//cdn.yoho.cn/js-sdk/1.3.10/jssdk.js',
@@ -112,32 +111,32 @@ module.exports = { @@ -112,32 +111,32 @@ module.exports = {
112 } else { 111 } else {
113 return 1000 * 10; 112 return 1000 * 10;
114 } 113 }
115 - } 114 + },
116 }, 115 },
117 session: { 116 session: {
118 host: '192.168.104.201', 117 host: '192.168.104.201',
119 port: '6379', 118 port: '6379',
120 - prefix: 'yohobuy_session:'  
121 - } 119 + prefix: 'yohobuy_session:',
  120 + },
122 }, 121 },
123 qiniu: { 122 qiniu: {
124 ACCESS_KEY: 'BwWhoJN536BnV3CzlE20AjNKC9O2bP0l5tFpKsDU', 123 ACCESS_KEY: 'BwWhoJN536BnV3CzlE20AjNKC9O2bP0l5tFpKsDU',
125 SECRET_KEY: '_x2VtO7fEmylgjojmLi7qwTBtRm30S8BrO0FxOPK', 124 SECRET_KEY: '_x2VtO7fEmylgjojmLi7qwTBtRm30S8BrO0FxOPK',
126 - BUCKET_NAME: 'cmsimg01' 125 + BUCKET_NAME: 'cmsimg01',
127 }, 126 },
128 qiniuYohoCdn: { 127 qiniuYohoCdn: {
129 ACCESS_KEY: 'BwWhoJN536BnV3CzlE20AjNKC9O2bP0l5tFpKsDU', 128 ACCESS_KEY: 'BwWhoJN536BnV3CzlE20AjNKC9O2bP0l5tFpKsDU',
130 SECRET_KEY: '_x2VtO7fEmylgjojmLi7qwTBtRm30S8BrO0FxOPK', 129 SECRET_KEY: '_x2VtO7fEmylgjojmLi7qwTBtRm30S8BrO0FxOPK',
131 ORIGIN: 'https://cdn.yoho.cn', 130 ORIGIN: 'https://cdn.yoho.cn',
132 - BUCKET_NAME: 'yohocdn' 131 + BUCKET_NAME: 'yohocdn',
133 }, 132 },
134 mysql: { 133 mysql: {
135 host: 'localhost', 134 host: 'localhost',
136 userName: 'root', 135 userName: 'root',
137 password: 'root', 136 password: 'root',
138 port: '3306', 137 port: '3306',
139 - db: 'yoho_apm_test'  
140 - } 138 + db: 'yoho_apm_test',
  139 + },
141 }; 140 };
142 141
143 if (isProduction) { 142 if (isProduction) {
@@ -167,20 +166,20 @@ if (isProduction) { @@ -167,20 +166,20 @@ if (isProduction) {
167 } else { 166 } else {
168 return 1000 * 10; 167 return 1000 * 10;
169 } 168 }
170 - } 169 + },
171 }, 170 },
172 session: { 171 session: {
173 host: 'redis.web.yohoops.org', 172 host: 'redis.web.yohoops.org',
174 port: '6379', 173 port: '6379',
175 pass: 'redis9646', 174 pass: 'redis9646',
176 - prefix: 'yohobuy_session:'  
177 - } 175 + prefix: 'yohobuy_session:',
  176 + },
178 }, 177 },
179 report: { 178 report: {
180 host: 'badjs.yohoops.org', 179 host: 'badjs.yohoops.org',
181 port: 80, 180 port: 80,
182 db: 'web-apm', 181 db: 'web-apm',
183 - immediate: true 182 + immediate: true,
184 }, 183 },
185 monitorReport: { 184 monitorReport: {
186 host: '10.66.4.25', 185 host: '10.66.4.25',
@@ -198,7 +197,7 @@ if (isProduction) { @@ -198,7 +197,7 @@ if (isProduction) {
198 zippedArchive: true, 197 zippedArchive: true,
199 timestamp() { 198 timestamp() {
200 return new Date().toString(); 199 return new Date().toString();
201 - } 200 + },
202 }, 201 },
203 errorFile: { 202 errorFile: {
204 name: 'error', 203 name: 'error',
@@ -211,31 +210,33 @@ if (isProduction) { @@ -211,31 +210,33 @@ if (isProduction) {
211 handleExceptions: true, 210 handleExceptions: true,
212 timestamp() { 211 timestamp() {
213 return new Date().toString(); 212 return new Date().toString();
214 - } 213 + },
215 }, 214 },
216 console: { 215 console: {
217 close: true, 216 close: true,
218 level: 'info', 217 level: 'info',
219 colorize: 'all', 218 colorize: 'all',
220 prettyPrint: true, 219 prettyPrint: true,
221 - debugStdout: true  
222 - } 220 + debugStdout: true,
  221 + },
223 }, 222 },
224 mysql: { 223 mysql: {
225 host: '10.66.0.139', 224 host: '10.66.0.139',
226 port: '3306', 225 port: '3306',
227 db: 'webapm', 226 db: 'webapm',
228 userName: 'root', 227 userName: 'root',
229 - password: 'yB877Jy7tV6juIYk'  
230 - } 228 + password: 'yB877Jy7tV6juIYk',
  229 + },
231 }); 230 });
232 } else if (isTest) { 231 } else if (isTest) {
233 Object.assign(module.exports, { 232 Object.assign(module.exports, {
234 assetUrl: '//cdn.yoho.cn/yohobuywap-node/', 233 assetUrl: '//cdn.yoho.cn/yohobuywap-node/',
235 domains: { 234 domains: {
236 api: process.env.TEST_API || 'http://api-test3.dev.yohocorp.com/', 235 api: process.env.TEST_API || 'http://api-test3.dev.yohocorp.com/',
237 - ufo: process.env.UFO_API || 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',  
238 - service: process.env.TEST_API || 'http://api-test3.dev.yohocorp.com/' 236 + ufo:
  237 + process.env.UFO_API ||
  238 + 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',
  239 + service: process.env.TEST_API || 'http://api-test3.dev.yohocorp.com/',
239 }, 240 },
240 useCache: false, 241 useCache: false,
241 monitorReport: { 242 monitorReport: {
@@ -254,7 +255,7 @@ if (isProduction) { @@ -254,7 +255,7 @@ if (isProduction) {
254 maxsize: Math.pow(1024, 3), 255 maxsize: Math.pow(1024, 3),
255 timestamp() { 256 timestamp() {
256 return new Date().toString(); 257 return new Date().toString();
257 - } 258 + },
258 }, 259 },
259 errorFile: { 260 errorFile: {
260 name: 'error', 261 name: 'error',
@@ -266,22 +267,22 @@ if (isProduction) { @@ -266,22 +267,22 @@ if (isProduction) {
266 handleExceptions: true, 267 handleExceptions: true,
267 timestamp() { 268 timestamp() {
268 return new Date().toString(); 269 return new Date().toString();
269 - } 270 + },
270 }, 271 },
271 console: { 272 console: {
272 close: false, 273 close: false,
273 level: 'info', 274 level: 'info',
274 colorize: 'all', 275 colorize: 'all',
275 prettyPrint: true, 276 prettyPrint: true,
276 - debugStdout: true  
277 - } 277 + debugStdout: true,
  278 + },
278 }, 279 },
279 mysql: { 280 mysql: {
280 host: '192.168.102.219', 281 host: '192.168.102.219',
281 userName: 'yh_test', 282 userName: 'yh_test',
282 password: 'yh_test', 283 password: 'yh_test',
283 port: '3306', 284 port: '3306',
284 - db: 'yoho_apm_test'  
285 - } 285 + db: 'yoho_apm_test',
  286 + },
286 }); 287 });
287 } 288 }