import {getMultResult} from '../../../utils/util.js' let app = getApp() Page({ data: { spinShow: false, paperId: null, answers:[], info: {}, paper: {}, answer: {}, preList:["A","B","C", "D","E","F"], timer: null, doTime: 0, remainTime: 0, remainTimeStr: '', modalShow: false, result: 0, getMultResult, timeOutShow: false }, onLoad: function(options) { let paperId = +options.id||5 let _this = this app.formPost('Exam.PaperInfo',{paperId}).then(res => { if (res.code === 200) { _this.setData({ info: res.data.info, answers: res.data.answers, paperId: paperId, }); } }) }, onUnload() { clearInterval(this.data.timer) wx.reLaunch({ url: "/pages/exam/index/index" }) }, returnRecord() { wx.reLaunch({ url: '/pages/record/index', }); }, timeOut() { clearInterval(this.data.timer) this.setData({ timeOutShow: true }); } })