许静 5 gadus atpakaļ
vecāks
revīzija
820902b1ba

+ 1
- 60
src/components/BackHomeBtn/index.js Parādīt failu

8
   static defaultProps = {
8
   static defaultProps = {
9
     style: {}
9
     style: {}
10
   }
10
   }
11
-  state ={
12
-    buttonTop: 0,
13
-    buttonLeft: 0,
14
-    windowHeight: '',
15
-    windowWidth: ''
16
-  }
17
-  componentDidShow(){
18
-    Taro.getSystemInfo({
19
-      success: function (res) {
20
-        console.log(res,"9999999999999")
21
-        realWindowWidth = res.windowWidth
22
-        realWindowHeight = res.windowHeight
23
-      }
24
-    })
25
-  
26
-  }
27
-
28
   handleClick() {
11
   handleClick() {
29
     Taro.switchTab({
12
     Taro.switchTab({
30
       url: `/pages/project/index`
13
       url: `/pages/project/index`
31
     })
14
     })
32
   }
15
   }
33
-  buttonStart=(e)=> {
34
-    console.log(e,"eeeeeeeeeeeee")
35
-    startPoint = e.touches[0]
36
-  }
37
-  buttonMove=(e)=> {
38
-    console.log(e,"888888888888888")
39
-    var endPoint = e.touches[e.touches.length - 1]
40
-    var translateX = endPoint.clientX - startPoint.clientX
41
-    var translateY = endPoint.clientY - startPoint.clientY
42
-    startPoint = endPoint
43
-    var buttonTop = this.state.buttonTop + translateY
44
-    var buttonLeft = this.state.buttonLeft + translateX
45
-    //判断是移动否超出屏幕
46
-    if (buttonLeft+50 >= this.state.windowWidth){
47
-      buttonLeft = this.state.windowWidth-50;
48
-    }
49
-    if (buttonLeft<=0){
50
-      buttonLeft=0;
51
-    }
52
-    if (buttonTop<=0){
53
-      buttonTop=0
54
-    }
55
-    if (buttonTop + 50 >= this.state.windowHeight){
56
-      buttonTop = this.state.windowHeight-50;
57
-    }
58
-    this.setState({
59
-      buttonTop: buttonTop,
60
-      buttonLeft: buttonLeft
61
-    })
62
-  }
63
-  buttonEnd=(e)=> {
64
-
65
-  }
66
-
67
   render() {
16
   render() {
68
     return (
17
     return (
69
-      // <View className="back-home" style={this.props.style} onClick={this.handleClick}  >
70
-      //   <Image src={require('@assets/homeicon.png')} className='home-img'></Image>
71
-      //   <Text className="text">首页</Text>
72
-      // </View>
73
-      <View className="back-home"
74
-       style={this.props.style} 
75
-       style='top:{this.state.buttonTop}px;left:{this.state.buttonLeft}px'
76
-       onClick={this.handleClick} ontouchmove={this.buttonMove} ontouchstart={this.buttonStart} ontouchend={this.buttonEnd} >
77
-        {/* <Text className="iconfont icon-shouyeshouye"></Text> */}
18
+      <View className="back-home" style={this.props.style} onClick={this.handleClick}  >
78
         <Image src={require('@assets/homeicon.png')} className='home-img'></Image>
19
         <Image src={require('@assets/homeicon.png')} className='home-img'></Image>
79
         <Text className="text">首页</Text>
20
         <Text className="text">首页</Text>
80
       </View>
21
       </View>

+ 14
- 5
src/pages/person/customerAnalysis/myCustomer.js Parādīt failu

165
   }
165
   }
166
   componentDidShow() {
166
   componentDidShow() {
167
     this.loadList()
167
     this.loadList()
168
+    // Taro.getSystemInfo({
169
+    //   success: function (res) {
170
+    //     console.log(res, "9999999999999")
171
+    //     this.setState({
172
+    //       tabHeight: res.screenHeight - 380 + 'px'
173
+    //     })
174
+    //   },
175
+    // })
176
+
168
   }
177
   }
169
   loadList() {
178
   loadList() {
170
     const { customerId } = this.$router.params
179
     const { customerId } = this.$router.params
214
       customerId,
223
       customerId,
215
     }
224
     }
216
     addFollowRecord(params).then(res => {
225
     addFollowRecord(params).then(res => {
217
-      this.queryFollowRecord()
226
+      this.queryFollowRecord(1)
218
     })
227
     })
219
     this.setState({
228
     this.setState({
220
       followVisible: false,
229
       followVisible: false,
348
       customerId: customer.customerId,
357
       customerId: customer.customerId,
349
     }
358
     }
350
     addFollowRecord(params).then(res => {
359
     addFollowRecord(params).then(res => {
351
-      this.queryFollowRecord()
360
+      this.queryFollowRecord(1)
352
     })
361
     })
353
     this.setState({
362
     this.setState({
354
       followVisible: false,
363
       followVisible: false,
455
           </View>
464
           </View>
456
           <View onClick={this.handleTelClick.bind(this, customerDetail)} className='user__left__phone'>{customerDetail.phone}<View style={`background-image: url(${iconImg});background-size: 100%;background-position: 0rpx -88rpx;width: 44rpx;height: 44rpx;margin-left:10rpx`}></View></View>
465
           <View onClick={this.handleTelClick.bind(this, customerDetail)} className='user__left__phone'>{customerDetail.phone}<View style={`background-image: url(${iconImg});background-size: 100%;background-position: 0rpx -88rpx;width: 44rpx;height: 44rpx;margin-left:10rpx`}></View></View>
457
         </View>
466
         </View>
458
-        <AtTabs className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
467
+        <AtTabs height="400px" className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
459
           <AtTabsPane current={this.state.current} index={0} >
468
           <AtTabsPane current={this.state.current} index={0} >
460
             <View className="tab-pane1 pane">
469
             <View className="tab-pane1 pane">
461
               <View className="status">{customerDetail.status == 1 ? '报备' : customerDetail.status == 2 ? '到访' : customerDetail.status == 3 ? '认筹' : '签约'}</View>
470
               <View className="status">{customerDetail.status == 1 ? '报备' : customerDetail.status == 2 ? '到访' : customerDetail.status == 3 ? '认筹' : '签约'}</View>
532
               <ListView
541
               <ListView
533
                 className="wrap"
542
                 className="wrap"
534
                 needInit
543
                 needInit
535
-                style="height:40vh"
544
+                style="height:300px"
536
                 isEmpty={isEmpty3}
545
                 isEmpty={isEmpty3}
537
                 emptyText="暂无跟进记录~"
546
                 emptyText="暂无跟进记录~"
538
                 hasMore={hasMore3}
547
                 hasMore={hasMore3}
563
                   }
572
                   }
564
                 </View>
573
                 </View>
565
               </ListView>
574
               </ListView>
566
-              <View className="btn" onClick={this.addFollow}>添加跟进</View>
575
+              <View className="btn" style="margin:40rpx auto;" onClick={this.addFollow}>添加跟进</View>
567
             </View>
576
             </View>
568
           </AtTabsPane>
577
           </AtTabsPane>
569
         </AtTabs>
578
         </AtTabs>