Browse Source

活动报名,首页跳转

dev
mk 1 year ago
parent
commit
b9dde9d85d
  1. 18
      src/views/activity/detail.vue
  2. 7
      src/views/home/index.vue

18
src/views/activity/detail.vue

@ -65,13 +65,25 @@ export default {
},
methods: {
handelAddResi() {
this.signUp.push({ name: "", mobile: "", remark: "" })
this.signUp.push({ name: "", mobile: "", remark: "",})
},
handelDelResi() {
this.signUp.pop()
},
save(){
signUp
async save(){
this.signUp.forEach((item)=>{
item.activityId = this.info.id;
item.applicationId = this.$store.state.app.userInfo.id;
item.customerId = this.$store.state.app.userInfo.customerId;
})
let parm = {
formDTOList:this.signUp
}
let res = await addActivityRecord(parm)
if(res){
this.$toast.success(res)
this.signUp= [{ name: "", mobile: "", remark: "" }]
}
},
},
components: {},

7
src/views/home/index.vue

@ -68,7 +68,7 @@
<span>报名人数</span> <span class="font-size18 orange">{{ item.participants }}</span>/<span
class="font-size14">{{ item.participants }}</span>
</div>
<van-button type="info" size="small" round @click="handelClickJump('activity')"
<van-button type="info" size="small" round @click="handelClickJump(`activityDetail`,item)"
:disabled="item.online !== 1">报名</van-button>
</div>
</div>
@ -282,7 +282,7 @@ export default {
filterTagId(tagId){
return this.tagList.filter(item=>item.id === tagId)[0].tagName || '--';
},
handelClickJump(path) {
handelClickJump(path,item) {
if (path === 'event' || path === 'service' || path === 'activity') {
if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}` });
@ -290,8 +290,7 @@ export default {
this.showRegister = true;
}
} else {
this.$router.push({ path: `/${path}` })
console.log("1111" + path);
this.$router.push({ path: `/${path}`,query:item })
}
},

Loading…
Cancel
Save