许静 пре 5 година
родитељ
комит
820902b1ba
2 измењених фајлова са 15 додато и 65 уклоњено
  1. 1
    60
      src/components/BackHomeBtn/index.js
  2. 14
    5
      src/pages/person/customerAnalysis/myCustomer.js

+ 1
- 60
src/components/BackHomeBtn/index.js Прегледај датотеку

@@ -8,73 +8,14 @@ export default class Index extends Component {
8 8
   static defaultProps = {
9 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 11
   handleClick() {
29 12
     Taro.switchTab({
30 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 16
   render() {
68 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 19
         <Image src={require('@assets/homeicon.png')} className='home-img'></Image>
79 20
         <Text className="text">首页</Text>
80 21
       </View>

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

@@ -165,6 +165,15 @@ export default class myCustomer extends Taro.Component {
165 165
   }
166 166
   componentDidShow() {
167 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 178
   loadList() {
170 179
     const { customerId } = this.$router.params
@@ -214,7 +223,7 @@ export default class myCustomer extends Taro.Component {
214 223
       customerId,
215 224
     }
216 225
     addFollowRecord(params).then(res => {
217
-      this.queryFollowRecord()
226
+      this.queryFollowRecord(1)
218 227
     })
219 228
     this.setState({
220 229
       followVisible: false,
@@ -348,7 +357,7 @@ export default class myCustomer extends Taro.Component {
348 357
       customerId: customer.customerId,
349 358
     }
350 359
     addFollowRecord(params).then(res => {
351
-      this.queryFollowRecord()
360
+      this.queryFollowRecord(1)
352 361
     })
353 362
     this.setState({
354 363
       followVisible: false,
@@ -455,7 +464,7 @@ export default class myCustomer extends Taro.Component {
455 464
           </View>
456 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 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 468
           <AtTabsPane current={this.state.current} index={0} >
460 469
             <View className="tab-pane1 pane">
461 470
               <View className="status">{customerDetail.status == 1 ? '报备' : customerDetail.status == 2 ? '到访' : customerDetail.status == 3 ? '认筹' : '签约'}</View>
@@ -532,7 +541,7 @@ export default class myCustomer extends Taro.Component {
532 541
               <ListView
533 542
                 className="wrap"
534 543
                 needInit
535
-                style="height:40vh"
544
+                style="height:300px"
536 545
                 isEmpty={isEmpty3}
537 546
                 emptyText="暂无跟进记录~"
538 547
                 hasMore={hasMore3}
@@ -563,7 +572,7 @@ export default class myCustomer extends Taro.Component {
563 572
                   }
564 573
                 </View>
565 574
               </ListView>
566
-              <View className="btn" onClick={this.addFollow}>添加跟进</View>
575
+              <View className="btn" style="margin:40rpx auto;" onClick={this.addFollow}>添加跟进</View>
567 576
             </View>
568 577
           </AtTabsPane>
569 578
         </AtTabs>