• 获取请求地址中的参数对象

    Parameters

    • url: string

      请求地址

    Returns any

    参数对象

    const url = "http://localhost?id=1&name=mike";
    const query = getQueryParams(url);
    query: {
    id: "1",
    name: "mike"
    }