Commit 0226a575 cgx

优化我的反馈详情弱网重载

1 个父辈 6aefde39
......@@ -1541,7 +1541,7 @@
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Dev";
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要访问您的相机。";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
......@@ -1662,7 +1662,7 @@
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = "$(inherited)/**";
INFOPLIST_FILE = DreamSleep/DSConfig/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Dev";
INFOPLIST_KEY_CFBundleDisplayName = "小梦睡眠-Beta";
INFOPLIST_KEY_NSCameraUsageDescription = "APP需要访问您的相机。";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
......
......@@ -8,7 +8,6 @@
#import "DsWebController.h"
#import <WebKit/webKit.h>
#import "DsMaskView.h"
#import "ExceptionDefaultView.h"
@interface DsWebController () <WKNavigationDelegate>
@property (nonatomic, copy) NSString *naviTitle;
......
......@@ -21,6 +21,8 @@
@property (nonatomic, strong) UILabel *replierContentLab;
@property (nonatomic, strong) UILabel *replierNameLab;
@property (nonatomic, strong) UILabel *replierTimeLab;
@property (nonatomic, strong) ExceptionDefaultView *exceptionView;
@end
@implementation FeedbackDetailController
......@@ -31,13 +33,22 @@
self.navigationItem.title = @"详情信息";
self.view.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
[self getDetailRequest];
}
#pragma mark - 获取详情
- (void)getDetailRequest {
[FeedbackRequestModel queryAdviceDetailWithAdviceID:self.advice_id completion:^(FeedbackRequestModel * _Nonnull requestModel) {
if (requestModel.resCode == DSResCodeSuccess) {
self.exceptionView.hidden = YES;
[self buildUI:requestModel.feedDetailModel];
} else {
self.exceptionView.hidden = NO;
}
}];
}
#pragma mark - UI布局
- (void)buildUI:(MyFeedDetailModel *)detailModel {
[self.view addSubview:self.detailSV];
[self.detailSV mas_makeConstraints:^(MASConstraintMaker *make) {
......@@ -142,6 +153,7 @@
}];
}
#pragma mark - 浏览图片
- (void)tapGRAction:(UITapGestureRecognizer *)gr {
UIImageView *showIV = (UIImageView *)gr.view;
showIV.image;
......@@ -241,4 +253,15 @@
return _replierTimeLab;
}
- (ExceptionDefaultView *)exceptionView {
if (!_exceptionView) {
WS(weakSelf);
_exceptionView = [[ExceptionDefaultView alloc] initWithType:ExceptionTypeNet block:^{
weakSelf.exceptionView.hidden = YES;
[weakSelf getDetailRequest];
} superView:self.view];
}
return _exceptionView;
}
@end
......@@ -68,7 +68,7 @@
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) {
return [self httpPostBodyRequestWithAPI:api params:@{@"query" : argStr} view:nil hasNetActivity:YES loadingInfo:nil hasFailInfo:NO success:^(NSDictionary * _Nonnull apiDic) {
DSLog(@"用户反馈建议详情接口apiDic:%@", apiDic);
NSDictionary *resultDic = [apiDic valueForKey:@"result"];
requestModel.feedDetailModel = [MyFeedDetailModel yy_modelWithDictionary:resultDic];
......
......@@ -31,6 +31,7 @@
#import "NaviBarHandlerProtocol.h"
#import "BaseNaviController.h"
#import "DsWebController.h"
#import "ExceptionDefaultView.h"
#import "DSProgressHUD.h"
#import "DSGifHeader.h"
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!