Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
swx_weapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2025-08-18 23:23:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85932cfdca760d2ca4b20c1eeedec7520970d9c5
85932cfd
1 parent
90f7c585
feat: 添加加载状态提示以提升用户体验
在活动创建和我的创建活动页面中添加加载状态提示 当数据加载时显示loading,加载完成后隐藏
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
src/pages/createActivity/index.vue
src/pages/myCreateActivity/index.vue
src/pages/createActivity/index.vue
View file @
85932cf
<!--
* @Date: 2022-09-21 16:04:10
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-08-18 23:1
1:40
* @LastEditTime: 2025-08-18 23:1
6:58
* @FilePath: /swx/src/pages/createActivity/index.vue
* @Description: 创建活动页面
-->
...
...
@@ -428,6 +428,7 @@ onMounted(async () => {
});
const { code, data } = await activityInfoAPI({ i: getCurrentPageParam().id });
if (code) {
Taro.showLoading({ mask: true, title: "加载中..." })
// 更新活动信息
updateActivityInfo(data);
}
...
...
@@ -974,6 +975,8 @@ const updateActivityInfo = async ({ activity, host }) => {
// 义工岗位
job_post.value = activity.extend.length ? activity.extend.join(',') : '';
extend.value = activity.extend;
// 隐藏loading
Taro.hideLoading();
}
}
...
...
src/pages/myCreateActivity/index.vue
View file @
85932cf
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
2-12-08 09:44:01
* @LastEditTime: 202
5-08-18 23:20:34
* @FilePath: /swx/src/pages/myCreateActivity/index.vue
* @Description: 创建的活动页面
-->
...
...
@@ -198,6 +198,7 @@ export default {
name: "myCreateActivityPage",
mixins: [mixin.init],
async onShow () {
Taro.showLoading({ mask: true, title: "加载中..." })
// 先看一下有没有缓存过主办方ID
const id = hostStore().id;
let host_id = '';
...
...
@@ -240,6 +241,7 @@ export default {
this.volunteer_count = data.volunteer_count ? data.volunteer_count : 0;
this.player_count = data.player_count ? data.player_count : 0;
this.page = this.page + 1;
Taro.hideLoading()
}
},
onHide () { // 离开当前页面
...
...
Please
register
or
login
to post a comment