getUser() { const vm = this; vm.$loadingStore.openLoading(); return new Promise((resolve, reject) => { vm.$api.authApi.getUser().then((response) => { if (response.data.ErrorMessage) { this.$notify({ message: response.data.ErrorMessage, type: "error", }); reject("失敗"); } else { resolve(response.data); } vm.$loadingStore.closeLoading(); }); }); },
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter