HomeLease/api/article/article.js
2025-08-19 09:44:40 +08:00

67 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import request from '@/utils/request'
/**
* 获取条款和隐私政策
* @param {Object} params - 查询参数
* @param {string} params.type - 类型 5:服务条款 6:隐私条款
* @param {string} params.status - 状态
* @returns {Promise} 返回条款数据
*/
export function getArticleByType(params = {}) {
return request({
url: '/app/article/listByType',
method: 'GET',
params: {
status: 1,
...params,
},
})
}
/**
* 获取服务条款
* @returns {Promise} 返回服务条款数据
*/
export function getServiceTerms() {
return request({
url: '/app/article/listByType',
method: 'GET',
params: {
status: 1,
type: '5',
},
})
}
/**
* 获取隐私政策
* @returns {Promise} 返回隐私政策数据
*/
export function getPrivacyPolicy() {
return request({
url: '/app/article/listByType',
method: 'GET',
params: {
status: 1,
type: '6',
},
})
}
/**
* 获取最新公告
* @param {Object} params - 查询参数
* @param {string} params.type - 类型4表示公告
* @returns {Promise} 返回最新公告数据
*/
export function getNewAnnouncement(params = {}) {
return request({
url: '/app/article/getNew',
method: 'GET',
params: {
type: '4',
...params,
},
})
}