jm-expense-vue-ts/assets/index.6b72a0c0.js

2 lines
15 KiB
JavaScript
Raw Permalink Normal View History

2022-04-24 05:11:48 +00:00
var oe=Object.defineProperty;var re=(e,t,o)=>t in e?oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var w=(e,t,o)=>(re(e,typeof t!="symbol"?t+"":t,o),o);import{S as M,a as W,d as ne,c as ae,b as ie,e as k,u as I,i as Q,f as le,r as X,o as l,g as c,h as s,j as y,w as _,F as x,k as H,t as U,l as F,n as z,m as v,p as A,q as N,s as ue,v as B,x as R,y as P,z as G,A as ce,B as de,C as q,D as J,T,E as pe,G as Y,H as me,I as _e,J as fe,N as he}from"./vendor.961f4417.js";const ge=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function o(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerpolicy&&(a.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?a.credentials="include":r.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(r){if(r.ep)return;r.ep=!0;const a=o(r);fetch(r.href,a)}};ge();const ve="modulepreload",K={},be="/jm-expense-vue-ts/",h=function(t,o){return!o||o.length===0?t():Promise.all(o.map(n=>{if(n=`${be}${n}`,n in K)return;K[n]=!0;const r=n.endsWith(".css"),a=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${a}`))return;const i=document.createElement("link");if(i.rel=r?"stylesheet":ve,r||(i.as="script",i.crossOrigin=""),i.href=n,document.head.appendChild(i),r)return new Promise((m,u)=>{i.addEventListener("load",m),i.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())};const O=M.mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:3e3}),Rt=M.mixin({showConfirmButton:!0,showCancelButton:!0}),ye="http://jm-expense-mysql.herokuapp.com",d=W.create({baseURL:ye}),we="http://linebot20220114.herokuapp.com",kt=W.create({baseURL:we});var Z={user:{firebase_email_register(e){return d.post("/user/register",e)},create(e){return d.post("/user/create",e)},edit(e,t){return d.put(`/user/edit/${e}`,t)},getAll(){return d.get("/user/all")},getUserByEmail(e){return d.get(`/user/${e}`)}},role:{getAll(){return d.get("/role/all")},getOne(e){return d.get(`/role/${e}`)},create(e){return d.post("/role/create",e)},edit(e,t){return d.put(`/role/edit/${e}`,t)},delete(e){return d.delete(`/role/delete/${e}`)}},permission:{getAll(){return d.get("/permission/all")},create(e){return d.post("/permission/create",e)},edit(e,t){return d.put(`/permission/edit/${e}`,t)},delete(e){return d.delete(`/permission/delete/${e}`)}}};const E=ne("index",{state:()=>({firebaseUser:null,currentUser:null}),getters:{nickName:e=>{var t,o;return((t=e.currentUser)==null?void 0:t.email)==="super000999888@gmail.com"?"\u8C6C\u6DB5":((o=e.currentUser)==null?void 0:o.email)==="bir840124@gmail.com"?"\u5EFA\u55B5":""},icon:e=>{var t,o;return((t=e.currentUser)==null?void 0:t.email)==="super000999888@gmail.com"?"\u{1F437}":((o=e.currentUser)==null?void 0:o.email)==="bir840124@gmail.com"?"\u{1F423}":""}},actions:{async getCurrentUser(e){try{const{data:t}=await Z.user.getUserByEmail(e);this.currentUser=t.data,console.log("[getCurrentUser] this.currentUser",this.currentUser)}catch{console.error("error")}},async login(e){this.firebaseUser=e,await this.getCurrentUser(e.email)},logout(){this.firebaseUser=null,this.currentUser=null}}}),g="/jm-expense-vue-ts",ee=[{path:"/",redirect:`${g}/`},{path:`${g}/register`,name:"Register",component:()=>h(()=>import("./Register.d935c561.js"),["assets/Register.d935c561.js","assets/Register.19cfce96.css","assets/vendor.961f4417.js","assets/logo2.e884e5c2.js"]),meta:{pageTitle:"\u8A3B\u518A\u9801",show:!1}},{path:`${g}/login`,name:"Login",component:()=>h(()=>import("./Login.75940397.js"),["assets/Login.75940397.js","assets/Login.d0192f29.css","assets/vendor.961f4417.js","assets/logo2.e884e5c2.js"]),meta:{pageTitle:"\u767B\u5165\u9801",show:!1}},{path:`${g}/`,name:"Home",co