加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
OCPostRequest.codesnippet 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
Shreker 提交于 2016-07-27 09:50 . Import Sources...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>ocrequest</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>CodeBlock</string>
</array>
<key>IDECodeSnippetContents</key>
<string>NSString *strBaseUrl = [NSString stringWithFormat:@"%@%@", QLBaseUrlString, @""];
NSDictionary *dicParams = @{@"&lt;##&gt;": &lt;#obj#&gt;,
@"&lt;##&gt;": &lt;#obj#&gt;};
[QLHttpTool postWithBaseUrl:strBaseUrl Parameters:dicParams WhenSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
if ([responseObject isKindOfClass:[NSDictionary class]]) {
NSDictionary *dicRes = responseObject;
if ([dicRes[@"code"] boolValue]) {
[QLHUDTool dissmis];
} else {
[QLHUDTool showErrorWithStatus:dicRes[@"msg"]];
}
} else {
[QLHUDTool showErrorWithStatus:@"请求失败,请稍后再试"];
}
} WhenFailure:^(AFHTTPRequestOperation *operation, NSError *error) {
[QLHUDTool showErrorWithStatus:@"请求失败,请稍后再试"];
}];</string>
<key>IDECodeSnippetIdentifier</key>
<string>B086C20D-C466-499D-94AA-19218AB6C040</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Objective-C</string>
<key>IDECodeSnippetSummary</key>
<string>网络请求模型</string>
<key>IDECodeSnippetTitle</key>
<string>OCRequest</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化