71 lines
1.6 KiB
JavaScript
71 lines
1.6 KiB
JavaScript
|
|
import http from '../utils/http'
|
|
import config from '../config/config';
|
|
|
|
/**
|
|
* 获取聊天配置
|
|
* @author Seven
|
|
* @data 2025-1-27
|
|
* @returns { }
|
|
* @see https://mall.gpxscs.cn/api/mobile/sns/im/getImConfig?typ=json&uid=10001
|
|
*/
|
|
|
|
export function GetImConfig (params){
|
|
return new Promise((resolve, reject) => {
|
|
http({
|
|
url:'/sns/im/getImConfig',
|
|
method:'get',
|
|
params,
|
|
baseURL:config.baseApi
|
|
}).then(res=>{
|
|
resolve(res)
|
|
}).catch(e => reject(console.warn(e)))
|
|
})
|
|
}
|
|
|
|
|
|
/**
|
|
* 获取聊天记录
|
|
* @author Seven
|
|
* @data 2025-1-27
|
|
* @param {typ: json,user_other_id: 10028,type: friend,page: 1} params
|
|
* @returns { }
|
|
* @see https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg?typ=json&user_other_id=10028&type=friend&page=1
|
|
*/
|
|
|
|
export function GetImMsgList (params){
|
|
return new Promise((resolve, reject) => {
|
|
http({
|
|
url:'https://mall.gpxscs.cn/api/mobile/sns/userMessage/listChatMsg',
|
|
method:'get',
|
|
params,
|
|
baseURL:config.apiMobile
|
|
}).then(res=>{
|
|
resolve(res)
|
|
}).catch(e => reject(console.warn(e)))
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 获取聊天记录
|
|
* @author Seven
|
|
* @data 2025-1-27
|
|
* @param {typ: json,user_other_id: 10028,type: friend,page: 1} params
|
|
* @returns { }
|
|
* @see https://mall.gpxscs.cn/api/mobile/sns/userMessage/add
|
|
*/
|
|
|
|
export function GetSendMsgAdd (params){
|
|
return new Promise((resolve, reject) => {
|
|
http({
|
|
url:'https://mall.gpxscs.cn/api/mobile/sns/userMessage/add',
|
|
method:'get',
|
|
params,
|
|
baseURL:config.apiMobile
|
|
}).then(res=>{
|
|
resolve(res)
|
|
}).catch(e => reject(console.warn(e)))
|
|
})
|
|
}
|
|
|