优化用户中心下拉刷新更新数据
This commit is contained in:
33
pages.json
33
pages.json
@@ -50,7 +50,8 @@
|
|||||||
"path": "pages/me/index",
|
"path": "pages/me/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/me/contact",
|
"path": "pages/me/contact",
|
||||||
@@ -171,33 +172,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/task/prizeList",
|
"path": "pages/task/prizeList",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": "任务"
|
||||||
"navigationBarTitleText" : "任务"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/task/receiveMember",
|
"path": "pages/task/receiveMember",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": "",
|
||||||
"navigationBarTitleText" : "",
|
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/me/prizeDraw",
|
"path": "pages/me/prizeDraw",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": "抽奖"
|
||||||
"navigationBarTitleText" : "抽奖"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/pays/pays",
|
"path": "pages/pays/pays",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
"navigationBarTitleText": ""
|
||||||
"navigationBarTitleText" : ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
||||||
import { linkTo } from '@/utils/app.js';
|
import { linkTo } from '@/utils/app.js';
|
||||||
|
|
||||||
@@ -162,8 +162,17 @@ function toTask() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(() => {});
|
onPullDownRefresh(async () => {
|
||||||
onShow(() => {
|
await selectByUserIdAjax();
|
||||||
|
await collectVideoSummaryAjax();
|
||||||
|
await selectUserMoneyAjax();
|
||||||
|
userInfo.value = uni.getStorageSync('userInfo');
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
selectByUserIdAjax();
|
selectByUserIdAjax();
|
||||||
collectVideoSummaryAjax();
|
collectVideoSummaryAjax();
|
||||||
selectUserMoneyAjax();
|
selectUserMoneyAjax();
|
||||||
|
|||||||
Reference in New Issue
Block a user