正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -93,11 +93,14 @@ class Wechat extends Frontend | @@ -93,11 +93,14 @@ class Wechat extends Frontend | ||
93 | $user = WechatService::getUserByOpenid($openid); | 93 | $user = WechatService::getUserByOpenid($openid); |
94 | $house = House::get($house_id); | 94 | $house = House::get($house_id); |
95 | // 发送内容 | 95 | // 发送内容 |
96 | - $content = "欢迎关注{$house['name']}!"."\n"; | 96 | + $content = "欢迎关注{$house['name']}!"; |
97 | $phoneList = HousePhone::where('house_id',$house_id)->select(); | 97 | $phoneList = HousePhone::where('house_id',$house_id)->select(); |
98 | + if(!empty($phoneList)){ | ||
99 | + $content .= "\n"; | ||
98 | foreach ($phoneList as $v) { | 100 | foreach ($phoneList as $v) { |
99 | $content .= "\n"."{$v['name']}:{$v['phone']}"; | 101 | $content .= "\n"."{$v['name']}:{$v['phone']}"; |
100 | } | 102 | } |
103 | + } | ||
101 | $content .= "\n\n"."业主账号:%u" | 104 | $content .= "\n\n"."业主账号:%u" |
102 | ."\n\n"."<a href='https://weixin.qq.com/'>查看物业公告</a>" | 105 | ."\n\n"."<a href='https://weixin.qq.com/'>查看物业公告</a>" |
103 | ."\n\n"."<a href='https://weixin.qq.com/'>给物业留言</a>"; | 106 | ."\n\n"."<a href='https://weixin.qq.com/'>给物业留言</a>"; |
-
请 注册 或 登录 后发表评论