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

本地网站建设方案信息大全手机网站外链怎么

本地网站建设方案信息大全,手机网站外链怎么,点餐小程序模板,精灵代理ip锋哥原创的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.yayakq.cn/news/869724/

相关文章:

  • 南宁网站建设策划方案自己做的网站不备案不能访问吗
  • 自己的电脑怎么做网站泉州网站建设-泉州网站建设公司
  • 网站设计 中高端安徽合肥建设厅网站
  • 设计网站主页要多少钱淘客客怎么做自己的网站
  • 孝感 网站建设网站开发应用价值
  • 网站制作开发技术龙岗这边哪里有教做网站的
  • 定制网站与模板网站的主要区别珠海市横琴新区建设环保局网站
  • 做网站要素做网站用虚拟主机还是服务器
  • 山东省监理建设协会网站宣传片拍摄注意事项
  • 加入网站帮忙做网站一个人做两个博客网站
  • 网站申请备案流程php语言做购物网站
  • 个人网站怎么做联盟推广深圳app开发红孩儿
  • 创建网站的流程有哪些正规品牌网站设计价格
  • 东营网站建设入门wordpress 全局tag
  • 网站开发分销系统贵阳58同城做网站
  • 广西seo网站wordpress中文博客
  • 商标 做网站 是几类东莞页面设计的培训
  • 蚌埠专业制作网站的公司公司登记
  • 电子商务网站后台功能app界面怎么做
  • 大型网站流量拓者设计吧模型免费下载
  • 网站建设数据库代码完整网站设计
  • 内容管理网站建设方案做网站建设的网络公司经营范围怎样填
  • 无极电影网站WordPress本地可以调出点赞功能吗
  • 做网站怎么赚钱 知乎推动政务网站建设
  • 做网站有那几种末班seo的特点是什么
  • 医院网站建设方案招标文件必应搜索引擎首页
  • 建设网站需要多少钱济南兴田德润o地址12306网站如何做解绑
  • 想建个企业网站织梦cms可以做外贸网站吗
  • 分析网站的网站湘西 网站 建设 公司
  • 我要建个网站做塑料的网站有哪些