interview-notice.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const VoiceCheckModal = () => "../components/voice-check-modal.js";
  4. const _sfc_main = {
  5. components: {
  6. VoiceCheckModal
  7. },
  8. data() {
  9. return {
  10. isAgreed: false,
  11. showVoiceCheck: false
  12. };
  13. },
  14. methods: {
  15. toggleAgreement() {
  16. this.isAgreed = !this.isAgreed;
  17. },
  18. startInterview() {
  19. if (!this.isAgreed) {
  20. common_vendor.index.showToast({
  21. title: "请先同意面试须知",
  22. icon: "none"
  23. });
  24. return;
  25. }
  26. this.showVoiceCheck = true;
  27. },
  28. onVoiceCheckComplete() {
  29. this.showVoiceCheck = false;
  30. common_vendor.index.navigateTo({
  31. url: "/pages/preview/preview",
  32. fail: (err) => {
  33. console.error("页面跳转失败:", err);
  34. common_vendor.index.showToast({
  35. title: "页面跳转失败",
  36. icon: "none"
  37. });
  38. }
  39. });
  40. }
  41. }
  42. };
  43. if (!Array) {
  44. const _component_voice_check_modal = common_vendor.resolveComponent("voice-check-modal");
  45. _component_voice_check_modal();
  46. }
  47. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  48. return {
  49. a: $data.isAgreed,
  50. b: common_vendor.o((...args) => $options.toggleAgreement && $options.toggleAgreement(...args)),
  51. c: common_vendor.o($options.onVoiceCheckComplete),
  52. d: common_vendor.p({
  53. visible: $data.showVoiceCheck
  54. }),
  55. e: !$data.isAgreed,
  56. f: common_vendor.o((...args) => $options.startInterview && $options.startInterview(...args))
  57. };
  58. }
  59. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  60. wx.createPage(MiniProgramPage);