Authored by htoooth

Merge branch 'master' into feature/login

# Conflicts:
#	app/pages/auth/login/login.vue
#	server/app.js
1 -{"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/directives/index.js":{"size":0,"mtime":1491443244000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/directives/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/lint-commit.js":{"size":1883,"mtime":1492413976000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/lint-commit.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/app.js":{"size":458,"mtime":1492412724000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/app.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/util.js":{"size":152,"mtime":1492156059000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/util.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.base.conf.js":{"size":3405,"mtime":1492430808000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.base.conf.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.dev.conf.js":{"size":196,"mtime":1492155807000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.dev.conf.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.prod.conf.js":{"size":544,"mtime":1492410496000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.prod.conf.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/config/config.js":{"size":56,"mtime":1490951756000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/config/config.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/filters/index.js":{"size":102,"mtime":1491373576000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/filters/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/filters/money-short.js":{"size":209,"mtime":1491374592000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/filters/money-short.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/app.vue":{"size":170,"mtime":1492413914000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/app.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/index.js":{"size":54,"mtime":1492158379000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/login/index.js":{"size":166,"mtime":1492162219000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/login/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/login/login.vue":{"size":2701,"mtime":1492414013000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/login/login.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/dashboard/dashboard.vue":{"size":348,"mtime":1492163066000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/dashboard/dashboard.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/dashboard/index.js":{"size":182,"mtime":1492162754000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/dashboard/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/index.js":{"size":111,"mtime":1492162620000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/overview/index.js":{"size":170,"mtime":1492412737000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/overview/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/index.js":{"size":266,"mtime":1492163177000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/layout.vue":{"size":3754,"mtime":1492162425000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/layout.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/services/service.home.js":{"size":260,"mtime":1492406644000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/services/service.home.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/app.js":{"size":1142,"mtime":1492430773000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/app.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/config.js":{"size":1509,"mtime":1492430707000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/config.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/context.js":{"size":633,"mtime":1492422538000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/context.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/util.js":{"size":450,"mtime":1492430250000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/util.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/controllers/index.js":{"size":441,"mtime":1492430936000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/controllers/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/controllers/user.js":{"size":694,"mtime":1492431225000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/controllers/user.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/auth.js":{"size":328,"mtime":1492137531000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/auth.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/before.js":{"size":582,"mtime":1492138276000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/before.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/error.js":{"size":454,"mtime":1492137829000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/error.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/index.js":{"size":276,"mtime":1492135839000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/proxy.js":{"size":358,"mtime":1492138303000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/proxy.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/overview/overview.vue":{"size":391,"mtime":1492414048000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/overview/overview.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/service/user-model.js":{"size":442,"mtime":1492430627000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/service/user-model.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/api.js":{"size":1884,"mtime":1492431316000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/api.js","messages":[],"errorCount":0,"warningCount":0}}}  
  1 +{"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/directives/index.js":{"size":0,"mtime":1491443244000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/directives/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/lint-commit.js":{"size":1883,"mtime":1492413976000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/lint-commit.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/app.js":{"size":607,"mtime":1492481367000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/app.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/util.js":{"size":152,"mtime":1492156059000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/util.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.base.conf.js":{"size":3405,"mtime":1492430808000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.base.conf.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.dev.conf.js":{"size":196,"mtime":1492155807000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.dev.conf.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.prod.conf.js":{"size":544,"mtime":1492410496000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/build/webpack.prod.conf.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/config/config.js":{"size":200,"mtime":1492482132000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/config/config.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/filters/index.js":{"size":102,"mtime":1491373576000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/filters/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/filters/money-short.js":{"size":209,"mtime":1491374592000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/filters/money-short.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/app.vue":{"size":170,"mtime":1492413914000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/app.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/index.js":{"size":54,"mtime":1492158379000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/login/index.js":{"size":166,"mtime":1492162219000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/login/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/login/login.vue":{"size":2896,"mtime":1492481965000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/auth/login/login.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/dashboard/dashboard.vue":{"size":348,"mtime":1492163066000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/dashboard/dashboard.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/dashboard/index.js":{"size":182,"mtime":1492162754000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/dashboard/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/index.js":{"size":111,"mtime":1492162620000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/overview/index.js":{"size":170,"mtime":1492412737000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/overview/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/index.js":{"size":266,"mtime":1492163177000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/layout.vue":{"size":3754,"mtime":1492162425000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/layout.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/services/service.home.js":{"size":260,"mtime":1492406644000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/services/service.home.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/app.js":{"size":1175,"mtime":1492480665000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/app.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/config.js":{"size":1349,"mtime":1492482071000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/config.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/context.js":{"size":633,"mtime":1492422538000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/context.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/util.js":{"size":450,"mtime":1492430250000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/util.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/controllers/index.js":{"size":441,"mtime":1492430936000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/controllers/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/controllers/user.js":{"size":694,"mtime":1492431225000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/controllers/user.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/auth.js":{"size":328,"mtime":1492137531000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/auth.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/before.js":{"size":582,"mtime":1492138276000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/before.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/error.js":{"size":454,"mtime":1492137829000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/error.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/index.js":{"size":276,"mtime":1492135839000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/index.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/proxy.js":{"size":358,"mtime":1492138303000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/middleware/proxy.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/overview/overview.vue":{"size":391,"mtime":1492414048000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/pages/home/overview/overview.vue","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/api.js":{"size":1834,"mtime":1492482197000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/api.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/middleware.js":{"size":540,"mtime":1492431336000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/server/common/middleware.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/config/apiDomain.js":{"size":89,"mtime":1492482094000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/config/apiDomain.js","messages":[],"errorCount":0,"warningCount":0}},"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/plugins/yoho-plugin.js":{"size":293,"mtime":1492482009000,"hashOfConfig":"q2ce8q","results":{"filePath":"/Users/chenfeng/Documents/source/yoho/yoho-shop-manage/app/plugins/yoho-plugin.js","messages":[],"errorCount":0,"warningCount":0}}}
@@ -4,14 +4,20 @@ import VueCookie from 'vue-cookie'; @@ -4,14 +4,20 @@ import VueCookie from 'vue-cookie';
4 import Router from 'vue-router'; 4 import Router from 'vue-router';
5 import App from './pages/app'; 5 import App from './pages/app';
6 import Routers from './pages'; 6 import Routers from './pages';
  7 +import yohoPlugin from './plugins/yoho-plugin';
7 import './filters'; 8 import './filters';
8 import './directives'; 9 import './directives';
9 import 'iview/dist/styles/iview.css'; 10 import 'iview/dist/styles/iview.css';
10 import 'common.scss'; 11 import 'common.scss';
  12 +import config from 'config';
11 13
12 Vue.use(Router); 14 Vue.use(Router);
13 Vue.use(iView); 15 Vue.use(iView);
14 Vue.use(VueCookie); 16 Vue.use(VueCookie);
  17 +Vue.use(yohoPlugin, {
  18 + config,
  19 + apiDomains: config.apiDomains
  20 +});
15 21
16 new Vue({ 22 new Vue({
17 el: '#app', 23 el: '#app',
  1 +// api调用列表
  2 +let domainApis = {
  3 + login: '/login'
  4 +};
  5 +
  6 +export default domainApis;
  1 +import axios from 'axios';
  2 +import apiDomain from './apiDomain';
  3 +
  4 +axios.defaults.baseURL = 'http://localhost:6008';
  5 +axios.defaults.responseType = 'json';
  6 +
1 export default { 7 export default {
2 - apiURL: 'http://run.yohops.com' 8 + apiDomains: apiDomain
3 }; 9 };
@@ -31,9 +31,6 @@ const api = require('./api'); @@ -31,9 +31,6 @@ const api = require('./api');
31 31
32 export default { 32 export default {
33 name: 'login', 33 name: 'login',
34 - beforeCreate() {  
35 - this.$root.$emit('layout', false);  
36 - },  
37 methods: { 34 methods: {
38 handleSubmit(name) { 35 handleSubmit(name) {
39 this.$refs[name].validate((valid) => { 36 this.$refs[name].validate((valid) => {
  1 +/**
  2 + * 插件
  3 + */
  4 +const yohoPlugin = {
  5 + install(Vue, options) {
  6 + if (options.apiDomains) {
  7 + Vue.prototype.$api = options.apiDomains;
  8 + }
  9 + if (options.config) {
  10 + Vue.prototype.$config = options.config;
  11 + }
  12 + }
  13 +};
  14 +
  15 +export default yohoPlugin;
@@ -21,6 +21,7 @@ global.yoho = { @@ -21,6 +21,7 @@ global.yoho = {
21 logger, 21 logger,
22 helpers, 22 helpers,
23 config, 23 config,
  24 + apiDomain: config.apiDomain
24 co: global.Promise.coroutine 25 co: global.Promise.coroutine
25 }; 26 };
26 27
@@ -19,7 +19,7 @@ class Api extends Context { @@ -19,7 +19,7 @@ class Api extends Context {
19 get(url, data, headers) { 19 get(url, data, headers) {
20 return this.parse(() => { 20 return this.parse(() => {
21 return request.get({ 21 return request.get({
22 - url: `${this.domain}/${url}`, 22 + url,
23 qs: data, 23 qs: data,
24 headers, 24 headers,
25 }); 25 });
@@ -28,7 +28,7 @@ class Api extends Context { @@ -28,7 +28,7 @@ class Api extends Context {
28 post(url, data, headers) { 28 post(url, data, headers) {
29 return this.parse(() => { 29 return this.parse(() => {
30 return request.post({ 30 return request.post({
31 - url: `${this.domain}/${url}`, 31 + url,
32 form: data, 32 form: data,
33 headers, 33 headers,
34 }); 34 });
  1 +const _ = require('lodash');
  2 +
  3 +// api调用列表
  4 +let domainApis = {
  5 + auth: {
  6 + login: '/service/account/v1/Profile/login'
  7 + }
  8 +};
  9 +
  10 +// 域名列表
  11 +const domains = {
  12 + auth: 'http://serve.yohobuy.com'
  13 +};
  14 +
  15 +_.each(domainApis, (apis, domainName) => {
  16 + _.each(apis, (url, api) => {
  17 + apis[api] = _.get(domains, domainName, '') + url;
  18 + });
  19 +});
  20 +
  21 +
  22 +module.exports = domainApis;
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 6
7 'use strict'; 7 'use strict';
8 const _ = require('lodash'); 8 const _ = require('lodash');
  9 +const apiDomain = require('./apiDomain');
9 10
10 const isProd = process.env.NODE_ENV === 'production'; 11 const isProd = process.env.NODE_ENV === 'production';
11 const isTest = process.env.NODE_ENV === 'test'; 12 const isTest = process.env.NODE_ENV === 'test';
@@ -18,16 +19,7 @@ const config = { @@ -18,16 +19,7 @@ const config = {
18 siteUrl: '//shop.yohobuy.com', 19 siteUrl: '//shop.yohobuy.com',
19 assetUrl: '//127.0.0.1:5001', 20 assetUrl: '//127.0.0.1:5001',
20 cookieDomain: '.yohobuy.com', 21 cookieDomain: '.yohobuy.com',
21 - apiDomain: {  
22 - // dev  
23 - auth: 'http://serve.yohobuy.com'  
24 -  
25 - // test  
26 - // platform: 'http://10.66.100.6:8088/platform'  
27 -  
28 - // prod  
29 - // platform: 'http://172.31.23.161:8088/platform'  
30 - }, 22 + apiDomain: apiDomain,
31 loggers: { 23 loggers: {
32 infoFile: { 24 infoFile: {
33 close: true, 25 close: true,
@@ -6,12 +6,11 @@ @@ -6,12 +6,11 @@
6 6
7 const Context = require('../common/context'); 7 const Context = require('../common/context');
8 const Api = require('../common/api'); 8 const Api = require('../common/api');
9 -const config = global.yoho.config; 9 +const apiDomain = global.yoho.apiDomain;
10 10
11 class loginModel extends Context { 11 class loginModel extends Context {
12 login(username, password) { 12 login(username, password) {
13 - return this.instance(Api)  
14 - .post(`${config.apiDomain.auth}/service/account/v1/Profile/login`, JSON.stringify([username, password, 2])); 13 + return this.instance(Api).post(apiDomain.auth.login, JSON.stringify([username, password, 2]));
15 } 14 }
16 } 15 }
17 16