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

解决异步的问题

parent a23aa2ca
...@@ -702,8 +702,8 @@ ...@@ -702,8 +702,8 @@
return (monthly / total * 100).toFixed(2) + '%' return (monthly / total * 100).toFixed(2) + '%'
} }
}, },
mounted() { async mounted() {
this.initData() await this.initData()
this.initLeaderChart() this.initLeaderChart()
this.initProjectChart() this.initProjectChart()
// 在 Vue 的下一个 DOM 更新循环中执行 // 在 Vue 的下一个 DOM 更新循环中执行
...@@ -722,7 +722,7 @@ ...@@ -722,7 +722,7 @@
}) })
}, },
methods: { methods: {
initData() { async initData() {
this.staffCode = uni.getStorageSync(`staffCode`); this.staffCode = uni.getStorageSync(`staffCode`);
const data = { const data = {
"aux": { "aux": {
...@@ -730,7 +730,7 @@ ...@@ -730,7 +730,7 @@
"staffCode": this.staffCode "staffCode": this.staffCode
} }
} }
searchBossCard(data).then(res => { await searchBossCard(data).then(res => {
this.searchDatas = res.data.data this.searchDatas = res.data.data
console.log() 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