Skip to content

Commit 96a6090

Browse files
committed
fix(PC): 系统消息类型
1 parent 5a98ac9 commit 96a6090

File tree

1 file changed

+96
-5
lines changed

1 file changed

+96
-5
lines changed

packages/zhiyicx-plus-pc/resources/views/message/notifications.blade.php

Lines changed: 96 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,106 @@
33
@endphp
44
@if (!empty($notifications))
55
<ul class="tz-cont">
6-
@foreach($notifications as $notification)
6+
@foreach($notifications as $noti)
7+
@php
8+
$ref = $noti['data']
9+
@endphp
710
<li>
811
<div class="tz-content">
9-
{{$notification['data']['content']}}
12+
@switch($ref['type'])
13+
@case('user')
14+
<a href="{{route('pc:mine', ['user' => $ref['user']['id']])}}">
15+
{{ $ref['user']['name'] }}打赏了你
16+
</a>
17+
@break
18+
@case('reward:feeds')
19+
<a href="{{route('pc:feedread', ['feed'=>$ref['feed_id']])}}">
20+
{{ $ref['sender']['name'] }}打赏了你的动态
21+
</a>
22+
@break
23+
@case('reward:news')
24+
<a href="{{route('pc:newsread', ['news'=>$ref['news_id']])}}">
25+
你的资讯《{{ $ref['news']['title'] }}》被{{ $ref['user']['name'] }}打赏了{{ $ref['amount'].$ref['unit'] }}
26+
</a>
27+
@break
28+
@case('group:join')
29+
@if($ref['state'] == 'rejected')
30+
<a href="{{route('pc:groupread', ['group_id'=>$ref['group']['id']])}}">
31+
拒绝用户加入「{{ $ref['group']['name'] }}」圈子
32+
</a>
33+
@else
34+
<a href="{{route('pc:groupread', ['group_id'=>$ref['group']['id']])}}">
35+
{{ $ref['user'] ? $ref['user']['name'] : ''}}请求加入圈子「{{ $ref['group']['name'] }}
36+
</a>
37+
@endif
38+
@break
39+
@case('user-certification')
40+
<a href="{{route('pc:authenticate')}}">
41+
@if($ref['state'] == 'rejected')
42+
你申请的身份认证已被驳回,驳回理由:{{ $ref['contents'] }}
43+
@else
44+
你申请的身份认证已通过
45+
@endif
46+
</a>
47+
@break
48+
@case('qa:answer-adoption')
49+
<a href="{{route('pc:answeread', ['question'=>$ref['question']['id'],'answer'=>$ref['answer']['id']])}}">
50+
你提交的问题回答被采纳
51+
</a>
52+
@break
53+
@case('question:answer')
54+
<a href="{{route('pc:answeread', ['question'=>$ref['question']['id'],'answer'=>$ref['answer']['id']])}}">
55+
你提交的问题回答被采纳
56+
</a>
57+
@break
58+
@case('qa:reward')
59+
<a href="{{route('pc:answeread', ['question'=>$ref['question']['id'],'answer'=>$ref['answer']['id']])}}">
60+
{{ $ref['user']['name'] }}打赏了你的回答
61+
</a>
62+
@break
63+
@case('pinned:feed/comment')
64+
<a href="{{route('pc:feedread', ['feed'=>$ref['feed']['id']])}}">
65+
@if($ref['state'] == 'rejected')
66+
拒绝用户动态评论「{{ $ref['comment']['contents'] }}」的置顶请求
67+
@else
68+
同意用户动态评论「{{ $ref['comment']['contents'] }}」的置顶请求
69+
@endif
70+
</a>
71+
@break
72+
@case('pinned:news/comment')
73+
<a href="{{route('pc:newsread', ['news'=>$ref['news']['id']])}}">
74+
@if($ref['state'] == 'rejected')
75+
拒绝用户关于资讯《{{ $ref['news']['title'] }}》评论「{{ $ref['comment']['contents'] }}」的置顶请求
76+
@else
77+
同意用户关于资讯《{{ $ref['news']['title'] }}》评论「{{ $ref['comment']['contents'] }}」的置顶请求
78+
@endif
79+
</a>
80+
@break
81+
@case('group:comment-pinned')
82+
@case('group:send-comment-pinned')
83+
<a href="{{route('pc:grouppost', ['group_id'=>$ref['group_id'], ''=>$ref['post']['id']])}}">
84+
@if($ref['state'] == 'rejected')
85+
拒绝帖子「{{ $ref['post']['title']}}」的评论置顶请求
86+
@else
87+
同意帖子「{{ $ref['post']['title']}}」的评论置顶请求
88+
@endif
89+
</a>
90+
@break
91+
@case('group:post-pinned')
92+
<a href="{{route('pc:grouppost', ['group_id'=>$ref['group_id'], ''=>$ref['post']['id']])}}">
93+
@if($ref['state'] == 'rejected')
94+
拒绝用于帖子「{{ $ref['post']['title']}}」的置顶请求
95+
@else
96+
同意用于帖子「{{ $ref['post']['title']}}」的置顶请求
97+
@endif
98+
</a>
99+
@break
100+
@endswitch
10101
</div>
11-
<div class="tz-date">{{ getTime($notification['created_at']) }}</div>
102+
<div class="tz-date">{{ getTime($noti['created_at']) }}</div>
12103
</li>
13104
@endforeach
14105
</ul>
15106
@else
16-
暂无更多
17-
@endif
107+
{{trans('plus-pc::common.no_more')}}
108+
@endif

0 commit comments

Comments
 (0)