...
|
...
|
@@ -255,6 +255,10 @@ class HouseBoard extends Api |
|
|
}
|
|
|
|
|
|
}
|
|
|
// 因为公告首页接口已经返回了最新的公告,所以这里防止重复就去掉最新的
|
|
|
if(empty($page) || $page == 1){
|
|
|
array_shift($data['info']);
|
|
|
}
|
|
|
$this->success('success',$data);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -396,6 +400,7 @@ class HouseBoard extends Api |
|
|
'is_read_user' => 1
|
|
|
];
|
|
|
$res_msg = $msg_model->edit($update);
|
|
|
$message_id = $msg['id'];
|
|
|
} else {
|
|
|
$insert = $where_m;
|
|
|
$insert['type'] = 3;
|
...
|
...
|
@@ -403,6 +408,7 @@ class HouseBoard extends Api |
|
|
$insert['image'] = $param['image'];
|
|
|
$insert['is_read_user'] = 2;
|
|
|
$res_msg = $msg_model->add($insert);
|
|
|
$message_id = $msg_model->where($where_m)->value('id');
|
|
|
}
|
|
|
// 发送模板消息
|
|
|
$send_data = array(
|
...
|
...
|
@@ -412,7 +418,7 @@ class HouseBoard extends Api |
|
|
"remark" => '',
|
|
|
);
|
|
|
$openid = Db::name('third')->where('user_id',$param['house_user_id'])->value('openid');
|
|
|
$url = config('option.vue_url') . '/liuyanxiaoxi?is_template=1&id='.$param['house_user_id'];
|
|
|
$url = config('option.vue_url') . '/liuyanxiaoxi?is_template=1&id='.$message_id;
|
|
|
$this->wxsendmessage($openid,$send_data,config('option.template')['msg'],$url);
|
|
|
Db::commit();
|
|
|
} catch (PDOException $e) {
|
...
|
...
|
@@ -502,9 +508,10 @@ class HouseBoard extends Api |
|
|
'house_user_id' => $wuye_user_id,
|
|
|
],
|
|
|
];
|
|
|
$order = ['createtime'=>'asc'];
|
|
|
$order = ['createtime'=>'desc'];
|
|
|
$comment = $model->pageSelect($page,$where_c,'*',$order,config('option.num'));
|
|
|
$list = $comment->items();
|
|
|
array_multisort(array_column($list,'createtime'),SORT_ASC,$list);
|
|
|
$user_model = new \app\api\model\User();
|
|
|
if(count($list) == 0) {
|
|
|
$first = [
|
...
|
...
|
|