| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- //
- // YRMineModel.m
- // UU_Ent
- //
- // Created by huangyp-pc on 2019/5/7.
- // Copyright © 2019 UAS. All rights reserved.
- //
- #import "YRMineModel.h"
- @implementation YRMineModel
- /**
- 匹配目标控制器
- */
- -(void)setId_p:(NSString *)id_p
- {
- _id_p = id_p;
-
- NSString *path = [[NSBundle mainBundle]pathForResource:@"mine_route" ofType:@"json"];
-
- NSData *data = [[NSData alloc]initWithContentsOfFile:path];
-
- NSError *error = nil;
-
- NSDictionary *routeDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
-
- NSArray *routeArr = routeDic[@"data"];
-
- for (NSDictionary *dic in routeArr) {
-
- if ([_id_p isEqualToString:dic[@"id_p"]]) {
-
- self.desVC = dic[@"desVc"];
-
- }
-
- }
-
- //如果没找到,则用服务器返回的类型控制器名
- if (!self.desVC) {
-
- self.desVC = self.iosWidget;
-
- }
-
- }
- @end
|