"use strict"; var common_vendor = require("../../common/vendor.js"); require("../../api/login.js"); require("../../common/request.js"); const _sfc_main = { data() { return { userName: "", password: "", password1: "", registrationID: "", yzcode: "" }; }, onLoad(option) { let that = this; common_vendor.index.$on("getRegistrationID", function(data) { that.registrationID = data; }); this.$getRegistrationID(); }, onShow() { }, onUnload() { common_vendor.index.$off("getRegistrationID"); }, mounted() { }, methods: { login() { if (this.$isEmpty(this.userName)) { common_vendor.index.showToast({ title: "\u8BF7\u8F93\u5165\u5E10\u53F7", icon: "none" }); return; } if (this.$isEmpty(this.password)) { common_vendor.index.showToast({ title: "\u8BF7\u8F93\u5165\u5BC6\u7801", icon: "none" }); return; } var data = { userName: this.userName, password: this.password, jpushId: this.registrationID || common_vendor.index.getStorageSync("registrationID") }; common_vendor.index.showLoading({ title: "\u5904\u7406\u4E2D..." }); login(data).then((res) => { common_vendor.index.hideLoading(); if (res.code == 200) { common_vendor.index.setStorageSync("AppToken", res.data.token); this.$Router.pushTab({ name: "home" }); } else { common_vendor.index.showToast({ title: res.msg, icon: "none" }); } }, (rej) => { }); }, goToRegister() { this.$navTo("./register"); }, goToFindPass() { this.$navTo("./findPass"); }, getRegistrationID() { } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: $data.userName, b: common_vendor.o(($event) => $data.userName = $event.detail.value), c: $data.password, d: common_vendor.o(($event) => $data.password = $event.detail.value), e: $data.yzcode, f: common_vendor.o(($event) => $data.yzcode = $event.detail.value), g: common_vendor.o((...args) => $options.login && $options.login(...args)) }; } var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "C:/Users/Administrator/Desktop/\u9879\u76EE/\u76F4\u64AD/liveH5-v3/pages/auth/findpass.vue"]]); wx.createPage(MiniProgramPage);