"use strict"; var common_vendor = require("../../common/vendor.js"); require("../../api/login.js"); require("../../common/request.js"); const _sfc_main = { data() { return { btnLoading: false, agree: false }; }, onLoad() { if (!this.$isLogin()) { let pages = getCurrentPages(); let url = pages[pages.length - 3]; if (pages.length > 2 && url && (url.route == "pages/auth/login" || url.route == "pages/auth/loginIndex" || url.route == "pages/common/launch")) { common_vendor.index.navigateBack({ delta: 2 }); } else { if (String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger") { const pages2 = getCurrentPages(); if (pages2.length > 1) { const url2 = pages2[pages2.length - 2]; const options = url2.options; if (options && JSON.stringify(options) != "{}") { let allurl = "/" + url2.route + common_vendor.index.$u.queryParams(options); common_vendor.index.setStorageSync("beforLoginPage", allurl); } else { common_vendor.index.setStorageSync("beforLoginPage", "/" + url2.route); } common_vendor.index.redirectTo({ url: "/pages/auth/h5WxLogin" }); } else { this.submit(); } } else { common_vendor.index.redirectTo({ url: "/pages/auth/login" }); } } } }, onShow() { if (this.$isLogin()) { common_vendor.index.reLaunch({ url: "../course/index", animationType: "none", animationDuration: 2e3 }); } }, methods: { goToWeb(index) { common_vendor.index.setStorageSync("url", index == 0 ? "https://userapp.his.cdwjyyh.com/web/userAgreement" : "https://userapp.his.cdwjyyh.com/web/privacyPolicy"); common_vendor.index.navigateTo({ url: "/pages/index/h5" }); }, handleAgree() { this.agree = !this.agree; }, submit() { this.$showLoginPage(); }, handleOtherLogin() { common_vendor.index.redirectTo({ url: "/pages/auth/login" }); }, close(val) { this.$refs.popup.close(); if (val == "agree") { this.agree = true; this.submit(); } } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: $data.btnLoading, b: $data.btnLoading, c: common_vendor.o((...args) => $options.submit && $options.submit(...args)), d: $data.btnLoading, e: common_vendor.o((...args) => $options.handleOtherLogin && $options.handleOtherLogin(...args)), f: !$data.agree, g: $data.agree, h: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args)), i: common_vendor.o(($event) => $options.goToWeb(0)), j: common_vendor.o(($event) => $options.goToWeb(1)) }; } var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5122ae47"], ["__file", "C:/Users/Administrator/Desktop/\u9879\u76EE/\u76F4\u64AD/liveH5-v3/pages/auth/loginIndex.vue"]]); wx.createPage(MiniProgramPage);