绿满眶商城微信小程序-uniapp
peng
11 小时以前 a6c950ba797dffec842cf7e923fc439868645766
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { http,Method } from "@/utils/request.js";
 
import api from "@/config/api.js";
 
/**
 * 获取聊天详情接口
 * @param {*} talkId 
 * @returns 
 */
export function getTalk(talkId) {
    return http.request({
      url: `${api.im}/talk/${talkId}`,
      method: Method.GET,
    });
}
 
/**
 * 获取与用户的聊天详情
 * @param {*} talkId 
 * @returns 
 */
 export function getTalkByUser(userId) {
  return http.request({
    url: `${api.im}/talk/by/user/${userId}`,
    method: Method.GET,
  });
}
 
/**
 * 获取聊天列表
 * @param {*} talkId 
 * @returns 
 */
 export function getTalkList(params) {
    return http.request({
      url: `${api.im}/talk/list`,
      method: Method.GET,
      params
    });
}
 
/**
 * 获取聊天信息接口
 * @param {*} params 
 * @returns 
 */
 export function getTalkMessage(params) {
    return http.request({
      url: `${api.im}/message`,
      method: Method.GET,
      params
    });
}
 
/**
 * 获取聊天信息接口
 * @param {*} params 
 * @returns 
 */
 export function cleanUnreadMessage(params) {
  return http.request({
    url: `${api.im}/message/clean/unred`,
    method: Method.PUT,
    params
  });
}
// 从商品页点击 客服 跳转 获取商品详情
export function jumpObtain(skuId, goodsId) {
  return http.request({
    url: `/goods/goods/sku/${goodsId}/${skuId}`,
    method: Method.GET,
  });
}
// 清除未读
// /im/message/clean/unred
export function clearmeaager() {
  return http.request({
    url: `${api.im}/message/clean/unred`,
    method: Method.PUT,
  });
}