mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 07:55:53 +08:00
合并
This commit is contained in:
82
api/im.js
Normal file
82
api/im.js
Normal 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,
|
||||
});
|
||||
}
|
||||
|
||||
12
api/store.js
12
api/store.js
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
38
api/trade.js
38
api/trade.js
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user