当前位置: 首页 > news >正文

民宿网站开发的开题报告站长之家怎么找网址

民宿网站开发的开题报告,站长之家怎么找网址,建设网站要什么电脑,找钢网网站建设锋哥原创的uniapp微信小程序投票系统实战: uniapp微信小程序投票系统实战课程 (SpringBoot2vue3.2element plus ) ( 火爆连载更新中... )_哔哩哔哩_bilibiliuniapp微信小程序投票系统实战课程 (SpringBoot2vue3.2element plus ) ( 火爆连载更新中... )共计21条视频…

锋哥原创的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/图文投票和文字投票基本一样,就是在投票选项里面,多了一个选项图片;

<view class="option_item" v-for="(item,index) in options" :key="item.id"><view class="option_input"><text class="removeOption" @click="removeOption(item.id)">&#xe618;</text><input type="text" v-model="item.name" placeholder="输入选项名称" placeholder-style="color:#bababa;font-size:14px"></view>				<view class="option_upload"><uni-file-picker@select="selectVoteItemFileFunc($event,index)":auto-upload="false" limit="1":del-icon="false" disable-preview file-mediatype="image" :imageStyles="voteItemImageStyles"><view class="upload"><text class="smallUploadImg">&#xe727;</text></view></uni-file-picker></view></view>
.option_item{margin-top: 10px;border-radius: 5px;background-color: white;padding: 10px;.option_input{display: flex;}.option_upload{margin-top: 20rpx;.upload{margin: 10rpx;background-color: #f4f5f7;width:90rpx;height: 90rpx;display: flex;align-items: center;justify-content: center;}}}
			voteItemImageStyles:{width:"150rpx",height:"120rpx",border:false},
selectVoteItemFileFunc:function(e,index){console.log("index="+index)console.log(e.tempFilePaths[0])uni.uploadFile({header:{token:uni.getStorageSync("token")},url:getBaseUrl()+"/vote/uploadVoteItemImage",filePath:e.tempFilePaths[0],name:"voteItemImage",success: (res) => {let result=JSON.parse(res.data);if(result.code==0){this.options[index].image=result.voteItemImageFileName;}}})},

加个image属性:

提交加上验证:

// 验证投票选项,如果有名称的,必须要上传图片for(var i=0;i<this.options.length;i++){var option=this.options[i];if(!isEmpty(option.name)){if(isEmpty(option.image)){console.log("请上传第"+(i+1)+"个投票选项图片")uni.showToast({icon:"error",title:"请上传第"+(i+1)+"个投票选项图片"})return;}}}

后端:

voteItemImagesFilePath: D://uniapp/voteItemImgs/
@Value("${voteItemImagesFilePath}")
private String voteItemImagesFilePath;
/*** 上传投票选项图片* @param voteItemImage* @return* @throws Exception*/
@RequestMapping("/uploadVoteItemImage")
public Map<String,Object> uploadVoteItemImage(MultipartFile voteItemImage)throws Exception{System.out.println("filename:"+voteItemImage.getName());Map<String,Object> resultMap=new HashMap<>();if(!voteItemImage.isEmpty()){// 获取文件名String originalFilename = voteItemImage.getOriginalFilename();String suffixName=originalFilename.substring(originalFilename.lastIndexOf("."));String newFileName= DateUtil.getCurrentDateStr()+suffixName;FileUtils.copyInputStreamToFile(voteItemImage.getInputStream(),new File(voteItemImagesFilePath+newFileName));resultMap.put("code",0);resultMap.put("msg","上传成功");resultMap.put("voteItemImageFileName",newFileName);}return resultMap;
}

http://www.dinnco.com/news/69825.html

相关文章:

  • 小说阅读网站开发论文国家免费培训网站
  • 建站宝盒成品网站演示推广普通话宣传周活动方案
  • 哪里有做彩票网站了微信朋友圈广告在哪里做
  • 网站设计版式软文发布平台
  • 公司网站功能性建设有哪些台州网站建设平台
  • 公司网站建设安全的风险免费推广网站2023
  • wordpress添加小说板块外贸seo建站
  • 蓝天云免费空间主机徐州网站优化
  • 哪个平台推广效果好哪个网站学seo是免费的
  • 哪个网站做外贸比较好海外推广运营
  • 建站快车源码查图百度识图
  • 有没有做婚车的网站营销网站
  • 做软件赚钱的网站有哪些网络优化的基本方法
  • 南京做网站最新军事报道
  • 河南濮阳今日疫情新网站seo
  • 如何在记事本中做网站链接网站关键词优化外包
  • 从零开始做网站数据库seo综合查询
  • 学做课件的网站百度客服中心人工电话
  • vps 上怎么做网站苏州关键词seo排名
  • 怎么知道自己网站的权重企业文化案例
  • 医院诊所网站源码百度竞价排名规则及费用
  • 做网站实训总结广告代理公司
  • 建站之星网站 seo优化自动app优化
  • 怒江网站制作资源猫
  • 儿童做网站百度seo排名点击
  • seo外包公司哪家好网站关键词优化系统
  • 手机网站微信链接怎么做的产品推广方式及推广计划
  • 傻瓜式建站软件下载windows优化
  • 萝岗营销型网站建设凯里seo排名优化
  • 做视频有赚钱的网站有哪些兰州网站开发公司