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,9 +10,11 @@ | ||
10 | "build": "node build/build.js" | 10 | "build": "node build/build.js" |
11 | }, | 11 | }, |
12 | "dependencies": { | 12 | "dependencies": { |
13 | + "ajv": "^6.6.2", | ||
13 | "ajv-keywords": "^3.2.0", | 14 | "ajv-keywords": "^3.2.0", |
14 | "axios": "^0.18.0", | 15 | "axios": "^0.18.0", |
15 | "babel-polyfill": "^6.26.0", | 16 | "babel-polyfill": "^6.26.0", |
17 | + "babel-preset-stage-3": "^6.24.1", | ||
16 | "echarts": "^4.1.0", | 18 | "echarts": "^4.1.0", |
17 | "element-ui": "^2.0.9", | 19 | "element-ui": "^2.0.9", |
18 | "lib-flexible": "^0.3.2", | 20 | "lib-flexible": "^0.3.2", |
@@ -31,6 +33,7 @@ | @@ -31,6 +33,7 @@ | ||
31 | "babel-helper-vue-jsx-merge-props": "^2.0.3", | 33 | "babel-helper-vue-jsx-merge-props": "^2.0.3", |
32 | "babel-loader": "^7.1.1", | 34 | "babel-loader": "^7.1.1", |
33 | "babel-plugin-syntax-jsx": "^6.18.0", | 35 | "babel-plugin-syntax-jsx": "^6.18.0", |
36 | + "babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
34 | "babel-plugin-transform-runtime": "^6.22.0", | 37 | "babel-plugin-transform-runtime": "^6.22.0", |
35 | "babel-plugin-transform-vue-jsx": "^3.5.0", | 38 | "babel-plugin-transform-vue-jsx": "^3.5.0", |
36 | "babel-preset-env": "^1.3.2", | 39 | "babel-preset-env": "^1.3.2", |
src/api/httpRequest.js
1 | //引入axios | 1 | //引入axios |
2 | import axios from 'axios' | 2 | import axios from 'axios' |
3 | -import qs from 'qs' | 3 | +//import qs from 'qs' |
4 | let cancel ,promiseArr = {} | 4 | let cancel ,promiseArr = {} |
5 | const CancelToken = axios.CancelToken; | 5 | const CancelToken = axios.CancelToken; |
6 | //请求拦截器 // 在发送请求之前做些什么 | 6 | //请求拦截器 // 在发送请求之前做些什么 |
@@ -18,6 +18,11 @@ axios.interceptors.request.use(config => { | @@ -18,6 +18,11 @@ axios.interceptors.request.use(config => { | ||
18 | // sysCode: '1001' | 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 | return config | 26 | return config |
22 | }, error => { | 27 | }, error => { |
23 | return Promise.reject(error) | 28 | return Promise.reject(error) |
src/components/memberNum/index.vue
@@ -37,11 +37,13 @@ | @@ -37,11 +37,13 @@ | ||
37 | }, | 37 | }, |
38 | mounted() { | 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 | }).catch((response)=>{ | 47 | }).catch((response)=>{ |
46 | console.log(response); | 48 | console.log(response); |
47 | }) | 49 | }) |