mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-24 14:04:07 +08:00
fix relative urls
This commit is contained in:
parent
ca775a2809
commit
f11070dcf0
@ -82,17 +82,6 @@ class Http
|
||||
return self::getBaseUrl().$_SERVER["REQUEST_URI"];
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate absolute url according to relative one
|
||||
*
|
||||
* @param string $relative
|
||||
* @return string
|
||||
*/
|
||||
public static function urlTo($relative)
|
||||
{
|
||||
return Option::get('site_url').$relative;
|
||||
}
|
||||
|
||||
public static function abort($code, $msg = "Something happened.", $is_json = false)
|
||||
{
|
||||
http_response_code((int)$code);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="item" tid="{{ $texture['tid'] }}">
|
||||
<div class="item-body">
|
||||
<img src="{{ Http::urlTo('/preview/'.$texture['tid'].'.png') }}">
|
||||
<img src="{{ url('preview/'.$texture['tid'].'.png') }}">
|
||||
</div>
|
||||
|
||||
<div class="item-footer">
|
||||
@ -9,7 +9,7 @@
|
||||
</p>
|
||||
|
||||
|
||||
@if (session()->has('uid'))
|
||||
@if (Session::has('uid'))
|
||||
|
||||
@if ($user->closet->has($texture['tid']))
|
||||
<a title="从衣柜中移除" class="more like liked" tid="{{ $texture['tid'] }}" href="javascript:removeFromCloset({{ $texture['tid'] }});" data-placement="top" data-toggle="tooltip"><i class="fa fa-heart"></i></a>
|
||||
|
@ -75,7 +75,7 @@
|
||||
<!-- Navbar Right Menu -->
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{{ Http::urlTo('/skinlib/upload') }}"><i class="fa fa-upload" aria-hidden="true"></i> 上传新皮肤</a></li>
|
||||
<li><a href="{{ url('skinlib/upload') }}"><i class="fa fa-upload" aria-hidden="true"></i> 上传新皮肤</a></li>
|
||||
@if (!is_null($user))
|
||||
<!-- User Account Menu -->
|
||||
<li class="dropdown user user-menu">
|
||||
|
Loading…
Reference in New Issue
Block a user