|
@@ -165,7 +165,7 @@
|
|
|
import fixedBottom from '@/components/fixedBottom'
|
|
import fixedBottom from '@/components/fixedBottom'
|
|
|
import imgText from '@/components/imgText'
|
|
import imgText from '@/components/imgText'
|
|
|
import { getActivityDetail } from '@/api/activityApi'
|
|
import { getActivityDetail } from '@/api/activityApi'
|
|
|
-import { editJoinActivity } from '@/api/userApi'
|
|
|
|
|
|
|
+import { editJoinActivity, cancelJoinActivity } from '@/api/userApi'
|
|
|
export default {
|
|
export default {
|
|
|
components: { fixedBottom, imgText },
|
|
components: { fixedBottom, imgText },
|
|
|
data () {
|
|
data () {
|
|
@@ -327,10 +327,14 @@ export default {
|
|
|
// 报名活动/取消报名
|
|
// 报名活动/取消报名
|
|
|
async joinActivity (type) {
|
|
async joinActivity (type) {
|
|
|
const params = {
|
|
const params = {
|
|
|
- id: this.detail.id,
|
|
|
|
|
type: type
|
|
type: type
|
|
|
}
|
|
}
|
|
|
- const { code, msg } = await editJoinActivity(params)
|
|
|
|
|
|
|
+ if (type === 1) {
|
|
|
|
|
+ params.id = this.detail.id
|
|
|
|
|
+ } else {
|
|
|
|
|
+ params.record_id = this.detail.user_activity_id
|
|
|
|
|
+ }
|
|
|
|
|
+ const { code, msg } = type === 1 ? await editJoinActivity(params) : await cancelJoinActivity(params)
|
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
|
if (type === 1) {
|
|
if (type === 1) {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -384,6 +388,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 提交结果
|
|
// 提交结果
|
|
|
toSubmiteOrder () {
|
|
toSubmiteOrder () {
|
|
|
|
|
+ if (!this.$store.state.userInfo.alipay_account) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/pagesSub/my/userDetail?toastType=1'
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: `/pagesSub/order/submitOrder?activityId=${this.detail.id}&userActivityId=${this.detail.user_activity_id}`
|
|
url: `/pagesSub/order/submitOrder?activityId=${this.detail.id}&userActivityId=${this.detail.user_activity_id}`
|
|
|
})
|
|
})
|