Burger
Burger
  • 发布:2024-04-19 17:01
  • 更新:2024-04-29 11:08
  • 阅读:43

【报Bug】ios语音结束回调中调用表单提交,上送数据后跳转页面会闪退

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 4.08

手机系统: iOS

手机系统版本号: iOS 17

手机厂商: 苹果

手机机型: Iphone13Pro

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

//设置围栏监听事件
fence.setGeoFenceListener(function(res){
if(res.type == 'onGeoFenceStatus'){
let data = res.data
if(data.event == 1){ // 进入地理围栏事件

                }else if(data.event == 2){  // 离开地理围栏事件  
                    // 调用上传数据跳转事件  
                    const innerAudio = uni.createInnerAudioContext();  
                    innerAudio.src = path['L1']  
                    innerAudio.play()  
                    innerAudio.onEnded(res => {  
                        if(that.option.pid == data.customId && that.option.multiple_address[that.option.point-1].fence_enable){  
                            that.to(false)  
                        }  
                    })                                
                }else{  
                    if(that.option.pid == data.customId && that.option.multiple_address[that.option.point-1].fence_enable){  
                        that.to(false)  
                    }  
                }  
            }  
        })  

....................

to: debounce(function(data){
let that = this
uni.getLocation({
type: 'gcj02',
geocode: true,
success: (res) => {
that.form.longitude = res.longitude
that.form.latitude = res.latitude
that.form.address = res.address.province+res.address.city+res.address.district+res.address.street+res.address.streetNum+res.address.poiName
that.form.short_address = res.address.street+res.address.streetNum+res.address.poiName
detail({
pid: that.form.pid
}).then(res => {
if(res.data.abnormal_info.ab_type != 0 && res.data.abnormal_info.ab_type != 1 && res.data.abnormal_info.ab_type != 2 && res.data.abnormal_info.ab_type != 10){

                            that.form.fee_list = that.costList  
                            arriveTake(that.form).then(res => {  
                                console.log(res)  
                                if(res.code == 1){  
                                    uni.reLaunch({  
                                        url: `/pages/transition/being-pickUp?pid=${that.form.pid}`  
                                    })  
                                }else{  
                                    uni.showToast({  
                                        title: res.msg,  
                                        duration: 3000,  
                                        icon: 'none'  
                                    })  
                                }  
                            })  
                        }else{  
                            uni.showToast({  
                                title: that.$t('warn.order_abnormal'),  
                                duration: 3000,  
                                icon: 'none'  
                            })  
                        }  
                    })  
                },  
                fail(e){  
                    uni.showToast({  
                        title: e.errMsg,  
                        icon: 'none',  
                        duration: 3000  
                    })  
                }  
            })  
        }),  

操作步骤:

地理围栏触发语音播报,语音播报结束调用接口上送数据后跳转页面

预期结果:

地理围栏触发语音播报,语音播报结束调用接口上送数据后跳转页面

实际结果:

地理围栏触发语音播报,语音播报结束调用接口上送数据后跳转页面,然后闪退

bug描述:

ios语音结束回调中调用表单提交,上送数据后跳转页面会闪退

2024-04-19 17:01 负责人:DCloud_iOS_XHY 分享
已邀请:
DCloud_iOS_XHY

DCloud_iOS_XHY

请上传一个能复现问题可直接运行的完整工程便于排查

  • Burger (作者)

    methods中的to方法调用后,ios闪退

    2024-04-22 11:51

Burger

Burger (作者)

methods中的to方法调用后,ios闪退

  • DCloud_iOS_XHY

    项目也没法运行呀,还集成了原生插件,先把三方插件移除,排除影响,使用最简单的模版工程复现问题

    2024-04-28 17:42

  • Burger (作者)

    回复 DCloud_iOS_XHY: 最新的zip已经发送在楼下

    2024-04-29 09:11

Burger

Burger (作者)

1111

Burger

Burger (作者)

11111111

Burger

Burger (作者)

1111111

要回复问题请先登录注册