     }
     
     func loginWithWeChat(success: SuccessHandler?, fail: FailHandler?) {
+        if !isWeixinInstalled {
+            let error = YLAuthError(description: "未安装此应用", codeType: .appNotInstalled)
+            fail?(error)
+            return
+        }
         loginSuccess = success
         loginFail = fail
         let req = SendAuthReq()

        tencentOAth = TencentOAuth(appId: qqID, andDelegate: self)
        tencentOAth?.redirectURI = "www.qq.com"
        tencentOAth?.authShareType = AuthShareType_QQ
        WeiboSDK.enableDebugMode(true)
        WeiboSDK.registerApp(weiboID)
    }
    

    case versionUnsupport = -2
    case authDenied = -3
    case badNetwork = -4
    case appNotInstalled = -5
    case unknown = -404
}

