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: { methods: {
handelAddResi() { handelAddResi() {
this.signUp.push({ name: "", mobile: "", remark: "" }) this.signUp.push({ name: "", mobile: "", remark: "",})
}, },
handelDelResi() { handelDelResi() {
this.signUp.pop() this.signUp.pop()
}, },
save(){ async save(){
signUp 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: {}, components: {},

7
src/views/home/index.vue

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

Loading…
Cancel
Save