Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d245df36
由
cgx
编写于
2022-10-11 17:34:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
搭建消息中心、官方通知、收到的赞页面
1 个父辈
6775a078
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
38 个修改的文件
包含
532 行增加
和
218 行删除
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
DreamSleep/DreamSleep/Class/Start/Root/BaseNaviController.h → DreamSleep/DreamSleep/Basement/Controller/BaseNaviController.h
DreamSleep/DreamSleep/Class/Start/Root/BaseNaviController.m → DreamSleep/DreamSleep/Basement/Controller/BaseNaviController.m
DreamSleep/DreamSleep/Basement/Controller/BaseViewController.h
DreamSleep/DreamSleep/Basement/Controller/BaseViewController.m
DreamSleep/DreamSleep/Class/Start/Root/DSBaseViewController.h → DreamSleep/DreamSleep/Basement/Controller/DSBaseViewController.h
DreamSleep/DreamSleep/Class/Start/Root/DSBaseViewController.m → DreamSleep/DreamSleep/Basement/Controller/DSBaseViewController.m
DreamSleep/DreamSleep/Class/Start/Root/DSNaviBarViewController.h → DreamSleep/DreamSleep/Basement/Controller/DSNaviBarViewController.h
DreamSleep/DreamSleep/Class/Start/Root/DSNaviBarViewController.m → DreamSleep/DreamSleep/Basement/Controller/DSNaviBarViewController.m
DreamSleep/DreamSleep/Basement/View/BaseTableViewCell.h
DreamSleep/DreamSleep/Basement/View/BaseTableViewCell.m
DreamSleep/DreamSleep/Class/CommunityModule/Controller/MessageController.h
DreamSleep/DreamSleep/Class/CommunityModule/Controller/MessageController.m
DreamSleep/DreamSleep/Class/CommunityModule/Controller/OfficialNoticeController.h
DreamSleep/DreamSleep/Class/CommunityModule/Controller/OfficialNoticeController.m
DreamSleep/DreamSleep/Class/CommunityModule/Controller/PraiseListController.h
DreamSleep/DreamSleep/Class/CommunityModule/Controller/PraiseListController.m
DreamSleep/DreamSleep/Class/CommunityModule/Controller/comList.plist
DreamSleep/DreamSleep/Class/CommunityModule/Model/ComReplyModel.h
DreamSleep/DreamSleep/Class/CommunityModule/Model/MessageNotiModel.h
DreamSleep/DreamSleep/Class/CommunityModule/Model/MessageNotiModel.m
DreamSleep/DreamSleep/Class/CommunityModule/Model/PraiseModel.h
DreamSleep/DreamSleep/Class/CommunityModule/Model/PraiseModel.m
DreamSleep/DreamSleep/Class/CommunityModule/View/CommentReplyCell.m
DreamSleep/DreamSleep/Class/CommunityModule/View/MessageNotiCell.h
DreamSleep/DreamSleep/Class/CommunityModule/View/MessageNotiCell.m
DreamSleep/DreamSleep/Class/CommunityModule/View/MessageNotiView.h
DreamSleep/DreamSleep/Class/CommunityModule/View/MessageNotiView.m
DreamSleep/DreamSleep/Class/CommunityModule/View/PraiseCell.h
DreamSleep/DreamSleep/Class/CommunityModule/View/PraiseCell.m
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_guanfangtongzhi.imageset/Contents.json
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_guanfangtongzhi.imageset/ic_xiaoxi_guanfangtongzhi.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_guanfangtongzhi.imageset/ic_xiaoxi_guanfangtongzhi@2x.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_guanfangtongzhi.imageset/ic_xiaoxi_guanfangtongzhi@3x.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_shoudaodezan.imageset/Contents.json
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_shoudaodezan.imageset/ic_xiaoxi_shoudaodezan.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_shoudaodezan.imageset/ic_xiaoxi_shoudaodezan@2x.png
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_shoudaodezan.imageset/ic_xiaoxi_shoudaodezan@3x.png
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
查看文件 @
d245df3
此文件的差异被折叠,
点击展开。
DreamSleep/DreamSleep/
Class/Start/Root
/BaseNaviController.h
→
DreamSleep/DreamSleep/
Basement/Controller
/BaseNaviController.h
查看文件 @
d245df3
文件被删除
DreamSleep/DreamSleep/
Class/Start/Root
/BaseNaviController.m
→
DreamSleep/DreamSleep/
Basement/Controller
/BaseNaviController.m
查看文件 @
d245df3
文件被删除
DreamSleep/DreamSleep/Basement/Controller/BaseViewController.h
0 → 100644
查看文件 @
d245df3
//
// BaseViewController.h
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/// 基类控制器
@interface
BaseViewController
:
UIViewController
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Basement/Controller/BaseViewController.m
0 → 100644
查看文件 @
d245df3
//
// BaseViewController.m
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "BaseViewController.h"
@interface
BaseViewController
()
@end
@implementation
BaseViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
}
#pragma mark - 品牌模式
-
(
NaviStyle
)
navigationBarStyle
{
return
NaviStyleDefault
;
}
@end
DreamSleep/DreamSleep/
Class/Start/Root
/DSBaseViewController.h
→
DreamSleep/DreamSleep/
Basement/Controller
/DSBaseViewController.h
查看文件 @
d245df3
文件被删除
DreamSleep/DreamSleep/
Class/Start/Root
/DSBaseViewController.m
→
DreamSleep/DreamSleep/
Basement/Controller
/DSBaseViewController.m
查看文件 @
d245df3
文件被删除
DreamSleep/DreamSleep/
Class/Start/Root
/DSNaviBarViewController.h
→
DreamSleep/DreamSleep/
Basement/Controller
/DSNaviBarViewController.h
查看文件 @
d245df3
文件被删除
DreamSleep/DreamSleep/
Class/Start/Root
/DSNaviBarViewController.m
→
DreamSleep/DreamSleep/
Basement/Controller
/DSNaviBarViewController.m
查看文件 @
d245df3
文件被删除
DreamSleep/DreamSleep/Basement/View/BaseTableViewCell.h
0 → 100644
查看文件 @
d245df3
//
// BaseTableViewCell.h
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
BaseTableViewCell
:
UITableViewCell
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Basement/View/BaseTableViewCell.m
0 → 100644
查看文件 @
d245df3
//
// BaseTableViewCell.m
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "BaseTableViewCell.h"
@implementation
BaseTableViewCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
if
(
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
])
{
self
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
self
.
backgroundColor
=
DSClearColor
;
}
return
self
;
}
@end
DreamSleep/DreamSleep/Class/CommunityModule/Controller/MessageController.h
查看文件 @
d245df3
...
@@ -5,12 +5,12 @@
...
@@ -5,12 +5,12 @@
// Created by peter on 2022/10/10.
// Created by peter on 2022/10/10.
//
//
#import
<UIKit/UIKit.h>
#import
"BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
/// 社区消息通知页面
/// 社区消息通知页面
@interface
MessageController
:
UI
ViewController
@interface
MessageController
:
Base
ViewController
@end
@end
...
...
DreamSleep/DreamSleep/Class/CommunityModule/Controller/MessageController.m
查看文件 @
d245df3
...
@@ -7,6 +7,9 @@
...
@@ -7,6 +7,9 @@
#import "MessageController.h"
#import "MessageController.h"
#import "MessageNotiView.h"
#import "MessageNotiView.h"
#import "OfficialNoticeController.h"
#import "PraiseListController.h"
#import "ReplyListController.h"
@interface
MessageController
()
<
MessageNotiViewDelegate
>
@interface
MessageController
()
<
MessageNotiViewDelegate
>
@property
(
nonatomic
,
strong
)
MessageNotiView
*
messageNotiView
;
@property
(
nonatomic
,
strong
)
MessageNotiView
*
messageNotiView
;
...
@@ -24,9 +27,20 @@
...
@@ -24,9 +27,20 @@
self
.
navigationItem
.
title
=
@"消息中心"
;
self
.
navigationItem
.
title
=
@"消息中心"
;
}
}
#pragma mark - 品牌模式
#pragma mark - MessageNotiViewDelegate
-
(
NaviStyle
)
navigationBarStyle
{
-
(
void
)
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
NaviStyleDefault
;
if
(
indexPath
.
section
==
0
)
{
if
(
indexPath
.
row
==
0
)
{
OfficialNoticeController
*
officialVC
=
[
OfficialNoticeController
new
];
[
self
.
navigationController
pushViewController
:
officialVC
animated
:
YES
];
}
else
{
PraiseListController
*
praiseVC
=
[
PraiseListController
new
];
[
self
.
navigationController
pushViewController
:
praiseVC
animated
:
YES
];
}
}
else
{
ReplyListController
*
replyList
=
[
ReplyListController
new
];
[
self
.
navigationController
pushViewController
:
replyList
animated
:
YES
];
}
}
}
#pragma mark - lazy
#pragma mark - lazy
...
...
DreamSleep/DreamSleep/Class/CommunityModule/Controller/OfficialNoticeController.h
0 → 100644
查看文件 @
d245df3
//
// OfficialNoticeController.h
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
/// 官方通知页面
@interface
OfficialNoticeController
:
BaseViewController
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/CommunityModule/Controller/OfficialNoticeController.m
0 → 100644
查看文件 @
d245df3
//
// OfficialNoticeController.m
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "OfficialNoticeController.h"
@interface
OfficialNoticeController
()
@end
@implementation
OfficialNoticeController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
navigationItem
.
title
=
@"官方通知"
;
self
.
view
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
}
@end
DreamSleep/DreamSleep/Class/CommunityModule/Controller/PraiseListController.h
0 → 100644
查看文件 @
d245df3
//
// PraiseListController.h
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/// 点赞列表
@interface
PraiseListController
:
UITableViewController
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/CommunityModule/Controller/PraiseListController.m
0 → 100644
查看文件 @
d245df3
//
// PraiseListController.m
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "PraiseListController.h"
#import "PraiseCell.h"
@interface
PraiseListController
()
@property
(
nonatomic
,
strong
)
DSDataSource
*
dataSource
;
@end
@implementation
PraiseListController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
navigationItem
.
title
=
@"收到的赞"
;
NSMutableArray
*
tmpArr
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
PraiseModel
*
model
=
[
PraiseModel
new
];
model
.
user_profile
=
@"https://img2.ydniu.com/sleep_ssmain/face_img/1657350090882_1BORX6.jpg"
;
model
.
nick_name
=
@"叽叽歪歪"
;
model
.
publish_time
=
@"2022-09-11"
;
model
.
content
=
@"好高好高好高好高好高好高好"
;
[
tmpArr
addObject
:
model
];
}
[
self
.
dataSource
addDataArray
:
tmpArr
.
copy
];
self
.
tableView
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
self
.
tableView
.
showsVerticalScrollIndicator
=
NO
;
self
.
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
[
self
.
tableView
registerClass
:[
PraiseCell
class
]
forCellReuseIdentifier
:
NSStringFromClass
([
PraiseCell
class
])];
self
.
tableView
.
contentInsetAdjustmentBehavior
=
UIScrollViewContentInsetAdjustmentNever
;
}
#pragma mark - UITableViewDelegate, UITableViewDataSource
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
97
;
}
#pragma mark - lazy
-
(
DSDataSource
*
)
dataSource
{
if
(
!
_dataSource
)
{
CellConfigureBlock
cellBlock
=
^
(
PraiseCell
*
cell
,
PraiseModel
*
model
,
NSIndexPath
*
indexPath
)
{
cell
.
praiseModel
=
model
;
};
_dataSource
=
[[
DSDataSource
alloc
]
initWithIdentifier
:
NSStringFromClass
([
PraiseCell
class
])
datas
:@[]
isSection
:
NO
configureBlock
:
cellBlock
];
self
.
tableView
.
dataSource
=
_dataSource
;
}
return
_dataSource
;
}
#pragma mark - 品牌模式
-
(
NaviStyle
)
navigationBarStyle
{
return
NaviStyleDefault
;
}
@end
DreamSleep/DreamSleep/Class/CommunityModule/Controller/comList.plist
deleted
100644 → 0
查看文件 @
6775a07
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
error
</key>
<string>
""
</string>
<key>
result
</key>
<array>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
张三
</string>
<key>
time
</key>
<string>
1分钟前
</string>
<key>
content
</key>
<string>
国庆放假要好好计划下,健身打卡
</string>
<key>
imgUrls
</key>
<array>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653288028602_1yFqHL.jpg
</string>
</array>
<key>
isLike
</key>
<false/>
<key>
likeCount
</key>
<integer>
2
</integer>
<key>
remarkCount
</key>
<integer>
0
</integer>
</dict>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
李四
</string>
<key>
time
</key>
<string>
半个小时前
</string>
<key>
content
</key>
<string>
长沙好好玩,各种美食应有尽有,吃喝玩乐嗨起来,周末约朋友喝茶颜去。。。
</string>
<key>
imgUrls
</key>
<array>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653288005388_7wuK9n.jpg
</string>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653277874846_BzEuFF.jpg
</string>
</array>
<key>
isLike
</key>
<true/>
<key>
likeCount
</key>
<integer>
33
</integer>
<key>
remarkCount
</key>
<integer>
2
</integer>
</dict>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
李四
</string>
<key>
time
</key>
<string>
半个小时前
</string>
<key>
content
</key>
<string>
长沙好好玩,各种美食应有尽有,吃喝玩乐嗨起来,周末约朋友喝茶颜去。。。
</string>
<key>
imgUrls
</key>
<array>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653288005388_7wuK9n.jpg
</string>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653277874846_BzEuFF.jpg
</string>
</array>
<key>
isLike
</key>
<true/>
<key>
likeCount
</key>
<integer>
33
</integer>
<key>
remarkCount
</key>
<integer>
2
</integer>
</dict>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
王五
</string>
<key>
time
</key>
<string>
昨天
</string>
<key>
content
</key>
<string>
国庆放假要好好计划下,健身打卡
</string>
<key>
imgUrls
</key>
<array>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653302478340_liIqbO.jpg
</string>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653301114665_lwDNUG.jpg
</string>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653301150570_zfQ0jW.jpg
</string>
</array>
<key>
isLike
</key>
<false/>
<key>
likeCount
</key>
<integer>
0
</integer>
<key>
remarkCount
</key>
<integer>
0
</integer>
</dict>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
王五
</string>
<key>
time
</key>
<string>
昨天
</string>
<key>
content
</key>
<string>
国庆放假要好好计划下,健身打卡
</string>
<key>
imgUrls
</key>
<array>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653302478340_liIqbO.jpg
</string>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653301114665_lwDNUG.jpg
</string>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653301150570_zfQ0jW.jpg
</string>
</array>
<key>
isLike
</key>
<false/>
<key>
likeCount
</key>
<integer>
0
</integer>
<key>
remarkCount
</key>
<integer>
0
</integer>
</dict>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
王五
</string>
<key>
time
</key>
<string>
昨天
</string>
<key>
content
</key>
<string>
国庆放假要好好计划下,健身打卡
</string>
<key>
imgUrls
</key>
<array>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653302478340_liIqbO.jpg
</string>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653301114665_lwDNUG.jpg
</string>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653301150570_zfQ0jW.jpg
</string>
</array>
<key>
isLike
</key>
<false/>
<key>
likeCount
</key>
<integer>
0
</integer>
<key>
remarkCount
</key>
<integer>
0
</integer>
</dict>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
异次元
</string>
<key>
time
</key>
<string>
3天前
</string>
<key>
content
</key>
<string>
觉知当下,与家人建立和谐关系觉知当下,与家人建立和谐关系觉知当下,与家人建立和谐关系觉知当下,与家人建立和谐关系觉知当下,与家人建立和谐关系觉知当下,与家人建立和谐关系觉知当下,与家人建立和谐关系
"
觉知当下,与家人建立和谐关系
"
觉知当下,与家人建立和谐关系觉知当下,与家人建立和谐关系
"
觉知当下,与家人建立和谐关系
"
觉知当下,与家人建立和谐关系
"
觉知当下,与家人建立和谐关系
"
觉知当下,与家人建立和谐关系
"
</string>
<key>
isLike
</key>
<false/>
<key>
likeCount
</key>
<integer>
2
</integer>
<key>
remarkCount
</key>
<integer>
0
</integer>
</dict>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
张三
</string>
<key>
time
</key>
<string>
1分钟前
</string>
<key>
content
</key>
<string>
国庆放假要好好计划下,健身打卡
</string>
<key>
imgUrls
</key>
<array>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653288028602_1yFqHL.jpg
</string>
</array>
<key>
isLike
</key>
<false/>
<key>
likeCount
</key>
<integer>
2
</integer>
<key>
remarkCount
</key>
<integer>
0
</integer>
</dict>
<dict>
<key>
userIcon
</key>
<string>
https://img2.ydniu.com/sleep_ssmain/face_img/1658215539163_ZsA0sm.jpg
</string>
<key>
userName
</key>
<string>
张三
</string>
<key>
time
</key>
<string>
1分钟前
</string>
<key>
content
</key>
<string>
国庆放假要好好计划下,健身打卡
</string>
<key>
imgUrls
</key>
<array>
<string>
https://img2.ydniu.com/sleep_ssmain/relax/1653288028602_1yFqHL.jpg
</string>
</array>
<key>
isLike
</key>
<false/>
<key>
likeCount
</key>
<integer>
2
</integer>
<key>
remarkCount
</key>
<integer>
0
</integer>
</dict>
</array>
<key>
res_code
</key>
<integer>
1
</integer>
</dict>
</plist>
DreamSleep/DreamSleep/Class/CommunityModule/Model/ComReplyModel.h
查看文件 @
d245df3
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXTERN
UIFont
*
const
CommentContentFont
;
FOUNDATION_EXTERN
UIFont
*
const
CommentContentFont
;
/// 评论回复model
///
动态
评论回复model
@interface
ComReplyModel
:
NSObject
@interface
ComReplyModel
:
NSObject
/// 评论model
/// 评论model
@property
(
nonatomic
,
strong
)
CommentModel
*
commentModel
;
@property
(
nonatomic
,
strong
)
CommentModel
*
commentModel
;
...
...
DreamSleep/DreamSleep/Class/CommunityModule/Model/MessageNotiModel.h
0 → 100644
查看文件 @
d245df3
//
// MessageNotiModel.h
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// 消息中心官方通知和收到点赞数据model
@interface
MessageNotiModel
:
NSObject
@property
(
nonatomic
,
copy
)
NSString
*
iconName
;
@property
(
nonatomic
,
copy
)
NSString
*
title
;
@property
(
nonatomic
,
copy
)
NSString
*
detail
;
@property
(
nonatomic
,
assign
)
int
messageCount
;
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/CommunityModule/Model/MessageNotiModel.m
0 → 100644
查看文件 @
d245df3
//
// MessageNotiModel.m
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "MessageNotiModel.h"
@implementation
MessageNotiModel
@end
DreamSleep/DreamSleep/Class/CommunityModule/Model/PraiseModel.h
0 → 100644
查看文件 @
d245df3
//
// PraiseModel.h
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface
PraiseModel
:
NSObject
/// 头像
@property
(
nonatomic
,
copy
)
NSString
*
user_profile
;
/// 昵称
@property
(
nonatomic
,
copy
)
NSString
*
nick_name
;
/// 回复时间
@property
(
nonatomic
,
copy
)
NSString
*
publish_time
;
/// 内容
@property
(
nonatomic
,
copy
)
NSString
*
content
;
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/CommunityModule/Model/PraiseModel.m
0 → 100644
查看文件 @
d245df3
//
// PraiseModel.m
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "PraiseModel.h"
@implementation
PraiseModel
@end
DreamSleep/DreamSleep/Class/CommunityModule/View/CommentReplyCell.m
查看文件 @
d245df3
...
@@ -9,15 +9,12 @@
...
@@ -9,15 +9,12 @@
@implementation
CommentReplyCell
@implementation
CommentReplyCell
-
(
void
)
awakeFromNib
{
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
[
super
awakeFromNib
];
if
(
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
])
{
// Initialization code
self
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
self
.
backgroundColor
=
DSClearColor
;
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
return
self
;
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
}
@end
@end
DreamSleep/DreamSleep/Class/CommunityModule/View/MessageNotiCell.h
查看文件 @
d245df3
...
@@ -6,12 +6,13 @@
...
@@ -6,12 +6,13 @@
//
//
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "MessageNotiModel.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
/// 消息中心顶部官方通知和点赞通知cell
/// 消息中心顶部官方通知和点赞通知cell
@interface
MessageNotiCell
:
UITableViewCell
@interface
MessageNotiCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
MessageNotiModel
*
messageNotiModel
;
@end
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/CommunityModule/View/MessageNotiCell.m
查看文件 @
d245df3
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
@property
(
nonatomic
,
strong
)
UIImageView
*
icon
;
@property
(
nonatomic
,
strong
)
UIImageView
*
icon
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLab
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLab
;
@property
(
nonatomic
,
strong
)
UILabel
*
detailLab
;
@property
(
nonatomic
,
strong
)
UILabel
*
detailLab
;
@property
(
nonatomic
,
strong
)
UILabel
*
mesCountLab
;
@end
@end
@implementation
MessageNotiCell
@implementation
MessageNotiCell
...
@@ -23,23 +24,76 @@
...
@@ -23,23 +24,76 @@
[
self
.
contentView
addSubview
:
self
.
icon
];
[
self
.
contentView
addSubview
:
self
.
icon
];
[
self
.
contentView
addSubview
:
self
.
titleLab
];
[
self
.
contentView
addSubview
:
self
.
titleLab
];
[
self
.
contentView
addSubview
:
self
.
detailLab
];
[
self
.
contentView
addSubview
:
self
.
detailLab
];
[
self
.
contentView
addSubview
:
self
.
mesCountLab
];
[
self
.
icon
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
icon
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
30
);
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
15
);
make
.
top
.
equalTo
(
self
.
contentView
);
make
.
top
.
equalTo
(
self
.
contentView
)
.
offset
(
18
)
;
make
.
size
.
mas_equalTo
(
CGSizeMake
(
40
,
40
));
make
.
size
.
mas_equalTo
(
CGSizeMake
(
40
,
40
));
}];
}];
[
self
.
titleLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
titleLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
icon
.
mas_right
).
offset
(
1
4
);
make
.
left
.
equalTo
(
self
.
icon
.
mas_right
).
offset
(
1
2
);
make
.
top
.
equalTo
(
self
.
icon
);
make
.
top
.
equalTo
(
self
.
icon
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
3
0
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
5
0
);
}];
}];
[
self
.
detailLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
detailLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
titleLab
);
make
.
left
.
equalTo
(
self
.
titleLab
);
make
.
bottom
.
equalTo
(
self
.
icon
);
make
.
bottom
.
equalTo
(
self
.
icon
);
make
.
right
.
equalTo
(
self
.
titleLab
);
}];
[
self
.
mesCountLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
centerY
.
equalTo
(
self
.
contentView
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
15
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
20
,
20
));
}];
}];
}
}
return
self
;
return
self
;
}
}
-
(
void
)
setMessageNotiModel
:(
MessageNotiModel
*
)
messageNotiModel
{
_messageNotiModel
=
messageNotiModel
;
self
.
icon
.
image
=
[
UIImage
imageNamed
:
messageNotiModel
.
iconName
];
self
.
titleLab
.
text
=
messageNotiModel
.
title
;
self
.
detailLab
.
text
=
messageNotiModel
.
detail
;
self
.
mesCountLab
.
hidden
=
!
messageNotiModel
.
messageCount
;
self
.
mesCountLab
.
text
=
[
NSString
stringWithFormat
:
@"%d"
,
messageNotiModel
.
messageCount
];
}
#pragma mark - lazy
-
(
UIImageView
*
)
icon
{
if
(
!
_icon
)
{
_icon
=
[
UIImageView
new
];
_icon
.
dk_alphaPicker
=
DKAlphaPickerWithAlphas
(
1
,
.
5
,
.
5
);
[
_icon
cornerRadius
:
20
];
}
return
_icon
;
}
-
(
UILabel
*
)
titleLab
{
if
(
!
_titleLab
)
{
_titleLab
=
[
UILabel
labWithFont
:
BoldFont
(
15
)];
_titleLab
.
dk_textColorPicker
=
DKColorPickerWithKey
(
Dk_TITLE
);
}
return
_titleLab
;
}
-
(
UILabel
*
)
detailLab
{
if
(
!
_detailLab
)
{
_detailLab
=
[
UILabel
labWithFont
:
SysFont
(
14
)];
_detailLab
.
dk_textColorPicker
=
DKColorPickerWithColors
(
SubTitleColor
,
ColorFromHexA
(
0xFFFFFF
,
.
5
),
DSWhite
);
}
return
_detailLab
;
}
-
(
UILabel
*
)
mesCountLab
{
if
(
!
_mesCountLab
)
{
_mesCountLab
=
[
UILabel
labWithTextColor
:
DSWhite
font
:
SysFont
(
12
)];
_mesCountLab
.
backgroundColor
=
ColorFromHex
(
0xF04B77
);
_mesCountLab
.
textAlignment
=
NSTextAlignmentCenter
;
[
_mesCountLab
cornerRadius
:
10
];
}
return
_mesCountLab
;
}
@end
@end
DreamSleep/DreamSleep/Class/CommunityModule/View/MessageNotiView.h
查看文件 @
d245df3
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@protocol
MessageNotiViewDelegate
<
NSObject
>
@protocol
MessageNotiViewDelegate
<
NSObject
>
-
(
void
)
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
;
@end
@end
/// 消息通知view
/// 消息通知view
...
...
DreamSleep/DreamSleep/Class/CommunityModule/View/MessageNotiView.m
查看文件 @
d245df3
...
@@ -104,4 +104,10 @@ static int secFooterHeight = 8;
...
@@ -104,4 +104,10 @@ static int secFooterHeight = 8;
}
}
}
}
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
if
(
self
.
messageDelegate
&&
[
self
.
messageDelegate
respondsToSelector
:
@selector
(
didSelectRowAtIndexPath
:)])
{
[
self
.
messageDelegate
didSelectRowAtIndexPath
:
indexPath
];
}
}
@end
@end
DreamSleep/DreamSleep/Class/CommunityModule/View/PraiseCell.h
0 → 100644
查看文件 @
d245df3
//
// PraiseCell.h
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "BaseTableViewCell.h"
#import "PraiseModel.h"
NS_ASSUME_NONNULL_BEGIN
/// 点赞cell
@interface
PraiseCell
:
BaseTableViewCell
@property
(
nonatomic
,
strong
)
PraiseModel
*
praiseModel
;
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Class/CommunityModule/View/PraiseCell.m
0 → 100644
查看文件 @
d245df3
//
// PraiseCell.m
// DreamSleep
//
// Created by peter on 2022/10/11.
//
#import "PraiseCell.h"
@interface
PraiseCell
()
@property
(
nonatomic
,
strong
)
UIImageView
*
userIcon
;
@property
(
nonatomic
,
strong
)
UILabel
*
userNameLab
;
@property
(
nonatomic
,
strong
)
UILabel
*
timeLab
;
@property
(
nonatomic
,
strong
)
UILabel
*
tipLab
;
@property
(
nonatomic
,
strong
)
UILabel
*
contentLab
;
@end
@implementation
PraiseCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
if
(
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
])
{
[
self
.
contentView
addSubview
:
self
.
userIcon
];
[
self
.
contentView
addSubview
:
self
.
userNameLab
];
[
self
.
contentView
addSubview
:
self
.
timeLab
];
[
self
.
contentView
addSubview
:
self
.
tipLab
];
[
self
.
contentView
addSubview
:
self
.
contentLab
];
[
self
.
userIcon
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
15
);
make
.
top
.
equalTo
(
self
.
contentView
).
offset
(
15
);
make
.
size
.
mas_equalTo
(
CGSizeMake
(
40
,
40
));
}];
[
self
.
timeLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
equalTo
(
self
.
contentView
).
offset
(
18
);
make
.
right
.
equalTo
(
self
.
contentView
).
offset
(
-
15
);
}];
[
self
.
tipLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
userNameLab
);
make
.
bottom
.
equalTo
(
self
.
userIcon
);
}];
[
self
.
contentLab
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
equalTo
(
self
.
userIcon
.
mas_bottom
).
offset
(
7
);
make
.
left
.
equalTo
(
self
.
contentView
).
offset
(
73
);
}];
}
return
self
;
}
-
(
void
)
setPraiseModel
:(
PraiseModel
*
)
praiseModel
{
_praiseModel
=
praiseModel
;
[
self
.
userIcon
yy_setImageWithURL
:[
NSURL
URLWithString
:
praiseModel
.
user_profile
]
placeholder
:[
UIImage
defaultPlaceholderWithSize
:
CGSizeMake
(
40
,
40
)]];
self
.
userNameLab
.
text
=
praiseModel
.
nick_name
;
self
.
timeLab
.
text
=
praiseModel
.
publish_time
;
[
self
.
timeLab
sizeToFit
];
self
.
contentLab
.
text
=
praiseModel
.
content
;
[
self
.
userNameLab
mas_remakeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
userIcon
.
mas_right
).
offset
(
12
);
make
.
top
.
equalTo
(
self
.
userIcon
);
make
.
right
.
equalTo
(
self
.
timeLab
.
mas_left
).
offset
(
-
30
);
}];
}
#pragma mark - lazy
-
(
UIImageView
*
)
userIcon
{
if
(
!
_userIcon
)
{
_userIcon
=
[
UIImageView
new
];
[
_userIcon
cornerRadius
:
20
];
_userIcon
.
dk_alphaPicker
=
DKAlphaPickerWithAlphas
(
1
.
f
,
0
.
5
f
,
0
.
1
f
);
}
return
_userIcon
;
}
-
(
UILabel
*
)
userNameLab
{
if
(
!
_userNameLab
)
{
_userNameLab
=
[
UILabel
labWithFont
:
BoldFont
(
15
)];
_userNameLab
.
dk_textColorPicker
=
DKColorPickerWithKey
(
Dk_TITLE
);
}
return
_userNameLab
;
}
-
(
UILabel
*
)
timeLab
{
if
(
!
_timeLab
)
{
_timeLab
=
[
UILabel
labWithFont
:
SysFont
(
12
)];
_timeLab
.
textAlignment
=
NSTextAlignmentRight
;
_timeLab
.
dk_textColorPicker
=
DKColorPickerWithColors
(
SmallTextColor
,
ColorFromHexA
(
0xFFFFFF
,
.
3
),
DSWhite
);
}
return
_timeLab
;
}
-
(
UILabel
*
)
tipLab
{
if
(
!
_tipLab
)
{
_tipLab
=
[
UILabel
labWithFont
:
SysFont
(
12
)];
_tipLab
.
text
=
@"赞了你的动态"
;
_tipLab
.
dk_textColorPicker
=
DKColorPickerWithColors
(
SmallTextColor
,
ColorFromHexA
(
0xFFFFFF
,
.
3
),
DSWhite
);
}
return
_tipLab
;
}
-
(
UILabel
*
)
contentLab
{
if
(
!
_contentLab
)
{
_contentLab
=
[
UILabel
labWithFont
:
SysFont
(
14
)];
_contentLab
.
dk_textColorPicker
=
DKColorPickerWithColors
(
SmallTextColor
,
ColorFromHexA
(
0xFFFFFF
,
.
4
),
DSWhite
);
}
return
_contentLab
;
}
@end
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_guanfangtongzhi.imageset/Contents.json
0 → 100644
查看文件 @
d245df3
{
"images"
:
[
{
"filename"
:
"ic_xiaoxi_guanfangtongzhi.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"ic_xiaoxi_guanfangtongzhi@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"ic_xiaoxi_guanfangtongzhi@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_guanfangtongzhi.imageset/ic_xiaoxi_guanfangtongzhi.png
0 → 100644
查看文件 @
d245df3
1.5 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_guanfangtongzhi.imageset/ic_xiaoxi_guanfangtongzhi@2x.png
0 → 100644
查看文件 @
d245df3
3.1 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_guanfangtongzhi.imageset/ic_xiaoxi_guanfangtongzhi@3x.png
0 → 100644
查看文件 @
d245df3
5.6 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_shoudaodezan.imageset/Contents.json
0 → 100644
查看文件 @
d245df3
{
"images"
:
[
{
"filename"
:
"ic_xiaoxi_shoudaodezan.png"
,
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"ic_xiaoxi_shoudaodezan@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"ic_xiaoxi_shoudaodezan@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_shoudaodezan.imageset/ic_xiaoxi_shoudaodezan.png
0 → 100644
查看文件 @
d245df3
1.5 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_shoudaodezan.imageset/ic_xiaoxi_shoudaodezan@2x.png
0 → 100644
查看文件 @
d245df3
3.2 KB
DreamSleep/DreamSleep/Resource/Assets.xcassets/Community/ic_xiaoxi_shoudaodezan.imageset/ic_xiaoxi_shoudaodezan@3x.png
0 → 100644
查看文件 @
d245df3
5.6 KB
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论