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

商城网站开发教程福州seo管理

商城网站开发教程,福州seo管理,福建闽东建设网站,企业网站建设推荐乐云seo锋哥原创的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/后端修改用户昵称:

/*** 更新用户昵称* @param wxUserInfo* @param token* @return*/
@RequestMapping("/updateNickName")
public R updateNickName(@RequestBody WxUserInfo wxUserInfo,@RequestHeader String token){if(StringUtil.isNotEmpty(wxUserInfo.getNickName())) {Claims claims = JwtUtils.validateJWT(token).getClaims();wxUserInfoService.update(new UpdateWrapper<WxUserInfo>().eq("openid", claims.getId()).set("nick_name", wxUserInfo.getNickName()));}return R.ok();
}

前端修改用户昵称:

<input type="nickname"  placeholder="请输入昵称" v-model="userInfo.nickName" @blur="onChangeNickName"/>
onChangeNickName:async function(e){console.log(e.detail.value);let nickName=e.detail.value;if(!isEmpty(nickName)){const result=await requestUtil({url:"/user/updateNickName",data:{nickName:nickName},method:"post"});}}
export const isEmpty=(str)=>{if(str === '' || str.trim().length === 0 ){return true}else{return false;}
}

头像上传 后端:

定义上传路径:

userImagesFilePath: D://uniapp/userImgs/
@Value("${userImagesFilePath}")
private String userImagesFilePath;
/*** 上传用户头像图片* @param userImage* @return* @throws Exception*/
@RequestMapping("/uploadUserImage")
public Map<String,Object> uploadUserImage(MultipartFile userImage, @RequestHeader String token)throws Exception{System.out.println("filename:"+userImage.getName());Map<String,Object> resultMap=new HashMap<>();if(!userImage.isEmpty()){// 获取文件名String originalFilename = userImage.getOriginalFilename();String suffixName=originalFilename.substring(originalFilename.lastIndexOf("."));String newFileName= DateUtil.getCurrentDateStr()+suffixName;FileUtils.copyInputStreamToFile(userImage.getInputStream(),new File(userImagesFilePath+newFileName));resultMap.put("code",0);resultMap.put("msg","上传成功");resultMap.put("userImageFileName",newFileName);// 更新到数据库UpdateWrapper<WxUserInfo> updateWrapper=new UpdateWrapper<>();Claims claims = JwtUtils.validateJWT(token).getClaims();updateWrapper.eq("openid",claims.getId()).set("avatar_url",newFileName);wxUserInfoService.update(new UpdateWrapper<WxUserInfo>().eq("openid",claims.getId()).set("avatar_url",newFileName));}return resultMap;
}

前端头像实现:

button上加下 open-type="chooseAvatar"

		onChooseAvatar:function(e){console.log(e.detail.avatarUrl)uni.uploadFile({header:{token:uni.getStorageSync("token")},url:getBaseUrl()+"/user/uploadUserImage",filePath:e.detail.avatarUrl,name:"userImage",success: (res) => {let result=JSON.parse(res.data);if(result.code==0){this.userInfo.avatarUrl=result.userImageFileName;}}})},
http://www.dinnco.com/news/13759.html

相关文章:

  • 怎么搭建网站平台百度网盘网页版入口官网
  • 河南网站建设推荐网络推广外包要多少钱
  • 凡科建站做的网站有什么短板国内广告联盟平台
  • 全国工程信息查询平台前端性能优化有哪些方法
  • 廊坊企业做网站seo咨询推广
  • 电子商务网站建设的目的是开展网络营销新疆疫情最新情况
  • 备案需要网站空间软文营销ppt
  • 做url网站百度账号购买网站
  • 网站新增一个域名备案衡阳seo服务
  • 南昌做建网站的制作网页的网站
  • 做摘抄的网站网址提交
  • 怎么申请 免费网站北京关键词seo
  • 项目策划书模板范文店铺seo是什么意思
  • 旅游网站开发结束语我要登录百度
  • 如何编辑企业网站免费发帖推广平台
  • 网站建设的进度计划软文的本质是什么
  • 网站建设中的多语言翻译如何实现山东网站建设
  • wordpress 插件 cdn太原网站优化公司
  • vue做企业网站深圳靠谱网站建设公司
  • 网页设计代码大全html制作表单惠州百度关键词优化
  • 做网站产品图片素材足球直播在线直播观看免费cctv5
  • html5网站开发教程知名做网站的公司
  • 自己做家具展示网站重庆快速网络推广
  • 查网站 备案信息软文代写多少钱一篇
  • 日本做的比较好的陶瓷网站seo作弊
  • 服务器IP做网址打开网站百度app下载安装 官方
  • 陆良建设局网站山西百度查关键词排名
  • 哪个网站可以做3d站长网站大全
  • 做地方门户网站怎样企业网络推广
  • 导购类网站怎么做的网站seo策划方案案例分析