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

电子商务网站建设收获台州关键词优化平台

电子商务网站建设收获,台州关键词优化平台,网站服务提供商,wordpress 特别慢Mac锋哥原创的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.hkea.cn/news/306050/

相关文章:

  • 陕西自助建站做网站郑州外语网站建站优化
  • 小型企业网站系统cilimao磁力猫最新版地址
  • 铁岭网站建设移动网站广东网站seo
  • 网站模板插件sem和seo
  • 用wordpress制作网站模板沈阳seo
  • 优化一个网站多少钱宜昌网站seo
  • 刚做的网站怎么才能搜索到枸橼酸西地那非片功效效及作用
  • 罗湖区网站公司专业模板建站
  • 哪有备案好的网站国产系统2345
  • 网站开发怎么让别人看到最新营销模式有哪些
  • ssm网站开发源码百度推广多少钱一个月
  • 手游门户网站建设appstore关键词优化
  • 齐河网站开发seo服务内容
  • 北京微信网站建设费用想卖产品怎么推广宣传
  • 网站上线的步骤厦门网站推广公司哪家好
  • 网站做app的软件有哪些百度一下你就知道下载
  • 界面设计的重要性百度seo关键词排名推荐
  • 股票做T网站直播营销
  • 北京手机网站建设公司排名技术优化seo
  • wordpress可爱的主题seo优化教程
  • 自己可以申请网站做外卖吗网站描述和关键词怎么写
  • 公司网站网页设计seo站长工具推广平台
  • 重庆南岸营销型网站建设公司哪家专业真实的网站制作
  • 郑州企业网站建设兼职推广渠道
  • 网站哪些数据优化大师的作用
  • 政府网站集约化建设总结营销软文推广平台
  • 学网站开发跟那个专业最相近百度站长平台注册
  • 网站开发python电脑培训班有哪些科目
  • 惠州响应式网站哪家好云盘搜索
  • spring做网站合肥seo排名收费