|
|
@@ -34,7 +34,7 @@ Page({ |
|
|
|
// 是他人主业还是个人主业 |
|
|
|
isOther: false, |
|
|
|
// 登录用户ID |
|
|
|
loginCustomerId:"", |
|
|
|
loginCustomerId: "", |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
@@ -47,20 +47,30 @@ Page({ |
|
|
|
loginCustomerId: businessCommunicationCustomer.customerId |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(options, 'options') |
|
|
|
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({ |
|
|
|
customerId: data.customerid, |
|
|
|
customerId: options.customerId, |
|
|
|
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) { |
|
|
@@ -75,6 +85,10 @@ Page({ |
|
|
|
}, |
|
|
|
// 底部按钮点击 |
|
|
|
footBtnClick() { |
|
|
|
if (!app.globalData.customerId) { |
|
|
|
app.goLogin(); |
|
|
|
return |
|
|
|
} |
|
|
|
// 前往聊一聊 |
|
|
|
if (this.data.isOther) { |
|
|
|
let customer = this.data.customer; |
|
|
@@ -166,13 +180,13 @@ Page({ |
|
|
|
return { |
|
|
|
title: "发现了一个适合你的客户需求!推荐你一起来关注~", |
|
|
|
imageUrl: '/images/home/ShareApp-homePage2.png', |
|
|
|
path: 'pages/index/components/homepage/homepage' |
|
|
|
path: 'pages/index/components/homepage/homepage?customerId=' + this.data.customerId, |
|
|
|
} |
|
|
|
} else { |
|
|
|
return { |
|
|
|
title: "分享给你我的需求信息!推荐你一起来关注~", |
|
|
|
imageUrl: '/images/home/ShareApp-homePage1.png', |
|
|
|
path: 'pages/index/components/homepage/homepage' |
|
|
|
path: 'pages/index/components/homepage/homepage?customerId=' + this.data.customerId |
|
|
|
} |
|
|
|
} |
|
|
|
} |