     #   @encrypt module.path, (path.join atom.project.path, 'encrypt', module.package.identifier)
     # .then (result) =>
   upload: (cell, module)->
-    cell.changeState 'upload'
-    @loading.show();
-    @login 'cube', 'cube', 'cube'
+
+    (require "../../utils/checkNetwork")("http", "http://www.baidu.com").then =>
+      cell.changeState 'upload'
+      @loading.show();
+      @login 'cube', 'cube', 'cube'
     .then (result) =>
       throw new Error('login fail') unless result.result is 'true'
       console.log "upload"

      cell.changeState 'normal' if result.result is 'success'
    .catch (err) =>
      @loading.hide();
      console.trace err.stack

  #模块上传流程
  #1.上传模块压缩包到变色龙后台

    .then (map) =>
      @showPackageList map
    .catch (err) =>
      # console.log err.message
      console.trace err.stack

    return this
