|
@@ -1314,7 +1314,7 @@ export default class Index extends Component {
|
1314
|
1314
|
const { videoPlayShow } = this.state
|
1315
|
1315
|
const { projectDetail } = this.props
|
1316
|
1316
|
const { videoImage } = projectDetail
|
1317
|
|
- const imgSrc = videoImage[0].url
|
|
1317
|
+ const imgSrc = videoImage ? videoImage[0].url : ''
|
1318
|
1318
|
|
1319
|
1319
|
return (
|
1320
|
1320
|
<View
|
|
@@ -1437,6 +1437,11 @@ export default class Index extends Component {
|
1437
|
1437
|
const { uvList = {} } = projectDetail
|
1438
|
1438
|
const { total = 0, records = [] } = uvList
|
1439
|
1439
|
const openDate = projectDetail.openingDate ? dayjs(projectDetail.openingDate).locale('zh-cn').format('YYYY年M月D日') : '暂无'
|
|
1440
|
+ const showBuildingImgs = projectDetail.buildingImg && projectDetail.buildingImg.length > 0
|
|
1441
|
+ const showBuildingVRs = projectDetail.panoramaList && projectDetail.panoramaList.length > 0
|
|
1442
|
+ const shwoBuildingVideo = projectDetail.videoUrl ? true : false
|
|
1443
|
+ const showMediaBtn = showBuildingImgs + showBuildingVRs + shwoBuildingVideo > 1 // 满足2个就展示
|
|
1444
|
+
|
1440
|
1445
|
return (
|
1441
|
1446
|
<Block>
|
1442
|
1447
|
{
|
|
@@ -1447,10 +1452,6 @@ export default class Index extends Component {
|
1447
|
1452
|
grantAvatarVisible &&
|
1448
|
1453
|
<AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
|
1449
|
1454
|
}
|
1450
|
|
- {/* {
|
1451
|
|
- (userInfo.person.personId && !userInfo.person.phone && !userInfo.person.tel) &&
|
1452
|
|
- <AchievePhone user={userInfo.person} onSuccess={this.handleAuthPhoneSuccess}></AchievePhone>
|
1453
|
|
- } */}
|
1454
|
1455
|
{
|
1455
|
1456
|
loaded && (
|
1456
|
1457
|
<View className='detail'>
|
|
@@ -1463,13 +1464,12 @@ export default class Index extends Component {
|
1463
|
1464
|
{btnstate === 2 && this.renderBannerPanorama()}
|
1464
|
1465
|
|
1465
|
1466
|
{
|
1466
|
|
- projectDetail.buildingImg && projectDetail.buildingImg.length &&
|
1467
|
|
- projectDetail.panoramaList && projectDetail.panoramaList.length &&
|
|
1467
|
+ showMediaBtn &&
|
1468
|
1468
|
(
|
1469
|
1469
|
<View className="media-btn">
|
1470
|
|
- {/* <View className={`btn ${btnstate === 1 && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 1)}>视频</View> */}
|
1471
|
|
- <View className={`btn ${btnstate === 2 && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 2)}>全景</View>
|
1472
|
|
- <View className={`btn ${!btnstate && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 0)}>图片</View>
|
|
1470
|
+ {shwoBuildingVideo && <View className={`btn ${btnstate === 1 && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 1)}>视频</View>}
|
|
1471
|
+ {showBuildingVRs && <View className={`btn ${btnstate === 2 && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 2)}>全景</View>}
|
|
1472
|
+ {showBuildingImgs && <View className={`btn ${!btnstate && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 0)}>图片</View>}
|
1473
|
1473
|
</View>
|
1474
|
1474
|
)
|
1475
|
1475
|
}
|