mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
feat: 增加平台信息跳转
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace app\admin\controller;
|
namespace app\admin\controller;
|
||||||
|
|
||||||
|
use app\model\Nav;
|
||||||
use app\model\Post as ModelPost;
|
use app\model\Post as ModelPost;
|
||||||
use app\model\PostCategory;
|
use app\model\PostCategory;
|
||||||
use app\model\PostTag;
|
use app\model\PostTag;
|
||||||
@@ -76,6 +77,9 @@ class Post extends Common
|
|||||||
$model_post->platform_status_title = ModelPost::LIST_POST_PLATFORM_STATUS[$model_post->platform_status];
|
$model_post->platform_status_title = ModelPost::LIST_POST_PLATFORM_STATUS[$model_post->platform_status];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$platform_data = item_post_platform($platform_type);
|
||||||
|
|
||||||
|
View::assign('platform_data', $platform_data);
|
||||||
View::assign('list', $list);
|
View::assign('list', $list);
|
||||||
View::assign('platform_type', $platform_type);
|
View::assign('platform_type', $platform_type);
|
||||||
|
|
||||||
|
|||||||
@@ -332,3 +332,16 @@ function list_post_platform()
|
|||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function item_post_platform($id)
|
||||||
|
{
|
||||||
|
$item = Nav::where('id', $id)->where('type', 12)->where('status',1)->cache(30)->find();
|
||||||
|
if (!empty($item)) {
|
||||||
|
$desc = $item->desc;
|
||||||
|
$desc_arr = explode(PHP_EOL, $desc);
|
||||||
|
$item->home_url = $desc_arr[0]?? '';
|
||||||
|
$item->account = $desc_arr[1]?? '';
|
||||||
|
|
||||||
|
}
|
||||||
|
return $item;
|
||||||
|
}
|
||||||
|
|||||||
@@ -121,3 +121,54 @@
|
|||||||
list-style: inherit;
|
list-style: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.ul-nav-card-item {
|
||||||
|
padding: 0 15px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 6px;
|
||||||
|
height: 82px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ul-nav-card-item-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ul-nav-card-item-icon {
|
||||||
|
font-size: 28px;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 5px;
|
||||||
|
line-height: 50px;
|
||||||
|
text-align: center;
|
||||||
|
background: #2E4158;
|
||||||
|
display: inline-block;
|
||||||
|
color: #fff;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ul-nav-card-item-info {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ul-nav-card-item-title {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #253647;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ul-nav-card-item-desc {
|
||||||
|
color: #666;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ul-nav-card-item.disabled .ul-nav-card-item-icon {
|
||||||
|
background-color: #908b8b;
|
||||||
|
}
|
||||||
|
|||||||
@@ -37,6 +37,26 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<div>
|
<div>
|
||||||
|
<div class="ul-nav-card ul-nav-card-simple">
|
||||||
|
<div class="ul-nav-card-item">
|
||||||
|
<div class="ul-nav-card-item-left">
|
||||||
|
<div class="ul-nav-card-item-icon layui-icon layui-icon-home">
|
||||||
|
</div>
|
||||||
|
<div class="ul-nav-card-item-info">
|
||||||
|
<div class="ul-nav-card-item-title">
|
||||||
|
{$platform_data.title}
|
||||||
|
</div>
|
||||||
|
<div class="ul-nav-card-item-desc">
|
||||||
|
<span>平台: <a target="platform_{$platform_data.id}" href="{$platform_data.value}">{$platform_data.value}</a></span>
|
||||||
|
<span>主页: <a target="home_{$platform_data.id}" href="{$platform_data.home_url}">{$platform_data.home_url}</a></span>
|
||||||
|
<span>账号: {$platform_data.account}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ul-nav-card-item-right">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-tab layui-tab-brief">
|
<div class="layui-tab layui-tab-brief">
|
||||||
<ul class="layui-tab-title">
|
<ul class="layui-tab-title">
|
||||||
<li class="platform-status-">
|
<li class="platform-status-">
|
||||||
|
|||||||
Reference in New Issue
Block a user