收藏
回答

image 显示多张本地大图时界面滑动卡顿、黑屏、小程序直接退出

机器型号:魅族Note 6

微信版本:6.5.16

业务场景:通过chooseImage接口选取本地7张原图照片(其中6张照片9.5MB,1张照片4.5MB),在界面上显示出来并上传到后台服务器

问题:在将这7张原图显示到界面时,界面滑动卡顿随后就出现黑屏的情况,偶尔出现直接退出小程序的情况

代码:

<view wx:for="{{photos}}" class="photo_bg_img" wx:key="index">

    <image src="../../../images/delete.png" class="pho_del" catchtap="deleteImage" data-index="{{index}}"></image>

    <image src="{{item.filePath}}" mode="aspectFill" catchtap="jumpDetail" data-index="{{index}}" style="width:210rpx;height:200rpx"></image>

    <view class="photo-uploading-cover" wx:if="{{item.uploadStatus === 'pending' || item.uploadStatus === 'uploading'}}">

        <view class="photo-uploading-cover-text">{{item.uploadStatus === 'pending'?'待上传':''}}{{item.uploadStatus === 'uploading'?'上传中':''}}</view>

    </view>

    <view class="photo-uploadfail-cover" wx:if="{{item.uploadStatus === 'failed'}}" catchtap="reupload" data-index="{{index}}" data-filePath="{{item.filePath}}">

        <view class="photo-uploadfail-cover-text">点击重新上传</view>

    </view>

</view>

界面截图:


回答关注问题邀请回答
收藏
登录 后发表内容