试试这个看看,F12控制台运行
- let 名称 = 'Administrator';//填写你需要修改的名称
- fetch(document.location.origin+"/UserService/ManagementPage/EditUser", {
- "headers": {
- "accept": "*/*",
- "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
- "cache-control": "no-cache",
- "content-type": "application/json",
- "pragma": "no-cache",
- "x-requested-with": "XMLHttpRequest"
- },
- "referrer": document.location.origin+"/UserService/ManagementPage/UsersList",
- "referrerPolicy": "strict-origin-when-cross-origin",
- "body": "{"userName":"Administrator","fullName":""+名称+"","email":"example@example.com","isEnabled":true}",
- "method": "POST",
- "mode": "cors",
- "credentials": "include"
- });
复制代码 |