Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
陈高翔
/
DreamSleep-iOS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 51fa6803
由
cgx
编写于
2022-04-26 23:08:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
编写反馈模块相关请求接口
1 个父辈
682e596d
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
190 行增加
和
1 行删除
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
DreamSleep/DreamSleep/Profile/Feedback/FeedbackDetailController.h
DreamSleep/DreamSleep/Profile/Feedback/FeedbackDetailController.m
DreamSleep/DreamSleep/Profile/Feedback/FeedbackRequestModel.h
DreamSleep/DreamSleep/Profile/Feedback/FeedbackRequestModel.m
DreamSleep/DreamSleep/Profile/Feedback/MyFeedListController.m
DreamSleep/DreamSleep.xcodeproj/project.pbxproj
查看文件 @
51fa680
...
@@ -51,6 +51,8 @@
...
@@ -51,6 +51,8 @@
D0506B1828054ECD00229278 /* SafeHelperCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0506B1728054ECD00229278 /* SafeHelperCollectionView.m */; };
D0506B1828054ECD00229278 /* SafeHelperCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0506B1728054ECD00229278 /* SafeHelperCollectionView.m */; };
D0506B1B2805500E00229278 /* SafeHelperCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D0506B1A2805500E00229278 /* SafeHelperCollectionViewCell.m */; };
D0506B1B2805500E00229278 /* SafeHelperCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D0506B1A2805500E00229278 /* SafeHelperCollectionViewCell.m */; };
D053BEE9280F9E310028CCFC /* CloseAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = D053BEE8280F9E310028CCFC /* CloseAlertView.m */; };
D053BEE9280F9E310028CCFC /* CloseAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = D053BEE8280F9E310028CCFC /* CloseAlertView.m */; };
D062A09E281838B800B4F48A /* FeedbackRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D062A09D281838B800B4F48A /* FeedbackRequestModel.m */; };
D062A0A128183FE000B4F48A /* FeedbackDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = D062A0A028183FE000B4F48A /* FeedbackDetailController.m */; };
D070509A28071BAF006D72E1 /* DSNetworkTool.m in Sources */ = {isa = PBXBuildFile; fileRef = D070509928071BAF006D72E1 /* DSNetworkTool.m */; };
D070509A28071BAF006D72E1 /* DSNetworkTool.m in Sources */ = {isa = PBXBuildFile; fileRef = D070509928071BAF006D72E1 /* DSNetworkTool.m */; };
D07A4B27280E9BAA00BA0EC0 /* AccountController.m in Sources */ = {isa = PBXBuildFile; fileRef = D07A4B26280E9BAA00BA0EC0 /* AccountController.m */; };
D07A4B27280E9BAA00BA0EC0 /* AccountController.m in Sources */ = {isa = PBXBuildFile; fileRef = D07A4B26280E9BAA00BA0EC0 /* AccountController.m */; };
D07A4B2A280EA6B600BA0EC0 /* UserInfoTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = D07A4B29280EA6B600BA0EC0 /* UserInfoTableView.m */; };
D07A4B2A280EA6B600BA0EC0 /* UserInfoTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = D07A4B29280EA6B600BA0EC0 /* UserInfoTableView.m */; };
...
@@ -207,6 +209,10 @@
...
@@ -207,6 +209,10 @@
D0506B1A2805500E00229278 /* SafeHelperCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SafeHelperCollectionViewCell.m; sourceTree = "<group>"; };
D0506B1A2805500E00229278 /* SafeHelperCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SafeHelperCollectionViewCell.m; sourceTree = "<group>"; };
D053BEE7280F9E310028CCFC /* CloseAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CloseAlertView.h; sourceTree = "<group>"; };
D053BEE7280F9E310028CCFC /* CloseAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CloseAlertView.h; sourceTree = "<group>"; };
D053BEE8280F9E310028CCFC /* CloseAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CloseAlertView.m; sourceTree = "<group>"; };
D053BEE8280F9E310028CCFC /* CloseAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CloseAlertView.m; sourceTree = "<group>"; };
D062A09C281838B800B4F48A /* FeedbackRequestModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FeedbackRequestModel.h; sourceTree = "<group>"; };
D062A09D281838B800B4F48A /* FeedbackRequestModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FeedbackRequestModel.m; sourceTree = "<group>"; };
D062A09F28183FE000B4F48A /* FeedbackDetailController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FeedbackDetailController.h; sourceTree = "<group>"; };
D062A0A028183FE000B4F48A /* FeedbackDetailController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FeedbackDetailController.m; sourceTree = "<group>"; };
D070509828071BAF006D72E1 /* DSNetworkTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSNetworkTool.h; sourceTree = "<group>"; };
D070509828071BAF006D72E1 /* DSNetworkTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSNetworkTool.h; sourceTree = "<group>"; };
D070509928071BAF006D72E1 /* DSNetworkTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DSNetworkTool.m; sourceTree = "<group>"; };
D070509928071BAF006D72E1 /* DSNetworkTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DSNetworkTool.m; sourceTree = "<group>"; };
D07A4B25280E9BAA00BA0EC0 /* AccountController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountController.h; sourceTree = "<group>"; };
D07A4B25280E9BAA00BA0EC0 /* AccountController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountController.h; sourceTree = "<group>"; };
...
@@ -833,12 +839,16 @@
...
@@ -833,12 +839,16 @@
D0AEFE7E2817DD1500230DC6 /* MyFeedCell.m */,
D0AEFE7E2817DD1500230DC6 /* MyFeedCell.m */,
D0AEFE7F2817DD1500230DC6 /* MyFeedListController.h */,
D0AEFE7F2817DD1500230DC6 /* MyFeedListController.h */,
D0AEFE802817DD1500230DC6 /* MyFeedListController.m */,
D0AEFE802817DD1500230DC6 /* MyFeedListController.m */,
D062A09F28183FE000B4F48A /* FeedbackDetailController.h */,
D062A0A028183FE000B4F48A /* FeedbackDetailController.m */,
D0AEFE7B2817D13400230DC6 /* UITableViewCell+CardRadius.h */,
D0AEFE7B2817D13400230DC6 /* UITableViewCell+CardRadius.h */,
D0AEFE7A2817D13400230DC6 /* UITableViewCell+CardRadius.m */,
D0AEFE7A2817D13400230DC6 /* UITableViewCell+CardRadius.m */,
D0D3826528124E8A005BB219 /* FeedbackController.h */,
D0D3826528124E8A005BB219 /* FeedbackController.h */,
D0D3826628124E8A005BB219 /* FeedbackController.m */,
D0D3826628124E8A005BB219 /* FeedbackController.m */,
D0AEFE77281781CF00230DC6 /* MyFeedModel.h */,
D0AEFE77281781CF00230DC6 /* MyFeedModel.h */,
D0AEFE78281781CF00230DC6 /* MyFeedModel.m */,
D0AEFE78281781CF00230DC6 /* MyFeedModel.m */,
D062A09C281838B800B4F48A /* FeedbackRequestModel.h */,
D062A09D281838B800B4F48A /* FeedbackRequestModel.m */,
);
);
path = Feedback;
path = Feedback;
sourceTree = "<group>";
sourceTree = "<group>";
...
@@ -1106,6 +1116,7 @@
...
@@ -1106,6 +1116,7 @@
D09D0E9D280D73B6008DEDAB /* InviteController.m in Sources */,
D09D0E9D280D73B6008DEDAB /* InviteController.m in Sources */,
D04B3D9A27F6D4D90022F8DF /* LeadingController.m in Sources */,
D04B3D9A27F6D4D90022F8DF /* LeadingController.m in Sources */,
D053BEE9280F9E310028CCFC /* CloseAlertView.m in Sources */,
D053BEE9280F9E310028CCFC /* CloseAlertView.m in Sources */,
D062A0A128183FE000B4F48A /* FeedbackDetailController.m in Sources */,
D0BB9AA4281626F200DB209E /* ExceptionDefaultView.m in Sources */,
D0BB9AA4281626F200DB209E /* ExceptionDefaultView.m in Sources */,
D0B5ECD827F2F1B0003EDFE3 /* ServerAPIUtil.m in Sources */,
D0B5ECD827F2F1B0003EDFE3 /* ServerAPIUtil.m in Sources */,
D0B5ECA627F2D9DE003EDFE3 /* AppDelegate.m in Sources */,
D0B5ECA627F2D9DE003EDFE3 /* AppDelegate.m in Sources */,
...
@@ -1186,6 +1197,7 @@
...
@@ -1186,6 +1197,7 @@
D0BB9AA728164DFB00DB209E /* NickNameController.m in Sources */,
D0BB9AA728164DFB00DB209E /* NickNameController.m in Sources */,
D0F808FE280421C20097899F /* ThreeMinuteController.m in Sources */,
D0F808FE280421C20097899F /* ThreeMinuteController.m in Sources */,
D07A4B27280E9BAA00BA0EC0 /* AccountController.m in Sources */,
D07A4B27280E9BAA00BA0EC0 /* AccountController.m in Sources */,
D062A09E281838B800B4F48A /* FeedbackRequestModel.m in Sources */,
D01814E8280020F900583D4E /* CWPageControl.m in Sources */,
D01814E8280020F900583D4E /* CWPageControl.m in Sources */,
D027EE3027FB52DA004BBA61 /* UIImage+Extras.m in Sources */,
D027EE3027FB52DA004BBA61 /* UIImage+Extras.m in Sources */,
D0506B1828054ECD00229278 /* SafeHelperCollectionView.m in Sources */,
D0506B1828054ECD00229278 /* SafeHelperCollectionView.m in Sources */,
...
...
DreamSleep/DreamSleep/Profile/Feedback/FeedbackDetailController.h
0 → 100644
查看文件 @
51fa680
//
// FeedbackDetailController.h
// DreamSleep
//
// Created by peter on 2022/4/26.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/// 反馈详情页面
@interface
FeedbackDetailController
:
UIViewController
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Profile/Feedback/FeedbackDetailController.m
0 → 100644
查看文件 @
51fa680
//
// FeedbackDetailController.m
// DreamSleep
//
// Created by peter on 2022/4/26.
//
#import "FeedbackDetailController.h"
@interface
FeedbackDetailController
()
@end
@implementation
FeedbackDetailController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
navigationItem
.
title
=
@"详情信息"
;
self
.
view
.
dk_backgroundColorPicker
=
DKColorPickerWithKey
(
VCViewBG
);
}
#pragma mark - 品牌模式
-
(
NaviStyle
)
navigationBarStyle
{
return
NaviStyleDefault
;
}
@end
DreamSleep/DreamSleep/Profile/Feedback/FeedbackRequestModel.h
0 → 100644
查看文件 @
51fa680
//
// FeedbackRequestModel.h
// DreamSleep
//
// Created by peter on 2022/4/26.
//
#import "DSNetworkTool.h"
NS_ASSUME_NONNULL_BEGIN
/// 用户反馈模块请求model
@interface
FeedbackRequestModel
:
DSNetworkTool
/// 反馈列表数据
@property
(
nonatomic
,
strong
)
NSArray
*
adviceListArr
;
/// 用户反馈接口请求
/// @param completion completion
+
(
NSURLSessionDataTask
*
)
adviceFeedbackRequestWithCompletion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
;
/// 用户反馈建议列表请求
/// @param completion completion
+
(
NSURLSessionDataTask
*
)
queryUserAdviceListWithCompletion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
;
/// 用户删除反馈请求
/// @param adviceID 建议反馈id
/// @param completion completion
+
(
NSURLSessionDataTask
*
)
deleteAdviceFeedbackWithAdviceID
:(
int
)
adviceID
completion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
;
/// 查询用户反馈建议详情
/// @param adviceID 建议反馈记录id
/// @param completion completion
+
(
NSURLSessionDataTask
*
)
queryAdviceDetailWithAdviceID
:(
int
)
adviceID
completion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
;
// 我的反馈红点提醒接口(未找到)
+
(
NSURLSessionDataTask
*
)
queryAdviceAlertWithCompletion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
;
@end
NS_ASSUME_NONNULL_END
DreamSleep/DreamSleep/Profile/Feedback/FeedbackRequestModel.m
0 → 100644
查看文件 @
51fa680
//
// FeedbackRequestModel.m
// DreamSleep
//
// Created by peter on 2022/4/26.
//
#import "FeedbackRequestModel.h"
@implementation
FeedbackRequestModel
+
(
NSURLSessionDataTask
*
)
adviceFeedbackRequestWithCompletion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
{
FeedbackRequestModel
*
requestModel
=
[[
FeedbackRequestModel
alloc
]
init
];
NSString
*
api
=
@"advice_feedback"
;
NSString
*
argStr
=
[
NSString
stringWithFormat
:
@"mutation{%@(title:
\"
%@
\"
,content:
\"
%@
\"
,content_img:
\"
%@
\"
)}"
,
api
,
@"title"
,
@"content"
,
@"content_img"
];
return
[
self
httpPostBodyRequestWithAPI
:
api
params
:@{
@"query"
:
argStr
}
view
:
nil
hasNetActivity
:
YES
loadingInfo
:
nil
hasFailInfo
:
YES
success
:^
(
NSDictionary
*
_Nonnull
apiDic
)
{
DSLog
(
@"用户反馈接口apiDic:%@"
,
apiDic
);
requestModel
.
resCode
=
DSResCodeSuccess
;
completion
(
requestModel
);
}
failure
:^
(
id
_Nonnull
failureInfo
)
{
requestModel
.
resCode
=
DSResCodeNetFail
;
requestModel
.
errorInfo
=
failureInfo
;
completion
(
requestModel
);
}];
}
+
(
NSURLSessionDataTask
*
)
queryUserAdviceListWithCompletion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
{
FeedbackRequestModel
*
requestModel
=
[[
FeedbackRequestModel
alloc
]
init
];
NSString
*
api
=
@"query_user_advice_list"
;
int
user_id
=
[
LoginUtils
getUserID
];
NSString
*
argStr
=
[
NSString
stringWithFormat
:
@"query{%@(user_id:%d)}"
,
api
,
user_id
];
return
[
self
httpPostBodyRequestWithAPI
:
api
params
:@{
@"query"
:
argStr
}
view
:
nil
hasNetActivity
:
YES
loadingInfo
:
nil
hasFailInfo
:
YES
success
:^
(
NSDictionary
*
_Nonnull
apiDic
)
{
DSLog
(
@"用户反馈建议列表接口apiDic:%@"
,
apiDic
);
// 字典转模型
requestModel
.
resCode
=
DSResCodeSuccess
;
completion
(
requestModel
);
}
failure
:^
(
id
_Nonnull
failureInfo
)
{
requestModel
.
resCode
=
DSResCodeNetFail
;
requestModel
.
errorInfo
=
failureInfo
;
completion
(
requestModel
);
}];
}
+
(
NSURLSessionDataTask
*
)
deleteAdviceFeedbackWithAdviceID
:(
int
)
adviceID
completion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
{
FeedbackRequestModel
*
requestModel
=
[[
FeedbackRequestModel
alloc
]
init
];
NSString
*
api
=
@"delete_advice_feedback"
;
NSString
*
argStr
=
[
NSString
stringWithFormat
:
@"mutation{%@(advice_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
);
requestModel
.
resCode
=
DSResCodeSuccess
;
completion
(
requestModel
);
}
failure
:^
(
id
_Nonnull
failureInfo
)
{
requestModel
.
resCode
=
DSResCodeNetFail
;
requestModel
.
errorInfo
=
failureInfo
;
completion
(
requestModel
);
}];
}
+
(
NSURLSessionDataTask
*
)
queryAdviceDetailWithAdviceID
:(
int
)
adviceID
completion
:(
void
(
^
)(
FeedbackRequestModel
*
requestModel
))
completion
{
FeedbackRequestModel
*
requestModel
=
[[
FeedbackRequestModel
alloc
]
init
];
NSString
*
api
=
@"query_advice_detail"
;
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
);
// 字典转模型
requestModel
.
resCode
=
DSResCodeSuccess
;
completion
(
requestModel
);
}
failure
:^
(
id
_Nonnull
failureInfo
)
{
requestModel
.
resCode
=
DSResCodeNetFail
;
requestModel
.
errorInfo
=
failureInfo
;
completion
(
requestModel
);
}];
}
@end
DreamSleep/DreamSleep/Profile/Feedback/MyFeedListController.m
查看文件 @
51fa680
#import "MyFeedListController.h"
#import "MyFeedListController.h"
#import "MyFeedCell.h"
#import "MyFeedCell.h"
#import "FeedbackRequestModel.h"
#import "FeedbackDetailController.h"
@interface
MyFeedListController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
MyFeedListController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
feedbackIV
;
@property
(
nonatomic
,
strong
)
UITableView
*
feedbackIV
;
...
@@ -51,6 +53,11 @@
...
@@ -51,6 +53,11 @@
return
cell
;
return
cell
;
}
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
FeedbackDetailController
*
detailVC
=
[
FeedbackDetailController
new
];
[
self
.
navigationController
pushViewController
:
detailVC
animated
:
YES
];
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
willDisplayCell
:
(
UITableViewCell
*
)
cell
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
willDisplayCell
:
(
UITableViewCell
*
)
cell
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UIRectCorner
corner
=
UIRectCornerAllCorners
;
UIRectCorner
corner
=
UIRectCornerAllCorners
;
[
cell
insetCardViewWithCorners
:
corner
[
cell
insetCardViewWithCorners
:
corner
...
@@ -70,7 +77,13 @@
...
@@ -70,7 +77,13 @@
-
(
NSArray
*
)
tableView
:
(
UITableView
*
)
tableView
editActionsForRowAtIndexPath
:
(
nonnull
NSIndexPath
*
)
indexPath
{
-
(
NSArray
*
)
tableView
:
(
UITableView
*
)
tableView
editActionsForRowAtIndexPath
:
(
nonnull
NSIndexPath
*
)
indexPath
{
UITableViewRowAction
*
deleteAction
=
[
UITableViewRowAction
rowActionWithStyle
:
UITableViewRowActionStyleNormal
title
:
@"删除按钮宽度"
handler
:^
(
UITableViewRowAction
*
action
,
NSIndexPath
*
indexPath
)
{
UITableViewRowAction
*
deleteAction
=
[
UITableViewRowAction
rowActionWithStyle
:
UITableViewRowActionStyleNormal
title
:
@"删除按钮宽度"
handler
:^
(
UITableViewRowAction
*
action
,
NSIndexPath
*
indexPath
)
{
// 删除反馈请求
// 删除反馈请求
[
DSProgressHUD
showProgressHUDWithInfo
:
@""
];
[
FeedbackRequestModel
deleteAdviceFeedbackWithAdviceID
:
3
completion
:
^
(
FeedbackRequestModel
*
_Nonnull
requestModel
)
{
[
DSProgressHUD
dissmissProgressHUD
];
if
(
requestModel
.
resCode
==
DSResCodeSuccess
)
{
[
DSProgressHUD
showToast
:
@"删除成功"
];
}
}];
// 这句很重要,退出编辑模式,隐藏左滑菜单
// 这句很重要,退出编辑模式,隐藏左滑菜单
[
tableView
setEditing
:
NO
animated
:
YES
];
[
tableView
setEditing
:
NO
animated
:
YES
];
}];
}];
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论