|
@@ -31,25 +31,43 @@
|
|
// if (obj.deep == 0) {
|
|
// if (obj.deep == 0) {
|
|
// [citys enumerateObjectsUsingBlock:^(BRAddressModel * obj1, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
// [citys enumerateObjectsUsingBlock:^(BRAddressModel * obj1, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
// if (obj1.deep == 1 && [obj1.code hasPrefix:obj.code]) {
|
|
// if (obj1.deep == 1 && [obj1.code hasPrefix:obj.code]) {
|
|
|
|
+// NSArray *pys1 = [obj1.pinyin componentsSeparatedByString:@" "];
|
|
|
|
+// NSMutableString *pyC = [NSMutableString string];
|
|
|
|
+// [pys1 enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
+// [pyC appendFormat:@"%@",[obj capitalizedString]];
|
|
|
|
+// }];
|
|
|
|
+// obj1.pinyin = pyC;
|
|
// [obj.addressModel addObject:obj1];
|
|
// [obj.addressModel addObject:obj1];
|
|
// [citys enumerateObjectsUsingBlock:^(BRAddressModel * obj2, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
// [citys enumerateObjectsUsingBlock:^(BRAddressModel * obj2, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
// if (obj2.deep == 2 && [obj2.code hasPrefix:obj1.code]) {
|
|
// if (obj2.deep == 2 && [obj2.code hasPrefix:obj1.code]) {
|
|
|
|
+// NSArray *pys2 = [obj2.pinyin componentsSeparatedByString:@" "];
|
|
|
|
+// NSMutableString *pyC = [NSMutableString string];
|
|
|
|
+// [pys2 enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
+// [pyC appendFormat:@"%@",[obj capitalizedString]];
|
|
|
|
+// }];
|
|
|
|
+// obj2.pinyin = pyC;
|
|
// [obj1.addressModel addObject:obj2];
|
|
// [obj1.addressModel addObject:obj2];
|
|
// }
|
|
// }
|
|
// }];
|
|
// }];
|
|
-// NSString *py = [obj1.pinyin stringByReplacingOccurrencesOfString:@" " withString:@""];
|
|
|
|
-// [mstr appendFormat:@"\"%@\" = \"%@\";\n",obj1.extName,[py capitalizedString]];
|
|
|
|
|
|
+// [mstr appendFormat:@"\"%@\" = \"%@\";\n",obj1.extName,pyC];
|
|
// }
|
|
// }
|
|
// }];
|
|
// }];
|
|
|
|
+// NSArray *pys = [obj.pinyin componentsSeparatedByString:@" "];
|
|
|
|
+// NSMutableString *pyC = [NSMutableString string];
|
|
|
|
+// [pys enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
+// [pyC appendFormat:@"%@",[obj capitalizedString]];
|
|
|
|
+// }];
|
|
|
|
+// obj.pinyin = pyC;
|
|
// [marr addObject:obj];
|
|
// [marr addObject:obj];
|
|
-// NSString *py = [obj.pinyin stringByReplacingOccurrencesOfString:@" " withString:@""];
|
|
|
|
-// [mstr appendFormat:@"\"%@\" = \"%@\";\n",obj.extName,[py capitalizedString]];
|
|
|
|
|
|
+//
|
|
|
|
+////// NSString *py = [obj.pinyin stringByReplacingOccurrencesOfString:@" " withString:@""];
|
|
|
|
+// [mstr appendFormat:@"\"%@\" = \"%@\";\n",obj.extName,pyC];
|
|
// }
|
|
// }
|
|
// }];
|
|
// }];
|
|
// NSArray *dictArr = [NSObject mj_keyValuesArrayWithObjectArray:marr];
|
|
// NSArray *dictArr = [NSObject mj_keyValuesArrayWithObjectArray:marr];
|
|
// NSString *cityjson = [dictArr mj_JSONString];
|
|
// NSString *cityjson = [dictArr mj_JSONString];
|
|
-
|
|
|
|
-// NSLog(@"%@",cityjson);
|
|
|
|
|
|
+//
|
|
|
|
+// NSLog(@"%@",cityjson);
|
|
// NSLog(@"%@",mstr);
|
|
// NSLog(@"%@",mstr);
|
|
|
|
|
|
// NSLog(@"---%@--%@",citys,citysStr);
|
|
// NSLog(@"---%@--%@",citys,citysStr);
|