Commit 422632da authored by Damon's avatar Damon

fix: 【小程序-题库-模拟考试】:第一次进入分享后的成绩页面时报错,提示“传入的ID与预期的不符

parent 1d673131
...@@ -172,14 +172,15 @@ export default { ...@@ -172,14 +172,15 @@ export default {
return this.$u.random(random[0], random[1]) return this.$u.random(random[0], random[1])
}, },
}, },
onLoad(e) { onLoad() {
if (!e) { let options = wx.getLaunchOptionsSync()
if (!options.query?.id) {
this.$u.route({ this.$u.route({
url: 'pages/index/index', url: 'pages/index/index',
type: 'tab', type: 'tab',
}) })
} }
this.init(e?.id) this.init(options.query?.id)
}, },
methods: { methods: {
init(id) { init(id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment