技术栈

es6 Promise.all 用法

老胡说前端2024-07-06 10:33

init() {

this.pageLoading = true;

Promise.all([this.getTime(), this.getAddress()])

.then(([time, host]) => {

this.loading= false;

this.form.time= time;

this.form.host = host;

})

.catch(() => {

this.loding= false;

});

},

getTime() {

return this.$post("/query");

},

// 查询上次时间同步的地址

getAddress() {

return this.$post("/del");

},

mounted() {

this.init()

},

上一篇:MySQL主从复制与读写分离
下一篇:手把手教你实现BigBank智能合约
相关推荐
1024肥宅
6 分钟前
防抖(Debounce)
前端·javascript·ecmascript 6
1024肥宅
7 分钟前
节流(Throttle)
前端·javascript·ecmascript 6
大怪v
10 分钟前
【Virtual World 02】两点一线!!!
javascript·css·html
by__csdn
11 分钟前
Vue2纯前端图形验证码实现详解+源码
前端·javascript·typescript·vue·状态模式·css3·canva可画
Gomiko
26 分钟前
JavaScript基础(八):函数
开发语言·javascript·ecmascript
w***3751
30 分钟前
Spring 核心技术解析【纯干货版】- Ⅶ:Spring 切面编程模块 Spring-Instrument 模块精讲
前端·数据库·spring
我是阿亮啊
33 分钟前
搭建Vue环境遇到的问题
javascript·vue.js·npm·node.js
GISer_Jing
33 分钟前
jx前端架构学习
前端·学习·架构
间彧
1 小时前
Tailwind CSS详解
前端
间彧
1 小时前
Headless UI详解
前端
热门推荐
01GitHub 镜像站点02UV安装并设置国内源03BongoCat - 跨平台键盘猫动画工具04安娜的档案(Anna’s Archive) 镜像网站/国内最新可访问入口(持续更新)05Linux下V2Ray安装配置指南06本地部署阿里最新开源的Z-Image07Meta第三代“分割一切”模型——SAM 3本地部署教程:首支持文本提示分割,400万概念、30毫秒响应,检测分割追踪一网打尽0846个Nano-banana 精选提示词,持续更新中09【保姆级教程】免费使用Gemini3的5种方法!免翻墙/国内直连10Gemini 3.0 Pro Preview 实测报告