1007395918@qq.com 5 jaren geleden
bovenliggende
commit
966c413454

+ 1
- 1
src/onlineSelling/components/HouseGrid/Room.js Bestand weergeven

@@ -19,7 +19,7 @@ export default function Room(props) {
19 19
       {status == '1' && <View className="room" onClick={handleClick}>
20 20
         <View className="warn">{roomName || ''}</View>
21 21
         <View className="warn">{personNum || ''}</View>
22
-        <View className="info" style="white-space:nowrap;">{wanY}万元</View>
22
+        <View className="info" >{wanY}万元</View>
23 23
         <View className="info">{apartmentName || ''}</View>
24 24
       </View>}
25 25
 

+ 2
- 0
src/onlineSelling/components/HouseGrid/room.scss Bestand weergeven

@@ -4,10 +4,12 @@
4 4
   padding: 20px 10px;
5 5
   font-size: 28px;
6 6
   line-height: 1.4em;
7
+  height: 192px;
7 8
   overflow: hidden;
8 9
 
9 10
   .info {
10 11
     color: #333;
12
+    white-space:nowrap;
11 13
   }
12 14
 
13 15
   .warn {

+ 24
- 10
src/onlineSelling/pages/detail/index.js Bestand weergeven

@@ -93,15 +93,30 @@ export default class Index extends Component {
93 93
     })
94 94
   }
95 95
 
96
-  handlePanoramaClick(panorama) {
97
-    const url = (panorama || {}).panoramaLink
96
+  handlePanoramaClick(panoramaLink) {
97
+    console.log(panoramaLink, "panoramapanoramapanoramapanoramapanoramapanoramapanoramapanoramapanorama")
98 98
 
99
-    if (!url) return;
99
+    if (!panoramaLink) return;
100 100
 
101
-    this.navigateTo(`/pages/project/panorama/index?url=${encodeURIComponent(url)}`)
101
+    Taro.navigateTo({ url: `/pages/project/panorama/index?url=${encodeURIComponent(panoramaLink)}` })
102
+
103
+  }
104
+
105
+  goToPanorama(panoramaLink) {
106
+
107
+
108
+    if (!panoramaLink) return;
109
+
110
+    this.navigateTo(`/pages/project/panorama/index?url=${encodeURIComponent(panoramaLink)}`)
111
+  }
112
+
113
+  handlePanoramaClick(panoramaLink) {
114
+    this.goToPanorama(panoramaLink)
115
+  }
116
+  navigateTo(url) {
117
+    Taro.navigateTo({ url: url })
102 118
   }
103 119
 
104
-  
105 120
 
106 121
 
107 122
   render() {
@@ -128,14 +143,13 @@ export default class Index extends Component {
128 143
         <View className='detail'>
129 144
           <View className='detail-top'>
130 145
             {buildingImgList.length ?
131
-              <Block>
132
-                <Image className="cover-img" mode="aspectFill" src={transferImage(buildingImgList[0].url)}></Image>
133
-                {/* <Image className="vr-img"   onClick={this.handlePanoramaClick.bind(this)} src={require('@/assets/vr.png')}></Image> */}
134
-              </Block>
146
+              <Image className="cover-img" mode="aspectFill" src={transferImage(buildingImgList[0].url)} />
135 147
               : <Blank tips="暂无户型信息"></Blank>
136 148
             }
137
-
138 149
           </View>
150
+          {buildingImgList.length && buildingImgList[0].type == '1' &&
151
+            <Image className="vr-img" onClick={() => this.handlePanoramaClick(buildingImgList[0].panoramaLink)} src={require('@/assets/vr.png')} />
152
+          }
139 153
           <ScrollView
140 154
             enableBackToTop
141 155
             className="wrap"

+ 10
- 10
src/onlineSelling/pages/detail/index.scss Bestand weergeven

@@ -28,6 +28,13 @@
28 28
   }
29 29
 
30 30
 }
31
+.vr-img{
32
+  position: fixed;
33
+  top: 452px;
34
+  left: 327px;
35
+  width:96px;
36
+  height:88px;
37
+}
31 38
 .detail {
32 39
   position: relative;
33 40
   width: 100%;
@@ -43,16 +50,8 @@
43 50
     .cover-img{
44 51
       width:100%;
45 52
       height:100%;
46
-      position: fixed;
47
-      top: 0;
48
-    }
49
-    .vr-img{
50
-      position: fixed;
51
-      top: 452px;
52
-      left: 327px;
53
-      width:96px;
54
-      height:88px;
55 53
     }
54
+    
56 55
     .norecord-img{
57 56
       width:280px;
58 57
       height:220px;
@@ -65,9 +64,10 @@
65 64
   }
66 65
  
67 66
   .wrap {
68
-    padding-top: 570px;
67
+    margin-top: 570px;
69 68
     background: transparent;
70 69
     position: relative;
70
+
71 71
   }
72 72
 
73 73
   &__main {