/*
 * @Description:: 请补充填写
 * @Version: 请配置版本号
 * @Author: 舟舟
 * @Date: 2022-06-25 23:00:38
 * @LastEditors: 舟舟
 * @LastEditTime: 2022-06-28 19:53:01
 * @FilePath: /ouicai_web_framework_vite/src/api/backend/index.ts
 */
import createAxios from '/@/utils/axios'
import { getAdminToken } from '/@/utils/common'

const controllerUrl = '/Login/'

export function index() {
    return createAxios({
        url: controllerUrl + 'Index',
        method: 'get',
    })
}

export function login(method: 'get' | 'post', params: object = {}): ApiPromise {
    return createAxios({
        url: controllerUrl + 'Submit',
        data: params,
        method: method,
    }) as ApiPromise
}

export function logout() {
    return createAxios({
        url: controllerUrl + 'LoginOut',
        method: 'get'
    })
}

export function qrcodeLogin(params:anyObj) {
    return createAxios({
        url: controllerUrl + 'Scan',
        method: 'get',
        params: params,
    })
}
