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

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

周立森 пре 5 година
родитељ
комит
a55fc55f94

+ 2
- 2
config/dev.js Прегледај датотеку

@@ -5,8 +5,8 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 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 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     // HOST: '"http://192.168.0.84:8080"',

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

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

+ 1
- 1
src/pages/person/customerAnalysis/item/index.js Прегледај датотеку

@@ -27,7 +27,7 @@ export default class Item extends Component {
27 27
           <View className="left">
28 28
             <View className="title">{data.title}</View>
29 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 32
           </View>
33 33
           {data.startDate &&

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

@@ -3,7 +3,7 @@ import { AtTabs, AtTabsPane } from 'taro-ui'
3 3
 import ListView from '@components/ListView'
4 4
 import "taro-ui/dist/style/components/tabs.scss"
5 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 7
 import { connect } from '@tarojs/redux'
8 8
 import './index.scss'
9 9
 import ActivityItem from './item'
@@ -258,13 +258,15 @@ export default class myCustomer extends Taro.Component {
258 258
     )
259 259
   }
260 260
   perfectInformation() {
261
-    const {customerDetail} = this.state
261
+    const { customerDetail } = this.state
262 262
     this.setState({
263 263
       baseVisible: true,
264 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,6 +282,10 @@ export default class myCustomer extends Taro.Component {
280 282
         customerSex: this.state.customerDetail.sex,
281 283
         customerId,
282 284
       }
285
+      Taro.showToast({
286
+        title: '完善信息成功',
287
+        icon: 'none'
288
+      })
283 289
       addFollowRecord(params).then(res => {
284 290
         this.queryFollowRecord(1)
285 291
       })
@@ -332,7 +338,7 @@ export default class myCustomer extends Taro.Component {
332 338
     this.setState({
333 339
       baseInfo: {
334 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,7 +406,7 @@ export default class myCustomer extends Taro.Component {
400 406
             </View>
401 407
             <View className="con-picker" >
402 408
               <View>
403
-                <Picker mode='selector' range={selector} onChange={this.onChange}>
409
+                <Picker mode='selector' range={selector} range-key="buildingTypeName" onChange={this.onChange}>
404 410
                   <View className='picker'>
405 411
                     {baseInfo.demandType || ' '}
406 412
                   </View>
@@ -448,13 +454,12 @@ export default class myCustomer extends Taro.Component {
448 454
     return (
449 455
       <View>
450 456
         {followVisible && this.renderFollowBox()}
451
-        {console.log(this.props)}
452 457
         {baseVisible && this.renderBaseBox()}
453 458
         <View className="user_con">
454 459
           <Image className="bg" src={getThumbnail('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/shop/background.jpg')} ></Image>
455 460
           <Image className="user__left__headimg" src={customerDetail.picture || require('@assets/default-avatar.png')} />
456 461
           <View className='user__left__name'>
457
-            <View className="text">{customerDetail.name}的数据哈酒好多次客户方</View>
462
+            <View className="text">{customerDetail.name}</View>
458 463
             {
459 464
               customerDetail.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
460 465
             }
@@ -491,7 +496,13 @@ export default class myCustomer extends Taro.Component {
491 496
                 <View className="list">
492 497
                   {visitRecord.length && visitRecord.map((item, index) => (
493 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 506
                       <View className="time">{dayjs(item.visitTime).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
496 507
                     </View>
497 508
                   ))

+ 1
- 1
src/pages/project/detail/Around/Pannel.js Прегледај датотеку

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

+ 4
- 1
src/pages/project/detail/Around/Tab.js Прегледај датотеку

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

+ 5
- 3
src/pages/project/detail/Around/index.js Прегледај датотеку

@@ -10,16 +10,18 @@ export default function Around(props) {
10 10
   console.log(detail,"detaildetaildetaildetail")
11 11
   const [lat, lng] = (detail.coordinate || '').split(',')
12 12
   const poiDatas = detail.mapJson ? JSON.parse(detail.mapJson) : []
13
+  const ty = Object.prototype.toString
13 14
 
14 15
   // 展示内容数组
15 16
   const dataList = poiDatas.map((item) => {
16 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 21
     return {
20 22
       ...item,
21 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 Прегледај датотеку

@@ -44,7 +44,7 @@ export const queryCustomerList = (type, payload) => fetch({ url: `${API_CUSTOMER
44 44
  * 获取项目类型
45 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 50
  * @param {*} customerId