|
@@ -84,6 +84,8 @@ export default class Index extends Component {
|
84
|
84
|
qrcodeParams: '',
|
85
|
85
|
grantPhoneVisible: false, // 授权电话
|
86
|
86
|
grantAvatarVisible: false, // 授权头像
|
|
87
|
+ maskVisible: false,
|
|
88
|
+ extendContent: []
|
87
|
89
|
}
|
88
|
90
|
|
89
|
91
|
componentWillPreload(params) {
|
|
@@ -125,11 +127,11 @@ export default class Index extends Component {
|
125
|
127
|
componentDidShow() {
|
126
|
128
|
console.log('3366633', this.$router.params)
|
127
|
129
|
|
128
|
|
- const fromCard = !!wx.getStorageSync('from-card')
|
|
130
|
+ const fromCard = !!wx.getStorageSync('from-card')
|
129
|
131
|
|
130
|
|
- if (fromCard) {
|
131
|
|
- this.loadData()
|
132
|
|
- }
|
|
132
|
+ if (fromCard) {
|
|
133
|
+ this.loadData()
|
|
134
|
+ }
|
133
|
135
|
}
|
134
|
136
|
|
135
|
137
|
componentWillUnmount() {
|
|
@@ -336,8 +338,11 @@ export default class Index extends Component {
|
336
|
338
|
})
|
337
|
339
|
|
338
|
340
|
dispatchProjectDetail(buildingId).then(res => {
|
|
341
|
+ const maskVisible = (res.extendContent || []).length
|
339
|
342
|
this.setState({
|
340
|
343
|
loaded: true,
|
|
344
|
+ maskVisible,
|
|
345
|
+ extendContent: res.extendContent[0],
|
341
|
346
|
// circumOpts: newCircumOpts,
|
342
|
347
|
isSaved: res.isSave
|
343
|
348
|
}, () => {
|
|
@@ -1504,9 +1509,95 @@ export default class Index extends Component {
|
1504
|
1509
|
</View>
|
1505
|
1510
|
);
|
1506
|
1511
|
}
|
|
1512
|
+ handleMaskBannerClick(data) {
|
|
1513
|
+ this.redirectTo(data)
|
|
1514
|
+ }
|
|
1515
|
+ redirectTo({ targetId, contentType, buildingId } = {}) {
|
|
1516
|
+ switch (contentType) {
|
|
1517
|
+ // 项目
|
|
1518
|
+ case 'project':
|
|
1519
|
+ Taro.navigateTo({
|
|
1520
|
+ url: '/pages/project/detail/index?id=' + buildingId
|
|
1521
|
+ })
|
|
1522
|
+ return;
|
1507
|
1523
|
|
|
1524
|
+ // 活动
|
|
1525
|
+ case 'activity':
|
|
1526
|
+ Taro.navigateTo({
|
|
1527
|
+ url: '/pages/activity/detail/index?id=' + targetId
|
|
1528
|
+ })
|
|
1529
|
+ return;
|
|
1530
|
+
|
|
1531
|
+ // 助力
|
|
1532
|
+ case 'help':
|
|
1533
|
+ Taro.navigateTo({
|
|
1534
|
+ url: '/pages/activity/detail/assistance?id=' + targetId
|
|
1535
|
+ })
|
|
1536
|
+ return;
|
|
1537
|
+
|
|
1538
|
+ // 拼团
|
|
1539
|
+ case 'group':
|
|
1540
|
+ Taro.navigateTo({
|
|
1541
|
+ url: '/pages/activity/detail/assemble?id=' + targetId
|
|
1542
|
+ })
|
|
1543
|
+ return;
|
|
1544
|
+
|
|
1545
|
+ // 资讯
|
|
1546
|
+ case 'news':
|
|
1547
|
+ Taro.navigateTo({
|
|
1548
|
+ url: '/pages/news/detail/index?id=' + targetId
|
|
1549
|
+ })
|
|
1550
|
+ return;
|
|
1551
|
+ // h5
|
|
1552
|
+ case 'h5':
|
|
1553
|
+ Taro.navigateTo({
|
|
1554
|
+ url: '/pages/project/h5Page?id=' + targetId
|
|
1555
|
+ })
|
|
1556
|
+ return;
|
|
1557
|
+ // live
|
|
1558
|
+ case 'live':
|
|
1559
|
+ Taro.navigateTo({
|
|
1560
|
+ url: '/onlineSelling/pages/live/index?id=' + targetId
|
|
1561
|
+ })
|
|
1562
|
+ return;
|
|
1563
|
+ // salesBatch
|
|
1564
|
+ case 'salesBatch':
|
|
1565
|
+ Taro.navigateTo({
|
|
1566
|
+ url: `/onlineSelling/pages/houseList/index?id=${targetId}`
|
|
1567
|
+ })
|
|
1568
|
+ return;
|
|
1569
|
+
|
|
1570
|
+ // 其他
|
|
1571
|
+ case 'others':
|
|
1572
|
+ default:
|
|
1573
|
+ this.handleMaskClose()
|
|
1574
|
+ return;
|
|
1575
|
+ }
|
|
1576
|
+ }
|
|
1577
|
+ handleMaskClose() {
|
|
1578
|
+ this.setState({
|
|
1579
|
+ maskVisible: false
|
|
1580
|
+ })
|
|
1581
|
+ }
|
|
1582
|
+ renderMaskBanner() {
|
|
1583
|
+
|
|
1584
|
+ const { extendContent = [] } = this.state
|
|
1585
|
+ return (
|
|
1586
|
+ <View className="mask-banner">
|
|
1587
|
+ <View className="content">
|
|
1588
|
+ <Image
|
|
1589
|
+ mode="widthFix"
|
|
1590
|
+ className="img"
|
|
1591
|
+ src={transferImage(extendContent.image)}
|
|
1592
|
+ onClick={this.handleMaskBannerClick.bind(this, extendContent)}>
|
|
1593
|
+ </Image>
|
|
1594
|
+ <Icon className="iconfont close icon-buoumaotubiao20" onClick={this.handleMaskClose}></Icon>
|
|
1595
|
+ </View>
|
|
1596
|
+ </View>
|
|
1597
|
+ )
|
|
1598
|
+ }
|
1508
|
1599
|
render() {
|
1509
|
|
- const { grantPhoneVisible, grantAvatarVisible, posterStatus, posterData, loaded, btnstate, consultData, consultShow } = this.state
|
|
1600
|
+ const { grantPhoneVisible, grantAvatarVisible, maskVisible, posterStatus, posterData, loaded, btnstate, consultData, consultShow } = this.state
|
1510
|
1601
|
const { projectDetail, userInfo = { person: {} } } = this.props
|
1511
|
1602
|
const { uvList = {} } = projectDetail
|
1512
|
1603
|
const { total = 0, records = [] } = uvList
|
|
@@ -1533,6 +1624,9 @@ export default class Index extends Component {
|
1533
|
1624
|
grantAvatarVisible &&
|
1534
|
1625
|
<AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
|
1535
|
1626
|
}
|
|
1627
|
+
|
|
1628
|
+ {maskVisible && this.renderMaskBanner()}
|
|
1629
|
+
|
1536
|
1630
|
{
|
1537
|
1631
|
loaded && (
|
1538
|
1632
|
<View className='detail'>
|