 //
 
 import UIKit
+import SVProgressHUD
 
 class LSOAthViewController: UIViewController {
     

        
        //4.请求数据
        webView.loadRequest(request)
        
    }
    
    //私有方法
    
    @objc fileprivate func back() {
        self.dismiss(animated: true, completion: nil)
    }
    
    @objc fileprivate func autoStuff() {
        
        let AutoStuffContent = "document.getElementById('userId').value='13522154166';" +
         "document.getElementById('passwd').value='luoriver';"
        
        //测试javascript注入
//        let AutoStuffContent = "document.getElementById('loginName').value='13522154166';" +
//                            "document.getElementById('loginPassword').value='luoriver';"
        
        webView.stringByEvaluatingJavaScript(from: AutoStuffContent)
    
    }

}

    override func viewDidLoad() {
        super.viewDidLoad()
        
        webviewRequest()
        
        webView.delegate = self
        
    }
    
    func webviewRequest() {
//        1.请求URI String
        let urlString = "https://api.weibo.com/oauth2/authorize?client_id=\(AppKey)&redirect_uri=\(RedictURI)"
        
        //2.URL
        guard let url = URL(string: urlString) else {
