mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-12-08 19:56:56 +08:00
[更新]修改微信图文
This commit is contained in:
parent
da511affc1
commit
b7f11237c6
@ -160,22 +160,17 @@ class News extends BasicAdmin {
|
|||||||
*/
|
*/
|
||||||
public function push() {
|
public function push() {
|
||||||
# 获取将要推送的粉丝列表
|
# 获取将要推送的粉丝列表
|
||||||
$params = $this->request->post('group', '');
|
|
||||||
$ids = explode(',', $params);
|
|
||||||
$fansDb = Db::name('WechatFans');
|
|
||||||
$news_id = $this->request->get('id', '');
|
|
||||||
switch (strtolower($this->request->get('action', ''))) {
|
switch (strtolower($this->request->get('action', ''))) {
|
||||||
case 'getgroup':
|
|
||||||
if (!in_array('0', $ids)) {
|
|
||||||
$fansDb->where("concat(',',tagid_list,',') REGEXP '," . join(',|,', $ids) . ",'");
|
|
||||||
}
|
|
||||||
return ['code' => "SUCCESS", 'data' => $fansDb->where('subscribe', '1')->column('openid,nickname')];
|
|
||||||
case 'getuser':
|
case 'getuser':
|
||||||
if (!in_array('0', $ids)) {
|
if ('' === ($params = $this->request->post('group', ''))) {
|
||||||
$fansDb->where("concat(',',tagid_list,',') REGEXP '," . join(',|,', $ids) . ",'");
|
return ['code' => 'SUCCESS', 'data' => []];
|
||||||
}
|
}
|
||||||
return ['code' => "SUCCESS", 'data' => $fansDb->where('subscribe', '1')->column('openid,nickname')];
|
$ids = explode(',', $params);
|
||||||
|
$db = Db::name('WechatFans');
|
||||||
|
!in_array('0', $ids) && $db->where("concat(',',tagid_list,',') REGEXP '," . join(',|,', $ids) . ",'");
|
||||||
|
return ['code' => "SUCCESS", 'data' => $db->where('subscribe', '1')->limit(200)->column('nickname')];
|
||||||
default :
|
default :
|
||||||
|
$news_id = $this->request->get('id', '');
|
||||||
// 显示及图文
|
// 显示及图文
|
||||||
$newsinfo = WechatService::getNewsById($news_id);
|
$newsinfo = WechatService::getNewsById($news_id);
|
||||||
// Get 请求,显示选择器界面
|
// Get 请求,显示选择器界面
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<div class="list-item">
|
<div class="list-item">
|
||||||
|
|
||||||
{foreach $fans_tags as $tag}
|
{foreach $fans_tags as $tag}
|
||||||
<label class="cuci-lable">
|
<label class='control-label layui-form-label' style='text-align:left!important'>
|
||||||
<input name="fans_tags[]" value='{$tag.id}' type="checkbox"/> {$tag.name} ({$tag.count})
|
<input name="fans_tags[]" value='{$tag.id}' type="checkbox"/> {$tag.name} ({$tag.count})
|
||||||
</label>
|
</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
@ -26,15 +26,13 @@
|
|||||||
{literal}
|
{literal}
|
||||||
<script id="push" type="text/template">
|
<script id="push" type="text/template">
|
||||||
{{if data}}
|
{{if data}}
|
||||||
{{each data as value}}
|
{{each data as value key}}
|
||||||
<label class="cuci-lable">
|
{{if key <= 200 }}
|
||||||
{{value.nickname}}
|
<label>{{value}}</label>
|
||||||
</label>
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{if (data.length > 199)}}
|
{{if (data.length > 200)}}
|
||||||
<label class="cuci-lable">
|
<label>...</label>
|
||||||
...
|
|
||||||
</label>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<h5></h5>
|
<h5></h5>
|
||||||
@ -97,6 +95,7 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
body { min-width: 500px }
|
body { min-width: 500px }
|
||||||
|
#push-tags{height:300px;overflow:auto}
|
||||||
.bottom-btn { display: block; background: #F7F7F7; padding: 10px; position: absolute; position: fixed; bottom: 0; width: 100% }
|
.bottom-btn { display: block; background: #F7F7F7; padding: 10px; position: absolute; position: fixed; bottom: 0; width: 100% }
|
||||||
.news-container { width: 200px; padding-right: 8px }
|
.news-container { width: 200px; padding-right: 8px }
|
||||||
.list-container { width: 578px; padding-right: 8px; padding-left: 0 }
|
.list-container { width: 578px; padding-right: 8px; padding-left: 0 }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user