Commit b8f4992c cgx

意见反馈、修改用户昵称处理英文双引号转义;我的CBTI图片添加夜间模式;

1 个父辈 28d4262c
...@@ -26,6 +26,10 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -26,6 +26,10 @@ NS_ASSUME_NONNULL_BEGIN
* @return 转换后的string * @return 转换后的string
*/ */
+ (NSString *)trimString:(NSString *)oldStr; + (NSString *)trimString:(NSString *)oldStr;
/// 将英文双引号转义成\"
/// @param oriStr 传入的字符串
+ (NSString *)transferEnglishDoubleQuotationMarks:(NSString *)oriStr;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -37,4 +37,11 @@ ...@@ -37,4 +37,11 @@
return newStr; return newStr;
} }
+ (NSString *)transferEnglishDoubleQuotationMarks:(NSString *)oriStr {
if (oriStr && [oriStr isKindOfClass:[NSString class]]) {
return [[NSString stringWithFormat:@"%@", oriStr] stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""];
}
return @"";
}
@end @end
...@@ -70,13 +70,13 @@ ...@@ -70,13 +70,13 @@
#pragma mark - Actions #pragma mark - Actions
- (void)saveAction { - (void)saveAction {
[DSProgressHUD showProgressHUDWithInfo:@""]; [DSProgressHUD showProgressHUDWithInfo:@""];
NSDictionary *data = @{@"nick_name" : self.nickTF.text}; NSDictionary *data = @{@"nick_name" : [NSString transferEnglishDoubleQuotationMarks:self.nickTF.text]};
WS(weakSelf); WS(weakSelf);
[UserRequestModel updateUserInfoWithData:data completion:^(UserRequestModel * _Nonnull requestModel) { [UserRequestModel updateUserInfoWithData:data completion:^(UserRequestModel * _Nonnull requestModel) {
[DSProgressHUD dissmissProgressHUD]; [DSProgressHUD dissmissProgressHUD];
if (requestModel.resCode == DSResCodeSuccess) { if (requestModel.resCode == DSResCodeSuccess) {
[DSProgressHUD showToast:@"修改成功"]; [DSProgressHUD showToast:@"修改成功"];
[LoginUtils updateUserInfo:data]; [LoginUtils updateUserInfo:@{@"nick_name" : self.nickTF.text}];
if (weakSelf.block) { weakSelf.block(); } if (weakSelf.block) { weakSelf.block(); }
[weakSelf.navigationController popViewControllerAnimated:YES]; [weakSelf.navigationController popViewControllerAnimated:YES];
......
...@@ -115,7 +115,8 @@ static int AlbumColumnCount = 4; ...@@ -115,7 +115,8 @@ static int AlbumColumnCount = 4;
// 发送提交请求 // 发送提交请求
[DSProgressHUD showProgressHUDWithInfo:@"提交中..."]; [DSProgressHUD showProgressHUDWithInfo:@"提交中..."];
_result_imgurls = _result_imgurls ? _result_imgurls : @""; _result_imgurls = _result_imgurls ? _result_imgurls : @"";
[FeedbackRequestModel adviceFeedbackRequestWithContent:self.feedTV.text contentImg:_result_imgurls completion:^(FeedbackRequestModel * _Nonnull requestModel) { NSString * feedStr = [NSString transferEnglishDoubleQuotationMarks:self.feedTV.text];
[FeedbackRequestModel adviceFeedbackRequestWithContent:feedStr contentImg:_result_imgurls completion:^(FeedbackRequestModel * _Nonnull requestModel) {
[DSProgressHUD dissmissProgressHUD]; [DSProgressHUD dissmissProgressHUD];
if (requestModel.resCode == DSResCodeSuccess) { if (requestModel.resCode == DSResCodeSuccess) {
[DSProgressHUD showDetailInfo:@"已收到您的宝贵建议,谢谢!"]; [DSProgressHUD showDetailInfo:@"已收到您的宝贵建议,谢谢!"];
......
...@@ -256,6 +256,7 @@ ...@@ -256,6 +256,7 @@
introduceIV.userInteractionEnabled = YES; introduceIV.userInteractionEnabled = YES;
[_footerView addSubview:introduceIV]; [_footerView addSubview:introduceIV];
UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapCBTIAction)]; UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapCBTIAction)];
introduceIV.dk_alphaPicker = DKAlphaPickerWithAlphas(1.0, .5, 1.0);
[introduceIV addGestureRecognizer:tapGR]; [introduceIV addGestureRecognizer:tapGR];
self.introduceIV = introduceIV; self.introduceIV = introduceIV;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!