Commit 90185cec3287ef52fffc892e2ca4e21ffcfb7ca7
1 parent
a312b338
会员数统计
Showing
4 changed files
with
19 additions
and
6 deletions
.babelrc
0 → 100644
package.json
... | ... | @@ -10,9 +10,11 @@ |
10 | 10 | "build": "node build/build.js" |
11 | 11 | }, |
12 | 12 | "dependencies": { |
13 | + "ajv": "^6.6.2", | |
13 | 14 | "ajv-keywords": "^3.2.0", |
14 | 15 | "axios": "^0.18.0", |
15 | 16 | "babel-polyfill": "^6.26.0", |
17 | + "babel-preset-stage-3": "^6.24.1", | |
16 | 18 | "echarts": "^4.1.0", |
17 | 19 | "element-ui": "^2.0.9", |
18 | 20 | "lib-flexible": "^0.3.2", |
... | ... | @@ -31,6 +33,7 @@ |
31 | 33 | "babel-helper-vue-jsx-merge-props": "^2.0.3", |
32 | 34 | "babel-loader": "^7.1.1", |
33 | 35 | "babel-plugin-syntax-jsx": "^6.18.0", |
36 | + "babel-plugin-transform-object-rest-spread": "^6.26.0", | |
34 | 37 | "babel-plugin-transform-runtime": "^6.22.0", |
35 | 38 | "babel-plugin-transform-vue-jsx": "^3.5.0", |
36 | 39 | "babel-preset-env": "^1.3.2", | ... | ... |
src/api/httpRequest.js
1 | 1 | //引入axios |
2 | 2 | import axios from 'axios' |
3 | -import qs from 'qs' | |
3 | +//import qs from 'qs' | |
4 | 4 | let cancel ,promiseArr = {} |
5 | 5 | const CancelToken = axios.CancelToken; |
6 | 6 | //请求拦截器 // 在发送请求之前做些什么 |
... | ... | @@ -18,6 +18,11 @@ axios.interceptors.request.use(config => { |
18 | 18 | // sysCode: '1001' |
19 | 19 | // } |
20 | 20 | // } |
21 | + config.data = { | |
22 | + ...config.data, | |
23 | + sysCode: '1001' | |
24 | + } | |
25 | + // config.data = qs.stringify(config.data); | |
21 | 26 | return config |
22 | 27 | }, error => { |
23 | 28 | return Promise.reject(error) | ... | ... |
src/components/memberNum/index.vue
... | ... | @@ -37,11 +37,13 @@ |
37 | 37 | }, |
38 | 38 | mounted() { |
39 | 39 | //会员总数 |
40 | - this.memberNumTotal=this.formatNumToStr(); | |
41 | - this.axios.post('urban/intelligence/appuser/queryUserPersonStatistic', { | |
42 | - sysCode: '1001' | |
43 | - }).then((response)=>{ | |
44 | - console.log(response) | |
40 | + | |
41 | + this.axios.post('urban/intelligence/appuser/queryUserPersonStatistic').then((response)=>{ | |
42 | + let data = response.data.data | |
43 | + this.registerNum = data.registerNum | |
44 | + this.memberNumTotal = common.formatNumToStr(this.registerNum); | |
45 | + this.activeUserNum = data.todayActiveNum | |
46 | + this.newUerNum = data.todayRegisterNum | |
45 | 47 | }).catch((response)=>{ |
46 | 48 | console.log(response); |
47 | 49 | }) | ... | ... |