收藏
回答

远程调试bug

问题模块 框架类型 操作系统 工具版本
开发者工具 小程序 Windows v1.02.1802080

在执行wx.navigateTo 的时候,预览模式可以正常跳转,但是远程调试模式无法正常跳转,出现白屏加报错问题,报错如下:(andriod ios 手机都出现了如下情况,基础库版本为1.9.91)


运用了分包加载,页面跳转是从一个主包页面前往一个分包页面,路径确认书写正确。

最后一次编辑于  2018-02-28
回答关注问题邀请回答
收藏

4 个回答

  • XL
    XL
    2018-03-01
    let publicLogic = require('../../../../utils/util.js');
    let http = publicLogic.http;
    let dataCheck = publicLogic.dataCheck;
    let alert = publicLogic.alert;
    let toast = publicLogic.toast;
    let rejectStepLogic = publicLogic.rejectStepLogic;
    let paramJoin = publicLogic.paramJoin;
     
    //按钮点击触发completeInf 函数,上面是简化的执行逻辑,下面是详细的
    Page({
        completeInf(e){
          //逻辑省略下来如下
          let step = e.currentTarget.dataset.step; //这里取到的是1  
          
          let navigateObj = {
                '1': '../../../companyInfFix/pages/uploadbusinesslicense/uploadbusinesslicense',
                '2': '../../../IDAuthorize/pages/userPersonIdentityCardRealName/userPersonIdentityCardRealName?businessType=' + that.data.businessType,
                '3':'../../../uploadAuthorization/pages/companyauthorization/companyauthorization'
          }
     
          console.log('before go to') //打印出来了
          wx.navigateTo({
              url: navigateObj[step],
          })
          console.log('after go to') //打印出来了
        },
     
        completeInf(e){//弹出提示框
            //详细版代码
            let step = e.currentTarget.dataset.step;
            let that = this;
            let navigateObj = {
            '1': '../../../companyInfFix/pages/uploadbusinesslicense/uploadbusinesslicense',
            '2': '../../../IDAuthorize/pages/userPersonIdentityCardRealName/userPersonIdentityCardRealName?businessType=' + that.data.businessType,
            '3':'../../../uploadAuthorization/pages/companyauthorization/companyauthorization'
            }
     
            if (!that.data['bigStep' + step].isQry){ //不可查看
                console.log('isQry') //没有打印
                if (that.data['bigStep' + step].completeStatus === 'COMPLETE'){ //已完成
                    alert.call(this, {
                        isAlert: true,
                        isCancel: false,
                        cancelStr: '取消',
                        sureStr: '知道了',
                        alertMsg: (step == 1 ? '企业信息' : step == 2 ? '身份认证' : '授权书上传') + '模块已填写完成,不可修改查看。',
                        cancelCallBack: function () { },
                        sureCallBack: function () { }
                    })
                }else{ //未完成
                    alert.call(this, {
                        isAlert: true,
                        isCancel: false,
                        cancelStr: '取消',
                        sureStr: '知道了',
                        alertMsg: that.data.bigStep1.isEdit ? '请先完善企业信息' : that.data.bigStep2.isEdit ? '请先完成身份认证' : '请上传企业授权确认书',
                        cancelCallBack: function () { },
                        sureCallBack: function () { }
                    })
                }
     
                return;
            }
     
            if (!that.data['bigStep' + step].isEdit){ //不可修改 可查看
     
                navigateObj = {
                    '1': '../../../companyInfFix/pages/uploadbusinesslicense/uploadbusinesslicense',
                    '2': '../../../IDAuthorize/pages/userPersonIdentityCardRealName/userPersonIdentityCardRealName?businessType=' + that.data.businessType,
                    '3': '../../../uploadAuthorization/pages/uploadauthoriztion/uploadauthoriztion'
                }
     
                alert.call(this, {
                    isAlert: true,
                    isCancel: true,
                    cancelStr: '取消',
                    sureStr: '知道了',
                    alertMsg: (step == 1 ? '企业信息' : step == 2 ? '身份认证' : '授权书上传') + '模块已提交完成,不可修改只可查看。',
                    cancelCallBack: function () { },
                    sureCallBack: function () {
                        console.log('before go to') //打印出来了
                        wx.navigateTo({
                            url: navigateObj[step],
                        })
                        console.log('after go to') //打印出来了
                    }
                })
     
                return;
            }
        }
    })

    远程调试控制台输出:



    手机出错截图:


    2018-03-01
    赞同
    回复
  • Albert Einstein [官]
    Albert Einstein [官]
    2018-02-28

    可以简单看下 wx.navigateTo 所在的代码吗。

    2018-02-28
    赞同
    回复
  • XL
    XL
    2018-02-28
    1. 更新之后试了两次依然会出现原来的那个报错

    2. 两个小问题:

      [1]. 官网的版本号好像标注错了,安装包是 wechat_devtools_1.02.1802270_x64,官网写的是1.02.1802770,注意倒数第三位。

      [2]. 微信开发者工具点击检查更新没有识别下载最新的版本。

    2018-02-28
    赞同
    回复
  • Albert Einstein [官]
    Albert Einstein [官]
    2018-02-28

    请尝试更新到最新版本试一下呢。

    https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html

    2018-02-28
    赞同
    回复