This commit is contained in:
zmj 2024-06-24 16:57:04 +08:00
parent ea9e6ae292
commit b8aaa100b4
2 changed files with 18 additions and 5 deletions

View File

@ -52,7 +52,7 @@
"path": "pages/my/my",
"style": {
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
}, {

View File

@ -121,13 +121,17 @@
orderCountApi
} from "@/api/order.js";
import {
onShow
onShow,
onPullDownRefresh
} from "@dcloudio/uni-app"
import {
userInfoApi
} from "@/api/user.js"
const userStore = useUserStore();
const userInfo = ref({});
const orderCount = ref({
no_pay: 0,
receiving: 0,
@ -175,9 +179,18 @@
}
onShow(() => {
userInfo.value = userStore.userInfo;
userInfoApi().then(res => {
userInfo.value = res.data;
})
getOrderCount();
})
onPullDownRefresh(() => {
userInfoApi().then(res => {
userInfo.value = res.data;
uni.stopPullDownRefresh()
})
})
</script>
<style lang="scss">