由于微信搞事情uni.getUserProfile已经作废,获取不到头像和昵称
只能上传头像和昵称到服务器再存储
不多说已经封装好了,直接复制粘贴使用,上代码
登录组件
组件名login.vue
<template>
<view>
<u-popup mode="bottom" :show="getnickshow" @close="getnickshow = false" round='16rpx'>
<view class="getnickbox">
<view class="flex_spacebetween">
<image :src="project.logo" class="logoimg" mode="aspectFit"></image>
<view class="name">
{
{project.name}}
<text>申请</text>
</view>
</view>
<view class="m1 mt30">获取你的头像、昵称</view>
<view class="m2">展示个人信息</view>
<view class="xin1">
<button type="default" class="flex_spacebetween buttoncss" open-type="chooseAvatar"
@chooseavatar="chooseavatar">
<view class="flex_spacebetween toubox">
<view class="t1">头像</view>
<view v-if="