作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

合并分支 'heshupeng' 到 'master'

扫码场景



查看合并请求 !182
@@ -93,10 +93,13 @@ class Wechat extends Frontend @@ -93,10 +93,13 @@ 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 - foreach ($phoneList as $v) {  
99 - $content .= "\n"."{$v['name']}:{$v['phone']}"; 98 + if(!empty($phoneList)){
  99 + $content .= "\n";
  100 + foreach ($phoneList as $v) {
  101 + $content .= "\n"."{$v['name']}:{$v['phone']}";
  102 + }
100 } 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>"