update css and update api of getting ip

pangu
PeterAlbus 2 years ago
parent 796c34c771
commit 1f701c40ec

@ -7,11 +7,6 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta data-n-head="1" data-hid="description" name="description" content=""> <meta data-n-head="1" data-hid="description" name="description" content="">
<meta data-n-head="1" data-hid="keywords" name="keywords" content=""> <meta data-n-head="1" data-hid="keywords" name="keywords" content="">
<script type="text/javascript" src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
<script>
let Ip=returnCitySN['cip']
localStorage.setItem('ipAddress', Ip)
</script>
<title>PeterAlbus的博客</title> <title>PeterAlbus的博客</title>
</head> </head>
<body> <body>

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -180,4 +180,8 @@ a {
transform: scale(0.5); transform: scale(0.5);
} }
} }
#app .music-container .aplayer .aplayer-body{
bottom: 120px;
}
</style> </style>

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2701288 */ font-family: "iconfont"; /* Project id 2701288 */
src: url('iconfont.woff2?t=1627292686407') format('woff2'), src: url('./iconfont.woff2?t=1627292686407') format('woff2'),
url('iconfont.woff?t=1627292686407') format('woff'), url('./iconfont.woff?t=1627292686407') format('woff'),
url('iconfont.ttf?t=1627292686407') format('truetype'); url('./iconfont.ttf?t=1627292686407') format('truetype');
} }
.iconfont { .iconfont {

@ -97,7 +97,16 @@ const getBlog=()=>{
.then(res=>{ .then(res=>{
blog.value=res.data; blog.value=res.data;
blog.value.blogViews+=1; blog.value.blogViews+=1;
if(!localStorage.getItem('ipAddress')||localStorage.getItem('ipAddress')=='127.0.0.1') {
axios.get('https://ip.useragentinfo.com/json')
.then((res)=>{
localStorage.setItem('ipAddress',res.data.ip||'127.0.0.1')
axios.get('/visitBlog?blogId='+blog.value.blogId+"&ipAddress="+localStorage.getItem('ipAddress')); axios.get('/visitBlog?blogId='+blog.value.blogId+"&ipAddress="+localStorage.getItem('ipAddress'));
})
}
else {
axios.get('/visitBlog?blogId='+blog.value.blogId+"&ipAddress="+localStorage.getItem('ipAddress'));
}
document.title = blog.value.blogTitle+'——PeterAlbus的博客' document.title = blog.value.blogTitle+'——PeterAlbus的博客'
let meta:any=document.querySelector('meta[name="description"]') let meta:any=document.querySelector('meta[name="description"]')
if(!meta) if(!meta)

Loading…
Cancel
Save