提交 8150ac5f 编写于 作者: 雪洛's avatar 雪洛

docs: update uni-cloud-router

上级 b2ce0170
......@@ -278,9 +278,7 @@ module.exports = class PostService extends Service {
```js
// middleware/auth.js
const uniID = require("uni-id");
module.exports = (options) => {
// 初始化 uniID 配置
uniID.init(options);
module.exports = () => {
// 返回中间件函数
return async function auth(ctx, next) {
// 校验 token
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册