import request from '../utils/request.js' class store extends request { // static errorHandel(res) { // console.log(res); // } static async getStoreList(page = 1, pageSize = 10,otherParam = '') { const res = await this.getRequest(`${this.BASE_URL}Store/index?page=${page}&pageSize=${pageSize}`+otherParam, this._defaultHeader) return res.data; } static async getStoreById(id) { const res = await this.getRequest(`${this.BASE_URL}Store/read?id=${id}`, this._defaultHeader) return res.data; } static async getNearStore(lat, lon) { const res = await this.postRequest(`${this.BASE_URL}Store/getStore`, { lat, lon }) return res.data; } static async getStoreAppointTime(id) { const res = await this.postRequest(`${this.BASE_URL}Store/appointmentTime?storeId=${id}`) return res.data; } } export default store