Skip to content

Commit

Permalink
feat: add request API for production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lbwa committed Sep 24, 2018
1 parent 56575ec commit 317e529
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ module.exports = {
'COMPONENTS': path.resolve(PATH.SOURCE_PATH, './components'),
'STYLE': path.resolve(PATH.SOURCE_PATH, './style'),
'STATIC': PATH.STATIC_PATH,
'MOCK': path.resolve(PATH.ROOT_PATH, './mock')
'MOCK': path.resolve(PATH.ROOT_PATH, './mock'),
'SERVICES': path.resolve(PATH.SOURCE_PATH, './services')
}
},
module: {
Expand Down
7 changes: 5 additions & 2 deletions src/view/Analysis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ import {
decimalNumber
} from 'COMPONENTS/utils'
// work with prod mode
// import { getAnalysisData } from 'SERVICES'
// work with dev mode
import { sales, visitors, payments, operations } from 'MOCK/analysis'
Expand All @@ -117,8 +120,8 @@ export default {
},
created () {
// ! Request all analysis data at the created hook
// this.getAnalysisData() // production mode
// production mode
// getAnalysisData().then(this.getAnalysisData)
// ! dev mode
this.getAnalysisData({
Expand Down

0 comments on commit 317e529

Please # to comment.