import request from "/utils/request.js";
export function useLoginApi() { 
	return {
		//获取code img
		getCode: () => {
			return request.request({
				url: '/Login/Captcha',
				method: 'get',
			});
		},
		//登录
		signIn: (data) => {
			return request.request({
				url: '/Login/Login',
				method: 'post',
				data,
			});
		},
		signOut: (data) => {
			return request.request({
				url: '/user/signOut',
				method: 'post',
				data,
			});
		},
		GetUnitTypeAll: () => {
			return request.request({
				url: '/ClientSite/GetUnitTypeAll',
				method: 'get',
			})
		},
		GetHeatSites: () => {
			return request.request({
				url: '/ClientSite/GetHeatSites',
				method: 'get',
			})
		},
		// 理解預約
		CreateReservation:(data)=>{
			return request.request({
				url: '/ClientReservation/CreateReservation',
				method: 'post',
				data
			})
		},
		// 获取小程序内容
		GetPageContent:(data)=>{
			return request.request({
				url: '/ClientPageContent/GetPageContent',
				method: 'get',
				data
			})
		},
		// 获取限时抢购入口
		GetFlashSaleEntrance:(data) => {
			return request.request({
				url: '/ClientSite/GetFlashSaleEntrance',
				method: 'get',
				data,
			});
		}
	};
}