更换体制外文档查看器的地址路径;解决单聊搜索定位聊天记录,无法定位到对方的聊天记录的问题
This commit is contained in:
parent
7d3d47a63c
commit
6c6bcb7dce
2
env/.env.prodOut
vendored
2
env/.env.prodOut
vendored
@ -13,4 +13,4 @@ VITE_SOCKET_API = 'wss://chat-out.szjixun.cn' #体制外
|
|||||||
# EPRAPI baseUrl
|
# EPRAPI baseUrl
|
||||||
VITE_EPR_BASEURL = 'https://erpapi-out.szjixun.cn' #体制外
|
VITE_EPR_BASEURL = 'https://erpapi-out.szjixun.cn' #体制外
|
||||||
# 文档查看器
|
# 文档查看器
|
||||||
VITE_PAGE_URL = https://chat-pc.szjixun.cn #体制外
|
VITE_PAGE_URL = https://chat-pc-out.szjixun.cn #体制外
|
@ -296,7 +296,7 @@ import fileType_EXCEL from '@/assets/image/excel-text.png'
|
|||||||
import fileType_WORD from '@/assets/image/word-text.png'
|
import fileType_WORD from '@/assets/image/word-text.png'
|
||||||
import fileType_PDF from '@/assets/image/pdf-text.png'
|
import fileType_PDF from '@/assets/image/pdf-text.png'
|
||||||
import fileType_Files from '@/assets/image/file-text.png'
|
import fileType_Files from '@/assets/image/file-text.png'
|
||||||
import { useDialogueStore } from '@/store'
|
import { useDialogueStore, useUserStore } from '@/store'
|
||||||
import { onMounted, reactive, computed, ref, nextTick, watch } from 'vue'
|
import { onMounted, reactive, computed, ref, nextTick, watch } from 'vue'
|
||||||
import searchItem from './searchItem.vue'
|
import searchItem from './searchItem.vue'
|
||||||
import { ServeFindTalkRecords } from '@/api/chat.js'
|
import { ServeFindTalkRecords } from '@/api/chat.js'
|
||||||
@ -315,10 +315,12 @@ const emits = defineEmits([
|
|||||||
])
|
])
|
||||||
|
|
||||||
const dialogueStore = useDialogueStore()
|
const dialogueStore = useDialogueStore()
|
||||||
|
const userStore = useUserStore()
|
||||||
// 当前对话参数
|
// 当前对话参数
|
||||||
const dialogueParams = reactive({
|
const dialogueParams = reactive({
|
||||||
talk_type: computed(() => dialogueStore.talk.talk_type),
|
talk_type: computed(() => dialogueStore.talk.talk_type),
|
||||||
receiver_id: computed(() => dialogueStore.talk.receiver_id)
|
receiver_id: computed(() => dialogueStore.talk.receiver_id),
|
||||||
|
uid: computed(() => userStore.uid)
|
||||||
})
|
})
|
||||||
|
|
||||||
let nowDay = new Date().setHours(0, 0, 0, 0)
|
let nowDay = new Date().setHours(0, 0, 0, 0)
|
||||||
@ -739,11 +741,16 @@ const downloadAndOpenFile = (item) => {
|
|||||||
//跳转到对应的记录位置
|
//跳转到对应的记录位置
|
||||||
const toDialogueByMember = async (msgInfo) => {
|
const toDialogueByMember = async (msgInfo) => {
|
||||||
console.error('====跳转到对应的记录位置====', msgInfo)
|
console.error('====跳转到对应的记录位置====', msgInfo)
|
||||||
|
let receiver_id_ = msgInfo.receiver_id
|
||||||
|
//单聊如果receiver_id为当前用户id,则使用user_id
|
||||||
|
if(msgInfo.talk_type === 1 && msgInfo.receiver_id === dialogueParams.uid){
|
||||||
|
receiver_id_ = msgInfo.user_id
|
||||||
|
}
|
||||||
// 根据搜索结果, 指定用于查询指定消息上下文的sequence
|
// 根据搜索结果, 指定用于查询指定消息上下文的sequence
|
||||||
dialogueStore.specifiedMsg = encodeURIComponent(
|
dialogueStore.specifiedMsg = encodeURIComponent(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
talk_type: msgInfo.talk_type,
|
talk_type: msgInfo.talk_type,
|
||||||
receiver_id: msgInfo.receiver_id,
|
receiver_id: receiver_id_,
|
||||||
msg_id: msgInfo.msg_id,
|
msg_id: msgInfo.msg_id,
|
||||||
cursor: msgInfo.sequence - 15 > 0 ? msgInfo.sequence - 15 : 0,
|
cursor: msgInfo.sequence - 15 > 0 ? msgInfo.sequence - 15 : 0,
|
||||||
direction: 'down',
|
direction: 'down',
|
||||||
|
@ -62,10 +62,10 @@ const router = createRouter({
|
|||||||
// 设置中间件,权限验证
|
// 设置中间件,权限验证
|
||||||
router.beforeEach((to) => {
|
router.beforeEach((to) => {
|
||||||
if (to.meta?.auth && !isLoggedIn()) {
|
if (to.meta?.auth && !isLoggedIn()) {
|
||||||
return {
|
// return {
|
||||||
path: '/auth/login',
|
// path: '/auth/login',
|
||||||
query: { redirect: to.fullPath }
|
// query: { redirect: to.fullPath }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ service.interceptors.response.use(
|
|||||||
if (response && response.data.status === 409) {
|
if (response && response.data.status === 409) {
|
||||||
// 账户另一处登录 此处踢下线
|
// 账户另一处登录 此处踢下线
|
||||||
message.error('您的账号已在其他设备登录')
|
message.error('您的账号已在其他设备登录')
|
||||||
$router.push("/login");
|
// $router.push("/login");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (response && response.data.code === 401) {
|
if (response && response.data.code === 401) {
|
||||||
@ -88,7 +88,7 @@ const getRefreshToken = async (response) => {
|
|||||||
return Promise.resolve(service(response.config));
|
return Promise.resolve(service(response.config));
|
||||||
} else {
|
} else {
|
||||||
// 跳转登录页
|
// 跳转登录页
|
||||||
$router.push("/login");
|
// $router.push("/login");
|
||||||
res.message = res.message || res.msg;
|
res.message = res.message || res.msg;
|
||||||
return Promise.reject(res);
|
return Promise.reject(res);
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ const getRefreshToken = async (response) => {
|
|||||||
refreshSubscribers = [];
|
refreshSubscribers = [];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$router.push("/login");
|
// $router.push("/login");
|
||||||
return Promise.reject(response);
|
return Promise.reject(response);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -11,7 +11,7 @@ import {
|
|||||||
nextTick
|
nextTick
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import { onBeforeRouteUpdate } from 'vue-router'
|
import { onBeforeRouteUpdate } from 'vue-router'
|
||||||
import { useDialogueStore, useTalkStore } from '@/store'
|
import { useDialogueStore, useTalkStore, useUserStore } from '@/store'
|
||||||
import {
|
import {
|
||||||
NDropdown,
|
NDropdown,
|
||||||
NIcon,
|
NIcon,
|
||||||
@ -62,6 +62,10 @@ const {
|
|||||||
|
|
||||||
const dialogueStore = useDialogueStore()
|
const dialogueStore = useDialogueStore()
|
||||||
const talkStore = useTalkStore()
|
const talkStore = useTalkStore()
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const userParams = reactive({
|
||||||
|
uid: computed(() => userStore.uid)
|
||||||
|
})
|
||||||
const isShowGroup = ref(false)
|
const isShowGroup = ref(false)
|
||||||
const searchKeyword = ref('')
|
const searchKeyword = ref('')
|
||||||
const topItems = computed((): ISession[] => talkStore.topItems)
|
const topItems = computed((): ISession[] => talkStore.topItems)
|
||||||
@ -973,11 +977,16 @@ const handleClickSearchItem = (searchText, searchResultKey, talk_type, receiver_
|
|||||||
const handleClickSearchResultItem = (searchText, searchResultKey, talk_type, receiver_id, res) => {
|
const handleClickSearchResultItem = (searchText, searchResultKey, talk_type, receiver_id, res) => {
|
||||||
const result = JSON.parse(decodeURIComponent(res))
|
const result = JSON.parse(decodeURIComponent(res))
|
||||||
console.error(result, 'result')
|
console.error(result, 'result')
|
||||||
|
let receiver_id_ = receiver_id
|
||||||
|
//单聊如果receiver_id为当前用户id,则使用user_id
|
||||||
|
if(talk_type === 1 && receiver_id === userParams.uid){
|
||||||
|
receiver_id_ = result.user_id
|
||||||
|
}
|
||||||
// 根据搜索结果, 指定用于查询指定消息上下文的sequence
|
// 根据搜索结果, 指定用于查询指定消息上下文的sequence
|
||||||
dialogueStore.specifiedMsg = encodeURIComponent(
|
dialogueStore.specifiedMsg = encodeURIComponent(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
talk_type,
|
talk_type,
|
||||||
receiver_id,
|
receiver_id: receiver_id_,
|
||||||
msg_id: result.msg_id,
|
msg_id: result.msg_id,
|
||||||
cursor: result.sequence - 15 > 0 ? result.sequence - 15 : 0,
|
cursor: result.sequence - 15 > 0 ? result.sequence - 15 : 0,
|
||||||
direction: 'down',
|
direction: 'down',
|
||||||
@ -986,7 +995,7 @@ const handleClickSearchResultItem = (searchText, searchResultKey, talk_type, rec
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
console.error(dialogueStore.specifiedMsg, 'dialogueStore.specifiedMsg')
|
console.error(dialogueStore.specifiedMsg, 'dialogueStore.specifiedMsg')
|
||||||
talkStore.toTalk(talk_type, receiver_id, router)
|
talkStore.toTalk(talk_type, receiver_id_, router)
|
||||||
state.isShowSearchRecordModal = false
|
state.isShowSearchRecordModal = false
|
||||||
state.searchRecordText = ''
|
state.searchRecordText = ''
|
||||||
searchKeyword.value = ''
|
searchKeyword.value = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user