- Timestamp:
- 01/26/25 21:03:40 (3 months ago)
- Branches:
- master
- Children:
- 840887f
- Parents:
- 231918f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ReserveNGo-frontend/src/components/Project/favourite_locals.vue
r231918f rc3d3266 1 <script setup> 2 import Locale_ from '@/components/Project/Locale_.vue' 1 <script> 2 import { userStore } from '@/PiniaStores/UserStore.js' 3 export default { 4 data() { 5 return { 6 locals:[], 7 userStore_:userStore(), 8 } 9 }, 10 beforeMount() { 11 fetch(`http://localhost:8080/api/customer/favourite-locals`,{ 12 method: 'GET', 13 headers: { 14 'Authorization': this.userStore_.getToken 15 } 16 }) 17 .then(res => res.json()) 18 .then(data => this.locals = data) 19 .catch(err => console.log(err)) 20 }, 21 } 3 22 </script> 4 23 5 24 <template> 6 7 <div id="container " class="border container-xxl"> 8 9 <locale_/> 10 <locale_/> 11 <locale_/> 12 <locale_/> 13 <locale_/> 14 25 <div id="container " class="border container-xxl" v-for="local in locals" :key="local"> 26 <h3>{{local.name}}</h3> 27 <h3>{{local.address}}</h3> 15 28 </div> 16 17 29 </template> 18 30 19 <style scoped> 20 21 </style> 31 <style scoped></style>
Note:
See TracChangeset
for help on using the changeset viewer.