This commit is contained in:
yeliang-king
2023-01-13 07:36:43 +08:00
21 changed files with 7844 additions and 515 deletions

82
api/im.js Normal file
View File

@@ -0,0 +1,82 @@
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: `${api.im}/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,
});
}

View File

@@ -55,5 +55,17 @@ export function getStoreList(params) {
}
/**
* 获取自提点信息
* @param id
*/
export function getStoreAddress(storeId,params) {
return http.request({
url: `/store/address/page/${storeId}`,
method: Method.GET,
params
});
}

View File

@@ -155,6 +155,18 @@ export function setAddressId(addressId,way) {
});
}
/**
* 设置收货地址ID
* @param addressId
*/
export function setStoreAddressId(storeAddressId,way) {
return http.request({
url: `/trade/carts/storeAddress?storeAddressId=${storeAddressId}&way=${way}`,
method: Method.GET,
needToken: true,
});
}
/**
@@ -281,3 +293,29 @@ export function reBuy(sn) {
needToken: true,
});
}
/**
* 获取全部配送方式
*/
export function shippingMethodList(params) {
return http.request({
url: `/trade/carts/shippingMethodList`,
method: Method.GET,
needToken: true,
params: params,
});
}
/**
* 提交配送方式
* @param params
*/
export function setShipMethod(params) {
return http.request({
url: "/trade/carts/shippingMethod",
method: Method.PUT,
needToken: true,
params,
});
}