图集1/5
正文 3261字数 169阅读
下载插件
下载插件 复制到插件文件夹Addons
复制后路径
\Addons\Qunsend Run code Cut to clipboard
- 1
安装插件
在后台安装插件
添加模型字段
模型标识
qunsend Run code Cut to clipboard
- 1
模型名称
群发推送 Run code Cut to clipboard
- 1
列表定义
id:ID
title:标题
ctime|time_format:预览时间
qf:当前
id|get_name_by_status_qunfasyl:群发预览
id|get_name_by_status_qunfas:群发推送 Run code Cut to clipboard
- 1
- 2
- 3
- 4
- 5
- 6
字段
| 字段 | 名称 | 数据类型 | 是否显示 | 是否必填 |
|---|---|---|---|---|
| coverurl | 封面图片url | 字符串 | 不显示 | 否 |
| content | 图文消息页面的内容 | 编辑器 | 不显示 | 否 |
| sid | 推送文章id | 数字 | 不显示 | 否 |
| media_id | media_id | 字符串 | 不显示 | 否 |
| title | 标题 | 字符串 | 始终显示 | 否 |
| ctime | 时间 | 时间 | 始终显示 | 否 |
| qf | 状态 | 字符串 | 始终显示 | 否 |
图文回复
列表定义 添加
id|get_name_by_status_scqf:推送群发 Run code Cut to clipboard
- 1
添加全局函数
\Application\Common\Common\function.php Run code Cut to clipboard
- 1
//start
// 以POST方式提交数据
function post_data($url, $param, $is_file = false, $return_array = true) {
if (! $is_file && is_array ( $param )) {
$param = JSON ( $param );
}
if ($is_file) {
$header [] = "content-type: multipart/form-data; charset=UTF-8";
} else {
$header [] = "content-type: application/json; charset=UTF-8";
}
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_SAFE_UPLOAD, false);
curl_setopt ( $ch, CURLOPT_URL, $url );
curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, "POST" );
curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );
curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, FALSE );
curl_setopt ( $ch, CURLOPT_HTTPHEADER, $header );
curl_setopt ( $ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)' );
curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, 1 );
curl_setopt ( $ch, CURLOPT_AUTOREFERER, 1 );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $param );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
$res = curl_exec ( $ch );
$flat = curl_errno ( $ch );
if ($flat) {
$data = curl_error ( $ch );
addWeixinLog ( $flat, 'post_data flat' );
addWeixinLog ( $data, 'post_data msg' );
}
curl_close ( $ch );
$return_array && $res = json_decode ( $res, true );
return $res;
}
//生成群发文章
function get_name_by_status_scqf($val){
return '<a href="/index.php?s=/addon/Qunsend/Qunsend/sf/id/'.$val.'">生成</a>';
}
//群发推送
function get_name_by_status_qunfas($val, $name, $model_id) {
//$newwwtt=date('YmdH',time());
//$mm=md5('iswtf.com99'.$val.$newwwtt); /mm/'.$mm.'
return '<a href="/index.php?s=/addon/Qunsend/Qunsend/qunfas/id/'.$val.'">推送</a>';
}
//群发预览
function get_name_by_status_qunfasyl($val, $name, $model_id) {
//$newwwtt=date('YmdH',time());
//$mm=md5('iswtf.com99'.$val.$newwwtt); /mm/'.$mm.'
return '<a href="/index.php?s=/addon/Qunsend/Qunsend/qunfasyl/id/'.$val.'">预览 </a>';
}
//end
Run code Cut to clipboard
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
微网站设置
添加设置配置修改文件
\Addons\WeiSite\config.php Run code Cut to clipboard
- 1
,
'bbyueyuesjttsyywxh' => array (
'title' => '群发推送管理员预览微信号:',
'type' => 'text',
'value' => '',
'tip' => ''
),
'wxfmzdddd'=>array(
'title'=>'群发推送文图片封面:',
'type'=>'radio', //表单的类型:text、textarea、checkbox、radio、select等
'options'=>array( //select 和radion、checkbox的子选项
'1'=>'完整显示(上下/左右有空白)', //值=>文字
'0'=>'默认拉伸剪切(图片显示不完全)',
),
'value'=>'0', //表单的默认值
'tip'=>'建议尺寸900x500'
) Run code Cut to clipboard
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
在网站根目录放置图片
没有封面图片时默认显示此图片
logo.png Run code Cut to clipboard
- 1
完整显示封面模式背景图片( 右键保存 ↓图片)
↑保存文件名
a.png Run code Cut to clipboard
- 1
新合成封面图片将保存在网站根目录 12345678980.jpg 再上传至微信服务器
weiphp微信多客服系统插件