소스 검색

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

release/210823_需求对对碰
王饶冀 3 년 전
부모
커밋
d000e065a2
3개의 변경된 파일31개의 추가작업 그리고 16개의 파일을 삭제
  1. 27
    13
      pages/index/components/homepage/homepage.js
  2. 1
    1
      pages/index/components/listDetails/Details.js
  3. 3
    2
      pages/index/index.js

+ 27
- 13
pages/index/components/homepage/homepage.js 파일 보기

@@ -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
}
}
}

+ 1
- 1
pages/index/components/listDetails/Details.js 파일 보기

@@ -241,7 +241,7 @@ Page({
return {
title: "发现了一个适合你的需求!推荐你一起来关注~",
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 파일 보기

@@ -76,8 +76,6 @@ Page({
customerId: null,
},
onLoad() {
},
onShow() {
this.setData({
currentIndex: 0
})
@@ -95,6 +93,9 @@ Page({
customerId: businessCommunicationCustomer.customerId
})
}
},
onShow() {
},
toggleMore() {
this.selectComponent('#item').toggle();

Loading…
취소
저장