import { computed } from "vue";

declare interface userData {
    nickname:string,
    sex:string,
    headimgurl:string,
    expireTime:string,
    openid:string,
    phone:null|string,
    saleType:number

}
export const userData = computed(() => {
    let vuexJson = window.localStorage.getItem("vuex") || "{}"
    let userData:userData = JSON.parse(vuexJson).userData
    return userData
});