小程序选择照片和选择视频的时候闪退 [看什么视频,老实交代。]


- 手机型号:



- 当前 Bug 的表现(可附上截图)

在拍摄照片,或者拍摄视频的时候,拍完之后,小程序直接闪退到微信首页,而且只有在上述手机(小米4C)上出现这个问题,其他手机没有出现。请问该如何解决。


- 以下是代码片段

setVideo(){

    var that = this

    wx.chooseVideo({

        sourceType: ['album', 'camera'],

        maxDuration: 60,

        camera: 'back',

        success(resC) {

            onsole.log(resC.tempFilePath)

                that.setData({

                    videoTempPah: resC.tempFilePath

                })

                wx.showLoading({

                    title: '上传中...',

                })

                //上传封装

                app.upload({

                    tempFilePath: resC.tempFilePath,

                    success(res){

                    console.log(res)

                    var videoJson = {

                        id: JSON.parse(res.data).data.id,

                        path: JSON.parse(res.data).data.path,

                    }

                    that.data.videoArr.push(videoJson)

                    that.setData({

                        videoArr: that.data.videoArr

                    })

                    wx.hideLoading()

                }

            })

        }

    })

},


  • 清理一下手机的缓存以及内存再试下?, 搞不清楚你在说什么。
    • 试过了,依然不管用呢,还是闪退,有什么其他解决方案么?, 不知道唉。
    • 先试下在页面单独使用chooseVideo选择试下?, 聊的好尴尬呀!
  • +1 , 还好我小学有好好学习