Przeglądaj źródła

1 修复【需求对对碰】点击需求详情页面分享链接,一直处于加载中;点击主页分享链接,主页内容显示有误

release/210823_需求对对碰
王饶冀 3 lat temu
rodzic
commit
d000e065a2

+ 27
- 13
pages/index/components/homepage/homepage.js Wyświetl plik

// 是他人主业还是个人主业 // 是他人主业还是个人主业
isOther: false, isOther: false,
// 登录用户ID // 登录用户ID
loginCustomerId:"",
loginCustomerId: "",
}, },


/** /**
loginCustomerId: businessCommunicationCustomer.customerId loginCustomerId: businessCommunicationCustomer.customerId
}) })
} }
console.log(options, 'options')
const eventChannel = this.getOpenerEventChannel() const eventChannel = this.getOpenerEventChannel()
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
eventChannel.on('customerid', data => {
// console.log(eventChannel)
if (eventChannel.on) {
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
eventChannel.on('customerid', data => {
this.setData({
customerId: data.customerid,
pageLoading: true,
isOther: data.customerid != app.globalData.customerId
})
})
} else {
this.setData({ this.setData({
customerId: data.customerid,
customerId: options.customerId,
pageLoading: true, pageLoading: true,
isOther: data.customerid != app.globalData.customerId
isOther: options.customerId != app.globalData.customerId
}) })
// 记录浏览量
if (this.data.isOther) {
this.saveHomeCollect();
}
this.getListData();
})
}
// 记录浏览量
if (this.data.isOther) {
this.saveHomeCollect();
}
this.getListData();
}, },
// 进入详情 // 进入详情
goDetails(e) { goDetails(e) {
}, },
// 底部按钮点击 // 底部按钮点击
footBtnClick() { footBtnClick() {
if (!app.globalData.customerId) {
app.goLogin();
return
}
// 前往聊一聊 // 前往聊一聊
if (this.data.isOther) { if (this.data.isOther) {
let customer = this.data.customer; let customer = this.data.customer;
return { return {
title: "发现了一个适合你的客户需求!推荐你一起来关注~", title: "发现了一个适合你的客户需求!推荐你一起来关注~",
imageUrl: '/images/home/ShareApp-homePage2.png', imageUrl: '/images/home/ShareApp-homePage2.png',
path: 'pages/index/components/homepage/homepage'
path: 'pages/index/components/homepage/homepage?customerId=' + this.data.customerId,
} }
} else { } else {
return { return {
title: "分享给你我的需求信息!推荐你一起来关注~", title: "分享给你我的需求信息!推荐你一起来关注~",
imageUrl: '/images/home/ShareApp-homePage1.png', imageUrl: '/images/home/ShareApp-homePage1.png',
path: 'pages/index/components/homepage/homepage'
path: 'pages/index/components/homepage/homepage?customerId=' + this.data.customerId
} }
} }
} }

+ 1
- 1
pages/index/components/listDetails/Details.js Wyświetl plik

return { return {
title: "发现了一个适合你的需求!推荐你一起来关注~", title: "发现了一个适合你的需求!推荐你一起来关注~",
imageUrl: '/images/home/ShareApp-details.png', imageUrl: '/images/home/ShareApp-details.png',
path: 'pages/index/components/listDetails/Details'
path: 'pages/index/components/listDetails/Details?businessCommunicationDemandId=' + this.data.businessCommunicationDemandId
} }
}, },
}) })

+ 3
- 2
pages/index/index.js Wyświetl plik

customerId: null, customerId: null,
}, },
onLoad() { onLoad() {
},
onShow() {
this.setData({ this.setData({
currentIndex: 0 currentIndex: 0
}) })
customerId: businessCommunicationCustomer.customerId customerId: businessCommunicationCustomer.customerId
}) })
} }
},
onShow() {
}, },
toggleMore() { toggleMore() {
this.selectComponent('#item').toggle(); this.selectComponent('#item').toggle();

Ładowanie…
Anuluj
Zapisz