| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- "use strict";
- var common_vendor = require("../common/vendor.js");
- var api_companyUser = require("../api/companyUser.js");
- require("../common/request.js");
- const _sfc_main = {
- data() {
- return {
- form: {
- userName: null,
- password: null
- }
- };
- },
- computed: {},
- onLoad() {
- },
- onHide() {
- },
- onUnload() {
- },
- mounted() {
- },
- methods: {
- submit() {
- api_companyUser.login(this.form).then((res) => {
- if (res.code == 200) {
- common_vendor.index.showToast({
- icon: "success",
- title: "\u767B\u5F55\u6210\u529F"
- });
- common_vendor.index.setStorageSync("companyId", res.user.companyId);
- common_vendor.index.setStorageSync("companyUserId", res.user.userId);
- common_vendor.index.setStorageSync("CompanyUserToken", res.companyUserToken);
- common_vendor.index.redirectTo({
- url: "/pages_company/index"
- });
- } else {
- common_vendor.index.showToast({
- icon: "none",
- title: res.msg
- });
- }
- }, (rej) => {
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: $data.form.userName,
- b: common_vendor.o(($event) => $data.form.userName = $event.detail.value),
- c: $data.form.password,
- d: common_vendor.o(($event) => $data.form.password = $event.detail.value),
- e: common_vendor.o(($event) => $options.submit())
- };
- }
- var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_company/login.vue"]]);
- wx.createPage(MiniProgramPage);
|