Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新《服务端交互与数据Mock》和《权限》章节 #5469

Closed
1 of 4 tasks
jsxzhub opened this issue Jan 31, 2025 · 1 comment
Closed
1 of 4 tasks

更新《服务端交互与数据Mock》和《权限》章节 #5469

jsxzhub opened this issue Jan 31, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@jsxzhub
Copy link
Contributor

jsxzhub commented Jan 31, 2025

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

// response数据解构
client.addResponseInterceptor({
fulfilled: (response) => {
const { data: responseData, status } = response;

  const { code, data } = responseData;

  if (status >= 200 && status < 400 && code === 0) {
    return data;
  }
  throw Object.assign({}, response, { response });
},

}); 新代码中已换掉

Your Suggestion for Changes

换成最新的代码 // 处理返回的响应数据格式
client.addResponseInterceptor(
defaultResponseInterceptor({
codeField: 'code',
dataField: 'data',
successCode: 0,
}),
);

Steps to reproduce

No response

@jsxzhub jsxzhub added the documentation Improvements or additions to documentation label Jan 31, 2025
@jsxzhub jsxzhub changed the title 更新《服务端交互与数据Mock》章节 更新《服务端交互与数据Mock》和《权限》章节 Jan 31, 2025
@jsxzhub
Copy link
Contributor Author

jsxzhub commented Jan 31, 2025

角色
指令方式
指令支持绑定单个或多个权限码。单个时可以直接传入字符串或数组中包含一个权限码,多个权限码则传入数组。

其中的“权限码”,应改为“角色”

@mynetfan mynetfan closed this as completed Feb 3, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants