1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- //
- // OrbitVC.m
- // jiaPeiC
- //
- // Created by apple on 16/9/12.
- // Copyright © 2016年 JCZ. All rights reserved.
- //
- #import "OrbitVC.h"
- #import <WebKit/WebKit.h>
- @implementation OrbitVC
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- self.title = @"轨迹回放";
- self.view.backgroundColor = backGroundColor;
- [self configNavBar];
-
- [self getStudentTrack];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- }
- -(void)creatWebViewWithUrlStr:(NSString *)urlStr
- {
- WKWebView *view = [[WKWebView alloc] initWithFrame:kFrame];
- view.y += kNavOffSet;
- view.height = kSize.height - kNavOffSet;
- [self.view addSubview: view];
-
- NSURLRequest *request = nil;
- request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@api/orderTrack?classId=%@&stuOutId=%@",urlStr,_classId,_stuOutId]]];
- // NSLog(@"%@",request);
-
- if (![Util connectedToNetWork]) {
- showMsgUnconnect();
- return;
- }
-
- [LoadingView showHUD];
- [view loadRequest:request];
-
- }
- - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
- RemoveHUD();
- }
- - (void)getStudentTrack {
- [LoadingView showHUD];
- if (![Util connectedToNetWork]) {
- showMsgUnconnect();
- return;
- }
-
- NSMutableArray *arr=[NSMutableArray array];
- [arr addPro:@"dqbh" Value:defUser.userDict[@"cityId"]];
-
- NSString* method = @"getStudentTrack";
- [jiaPeiManager requestAnythingWithURL:method array:arr data:nil completion:^(NSDictionary *root) {
-
- RemoveHUD();
-
- if (!root) {
- ShowMsgFailed();
- return;
- }
- if ([root[@"code"] isEqualToString:@"1"]) {
- ShowMsg(root[@"body"]);
- return;
- }
- NSString * str = root[@"body"];
- [self creatWebViewWithUrlStr:str];
- }];
- }
- @end
|