2021-05-13 11:03:32 +08:00
|
|
|
/**
|
|
|
|
* 站内消息相关API
|
|
|
|
*/
|
|
|
|
|
|
|
|
import {http,Method} from '@/utils/request.js';
|
|
|
|
const request = http.request
|
|
|
|
|
2021-05-21 16:47:26 +08:00
|
|
|
import api from '@/config/api.js';
|
2021-05-13 11:03:32 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取微信消息订阅
|
|
|
|
* @param params
|
|
|
|
* @returns {AxiosPromise}
|
|
|
|
*/
|
|
|
|
export function getWeChatMpMessage() {
|
|
|
|
return http.request({
|
2022-02-28 15:18:18 +08:00
|
|
|
url: 'passport/connect/miniProgram/subscribeMessage',
|
2021-05-13 11:03:32 +08:00
|
|
|
method: Method.GET
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取消息列表
|
|
|
|
* @param params
|
|
|
|
* @returns {AxiosPromise}
|
|
|
|
*/
|
|
|
|
export function getMessages(params) {
|
|
|
|
params = params || {};
|
|
|
|
params.pageSize = params.pageSize || 5;
|
|
|
|
return http.request({
|
|
|
|
url: 'members/member-nocice-logs',
|
|
|
|
method: Method.GET,
|
|
|
|
needToken: true,
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 标记消息为已读
|
|
|
|
* @param ids
|
|
|
|
*/
|
|
|
|
export function messageMarkAsRead(ids) {
|
|
|
|
return http.request({
|
|
|
|
url: `members/member-nocice-logs/${ids}/read`,
|
|
|
|
method: Method.PUT,
|
|
|
|
needToken: true,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-10-11 18:27:42 +08:00
|
|
|
//读取站内消息
|
|
|
|
export function editMessages(message_id,params){
|
|
|
|
return http.request({
|
|
|
|
url:`/message/member/${message_id}`,
|
|
|
|
method:Method.PUT,
|
|
|
|
needToken:true,
|
|
|
|
params
|
|
|
|
})
|
|
|
|
}
|
|
|
|
//获取站内消息
|
|
|
|
export function messages(params) {
|
|
|
|
return http.request({
|
|
|
|
url: "/message/member",
|
|
|
|
method: Method.GET,
|
|
|
|
needToken: true,
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
2021-05-13 11:03:32 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取物流消息列表
|
|
|
|
* @param params
|
|
|
|
* @returns {AxiosPromise}
|
|
|
|
*/
|
|
|
|
export function getLogisticsMessages(params) {
|
|
|
|
params = params || {};
|
|
|
|
params.pageSize = params.pageSize || 5;
|
|
|
|
return http.request({
|
|
|
|
url: 'trade/logistics/message',
|
|
|
|
method: Method.GET,
|
|
|
|
needToken: true,
|
|
|
|
params,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-05-21 16:47:26 +08:00
|
|
|
* @param appType
|
2021-05-13 11:03:32 +08:00
|
|
|
* @returns {AxiosPromise}
|
2021-05-14 17:31:40 +08:00
|
|
|
*
|
2021-05-21 16:47:26 +08:00
|
|
|
*/
|
2021-06-13 17:54:48 +08:00
|
|
|
export function getAppVersion(appType) {
|
2021-05-13 11:03:32 +08:00
|
|
|
return http.request({
|
2022-03-24 16:02:31 +08:00
|
|
|
url: `/other/appVersion/${appType}`,
|
2021-05-13 11:03:32 +08:00
|
|
|
method: Method.GET,
|
2021-05-21 16:47:26 +08:00
|
|
|
type:"manager"
|
2021-05-13 11:03:32 +08:00
|
|
|
});
|
|
|
|
}
|
2021-06-13 17:54:48 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param appType
|
|
|
|
* @returns {AxiosPromise}
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
export function getAppVersionList(type,data) {
|
|
|
|
return http.request({
|
2022-03-24 16:02:31 +08:00
|
|
|
url: `/other/appVersion/appVersion/${type}`,
|
2021-06-13 17:54:48 +08:00
|
|
|
method: Method.GET,
|
|
|
|
type:"manager",
|
|
|
|
data
|
|
|
|
});
|
|
|
|
}
|