promise执行顺序有问题?

小程序 文章 2022-04-28 11:20 0 全屏看文

promise执行顺序有问题?Is there a problem with the order in which promises are executed?

promise执行顺序有问题?

我在写一个图片上传云服务器功能,想在图片上传的同时把路径数据一同传给云数据库中,但是程序一直异步执行,获取不到路径数据

I am writing an image upload cloud server function to upload the image and transfer the path data to the cloud database at the same time, but the program always executes asynchronously and cannot obtain the path data

回答:

豹富:

这代码也给不出修改意见了,同步异步都没搞清楚。一顿问题代码。基本就是重写

Mr.Zhao:

学学async await

-EOF-