|
@ -209,7 +209,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import pullRefreshMixin from '@/mixins/pullRefreshMixin.js' |
|
|
|
|
|
|
|
|
import pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
mixins: [pullRefreshMixin], |
|
|
mixins: [pullRefreshMixin], |
|
@ -321,18 +321,14 @@ export default { |
|
|
uni.navigateTo({ url: '/pages/manager/tui' }) |
|
|
uni.navigateTo({ url: '/pages/manager/tui' }) |
|
|
}, |
|
|
}, |
|
|
fetchUserInfo() { |
|
|
fetchUserInfo() { |
|
|
console.log('开始获取用户信息') |
|
|
|
|
|
if(uni.getStorageSync('token')){ |
|
|
if(uni.getStorageSync('token')){ |
|
|
this.login_status = getApp().globalData.login_status; |
|
|
this.login_status = getApp().globalData.login_status; |
|
|
this.$api("getUserByToken",{},(res)=>{ |
|
|
this.$api("getUserByToken",{},(res)=>{ |
|
|
console.log('获取用户信息响应:', res) |
|
|
|
|
|
if(res.code == 200){ |
|
|
if(res.code == 200){ |
|
|
this.userInfo = res.result |
|
|
this.userInfo = res.result |
|
|
console.log('更新用户信息成功') |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
console.log('未登录状态') |
|
|
|
|
|
this.login_status = false; |
|
|
this.login_status = false; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -357,10 +353,8 @@ export default { |
|
|
this.fetchUserInfo() |
|
|
this.fetchUserInfo() |
|
|
}, |
|
|
}, |
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
console.log('触发下拉刷新') |
|
|
|
|
|
this.fetchUserInfo() |
|
|
this.fetchUserInfo() |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
console.log('停止下拉刷新') |
|
|
|
|
|
uni.stopPullDownRefresh() |
|
|
uni.stopPullDownRefresh() |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: '刷新成功', |
|
|
title: '刷新成功', |
|
|