浏览代码

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

张延森 5 年前
父节点
当前提交
86f09d9236

+ 2
- 2
config/dev.js 查看文件

9
     WSS_HOST: '"wss://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"',
13
-    // WSS_HOST: '"ws://192.168.0.84:8080"',
12
+    HOST: '"http://192.168.0.131:8080"',
13
+    WSS_HOST: '"ws://192.168.0.131:8080"',
14
   },
14
   },
15
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 1
- 0
src/app.js 查看文件

43
       'pages/project/index',
43
       'pages/project/index',
44
       'pages/person/customerAnalysis/followUpCustomer/index',
44
       'pages/person/customerAnalysis/followUpCustomer/index',
45
       'pages/person/customerAnalysis/transactionCustomer/index',
45
       'pages/person/customerAnalysis/transactionCustomer/index',
46
+      'pages/person/customerAnalysis/myCustomer',
46
       'pages/shop/index',
47
       'pages/shop/index',
47
       'pages/activity/activity',
48
       'pages/activity/activity',
48
       'pages/activity/myActivity',
49
       'pages/activity/myActivity',

+ 76
- 16
src/pages/person/customerAnalysis/followUpCustomer/index.js 查看文件

20
     ],
20
     ],
21
     recordId: undefined, // 埋点ID
21
     recordId: undefined, // 埋点ID
22
     inputValue: '',
22
     inputValue: '',
23
-    screenVisible: true,
23
+    screenVisible: false,
24
     statusList: ['全部状态', '认筹', '到访', '签约'],
24
     statusList: ['全部状态', '认筹', '到访', '签约'],
25
     statusIndex: -1,
25
     statusIndex: -1,
26
-    dateSel: '2018-04-22',
26
+    visitDate: '',
27
+    visitDate2: '',
28
+    reportDate: '',
29
+    reportDate2: '',
27
   }
30
   }
28
 
31
 
29
   componentWillUnmount() {
32
   componentWillUnmount() {
52
     })
55
     })
53
     console.log(item, inx, "eeeeeeeeeeee")
56
     console.log(item, inx, "eeeeeeeeeeee")
54
   }
57
   }
55
-  onDateChange = e => {
56
-    console.log(e.detail.value, "e.detail.value")
58
+  onVisitDateChange = e => {
57
     this.setState({
59
     this.setState({
58
-      dateSel: e.detail.value
59
-    },
60
-      console.log(this.state.dateSel, "e.detail.value")
61
-    )
62
-
60
+      visitDate: e.detail.value
61
+    })
62
+  }
63
+  onVisitDateChange2 = e => {
64
+    this.setState({
65
+      visitDate2: e.detail.value
66
+    })
67
+  }
68
+  onReportDateChange = e => {
69
+    this.setState({
70
+      reportDate: e.detail.value
71
+    })
72
+  }
73
+  onReportDateChange2 = e => {
74
+    this.setState({
75
+      reportDate2: e.detail.value
76
+    })
77
+  }
78
+  saveBtn() {
79
+    this.setState({
80
+      screenVisible: false,
81
+    })
82
+  }
83
+  cancelBtn() {
84
+    this.setState({
85
+      screenVisible: false,
86
+    })
87
+  }
88
+  toMyCustomer() {
89
+    Taro.navigateTo({
90
+      url: `/pages/person/customerAnalysis/myCustomer`
91
+    })
63
   }
92
   }
64
   renderScreenBox() {
93
   renderScreenBox() {
65
-    const { statusList, statusIndex, dateSel } = this.state
94
+    const { statusList, statusIndex, visitDate, visitDate2, reportDate, reportDate2 } = this.state
66
     return (
95
     return (
67
       <View className="mask">
96
       <View className="mask">
68
         <View className="content">
97
         <View className="content">
70
           <View className="status-box">
99
           <View className="status-box">
71
             {
100
             {
72
               statusList.map((item, index) => (
101
               statusList.map((item, index) => (
73
-                <View className={index == statusIndex ? 'checked' : 'status-item'} onClick={this.chooseStatus.bind(this, item, index)}>{item}</View>
102
+                <View key={index + 'status'} className={index == statusIndex ? 'checked' : 'status-item'} onClick={this.chooseStatus.bind(this, item, index)}>{item}</View>
74
               ))
103
               ))
75
             }
104
             }
76
           </View>
105
           </View>
77
-          <View>
78
-            <Picker mode='date' onChange={this.onDateChange}>
106
+          <View className="time-box">
107
+            到访时间:
108
+              <Picker mode='date' onChange={this.onVisitDateChange}>
109
+              <View className='picker'>
110
+                {visitDate}
111
+                {!visitDate && <Text className="placeholder">起始时间</Text>}
112
+              </View>
113
+            </Picker>-<Picker mode='date' onChange={this.onVisitDateChange2}>
79
               <View className='picker'>
114
               <View className='picker'>
80
-                当前选择:{dateSel}
115
+                {visitDate2}
116
+                {!visitDate2 && <Text className="placeholder">结束时间</Text>}
81
               </View>
117
               </View>
82
             </Picker>
118
             </Picker>
83
           </View>
119
           </View>
120
+          <View className="time-box" style="margin-top:16px">
121
+            报备时间:
122
+              <Picker mode='date' onChange={this.onReportDateChange}>
123
+              <View className='picker'>
124
+                {reportDate}
125
+                {!reportDate && <Text className="placeholder">起始时间</Text>}
126
+              </View>
127
+            </Picker>-<Picker mode='date' onChange={this.onReportDateChange2}>
128
+              <View className='picker'>
129
+                {reportDate2}
130
+                {!reportDate2 && <Text className="placeholder">结束时间</Text>}
131
+              </View>
132
+            </Picker>
133
+          </View>
134
+          <View className="bottom-btn">
135
+            <View className="save" onClick={this.saveBtn}>
136
+              保存
137
+            </View>
138
+            <View className="cancel" onClick={this.cancelBtn}>
139
+              取消
140
+          </View>
141
+            <View>
142
+            </View>
143
+          </View>
84
         </View>
144
         </View>
85
       </View>
145
       </View>
86
     )
146
     )
101
         </View>
161
         </View>
102
         <View style="padding:10px">
162
         <View style="padding:10px">
103
           {
163
           {
104
-            list.map(item => (
105
-              <View class="item">
164
+            list.map((item, index) => (
165
+              <View class="item" key={index + 'list'} onClick={this.toMyCustomer}>
106
                 <Image src={require('@assets/default-avatar.png')} className='img'></Image>
166
                 <Image src={require('@assets/default-avatar.png')} className='img'></Image>
107
                 <View className="name">
167
                 <View className="name">
108
                   {item.name}
168
                   {item.name}

+ 50
- 2
src/pages/person/customerAnalysis/followUpCustomer/index.scss 查看文件

38
         flex:0 0 23%;
38
         flex:0 0 23%;
39
         margin:  20px 1%;
39
         margin:  20px 1%;
40
         border: 2px solid $primary-color;
40
         border: 2px solid $primary-color;
41
-        height: 56px;
42
-        line-height: 56px;
41
+        height: 60px;
42
+        line-height: 60px;
43
         text-align: center;
43
         text-align: center;
44
         border-radius: 12px;
44
         border-radius: 12px;
45
         color: $primary-color;
45
         color: $primary-color;
56
         background-color: $primary-color;
56
         background-color: $primary-color;
57
       }
57
       }
58
     }
58
     }
59
+    .time-box{
60
+      display: flex;
61
+      align-items: center;
62
+      justify-content: space-between;
63
+      margin: 20px 0;
64
+      color: #555;
65
+        .picker{
66
+          width: 240px;
67
+          height:56px;
68
+          line-height: 56px;
69
+          background:rgba(244,244,244,1);
70
+          border-radius:4px;
71
+          padding: 0 16px;
72
+          font-size: 26px;
73
+          .placeholder{
74
+            color: #999;
75
+          }
76
+        }
77
+    }
78
+    .bottom-btn{
79
+      margin-top: 80px;
80
+      width: 100%;
81
+      height: 80px;
82
+      border-radius: 12px;
83
+      border:2px solid $primary-color;
84
+      display: flex;
85
+      flex-wrap: wrap;
86
+      align-content: flex-start;
87
+      justify-content: space-between;
88
+      font-size: 30px;
89
+      .save{
90
+        flex:  0 0 50%;
91
+        background-color: $primary-color;
92
+        color:#fff;
93
+        height: 78px;
94
+        line-height: 78px;
95
+        text-align: center;
96
+        border-radius: 12px 0 0 12px;
97
+      }
98
+      .cancel{
99
+        flex:  0 0 50%;
100
+        color: $primary-color;
101
+        text-align: center;
102
+        height: 78px;
103
+        line-height: 78px;
104
+      }
105
+    }
59
   }
106
   }
60
 }
107
 }
108
+
61
 .search-box{
109
 .search-box{
62
   display: flex;
110
   display: flex;
63
   align-items: center;
111
   align-items: center;

+ 58
- 0
src/pages/person/customerAnalysis/myCustomer.js 查看文件

1
+import Taro, { Component } from '@tarojs/taro';
2
+import Authorize from '@components/authorize'
3
+import { View } from "@tarojs/components";
4
+import MoveChart from '../../components/MoveChart'
5
+import LineChart from '../../components/LineChart'
6
+import './index.scss'
7
+import { AtTabs, AtTabsPane } from 'taro-ui'
8
+import "taro-ui/dist/style/components/tabs.scss"
9
+import { savePoint, updatePoint } from '@services/common'
10
+import { connect } from '@tarojs/redux'
11
+
12
+
13
+@connect(({ user, city }) => ({ user, city }))
14
+export default class myCustomer extends Taro.Component {
15
+
16
+  config = {
17
+    navigationBarTitleText: '我的客户'
18
+  }
19
+
20
+  state = {
21
+    current: 0,
22
+    recordId: undefined, // 埋点ID
23
+  }
24
+
25
+  componentWillUnmount() {
26
+    const { recordId } = this.state
27
+    recordId && updatePoint(recordId)
28
+  }
29
+
30
+  handleClick(value) {
31
+    this.setState({
32
+      current: value
33
+    }, )
34
+  }
35
+ 
36
+
37
+  render() {
38
+
39
+    const tabList = [{ title: '新增客户' }, { title: '跟进客户' }, { title: '到访客户' }]
40
+
41
+    return (
42
+      <View>
43
+        <AtTabs className="tab-bar" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
44
+          <AtTabsPane current={this.state.current} index={0} >
45
+            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;' >标签22页一的内容</View>
46
+          </AtTabsPane>
47
+          <AtTabsPane current={this.state.current} index={1}>
48
+            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页二的内容</View>
49
+          </AtTabsPane>
50
+          <AtTabsPane current={this.state.current} index={2}>
51
+            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页三的内容</View>
52
+          </AtTabsPane>
53
+        </AtTabs>
54
+
55
+      </View>
56
+    )
57
+  }
58
+}

+ 5
- 9
src/pages/project/banner/index.js 查看文件

13
       height: '200px'
13
       height: '200px'
14
     },
14
     },
15
     onClick: function () { },
15
     onClick: function () { },
16
-    current: 0,
16
+   
17
   }
17
   }
18
 
18
 
19
   changeCurrent (event) {
19
   changeCurrent (event) {
20
-    console.log(event.detail.current)
20
+   
21
     const current = event.detail.current
21
     const current = event.detail.current
22
-    this.setState(
23
-      {
24
-        current: current
25
-      }
26
-    )
22
+   
27
     this.props.onChange(current)
23
     this.props.onChange(current)
28
-    // event.detail = {current, source}
24
+  
29
   }
25
   }
30
 
26
 
31
   onBannerClick (item) {
27
   onBannerClick (item) {
42
           onChange={this.changeCurrent.bind(this)}
38
           onChange={this.changeCurrent.bind(this)}
43
           indicatorDots={indicatorDots}
39
           indicatorDots={indicatorDots}
44
           indicatorActiveColor='rgb(256,256,256)'
40
           indicatorActiveColor='rgb(256,256,256)'
45
-        >{console.log(current)}
41
+        >
46
           {list.map((item, index) => (
42
           {list.map((item, index) => (
47
             <SwiperItem
43
             <SwiperItem
48
               key={index}
44
               key={index}

+ 41
- 26
src/pages/project/detail/index.js 查看文件

53
     recordId: null,
53
     recordId: null,
54
     posterShow: 'none',
54
     posterShow: 'none',
55
     current: 1,
55
     current: 1,
56
+    btnstate: true,
56
   }
57
   }
57
 
58
 
58
   componentWillMount () {
59
   componentWillMount () {
603
               <View className='photos__type__title'>相册</View>
604
               <View className='photos__type__title'>相册</View>
604
               <ScrollView scrollX>
605
               <ScrollView scrollX>
605
                 <View className='photos__type__content'>
606
                 <View className='photos__type__content'>
606
-                  <View className='photos__type__list'>
607
-                    <Image className='photos__img' src={getThumbnail(imgList[0].url)} mode="widthFix" onClick={this.toViewAlbum}></Image>
608
-                    <View className='photos__img__len'>共{imgList.length}张</View>
607
+                  <View className='photos__type__list'>11
608
+                    {/* <Image className='photos__img' src={getThumbnail(imgList[0].url)} mode="widthFix" onClick={this.toViewAlbum}></Image>
609
+                    <View className='photos__img__len'>共{imgList.length}张</View> */}
609
                   </View>
610
                   </View>
610
                 </View>
611
                 </View>
611
               </ScrollView>
612
               </ScrollView>
898
 
899
 
899
   renderVideo () {
900
   renderVideo () {
900
     return (
901
     return (
901
-      <Video
902
+      <View style={{
903
+        height: '278px'
904
+      }}>123
905
+      {/* <Video
902
         style={{
906
         style={{
903
           height: '278px'
907
           height: '278px'
904
         }}
908
         }}
905
-      ></Video>
909
+      ></Video> */}
910
+      </View>
906
     )
911
     )
907
   }
912
   }
908
 
913
 
909
   changeCurrent (current) {
914
   changeCurrent (current) {
910
-    console.log('value:', current)
915
+    // console.log('value:', current)
911
     this.setState({
916
     this.setState({
912
       current: current + 1
917
       current: current + 1
913
     })
918
     })
916
 
921
 
917
 
922
 
918
   render () {
923
   render () {
919
-    const { posterStatus, posterData, loaded } = this.state
924
+    const { posterStatus, posterData, loaded, btnstate } = this.state
920
     const { projectDetail } = this.props
925
     const { projectDetail } = this.props
921
     const { uvList = {} } = projectDetail
926
     const { uvList = {} } = projectDetail
922
     const { total = 0, records = [] } = uvList
927
     const { total = 0, records = [] } = uvList
928
           loaded && (
933
           loaded && (
929
             <View className='detail'>
934
             <View className='detail'>
930
               <Notice></Notice>
935
               <Notice></Notice>
931
-              <View
932
-                className="pro__banner"
933
-                onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
934
-                {1 && <View> <Banner
935
-                  list={projectDetail.buildingImg}
936
-                  indicatorDots={false}
937
-                  // current
938
-                  onChange={this.changeCurrent.bind(this)}
939
-                  style={{
940
-                    height: '278px'
941
-                  }}
942
-
943
-                ></Banner>
944
-                  <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text></View>}
945
-
946
-                <View className='media-btn'>
947
-                  <View className='video-btn' >视频</View>
948
-                  <View className='img-btn' >图片</View>
936
+              {btnstate && (
937
+                <View
938
+                  className="pro__banner"
939
+                  onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
940
+                  <Banner
941
+                    list={projectDetail.buildingImg}
942
+                    indicatorDots={false}
943
+                    // current
944
+                    onChange={this.changeCurrent.bind(this)}
945
+                    style={{
946
+                      height: '278px'
947
+                    }}
948
+
949
+                  ></Banner>
950
+                  <Text className="pro__banner-text">{this.current}/{(projectDetail.buildingImg && projectDetail.buildingImg.length) || 0}</Text>
949
                 </View>
951
                 </View>
950
-              </View>
952
+              )}
953
+
954
+              {!btnstate && this.renderVideo()}
955
+
956
+              
957
+              {!btnstate && (<View className='media-btn'>
958
+                <View className='video-btn' onClick={() => this.setState({ btnstate: true })} style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }} >视频</View>
959
+                <View className='img-btn'>图片</View>
960
+              </View>)}
961
+
962
+              {btnstate && (<View className='media-btn'>
963
+                <View className='video-btn'  >视频</View>
964
+                <View className='img-btn' onClick={() => this.setState({ btnstate: false })} style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }}>图片</View>
965
+              </View>)}
951
 
966
 
952
 
967
 
953
               <ScrollView
968
               <ScrollView

+ 5
- 4
src/pages/project/detail/index.scss 查看文件

26
     font-weight: 400;
26
     font-weight: 400;
27
     text-align: center;
27
     text-align: center;
28
     line-height: 64px;
28
     line-height: 64px;
29
-
29
+    color: rgba(53, 53, 53, 1);
30
     display: flex;;
30
     display: flex;;
31
     .video-btn {
31
     .video-btn {
32
       width: 92px;
32
       width: 92px;
33
       height: 64px;
33
       height: 64px;
34
-      background: rgba(187, 156, 121, 1);
35
       border-radius: 12px 0px 0px 12px;
34
       border-radius: 12px 0px 0px 12px;
36
-      color: rgba(255, 255, 255, 1);
35
+  
36
+    
37
     }
37
     }
38
 
38
 
39
     .img-btn {
39
     .img-btn {
40
       width: 92px;
40
       width: 92px;
41
       height: 64px;
41
       height: 64px;
42
-      color: rgba(53, 53, 53, 1);
42
+      border-radius: 0px 12px 12px 0px;
43
     }
43
     }
44
+
44
   }
45
   }
45
 
46
 
46
 
47