|
|
@@ -97,6 +97,7 @@ export default {
|
|
|
},
|
|
|
//加载数据
|
|
|
loadData: function () {
|
|
|
+ this.showLoading()
|
|
|
console.log('loadData')
|
|
|
Http.get(Apis.PAGE.HOME_PAGE).then((res) => {
|
|
|
console.log(res)
|
|
|
@@ -104,12 +105,22 @@ export default {
|
|
|
this.institutionRank = res.agencyRank
|
|
|
this.personRank = res.userRank
|
|
|
this.imgList = res.imgList
|
|
|
+ this.hideLoading()
|
|
|
+ }).catch((error) => {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '主页加载失败:' + error.data)
|
|
|
})
|
|
|
},
|
|
|
setUserInfo () {
|
|
|
this.user = storageGet('user')
|
|
|
this.rolesPermissions = storageGet('rolesPermissions')
|
|
|
},
|
|
|
+ showLoading () {
|
|
|
+ this.loading = true
|
|
|
+ },
|
|
|
+ hideLoading () {
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
},
|
|
|
created: function () {
|
|
|
//notify('info', 'info')
|