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
2022-11-01 11:08:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5de6dca7b898b9aa5a6710b056cb78d06e707c26
5de6dca7
1 parent
8760170a
🐞 fix: 主办方新增后回到主办方管理列表更新优化
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
38 deletions
src/pages/projectManage/index.vue
src/pages/projectManage/index.vue
View file @
5de6dca
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-1
0-31 13:13:21
* @LastEditTime: 2022-1
1-01 11:06:35
* @FilePath: /swx/src/pages/projectManage/index.vue
* @Description: 主办方管理页面
-->
...
...
@@ -63,17 +63,6 @@ import bottomButton from "@/components/bottom-button";
import { deleteHostAPI, hostListAPI } from '@/api/Host/index';
import Dialog from '@/components/vant-weapp/dialog/dialog';
const create_list = ref([]);
const join_list = ref([]);
onMounted(async () => {
const { code, data } = await hostListAPI({ is_join: 1 });
if (code) {
create_list.value = data.my_hosts;
join_list.value = data.join_hosts;
}
})
const onSubmit = () => {
Taro.navigateTo({
url: '../createProject/index'
...
...
@@ -85,31 +74,6 @@ const onManage = (item) => {
url: '../userManage/index?host_id=' + item.id + '&name=' + decodeURIComponent(item.name)
})
}
const onDelete = (item) => {
Dialog.confirm({
title: '温馨提示',
message: '是否确认删除主办方?',
confirmButtonColor: '#199a74'
})
.then(async () => {
// on confirm
const { code, data } = await deleteHostAPI({ i: item.id });
if (code) {
Taro.showToast({
title: '删除成功',
icon: 'success',
duration: 2000
});
const { code, data } = await hostListAPI();
if (code) {
create_list.value = data.my_hosts;
}
}
})
.catch(() => {
// on cancel
});
}
</script>
<script>
...
...
@@ -121,9 +85,43 @@ export default {
mixins: [mixin.init],
data () {
return {
create_list: [],
join_list: [],
}
},
onShow() {
async onShow() {
const { code, data } = await hostListAPI({ is_join: 1 });
if (code) {
this.create_list = data.my_hosts;
this.join_list = data.join_hosts;
}
},
methods: {
onDelete (item) {
Dialog.confirm({
title: '温馨提示',
message: '是否确认删除主办方?',
confirmButtonColor: '#199a74'
})
.then(async () => {
// on confirm
const { code, data } = await deleteHostAPI({ i: item.id });
if (code) {
Taro.showToast({
title: '删除成功',
icon: 'success',
duration: 2000
});
const { code, data } = await hostListAPI();
if (code) {
this.create_list = data.my_hosts;
}
}
})
.catch(() => {
// on cancel
});
}
}
};
</script>
...
...
Please
register
or
login
to post a comment