mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改微信图文摘要处理
This commit is contained in:
parent
f6e74cc7b7
commit
1ec81ef2df
@ -109,7 +109,7 @@ class News extends BasicAdmin {
|
||||
foreach ($data as &$vo) {
|
||||
$vo['create_by'] = session('user.id');
|
||||
$vo['create_at'] = date('Y-m-d H:i:s');
|
||||
$vo['digest'] = empty($vo['digest']) ? mb_substr(strip_tags($vo['content']), 0, 120) : $vo['digest'];
|
||||
$vo['digest'] = empty($vo['digest']) ? mb_substr(strip_tags(str_replace(["\s", ' '], '', $vo['content'])), 0, 120) : $vo['digest'];
|
||||
if (empty($vo['id'])) {
|
||||
$result = $id = Db::name('WechatNewsArticle')->insertGetId($vo);
|
||||
} else {
|
||||
|
@ -83,7 +83,7 @@
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<label style="color:#aaa">摘要选填,如果不填写会默认抓取正文前54个字</label>
|
||||
<textarea name="digest" class="layui-input" style="height:80px;resize:none;"></textarea>
|
||||
<textarea name="digest" class="layui-input" style="height:80px;resize:none;line-height:20px"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
Loading…
x
Reference in New Issue
Block a user