@@ -1,5 +1,6 @@ | |||
// components/listItem/listItem.js | |||
const app = getApp(); | |||
const $request = require('../../utils/request.js'); | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
@@ -84,13 +85,20 @@ Component({ | |||
} | |||
console.log(`点击了聊一聊`) | |||
let item = e.currentTarget.dataset.item; | |||
let businessCommunicationDemandId = item.businessCommunicationDemandId; | |||
$request.post('/statisticsBusinessCommunicationDemand/saveDemandCollect.action', | |||
{ businessCommunicationDemandId } | |||
).then(res => { }).catch(err => { console.log(err) }) | |||
$request.post('/statisticsBusinessCommunicationDemand/demandPageView.action', | |||
{ businessCommunicationDemandId, customerId: app.globalData.customerId } | |||
).then(res => { }).catch(err => { console.log(err) }) | |||
wx.navigateTo({ | |||
url: "/pages/msgModule/wechat2/wechat2", | |||
success: function (res) { | |||
// 通过eventChannel向被打开页面传送数据 | |||
res.eventChannel.emit('customerid', { | |||
customerid: item.customerId, | |||
businessCommunicationDemandId: item.businessCommunicationDemandId, | |||
businessCommunicationDemandId, | |||
chatHeads: item.chatHeads, | |||
info: item.info | |||
}) |
@@ -57,7 +57,7 @@ Page({ | |||
}, | |||
saveHomeCollect() { | |||
$request.post('/statisticsBusinessCommunicationDemand/saveHomeCollect.action', | |||
{ customerId: app.globalData.customerId } | |||
{ customerId: this.data.customerId } | |||
).then(res => { }).catch(err => { console.log(err) }) | |||
}, | |||
// 底部按钮点击 |
@@ -49,12 +49,6 @@ Page({ | |||
userCustomerId: businessCommunicationCustomer.customerId | |||
}) | |||
} | |||
// const listDetail = wx.getStorageSync('listDetail') || null; | |||
// this.setData({ | |||
// currentData: listDetail, | |||
// type: listDetail.type.join(), | |||
// pageLoading: true, | |||
// }) | |||
// 获取当前数据 | |||
this.getCurrentData(); | |||
if (app.globalData.customerId) { | |||
@@ -65,6 +59,17 @@ Page({ | |||
} else { | |||
this.getListData(); | |||
} | |||
// 设置当前访问量 | |||
this.setDemandCollect(); | |||
}, | |||
setDemandCollect(){ | |||
let businessCommunicationDemandId = this.data.businessCommunicationDemandId; | |||
$request.post('/statisticsBusinessCommunicationDemand/saveDemandCollect.action', | |||
{ businessCommunicationDemandId } | |||
).then(res => { }).catch(err => { console.log(err) }) | |||
$request.post('/statisticsBusinessCommunicationDemand/demandPageView.action', | |||
{ businessCommunicationDemandId,customerId: app.globalData.customerId } | |||
).then(res => { }).catch(err => { console.log(err) }) | |||
}, | |||
// 热门详情点击 | |||
goDetails(e) { |