Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可选项解包为空, #1

Open
ZY-GitHub-12 opened this issue Jun 29, 2021 · 0 comments
Open

可选项解包为空, #1

ZY-GitHub-12 opened this issue Jun 29, 2021 · 0 comments

Comments

@ZY-GitHub-12
Copy link

func getIntelligentData(){

    //拿取智能设备地址
    let urlStr = SEVER_IP + "/api/getDevice"
    
    let arr = [19,18,17,7,6]
    
    Alamofire.request(urlStr,method: .get).responseJSON { (response) in
        
        self.intelligentData = response.result.value! as! Array
        
        for i in 0 ..< 5 {
            self.intelligentData.remove(at: arr[i])
        }
        
        self.collection?.reloadData()
    }

self.intelligentData = response.result.value! as! Array此行提示可选项解包为空,为什么没有拿到HTTPURLResponse呢?网连上的,端口用的默认的1883

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant