Skip to content

可选项解包为空, #1

Description

@ZY-GitHub-12

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions