@@ -54,7 +54,6 @@ App({ | |||
js_code: res.code | |||
}, | |||
success: (result) => { | |||
console.log("微信LOGIN result") | |||
if (!!result.data && result.data.openid) { | |||
this.globalData.openid = result.data.openid; | |||
this.globalData.appid = result.data.appid; | |||
@@ -69,7 +68,6 @@ App({ | |||
this.globalData.businessCommunicationCustomer = businessCommunicationCustomer; | |||
this.globalData.customerId = businessCommunicationCustomer.customerId; | |||
} | |||
console.log(`初始化拿到的缓存`,this.globalData) | |||
} | |||
} | |||
}) |
@@ -82,7 +82,6 @@ Component({ | |||
app.goLogin(); | |||
return | |||
} | |||
console.log(`点击了聊一聊`) | |||
let item = e.currentTarget.dataset.item; | |||
let businessCommunicationDemandId = item.businessCommunicationDemandId; | |||
$request.post('/statisticsBusinessCommunicationDemand/saveDemandCollect.action', |
@@ -77,7 +77,6 @@ Component({ | |||
// 获取当前路由 | |||
getChatRecordTable() { | |||
$request.get('/businessCommunicationDemand/getChatRecordTable.action').then(res => { | |||
// console.log(res,'res'); | |||
if(res.status == 0){ | |||
let chatRecordTable = res.data.chatRecordTable; | |||
let sum = 0; | |||
@@ -142,7 +141,6 @@ Component({ | |||
}, | |||
// tab切换 | |||
tabChange(e) { | |||
console.log(e); | |||
if (e.detail.item.text == "发布需求" || e.detail.item.text == "消息") { | |||
if (!app.globalData.customerId) { | |||
app.goLogin(); |
@@ -50,7 +50,6 @@ Page({ | |||
const eventChannel = this.getOpenerEventChannel() | |||
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | |||
eventChannel.on('customerid', data => { | |||
console.log(data, 'customerid') | |||
this.setData({ | |||
customerId: data.customerid, | |||
pageLoading: true, | |||
@@ -76,11 +75,8 @@ Page({ | |||
}, | |||
// 底部按钮点击 | |||
footBtnClick() { | |||
console.log(`点击了底部按钮`) | |||
console.log(this.data.isOther) | |||
// 前往聊一聊 | |||
if (this.data.isOther) { | |||
console.log(this.data.customer) | |||
let customer = this.data.customer; | |||
wx.navigateTo({ | |||
url: "/pages/msgModule/wechat2/wechat2", | |||
@@ -105,11 +101,9 @@ Page({ | |||
this.setData({ | |||
pageLoading: false, | |||
}) | |||
console.log(res) | |||
let tempListData = this.data.listData; | |||
if (res.status == 0) { | |||
let datas = res.data; | |||
console.log(datas, 'datas') | |||
// 先push数据 | |||
tempListData.push(...datas.demandList); | |||
tempListData.forEach(el => { | |||
@@ -146,9 +140,6 @@ Page({ | |||
page: page + 1 | |||
}) | |||
} | |||
console.log('-------------个人主页 beg-------------------') | |||
console.log(this.data.listData); | |||
console.log('-------------个人主页 end-------------------') | |||
} | |||
}).catch(error => { | |||
console.log(error, 'error appletLogin') |
@@ -34,7 +34,6 @@ Page({ | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad(option) { | |||
// console.log(option,`option触发--11`) | |||
this.setData({ | |||
businessCommunicationDemandId: option.businessCommunicationDemandId | |||
}) | |||
@@ -99,7 +98,6 @@ Page({ | |||
listDetail.createdOn = listDetail.createdOn.replaceAll('/', '-'); | |||
if (typeof listDetail.type == 'string') { | |||
listDetail.type = listDetail.type.split(','); | |||
// console.log(listDetail.type) | |||
} | |||
this.setData({ | |||
currentData: listDetail, |
@@ -220,7 +220,6 @@ Page({ | |||
this.setData({ | |||
paramIsInterest | |||
}) | |||
console.log(`本次接口:type`,type) | |||
$request.get('/businessCommunicationDemand/getDemandByKeywordOrType.action', | |||
{ page, size, keyword, type, isInterest: paramIsInterest } | |||
).then(res => { |
@@ -39,7 +39,6 @@ Page({ | |||
}, | |||
// 获取手机号授权 | |||
getPhoneNumber(e) { | |||
console.log(e); | |||
if (!!e.detail.iv && !!e.detail.encryptedData) { | |||
const iv = e.detail.iv | |||
const encryptedData = e.detail.encryptedData | |||
@@ -72,7 +71,6 @@ Page({ | |||
province, | |||
city | |||
}).then(res => { | |||
console.log(res, '保存用户信息返回的Res') | |||
this.getUserSession() | |||
}).catch(error => { | |||
console.log(error, 'error appletLogin') | |||
@@ -122,8 +120,6 @@ Page({ | |||
let that = this | |||
$request.post('/script/getSession.action', {}).then(res => { | |||
wx.hideLoading() | |||
console.log(res, '返回的res') | |||
let businessCommunicationCustomer = res.data.businessCommunicationCustomer; | |||
app.globalData.customerId = businessCommunicationCustomer.customerId; | |||
app.globalData.customer = res.data.customer; |
@@ -171,7 +171,6 @@ Page({ | |||
el.type = el.type.split(','); | |||
} | |||
if (el.customer) { | |||
// console.log(el.customer.paidByMonth,el.customer.nickName) | |||
if (el.customer.paidByMonth) { | |||
el.businessCommunicationCustomerVO.nickName = el.customer.nickName | |||
} | |||
@@ -182,23 +181,6 @@ Page({ | |||
msgData: tempListData, | |||
total: datas.total, | |||
}) | |||
// // 如果数据大于了返回的总数 | |||
// if (tempListData.length >= this.data.total) { | |||
// // 停止累加数据 | |||
// this.setData({ | |||
// onRefresh: false, | |||
// itemLoading: false, | |||
// }) | |||
// } else { | |||
// this.setData({ | |||
// onRefresh: true, | |||
// itemLoading: false, | |||
// page: page + 1 | |||
// }) | |||
// } | |||
console.log('-------------消息 beg-------------------') | |||
console.log(this.data.msgData); | |||
console.log('-------------消息 end-------------------') | |||
} | |||
this.setData({ | |||
pageLoading: false, | |||
@@ -227,7 +209,6 @@ Page({ | |||
msgData: msgData | |||
}) | |||
$request.post('/businessCommunicationDemand/delChatRecordTable/' + customerId + '/' + lastChatRecordCode + '.action').then(res => { | |||
// console.log() | |||
// if (res.status == 0) { | |||
// let msgData = this.data.msgData; | |||
// msgData.forEach((el, inx) => { |
@@ -116,7 +116,6 @@ Page({ | |||
initWebSocket: function () { | |||
var _this = this; | |||
let { receiveMemberId, sendMemberId } = _this.data; | |||
// console.log() | |||
//建立连接 | |||
wx.connectSocket({ | |||
url: `ws://` + app.webSocketUrl + `/webSocket/{"userno":${receiveMemberId},"messageModule":"010"}`,//本地 | |||
@@ -162,9 +161,6 @@ Page({ | |||
}) | |||
_this.setMsgRead('newsList', _this.data.newsList, 0) | |||
_this.scrollBottom() | |||
console.log('--------------对方给你发消息拉 beg -------------') | |||
console.log(_data); | |||
console.log('--------------对方给你发消息拉 end -------------') | |||
}, | |||
) | |||
@@ -196,10 +192,8 @@ Page({ | |||
this.setData({ | |||
historyList | |||
}) | |||
console.log(this.data.historyList, '历史记录数据') | |||
} | |||
// 如果产品ID存在 | |||
console.log(businessCommunicationDemandId, '产品ID是否存在') | |||
if (businessCommunicationDemandId) { | |||
if (historyList.length > 0) { | |||
let tempArr = []; | |||
@@ -233,20 +227,6 @@ Page({ | |||
// 滚动到底部 | |||
scrollBottom: function () { | |||
console.log(`触发了吗?`) | |||
// wx.createSelectorQuery().select('#sendmessage').boundingClientRect(rect => { | |||
// console.log(rect.height); | |||
// console.log(`触发了吗2?`) | |||
// wx.pageScrollTo({ | |||
// scrollTop:rect.height | |||
// }) | |||
// }).exec() | |||
// var { newsList } = this.data | |||
// var scrollid = `scrollid${newsList.length - 1}`; | |||
// if (newsList.length == 0) { | |||
// scrollid = "scrollid0" | |||
// } | |||
this.setData({ | |||
scrollid:"sendmessage" | |||
}) | |||
@@ -394,15 +374,12 @@ Page({ | |||
input: null, | |||
inputShowed: true, | |||
}) | |||
console.log(this.data.newsList, 'this.data.newsList') | |||
this.scrollBottom() | |||
// 表情选择隐藏 | |||
this.setData({ | |||
emotionVisible: false, | |||
}) | |||
const client = wx.getSystemInfoSync().windowHeight // 获取当前窗口的高度 | |||
console.log(client, '当前消息高度') | |||
}, | |||
bindChange: function (res) { | |||
this.setData({ | |||
@@ -414,21 +391,17 @@ Page({ | |||
console.log('连接断开'); | |||
}, | |||
emotionChange() { | |||
console.log(`测试打开表情`) | |||
this.setData({ | |||
emotionVisible: !this.data.emotionVisible | |||
}) | |||
}, | |||
addemotion: function (e) { | |||
console.log(e.currentTarget.dataset.index, "点了设默默") | |||
let { connectemoji, input } = this.data | |||
if (input) { | |||
input = input + connectemoji[e.currentTarget.dataset.index]; | |||
} else { | |||
input = connectemoji[e.currentTarget.dataset.index] | |||
} | |||
console.log(input, '输入框额值') | |||
this.setData({ | |||
input, | |||
emotionVisible: false, | |||
@@ -488,7 +461,6 @@ Page({ | |||
viewImg(e) { | |||
let url = e.currentTarget.dataset.url; | |||
url += "?time=" + Date.now(); | |||
console.log(url) | |||
wx.previewImage({ | |||
current: url, // 当前显示图片的http链接 | |||
urls: [url] // 需要预览的图片http链接列表 |
@@ -19,7 +19,6 @@ Page({ | |||
const eventChannel = this.getOpenerEventChannel() | |||
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | |||
eventChannel.on('customerid', data => { | |||
console.log(data) | |||
this.setData({ | |||
customerId: data.customerid, | |||
pageLoading: true, | |||
@@ -47,7 +46,6 @@ Page({ | |||
$request.get(`/businessCommunicationCustomer/getAttentionTypeIds.action`, | |||
{ customerId } | |||
).then(res => { | |||
// console.log(res); | |||
if (res.status == 0) { | |||
let selectedTags = res.data ? res.data.split(',') : []; | |||
this.setData({ selectedTags }) | |||
@@ -92,7 +90,6 @@ Page({ | |||
} | |||
}) | |||
this.setData({ types }) | |||
console.log(types, 'types') | |||
}, | |||
// 设置关注类型 | |||
setAttentionTypeIds() { |
@@ -73,7 +73,6 @@ Page({ | |||
delCollect(e) { | |||
let businessCommunicationDemandId = e.currentTarget.dataset.id; | |||
let customerId = this.data.customerId; | |||
console.log({ customerId, businessCommunicationDemandId }); | |||
wx.showLoading({ | |||
title: '操作中...', | |||
mask: true | |||
@@ -112,7 +111,6 @@ Page({ | |||
let tempListData = this.data.listData; | |||
if (res.status == 0) { | |||
let datas = res.data; | |||
console.log(datas, 'datas') | |||
// 先push数据 | |||
tempListData.push(...datas.demandList); | |||
tempListData.forEach(el => { |
@@ -41,7 +41,6 @@ Page({ | |||
const eventChannel = this.getOpenerEventChannel() | |||
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | |||
eventChannel.on('customerid', data => { | |||
console.log(data) | |||
this.setData({ | |||
customerId: data.customerid, | |||
listLoading: true, | |||
@@ -259,7 +258,6 @@ Page({ | |||
let tempListData = this.data.listData; | |||
if (res.status == 0) { | |||
let datas = res.data; | |||
console.log(datas, 'datas') | |||
// 先push数据 | |||
tempListData.push(...datas.demandList); | |||
tempListData.forEach(el => { | |||
@@ -288,9 +286,6 @@ Page({ | |||
page: page + 1 | |||
}) | |||
} | |||
console.log('-------------个人主页 beg-------------------') | |||
console.log(this.data.listData); | |||
console.log('-------------个人主页 end-------------------') | |||
} | |||
this.setData({ | |||
listLoading: false, |
@@ -38,9 +38,6 @@ Page({ | |||
user: app.globalData.businessCommunicationCustomer, | |||
isLogin: true | |||
}) | |||
console.log(`------------------当前登录用户-----------------------`) | |||
console.log(app.globalData.businessCommunicationCustomer); | |||
console.log(`------------------当前登录用户-----------------------`) | |||
} | |||
}, | |||
onShow() { |
@@ -123,8 +123,6 @@ Page({ | |||
tags, | |||
setTags: true | |||
}) | |||
// console.log(this.data.selectedTag,'selectedTag'); | |||
// console.log(this.data.tags,'tags'); | |||
}, | |||
// 发布需求 | |||
releaseDemands() { |