实习前端来学习
实习前端来学习
  • 发布:2022-10-25 17:09
  • 更新:2024-01-03 18:17
  • 阅读:638

【报Bug】uniapp nvue ios闪退 (安卓正常)

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: Win10

HBuilderX类型: 正式

HBuilderX版本号: 3.6.7

手机系统: iOS

手机系统版本号: iOS 16

手机厂商: 苹果

手机机型: 苹果13

页面类型: nvue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

App下载地址或H5⽹址: https://www.yunedit.com/update/neice/iosDown?id=47231

示例代码:
<swiper :current="currentTab" class="swiper-box" :duration="300" @change="changSlider"> <swiper-item class="swiper-item" v-for="(tab, index1) in carteTab" :key="index1"> <list class="scroll-v list" scroll-y enableBackToTop="true" :show-scrollbar="false" @scrolltolower="loadMore(index1)" scroll-with-animation enable-back-to-top @loadmore="loadMore(index1)"> <cstRefresh @refresh="onrefresh(index1)" :ref="'swiperItemRef_' + index1"

refreshing="tab.refreshing" @pullingdown="onpullingdown" :refreshText="tab.refreshText"> </cstRefresh>

            <cell class="" style="" v-if="tab.product.length > 0 &&tabBarsCurr==0">  
                <view class="cp-content">  
                    <view class="cp-xiangmu" v-for="(val, pindex) in tab.product" @click="showShare(val)">  

                        <image :src="val.picture[0]" class="cp_tupian" mode='widthFix'  
                            placeholder="/static/img/ic_default_placeholder.png"></image>  
                    </view>  
                </view>  

            </cell>  
            <cell class="s-page-wrapper" v-if="tab.product.length > 0 &&tabBarsCurr==1"  
                v-for="(val, pindex) in tab.product" :key="pindex">  
                <view class="s-margins s-border-radius-small s-bg-white" v-if="false">  
                    <view class="s-ceil s-padding find-head-content">  
                        <image class="s-list-icons s-border-radius " src="/static/img/logo.png"></image>  
                        <view class="s-list-content head-content">  
                            <text class="is-size-14 s-bold">{{ val.show_name }}</text>  
                            <text class="is-size-12 s-ellipsis s-black9">{{ val.show_time }}</text>  
                        </view>  
                        <view class="share-btn" @click="showSheet(val.goods_numiid,1)">  
                            <text class="share-btn-num cs-iconfont">一键分享</text>  
                        </view>  
                    </view>  
                    <view class="s-ceil s-padding goods_title"  
                        v-if="val.goods_title != '' && val.goods_title != null">  
                        <text class="find-title-txt">{{ val.goods_title }}</text>  
                    </view>  
                    <view class="s-ceil s-padding  goods_title">  
                        <text class="find-title-txt-content">{{ val.copy_content }}</text>  
                    </view>  

                    <view class="s-ceil s-padding goods_title"  
                        v-if="val.goods_picture && val.goods_picture.length > 0">  
                        <view class="s-rows s-wrap s-body">  
                            <view class="goods_picture-card" v-for="(picItem, picIndex) in val.goods_picture"  

key="picIndex" @click="previewImage({ urllist: val['goods_picture'], picIndex: picIndex, val: val })">
<image :src="picItem" class="goods_pictureItem"
placeholder="/static/img/ic_default_placeholder_220.png"></image>
</view>
</view>
</view>

                    <view class="s-ceil s-padding s-body goods_title" v-if="val.copy_comment">  
                        <view class="find-txt-comment">  
                            <text  
                                class="find-title-txt-content find-txt-comment-richtext">{{ val.copy_comment }}</text>  
                            <view class="copy-wenan-btn"><text class="copy-wenan-btn-text cs-iconfont"  
                                    @click="copyComment(val.goods_numiid,1)">复制文案</text></view>  
                        </view>  
                    </view>  
                </view>  
                <view class="s-margins s-border-radius-small s-bg-white">  

                    <!-- <view class="s-ceil s-padding goods_title"  
                        v-if="val.short_name != '' && val.short_name != null">  
                        <text class="find-title-txt">{{ val.short_name }}</text>  
                    </view>  
                    <view class="s-ceil s-padding  goods_title">  
                        <text class="find-title-txt-content">{{ val.circle_content }}</text>  
                    </view> -->  

                    <view class="s-ceil s-padding goods_title" v-if="val.picture && val.picture.length > 0">  
                        <view class="s-rows s-wrap s-body">  
                            <view class="goods_picture-card" v-for="(picItem, picIndex) in val.picture"  

key="picIndex" @click="previewImage({ urllist: val['picture'], picIndex: picIndex, val: val })">
<image :src="picItem" class="goods_pictureItem" mode="widthFix"></image>
</view>

                        </view>  
                    </view>  
                    <view class="s-ceil s-padding goods_title" v-if="val.video">  
                        <view class="s-rows s-wrap s-body">  
                            <view class="goods_picture-card">  
                                <video :src="val.video" id="myVideo" class="video"  
                                    @timeupdate='video_time_update' :poster="val.cover"></video>  
                            </view>  
                        </view>  
                    </view>  

                    <view class="s-ceil s-padding s-body goods_title">  
                        <view class="find-txt-comment">  
                            <!-- 下单地址{点击复制文案后自动生成短网址} -->  
                            <text  
                                class="find-title-txt-content find-txt-comment-richtext">{{val.content}}</text>  
                            <view class="copy-wenan-btn"><text class="copy-wenan-btn-text cs-iconfont"  
                                    @click="copyComment(val)">复制文案</text></view>  
                        </view>  
                    </view>  
                    <view class="s-ceil s-padding find-head-content">  
                        <image v-if="false" class="s-list-icons s-border-radius " src="/static/img/logo.png">  
                        </image>  
                        <view class="s-list-content head-content" v-if="false">  
                            <text  
                                class="is-size-14 s-bold">{{ val.shop_name ? val.shop_name : val.show_name ? val.show_name : '' }}</text>  
                            <text  
                                class="is-size-12 s-ellipsis s-black9">{{ val.update_time ? val.update_time : val.addtime }}</text>  
                        </view>  
                        <view class="share-btn" @click="showSheetVide(val)">  
                            <text class="share-btn-num cs-iconfont">一键分享</text>  
                        </view>  
                        <view class="share-btn" style="margin-left: 100rpx;background-color: #007aff;color: #ffffff;"  @click="downvideo(val)">  
                            <text class="share-btn-num cs-iconfont" style="color: #ffffff">下载视频</text>  
                        </view>  
                    </view>  
                </view>  
            </cell>  
            <cell class="s-page-wrapper" v-if="tab.product.length > 0 &&tabBarsCurr==2"  
                v-for="(val, pindex) in tab.product" :key="pindex">  
                <view class="s-margins s-border-radius-small s-bg-white">  
                    <view class="s-ceil s-padding find-head-content">  
                        <image class="s-list-icons1  " :src="val.picture[0]" @click="toWeb(val.link)"></image>  
                        <view class="s-list-content head-content" @click="toWeb(val.link)">  
                            <text class="is-size-14 s-bold">{{val.content}}</text>  
                            <text class="is-size-12 s-ellipsis s-black9">{{val.addtime}}</text>  
                        </view>  
                        <view class="share-btn" @click="showSheet(val)">  
                            <text class="share-btn-num cs-iconfont">一键分享</text>  
                        </view>  
                    </view>  
                    <view class="s-ceil s-padding goods_title"  
                        v-if="val.goods_title != '' && val.goods_title != null">  
                        <text class="find-title-txt">{{ val.goods_title }}</text>  
                    </view>  
                    <view class="s-ceil s-padding  goods_title">  
                        <text class="find-title-txt-content">{{ val.copy_content }}</text>  
                    </view>  

                    <view class="s-ceil s-padding goods_title"  
                        v-if="val.goods_picture && val.goods_picture.length > 0">  
                        <view class="s-rows s-wrap s-body">  
                            <view class="goods_picture-card" v-for="(picItem, picIndex) in val.goods_picture"  

key="picIndex" @click="previewImage({ urllist: val['goods_picture'], picIndex: picIndex, val: val })">
<image :src="picItem" class="goods_pictureItem"
placeholder="/static/img/ic_default_placeholder_220.png"></image>
</view>
</view>
</view>

                    <view class="s-ceil s-padding s-body goods_title" v-if="val.copy_comment">  
                        <view class="find-txt-comment">  
                            <text  
                                class="find-title-txt-content find-txt-comment-richtext">{{ val.copy_comment }}</text>  
                            <view class="copy-wenan-btn"><text class="copy-wenan-btn-text cs-iconfont"  
                                    @click="copyComment(val.goods_numiid,1)">复制文案</text></view>  
                        </view>  
                    </view>  
                </view>  

            </cell>  

            <cell class="tui-refresh">  

                <text class="refresh-text">{{ tab.loadingText }}</text>  
            </cell>  
        </list>  
    </swiper-item>  
</swiper>

操作步骤:

多点击几次tab栏且切换就直接闪退

预期结果:

不闪退 正常运行

实际结果:

点击直接闪退

bug描述:

uniapp nvue 云打包ios 进入直接闪退 (安卓正常)

之前看了一下日志好像说是内存不足 导致闪退
进入app是也是nvue页面图片数据返回了可是内容加载不出来
感觉好像每次的图片数据都是存在本地一样 满了就不显示 然后过一秒就直接闪退
项目里有用到第三方sdk(在附件展示)

2022-10-25 17:09 负责人:DCloud_iOS_WZT 分享
已邀请:
实习前端来学习

实习前端来学习 (作者)

经过大佬的排查 最后找出原因: 产品图片过大导致闪退
导致启动的进程过多 而且内存占满 就会导致闪退

解决方案:更换列表高清图片为压缩图 做优化操作。最后完美解决问题

DCloud_iOS_WZT

DCloud_iOS_WZT

你appid私信我下

BoredApe

BoredApe - 有问题就会有答案。

请上传一个能重现问题的测试工程

1***@163.com

1***@163.com - name-M

大佬 请问页面在本地H5可以正常展示 在安卓也可以正常展示 但是安卓只有一个组件不展示 其他都可以展示(ios可以正常展示)没有做任何的条件限制 希望大佬可以指点一下 我自己感觉是组件传值的问题 但是其他一模一样的页面展示数据都可以正常展示

要回复问题请先登录注册