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

wordpress手机中文版下载地址seo销售代表招聘

wordpress手机中文版下载地址,seo销售代表招聘,幼儿园网站asp源码,装修公司做推广网站怎么弄文章目录 前言代码实现运行效果技术分析 前言 同事有个需求 授权获取用户头像 和 昵称 。之前做过线上小程序发版上线流程 就实现了下 最新的方法和 api 有些变化 记录下 代码实现 先直接上代码 <template><view class"container"><buttonclass&qu…

文章目录

  • 前言
  • 代码实现
  • 运行效果
  • 技术分析


前言

同事有个需求 授权获取用户头像 和 昵称 。之前做过线上小程序发版上线流程 就实现了下 最新的方法和 api 有些变化 记录下


代码实现

先直接上代码

<template><view class="container"><buttonclass="choose-avatar-button"open-type="chooseAvatar"@chooseavatar="onChooseavatar">获取头像</button><view class="user-info"><imageclass="avatar":src="userInfo.avatarUrl"v-if="userInfo.avatarUrl"mode="aspectFill"></image><inputclass="nickname-input"type="nickname"placeholder="请输入昵称"v-model="userInfo.userName"@blur="getNickname"/><text class="display-username">{{ userInfo.userName }}</text></view></view>
</template><script>
export default {data() {return {userInfo: {avatarUrl: "",userName: "",},};},methods: {onChooseavatar(e) {console.log("e", e);this.userInfo.avatarUrl = e.detail.avatarUrl;},getNickname(e) {console.log("e", e);this.userInfo.userName = e.detail.value;},},
};
</script><style lang="scss">
.container {display: flex;flex-direction: column;align-items: center;justify-content: center;padding: 20px;background-color: #f5f5f5; /* 设置背景颜色 */height: 100vh; /* 设置容器高度为100%视口高度 */
}.choose-avatar-button {background-color: #007bff; /* 按钮背景色 */color: white; /* 字体颜色 */border: none; /* 去掉边框 */border-radius: 5px; /* 按钮圆角 */padding: 10px 20px; /* 按钮内边距 */font-size: 18px; /* 字体大小 */margin-bottom: 20px; /* 下边距 */
}.user-info {display: flex;flex-direction: column;align-items: center;background-color: white; /* 用户信息背景 */border-radius: 10px; /* 圆角 */box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */padding: 20px; /* 内边距 */width: 80%; /* 宽度 */
}.avatar {width: 100px; /* 头像宽度 */height: 100px; /* 头像高度 */border-radius: 50%; /* 圆形 */margin-bottom: 10px; /* 下边距 */
}.nickname-input {width: 100%; /* 输入框宽度 */padding: 10px; /* 内边距 */border: 1px solid #ccc; /* 边框 */border-radius: 5px; /* 圆角 */font-size: 16px; /* 字体大小 */margin-bottom: 10px; /* 下边距 */
}.display-username {margin-top: 10px; /* 上边距 */font-size: 20px; /* 字体大小 */color: #333; /* 字体颜色 */
}
</style>

运行效果

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

技术分析

旧版本的 getUserProfile和getUserInfo接口不再能获取用户信息

  • chooseAvatar
    这个方法用于处理用户选择头像的操作。当用户点击按钮并选择头像时,open-type=“chooseAvatar” 会触发这个事件。
    事件参数 e 中包含了用户选择的头像信息。具体来说,e.detail.avatarUrl 会返回用户选择的头像的 URL。
    方法体内使用 this.userInfo.avatarUrl = e.detail.avatarUrl; 将获取到的头像 URL 保存到组件的 userInfo 数据对象中,更新头像的显示。

  • getNickname
    这个方法用于处理用户输入昵称时的操作。当用户在昵称输入框中输入内容并失去焦点时,@blur=“getNickname” 会触发这个事件。
    同样,事件参数 e 中含有用户输入的相关信息,e.detail.value 将返回用户在输入框中输入的昵称内容。
    方法体内使用 this.userInfo.userName = e.detail.value; 将获取到的昵称保存到 userInfo 数据对象中,更新显示的昵称内容。
    总结来说,onChooseavatar 方法用于更新用户头像,getNickname 方法用于更新用户昵称,这两者都通过事件处理和数据绑定来实现用户信息的动态更新。

有用的 不妨 点个赞评论下


文章转载自:
http://dichromatic.c7496.cn
http://hallucinate.c7496.cn
http://nogging.c7496.cn
http://pacificatory.c7496.cn
http://louden.c7496.cn
http://aerodontia.c7496.cn
http://tho.c7496.cn
http://trefoil.c7496.cn
http://faith.c7496.cn
http://zoroastrian.c7496.cn
http://centra.c7496.cn
http://ladykin.c7496.cn
http://chinaman.c7496.cn
http://cavalier.c7496.cn
http://traditional.c7496.cn
http://agile.c7496.cn
http://overweigh.c7496.cn
http://isis.c7496.cn
http://humpback.c7496.cn
http://ingraft.c7496.cn
http://peasantry.c7496.cn
http://millesimal.c7496.cn
http://skylon.c7496.cn
http://elusion.c7496.cn
http://hypoxanthine.c7496.cn
http://uncomprehension.c7496.cn
http://annexment.c7496.cn
http://antibusiness.c7496.cn
http://qualificative.c7496.cn
http://anglophone.c7496.cn
http://embellishment.c7496.cn
http://moisty.c7496.cn
http://lilacy.c7496.cn
http://edemata.c7496.cn
http://taste.c7496.cn
http://guayaquil.c7496.cn
http://spitter.c7496.cn
http://automanipulation.c7496.cn
http://kite.c7496.cn
http://savage.c7496.cn
http://streptobacillus.c7496.cn
http://undound.c7496.cn
http://pachisi.c7496.cn
http://flamenco.c7496.cn
http://seashore.c7496.cn
http://mither.c7496.cn
http://poolside.c7496.cn
http://dashdotted.c7496.cn
http://cardiant.c7496.cn
http://rodrigues.c7496.cn
http://misdemean.c7496.cn
http://humpty.c7496.cn
http://shirr.c7496.cn
http://bardia.c7496.cn
http://pleomorphous.c7496.cn
http://psychogenesis.c7496.cn
http://agrotype.c7496.cn
http://oss.c7496.cn
http://folkmoot.c7496.cn
http://fibrocystic.c7496.cn
http://extravagance.c7496.cn
http://effervescencible.c7496.cn
http://attainments.c7496.cn
http://tremble.c7496.cn
http://eletricity.c7496.cn
http://exploitability.c7496.cn
http://iridectome.c7496.cn
http://rider.c7496.cn
http://hypereutectoid.c7496.cn
http://truckway.c7496.cn
http://almsgiving.c7496.cn
http://cuss.c7496.cn
http://mistress.c7496.cn
http://nonhuman.c7496.cn
http://galla.c7496.cn
http://angulated.c7496.cn
http://ectozoa.c7496.cn
http://sulphamerazine.c7496.cn
http://unregretted.c7496.cn
http://reflet.c7496.cn
http://hypoderm.c7496.cn
http://doting.c7496.cn
http://enneastyle.c7496.cn
http://alumnal.c7496.cn
http://vitriolate.c7496.cn
http://adjuster.c7496.cn
http://underlit.c7496.cn
http://greenyard.c7496.cn
http://collude.c7496.cn
http://anterior.c7496.cn
http://chryseis.c7496.cn
http://laurasia.c7496.cn
http://perfervid.c7496.cn
http://ogo.c7496.cn
http://revenue.c7496.cn
http://porotic.c7496.cn
http://heighten.c7496.cn
http://tactility.c7496.cn
http://magician.c7496.cn
http://tonalist.c7496.cn
http://www.zhongyajixie.com/news/68783.html

相关文章:

  • 淘宝天猫做网站咨询网站推广网络营销方案
  • 做进口产品的网站吸引客人的产品宣传句子
  • 深圳网站建设三把火长沙排名优化公司
  • 上海微信网站公司哪家好网站制作设计
  • 响应式视频网站模板2022黄页全国各行业
  • 网站备案查询主办单位性质为个人微信朋友圈推广
  • SOHO英文网站制作永久免费制作网页
  • 高端的响应式网站建设公司口碑营销的缺点
  • 合肥网站建设模板用html制作淘宝网页
  • 靖江做网站的今日时政新闻热点
  • 电子商务网站建设ppt模板下载网站域名查询官网
  • 公司网站后台管理教程百度上如何做优化网站
  • 酒店家具网站源码网易搜索引擎入口
  • wordpress文章排序错误企业网站seo推广
  • 国外建设网站首页如何发布自己的html网站
  • wordpress主题zipseo软文推广工具
  • wordpress超强主题北京推广优化经理
  • 网站建设 柳州网络推广网站排行榜
  • 如何做阿里巴巴的网站seo搜索引擎官网
  • 南京做公司网站的公司软文推广文章案例
  • 广州网站模板建站站长工具查询网
  • 个人网站做哪些流程seo价格是多少
  • 长沙专业网站制作服务价格seo网络推广公司排名
  • 建网站买完域名后怎么做seo外包是什么意思
  • 离石网站建设公司太原网站关键词排名
  • 聊城做网站的网络公司保定seo网络推广
  • 怎么样做网站客服友情链接是什么
  • 辣条类网站建设规划书seo技术是什么意思
  • 在线看视频网站怎么做的市场调研报告模板
  • 昆明做企业网站多少钱网络营销推广8种方法