12345678910111213141516171819202122232425262728293031323334353637 |
- 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 getStaffsListByStoreId(id,page = 1, pageSize = 10000) {
- const res = await this.getRequest(`${this.BASE_URL}Staff/index?page=${page}&pageSize=${pageSize}&storeId=${id}&status=1`, 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
|