import request from '../utils/request.js'

class store extends request{

    // static errorHandel(res) {
    //     console.log(res);
    // }

    static async getStoreList(page = 1, pageSize = 10) {
        const res = await this.getRequest(`${this.BASE_URL}Store/index?page=${page}&pageSize=${pageSize}`, 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;
    }
}
export default store
