技术栈

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智能合约
相关推荐
Damai
6 小时前
DOMPurify 完整介绍
前端·面试
随风一样自由
6 小时前
【前端+跨域】跨域问题全面解析与解决方案指南
前端·跨域
小帅不太帅
6 小时前
我随手发了几张截图,白拿了一个月 AI 顶配会员
前端·github
36岁的我开始学习打篮球
6 小时前
外规内化技术架构
前端
雪隐
6 小时前
用Flutter做背单词APP-03为了给单词库塞满数据,我让AI给我打了上万份工
前端·人工智能·后端
hunterandroid
6 小时前
Android 安全最佳实践:从数据存储到网络通信的防护思路
前端
H Journey
6 小时前
web开发学习:html、css、js
前端·css·html·js
hunterandroid
6 小时前
Compose 性能优化:从卡顿到丝滑的实战经验
前端
hunterandroid
6 小时前
Kotlin Coroutines 在 Android 项目中的落地实战
前端
不一样的少年_
6 小时前
不用框架,手搓 AI Agent:(一) 先让它跑起来
前端·后端·agent
热门推荐
01GitHub 镜像站点02AI科技热点日报 | 2026年07月01日03幻兽帕鲁 - 服务器管理员权限与 GM 命令完全指南042026年7月AI圈大地震:GPT-5.6被政府限制、Claude入驻Slack、Anthropic自研芯片05GPT-5.5 对比 GPT-5.6 Sol、Terra、Luna:官方性能数据与选型分析062026 国产 AI 大模型横评:DeepSeek、通义千问、Kimi、文心一言、星火、豆包谁更能打?072026 年 AI 编程工具终极横评:Cursor vs Claude Code vs Copilot vs Windsurf082026 AI 编程工具终极实战指南:Cursor vs Claude Code vs Copilot,开发者该怎么选?09AI 编程 IDE 全景解析 2026:Agent 全面接管开发链路102026 年 AI 大模型 & AI 编程工具实战全总结