Commit b8f4992c cgx

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

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