记录折磨我的第1个bug

vue项目打包成app后在手机端进行测试,发现有一个地方点击跳转页面跳转不过去,路由也没有错
在这里插入图片描述
找了半天,搜索了半天没找到解决方案,这feel就很bad
最后搞了好久自己在终端发现了错误
这是终端报的错误
在这里插入图片描述
翻译过来就是无效的正则表达式。。。

这是income.vue页面的正则表达式部分

for (var i = 0; i < that.arr.length; i++) {
  that.a = that.arr[i].remark
  if (that.a.includes(',')) {
    that.name = that.a.match(/.*(?=,)/)[0]
    that.type = that.a.match(/(?<=,).*/)[0]
  } else {
    that.name = that.a
    that.type = '已完成'
  }
  if (that.arr[i].type) {
    that.momo = '+' + that.arr[i].price.toFixed(2)
    that.moneycolor = true
  } else {
    that.momo = that.arr[i].price.toFixed(2)
    that.moneycolor = false
  }
   that.max += that.momo - 0;
  that.b = that.arr[i].create_time
  this.$moment.locale('zh-cn')
  that.titi = this.$moment(that.b).format('MM月 DD日 hh:mm')
  that.$set(that.list, i, {
    arrname: that.name,
    money: that.momo,
    arrtype: that.type,
    time: that.titi
  })
}

然后我就尝试把income.vue页面的正则表达式部分删除再重新打包就可以了

问题:
vue打包成app后有些地方跳转不了

解决方案:
把跳转不了的那个页面的正则表达式删了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值