uniapp微信小程序投票系统实战 (SpringBoot2+vue3.2+element plus ) -投票帖子管理实现

锋哥原创的uniapp微信小程序投票系统实战:

uniapp微信小程序投票系统实战课程 (SpringBoot2+vue3.2+element plus ) ( 火爆连载更新中... )_哔哩哔哩_bilibiliuniapp微信小程序投票系统实战课程 (SpringBoot2+vue3.2+element plus ) ( 火爆连载更新中... )共计21条视频,包括:uniapp微信小程序投票系统实战课程 (SpringBoot2+vue3.2+element plus ) ( 火爆连载更新中... )、第2讲 投票项目后端架构搭建、第3讲 小程序端 TabBar搭建等,UP主更多精彩视频,请关注UP账号。icon-default.png?t=N7T8https://www.bilibili.com/video/BV1ea4y137xf/

后端:

/**
 * 删除指定id的投票信息
 * @param id
 * @return
 */
@GetMapping("/delete/{id}")
@Transactional
public R delete(@PathVariable(value = "id")Integer id){
    voteDetailService.remove(new QueryWrapper<VoteDetail>().eq("vote_id",id)); // 删除用户投票详情
    voteItemService.remove(new QueryWrapper<VoteItem>().eq("vote_id",id)); // 删除投票选项
    voteService.removeById(id); // 删除投票
    return R.ok();
}

前端:

actionSet:function(){
				uni.showActionSheet({
					itemList:['删除当前投票'],
					success:(res)=>{
						if(res.tapIndex==0){
							uni.showModal({
								title:"系统提示?",
								content:"您确定要删除当前投票信息吗?",
								success:async (res2)=>{
									if(res2.confirm){
										const result=await requestUtil({url:"/vote/delete/"+this.vote.id,method:"get"});
										if(result.code==0){
											uni.showToast({
												icon:"success",
												title:"删除成功!"
											})
										}
										uni.switchTab({
											url:"/pages/create/create"
										})
									}
								}
							})
						}
					}
				})
			}

  • 10
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值