parent
a3c6bf8e07
commit
13add51a20
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<router-view class="page" />
|
<router-view class="page" />
|
||||||
<!-- <ChatWidget /> -->
|
<ChatWidget />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script >
|
<script >
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
import request from '../utils/request'
|
import request from '../utils/request'
|
||||||
|
|
||||||
//历史聊天记录查询 用户查询七天前的聊天信息
|
//历史聊天记录查询 用户查询七天前的聊天信息
|
||||||
export function getHistory() {
|
export function getHistory(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `chat/message/find/history/message`,
|
url: `chat/message/find/history/message`,
|
||||||
method: 'get',
|
method: 'post',
|
||||||
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//历史聊天记录查询 查询七天内记录
|
//历史聊天记录查询 查询七天内记录
|
||||||
export function getHistory7() {
|
export function getHistory7(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `chat/message/find/recently/message`,
|
url: `chat/message/find/recently/message`,
|
||||||
method: 'get',
|
method: 'post',
|
||||||
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,11 +29,11 @@ export function getReadMessage(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//聊天列表
|
//聊天列表
|
||||||
export function getRoomList() {
|
export function getRoomList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/chat/rooms/find/room/list`,
|
url: `/chat/rooms/find/room/list`,
|
||||||
method: 'get',
|
method: 'post',
|
||||||
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,7 +23,7 @@ Vue.use(ElementUI, {
|
||||||
});
|
});
|
||||||
Vue.prototype.$axios = axios
|
Vue.prototype.$axios = axios
|
||||||
|
|
||||||
console.log = ()=>{} //全局关闭打印
|
// console.log = ()=>{} //全局关闭打印
|
||||||
// 全局注册混入
|
// 全局注册混入
|
||||||
Vue.mixin(loadingStateMixin);
|
Vue.mixin(loadingStateMixin);
|
||||||
Vue.mixin(networkRecoveryMixin);
|
Vue.mixin(networkRecoveryMixin);
|
||||||
|
|
|
@ -250,10 +250,12 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.loadingRooms = true;
|
this.loadingRooms = true;
|
||||||
const response = await getRoomList();
|
const response = await getRoomList();
|
||||||
if (response && response.code === 200 && response.data) {
|
|
||||||
this.contacts = response.data.map(room => ({
|
console.log(response,"获取聊天室列表");
|
||||||
roomId: room.roomId,
|
if (response && response.code === 200 ) {
|
||||||
name: room.roomName || '未命名聊天室',
|
this.contacts = response.rows.map(room => ({
|
||||||
|
roomId: room.id,
|
||||||
|
name: room.userEmail || '未命名聊天室',
|
||||||
avatar: this.getDefaultAvatar(room.roomName || '未命名聊天室'), // 使用默认头像
|
avatar: this.getDefaultAvatar(room.roomName || '未命名聊天室'), // 使用默认头像
|
||||||
lastMessage: room.lastMessage || '暂无消息',
|
lastMessage: room.lastMessage || '暂无消息',
|
||||||
lastTime: room.lastTime || new Date(),
|
lastTime: room.lastTime || new Date(),
|
||||||
|
|
|
@ -978,61 +978,7 @@ export default {
|
||||||
|
|
||||||
}, 200),
|
}, 200),
|
||||||
|
|
||||||
// async getPoolPowerData(params) {
|
|
||||||
// this.minerChartLoading = true
|
|
||||||
// const data = await getPoolPower(params)
|
|
||||||
// if (!data) {
|
|
||||||
// this.minerChartLoading = false
|
|
||||||
// if (this.myChart) {
|
|
||||||
// this.myChart.dispose()//销毁图表实列
|
|
||||||
// }
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// let chartData = data.data
|
|
||||||
// let xData = []
|
|
||||||
// let pvData = []
|
|
||||||
// let rejectRate = []
|
|
||||||
// let price = []
|
|
||||||
// chartData.forEach(item => {
|
|
||||||
|
|
||||||
// if (item.date.includes(`T`) && params.interval == `rt`) {
|
|
||||||
|
|
||||||
// item.date = `${item.date.split("T")[0]} ${item.date.split("T")[1].split(`.`)[0]}`
|
|
||||||
// } else if (item.date.includes(`T`) && params.interval == `1d`) {
|
|
||||||
// item.date = item.date.split("T")[0]
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// xData.push(item.date)
|
|
||||||
// pvData.push(Number(item.pv).toFixed(2))
|
|
||||||
// // rejectRate.push((item.rejectRate * 100).toFixed(2))
|
|
||||||
// if (item.price == 0) {
|
|
||||||
// price.push(item.price)
|
|
||||||
// } else if (item.price < 1) {
|
|
||||||
// price.push(Number(item.price).toFixed(8))
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// price.push(Number(item.price).toFixed(2))
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// });
|
|
||||||
// // this.maxValue = Math.max(...rejectRate);
|
|
||||||
// // let leftYMaxData = Math.max(...pvData);
|
|
||||||
// // this.option.yAxis[0].max =leftYMaxData*2
|
|
||||||
// this.option.xAxis.data = xData
|
|
||||||
// this.option.series[0].data = pvData
|
|
||||||
// // this.option.series[1].data = rejectRate
|
|
||||||
// this.option.series[1].data = price
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.inCharts()
|
|
||||||
// })
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// },
|
|
||||||
getPoolPowerData: Debounce(async function (params) {
|
getPoolPowerData: Debounce(async function (params) {
|
||||||
// this.minerChartLoading = true
|
// this.minerChartLoading = true
|
||||||
this.setLoading('minerChartLoading', true);
|
this.setLoading('minerChartLoading', true);
|
||||||
|
|
Loading…
Reference in New Issue