|
|
@@ -13,18 +13,22 @@
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
|
- const res = axios.get('/users', {
|
|
|
+ const res = axios.get('/api/users', {
|
|
|
headers: {token: document.cookie.split(";")[0].split("=")[1]}
|
|
|
- })
|
|
|
+ }).then(res => {
|
|
|
+ console.log(document.cookie.split(";")[0].split("=")[1])
|
|
|
+
|
|
|
+ console.log(res)
|
|
|
|
|
|
- console.log(document.cookie.split(";")[0].split("=")[1])
|
|
|
+ name.value = res.data.result.name
|
|
|
+ tel.value = res.data.result.phone
|
|
|
+ address.value = res.data.result.address
|
|
|
+
|
|
|
+ const isCustomer = (res.data.result.role == 'CUSTOMER')
|
|
|
+ const isStaff = (res.data.result.role == 'STAFF')
|
|
|
+ })
|
|
|
|
|
|
- name.value = res.data.name
|
|
|
- tel.value = res.data.phone
|
|
|
- address.value = res.data.address
|
|
|
|
|
|
- const isCustomer = (res.data.role == 'CUSTOMER')
|
|
|
- const isStaff = (res.data.role == 'STAFF')
|
|
|
})
|
|
|
|
|
|
</script>
|