Commit 61e69319 by 孙龙

批量发送消息

parent 3ce0882a
...@@ -584,7 +584,7 @@ class MessageApiController extends Controller ...@@ -584,7 +584,7 @@ class MessageApiController extends Controller
if(count($_params) != count($title)-1) throw new \Exception(sprintf("第%s行参数不一致",$key+1)); if(count($_params) != count($title)-1) throw new \Exception(sprintf("第%s行参数不一致",$key+1));
foreach($_params as $kk=>$vv){ foreach($_params as $kk=>$vv){
if(!$vv) break; if(!$vv) break;
$params[array_get($title,$kk)] = strval($vv); $params[array_get($title,$kk)] = strval(trim($vv));
} }
if(!$touser) throw new \Exception('接收者不能为空'); if(!$touser) throw new \Exception('接收者不能为空');
if(count($params) <= 0) throw new \Exception('没找到对应参数'); if(count($params) <= 0) throw new \Exception('没找到对应参数');
...@@ -594,7 +594,7 @@ class MessageApiController extends Controller ...@@ -594,7 +594,7 @@ class MessageApiController extends Controller
$_data['template_id'] = $info->tpl_id; $_data['template_id'] = $info->tpl_id;
$_data['keyword'] = $info->description; $_data['keyword'] = $info->description;
$_data['channel_type'] = $info->channels; $_data['channel_type'] = $info->channels;
$_data['touser'] = strval($touser); $_data['touser'] = strval(trim($touser));
$_data['data'] = $params; $_data['data'] = $params;
$_data['url'] = ''; $_data['url'] = '';
$_data['wechat_data'] = null; $_data['wechat_data'] = null;
......
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
<tbody> <tbody>
<tr> <tr>
<td>批量发送站内信</td> <td>批量发送站内信</td>
<td></td> <td>站内</td>
<td>其它</td> <td>其它</td>
<td>展会活动</td> <td>展会活动</td>
<td><a class="layui-btn" href="/export/zhanneixin.xls">下载</a></td> <td><a class="layui-btn" href="/export/zhanneixin.xls">下载</a></td>
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
<td colspan="4"> <td colspan="4">
<div><span style="color: #ff0000">备注:</span></div> <div><span style="color: #ff0000">备注:</span></div>
<div> <div>
列字段:[1:会员账号] [2:京东卡余额] [3:卡号] [4:卡密] 列字段:[1:会员ID(消息接收者)] [2:京东卡余额(消息模板字段)] [3:卡号(消息模板字段)] [4:卡密(消息模板字段)]
</div> </div>
</td> </td>
</tr> </tr>
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<tr> <tr>
<td colspan="4"> <td colspan="4">
<div><span style="color: #ff0000">备注:</span></div> <div><span style="color: #ff0000">备注:</span></div>
<div>列字段:[1:用户] [ 2:name] [3:otherinfo] [4:admin] [5:passwd] </div> <div>列字段:[1:用户(消息接收者)] [ 2:name(消息模板字段)] [3:otherinfo(消息模板字段)] [4:admin(消息模板字段)] [5:passwd(消息模板字段)] </div>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
<td colspan="4"> <td colspan="4">
<div><span style="color: #ff0000">备注:</span></div> <div><span style="color: #ff0000">备注:</span></div>
<div> <div>
列字段:[1:用户] [ 2:name] [3:otherinfo] 列字段:[1:用户(消息接收者)] [ 2:name(消息模板字段)] [3:otherinfo(消息模板字段)]
</div> </div>
</td> </td>
</tr> </tr>
......
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 sign in to comment