Commit 422632da authored by Damon's avatar Damon

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

parent 1d673131
......@@ -172,14 +172,15 @@ export default {
return this.$u.random(random[0], random[1])
},
},
onLoad(e) {
if (!e) {
onLoad() {
let options = wx.getLaunchOptionsSync()
if (!options.query?.id) {
this.$u.route({
url: 'pages/index/index',
type: 'tab',
})
}
this.init(e?.id)
this.init(options.query?.id)
},
methods: {
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