修改公众号管理

This commit is contained in:
Anyon 2019-12-14 14:25:09 +08:00
parent 29742fec2f
commit cd58494c48
11 changed files with 46 additions and 18 deletions

View File

@ -145,6 +145,7 @@ class Keys extends Controller
/**
* 配置关注回复
* @auth true
* @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
@ -159,6 +160,7 @@ class Keys extends Controller
/**
* 配置默认回复
* @auth true
* @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
@ -178,7 +180,7 @@ class Keys extends Controller
{
if ($this->request->isPost() && isset($data['keys'])) {
$db = $this->app->db->name($this->table)->where('keys', $data['keys']);
empty($data['id']) || $db->where('id', 'neq', $data['id']);
empty($data['id']) || $db->where('id', '<>', $data['id']);
if ($db->count() > 0) {
$this->error('关键字已经存在,请使用其它关键字!');
}

View File

@ -29,13 +29,13 @@ class Review extends Controller
* 图文展示
* @param integer $id 图文ID
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function news($id = 0)
{
$this->id = empty($id) ? input('id') : $id;
$this->news = MediaService::news($this->id);
$this->news = MediaService::instance()->news($this->id);
$this->fetch();
}
@ -49,7 +49,9 @@ class Review extends Controller
public function view($id = 0)
{
$where = ['id' => empty($id) ? input('id') : $id];
$this->app->db->name('WechatNewsArticle')->where($where)->update(['read_num' => $this->app->db->raw('read_num+1')]);
$this->app->db->name('WechatNewsArticle')->where($where)->update([
'read_num' => $this->app->db->raw('read_num+1')
]);
$this->info = $this->app->db->name('WechatNewsArticle')->where($where)->find();
$this->fetch();
}

View File

@ -1,4 +1,4 @@
{extend name='wechat@api/review/main'}
{extend name='api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>

View File

@ -1,4 +1,4 @@
{extend name='wechat@api/review/main'}
{extend name='api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>

View File

@ -1,4 +1,4 @@
{extend name='wechat@api/review/main'}
{extend name='api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>

View File

@ -1,4 +1,4 @@
{extend name='wechat@api/review/main'}
{extend name='api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>

View File

@ -1,4 +1,4 @@
{extend name='wechat@api/review/main'}
{extend name='api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>

View File

@ -1,4 +1,4 @@
{extend name='wechat@api/review/main'}
{extend name='api/review/main'}
{block name='title'}{/block}

View File

@ -1,4 +1,4 @@
{extend name='wechat@api/review/main'}
{extend name='api/review/main'}
{block name='content'}
<div class="header"><span>{:date('H:i')}</span></div>

View File

@ -1,11 +1,35 @@
{extend name='admin@main'}
{extend name="../../admin/view/main"}
{block name="style"}
<style>
.keys-container .input-group-addon{top:0;right:0;color:#eee;width:25px;padding:7px;position:absolute;margin-top:-1px;text-align:center;background:#393D49}
.keys-container [data-tips-image]{width:112px;height:auto}
.keys-container .layui-card{width:580px;height:578px;position:absolute;border:1px solid #ccc}
.keys-container .layui-card .layui-card-body{height:515px;padding-right:50px}
.keys-container .input-group-addon {
top: 0;
right: 0;
color: #eee;
width: 25px;
padding: 7px;
position: absolute;
margin-top: -1px;
text-align: center;
background: #393D49
}
.keys-container [data-tips-image] {
width: 112px;
height: auto
}
.keys-container .layui-card {
width: 580px;
height: 578px;
position: absolute;
border: 1px solid #ccc
}
.keys-container .layui-card .layui-card-body {
height: 515px;
padding-right: 50px
}
</style>
{/block}

View File

@ -4,7 +4,7 @@
<div class="layui-form-item layui-inline">
<label class="layui-form-label">匹配规则</label>
<div class="layui-input-inline">
<input name="keys" value="{$Think.get.keys|default=''}" placeholder="请输入匹配规则" class="layui-input">
<input name="keys" value="{:input('keys','')}" placeholder="请输入匹配规则" class="layui-input">
</div>
</div>
<div class="layui-form-item layui-inline">
@ -39,7 +39,7 @@
<div class="layui-form-item layui-inline">
<label class="layui-form-label">创建时间</label>
<div class="layui-input-inline">
<input data-date-range name="create_at" value="{$Think.get.create_at|default=''}" placeholder="请选择创建时间" class="layui-input">
<input data-date-range name="create_at" value="{:input('create_at','')}" placeholder="请选择创建时间" class="layui-input">
</div>
</div>
<div class="layui-form-item layui-inline">