mirror of https://github.com/1099438829/apeblog
修正文章编辑摘要获取和一些小细节
This commit is contained in:
parent
51902c2b0e
commit
6343c7af63
|
|
@ -137,6 +137,7 @@ class Advert extends AuthController
|
|||
if ($data['url'] == "") return app("json")->fail("链接地址不能为空");
|
||||
if (is_array($data['cover_path'])) $data['cover_path'] = $data['cover_path'][0];
|
||||
$data['user_id'] = $this->adminId;//默认修改你
|
||||
if (filter_var($data['url'], FILTER_VALIDATE_URL) === false) return app("json")->fail("链接地址不合法");
|
||||
if ($id == "") {
|
||||
//判断下用户是否存在
|
||||
$info = aModel::where('url', $data['url'])->find();
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class Article extends AuthController
|
|||
$content = $data['content'];
|
||||
}
|
||||
//判断摘要是否为空,为空则从内容摘取
|
||||
$data['abstract'] = $data['abstract'] ?: mb_substr($content, 0, 100);
|
||||
$data['abstract'] = $data['abstract'] ?: mb_substr(strip_tags($content), 0, 100);
|
||||
unset($data['content']);
|
||||
if ($data['is_recommend']) $data['is_recommend'] = 1;
|
||||
if ($data['is_hot']) $data['is_hot'] = 1;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,15 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><h4>搜索</h4></div>
|
||||
<div class="card-header">
|
||||
<h4>搜索</h4>
|
||||
<ul class="card-actions">
|
||||
<li>
|
||||
<button type="button" data-toggle="tooltip" title="" data-original-title="返回"
|
||||
onclick="history.back(-1);return false;"><i class="mdi mdi-undo"></i></button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-inline searchForm" onsubmit="return false;">
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -23,25 +23,21 @@
|
|||
<div class="form-group col-md-12">
|
||||
<label>文章名称</label>
|
||||
<input type="hidden" name="id" value="{$info.id}">
|
||||
<input type="text" class="form-control" id="title" name="title" placeholder="文章名称"
|
||||
value="{$info.title}"/>
|
||||
<input type="text" class="form-control" id="title" name="title" placeholder="文章名称" value="{$info.title}"/>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="category_id">栏目分类</label>
|
||||
<div class="form-controls">
|
||||
<select name="category_id" id="category_id" class="form-control">
|
||||
<option value="0">请选择</option>
|
||||
{volist name="category" id="vo"}
|
||||
<option value="{$vo.id}" {if $vo.id== $info.category_id}selected{
|
||||
/if}>{$vo.html}{$vo.title}</option>
|
||||
<option value="{$vo.id}" {if $vo.id == $info.category_id}selected{/if}>{$vo.html}{$vo.title}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="author">作者</label>
|
||||
<input type="text" class="form-control" id="author" name="author" placeholder="原作者"
|
||||
value="{$info.author}"/>
|
||||
<input type="text" class="form-control" id="author" name="author" placeholder="原作者" value="{$info.author}"/>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label>主图</label>
|
||||
|
|
@ -134,15 +130,6 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row col-md-2">
|
||||
<div class="col-xs-6">显示</div>
|
||||
<div class="col-xs-6">
|
||||
<label class="lyear-switch switch-solid switch-primary">
|
||||
<input type="checkbox" name="display" {if $info.is_top}checked{/if}>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="abstract">排序</label>
|
||||
<input type="text" class="form-control" name="sort" placeholder="请输入排序"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -2061,7 +2061,8 @@ fieldset[disabled] .btn-dark:hover {
|
|||
-webkit-box-pack: justify;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.btn-group-justified .btn {
|
||||
.btn-group-justified .btn,
|
||||
.btn-group-justified .btn-group {
|
||||
width: 100%;
|
||||
}
|
||||
.btn-group-round .btn:first-child {
|
||||
|
|
|
|||
|
|
@ -324,11 +324,11 @@ if (typeof jQuery === "undefined") {
|
|||
var navTabParam = $navTab.length ? self._getParam($navTab) : {};
|
||||
//change storage active status
|
||||
var storage = self._storage();
|
||||
if (storage[prevNavTabParam.id]) {
|
||||
storage[prevNavTabParam.id].active = false;
|
||||
if (storage[prevNavTabParam.did]) {
|
||||
storage[prevNavTabParam.did].active = false;
|
||||
}
|
||||
if (storage[navTabParam.id]) {
|
||||
storage[navTabParam.id].active = true;
|
||||
if (storage[navTabParam.did]) {
|
||||
storage[navTabParam.did].active = true;
|
||||
}
|
||||
self._resetStorage(storage);
|
||||
//active navTab and tabPane
|
||||
|
|
@ -653,12 +653,17 @@ if (typeof jQuery === "undefined") {
|
|||
$el = self.$element,
|
||||
options = self.options,
|
||||
storage, init = options.init,
|
||||
param;
|
||||
param,
|
||||
tempParam;
|
||||
if (supportStorage(options.cache)) {
|
||||
storage = self._storage();
|
||||
self._resetStorage({});
|
||||
$.each(storage, function (k, v) {
|
||||
self.create(v, false);
|
||||
if (v.active) {
|
||||
tempParam = self._getParam(v);
|
||||
self._exist(tempParam).click();
|
||||
}
|
||||
})
|
||||
}
|
||||
if ($.isEmptyObject(storage)) {
|
||||
|
|
@ -971,6 +976,7 @@ if (typeof jQuery === "undefined") {
|
|||
if (!param) {
|
||||
return storage[key];
|
||||
}
|
||||
tabIndex = Object.keys(storage).length;
|
||||
storage[key] = param;
|
||||
sessionStorage.multitabs = JSON.stringify(storage);
|
||||
return storage;
|
||||
|
|
|
|||
Loading…
Reference in New Issue