|
|
@@ -1,5 +1,5 @@
|
|
1
|
1
|
<template>
|
|
2
|
|
- <div :style="{ backgroundImage: 'url(' + imageUrl + ')' }">
|
|
|
2
|
+ <div>
|
|
3
|
3
|
<nav class="navbar navbar-default">
|
|
4
|
4
|
<div class="container-fluid">
|
|
5
|
5
|
<div class="navbar-header">
|
|
|
@@ -52,13 +52,6 @@ export default {
|
|
52
|
52
|
imageUrl: ''
|
|
53
|
53
|
}
|
|
54
|
54
|
},
|
|
55
|
|
- async beforeMount () {
|
|
56
|
|
- const randomNum = Math.round((Math.random() * 19))
|
|
57
|
|
- this.imageUrl = await fetch('https://thingproxy.freeboard.io/fetch/https://api.flickr.com/services/feeds/photos_public.gne?format=json&tags=mountain+road&jsoncallback=?')
|
|
58
|
|
- .then(r => r.text())
|
|
59
|
|
- .then(text => JSON.parse(text.substring(1, text.length - 1)))
|
|
60
|
|
- .then(json => json.items[randomNum].link)
|
|
61
|
|
- },
|
|
62
|
55
|
methods: {
|
|
63
|
56
|
login,
|
|
64
|
57
|
logout
|