2016-11-07 12:53:05 +00:00
|
|
|
|
|
|
|
<template>
|
|
|
|
<div>
|
2016-11-19 21:16:26 +00:00
|
|
|
<p>{{ userAgent }}</p>
|
2016-12-16 17:12:38 +00:00
|
|
|
<p><nuxt-link to="/post">See a post (http request / Ajax)</nuxt-link></p>
|
2016-11-07 12:53:05 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2016-11-19 21:16:26 +00:00
|
|
|
data ({ req }, callback) {
|
|
|
|
setTimeout(function () {
|
|
|
|
// callback(err, data)
|
|
|
|
callback(null, {
|
|
|
|
userAgent: (req ? req.headers['user-agent'] : navigator.userAgent)
|
|
|
|
})
|
|
|
|
}, 100)
|
2016-11-07 12:53:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2016-11-07 13:12:59 +00:00
|
|
|
<style scoped>
|
2016-11-07 12:53:05 +00:00
|
|
|
p {
|
|
|
|
font-size: 20px;
|
|
|
|
text-align: center;
|
|
|
|
padding: 100px;
|
2016-11-07 13:12:59 +00:00
|
|
|
padding-bottom: 0;
|
2016-11-07 12:53:05 +00:00
|
|
|
}
|
|
|
|
</style>
|