/*
 * @Author: zc
 * @description 泸州对接热线赋值
 */
import request from '@/utils/request';
import { Cookie } from '@/utils/storage';
/**
 * @description  认证授权
 */
export const lzRXFZAuth = (data: object) => {
	return request(
		{
			baseURL: import.meta.env.VITE_RXFZ_API_URL,
			url: `/user/auth/token`,
			method: 'post',
			data,
		},
		{
			is_need_token: false,
		}
	);
};
/**
 * @description  知识推荐
 */
export const lzRXFZKnowledge = (data: object) => {
	return request(
		{
			baseURL: import.meta.env.VITE_RXFZ_API_URL,
			url: `/knowledge/knowledge_following`,
			method: 'post',
			data,
			headers: {
				Authorization: `Bearer ${Cookie.get('lzRXFZToken')}`,
			},
		},
		{
			error_message_show: false,
			is_need_token: false,
		}
	);
};
/**
 * @description  办事指南文档类型
 */
export const lzRXFZDocumentType = (params: object) => {
	return request(
		{
			baseURL: import.meta.env.VITE_RXFZ_API_URL,
			url: `/guide/contentType`,
			method: 'get',
			headers: {
				Authorization: `Bearer ${Cookie.get('lzRXFZToken')}`,
			},
			params
		},
		{
			error_message_show: false,
			is_need_token: false,
		}
	);
};
/**
 * @description  办事指南列表
 */
export const lzRXFZDocumentList = (data: object) => {
	return request(
		{
			baseURL: import.meta.env.VITE_RXFZ_API_URL,
			url: `/guide/documentList`,
			method: 'post',
			data,
			headers: {
				Authorization: `Bearer ${Cookie.get('lzRXFZToken')}`,
			},
		},
		{
			error_message_show: false,
			is_need_token: false,
		}
	);
};
/**
 * @description  办事指南详情
 */
export const lzRXFZDocumentDetail = (params: object) => {
	return request(
		{
			baseURL: import.meta.env.VITE_RXFZ_API_URL,
			url: `/guide/documentDetail`,
			method: 'get',
			params,
			headers: {
				Authorization: `Bearer ${Cookie.get('lzRXFZToken')}`,
			},
		},
		{
			error_message_show: false,
			is_need_token: false,
		}
	);
};
