|
@@ -14,12 +14,12 @@ import './indexDtl.scss'
|
|
|
|
|
|
class Index extends Component {
|
|
|
onShareAppMessage() {
|
|
|
- const { YH } = this.$router.params
|
|
|
+ const userInfo = Taro.getStorageSync('APP_userInfo') || {}
|
|
|
const { curId, curObj } = this.state
|
|
|
- if (YH === 'zzyh' || YH === 'yhjg') {
|
|
|
+ if (userInfo.is_sale == 1) {
|
|
|
return {
|
|
|
- title: `${curObj.estate_name}-楼盘详情`,
|
|
|
- path: `/pagesHouse/indexDtl?id=${curId}&YH=${YH}`,
|
|
|
+ title: `${userInfo.nickname}给您推荐:${curObj.estate_name}`,
|
|
|
+ path: `/pagesHouse/indexDtl?id=${curId}&referrer=${userInfo.user_id}`,
|
|
|
}
|
|
|
} else {
|
|
|
return {
|
|
@@ -29,12 +29,12 @@ class Index extends Component {
|
|
|
}
|
|
|
}
|
|
|
onShareTimeline () {
|
|
|
- const { YH } = this.$router.params
|
|
|
+ const userInfo = Taro.getStorageSync('APP_userInfo') || {}
|
|
|
const { curId, curObj } = this.state
|
|
|
- if (YH === 'zzyh' || YH === 'yhjg') {
|
|
|
+ if (userInfo.is_sale == 1) {
|
|
|
return {
|
|
|
- title: `${curObj.estate_name}-楼盘详情`,
|
|
|
- path: `/pagesHouse/indexDtl?id=${curId}&YH=${YH}`,
|
|
|
+ title: `${userInfo.nickname}给您推荐:${curObj.estate_name}`,
|
|
|
+ path: `/pagesHouse/indexDtl?id=${curId}&referrer=${userInfo.user_id}`,
|
|
|
}
|
|
|
} else {
|
|
|
return {
|
|
@@ -53,10 +53,11 @@ class Index extends Component {
|
|
|
curImgIndex: 0,
|
|
|
isLoginPopupShow: false,
|
|
|
token: '',
|
|
|
- userInfo: '',
|
|
|
+ userInfo: {},
|
|
|
photoList: [],
|
|
|
buyRuleObj: {},
|
|
|
viewId: '',
|
|
|
+ referrer: '',
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -64,6 +65,17 @@ class Index extends Component {
|
|
|
navigationBarTitleText: '楼盘详情',
|
|
|
}
|
|
|
|
|
|
+ componentWillMount () {
|
|
|
+ const {referrer} = this.$router.params
|
|
|
+ if (referrer) {
|
|
|
+ this.setState({
|
|
|
+ referrer
|
|
|
+ })
|
|
|
+ Taro.clearStorageSync('APP_cur_sale')
|
|
|
+ Taro.setStorageSync("APP_MY_REFERRER", referrer)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
componentDidMount () {
|
|
|
Taro.$AHU(this)
|
|
|
const { curId } = this.state
|