Procházet zdrojové kódy

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v3.5.1

周立森 před 5 roky
rodič
revize
20df3b006f
1 změnil soubory, kde provedl 5 přidání a 5 odebrání
  1. 5
    5
      src/pages/person/customerAnalysis/analysis.js

+ 5
- 5
src/pages/person/customerAnalysis/analysis.js Zobrazit soubor

@@ -50,10 +50,10 @@ export default class analysis extends Taro.Component {
50 50
     if (value == '0') {
51 51
       querySexInfo('new').then(res => {
52 52
         this.setState({
53
-          sexInfo: res || []
53
+          sexInfo: res.slice(0,3) || []
54 54
         })
55 55
       })
56
-      getEchartDailyInfo('follow').then(res => {
56
+      getEchartDailyInfo('new').then(res => {
57 57
         this.setState({
58 58
           chartInfo: res.map(x => ({ name: `${dayjs(x.day).format('MM月DD日')}`, value: x.customerNum }))
59 59
         })
@@ -62,7 +62,7 @@ export default class analysis extends Taro.Component {
62 62
     } else if (value == '1') {
63 63
       querySexInfo('follow').then(res => {
64 64
         this.setState({
65
-          sexInfo: res || []
65
+          sexInfo: res.slice(0,3) || []
66 66
         })
67 67
       })
68 68
       getEchartDailyInfo('follow').then(res => {
@@ -75,7 +75,7 @@ export default class analysis extends Taro.Component {
75 75
     } else {
76 76
       querySexInfo('visite').then(res => {
77 77
         this.setState({
78
-          sexInfo: res || []
78
+          sexInfo: res.slice(0,3) || []
79 79
         })
80 80
       })
81 81
       getEchartDailyInfo('visite').then(res => {
@@ -94,7 +94,7 @@ export default class analysis extends Taro.Component {
94 94
   componentDidMount() {
95 95
     querySexInfo('new').then(res => {
96 96
       this.setState({
97
-        sexInfo: res || []
97
+        sexInfo: res.slice(0,3) || []
98 98
       })
99 99
     })
100 100
     getEchartDailyInfo('new').then(res => {