jm-expense-vue-ts/assets/index.05ca804e.js

2 lines
15 KiB
JavaScript
Raw Normal View History

2022-04-16 13:28:48 +00:00
var ne=Object.defineProperty;var ae=(e,t,o)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var w=(e,t,o)=>(ae(e,typeof t!="symbol"?t+"":t,o),o);import{S as Q,a as X,d as ie,c as le,b as ue,e as k,u as I,i as Y,f as ce,r as Z,o as l,g as c,h as s,j as y,w as _,F as x,k as G,t as U,l as F,n as q,m as v,p as A,q as N,s as de,v as B,x as R,y as P,z as J,A as pe,B as me,C as K,D as M,T,E as _e,G as ee,H as fe,I as he,J as ge,N as ve}from"./vendor.961f4417.js";const be=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)}};be();const ye="modulepreload",W={},we="/",h=function(t,o){return!o||o.length===0?t():Promise.all(o.map(n=>{if(n=`${we}${n}`,n in W)return;W[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":ye,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=Q.mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:3e3}),Et=Q.mixin({showConfirmButton:!0,showCancelButton:!0}),Ue="http://jm-expense-mysql.herokuapp.com",d=X.create({baseURL:Ue}),$e="http://linebot20220114.herokuapp.com",Lt=X.create({baseURL:$e});var te={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=ie("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 te.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",se=[{path:"/",redirect:`${g}/`},{path:`${g}/register`,name:"Register",component:()=>h(()=>import("./Register.d331bd41.js"),["assets/Register.d331bd41.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.7fcb4650.js"),["assets/Login.7fcb4650.js","assets/Login.d0192f29.css","assets/vendor.961f4417.js","assets/logo2.e884e5c2.js"]),meta:{pageTitle:"\u767B\u5165\u9801",show:!1}},{path:`${g}/`,name:"Home",component:()=>h((