add
This commit is contained in:
parent
ea9e6ae292
commit
b8aaa100b4
|
@ -52,7 +52,7 @@
|
|||
"path": "pages/my/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": false,
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue