123456789101112131415161718192021222324252627 |
- 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 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;
- }
- }
- export default store
|