Преглед изворни кода

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

张延森 пре 5 година
родитељ
комит
9b482c03e2

+ 19
- 0
src/app.scss Прегледај датотеку

@@ -39,4 +39,23 @@
39 39
     transform: translateY(0);
40 40
     opacity: 1;
41 41
   }
42
+}
43
+.at-progress{
44
+  display: flex;
45
+  align-items: center;
46
+  margin-top:20px;
47
+  .at-progress__outer{
48
+    width: 480px;
49
+    background-color: #f5f5f5;
50
+    border-radius:8px;
51
+    height: 12px;
52
+    margin-right: 20px;
53
+    .at-progress__outer-inner-background{
54
+      border-radius:8px;
55
+    }
56
+    .at-progress__content{
57
+      font-size: 32px;
58
+      color: #666;
59
+    }
60
+  }
42 61
 }

+ 0
- 166
src/components/AddChart.js Прегледај датотеку

@@ -1,166 +0,0 @@
1
-import Taro, { Component } from "@tarojs/taro";
2
-import * as echarts from "./ec-canvas/echarts";
3
-function setChartData(chart, data) {
4
-  let option = {
5
-    tooltip: {
6
-      trigger: "axis",
7
-      axisPointer: {
8
-        type: "shadow",
9
-        textStyle: {
10
-          color: "#fff"
11
-        }
12
-      },
13
-    },
14
-    grid: {
15
-        "borderWidth": 0,
16
-        "top": 110,
17
-        "bottom": 95,
18
-        textStyle: {
19
-            color: "#fff"
20
-        }
21
-    },
22
-    dataZoom: [
23
-      {
24
-        type: 'slider',
25
-        start: 0,
26
-        show: false,
27
-        end: 60,
28
-      },
29
-      {
30
-        type: 'inside',
31
-        start: 0,
32
-        end: 60,
33
-        filterMode: 'filter',
34
-      },
35
-    ],
36
-    xAxis: [{
37
-        type: "category",
38
-        axisLine: {
39
-          lineStyle: {
40
-            color: '#90979c'
41
-          }
42
-        },
43
-        splitLine: {
44
-          show: false
45
-        },
46
-        axisTick: {
47
-          show: false
48
-        },
49
-        splitArea: {
50
-          show: false
51
-        },
52
-        axisLabel: {
53
-          interval: 0,
54
-        },
55
-        data: [1,2,3,4,5,6,7,8,9,10,11,12],
56
-    }],
57
-    yAxis: [{
58
-      type: "value",
59
-      splitLine: {
60
-        show: false
61
-      },
62
-      axisLine: {
63
-        lineStyle: {
64
-          color: '#90979c'
65
-        }
66
-      },
67
-      axisTick: {
68
-          show: false
69
-      },
70
-      axisLabel: {
71
-          interval: 0,
72
-      },
73
-      splitArea: {
74
-          show: false
75
-      },
76
-    }],
77
-    series: [
78
-      {
79
-        name: "女",
80
-        type: "bar",
81
-        stack: "总量",
82
-        barWidth: 10,
83
-        label: {
84
-          normal: {
85
-            show: false,
86
-            position: 'top',
87
-            color: '#000'
88
-          }
89
-        },
90
-        itemStyle: {
91
-          normal: {
92
-            barBorderRadius: 20,
93
-            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
94
-              offset: 0,
95
-              color: '#00cefc'
96
-            }, {
97
-              offset: 1,
98
-              color: '#00cefc'
99
-            }]),
100
-          }
101
-        },
102
-        data: data.barData,
103
-      },
104
-      {
105
-        name: "男",
106
-        type: "line",
107
-        stack: "总量",
108
-        symbolSize: 10,
109
-        symbol:'circle',
110
-        itemStyle: {
111
-          normal: {
112
-            color: "green",
113
-            barBorderRadius: 0,
114
-            label: {
115
-              show: false,
116
-              position: "bottom",
117
-            }
118
-          }
119
-        },
120
-        data: data.lineData
121
-      },
122
-    ]
123
-  }
124
-  chart.setOption(option);
125
-}
126
-
127
-export default class AddChart extends Component {
128
-  config = {
129
-    usingComponents: {
130
-      "ec-canvas": "./ec-canvas/ec-canvas"
131
-    }
132
-  };
133
-
134
-  constructor(props) {
135
-    super(props);
136
-  }
137
-
138
-  state = {
139
-    ec: {
140
-      lazyLoad: true
141
-    }
142
-  };
143
-
144
-  refresh(data) {
145
-    this.Chart.init((canvas, width, height) => {
146
-      const chart = echarts.init(canvas, null, {
147
-        width: width,
148
-        height: height
149
-      });
150
-      setChartData(chart, data);
151
-      return chart;
152
-    });
153
-  }
154
-
155
-  refChart = node => (this.Chart = node);
156
-
157
-  render() {
158
-    return (
159
-      <ec-canvas
160
-        ref={this.refChart}
161
-        canvas-id="mychart-area"
162
-        ec={this.state.ec}
163
-      />
164
-    );
165
-  }
166
-}

+ 0
- 74
src/components/LineChart.js Прегледај датотеку

@@ -1,74 +0,0 @@
1
-import Taro, { Component } from "@tarojs/taro";
2
-import * as echarts from "./ec-canvas/echarts";
3
-
4
-function setChartData(chart, data) {
5
-  let option = {
6
-    color: ['#3398DB'],
7
-    xAxis : [
8
-      {
9
-        type: 'category',
10
-        data: [],
11
-        axisTick: {
12
-          alignWithLabel: true
13
-        }
14
-      }
15
-    ],
16
-    yAxis : [
17
-      {
18
-        type : 'value'
19
-      }
20
-    ],
21
-    series : []
22
-  };
23
-  if (data && data.dimensions && data.measures) {
24
-    option.xAxis[0].data = data.dimensions.data
25
-    option.series = data.measures.map(item => {
26
-      return {
27
-        ...item,
28
-        type:'line',
29
-      }
30
-    })
31
-  }
32
-  chart.setOption(option);
33
-}
34
-
35
-export default class LineChart extends Component {
36
-  config = {
37
-    usingComponents: {
38
-      "ec-canvas": "./ec-canvas/ec-canvas"
39
-    }
40
-  };
41
-
42
-  constructor(props) {
43
-    super(props);
44
-  }
45
-
46
-  state = {
47
-    ec: {
48
-      lazyLoad: true
49
-    }
50
-  };
51
-
52
-  refresh(data) {
53
-    this.Chart.init((canvas, width, height) => {
54
-      const chart = echarts.init(canvas, null, {
55
-        width: width,
56
-        height: height
57
-      });
58
-      setChartData(chart, data);
59
-      return chart;
60
-    });
61
-  }
62
-
63
-  refChart = node => (this.Chart = node);
64
-
65
-  render() {
66
-    return (
67
-      <ec-canvas
68
-        ref={this.refChart}
69
-        canvas-id="mychart-area"
70
-        ec={this.state.ec}
71
-      />
72
-    );
73
-  }
74
-}

+ 0
- 90
src/components/MoveChart.js Прегледај датотеку

@@ -1,90 +0,0 @@
1
-import Taro, { Component } from "@tarojs/taro";
2
-import * as echarts from "./ec-canvas/echarts";
3
-
4
-function setChartData(chart, data) {
5
-  let option = {
6
-    tooltip: {
7
-    },
8
-    color: ['#3398DB'],
9
-    xAxis : [
10
-      {
11
-        type: 'category',
12
-        data: [],
13
-        axisTick: {
14
-          alignWithLabel: true
15
-        }
16
-      }
17
-    ],
18
-    dataZoom: [
19
-      {
20
-        type: 'slider',
21
-        start: 0,
22
-        show: false,
23
-        end: 50,
24
-      },
25
-      {
26
-        type: 'inside',
27
-        start: 0,
28
-        end: 50,
29
-        filterMode: 'filter',
30
-      },
31
-    ],
32
-    yAxis : [
33
-      {
34
-        type : 'value'
35
-      }
36
-    ],
37
-    series : []
38
-  };
39
-  if (data && data.dimensions && data.measures) {
40
-    option.xAxis[0].data = data.dimensions.data
41
-    option.series = data.measures.map(item => {
42
-      return {
43
-        ...item,
44
-        type:'bar',
45
-      }
46
-    })
47
-  }
48
-  chart.setOption(option);
49
-}
50
-
51
-export default class MoveChart extends Component {
52
-  config = {
53
-    usingComponents: {
54
-      "ec-canvas": "./ec-canvas/ec-canvas"
55
-    }
56
-  };
57
-
58
-  constructor(props) {
59
-    super(props);
60
-  }
61
-
62
-  state = {
63
-    ec: {
64
-      lazyLoad: true
65
-    }
66
-  };
67
-
68
-  refresh(data) {
69
-    this.Chart.init((canvas, width, height) => {
70
-      const chart = echarts.init(canvas, null, {
71
-        width: width,
72
-        height: height
73
-      });
74
-      setChartData(chart, data);
75
-      return chart;
76
-    });
77
-  }
78
-
79
-  refChart = node => (this.Chart = node);
80
-
81
-  render() {
82
-    return (
83
-      <ec-canvas
84
-        ref={this.refChart}
85
-        canvas-id="mychart-area"
86
-        ec={this.state.ec}
87
-      />
88
-    );
89
-  }
90
-}

+ 1
- 0
src/constants/api.js Прегледај датотеку

@@ -174,3 +174,4 @@ export const API_CUSTOMER_DETAIL = resolvePath('inventory/customer')
174 174
 export const API_VISIT_RECORD = resolvePath('taPersonVisitRecord')
175 175
 export const API_ACTIVITY_LIST_CUSTOMER = resolvePath('customer/activity/list')
176 176
 export const API_FOLLOW_LIST = resolvePath('taCustomerFollowUpRecord')
177
+export const API_SEX_INFO = resolvePath('genderStatistic')

+ 0
- 30
src/pages/Line/Line.js Прегледај датотеку

@@ -1,30 +0,0 @@
1
-import Taro, { Component } from "@tarojs/taro";
2
-import { View } from "@tarojs/components";
3
-import LineChart from '../../components/LineChart'
4
-import "./index.scss";
5
-
6
-export default class Line extends Component {
7
-  config = {
8
-    navigationBarTitleText: "折线图示例"
9
-  };
10
-  componentDidMount() {
11
-    const chartData = {
12
-      dimensions: {
13
-        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
14
-      },
15
-      measures: [{
16
-        data: [10, 52, 200, 334, 390, 330, 220]
17
-      }]
18
-    }
19
-    this.lineChart.refresh(chartData);
20
-  }
21
-  refLineChart = (node) => this.lineChart = node
22
-
23
-  render() {
24
-    return (
25
-      <View className="line-chart">
26
-        <LineChart ref={this.refLineChart} />
27
-      </View>
28
-    );
29
-  }
30
-}

+ 0
- 4
src/pages/Line/index.scss Прегледај датотеку

@@ -1,4 +0,0 @@
1
-.line-chart {
2
-  width: 100%;
3
-  height: 100vh;
4
-}

+ 0
- 40
src/pages/More/More.js Прегледај датотеку

@@ -1,40 +0,0 @@
1
-import Taro, { Component } from "@tarojs/taro";
2
-import { View } from "@tarojs/components";
3
-import MoveChart from '../../components/MoveChart'
4
-import LineChart from '../../components/LineChart'
5
-import "./index.scss";
6
-
7
-
8
-export default class More extends Component {
9
-  config = {
10
-    navigationBarTitleText: "可移动图表示例"
11
-  };
12
-  componentDidMount() {
13
-    const chartData = {
14
-      dimensions: {
15
-        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun','Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
16
-      },
17
-      measures: [{
18
-        data: [10, 52, 200, 334, 390, 330, 220, 334, 390, 330, 220, 10, 52, 200,]
19
-      }]
20
-    }
21
-    this.moveChart.refresh(chartData);
22
-    this.lineChart.refresh(chartData);
23
-  }
24
-  refMoveChart = (node) => this.moveChart = node
25
-
26
-  refLineChart = (node) => this.lineChart = node
27
-
28
-  render() {
29
-    return (
30
-      <View className='container'>
31
-        <View className="move-chart">
32
-          <MoveChart ref={this.refMoveChart} />
33
-        </View>
34
-        <View className="move-chart">
35
-          <LineChart ref={this.refLineChart} />
36
-        </View>
37
-      </View>
38
-    );
39
-  }
40
-}

+ 0
- 7
src/pages/More/index.scss Прегледај датотеку

@@ -1,7 +0,0 @@
1
-.text {
2
-  text-align: center;
3
-}
4
-.move-chart {
5
-  width: 100%;
6
-  height: 50vh;
7
-}

+ 74
- 10
src/pages/person/customerAnalysis/analysis.js Прегледај датотеку

@@ -1,14 +1,14 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import Authorize from '@components/authorize'
3 3
 import { View } from "@tarojs/components";
4
-// import MoveChart from '../../More/More'
5
-// import LineChart from '../../components/LineChart'
6 4
 import './index.scss'
7 5
 import { AtTabs, AtTabsPane, AtProgress } from 'taro-ui'
8 6
 import "taro-ui/dist/style/components/tabs.scss"
9 7
 import "taro-ui/dist/style/components/progress.scss";
10 8
 import { savePoint, updatePoint } from '@services/common'
9
+import { querySexInfo } from '@services/person'
11 10
 import { connect } from '@tarojs/redux'
11
+import PieChart from "../../../components/PieChart";
12 12
 
13 13
 
14 14
 @connect(({ user, city }) => ({ user, city }))
@@ -21,6 +21,7 @@ export default class analysis extends Taro.Component {
21 21
   state = {
22 22
     current: 0,
23 23
     recordId: undefined, // 埋点ID
24
+    sexInfo: [],
24 25
   }
25 26
 
26 27
   componentWillUnmount() {
@@ -29,33 +30,96 @@ export default class analysis extends Taro.Component {
29 30
   }
30 31
 
31 32
   handleClick(value) {
33
+    if (value == '0') {
34
+      querySexInfo('new').then(res => {
35
+        this.setState({
36
+          sexInfo: res || []
37
+        })
38
+      })
39
+    } else if (value == '1') {
40
+      querySexInfo('follow').then(res => {
41
+        this.setState({
42
+          sexInfo: res || []
43
+        })
44
+      })
45
+    } else {
46
+      querySexInfo('visite ').then(res => {
47
+        this.setState({
48
+          sexInfo: res || []
49
+        })
50
+      })
51
+    }
52
+
32 53
     this.setState({
33 54
       current: value
34
-    }, )
55
+    })
56
+
35 57
   }
36 58
 
59
+  componentDidMount() {
60
+    querySexInfo('new').then(res => {
61
+      this.setState({
62
+        sexInfo: res || []
63
+      })
64
+    })
65
+    const chartData = [
66
+      { value: 335, name: '直接访问' },
67
+      { value: 310, name: '邮件营销' },
68
+      { value: 234, name: '联盟广告' },
69
+      { value: 135, name: '视频广告' },
70
+      { value: 1548, name: '搜索引擎' }
71
+    ];
72
+    this.pieChart.refresh(chartData);
73
+  }
74
+  refPieChart = (node) => this.pieChart = node
37 75
 
38 76
   render() {
39 77
 
40 78
     const tabList = [{ title: '新增客户' }, { title: '跟进客户' }, { title: '到访客户' }]
79
+    const { sexInfo } = this.state
41 80
 
42 81
     return (
43 82
       <View>
44 83
         <AtTabs className="tab-bar" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
45 84
           <AtTabsPane current={this.state.current} index={0} >
46 85
             <View>
47
-              {/* <MoveChart/> */}
48
-              {/* <View className="sex-box">
49
-                <View className="sex">性别</View>
50
-                <AtProgress percent={25} strokeWidth={6} color='#FF4949' />
51
-              </View> */}
86
+              <PieChart ref={this.refPieChart} />
87
+              <View style="height:20rpx;background:#f5f5f5;"> </View>
88
+              <View style="padding: 40rpx;">
89
+                <View style="font-size: 36rpx;color: #666;margin-bottom:20rpx;">性别</View>
90
+                {
91
+                  sexInfo.map(item => (
92
+                    <View style="display: flex;align-items: center;"><View style="font-size: 32rpx;color: #666;min-width:80rpx">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}</View><AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color={item.genderType == 1 ? '#BB9C79' : item.genderType == 2 ? '#F6B61D' : '#A2A2A2'} /></View>
93
+                  ))
94
+                }
95
+              </View>
52 96
             </View>
53 97
           </AtTabsPane>
54 98
           <AtTabsPane current={this.state.current} index={1}>
55
-            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页二的内容</View>
99
+            <View>
100
+              <PieChart ref={this.refPieChart} />
101
+              <View style="padding: 40rpx;">
102
+                <View style="font-size: 32rpx;color: #666;">性别</View>
103
+                {
104
+                  sexInfo.map(item => (
105
+                    <View style="display: flex;align-items: center;">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}<AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color='#FF4949' /></View>
106
+                  ))
107
+                }
108
+              </View>
109
+            </View>
56 110
           </AtTabsPane>
57 111
           <AtTabsPane current={this.state.current} index={2}>
58
-            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页三的内容</View>
112
+            <View>
113
+              <PieChart ref={this.refPieChart} />
114
+              <View style="padding: 40rpx;">
115
+                <View style="font-size: 32rpx;color: #666;">性别</View>
116
+                {
117
+                  sexInfo.map(item => (
118
+                    <View style="display: flex;align-items: center;">{item.genderType == 1 ? '男' : item.genderType == 2 ? '女' : '未知'}<AtProgress percent={(item.percentage * 100).toFixed(2)} strokeWidth={6} color='#FF4949' /></View>
119
+                  ))
120
+                }
121
+              </View>
122
+            </View>
59 123
           </AtTabsPane>
60 124
         </AtTabs>
61 125
       </View>

+ 9
- 6
src/pages/person/customerAnalysis/index.scss Прегледај датотеку

@@ -101,6 +101,7 @@
101 101
   }
102 102
 }
103 103
 
104
+
104 105
 .user_con{
105 106
   margin: 0 20px 40px 20px;
106 107
   height:256px;
@@ -291,8 +292,13 @@
291 292
         align-items: center;
292 293
         justify-content: space-between;
293 294
         width:456px;
294
-        padding: 16px;
295
+        height:48px ;
296
+        line-height: 48px;
297
+        padding: 0 16px;
295 298
         background-color: #f4f4f4;
299
+        .picker{
300
+          width: 400px;
301
+        }
296 302
       }
297 303
       .right-icon{
298 304
         width:18px;
@@ -300,6 +306,7 @@
300 306
         border-top: 2px solid #999;
301 307
         border-right: 2px solid #999;
302 308
         transform:rotate(45deg);
309
+        float: right;
303 310
       }
304 311
       .bottom-btn{
305 312
         margin: 30px auto 0 auto;
@@ -378,10 +385,6 @@
378 385
           border-radius:12px;
379 386
           border:2px solid $primary-color;
380 387
         }
381
-      }
382
-      
388
+      } 
383 389
     }
384
-  
385
-  
386
-   
387 390
   }

+ 48
- 18
src/pages/person/customerAnalysis/myCustomer.js Прегледај датотеку

@@ -2,7 +2,7 @@ import Taro, { Component } from '@tarojs/taro';
2 2
 import { AtTabs, AtTabsPane } from 'taro-ui'
3 3
 import "taro-ui/dist/style/components/tabs.scss"
4 4
 import { savePoint, updatePoint } from '@services/common'
5
-import { getCustomerDetail, getVisitRecord, getActivityList, getFollowRecord, addFollowRecord } from '@services/person'
5
+import { getCustomerDetail, getVisitRecord, getActivityList, getFollowRecord, addFollowRecord, commitCustomerInfo } from '@services/person'
6 6
 import { connect } from '@tarojs/redux'
7 7
 import './index.scss'
8 8
 import ActivityItem from './item'
@@ -198,46 +198,76 @@ export default class myCustomer extends Taro.Component {
198 198
       baseInfo: this.state.customerDetail,
199 199
     })
200 200
   }
201
+  // 保存
201 202
   baseSaveBtn() {
203
+    const { customerId } = this.$router.params
204
+    const { baseInfo } = this.state
205
+    commitCustomerInfo(customerId, baseInfo).then(res => {
206
+      this.setState({
207
+        customerDetail: res || {}
208
+      })
209
+    })
202 210
     this.setState({
203 211
       baseVisible: false,
204 212
     })
205 213
   }
214
+  // 取消
206 215
   baseCancelBtn() {
207 216
     this.setState({
208 217
       baseVisible: false,
209 218
     })
210 219
   }
211
-  onPriceRangeChange(e) {
220
+  onNameChange(e) {
212 221
     this.setState({
213 222
       baseInfo: {
214
-        ...baseInfo,
215
-        priceRange: e.target.value
223
+        ...this.state.baseInfo,
224
+        name: e.target.value
216 225
       }
217 226
     })
218 227
   }
219
-  onBaseTextareaChange(e) {
228
+  onSexChange = e => {
229
+
230
+    let sex = e.detail.value == '0' ? '1' : e.detail.value == '1' ? '2' : ''
220 231
     this.setState({
221 232
       baseInfo: {
222
-        ...baseInfo,
223
-        describe: e.target.value
233
+        ...this.state.baseInfo,
234
+        sex,
235
+      }
236
+    })
237
+  }
238
+  onManageTypeChange(e) {
239
+    this.setState({
240
+      baseInfo: {
241
+        ...this.state.baseInfo,
242
+        realtyManageType: e.target.value
243
+      }
244
+    })
245
+  }
246
+  onPriceRangeChange(e) {
247
+    this.setState({
248
+      baseInfo: {
249
+        ...this.state.baseInfo,
250
+        priceRange: e.target.value
224 251
       }
225 252
     })
226 253
   }
254
+
255
+
256
+
227 257
   onChange = e => {
228 258
     this.setState({
229 259
       baseInfo: {
230
-        ...baseInfo,
231
-        sex: this.state.selector[e.detail.value]
260
+        ...this.state.baseInfo,
261
+        demandType: this.state.selector[e.detail.value]
232 262
       }
233 263
     })
234 264
   }
235
-  onSexChange = e => {
236
-    console, log(e, "eeeeeeeeeeeeeee")
265
+
266
+  onBaseTextareaChange(e) {
237 267
     this.setState({
238 268
       baseInfo: {
239
-        ...baseInfo,
240
-        sex: this.state.sexSelector[e.detail.value]
269
+        ...this.state.baseInfo,
270
+        describe: e.target.value
241 271
       }
242 272
     })
243 273
   }
@@ -260,7 +290,7 @@ export default class myCustomer extends Taro.Component {
260 290
     })
261 291
   }
262 292
   renderBaseBox() {
263
-    const { baseInfo, desc, selector, selectorChecked, sexSelector, sexSelectorChecked } = this.state
293
+    const { baseInfo, desc, selector, sexSelector } = this.state
264 294
     return (
265 295
       <View className="mask">
266 296
         <View className="base-con">
@@ -278,7 +308,7 @@ export default class myCustomer extends Taro.Component {
278 308
               <View>
279 309
                 <Picker mode='selector' range={sexSelector} onChange={this.onSexChange}>
280 310
                   <View className='picker'>
281
-                    {baseInfo.sex == '1' ? '男' : baseInfo.sex == '1' ? '女' : ''}
311
+                    {baseInfo.sex == '1' ? '男' : baseInfo.sex == '2' ? '女' : ' '}
282 312
                   </View>
283 313
                 </Picker>
284 314
               </View>
@@ -299,7 +329,7 @@ export default class myCustomer extends Taro.Component {
299 329
               <View>
300 330
                 <Picker mode='selector' range={selector} onChange={this.onChange}>
301 331
                   <View className='picker'>
302
-                    {baseInfo.demandType || ''}
332
+                    {baseInfo.demandType || ' '}
303 333
                   </View>
304 334
                 </Picker>
305 335
               </View>
@@ -377,7 +407,7 @@ export default class myCustomer extends Taro.Component {
377 407
               {visitRecord.length && visitRecord.map(item => (
378 408
                 <View className="record-item">
379 409
                   <View className="title" >{item.activity}</View>
380
-                  <View className="time">{dayjs(item.visitTime).format('YYYY年MM月DD日 HH:mm:ss') || ''}</View>
410
+                  <View className="time">{dayjs(item.visitTime).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
381 411
                 </View>
382 412
               ))
383 413
               }
@@ -415,7 +445,7 @@ export default class myCustomer extends Taro.Component {
415 445
                 <View>
416 446
                   <View style=" display:flex;justify-content: space-between;align-items: center;color: #333;font-size: 16px; margin-bottom:20rpx;">
417 447
                     <View style=" display: flex;align-items: center;"><View style="width:8px;height:8px;margin-right:20rpx;display:inline-block;background:rgba(246,182,29,1);border-radius: 50%;"></View>{item.recordType}</View>
418
-                    <View classNam="time" style=" font-size: 26rpx;color: #999;">{dayjs(item.createDate).format('YYYY年MM月DD日 HH:mm:ss') || ''}</View>
448
+                    <View classNam="time" style=" font-size: 26rpx;color: #999;">{dayjs(item.createDate).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
419 449
                   </View>
420 450
                   {
421 451
                     item.recordContent &&

+ 14
- 2
src/services/person.js Прегледај датотеку

@@ -5,10 +5,17 @@ import {
5 5
   API_CUSTOMER_DETAIL,
6 6
   API_VISIT_RECORD,
7 7
   API_ACTIVITY_LIST_CUSTOMER,
8
-  API_FOLLOW_LIST
8
+  API_FOLLOW_LIST,
9
+  API_SEX_INFO,
9 10
 } from '@constants/api'
10 11
 
11 12
 
13
+/**
14
+ * 获取客户分析性别数据
15
+ * @param {*} type
16
+ */
17
+export const querySexInfo = (type, payload) => fetch({ url: `${API_SEX_INFO}/${type}`, payload })
18
+
12 19
 /**
13 20
  * 获取我的客户数据
14 21
  * @param {*} payload
@@ -21,10 +28,15 @@ export const queryMyCustomer = payload => fetch({ url: API_MY_CUSTOMER, payload
21 28
  */
22 29
 export const queryCustomerList = (type, payload) => fetch({ url: `${API_CUSTOMER_LIST}/${type}`, payload })
23 30
 /**
24
- * 获取客户列表
31
+ * 获取客户详情
25 32
  * @param {*} customerId  
26 33
  */
27 34
 export const getCustomerDetail = (customerId, payload) => fetch({ url: `${API_CUSTOMER_DETAIL}/${customerId}`, payload })
35
+/**
36
+ * 完善客户信息
37
+ * @param {*} customerId  
38
+ */
39
+export const commitCustomerInfo = (customerId, payload) => fetch({ url: `${API_CUSTOMER_DETAIL}/${customerId}`, payload, method: 'PUT' })
28 40
 /**
29 41
  * 获取访问记录
30 42
  * @param {*} payload