@@ -16,8 +16,8 @@ | |||||
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | ||||
<view class="user-avatar"> | <view class="user-avatar"> | ||||
<!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | ||||
<image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl}}"></image> | |||||
<image wx:if="{{userAvatarUrl==''}}" class="userAvatarUrl" src="../assets/images/default.png"></image> | |||||
<image wx:if="{{userAvatarUrl.length>1}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl}}"></image> | |||||
<image wx:else class="userAvatarUrl" bindtap="goSetAvatar" src="https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0"></image> | |||||
</view> | </view> | ||||
<!-- 成长值 --> | <!-- 成长值 --> | ||||
<view class="user-data fl" bindtap='gotoChengzhangzhi' style="{{typeLsit.sy_xxb.styleClass}}"> | <view class="user-data fl" bindtap='gotoChengzhangzhi' style="{{typeLsit.sy_xxb.styleClass}}"> | ||||
@@ -417,6 +417,7 @@ page { | |||||
color: rgba(255, 255, 255, 1); | color: rgba(255, 255, 255, 1); | ||||
float: left; | float: left; | ||||
margin-top: 8rpx; | margin-top: 8rpx; | ||||
margin-left: 10rpx; | |||||
} | } | ||||
.chengzhang { | .chengzhang { | ||||
@@ -15,8 +15,8 @@ | |||||
<view class='user_title'> | <view class='user_title'> | ||||
<view class="user-avatar" bindtap='gotoedit'> | <view class="user-avatar" bindtap='gotoedit'> | ||||
<!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | ||||
<image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" src="{{userAvatarUrl}}"></image> | |||||
<image wx:if="{{userAvatarUrl==''}}" class="userAvatarUrl" src="../../../assets/images/default.png"></image> | |||||
<image wx:if="{{userAvatarUrl.length>1}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl}}"></image> | |||||
<image wx:else class="userAvatarUrl" bindtap="goSetAvatar" src="https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0"></image> | |||||
</view> | </view> | ||||
<view class="user-name" bindtap='gotoedit'> | <view class="user-name" bindtap='gotoedit'> | ||||
<!-- <open-data class="name" type="userNickName"></open-data> --> | <!-- <open-data class="name" type="userNickName"></open-data> --> | ||||
@@ -15,7 +15,7 @@ | |||||
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | <view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}"> | ||||
<view class="user-avatar1"> | <view class="user-avatar1"> | ||||
<!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | ||||
<image wx:if="{{userAvatarUrl}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl }}"></image> | |||||
<image wx:if="{{userAvatarUrl.length>1}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl }}"></image> | |||||
<image wx:else class="userAvatarUrl" bindtap="goSetAvatar" src="https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0"></image> | <image wx:else class="userAvatarUrl" bindtap="goSetAvatar" src="https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0"></image> | ||||
</view> | </view> | ||||
<!-- 成长值--> | <!-- 成长值--> | ||||
@@ -88,7 +88,7 @@ page { | |||||
line-height: 26rpx; | line-height: 26rpx; | ||||
font-size: 24rpx; | font-size: 24rpx; | ||||
padding: 4rpx 10rpx; | padding: 4rpx 10rpx; | ||||
margin-left: 20rpx; | |||||
margin-left: 10rpx; | |||||
} | } | ||||
.integralNum { | .integralNum { | ||||
@@ -61,17 +61,20 @@ Page({ | |||||
console.log(res, 'res') | console.log(res, 'res') | ||||
let avatarUrl = null | let avatarUrl = null | ||||
if (res.data.avatarUrl || 1 * res.data.avatarUrl) { | |||||
if (res.data.avatarUrl.length > 1) { | |||||
avatarUrl = res.data.avatarUrl | avatarUrl = res.data.avatarUrl | ||||
} else { | } else { | ||||
avatarUrl = defaultAvatarUrl | avatarUrl = defaultAvatarUrl | ||||
} | } | ||||
let gender = null | let gender = null | ||||
let sexFlag = null | |||||
if (1 * res.data.sex) { | if (1 * res.data.sex) { | ||||
gender = res.data.sex - 1 | gender = res.data.sex - 1 | ||||
sexFlag = 2 | |||||
} else { | } else { | ||||
gender = res.data.sex | gender = res.data.sex | ||||
sexFlag = 1 | |||||
} | } | ||||
let adress = null | let adress = null | ||||
@@ -85,7 +88,7 @@ Page({ | |||||
nickName: res.data.nickName, | nickName: res.data.nickName, | ||||
username: res.data.name, | username: res.data.name, | ||||
gender: gender, | gender: gender, | ||||
sexFlag: 2, | |||||
sexFlag: sexFlag, | |||||
date: util.fmtDate(parseInt(res.data.birthdate)), | date: util.fmtDate(parseInt(res.data.birthdate)), | ||||
dateFlag: res.data.birthdate ? 2 : 1, | dateFlag: res.data.birthdate ? 2 : 1, | ||||
height: res.data.height, | height: res.data.height, | ||||
@@ -1,6 +1,6 @@ | |||||
<view> | <view> | ||||
<navbar home back color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="个人信息"></navbar> | <navbar home back color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="个人信息"></navbar> | ||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<!-- <view style="height:{{navigationBarHeight}} "></view> --> | |||||
<view class="container"> | <view class="container"> | ||||
<view class="avatar"> | <view class="avatar"> | ||||
<text>我的头像</text> | <text>我的头像</text> | ||||
@@ -1,7 +1,7 @@ | |||||
@import "../../app.wxss"; | @import "../../app.wxss"; | ||||
.container { | .container { | ||||
margin-top: 30rpx; | |||||
margin-top: 210rpx; | |||||
padding: 0 40rpx 0 40rpx; | padding: 0 40rpx 0 40rpx; | ||||
} | } | ||||