Commit b3a1bf6a authored by Le Dinh Trung's avatar Le Dinh Trung

fix products

parent ed2989c1
...@@ -362,7 +362,7 @@ export default { ...@@ -362,7 +362,7 @@ export default {
}, },
mounted () { mounted () {
this.getCategories() this.getCategories()
this.getNewProducts() // this.getNewProducts()
}, },
methods: { methods: {
getCategories () { getCategories () {
...@@ -380,23 +380,23 @@ export default { ...@@ -380,23 +380,23 @@ export default {
.catch(function (error) { .catch(function (error) {
console.log(error) console.log(error)
}) })
},
getNewProducts () {
this.$axios
.get('/guest/products/new-release/', {
headers: {
Authorization: `Bearer ${this.$auth.$storage.getUniversal(
'token'
)}`
}
})
.then((response) => {
this.product = response.data.data
})
.catch(function (error) {
console.log(error)
})
} }
// getNewProducts () {
// this.$axios
// .get('/guest/products/new-release/', {
// headers: {
// Authorization: `Bearer ${this.$auth.$storage.getUniversal(
// 'token'
// )}`
// }
// })
// .then((response) => {
// this.product = response.data.data
// })
// .catch(function (error) {
// console.log(error)
// })
// }
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment