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后有些地方跳转不了
解决方案:
把跳转不了的那个页面的正则表达式删了