2 lines
827 B
JavaScript
2 lines
827 B
JavaScript
"use strict";var e=Object.defineProperty,r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,n=(r,t,o)=>t in r?e(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o,a=(e,a)=>{for(var s in a||(a={}))t.call(a,s)&&n(e,s,a[s]);if(r)for(var s of r(a))o.call(a,s)&&n(e,s,a[s]);return e};const s=require("../common/vendor.js"),l={nickname:"",avatar:"",id:null,name:"",phone:"",email:"",typeId:"",createTime:"",updateTime:"",token:"",sex:"",openid:"",isRealName:!1,isPetNursery:!1,shopLoginUser:null},i=s.defineStore("user",(()=>{const e=s.ref(a({},l)),r=s.computed((()=>""!=e.value.token));return{userInfo:e,setUserInfo:r=>{e.value=a(a({},e.value),r)},clearUserInfo:()=>{e.value=a({},l)},isLogined:r,reset:()=>{e.value=a({},l)}}}),{persist:!0});exports.useUserStore=i;
|