优化个人中心刷新数据

This commit is contained in:
gyq 2025-01-16 15:18:10 +08:00
parent 51f8f54a26
commit be4bf820b4
1 changed files with 7 additions and 9 deletions

View File

@ -111,21 +111,19 @@
<script setup>
import { ref, reactive } from 'vue';
import { onLoad,onShow, onPullDownRefresh } from '@dcloudio/uni-app';
import { onLoad, onShow, onPullDownRefresh } from '@dcloudio/uni-app';
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
import { linkTo } from '@/utils/app.js';
import {
useCommonStore
} from '@/store/common.js'
const $common = useCommonStore()
import { useCommonStore } from '@/store/common.js';
const $common = useCommonStore();
const userInfo = ref({});
//
const recordThree = ref([]);
onShow(()=>{
onShow(() => {
// ios
$common.init()
})
$common.init();
});
async function selectByUserIdAjax() {
try {
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
@ -179,7 +177,7 @@ onPullDownRefresh(async () => {
}, 500);
});
onLoad(() => {
onShow(() => {
selectByUserIdAjax();
collectVideoSummaryAjax();
selectUserMoneyAjax();