feat: 文章支持链接跳转
parent
d13999c12b
commit
07c636dcdb
|
@ -58,6 +58,10 @@ class Djqt extends Base
|
|||
return $this->error('无此文章');
|
||||
}
|
||||
|
||||
if (!empty($article['link'])) {
|
||||
return $this->redirect($article['link']);
|
||||
}
|
||||
|
||||
$category = Category::where('id', $article['category_id'])->find();
|
||||
$parentCategory = Category::where('id', $category['parent_id'])->find();
|
||||
|
||||
|
|
|
@ -154,6 +154,10 @@ class Info extends Base
|
|||
return $this->error('无此文章');
|
||||
}
|
||||
|
||||
if (!empty($article['link'])) {
|
||||
return $this->redirect($article['link']);
|
||||
}
|
||||
|
||||
$category = Category::where('id', $article['category_id'])->find();
|
||||
$parentCategory = Category::where('id', $category['parent_id'])->find();
|
||||
|
||||
|
|
|
@ -58,6 +58,10 @@ class Ljct extends Base
|
|||
return $this->error('无此文章');
|
||||
}
|
||||
|
||||
if (!empty($article['link'])) {
|
||||
return $this->redirect($article['link']);
|
||||
}
|
||||
|
||||
$category = Category::where('id', $article['category_id'])->find();
|
||||
$parentCategory = Category::where('id', $category['parent_id'])->find();
|
||||
|
||||
|
|
|
@ -66,6 +66,10 @@ class News extends Base
|
|||
return $this->error('无此文章');
|
||||
}
|
||||
|
||||
if (!empty($article['link'])) {
|
||||
return $this->redirect($article['link']);
|
||||
}
|
||||
|
||||
$category = Category::where('id', $article['category_id'])->find();
|
||||
$parentCategory = Category::where('id', $category['parent_id'])->find();
|
||||
|
||||
|
|
|
@ -117,15 +117,15 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- <div class="layui-form-itemBox2 between">-->
|
||||
<!-- <div class="layui-form-item">-->
|
||||
<!-- <label class="layui-form-label">链接</label>-->
|
||||
<!-- <div class="layui-input-block">-->
|
||||
<!-- <input type="text" class="layui-input" name="item[link]" value="" maxlength="250"/>-->
|
||||
<!-- <div class="layui-form-mid layui-word-aux">注:设置了链接则优先跳转到链接页面。非站内链接请以http://或者https://开头</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="layui-form-itemBox2 between">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">链接</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="item[link]" value="" maxlength="250"/>
|
||||
<div class="layui-form-mid layui-word-aux">注:设置了链接则优先跳转到链接页面。非站内链接请以http://或者https://开头</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if !empty($attributeList)}
|
||||
<div class="layui-form-item hidden">
|
||||
|
|
|
@ -120,15 +120,15 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- <div class="layui-form-itemBox3 between">-->
|
||||
<!-- <div class="layui-form-item">-->
|
||||
<!-- <label class="layui-form-label">链接</label>-->
|
||||
<!-- <div class="layui-input-block">-->
|
||||
<!-- <input type="text" class="layui-input" name="item[link]" value="{$item.link??''}" maxlength="250"/>-->
|
||||
<!-- <div class="layui-form-mid layui-word-aux">注:设置了链接则优先跳转到链接页面。非站内链接请以http://或者https://开头</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="layui-form-itemBox3 between">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">链接</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="item[link]" value="{$item.link??''}" maxlength="250"/>
|
||||
<div class="layui-form-mid layui-word-aux">注:设置了链接则优先跳转到链接页面。非站内链接请以http://或者https://开头</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if !empty($attributeList)}
|
||||
<div class="layui-form-item hidden">
|
||||
|
|
Loading…
Reference in New Issue