jm-expense-vue-ts/assets/index.baafafcd.js

2 lines
15 KiB
JavaScript
Raw Normal View History

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