bug修复,及体验优化
This commit is contained in:
@@ -244,10 +244,12 @@ class Demand extends Api
|
||||
// $info->winBidding = DemandBiddingService::getOne(['demand_id' => $id, 'bidding_status' => DemandBiddingService::STATUS_BIDDING_WIN]);
|
||||
$info->isMy = $user_id == $info->user_id;//我发布
|
||||
$info->isMyWin = $info->winBidding && $info->winBidding->user_id == $user_id;//我中标
|
||||
//小程序内无法直接识别二维码,需先长按保存再用微信扫一扫
|
||||
$qrcodeText = '长按保存二维码,微信扫一扫进群';
|
||||
if ($user_id == $info->user_id) {
|
||||
$info->contactText = !empty($info->demand_group_chat->qr_code) ? '请识别二维码进群沟通' : '******开发接单后可见';
|
||||
$info->contactText = !empty($info->demand_group_chat->qr_code) ? $qrcodeText : '******开发接单后可见';
|
||||
} else {
|
||||
$info->contactText = $info->isMyWin && !empty($info->demand_group_chat->qr_code) ? '请识别二维码进群沟通' : '******确认接单后可见';
|
||||
$info->contactText = $info->isMyWin && !empty($info->demand_group_chat->qr_code) ? $qrcodeText : '******确认接单后可见';
|
||||
}
|
||||
$info->images = array_filter($info->images);
|
||||
$info->files = array_map(fn($fl) => [
|
||||
|
||||
@@ -47,8 +47,10 @@ class Message extends Api
|
||||
}
|
||||
|
||||
$list = MessageService::getList($where, $page_size, 'id desc')->toArray();
|
||||
$list['unread_count'] = $unreadCount;
|
||||
$list['unread_map'] = $unreadMap;
|
||||
$list['unread_count'] = $unreadCount; //当前筛选类型的未读数
|
||||
$list['unread_map'] = $unreadMap; //分类未读数(tab角标)
|
||||
//全量未读总数:由后端统计所有类型,避免前端只累加 0/1/2 导致未知类型漏算
|
||||
$list['unread_total'] = (int)array_sum($unreadMap);
|
||||
|
||||
$this->success('', $list);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user