| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const navBarHeight = 44;
- const _sfc_main = {
- __name: "quiz",
- setup(__props) {
- const url = common_vendor.ref("");
- const assessmentId = common_vendor.ref("");
- const source = common_vendor.ref("");
- const statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight || 20;
- const navBarStyle = `padding-top:${statusBarHeight}px;height:${navBarHeight}px;`;
- const contentStyle = `margin-top:${statusBarHeight + navBarHeight}px;`;
- const handleBack = () => {
- if (source.value === "kaoshixing" && assessmentId.value) {
- common_vendor.index.redirectTo({
- url: `/pages/common/webview?mode=kaoshixing&assessmentId=${encodeURIComponent(assessmentId.value)}`
- });
- return true;
- }
- common_vendor.index.navigateBack();
- return true;
- };
- common_vendor.onBackPress((options) => {
- return handleBack();
- });
- common_vendor.onLoad((options) => {
- assessmentId.value = options.assessmentId || "";
- source.value = options.from || "";
- if (options.from === "report") {
- const cachedUrl = common_vendor.index.getStorageSync("temp_report_url");
- if (cachedUrl) {
- url.value = cachedUrl;
- common_vendor.index.removeStorageSync("temp_report_url");
- return;
- }
- }
- if (options.from === "kaoshixing") {
- const cachedUrl = common_vendor.index.getStorageSync("temp_exam_url");
- if (cachedUrl) {
- url.value = cachedUrl;
- common_vendor.index.removeStorageSync("temp_exam_url");
- return;
- }
- }
- if (options.url) {
- url.value = decodeURIComponent(options.url);
- common_vendor.index.__f__("log", "at pages/assessment/quiz.vue:67", "Quiz WebView Loading URL:", url.value);
- }
- });
- return (_ctx, _cache) => {
- return common_vendor.e({
- a: common_vendor.o(handleBack),
- b: common_vendor.s(navBarStyle),
- c: url.value
- }, url.value ? {
- d: url.value
- } : {}, {
- e: common_vendor.s(contentStyle)
- });
- };
- }
- };
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e770efc2"]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/assessment/quiz.js.map
|