Commit dde14e60 authored by 杨勇飞's avatar 杨勇飞

解决异步的问题

parent a23aa2ca
......@@ -702,8 +702,8 @@
return (monthly / total * 100).toFixed(2) + '%'
}
},
mounted() {
this.initData()
async mounted() {
await this.initData()
this.initLeaderChart()
this.initProjectChart()
// 在 Vue 的下一个 DOM 更新循环中执行
......@@ -722,7 +722,7 @@
})
},
methods: {
initData() {
async initData() {
this.staffCode = uni.getStorageSync(`staffCode`);
const data = {
"aux": {
......@@ -730,7 +730,7 @@
"staffCode": this.staffCode
}
}
searchBossCard(data).then(res => {
await searchBossCard(data).then(res => {
this.searchDatas = res.data.data
console.log()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment