|
|
@@ -4,11 +4,7 @@
|
|
|
<!-- 用户信息 -->
|
|
|
<view class="uerInfo mar_t16 flex_r">
|
|
|
<view class="user_img">
|
|
|
- <image class="image" :src="
|
|
|
- userinfo && userinfo.head_pic != ''
|
|
|
- ? userinfo.head_pic
|
|
|
- : 'https://tea.soowin.com/mnt/image/m_avar.jpg'
|
|
|
- " mode=""></image>
|
|
|
+ <image @click="upheadimg" class="image" :src="userinfo.head_pic" mode=""></image>
|
|
|
<view class="coupon_info flex_r flex_ac" v-if="isShiMing" @tap="goToAutonym">
|
|
|
完成实名认证,享受更多权益
|
|
|
<image src="/static/my/f_close.png" mode="widthFix" class="close_icon" @tap.stop="closeAuto">
|
|
|
@@ -18,12 +14,12 @@
|
|
|
</view>
|
|
|
<block v-if="userinfo && userinfo != ''">
|
|
|
<view class="user_con flex_c">
|
|
|
- <view class="user_name flex_r flex_ae ellipsis">{{ userinfo.nickname
|
|
|
- }}<text>({{
|
|
|
- userinfo.is_authentication == 0 ? "未实名" : "已实名"
|
|
|
- }})</text></view>
|
|
|
+ <view class="user_name flex_r flex_ae ellipsis">
|
|
|
+ <view @click="goto('/pages/my/userinfo')">{{ userinfo.nickname }}</view>
|
|
|
+ <text>({{ userinfo.is_authentication == 0 ? "未实名" : "已实名" }})</text>
|
|
|
+ </view>
|
|
|
<view class="flex_r flex_ac">
|
|
|
- <view class="user_level flex_r mar_t10">
|
|
|
+ <view class="user_level clearfix">
|
|
|
<image class="level_img" src="/static/my/huangguan.png" mode=""></image>
|
|
|
<view class="level_text">{{ userinfo.level_name }}</view>
|
|
|
</view>
|
|
|
@@ -35,12 +31,7 @@
|
|
|
</view>
|
|
|
<view class="user_option flex_r flex_ac">
|
|
|
<image class="code_img" src="/static/my/f_img_code.png" @tap="getImgPage" mode=""></image>
|
|
|
- <!-- <image
|
|
|
- class="code_img"
|
|
|
- src="/static/my/setting.png"
|
|
|
- @tap="getToSetting"
|
|
|
- mode=""
|
|
|
- ></image> -->
|
|
|
+ <!-- <image class="code_img" src="/static/my/setting.png" @tap="getToSetting"></image> -->
|
|
|
</view>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
@@ -259,7 +250,7 @@
|
|
|
// import { ReqApi } from "@/utils/reqTools.js";
|
|
|
import authorizeModule from "@/components/authorize-module/index";
|
|
|
// import newauthorize from "@/components/authorize-module/new";
|
|
|
- import uniCopy from "../../utils/copy";
|
|
|
+ import uniCopy from "@/utils/copy";
|
|
|
import {
|
|
|
get,
|
|
|
post,
|
|
|
@@ -284,7 +275,9 @@
|
|
|
unid: "",
|
|
|
|
|
|
isGetUserInfo:false,
|
|
|
- invited:''
|
|
|
+ invited:'',
|
|
|
+
|
|
|
+ updataUserimg: {},
|
|
|
};
|
|
|
},
|
|
|
onLoad: function(options) {
|
|
|
@@ -359,7 +352,6 @@
|
|
|
autoGetUserInfo(res){
|
|
|
this.showAuth = false;
|
|
|
this.isGetUserInfo = false
|
|
|
- console.log(res,"获取到的用户信息")
|
|
|
},
|
|
|
getuserInfo() {
|
|
|
post("/user/userinfo").then((res) => {
|
|
|
@@ -463,6 +455,28 @@
|
|
|
url: "/pages/my-acc-money/my-acc-money",
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ // 更换头像
|
|
|
+ upheadimg() {
|
|
|
+ let that = this;
|
|
|
+ uni.chooseImage({
|
|
|
+ count: 1, // 最多可以选择的图片张数,默认9
|
|
|
+ sizeType: ["compressed"], // original 原图,compressed 压缩图,默认二者都有
|
|
|
+ sourceType: ["album", "camera"], // album 从相册选图,camera 使用相机,默认二者都有
|
|
|
+ success: function (res) {
|
|
|
+ var arr = res.tempFiles;
|
|
|
+ that.$up(arr[0].path).then(res => {
|
|
|
+ post("user/setup", {
|
|
|
+ head_pic: res,
|
|
|
+ nickname: that.userinfo.nickname
|
|
|
+ }).then((res) => {
|
|
|
+ that.getuserInfo();
|
|
|
+ appEv.errTips("更换成功");
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -580,18 +594,18 @@
|
|
|
}
|
|
|
|
|
|
.level_text {
|
|
|
- padding: 0 16rpx;
|
|
|
- border-radius: 13rpx;
|
|
|
- font-size: 20rpx;
|
|
|
color: #6b2909;
|
|
|
- margin-left: -14rpx;
|
|
|
- margin-top: 6rpx;
|
|
|
+ // padding: 0 16rpx;
|
|
|
+ // border-radius: 13rpx;
|
|
|
+ // font-size: 20rpx;
|
|
|
+ // margin-left: -14rpx;
|
|
|
+ // margin-top: 6rpx;
|
|
|
}
|
|
|
|
|
|
.user_name {
|
|
|
width: 100%;
|
|
|
overflow: hidden;
|
|
|
- font-size: 46rpx;
|
|
|
+ font-size: 44rpx;
|
|
|
color: #121212;
|
|
|
font-family: "SourceHanSansSC-Medium";
|
|
|
font-weight: 500;
|
|
|
@@ -750,11 +764,20 @@
|
|
|
}
|
|
|
|
|
|
.user_level {
|
|
|
+ margin-top: 10rpx;
|
|
|
background: linear-gradient(to right, #ffeabd, #ffc479);
|
|
|
- padding: 10rpx 20rpx;
|
|
|
+ padding: 5rpx 20rpx;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 6rpx;
|
|
|
overflow: hidden;
|
|
|
+ .level_img,.level_text{
|
|
|
+ // vertical-align: middle;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .level_text{
|
|
|
+ font-size: 28rpx;
|
|
|
+ margin-left: 12rpx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 功能列表-end
|