• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
余苏益
博客园    首页    新随笔    联系   管理    订阅  订阅
2021年12月3日
12.2
摘要: // 添加 router.post("/tag",async ctx =>{ try { const data = await tagModel.create(ctx.request.body); return success(ctx,data); } catch (error) { return 阅读全文
posted @ 2021-12-03 16:50 余苏益 阅读(52) 评论(0) 推荐(0)
12.1
摘要: //添加 删除 const {tagModel} = require("../mongodb"); const toast = require("../toast"); const { success, fail } = require("../toast"); /* get ctx.query p 阅读全文
posted @ 2021-12-03 16:43 余苏益 阅读(50) 评论(0) 推荐(0)
11.30
摘要: 异步 1. async也是处理异步的,它是对Promise的一种扩展,让异步更加方便; 2.优势:async是基于Promise的,虽然是异步操作,但看上去像同步; 3.首先,我们先来看下async的基本语法: 例 //创建一个async函数,执行异步操作 //await 关键字:等待异步执行完毕后 阅读全文
posted @ 2021-12-03 16:33 余苏益 阅读(42) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3