Authored by htoooth

Merge branch 'master' into feature/login

# Conflicts:
#	app/pages/auth/login/login.vue
#	server/app.js
{"/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}}}
\ No newline at end of file
{"/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}}}
\ No newline at end of file
... ...
... ... @@ -4,14 +4,20 @@ import VueCookie from 'vue-cookie';
import Router from 'vue-router';
import App from './pages/app';
import Routers from './pages';
import yohoPlugin from './plugins/yoho-plugin';
import './filters';
import './directives';
import 'iview/dist/styles/iview.css';
import 'common.scss';
import config from 'config';
Vue.use(Router);
Vue.use(iView);
Vue.use(VueCookie);
Vue.use(yohoPlugin, {
config,
apiDomains: config.apiDomains
});
new Vue({
el: '#app',
... ...
// api调用列表
let domainApis = {
login: '/login'
};
export default domainApis;
... ...
import axios from 'axios';
import apiDomain from './apiDomain';
axios.defaults.baseURL = 'http://localhost:6008';
axios.defaults.responseType = 'json';
export default {
apiURL: 'http://run.yohops.com'
apiDomains: apiDomain
};
... ...
... ... @@ -31,9 +31,6 @@ const api = require('./api');
export default {
name: 'login',
beforeCreate() {
this.$root.$emit('layout', false);
},
methods: {
handleSubmit(name) {
this.$refs[name].validate((valid) => {
... ...
/**
* 插件
*/
const yohoPlugin = {
install(Vue, options) {
if (options.apiDomains) {
Vue.prototype.$api = options.apiDomains;
}
if (options.config) {
Vue.prototype.$config = options.config;
}
}
};
export default yohoPlugin;
... ...
... ... @@ -21,6 +21,7 @@ global.yoho = {
logger,
helpers,
config,
apiDomain: config.apiDomain
co: global.Promise.coroutine
};
... ...
... ... @@ -19,7 +19,7 @@ class Api extends Context {
get(url, data, headers) {
return this.parse(() => {
return request.get({
url: `${this.domain}/${url}`,
url,
qs: data,
headers,
});
... ... @@ -28,7 +28,7 @@ class Api extends Context {
post(url, data, headers) {
return this.parse(() => {
return request.post({
url: `${this.domain}/${url}`,
url,
form: data,
headers,
});
... ...
const _ = require('lodash');
// api调用列表
let domainApis = {
auth: {
login: '/service/account/v1/Profile/login'
}
};
// 域名列表
const domains = {
auth: 'http://serve.yohobuy.com'
};
_.each(domainApis, (apis, domainName) => {
_.each(apis, (url, api) => {
apis[api] = _.get(domains, domainName, '') + url;
});
});
module.exports = domainApis;
... ...
... ... @@ -6,6 +6,7 @@
'use strict';
const _ = require('lodash');
const apiDomain = require('./apiDomain');
const isProd = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
... ... @@ -18,16 +19,7 @@ const config = {
siteUrl: '//shop.yohobuy.com',
assetUrl: '//127.0.0.1:5001',
cookieDomain: '.yohobuy.com',
apiDomain: {
// dev
auth: 'http://serve.yohobuy.com'
// test
// platform: 'http://10.66.100.6:8088/platform'
// prod
// platform: 'http://172.31.23.161:8088/platform'
},
apiDomain: apiDomain,
loggers: {
infoFile: {
close: true,
... ...
... ... @@ -6,12 +6,11 @@
const Context = require('../common/context');
const Api = require('../common/api');
const config = global.yoho.config;
const apiDomain = global.yoho.apiDomain;
class loginModel extends Context {
login(username, password) {
return this.instance(Api)
.post(`${config.apiDomain.auth}/service/account/v1/Profile/login`, JSON.stringify([username, password, 2]));
return this.instance(Api).post(apiDomain.auth.login, JSON.stringify([username, password, 2]));
}
}
... ...