javascript - ts中interfacce作用?
问题描述:
我想问一下这里的GetUserRoleRes接口在axios.get中有什么作用
import axios from "axios"; // 用户角色身份 export type UserRoleType = "user" | "admin"; // 返回 export interface GetUserRoleRes { userType: UserRoleType; } // 获取用户角色身份 export const getUserRole = async () => { return axios.get<GetUserRoleRes>("https://mysite.com/api/role"); };
第 1 个答案:
指定response
的data
的类型
amh面板如何正确设置wordpres的伪静态?:您好,我是从宝塔迁移到amh的用户,我的amh安装好后,发现wordpress伪静态设置一直无法生效,请问amh面板如何正确设置wordpres的伪静态???已经设置的伪静态location ...