Browse Source

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

周立森 5 years ago
parent
commit
a55fc55f94

+ 2
- 2
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
-    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
8
+    //HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
+    //WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
     // HOST: '"http://192.168.0.84:8080"',
12
     // HOST: '"http://192.168.0.84:8080"',

+ 1
- 1
src/pages/person/customerAnalysis/analysis.js View File

135
           })
135
           })
136
         })
136
         })
137
       } else if (params == 'follow') {
137
       } else if (params == 'follow') {
138
-        const arr2 = res.reverse()
139
         getEchartMonthInfo(params).then(res => {
138
         getEchartMonthInfo(params).then(res => {
139
+          const arr2 = res.reverse()
140
           this.setState({
140
           this.setState({
141
             chartInfo2: arr2.map(x => ({ name: `${x.month.substr(4)}月`, value: x.customerNum })) || []
141
             chartInfo2: arr2.map(x => ({ name: `${x.month.substr(4)}月`, value: x.customerNum })) || []
142
           })
142
           })

+ 1
- 1
src/pages/person/customerAnalysis/item/index.js View File

27
           <View className="left">
27
           <View className="left">
28
             <View className="title">{data.title}</View>
28
             <View className="title">{data.title}</View>
29
             {data.startDate &&
29
             {data.startDate &&
30
-              <View className={data.jionStatus == '已签到' ? "status signed " : data.jionStatus == '成功已核销' ? "status primary" : data.jionStatus == '失败' ? "status fail" : "status"}>{data.jionStatus || ''}</View>
30
+              <View className={data.joinStatus == '已签到' ? "status signed " : data.joinStatus == '成功已核销' ? "status primary" : data.joinStatus == '失败' ? "status fail" : "status"}>{data.joinStatus || ''}</View>
31
             }
31
             }
32
           </View>
32
           </View>
33
           {data.startDate &&
33
           {data.startDate &&

+ 20
- 9
src/pages/person/customerAnalysis/myCustomer.js View File

3
 import ListView from '@components/ListView'
3
 import ListView from '@components/ListView'
4
 import "taro-ui/dist/style/components/tabs.scss"
4
 import "taro-ui/dist/style/components/tabs.scss"
5
 import { savePoint, updatePoint } from '@services/common'
5
 import { savePoint, updatePoint } from '@services/common'
6
-import { getCustomerDetail, getVisitRecord, getActivityList, getFollowRecord, addFollowRecord, commitCustomerInfo,getBuildingType } from '@services/person'
6
+import { getCustomerDetail, getVisitRecord, getActivityList, getFollowRecord, addFollowRecord, commitCustomerInfo, getBuildingType } from '@services/person'
7
 import { connect } from '@tarojs/redux'
7
 import { connect } from '@tarojs/redux'
8
 import './index.scss'
8
 import './index.scss'
9
 import ActivityItem from './item'
9
 import ActivityItem from './item'
258
     )
258
     )
259
   }
259
   }
260
   perfectInformation() {
260
   perfectInformation() {
261
-    const {customerDetail} = this.state
261
+    const { customerDetail } = this.state
262
     this.setState({
262
     this.setState({
263
       baseVisible: true,
263
       baseVisible: true,
264
       baseInfo: customerDetail,
264
       baseInfo: customerDetail,
265
     })
265
     })
266
-    getBuildingType(customerDetail.buildingId).then(res=>{
267
-      console.log(res,"1111111111")
266
+    getBuildingType(customerDetail.buildingId).then(res => {
267
+      this.setState({
268
+        selector: res || []
269
+      })
268
     })
270
     })
269
   }
271
   }
270
   // 保存
272
   // 保存
280
         customerSex: this.state.customerDetail.sex,
282
         customerSex: this.state.customerDetail.sex,
281
         customerId,
283
         customerId,
282
       }
284
       }
285
+      Taro.showToast({
286
+        title: '完善信息成功',
287
+        icon: 'none'
288
+      })
283
       addFollowRecord(params).then(res => {
289
       addFollowRecord(params).then(res => {
284
         this.queryFollowRecord(1)
290
         this.queryFollowRecord(1)
285
       })
291
       })
332
     this.setState({
338
     this.setState({
333
       baseInfo: {
339
       baseInfo: {
334
         ...this.state.baseInfo,
340
         ...this.state.baseInfo,
335
-        demandType: this.state.selector[e.detail.value]
341
+        demandType: this.state.selector[e.detail.value].buildingTypeName
336
       }
342
       }
337
     })
343
     })
338
   }
344
   }
400
             </View>
406
             </View>
401
             <View className="con-picker" >
407
             <View className="con-picker" >
402
               <View>
408
               <View>
403
-                <Picker mode='selector' range={selector} onChange={this.onChange}>
409
+                <Picker mode='selector' range={selector} range-key="buildingTypeName" onChange={this.onChange}>
404
                   <View className='picker'>
410
                   <View className='picker'>
405
                     {baseInfo.demandType || ' '}
411
                     {baseInfo.demandType || ' '}
406
                   </View>
412
                   </View>
448
     return (
454
     return (
449
       <View>
455
       <View>
450
         {followVisible && this.renderFollowBox()}
456
         {followVisible && this.renderFollowBox()}
451
-        {console.log(this.props)}
452
         {baseVisible && this.renderBaseBox()}
457
         {baseVisible && this.renderBaseBox()}
453
         <View className="user_con">
458
         <View className="user_con">
454
           <Image className="bg" src={getThumbnail('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/shop/background.jpg')} ></Image>
459
           <Image className="bg" src={getThumbnail('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/shop/background.jpg')} ></Image>
455
           <Image className="user__left__headimg" src={customerDetail.picture || require('@assets/default-avatar.png')} />
460
           <Image className="user__left__headimg" src={customerDetail.picture || require('@assets/default-avatar.png')} />
456
           <View className='user__left__name'>
461
           <View className='user__left__name'>
457
-            <View className="text">{customerDetail.name}的数据哈酒好多次客户方</View>
462
+            <View className="text">{customerDetail.name}</View>
458
             {
463
             {
459
               customerDetail.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
464
               customerDetail.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
460
             }
465
             }
491
                 <View className="list">
496
                 <View className="list">
492
                   {visitRecord.length && visitRecord.map((item, index) => (
497
                   {visitRecord.length && visitRecord.map((item, index) => (
493
                     <View className="record-item" key={index + 'follow'}>
498
                     <View className="record-item" key={index + 'follow'}>
494
-                      <View className="title" >{item.activity}</View>
499
+                      <View className="title" >{item.activity}
500
+                        {
501
+                          (item.activityName || item.buildingName) &&
502
+                          <Text> : </Text>
503
+                        }
504
+                        {item.activityName || item.buildingName || ""}
505
+                      </View>
495
                       <View className="time">{dayjs(item.visitTime).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
506
                       <View className="time">{dayjs(item.visitTime).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
496
                     </View>
507
                     </View>
497
                   ))
508
                   ))

+ 1
- 1
src/pages/project/detail/Around/Pannel.js View File

5
 const posIcon = require('@assets/icons/amap/position.png')
5
 const posIcon = require('@assets/icons/amap/position.png')
6
 
6
 
7
 export default function Pannel(props) {
7
 export default function Pannel(props) {
8
-  console.log(props.dataset,"props.datasetprops.datasetprops.datasetprops.dataset")
8
+  
9
   const { data = [], manualData = [] } = props.dataset || {}
9
   const { data = [], manualData = [] } = props.dataset || {}
10
   const activeKey = props.active
10
   const activeKey = props.active
11
 
11
 

+ 4
- 1
src/pages/project/detail/Around/Tab.js View File

3
 import './style.scss'
3
 import './style.scss'
4
 
4
 
5
 export default function Tab(props) {
5
 export default function Tab(props) {
6
+  
6
   const [current, setCurrent] = useState(props.default || 0)
7
   const [current, setCurrent] = useState(props.default || 0)
8
+  
7
   const tabList = props.dataset ? props.dataset.filter(x => x.num) : []
9
   const tabList = props.dataset ? props.dataset.filter(x => x.num) : []
10
+  
8
   const handleClick = index => () => {
11
   const handleClick = index => () => {
9
     setCurrent(index)
12
     setCurrent(index)
10
     if (typeof props.onChange === 'function') {
13
     if (typeof props.onChange === 'function') {
16
     <View className="around-tab">
19
     <View className="around-tab">
17
       {tabList.map((item, index) => {
20
       {tabList.map((item, index) => {
18
         const { key, label, num } = item || {}
21
         const { key, label, num } = item || {}
19
-        console.log(item,'123456')
22
+        
20
         return (
23
         return (
21
           <View
24
           <View
22
             key={key}
25
             key={key}

+ 5
- 3
src/pages/project/detail/Around/index.js View File

10
   console.log(detail,"detaildetaildetaildetail")
10
   console.log(detail,"detaildetaildetaildetail")
11
   const [lat, lng] = (detail.coordinate || '').split(',')
11
   const [lat, lng] = (detail.coordinate || '').split(',')
12
   const poiDatas = detail.mapJson ? JSON.parse(detail.mapJson) : []
12
   const poiDatas = detail.mapJson ? JSON.parse(detail.mapJson) : []
13
+  const ty = Object.prototype.toString
13
 
14
 
14
   // 展示内容数组
15
   // 展示内容数组
15
   const dataList = poiDatas.map((item) => {
16
   const dataList = poiDatas.map((item) => {
16
     const key = item.key
17
     const key = item.key
17
-    const manualData = (detail[`building${key}`] || '').split(',')
18
-
18
+    const manualData = (detail[`building${key}`] === '' ? [] : detail[`building${key}`].split(','))
19
+    
20
+    console.log(manualData,"manualDatamanualData")
19
     return {
21
     return {
20
       ...item,
22
       ...item,
21
       manualData,
23
       manualData,
22
-      num: (item.data || []).length + manualData.length,
24
+      num: (ty.call(item.data) === '[object String]' ? JSON.parse(item.data) : []).length + manualData.length,
23
     }
25
     }
24
   })
26
   })
25
 
27
 

+ 1
- 1
src/services/person.js View File

44
  * 获取项目类型
44
  * 获取项目类型
45
  * @param {*} buildingId 
45
  * @param {*} buildingId 
46
  */
46
  */
47
-export const getBuildingType = (customerId, payload) => fetch({ url: `${API_BUILDING_TYPE}/${buildingId}`, payload })
47
+export const getBuildingType = (buildingId, payload) => fetch({ url: `${API_BUILDING_TYPE}/${buildingId}`, payload })
48
 /**
48
 /**
49
  * 获取客户详情
49
  * 获取客户详情
50
  * @param {*} customerId  
50
  * @param {*} customerId