摘要:        
// 添加 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)
        
            
        
        
摘要:        
//添加 删除 const {tagModel} = require("../mongodb"); const toast = require("../toast"); const { success, fail } = require("../toast"); /* get ctx.query p    阅读全文
        
            posted @ 2021-12-03 16:43
余苏益
阅读(48)
评论(0)
推荐(0)
        
            
        
        
摘要:        
异步 1. async也是处理异步的,它是对Promise的一种扩展,让异步更加方便; 2.优势:async是基于Promise的,虽然是异步操作,但看上去像同步; 3.首先,我们先来看下async的基本语法: 例 //创建一个async函数,执行异步操作 //await 关键字:等待异步执行完毕后    阅读全文
        
            posted @ 2021-12-03 16:33
余苏益
阅读(42)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号