Commit cf1e53a7 authored by clone's avatar clone

Merge branch 'wx0604' of https://gitee.com/zwyjjc/tl_estate into wx0604

parents 66cb624e e04dcd6f
......@@ -138,6 +138,19 @@ class PushMessageService
return ;
}
/**
* 推送全部人员,带跳转。
*
* @param string $title
* @param string $content
* @param string $url
*/
public function pushAll(string $title = '', string $content = '', string $url = '') {
$url = $this->push->http_host(). '/'. $url;
$this->push->push_message_for_all($title, $content, $url);
return ;
}
/**
* 普通消息推送
*
......
......@@ -102,8 +102,8 @@ class Agent extends Basic
$data['list'] = $table->getListJoin($pageNo, $pageSize,$order,$field,$join, $where);
foreach ($data['list'] as $k=>$v) {
//$data['list'][$k]['agent_img'] = $v['img'] ? AGENTHEADERIMGURL . $v['img'] : '' ; //https://pre2.tonglianjituan.com/static/user_header/20180615/6528100f422ffa6f7d1cb1293c1eaaed.jpg
$data['list'][$k]['agent_img'] = 'https://pre2.tonglianjituan.com/static/user_header/20180615/6528100f422ffa6f7d1cb1293c1eaaed.jpg' ;
$data['list'][$k]['agent_img'] = $v['img'] ? AGENTHEADERIMGURL . $v['img'] : '' ;
//$data['list'][$k]['agent_img'] = 'https://pre2.tonglianjituan.com/static/user_header/20180615/6528100f422ffa6f7d1cb1293c1eaaed.jpg' ;
}
$data['total'] = $table->getTotal2($join,$where);
return $this->response(200,'成功',$data);
......
......@@ -9,6 +9,7 @@
namespace app\index\controller;
use app\api_broker\service\PushMessageService;
use app\index\extend\Basic;
use app\model\PushFeed;
use think\Request;
......@@ -85,11 +86,14 @@ class Notice extends Basic
$data['steel_phone'] = 0;
$data['type'] = 1;
$num = $this->m_push->editData($data);
if ($num < 1) {
return $this->response(101, '新增公告失败!');
}
$service_push = new PushMessageService();
$url = 'app/dist/index.html#/announcementDetails?id='.$this->m_push->id;
$service_push->pushAll($data['title'], $data['content'], $url);
return $this->response(200, '新增成功!');
}
......
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="agent" />
<!--关联经纪人列表liudanjs文件-->
<style>
.J_preview{
width: 30px;
height: 30px;
border-radius: 15px;
}
</style>
<div id="page-content-wrapper">
<div class="container">
<div class="row">
......@@ -47,6 +53,7 @@
<tr>
<th>注册时间</th>
<th>用户ID</th>
<th>用户头像</th>
<th>姓名</th>
<th>手机号</th>
<th>角色</th>
......
define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagination', 'bootstrapJs'], function (doT, template) {
define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagination', 'bootstrapJs','ckfinder', 'ckfinderStart', 'blow-up'], function (doT, template) {
var agent = {
pageNo : 1,
pageSize : 15,
......@@ -246,7 +246,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
params.groupname = $("input[name='groupname']").val();
params.store_name = $("input[name='store_name']").val();
$.ajax({
url: '/index/AgentList.html',
url: '/index/AgentList',
type: 'GET',
async: true,
data: params,
......@@ -257,6 +257,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$("#agentlist").html(doTempl(data.data.list));
/*分页代码*/
add_page(data.data.total, pageNo, agent.pageSize, agent.getList);
$ ('.J_preview').preview ();
}
})
},
......
......@@ -4,6 +4,11 @@
<tr data-groupname="[%= it[item]['groupname'] %]">
<td>[%= it[item]["create_time"] %]</td>
<td>[%= it[item]["id"] %]</td>
<td>
<input type="hidden" value='[%= it[item]["agent_img"] %]'>
<img src='[%= it[item]["agent_img"] %]' class="diagram-image J_preview"
data-bimg='[%= it[item]["agent_img"] %]'>
</td>
<td>[%= it[item]["name"] %]</td>
<td>[%= it[item]["phone"] %]</td>
<td>[%= it[item]["groupname"] %]</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment