123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- require("../../api/login.js");
- const common_assets = require("../../common/assets.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",
- //url: '../course/video/living-app',
- 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;
- },
- // login
- 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: common_assets._imports_0$7,
- g: !$data.agree,
- h: common_assets._imports_1$4,
- i: $data.agree,
- j: common_vendor.o((...args) => $options.handleAgree && $options.handleAgree(...args)),
- k: common_vendor.o(($event) => $options.goToWeb(0)),
- l: common_vendor.o(($event) => $options.goToWeb(1))
- };
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-648b5fa7"]]);
- wx.createPage(MiniProgramPage);
|