import $http from "./request/requestConfig"
import {
    BASE_URI
} from "../pages/utils/constant.js";

const baseUri = '/smartParkH5Server'
const controller = '/wx/periphery'

export function login(data) {
    return $http.post(
        '/wx/auth/login_by_app_main?' + qs.stringify(data), {}, {})

}
export function add(data) {

    return $http.post(
        BASE_URI + controller + '/add',
        data, {}
    )
}

export function list(data) {

    return $http.post(
        BASE_URI + controller + '/list',
        data, {}
    )
}

export function getById(data) {
    return $http.post(
        BASE_URI + controller + '/getById',
        data, {}
    )
}

export function edit(data) {
    console.log(BASE_URI + controller)
    return $http.post(
        BASE_URI + controller + '/edit',
        data, {}
    )
}

export function remove(data) {
    return $http.post({
        url: BASE_URI + baseUri + controller + '/remove',
        method: 'post',
        data: data
    })
}

