周立森 vor 5 Jahren
Ursprung
Commit
657eed336a

+ 2
- 2
config/dev.js Datei anzeigen

@@ -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.172:8080"',

+ 1
- 8
src/components/amap/PoiAround.js Datei anzeigen

@@ -4,19 +4,12 @@ import icons from './icons'
4 4
 
5 5
 export default class PoiAround extends Component {
6 6
 
7
-  state = {
8
-    current: undefined,
9
-  }
10
-
11 7
   handleTap = (e) => {
12 8
     const marker = this.props.markers.filter(x => x.id === e.markerId)[0]
13
-
14
-    this.setState({ current: e.markerId })
15 9
     this.props.onMarkerClick && this.props.onMarkerClick(marker)
16 10
   }
17 11
 
18 12
   render() {
19
-    const { current } = this.state
20 13
     const markers =  (this.props.markers || []).map((marker, index) => {
21 14
       const icon = icons[index].normal
22 15
       const activeIcon = icons[index].active
@@ -25,7 +18,7 @@ export default class PoiAround extends Component {
25 18
         id: marker.id,
26 19
         latitude: marker.latitude,
27 20
         longitude: marker.longitude,
28
-        iconPath: current === marker.id ? activeIcon : icon,
21
+        iconPath: this.props.current === marker.id ? activeIcon : icon,
29 22
         width: 56,
30 23
         height: 56,
31 24
       }

+ 25
- 2
src/components/charts/Line.js Datei anzeigen

@@ -76,7 +76,7 @@ export default class LineChart extends Component {
76 76
       grid: {
77 77
         left: '10%',
78 78
         right: '8%',
79
-        bottom: '10%',
79
+        bottom: '12%',
80 80
         top: '10%',
81 81
       },
82 82
       series: [],
@@ -89,7 +89,30 @@ export default class LineChart extends Component {
89 89
     return {
90 90
       ...defaultOpt,
91 91
       dataset: { source },
92
-      dataZoom: [{ type: 'inside', startValue, endValue }],
92
+      dataZoom: [{
93
+        type: 'slider',
94
+        startValue, endValue,
95
+        show: true,
96
+        xAxisIndex: [0],
97
+        handleSize: 10,//滑动条的 左右2个滑动条的大小  
98
+        height: 20,//组件高度  
99
+        left: 30, //左边的距离  
100
+        right: 30,//右边的距离  
101
+        bottom: 0,//下边的距离  
102
+        handleColor: 'rgba(0,0,0,0.1)',//h滑动图标的颜色  
103
+        realtime : true,
104
+        handleStyle: {
105
+          borderColor: "#999",
106
+          borderWidth: "1",
107
+          shadowBlur: 2,
108
+          background: "rgba(0,0,0,0.1)",
109
+          shadowColor: "rgba(0,0,0,0.1)",
110
+        },
111
+        backgroundColor: 'rgba(0,0,0,0.1)',//两边未选中的滑动条区域的颜色  
112
+        showDataShadow: false,//是否显示数据阴影 默认auto  
113
+        showDetail: false,
114
+
115
+      }],
93 116
       series: [{
94 117
         type: 'line',
95 118
         dimensions: ['name', 'value'],

+ 1
- 1
src/pages/activity/detail/assemble.js Datei anzeigen

@@ -630,7 +630,7 @@ export default class Detail extends Component {
630 630
                   {
631 631
                     !isStarter && actState === ActInProcess && groupState != GroupInProcess &&
632 632
 
633
-                    <View className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"}>
633
+                    <View className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} style="border:none">
634 634
                       <FormIdCollector>
635 635
                         <Button className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
636 636
                       </FormIdCollector>

+ 13
- 5
src/pages/activity/detail/assistance.js Datei anzeigen

@@ -66,7 +66,7 @@ export default class Detail extends Component {
66 66
     handleHelpBtn: true, // 立即助力好友
67 67
     pointRecordId: undefined, // 埋点ID
68 68
   }
69
-  
69
+
70 70
   componentWillMount() {
71 71
     ready.queue(() => {
72 72
       // 必须先授权电话
@@ -84,7 +84,7 @@ export default class Detail extends Component {
84 84
   componentDidShow() {
85 85
     this.startTicker()
86 86
   }
87
-  
87
+
88 88
   componentDidHide() {
89 89
     this.stopTicker()
90 90
   }
@@ -159,7 +159,7 @@ export default class Detail extends Component {
159 159
   // 打开关闭海报面板
160 160
   togglePosterVisible = () => {
161 161
     const { posterVisible, posters, actionSheetVisible } = this.state
162
-    
162
+
163 163
     if (!posters || !posters.length) {
164 164
       Taro.showToast({
165 165
         title: '未设置海报模板',
@@ -500,7 +500,7 @@ export default class Detail extends Component {
500 500
     return (
501 501
       <View>
502 502
         {/* 生成海报 */}
503
-        { posterVisible && !ltTicker.processing &&
503
+        {posterVisible && !ltTicker.processing &&
504 504
           (
505 505
             <Poster configs={posterConfigs} onCancel={this.togglePosterVisible} onFinish={this.togglePosterVisible}></Poster>
506 506
           )
@@ -606,7 +606,7 @@ export default class Detail extends Component {
606 606
                           (helpState === HelpInProcess && !isJoin) &&
607 607
                           (<View className="assistance-btn"><FormIdCollector><Button className="assistance-btn" onClick={this.handleHelp}>立即助力好友</Button></FormIdCollector></View>)
608 608
                         }
609
-                        <View className={(helpState === HelpInProcess && !isJoin) ? "set-btn" : "assistance-btn"}>
609
+                        <View className={(helpState === HelpInProcess && !isJoin) ? "set-btn" : "assistance-btn"} style="border:none">
610 610
                           <FormIdCollector>
611 611
                             <Button className={(helpState === HelpInProcess && !isJoin) ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的助力</Button>
612 612
                           </FormIdCollector>
@@ -614,6 +614,14 @@ export default class Detail extends Component {
614 614
                       </View>
615 615
                     )
616 616
                   }
617
+                  <View className="btn-box" style="padding:25px 0;">
618
+
619
+                    <View className="set-btn" style="border:none">
620
+                      <FormIdCollector>
621
+                        <Button className= "set-btn" onClick={this.startMine}>发起我的助力</Button>
622
+                      </FormIdCollector>
623
+                    </View>
624
+                  </View>
617 625
                 </View>
618 626
                 <View className="assistance-text"><Text className="acitivty-desc">活动说明</Text>-------------------------------------------------------------- </View>
619 627
                 <View style="padding:0 40rpx">

+ 1
- 1
src/pages/activity/item/index.scss Datei anzeigen

@@ -39,7 +39,7 @@
39 39
   .success-num{
40 40
     position: absolute;
41 41
     right:0;
42
-    top:282px;
42
+    top:340px;
43 43
     color: #fff;
44 44
     display: flex;
45 45
     height: 48px;

+ 5
- 4
src/pages/agent/recommend/index.js Datei anzeigen

@@ -275,11 +275,12 @@ export default class Index extends Component {
275 275
         Taro.showToast({
276 276
           title: '提交成功'
277 277
         })
278
+        setTimeout(() => {
279
+          Taro.navigateTo({ url: '/pages/agent/client/index' })//测试用
280
+        }, 700)
281
+        this.clearInputEvent()
278 282
       }
279
-      this.clearInputEvent()
280
-      setTimeout(() => {
281
-        Taro.navigateTo({ url: '/pages/agent/client/index' })//测试用
282
-      }, 700)
283
+
283 284
     })
284 285
   }
285 286
   // 性别

+ 7
- 7
src/pages/person/menus.js Datei anzeigen

@@ -73,13 +73,13 @@ const menus = [
73 73
     // },
74 74
   ],
75 75
   [
76
-    // {
77
-    //   name: '我的客户',
78
-    //   url: '/pages/person/myGuest/index',
79
-    //   icon: icons.client,
80
-    //   extends: undefined,
81
-    //   userTypes: [CONSULTANT],
82
-    // },
76
+    {
77
+      name: '我的客户',
78
+      url: '/pages/person/myGuest/index',
79
+      icon: icons.client,
80
+      extends: undefined,
81
+      userTypes: [CONSULTANT],
82
+    },
83 83
     {
84 84
       name: '我的活动',
85 85
       url: '/pages/activity/myActivity?from=mine',

+ 112
- 41
src/pages/project/detail/Around/Pannel.js Datei anzeigen

@@ -1,49 +1,120 @@
1
-import Taro from '@tarojs/taro'
2
-import { View } from '@tarojs/components'
1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, ScrollView } from '@tarojs/components'
3 3
 import './style.scss'
4 4
 
5 5
 const posIcon = require('@assets/icons/amap/position.png')
6 6
 
7
-export default function Pannel(props) {
8
-  
9
-  const { data = [], manualData = [] } = props.dataset || {}
10
-  const activeKey = props.active
7
+export default class Pannel extends Component {
11 8
 
12
-  const ty = Object.prototype.toString
13
-  
14
-  return (
15
-    <View className="around-pannel">
16
-      {
17
-        (ty.call(data) === '[object String]' ? JSON.parse(data) : []).map((item, index) => {
18
-          const { id, name, distance } = item || {}
19
-          const dist = distance >= 1000 ? `${Number(distance / 1000).toFixed(1)}km` : `${distance}m`
20
-          const active = activeKey === id
21
-
22
-          return (
23
-            <View className={`around-cell ${active ? 'active' : ''}`} key={`auto-${id}`}>
24
-              <View className="around-cell__body">{`${index + 1}、${name}`}</View>
25
-              <View className="around-cell__action">
26
-                <Image className="icon" src={posIcon} />
27
-                {dist}
28
-              </View>
29
-            </View>
30
-          )
31
-        })
32
-      }
33
-      {
34
-        manualData.length && (
35
-          <View className="around-cell-title">其他</View>
36
-        )
9
+  // 记录滚动位置
10
+  scrollPos = {}
11
+
12
+  state = {
13
+    markerList: [],
14
+    currentMarker: undefined,   // 仅用于数据比较, 渲染不依靠这个
15
+    currentMarkerPos: undefined,
16
+  }
17
+
18
+  componentDidMount() {
19
+    // setTimeout(() => {
20
+    //   // 记录滚动位置
21
+    //   Taro.createSelectorQuery().in(this.$scope).selectAll('.around-cell').fields({ id: true, rect: true }, (res) => {
22
+    //     console.log('--------', res)
23
+    //     // this.scrollPos[res.id] = res.scrollTop
24
+    //   }).exec()
25
+
26
+    // }, 0)
27
+  }
28
+
29
+  componentWillMount() {
30
+    this.initData(this.props)
31
+  }
32
+
33
+  componentWillReceiveProps(nextProps) {
34
+    this.initData(nextProps)
35
+  }
36
+
37
+  initData = (props) => {
38
+    const { data = [] } = props.dataset || {}
39
+    const markerList = JSON.parse(data)
40
+    let activeIndex = -1
41
+    let currentMarkerPos = undefined
42
+
43
+    if (props.active !== undefined && props.active != (this.state.currentMarker || {}).id) {
44
+      for (let i = 0; i < markerList.length; i ++) {
45
+        if (markerList[i].id === props.active) {
46
+          activeIndex = i;
47
+          break;
48
+        }
37 49
       }
38
-      {
39
-        manualData.map((item, index) => {
40
-          return (
41
-            <View className="around-cell" key={`manual-${index}`}>
42
-              <View className="around-cell__body">{`${index + 1}、${item}`}</View>
43
-            </View>
44
-          )
45
-        })
50
+
51
+      if (activeIndex !== -1) {
52
+        currentMarkerPos = activeIndex * 35 + 20 // 每个 around-cell 的高度是 35, 20 是 调节值
53
+      } else {
54
+        currentMarkerPos = 0
46 55
       }
47
-    </View>
48
-  )
56
+    } else {
57
+      currentMarkerPos = 0
58
+    }
59
+
60
+    // console.log('-------markerList---------', markerList)
61
+
62
+    this.setState({ currentMarkerPos, markerList })
63
+  }
64
+
65
+  setCurrent = (marker) => () => {
66
+    this.setState({
67
+      currentMarkerPos: undefined,
68
+      currentMarker: marker,
69
+    }, () => this.props.onChange(marker))
70
+  }
71
+
72
+  bindScroll = (e) => {
73
+    console.log(e)
74
+  }
75
+
76
+  render () {  
77
+    const { manualData = [] } = this.props.dataset || {}
78
+    const activeKey = this.props.active
79
+
80
+    const fixdHeight = this.props.style || 'height: 300rpx'
81
+
82
+    return (
83
+      <ScrollView scrollY style={fixdHeight} scrollTop={this.state.currentMarkerPos} onScroll={this.bindScroll}>
84
+        <View className="around-pannel">
85
+          {
86
+            this.state.markerList.map((item, index) => {
87
+              const { id, name, distance } = item || {}
88
+              const dist = distance >= 1000 ? `${Number(distance / 1000).toFixed(1)}km` : `${distance}m`
89
+              const active = activeKey === id
90
+  
91
+              return (
92
+                <View className={`around-cell ${active ? 'active' : ''}`} key={`auto-${id}`} id={id} onClick={this.setCurrent(item)}>
93
+                  <View className="around-cell__body">{`${index + 1}、${name}`}</View>
94
+                  <View className="around-cell__action">
95
+                    <Image className="icon" src={posIcon} />
96
+                    {dist}
97
+                  </View>
98
+                </View>
99
+              )
100
+            })
101
+          }
102
+          {
103
+            manualData.length && (
104
+              <View className="around-cell-title">其他</View>
105
+            )
106
+          }
107
+          {
108
+            manualData.map((item, index) => {
109
+              return (
110
+                <View className="around-cell" key={`manual-${index}`}>
111
+                  <View className="around-cell__body">{`${index + 1}、${item}`}</View>
112
+                </View>
113
+              )
114
+            })
115
+          }
116
+        </View>
117
+      </ScrollView>
118
+    )
119
+  }
49 120
 }

+ 1
- 1
src/pages/project/detail/Around/Tab.js Datei anzeigen

@@ -6,7 +6,7 @@ export default function Tab(props) {
6 6
   
7 7
   const [current, setCurrent] = useState(props.default || 0)
8 8
   
9
-  const tabList = props.dataset ? props.dataset.filter(x => x.num) : []
9
+  const tabList = props.dataset ? props.dataset : []
10 10
   
11 11
   const handleClick = index => () => {
12 12
     setCurrent(index)

+ 6
- 8
src/pages/project/detail/Around/index.js Datei anzeigen

@@ -7,7 +7,7 @@ import './style.scss'
7 7
 
8 8
 export default function Around(props) {
9 9
   const detail = props.building || {}
10
-  console.log(detail,"detaildetaildetaildetail")
10
+  
11 11
   const [lat, lng] = (detail.coordinate || '').split(',')
12 12
   const poiDatas = detail.mapJson ? JSON.parse(detail.mapJson) : []
13 13
   const ty = Object.prototype.toString
@@ -17,15 +17,13 @@ export default function Around(props) {
17 17
     const key = item.key
18 18
     const manualData = (detail[`building${key}`] === '' ? [] : detail[`building${key}`].split(','))
19 19
     
20
-    console.log(manualData,"manualDatamanualData")
21 20
     return {
22 21
       ...item,
23 22
       manualData,
24 23
       num: (ty.call(item.data) === '[object String]' ? JSON.parse(item.data) : []).length + manualData.length,
25 24
     }
26
-  })
25
+  }).filter(x => x.num)
27 26
 
28
-  
29 27
   // 所有的 markers
30 28
   const markersList = dataList.map((item) => {
31 29
     const mapJson = JSON.parse(item.data) 
@@ -45,7 +43,7 @@ export default function Around(props) {
45 43
   // 部分默认值
46 44
   const [curTab, setCurTab] = useState(0)
47 45
   const [markers, setMarkers] = useState(markersList[curTab])
48
-  const [curAD, setCurAD] = useState()
46
+  const [curMarker, setCurMarker] = useState()
49 47
   
50 48
   // tab 切换
51 49
   const handleTabChange = (index, tabItem) => {
@@ -55,7 +53,7 @@ export default function Around(props) {
55 53
 
56 54
   // marker 点切换
57 55
   const handleMarkerTap = (marker) => {
58
-    setCurAD(marker.id)
56
+    setCurMarker(marker.id)
59 57
   }
60 58
 
61 59
   const goto = () => {
@@ -67,11 +65,11 @@ export default function Around(props) {
67 65
   return (
68 66
     <View className="around-box">
69 67
       <View className="around-header">
70
-        <PoiAround style="width: 100vw; height: 500rpx;" markers={markers} longitude={lng} latitude={lat} onMarkerClick={handleMarkerTap}/>
68
+        <PoiAround style="width: 100vw; height: 500rpx;" current={curMarker} markers={markers} longitude={lng} latitude={lat} onMarkerClick={handleMarkerTap}/>
71 69
       </View>
72 70
       <View className="around-body">
73 71
         <Tab dataset={dataList} onChange={handleTabChange} />
74
-        <Pannel active={curAD} dataset={dataList[curTab]} />
72
+        <Pannel active={curMarker} dataset={dataList[curTab]} onChange={handleMarkerTap}/>
75 73
         <View className="goto-map" onClick={goto}>立即前往</View>
76 74
         <View className="around-hr" />
77 75
       </View>

+ 63
- 62
src/pages/project/detail/index.js Datei anzeigen

@@ -48,6 +48,7 @@ export default class Index extends Component {
48 48
     helpList: [],
49 49
     groupList: [],
50 50
     statusOpts: ['待定', '售罄', '在售'],
51
+    statusBgColors: ['#F6B61D', '#BB9C79', '#CECECE'],
51 52
     // circumOpts: [],
52 53
     curTab: 'Transport',
53 54
     recordId: null,
@@ -58,7 +59,7 @@ export default class Index extends Component {
58 59
     videoPlayShow: 'flex',
59 60
   }
60 61
 
61
-  componentWillMount () {
62
+  componentWillMount() {
62 63
     // const { id = '78c3dd489791dc1d29472fa344b08c45' } = this.$router.params
63 64
 
64 65
     ready.queue(() => {
@@ -92,12 +93,17 @@ export default class Index extends Component {
92 93
     })
93 94
   }
94 95
 
95
-  componentWillUnmount () {
96
+  componentWillUnmount() {
96 97
     const { recordId } = this.state
97 98
     recordId && updatePoint(recordId)
98 99
   }
100
+  componentDidMount() {
101
+    const options = wx.getLaunchOptionsSync()
102
+    console.log(options, "-------------options---------")
103
+    // if()
104
+  }
99 105
 
100
-  loadHelpGroupList () {
106
+  loadHelpGroupList() {
101 107
     const { buildingId } = this.state
102 108
 
103 109
     queryHelpGroup({ buildingId: buildingId }).then(res => {
@@ -119,7 +125,7 @@ export default class Index extends Component {
119 125
     )
120 126
   }
121 127
 
122
-  loadDetail () {
128
+  loadDetail() {
123 129
     const { buildingId } = this.state
124 130
     const { dispatchProjectDetail } = this.props
125 131
     this.setState({
@@ -147,7 +153,7 @@ export default class Index extends Component {
147 153
     })
148 154
   }
149 155
 
150
-  loadActivityData () {
156
+  loadActivityData() {
151 157
     const { buildingId } = this.state
152 158
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
153 159
     queryActivityList(payload).then(res => {
@@ -158,7 +164,7 @@ export default class Index extends Component {
158 164
     })
159 165
   }
160 166
 
161
-  loadNewsData () {
167
+  loadNewsData() {
162 168
     const { buildingId } = this.state
163 169
     const payload = { pageSize: 2, pageNumber: 1, buildingId }
164 170
     queryNewsList(payload).then(res => {
@@ -168,11 +174,11 @@ export default class Index extends Component {
168 174
     })
169 175
   }
170 176
 
171
-  navigateTo (url) {
177
+  navigateTo(url) {
172 178
     Taro.navigateTo({ url: url })
173 179
   }
174 180
   // 海报预览图
175
-  previewImage (arr) {
181
+  previewImage(arr) {
176 182
     // console.log('arr:' + arr)
177 183
     if (arr[0].length > 1) {
178 184
       Taro.previewImage({
@@ -199,7 +205,7 @@ export default class Index extends Component {
199 205
     })
200 206
   }
201 207
 
202
-  openMap () {
208
+  openMap() {
203 209
     const {
204 210
       buildingName,
205 211
       address,
@@ -226,12 +232,12 @@ export default class Index extends Component {
226 232
     })
227 233
   }
228 234
 
229
-  toViewAlbum () {
235
+  toViewAlbum() {
230 236
     const { buildingId } = this.state
231 237
     this.navigateTo(`/pages/project/album/index?id=${buildingId}`)
232 238
   }
233 239
 
234
-  onViewFans () {
240
+  onViewFans() {
235 241
     const { buildingId } = this.state
236 242
     this.navigateTo('/pages/card/fans/index?type=item&id=' + buildingId)
237 243
   }
@@ -260,7 +266,7 @@ export default class Index extends Component {
260 266
     }
261 267
   }
262 268
 
263
-  getPhoneNumber (e, item) {
269
+  getPhoneNumber(e, item) {
264 270
     getUserPhone(e, (phoneNumber) => {
265 271
       const { userInfo: { person: { personId, nickname, name } } } = this.props
266 272
       Taro.navigateTo({
@@ -269,7 +275,7 @@ export default class Index extends Component {
269 275
     })
270 276
   }
271 277
 
272
-  getPosterData () {
278
+  getPosterData() {
273 279
     return new Promise(resolve => {
274 280
       const { posterData } = this.state
275 281
       if (posterData.qrcode) {
@@ -340,14 +346,14 @@ export default class Index extends Component {
340 346
     })
341 347
   }
342 348
 
343
-  handleTelClick (item, e) {
349
+  handleTelClick(item, e) {
344 350
     e.stopPropagation()
345 351
     Taro.makePhoneCall({
346 352
       phoneNumber: item.phone
347 353
     })
348 354
   }
349 355
 
350
-  handleChatClick (item, e) {
356
+  handleChatClick(item, e) {
351 357
     e.stopPropagation()
352 358
     const { userInfo: { person: { personId, nickname, name } } } = this.props
353 359
     Taro.navigateTo({
@@ -355,24 +361,24 @@ export default class Index extends Component {
355 361
     })
356 362
   }
357 363
 
358
-  handleConsuItemClick (item) {
364
+  handleConsuItemClick(item) {
359 365
     Taro.navigateTo({
360 366
       url: `/pages/card/index?id=${item.id}`
361 367
     })
362 368
   }
363 369
 
364
-  handleMoreClick () {
370
+  handleMoreClick() {
365 371
     // App.zhuge.track('查看置业顾问列表')
366 372
     Taro.navigateTo({
367 373
       url: `/pages/card/list/index?buildingId=${this.state.buildingId}`
368 374
     })
369 375
   }
370 376
 
371
-  handleStopPropagation (e) {
377
+  handleStopPropagation(e) {
372 378
     e.stopPropagation()
373 379
   }
374 380
 
375
-  toRecomonedPage () {
381
+  toRecomonedPage() {
376 382
     const {
377 383
       userInfo: { person: { personType } }
378 384
     } = this.props
@@ -388,50 +394,50 @@ export default class Index extends Component {
388 394
     }
389 395
   }
390 396
 
391
-  toHome () {
397
+  toHome() {
392 398
     Taro.switchTab({
393 399
       url: `/pages/project/index`
394 400
     })
395 401
   }
396 402
 
397
-  HandleCircumTabClick (id) {
403
+  HandleCircumTabClick(id) {
398 404
     this.setState({
399 405
       curTab: id
400 406
     })
401 407
   }
402 408
 
403
-  handleNewsMoreClick () {
409
+  handleNewsMoreClick() {
404 410
     Taro.navigateTo({
405 411
       url: `/pages/news/index?buildingId=` + this.state.buildingId
406 412
     })
407 413
   }
408 414
 
409
-  handNewsItemClick (id) {
415
+  handNewsItemClick(id) {
410 416
     Taro.navigateTo({
411 417
       url: '/pages/news/detail/index?id=' + id
412 418
     })
413 419
   }
414 420
 
415
-  handleActivityMoreClick () {
421
+  handleActivityMoreClick() {
416 422
     Taro.navigateTo({
417 423
       url: `/pages/activity/index?buildingId=` + this.state.buildingId
418 424
     })
419 425
   }
420 426
 
421
-  handActivityItemClick (item) {
427
+  handActivityItemClick(item) {
422 428
     Taro.navigateTo({
423 429
       url: '/pages/activity/detail/index?id=' + item.dynamicId
424 430
     })
425 431
   }
426 432
 
427
-  handlePreviewHxImage (current, urls) {
433
+  handlePreviewHxImage(current, urls) {
428 434
     Taro.previewImage({
429 435
       current,
430 436
       urls
431 437
     })
432 438
   }
433 439
 
434
-  handleFavor () {
440
+  handleFavor() {
435 441
     const { buildingId, isSaved } = this.state
436 442
     if (isSaved) {
437 443
       cancelFavorProject(buildingId).then(res => {
@@ -461,18 +467,18 @@ export default class Index extends Component {
461 467
       console.log('活动项目收藏')
462 468
     })
463 469
   }
464
-  handleToolsClick () {
470
+  handleToolsClick() {
465 471
     Taro.navigateTo({
466 472
       url: `/pages/toolKit/index`
467 473
     })
468 474
   }
469
-  moreFloor () {
475
+  moreFloor() {
470 476
     Taro.navigateTo({
471 477
       url: `/pages/project/floor/index`
472 478
     })
473 479
   }
474 480
 
475
-  renderBottomMenu () {
481
+  renderBottomMenu() {
476 482
     const { userInfo: { person: { personType } } } = this.props
477 483
     const { posterShow } = this.state
478 484
     return (
@@ -507,14 +513,14 @@ export default class Index extends Component {
507 513
     )
508 514
   }
509 515
 
510
-  previewHouseImage (current, urls) {
516
+  previewHouseImage(current, urls) {
511 517
     Taro.previewImage({
512 518
       current,
513 519
       urls
514 520
     })
515 521
   }
516 522
 
517
-  renderBuildingProjectTypeList () {
523
+  renderBuildingProjectTypeList() {
518 524
     const { statusOpts } = this.state
519 525
     const { projectDetail: { buildingProjectType = [], status, marketStatus } } = this.props
520 526
     return (
@@ -574,7 +580,7 @@ export default class Index extends Component {
574 580
   }
575 581
 
576 582
 
577
-  renderPhotoAlbum () {
583
+  renderPhotoAlbum() {
578 584
     const { projectDetail: { buildingApartment } } = this.props
579 585
     const list = buildingApartment.filter(item => item.apartmentType === 'photo')
580 586
     // const imgList = list.reduce((prev, cur) => {
@@ -606,15 +612,15 @@ export default class Index extends Component {
606 612
                       console.log(buildingImgUrl, 'buildingImgUrl')
607 613
 
608 614
                       // if (buildingImgUrl != null) {
609
-                      return (<View>
615
+                      return (<View key={index + "listimg"}>
610 616
                         {buildingImgUrl != null && (<View
611 617
                           style={{ marginRight: '8px' }}
612 618
                         >
613 619
 
614 620
                           <View>
615 621
                             <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
616
-                            <View style={{ width: '218rpx', display: 'flex',justifyContent:'center'  }} >
617
-                              <View style={{  overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
622
+                            <View style={{ width: '218rpx', display: 'flex', justifyContent: 'center' }} >
623
+                              <View style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> {apartmentName}  </View>
618 624
                               <View> ({buildingImgList.length})</View>
619 625
                             </View>
620 626
                           </View>
@@ -633,7 +639,7 @@ export default class Index extends Component {
633 639
       </Block>
634 640
     )
635 641
   }
636
-  rendercircum () {
642
+  rendercircum() {
637 643
     const building = {
638 644
       ...this.props.projectDetail
639 645
     }
@@ -650,7 +656,7 @@ export default class Index extends Component {
650 656
     )
651 657
   }
652 658
 
653
-  renderConsuler () {
659
+  renderConsuler() {
654 660
     const { userInfo: { person: { phone } } } = this.props
655 661
     const { projectDetail: { consultants = [] } } = this.props
656 662
     return (
@@ -723,7 +729,7 @@ export default class Index extends Component {
723 729
     )
724 730
   }
725 731
 
726
-  renderStatement () {
732
+  renderStatement() {
727 733
     return (
728 734
       <View className='statement'>
729 735
         免责条款:以上价格仅供参考,具体一房一价的信息以售楼处展示为准。本网显示房屋位置、交通、医疗、教育、商业等配套信息,来源于第三方网络数据,不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。<br></br>本平台对项目周边文化教育的介绍旨在提供相关信息,并不意味着信息发布方对就学安排作出承诺。相关教育资源就学信息存在调整的可能,应以政府教育主管部门及办学颁布的政策规定为准。
@@ -732,7 +738,7 @@ export default class Index extends Component {
732 738
   }
733 739
 
734 740
 
735
-  renderHelp () {
741
+  renderHelp() {
736 742
     const { helpList } = this.state
737 743
     return (
738 744
       <Block>
@@ -753,17 +759,17 @@ export default class Index extends Component {
753 759
     )
754 760
   }
755 761
 
756
-  handleHelpClick (item) {
762
+  handleHelpClick(item) {
757 763
     Taro.navigateTo({
758 764
       url: '/pages/activity/detail/assistance?id=' + item.activityId
759 765
     })
760 766
   }
761
-  handleGroupClick (item) {
767
+  handleGroupClick(item) {
762 768
     Taro.navigateTo({
763 769
       url: '/pages/activity/detail/assemble?id=' + item.activityId
764 770
     })
765 771
   }
766
-  renderGroup () {
772
+  renderGroup() {
767 773
     const { groupList } = this.state
768 774
     return (
769 775
       <Block>
@@ -787,7 +793,7 @@ export default class Index extends Component {
787 793
   }
788 794
 
789 795
   renderHouseTypeList () {
790
-    const { statusOpts } = this.state
796
+    const { statusOpts, statusBgColors } = this.state
791 797
     const { projectDetail: { buildingApartment } } = this.props
792 798
     const list = buildingApartment.filter(item => item.apartmentType === 'apart')
793 799
     let imgUrls = list.reduce((prev, cur) => {
@@ -809,9 +815,8 @@ export default class Index extends Component {
809 815
                       {
810 816
                         item && (
811 817
                           <View className='house__img-info'>
812
-                            {console.log(list, '-------')}
813 818
                             <Image className='house__img' src={getThumbnail(item.buildingImgList[0].url)} mode="widthFix" onClick={this.handlePreviewHxImage.bind(this, item.buildingImgList[0].url, imgUrls)}></Image>
814
-                            <View className='house-type__state'>{statusOpts[item.marketStatus - 1]}</View>
819
+                            <View className='house-type__state' style={`background-color: ${statusBgColors[item.marketStatus - 1]}`}>{statusOpts[item.marketStatus - 1]}</View>
815 820
                           </View>
816 821
                         )
817 822
                       }
@@ -835,7 +840,7 @@ export default class Index extends Component {
835 840
 
836 841
     )
837 842
   }
838
-  renderActivities () {
843
+  renderActivities() {
839 844
     // renderGroup () {
840 845
     //   const { groupList } = this.state
841 846
     //   return (
@@ -909,7 +914,7 @@ export default class Index extends Component {
909 914
       </Block>
910 915
     )
911 916
   }
912
-  renderNews () {
917
+  renderNews() {
913 918
     const { newsList } = this.state
914 919
     return (
915 920
       <Block>
@@ -941,7 +946,7 @@ export default class Index extends Component {
941 946
     )
942 947
   }
943 948
   // 开始播放
944
-  plagVideo () {
949
+  plagVideo() {
945 950
     let videoContext = wx.createVideoContext('myVideo')
946 951
     console.log()
947 952
     // this.setState({
@@ -964,7 +969,7 @@ export default class Index extends Component {
964 969
   // }
965 970
 
966 971
 
967
-  renderVideo () {
972
+  renderVideo() {
968 973
     const { videoPlayShow } = this.state
969 974
     const { projectDetail } = this.props
970 975
     const { videoImage } = projectDetail
@@ -986,16 +991,12 @@ export default class Index extends Component {
986 991
           }}
987 992
           id='myVideo'
988 993
           controls={true}
989
-          initialTime='0'
990
-  
991
-          loop={false}
992
-          muted={false}
993
-        // autoplay={false}
994
-        // initialTime='0'
995
-        // loop={true}
996
-        // muted={false}
997
-
998
-        show-mute-btn={true}
994
+          // autoplay={false}
995
+          // initialTime='0'
996
+          // loop={true}
997
+          // muted={false}
998
+
999
+          show-mute-btn='true'
999 1000
         // onPlay={this.onPlay}
1000 1001
         // show-center-play-btn='false'
1001 1002
         // onPause= {this.onPause}
@@ -1017,13 +1018,13 @@ export default class Index extends Component {
1017 1018
     )
1018 1019
   }
1019 1020
 
1020
-  changeCurrent (current) {
1021
+  changeCurrent(current) {
1021 1022
     this.setState({
1022 1023
       current: current + 1
1023 1024
     })
1024 1025
   }
1025 1026
 
1026
-  render () {
1027
+  render() {
1027 1028
     const { posterStatus, posterData, loaded, btnstate } = this.state
1028 1029
     const { projectDetail } = this.props
1029 1030
     const { uvList = {} } = projectDetail

+ 2
- 4
src/pages/shop/index.scss Datei anzeigen

@@ -199,10 +199,8 @@
199 199
       line-height: 60px;
200 200
       font-weight: bold;
201 201
       padding: 0 20px;
202
-      width:334px;
203
-      overflow:hidden; 
204
-      text-overflow:ellipsis; 
205
-      white-space: nowrap
202
+      max-width: 320px;
203
+      @include text-ellipsis;
206 204
     }
207 205
 
208 206
     &__des {