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-10-28 13:44:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
32b73806088f5b63210dff204da2c3b770ea1994
32b73806
1 parent
d1d72b64
fix 义工报名修改逻辑修改
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
12 deletions
src/pages/joinVolunteer/index.vue
src/pages/joinVolunteer/index.vue
View file @
32b7380
<!--
* @Date: 2022-09-27 17:13:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-10-2
7 18:41:46
* @LastEditTime: 2022-10-2
8 13:42:48
* @FilePath: /swx/src/pages/joinVolunteer/index.vue
* @Description: 义工报名
-->
...
...
@@ -141,16 +141,31 @@ const onSubmit = async () => {
gender: user_sex.value,
post: post_status.value
}
const { code } = await addRegAPI(params);
if (code) {
Taro.showToast({
title: '报名成功',
icon: 'success',
duration: 3000,
success: function () {
Taro.navigateBack()
}
});
if (getCurrentPageParam().type === 'edit') {
params.i = getCurrentPageParam().reg_id;
const { code } = await editRegAPI(params);
if (code) {
Taro.showToast({
title: '修改成功',
icon: 'success',
duration: 3000,
success: function () {
Taro.navigateBack()
}
});
}
} else {
const { code } = await addRegAPI(params);
if (code) {
Taro.showToast({
title: '报名成功',
icon: 'success',
duration: 3000,
success: function () {
Taro.navigateBack()
}
});
}
}
}
}
...
...
@@ -161,7 +176,7 @@ const onSubmit = async () => {
import "./index.less";
import { activityInfoAPI } from '@/api/Host/index';
import { getCurrentPageParam } from "@/utils/weapp";
import { addRegAPI } from '@/api/Reg/index';
import { addRegAPI
, editRegAPI
} from '@/api/Reg/index';
import Toast from '@/components/vant-weapp/toast/toast';
export default {
...
...
Please
register
or
login
to post a comment