Commit 89583922 by fengzhaoyu

修改加载图片

parent de3d7ec8
......@@ -316,13 +316,20 @@ input {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #1890FF;
/* background: #1890FF; */
color: white;
line-height: 80rpx;
text-align: center;
position: relative;
}
.noHeadUrl {
background: #1890FF;
border-radius: 50%;
width: 80rpx;
height: 80rpx;
}
.headUrl>image {
vertical-align: top;
width: 100%;
......
......@@ -87,9 +87,10 @@
</view>
<view class="participatorListBottom" catchTap="goParticipantsDetail">
<view class="people" a:for="{{$data.showParticipatorList.length > 10 ? [...$data.showParticipatorList].splice(0, 11) : $data.showParticipatorList}}">
<block>
<view class="headUrl">
<image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" onLoad="imageLoad" />
<view a:else>
<view class="noHeadUrl" a:else>
{{item.username.substring(item.username.length-numLength)}}
</view>
<view a:if="{{item.confirmAttendance == 0}}" class=" noParticipateStatus participate-status iconicon_noAgreed1 iconfont">
......@@ -97,6 +98,7 @@
<view a:if="{{item.confirmAttendance == 1}}" class=" participate participate-status iconicon_Agreed1 iconfont">
</view>
</view>
</block>
<!--<head-img className="headUrl" item="{{item}}"></head-img> -->
<!--<view class="headUrl"><image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" /><view class="conflict iconicon_conflict iconfont" a:if="{{conflictPeople.includes(item.userId)}}"></view></view><view class="name">{{item.name}}</view> -->
</view>
......
......@@ -148,6 +148,7 @@ create.Page({
return
}
this.setData({
scheduleItem: {
id: res.data.data.id,
......
......@@ -17,6 +17,10 @@ export function getSelectRepeatId(recurrenceModel, repeatList) {
export function getInitialPsarticipants(participants) {
let people = {}
for (let i = 0; i < participants.length; i++) {
if (i < 11 && participants[i].headUrl) {
let img = new new Image()
img.src = img.headUrl
}
participants[i].participator.confirmAttendance = participants[i].confirmAttendance
people[participants[i].participator.userId] = participants[i].participator
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment