 
 	checkBuildResult: (id,platform,time) ->
 		# console.log id,platform,time
+		ticket = (timeTips,loopTime,waitTime) =>
+			# console.log timeTips,loopTime
+			if loopTime <= 1
+				return
+			loopTime = loopTime - 1
+			num = waitTime - 1
+			@.find(timeTips).html(num)
+			# console.log timeTips,num,@.find(timeTips).html(num),waitTime
+			setTimeout =>
+				ticket timeTips,loopTime,num
+			,1000
+			# @.find(timeTips).html(num-1)
 		params =
 			sendCookie: true
 			success: (data) =>
 				# data['status'] = "SUCCESS"
 				# data['url'] = "http://baidu.com"
-				console.log data
+				# console.log data
 				if data['code'] == -1
 					alert "#{platform}构建不存在！"
 					return
 				if data['status'] == "WAITING"
 					# setTimeout("checkBuildResult(#{id},#{platform})", 1000*60)
 					if platform == "IOS"
-						@.find(".iosTips").html("构建 IOS 还需等待#{data['waitingTime']}秒")
+						timeTips = ".iosWaitTime"
+						@.find(".iosTips").html("构建 IOS 还需等待<span class='iosWaitTime'>#{data['waitingTime']}</span>秒")
 					else
-						@.find(".androidTips").html("构建 ANDOIRD 还需等待#{data['waitingTime']}秒")
+						timeTips = ".androidWaitTime"
+						@.find(".androidTips").html("构建 ANDOIRD 还需等待<span class='androidWaitTime'>#{data['waitingTime']}</span>秒")
+					loopTime = 30
+					loopTime2 = 30
+					if data['waitingTime'] < 30
+						loopTime = data['waitingTime']
+						if data['waitingTime'] == 0
+							loopTime = loopTime + 2
+							loopTime2 = data['waitingTime']
 					setTimeout =>
 						@checkBuildResult id,platform,time+1
-					,1000*30
+					,1000*loopTime
+					setTimeout =>
+						ticket timeTips,loopTime2,data['waitingTime']
+					,1000
 				else if data['status'] == "SUCCESS"
 					if !@urlCodeList.is(':visible')
 						@buildingTips.addClass('hide')

				else if data['status'] == "BUILDING"
					@buildTips.html("正在构建请耐心等待......")
					if platform == "IOS"
						@.find(".iosTips").html("正在构建 IOS 还需#{data['remainTime']}秒")
					else
						@.find(".androidTips").html("正在构建 ANDOIRD 还需#{data['remainTime']}秒")
					setTimeout =>
						@checkBuildResult id,platform,time+1
					,1000*30
				else
					alert "构建失败"
					return
			error: =>
			 	console.log  "error"
		client.getBuildUrl(params,id)


			# @parentView.nextBtn.attr('disabled',false)

	# checkModuleNeedUpload: ( moduleIdentifer, moduleVersion, modulePath) ->
	# 	console.log moduleIdentifer, moduleVersion
	# 	params =
	# 		sendCookie: true
	# 		success: (data) =>
	# 			console.log "check version success"
	# 			if data['version'] != ""
	# 				uploadVersion = moduleVersion.split('.')
	# 				version = data['version'].split('.')
	# 				# 判断是否需要上传模块
	# 				if uploadVersion[0] < version[0]
	# 					console.log "无需更新#{moduleIdentifer} 本地版本为#{moduleVersion},服务器版本为：#{data['version']}"
	# 					return
	# 				else if uploadVersion[0] == version[0]
	# 					if uploadVersion[1] < version[1]
	# 						console.log "无需更新#{moduleIdentifer} 本地版本为#{moduleVersion},服务器版本为：#{data['version']}"
	# 						return
	# 					else if uploadVersion[1] == version[1]
	# 						if uploadVersion[2] <= version[2]
	# 							console.log "无需更新#{moduleIdentifer} 本地版本为#{moduleVersion},服务器版本为：#{data['version']}"
	# 							return
	# 			# 上传模块
	# 			# 1、压缩模块
	# 			# 2、上传
	# 			console.log "modulePath"
	# 			# modulePath = pathM.join this.find('select').val(), 'modules', moduleIdentifer
	# 			if fs.existsSync(modulePath)
	# 				Util.fileCompression(modulePath)
	# 				zipPath = modulePath+'.zip'
	# 				if fs.existsSync(zipPath)
	# 					console.log zipPath
	# 					fileParams =
	# 						formData: {
	# 							up_file: fs.createReadStream(zipPath)
	# 						}
	# 						sendCookie: true
	# 						success: (data) =>
	# 							# data = JSON.parse(body)
	# 							console.log "上传文件成功"
	# 							if fs.existsSync(pathM.join modulePath,'package.json')
	# 								packagePath = pathM.join modulePath,'package.json'
	# 								options =
	# 									encoding: 'utf-8'
	# 								contentList = JSON.parse(fs.readFileSync(packagePath,options))
	# 								console.log contentList['version'],contentList['identifier']
	# 								params =
	# 									form:{
	# 										module_tag: contentList['identifier'],
	# 										module_name: contentList['name'],
	# 										module_desc: contentList['description'],
	# 										version: contentList['version'],
	# 										url_id: data['url_id'],
	# 										update_log: "构建应用时发现本地版本高于服务器版本，所以上传 #{contentList['identifier']} 模块"
	# 									}
	# 									sendCookie: true
	# 									success: (data) =>
	# 										# console.log data
	# 										# alert "上传模块成功"
	# 										console.log "upload success"
	# 									error: =>
	# 									  alert "error"
	# 								client.postModuleMessage(params)
	# 							else
	# 								console.log "文件不存在#{pathM.join modulePath,'package.json'}"
	# 						error: =>
	# 							alert "上传文件失败"
	# 					client.uploadFile(fileParams,"module","")
	# 				else
	# 					alert "打包#{modulePath}失败"
	# 			else
	# 				alert "不存在#{modulePath}"
	# 			# else
	# 			# 	console.log "需要上传#{moduleIdentifer}模块,服务器版本为空，本地版本为#{moduleVersion}"
	# 		error : =>
	# 			console.log "获取模板最新版本 的url 调不通"
	# 	client.getModuleLastVersion(params,moduleIdentifer)

	prevBtnClick: ->
		if @main.is(':visible')

					version: version
				moduleList.push module
			getModuleMessage identifier,version for identifier, version of modules
			@checkModuleNeedUpload projectPath, moduleList, 0

	checkModuleNeedUpload: (modulePath, modules, index) ->
		if modules.length == 0
