JLChen
2021-05-18 a869383e163a18cdedcf587383c1eca043129754
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
//  Copyright © 2018年 Zhejiang Dahua Technology Co.,Ltd. All rights reserved.
//    手机与设备处于同一局域网提示
 
import UIKit
import LCBaseModule
 
class DHSameNetworkViewController: DHGuideBaseViewController {
 
    override func viewDidLoad() {
        super.viewDidLoad()
 
        // Do any additional setup after loading the view.
        adjustConstraint()
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    private func adjustConstraint() {
        guideView.updateTopImageViewConstraint(top: 0, width: 375, maxHeight: 300)
    }
    
    // MARK: DHAddBaseVCProtocol
//    override func rightActionType() -> [DHAddBaseRightAction] {
//        var actions: [DHAddBaseRightAction] = [.restart]
//        if DHAddDeviceManager.sharedInstance.supportConfigModes.contains(.wifi) {
//            actions.append(.switchToWireless)
//        }
//        
//        return actions
//    }
 
    // MARK: DHGuideBaseVCProtocol
    override func tipText() -> String? {
        return "add_device_same_network_tip".lc_T
    }
    
    override func tipImageName() -> String? {
        return "adddevice_samenet"
    }
    
    override func tipImageUrl() -> String? {
        return nil
    }
    
    override func checkText() -> String? {
        return "add_device_confirm_same_network".lc_T
    }
    
    override func isCheckHidden() -> Bool {
        return false
    }
    
    override func isDetailHidden() -> Bool {
        return true
    }
    
    override func doNext() {
        if DHNetWorkHelper.sharedInstance().emNetworkStatus == .reachableViaWiFi {
            if DHAddDeviceManager.sharedInstance.isSupportSC {
                basePushToConnectCloudVC()
            } else {
                //跳转设备初始化界面
                basePushToInitializeSearchVC()
            }
        } else {
            LCProgressHUD.showMsg("add_devices_smartconfig_msg_no_wifi".lc_T)
        }
        
    }
}