Commit 10d1c276 cgx

反馈详情页面接口

1 个父辈 a7a8570c
......@@ -26,6 +26,7 @@
D027EE2927FB51D0004BBA61 /* DSGifHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = D027EE2827FB51D0004BBA61 /* DSGifHeader.m */; };
D027EE3027FB52DA004BBA61 /* UIImage+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = D027EE2F27FB52DA004BBA61 /* UIImage+Extras.m */; };
D027EE3227FB5464004BBA61 /* pull_down.gif in Resources */ = {isa = PBXBuildFile; fileRef = D027EE3127FB5464004BBA61 /* pull_down.gif */; };
D03AE82B281A9010001C0726 /* MyFeedDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D03AE82A281A9010001C0726 /* MyFeedDetailModel.m */; };
D046FE0D28100342000295AC /* UMSocialSDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D046FDF728100342000295AC /* UMSocialSDKResources.bundle */; };
D046FE0E28100342000295AC /* UShareUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D046FDF828100342000295AC /* UShareUI.framework */; };
D046FE0F28100342000295AC /* UMShare.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D046FDF928100342000295AC /* UMShare.framework */; };
......@@ -185,6 +186,8 @@
D027EE2E27FB52DA004BBA61 /* UIImage+Extras.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+Extras.h"; sourceTree = "<group>"; };
D027EE2F27FB52DA004BBA61 /* UIImage+Extras.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Extras.m"; sourceTree = "<group>"; };
D027EE3127FB5464004BBA61 /* pull_down.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = pull_down.gif; sourceTree = "<group>"; };
D03AE829281A9010001C0726 /* MyFeedDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyFeedDetailModel.h; sourceTree = "<group>"; };
D03AE82A281A9010001C0726 /* MyFeedDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyFeedDetailModel.m; sourceTree = "<group>"; };
D046FDF728100342000295AC /* UMSocialSDKResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = UMSocialSDKResources.bundle; sourceTree = "<group>"; };
D046FDF828100342000295AC /* UShareUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UShareUI.framework; sourceTree = "<group>"; };
D046FDF928100342000295AC /* UMShare.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UMShare.framework; sourceTree = "<group>"; };
......@@ -932,6 +935,8 @@
D0D3826628124E8A005BB219 /* FeedbackController.m */,
D0AEFE77281781CF00230DC6 /* MyFeedModel.h */,
D0AEFE78281781CF00230DC6 /* MyFeedModel.m */,
D03AE829281A9010001C0726 /* MyFeedDetailModel.h */,
D03AE82A281A9010001C0726 /* MyFeedDetailModel.m */,
D062A09C281838B800B4F48A /* FeedbackRequestModel.h */,
D062A09D281838B800B4F48A /* FeedbackRequestModel.m */,
);
......@@ -1238,6 +1243,7 @@
D0BE32E62814D42B006539BE /* HomeRequestModel.m in Sources */,
D0D3826728124E8A005BB219 /* FeedbackController.m in Sources */,
D027EE2627FB3DC0004BBA61 /* NetLoadingStateView.m in Sources */,
D03AE82B281A9010001C0726 /* MyFeedDetailModel.m in Sources */,
D0C09EE028007E5F00709D4C /* BreatheController.m in Sources */,
D0C50B4627FD66FB00DC68F0 /* DSConstUtil.m in Sources */,
D08F79DC281A1838000D99DD /* TZProgressView.m in Sources */,
......
......@@ -12,6 +12,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 反馈详情页面
@interface FeedbackDetailController : UIViewController
/// 建议反馈记录id
@property (nonatomic, assign) int advice_id;
@end
NS_ASSUME_NONNULL_END
......@@ -6,9 +6,18 @@
//
#import "FeedbackDetailController.h"
#import "FeedbackRequestModel.h"
@interface FeedbackDetailController ()
@property (nonatomic, strong) UIScrollView *detailSV;
@property (nonatomic, strong) UIView *containerView;
@property (nonatomic, strong) UIView *feedView;
@property (nonatomic, strong) UILabel *contentLab;
@property (nonatomic, strong) UILabel *createdTimeLab;
@property (nonatomic, strong) UIView *replyView;
@property (nonatomic, strong) UILabel *replyTitleLab;
@property (nonatomic, strong) UILabel *replierContent;
@property (nonatomic, strong) UILabel *replierTimeLab;
@end
@implementation FeedbackDetailController
......@@ -18,6 +27,39 @@
self.navigationItem.title = @"详情信息";
self.view.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
[FeedbackRequestModel queryAdviceDetailWithAdviceID:self.advice_id completion:^(FeedbackRequestModel * _Nonnull requestModel) {
if (requestModel.resCode == DSResCodeSuccess) {
[self buildUI];
}
}];
}
- (void)buildUI {
[self.view addSubview:self.detailSV];
[self.detailSV addSubview:self.containerView];
[self.containerView addSubview:self.feedView];
[self.containerView addSubview:self.replyView];
[self.detailSV mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view).insets(UIEdgeInsetsMake(0, 0, 0, 0));
}];
[self.containerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.detailSV);
make.width.height.equalTo(self.detailSV);
}];
[self.feedView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.equalTo(self.containerView).offset(15);
make.right.equalTo(self.containerView).offset(-15);
make.height.equalTo(@200);
}];
[self.replyView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.containerView).offset(15);
make.right.equalTo(self.containerView).offset(-15);
make.top.equalTo(self.feedView.mas_bottom).offset(15);
make.height.equalTo(@200);
}];
}
#pragma mark - 品牌模式
......@@ -25,4 +67,37 @@
return NaviStyleDefault;
}
#pragma mark - lazy
- (UIScrollView *)detailSV {
if (!_detailSV) {
_detailSV = [UIScrollView new];
}
return _detailSV;
}
- (UIView *)containerView {
if (!_containerView) {
_containerView = [UIView new];
}
return _containerView;
}
- (UIView *)feedView {
if (!_feedView) {
_feedView = [UIView new];
[_feedView cornerRadius:12.0];
_feedView.dk_backgroundColorPicker = DKColorPickerWithKey(CornerViewBG);
}
return _feedView;
}
- (UIView *)replyView {
if (!_replyView) {
_replyView = [UIView new];
[_replyView cornerRadius:12.0];
_replyView.dk_backgroundColorPicker = DKColorPickerWithKey(CornerViewBG);
}
return _replyView;
}
@end
......@@ -6,6 +6,7 @@
//
#import "DSNetworkTool.h"
#import "MyFeedDetailModel.h"
NS_ASSUME_NONNULL_BEGIN
......@@ -18,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) int unreadCount;
/// 图片上传返回的图片urls
@property (nonatomic, copy) NSString *result_imgurls;
/// 反馈详情数据model
@property (nonatomic, strong) MyFeedDetailModel *feedDetailModel;
/// 用户提交反馈接口请求
/// @param content 反馈内容
......
......@@ -70,9 +70,8 @@
NSString *argStr = [NSString stringWithFormat:@"query{%@(id:%d)}", api, adviceID];
return [self httpPostBodyRequestWithAPI:api params:@{@"query" : argStr} view:nil hasNetActivity:YES loadingInfo:nil hasFailInfo:YES success:^(NSDictionary * _Nonnull apiDic) {
DSLog(@"用户反馈建议详情接口apiDic:%@", apiDic);
// 字典转模型
NSDictionary *resultDic = [apiDic valueForKey:@"result"];
requestModel.feedDetailModel = [MyFeedDetailModel yy_modelWithDictionary:resultDic];
requestModel.resCode = DSResCodeSuccess;
completion(requestModel);
} failure:^(id _Nonnull failureInfo) {
......
//
// MyFeedDetailModel.h
// DreamSleep
//
// Created by peter on 2022/4/28.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// 我的反馈详情数据model
@interface MyFeedDetailModel : NSObject
// 反馈建议id
@property (nonatomic, assign) int feed_id;
/// 标题
@property (nonatomic, copy) NSString *title;
// 反馈内容
@property (nonatomic, copy) NSString *content;
// 反馈图片 多张图片用','分隔
@property (nonatomic, copy) NSString *content_img;
// 反馈时间
@property (nonatomic, copy) NSString *created_at;
// 回复用户名称
@property (nonatomic, copy) NSString *replier_name;
// 回复内容
@property (nonatomic, copy) NSString *replier_content;
// 回复时间
@property (nonatomic, copy) NSString *replier_time;
@end
NS_ASSUME_NONNULL_END
//
// MyFeedDetailModel.m
// DreamSleep
//
// Created by peter on 2022/4/28.
//
#import "MyFeedDetailModel.h"
@implementation MyFeedDetailModel
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper {
return @{@"feed_id" : @"id"};
}
@end
......@@ -80,6 +80,7 @@
}
FeedbackDetailController *detailVC = [FeedbackDetailController new];
detailVC.advice_id = model.feed_id;
[self.navigationController pushViewController:detailVC animated:YES];
}
......
......@@ -2,6 +2,7 @@ NORMAL NIGHT RED
#FFFFFF #131724 #FAF5F5 TabBarBG
#F5F7FA #161E38 #FAF5F5 VCViewBG
#F0F2F5 #161E38 #000000 LeadViewBG
#FFFFFF #1F263F #000000 CornerViewBG
#E5E5E5 #FFFFFF #000000 LeadPageIndicator
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!