微信企业号推送换行
来源:互联网 发布:贵州广电网络缴费网站 编辑:程序博客网 时间:2024/05/16 14:07
新手尝试微信企业号的消息推送,在content字符串里使用"/n"时异常"Unterminated string at character";
尝试使用"//n"后解决,代码如下:
Date currentDate = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm");
String currentDateString = sdf.format(currentDate);
StringBuffer buffer = new StringBuffer();
buffer.append("【您有一个新公告】").append("\\n").append("\\n");
buffer.append("【"+title+"】").append("\\n").append("\\n");
buffer.append(content.split("<p>")[1].split("</p>")[0]).append("\\n").append("\\n");
buffer.append("发布时间: "+currentDateString);
String contentPush = buffer.toString();
String dk = ConfigContext.getValue("framework.academic.default.setup['notification']");
SendMessWx.sendWeChatMsgText_util("@all", "", "", contentPush, "no", dk);
- 微信企业号推送换行
- 企业微信推送
- 微信模板消息推送换行
- PHP之微信企业号推送信息
- 微信企业号开发,给用户推送信息
- 微信企业号二次开发(推送和获取用户信息)
- 微信企业号
- 微信企业号
- 微信企业号给关注的用户主动发送推送消息
- 【fastweixin框架教程6】微信企业号给关注的用户主动发送推送消息
- 微信企业号,还是企业APP
- 微信公众平台开发——企业网站与微信的信息推送
- 微信企业号/企业微信:获取AccessToken
- 微信企业号源码
- python 微信企业号
- 微信企业号开发
- 微信企业号注册
- Java企业微信开发_05_消息推送之发送消息(主动)
- CentOS6.5下安装ActiveMQ
- RasDial函数遇到623错误
- 文章标题
- 学习分布式系统需要怎样的知识
- 风格不统一如何写程序 (一定看明题意)
- 微信企业号推送换行
- ehcache的xml配置
- 标准模板库STL入门简介与常见用法
- 每日AC--LeetCode-Candy
- 删除github中的项目
- css 全局背景半透明 IE浏览器半透明
- 反向缓存代理
- 小木棍-搜索剪枝
- CSS网站练习