示例#1
0
		appUtils.preBindEvent($(_pageId + " #ranking_listss")," ul li", function(){
			var account_id = $(this).attr("id");//获取组合id
			//跳转到此参赛人详情
			  //组合详情
			  //参赛人id
			 var invest_ids = $(this).attr("name");
			 //排名
			 var rankings =  $(_pageId+"#user_ranking").html();
			 
			 //清除session
			 appUtils.clearSStorage("match_name");
			 appUtils.clearSStorage("account_id");
			 appUtils.clearSStorage("invest_id");
			 appUtils.clearSStorage("rankings");
			 //保存信息
			 appUtils.setSStorageInfo("match_name",daname);
			 appUtils.setSStorageInfo("account_id",account_id);
			 appUtils.setSStorageInfo("invest_id",invest_ids);
			 appUtils.setSStorageInfo("rankings",rankings);
			 
			if (match_status=="1") {
				 appUtils.pageInit(pageCode,"public/positionIng",{"match_name":daname,"account_id":account_id,"invest_id":invest_ids,"rankings":rankings});	
			} if(match_status=="2") {
				 appUtils.pageInit(pageCode,"public/positionEnd",{"match_name":daname,"account_id":account_id,"rankings":rankings});	
			}
			
		},"click");
示例#2
0
							appUtils.bindEvent($(_pageId + " #user_showRanking"), function(){
								var account_id = item.account_id;//获取组合id
								//跳转到此参赛人详情
								  //组合详情
								  //参赛人id
								 var invest_ids = item.user_id;
								 //排名
								 var rankings = item.total_yield_rankings;
								 
								 //清除session
								 appUtils.clearSStorage("match_name");
								 appUtils.clearSStorage("account_id");
								 appUtils.clearSStorage("invest_id");
								 appUtils.clearSStorage("rankings");
								 //保存信息
								 appUtils.setSStorageInfo("match_name",daname);
								 appUtils.setSStorageInfo("account_id",account_id);
								 appUtils.setSStorageInfo("invest_id",invest_ids);
								 appUtils.setSStorageInfo("rankings",rankings);
								 
								if (match_status=="1") {
									 appUtils.pageInit(pageCode,"public/positionIng",{"match_name":daname,"account_id":account_id,"invest_id":invest_ids,"rankings":rankings});	
								} if(match_status=="2") {
									 appUtils.pageInit(pageCode,"public/positionEnd",{"match_name":daname,"account_id":account_id,"rankings":rankings});	
								}
								
							},"click");
示例#3
0
			userService.registerWeboSSO(param,function callBack(resultVo){
				if(Number(resultVo.error_no) == 0){
					//将登录信息写入缓存
					var result = resultVo.results[0];
					var userId = result.user_id;
					var loginId = result.login_id;
					var userType = result.user_type;
					var userName = result.user_name;
					//登录后,设置相关cookie
					appUtils.setSStorageInfo("_isLoginIn","true");
					appUtils.setSStorageInfo("userId",userId,true);
					appUtils.setSStorageInfo("loginId",loginId,true);
					appUtils.setSStorageInfo("userType",userType,true);
					appUtils.setSStorageInfo("userName",userName,true);
					//appUtils.setSStorageInfo("_isFirstLoginIn",true,true);
					/*if(appUtils.getPageParam("_isTNine")!="" && appUtils.getPageParam("_isTNine")!=null && appUtils.getPageParam("_isTNine")!=undefined){
						appUtils.pageBack();
					}else{
						//跳转到登录后的页面
						appUtils.pageInit(pageCode,"account/bindSuccess",{"LoginId":LoginId,"nickName":nickName});
					}	*/
					appUtils.pageInit(pageCode,"index");
				}
				else{
					//allowCommitDeal();
					layerUtils.iAlert("登录失败:"+resultVo.error_info,-1);
				}
			},ctrlParam);
示例#4
0
		appUtils.bindEvent($(_pageId + '.tab_nav ul li a'), function(e)
		{
			var pageCode = _pageId.replace("#", "").replaceAll("_", "/").replace(" ", "");
			var topage = $(this).attr("to-page").replaceAll("_", "/"); // 获取跳转的页面
			var param = $(this).attr("param");
			if (topage == "credit/transferred/collateralTransfer")
			{
				commonFunc.isAStockLogin();
			} else if (topage == "banking/transfer" && pageCode.indexOf(CREDIT) != "-1")
			{
				appUtils.setSStorageInfo("whichAccount", "credit_userInfo");
				appUtils.setSStorageInfo("whichPage", pageCode);
				appUtils.pageInit(pageCode, topage,
				{
					"param" : param
				});
			} else
			{
				appUtils.pageInit(pageCode, topage,
				{
					"param" : param
				});
			}
			e.stopPropagation();
		});
示例#5
0
	function setWXPK_OPID(weixinpk,code){
		//自定义微信缓存(H5端用)
		//appUtils.setSStorageInfo("openid",116);
		//appUtils.setSStorageInfo("weixinpk",116);
		/**
		 * 获取weixinpk和openid
		 */
		openid = appUtils.getSStorageInfo("openid");
		//如果缓存中有就从缓存中取
		if(openid!=null&&typeof(openid)!=undefined&&openid!=""){
			return [appUtils.getSStorageInfo("weixinpk"),openid];
		}
		//获取微信传入参数weixinpk,只要是链接没获取到,就是默认的,不管是网页授权方式还是链接方式
		weixinpk = appUtils.getPageParam("weixinpk");
		if(weixinpk ==""||weixinpk == null || weixinpk == undefined )
		{
			weixinpk = gconfig.global.weixinpk;//默认的weixinpk
		}
		code = appUtils.getPageParam("code");
		if(code!=null&&typeof(code)!=undefined&&code!="")  //网页授权链接形式进入
		{		
			openid = getopenid(appid,appsecret,code,weixinpk);
			appUtils.setSStorageInfo("openid",openid);
			appUtils.setSStorageInfo("weixinpk",weixinpk);
		}	
		else  
		{
			openid = appUtils.getPageParam("openid");  //图文消息或普通链接传递进入
			appUtils.setSStorageInfo("openid",openid);
			appUtils.setSStorageInfo("weixinpk",weixinpk);
		}
	}
示例#6
0
		appUtils.bindEvent($(_pageId+element),function(e){
			var branchId = $(this).attr("branchId");
			branchParam.branchno = branchId;	
			$(this).addClass("active").siblings().removeClass("active");
			var branch_name = $(this).text();  //当前选择营业部的值
			var sel_branch = $(_pageId+" .sel_branch").text();  //上次选择城市的值
			$(_pageId+" .sel_branch").text(branch_name);	  //选中值赋给选择框
			appUtils.setSStorageInfo("branch_name",branch_name);
			//显示东莞地区的营业部
			if(element == " .dg_seleright .cityBranch a"){
				$(_pageId+" .dongGuanBranch").slideUp("fast");	
			}
			else if(element == " .dg_seleright .townshipBranch a"){
				$(_pageId+" .dongGuanBranch").slideUp("fast");
			}
			else{
				//显示其他地区营业部
				$(_pageId+" .otherAreaBranch").slideUp("fast");
			}
			//再次点击相同城市,下级菜单不改变,否则重置
			if(branch_name != sel_branch)	 
			{
				$(_pageId+" .sel_serviceMeal").text("请选择服务套餐");
			}
			var fare_type = $(this).attr("fare_type");	//费率类型
			branchParam.fare_type = fare_type;
			//每次保存前都清空一下之前的费率
			appUtils.clearSStorage("fare_type");
			appUtils.setSStorageInfo("fare_type",fare_type);
			showMeal();
		});
示例#7
0
		appUtils.bindEvent($(_pageId+" .com_btn"),function(){
			var branch_name =$(_pageId+" .form_item .sel_branch").text();
			var meal_name =$(_pageId+" .mt20 .sel_serviceMeal").text();
			appUtils.setSStorageInfo("branchno",branchParam.branchno);  // 营业部id保存在session
			appUtils.setSStorageInfo("commission",branchParam.commission);  // 佣金保存在session
			appUtils.setSStorageInfo("unit",branchParam.unit);  // 佣金单位保存在session
			appUtils.setSStorageInfo("remark",branchParam.remark);  // 套餐名称保存在session
			if(branch_name == "请选择营业部")
			{
				layerUtils.iMsg(-1,"请先选择营业部");
				return false;
			}
			if(meal_name == "请选择服务套餐")
			{
				layerUtils.iMsg(-1,"请先选择服务套餐");
				return false;
			}
			//是否勾选天添金选项
			if($(_pageId+" .mt50 .chkbox:eq(0)").hasClass("chkbox_ckd")){
				branchParam.has_ttj = 1;
			}
			else{
				branchParam.has_ttj = 0;
			}
			//判断新开户还是转户
			if(appUtils.getSStorageInfo("openChannel") == "new")
			{
				appUtils.pageInit("account/selDepartment","account/uploadPhoto",branchParam);
				appUtils.clearSStorage("idInfo");  // 清除完成身份证上传步骤标记
			}
			else
			{
				appUtils.pageInit("account/selDepartment","account/uploadPhotoChange",branchParam);
			}
		});
示例#8
0
			require("shellPlugin").callShellMethod("getIpMacPLugin",function(data){
				data = data.split("|");
				mac = data[0];
				ip = data[1];
				appUtils.setSStorageInfo("ip",ip); // 将 ip 保存到 sessionStorage 里面
				appUtils.setSStorageInfo("mac",mac); // 将 mac 保存到 sessionStorage 里面
				sendmsg(phoneNum,mac,ip,verify_code); // 发送验证码
			},null);
示例#9
0
		appUtils.preBindEvent($(_pageId +"#myPointList"), "li",function(){
			appUtils.clearSStorage("counts");
			appUtils.setSStorageInfo("counts",count);
			appUtils.clearSStorage("last_PageCode");
			appUtils.setSStorageInfo("last_PageCode",pageCode);
			var point_id = $(this).attr("id");
			appUtils.pageInit(pageCode, "point/pointDetail", {"view_id":point_id});
		},"click");
示例#10
0
		appUtils.preBindEvent($(_pageId + "#pointList"), ".sy_list_tit .list_info p",function(e) {
			appUtils.setSStorageInfo("invest_PageCode",pageCode);
			appUtils.clearSStorage("counts");
			appUtils.setSStorageInfo("counts",count);
			var invest_id = $(this).attr("id");
			appUtils.pageInit(pageCode,"adviser/adviserDetail",{'invest_id':invest_id});
			//阻止冒泡  域绑定事件 域绑定下多个绑定有效
			e.stopPropagation();
		},"click");
示例#11
0
		appUtils.preBindEvent($(_pageId +"#pointList"), "li",function(){
			appUtils.clearSStorage("counts");
			appUtils.setSStorageInfo("counts",count);
			var view_id = $(this).attr("id");
			if(view_id != null && view_id != ""){
				appUtils.clearSStorage("last_PageCode");
				appUtils.setSStorageInfo("last_PageCode",pageCode);
				appUtils.pageInit(pageCode,"point/pointDetail", {'view_id':view_id});
			}
		},"click");
示例#12
0
		appUtils.bindEvent($(_pageId + ".login_btn"), function() {
		  isFirstSet = true;
			if (user_id) {
				appUtils.setSStorageInfo("hisPageCode",pageCode);	
				appUtils.pageInit(pageCode,"simulatedStocks/myMatch");	
			}else{
				appUtils.setSStorageInfo("hisPageCode",pageCode);	
				appUtils.pageInit(pageCode,"account/login");
			}
		});
示例#13
0
	//保存推荐人id
	function saveRecommendId(){
		var customerId = $(_pageId+" .clientId").val();
		//未显示客户经理输入框,则默认传插件存在的默认客户经理id
		if(!$(_pageId+" .form_item:eq(2)").is(":visible")){
			appUtils.clearSStorage("client_id");
			appUtils.setSStorageInfo("client_id",appUtils.getSStorageInfo("recommender_id"));
		}
		else{
			appUtils.clearSStorage("client_id");
			//显示则传输入框的值
			appUtils.setSStorageInfo("client_id",customerId);
		}
//		appUtils.setSStorageInfo("client_id","001370");
	}
示例#14
0
	/**
	 * 初始化
	 */
	function init() {
		
		//设置前页面不为登录页
		if(appUtils.getSStorageInfo("_prePageCode") != "account/login"){
			var prePageCode = appUtils.getSStorageInfo("_prePageCode");
			appUtils.clearSStorage("ytg_prePageCode");
			appUtils.setSStorageInfo("ytg_prePageCode",prePageCode);
		}
		if(appUtils.getPageParam("view_id")){
			view_id=appUtils.getPageParam("view_id"); 
		}
		if(view_id==null&&""==view_id){
			view_id=appUtils.getPageParam("view_id"); 
		}
		user_id = appUtils.getSStorageInfo("userId",true);
		if(user_id !=null && ""!=user_id){
			addViewReadNum(); //增加观点阅读数
		}
		curPage = 1;
	    numPerPage = 5;
		totalPage=1;
		totalRows = 0;
		num = 0;
		//查询单个观点详情
		queryNewViewDetails(view_id);
		//查询评论
		queryViewComment(view_id);
		user_type = appUtils.getSStorageInfo('userType',true);
		//查询用户是否观注了该观点
		if(user_id != null && user_id != ""){
			queryisSubView();
		}
	
		
	}
示例#15
0
	function init()
	{
		window.getInput = utils.getInput;  // 暴露调用密码键盘给window
		window.onFinish = utils.onFinish;  // 暴露关闭密码键盘给window
		// 自动测速,选择最佳地址
		// 启动时,检查当前客户端的版本号与服务器上最新的是否一致,根据需要更新客户端,只在启动时检查,started 为 true 表示已启动,已启动就不检查
		if(appUtils.getSStorageInfo("started") != "true")
		{
			// 设置 session 中的 started 为 true ,表示已启动
			appUtils.setSStorageInfo("started","true");
			layerUtils.iLoading(true, "正在检查版本...");
			setBestAddress();  // 设置最佳地址
		}
//		var _prePageCode = appUtils.getSStorageInfo("_prePageCode");
//		if(_prePageCode == null){
//			// 自动测速,选择最佳地址
//			// 启动时,检查当前客户端的版本号与服务器上最新的是否一致,根据需要更新客户端,只在启动时检查,started 为 true 表示已启动,已启动就不检查
//			if(appUtils.getSStorageInfo("started") != "true")
//			{
//				// 设置 session 中的 started 为 true ,表示已启动
//				appUtils.setSStorageInfo("started","true");
//				layerUtils.iLoading(true, "正在检查版本...");
//				setBestAddress();  // 设置最佳地址
//			}
//		}
		/*发送验证码后自动互调该方法*/
		window.getCode = getCode;
		$(_pageId+" .mobile_form .code_pic").attr("src",global.serverUrl+"/nImgServlet?key=1");
		var elements = _pageId +" .phoneNum";
		utils.getPhoneNo(elements); // 自动获取手机号,并填充
		readWriteFunc("read");
	}
示例#16
0
	/* 处理驳回补全资料的情况 */
	function addition(res)
	{
		//驳回情况:身份证正面、反面、大头像、交易密码、资金密码、三方存管、转户驳回到视频见证
		var photoParam = {"needFront" : res.need_photo_front != undefined ? res.need_photo_front : "0",
									   "needBack" : res.need_photo_back != undefined ? res.need_photo_back : "0",
									   "needNohat" : res.need_photo_nohat != undefined ? res.need_photo_nohat : "0"
		};
		var pwdParam = {"needBusinessPwd" : res.need_business_password != undefined ? res.need_business_password : "******",
		                            "needFundPwd" : res.need_fund_password != undefined ? res.need_fund_password : "******"
		};
		var videoParam = {"need_video" : res.need_video != undefined ? res.need_video : "0"};
		var thirdParam ={"needThirdDeposit" : res.need_third_deposit != undefined ? res.need_third_deposit : "0"};
		appUtils.setSStorageInfo("videoParam",JSON.stringify(videoParam));
		appUtils.setSStorageInfo("pwdParam", JSON.stringify(pwdParam));
		appUtils.setSStorageInfo("thirdParam", JSON.stringify(thirdParam));
		// 1.补全照片
		if(photoParam["needFront"]==1 || photoParam["needBack"]==1 || photoParam["needNohat"]==1)
		{
			appUtils.pageInit("account/msgVerify","account/backUploadPhoto",photoParam);
			return true;
		}
		// 2.驳回视频见证
		if(videoParam["need_video"]==1)
		{
			appUtils.pageInit("account/msgVerify","account/videoNotice",videoParam);
			return true;
		}
		// 3.驳回密码设置
		if(pwdParam["needBusinessPwd"]==1 || pwdParam["needFundPwd"]==1)
		{
			appUtils.pageInit("account/msgVerify","account/backSetPwd",pwdParam);
			return true;
		}
		// 4.驳回三方存管
		if(thirdParam["needThirdDeposit"]==1)
		{
			appUtils.pageInit("account/msgVerify","account/backThirdDepository",thirdParam);
			return true;
		}
		else
		{
			return false;
		}
	}
示例#17
0
文件: end.js 项目: AntonySufer/seajs
		appUtils.bindEvent($(_pageId + "#apply_type"), function(){
			var value=$(this).text();
			var dsname = $(_pageId + "#dsname").html();
			appUtils.clearSStorage("account_id");
			appUtils.setSStorageInfo("account_id",account_id);
			if (value=="历史战绩") {
				appUtils.pageInit(pageCode,"public/positionEnd",{"match_name":dsname,"account_id":account_id});	
			}
			
		});
示例#18
0
		appUtils.bindEvent($(_pageId + "#process li"), function(){
			var value =$(_pageId + "#join_match").attr("name");//被关注人id
			if (applyState =="1" && value=="0") {
				if(!user_id){
					appUtils.setSStorageInfo("hisPageCode",pageCode);	
					appUtils.pageInit(pageCode,"account/login");
					}
					else {
						JoinMatch();//参加比赛
					}  
			}
		});
示例#19
0
		appUtils.preBindEvent($(_pageId +"#answered_list"), " img",function(){
			appUtils.setSStorageInfo("invest_PageCode",pageCode);
			var user_type = $(this).attr("userType");
			var invest_id = $(this).parent().parent().parent().parent().attr("id");
			if(user_type == 1){
				if(type==1){
					appUtils.pageInit(pageCode,"adviser/adviserDetail", {'invest_id':invest_id,"type":1});
				}else if(type==2){
					appUtils.pageInit(pageCode,"adviser/adviserDetail", {'invest_id':invest_id,"type":2});
				}
			}
		});
示例#20
0
			userService.hlLogin(param,function callBack(resultVo){
				if(Number(resultVo.error_no) == 0){
					//将登录信息写入缓存
					var result = resultVo.results[0];
					var userId = result.user_id;
					var loginId = result.login_id;
					var userType = result.user_type;
					var userName = result.user_name;
					//登录后,设置相关cookie
					appUtils.setSStorageInfo("_isLoginIn","true");
					appUtils.setSStorageInfo("userId",userId,true);
					appUtils.setSStorageInfo("loginId",loginId,true);
					appUtils.setSStorageInfo("userType",userType,true);
					appUtils.setSStorageInfo("userName",userName,true);
					user_id = appUtils.getSStorageInfo("userId",true);	
					 if (user_id) {
						   queryMatchList();//查询大赛列表
						
					  }
				}
			},ctrlParam);
示例#21
0
	/* 下一步入口 */
	function nextStep(res, opacctkind_flag)
	{
		var pageCode = "";
		var currentStep = res["lastcomplete_step"];  //断点:上次走的最后一步
//		alert("msgVerify页面当前步骤:"+currentStep);
		appUtils.setSStorageInfo("currentStep",currentStep);
		if(currentStep && currentStep.length > 0)
		{
			var index = steps.indexOf(currentStep);
			if(index < (steps.length-1))
			{
				currentStep = steps[index + 1];
			}
			if(opacctkind_flag == "0")
			{
				pageCode = stepMap[currentStep];
			}
			else
			{
				pageCode = stepMap0[currentStep];
				if(!(pageCode && pageCode.length > 0))
				{
					pageCode = stepMap[currentStep];
				}
			}
		}
		if(pageCode && pageCode.length > 0)
		{
			// 如果是直接跳转到 视频认证 页面,将 QQ 保存到 session 中
			if(pageCode == "account/videoNotice")
			{
				appUtils.setSStorageInfo("qq",res.im_code);
			}
			appUtils.pageInit("account/msgVerify",pageCode,{});
		}
		else
		{
			appUtils.pageInit("account/msgVerify","account/selDepartment",{});
		}
	}
示例#22
0
		appUtils.bindEvent($(_pageId+" .mealList a"),function(e){
			$(_pageId+" .tc_sele").hide();	//隐藏服务套餐列表
			$(_pageId+" .tc_info").show();	//显示套餐详情
			var allText = $(this).text();
			var remark = allText.substr(0,allText.indexOf("("));
			$(_pageId+" .tc_info h3").html(remark);
			var con = $(this).attr("content");
			var con_str = con.split("|");
			 var con1 = "",
			 	 con2 = "",
			 	 con3 = "",
			 	 con4 = "";
			for(var i=0;i<con_str.length;i++){
				 con1 = con_str[0];
				 con2 = con_str[1];
				 con3 = con_str[2];
				 con4 = con_str[3];
			}
			var rate = $(this).attr("fare_rate");
			var fare_type = $(this).attr("fare_type");
			var unit = $(this).attr("unit");
			var com_unit = ""; 
			if(unit == "‰"){
				com_unit = 0.001;
			}
			else if(unit == "%"){
				com_unit = 0.01;
			}
			branchParam.commission = rate;
			branchParam.unit = com_unit;
			branchParam.fare_type = fare_type;
			branchParam.remark = remark;
			$(_pageId+" .tc_info span:eq(0)").html(con1);
			$(_pageId+" .tc_info span:eq(1)").html(con2);
			$(_pageId+" .tc_info span:eq(2)").html(con3);
			$(_pageId+" .tc_info span:eq(3)").html(con4);
			var rate_str = "";
//			rate_str += "<span class=\"yj_dataspan right\"><strong>"+ rate +"</strong> <em>"+unit+"</em></span>佣金<div class=\"mt50 com_span\"><span class=\"chkbox chkbox_ckd\">&nbsp;</span>加入<a class=\"com_link\" href=\"javascript:void(0)\">“天添金”</a>计划,日享12倍活期收益</div>";
			var customer_id = appUtils.getSStorageInfo("customer_id");
			//当客户经理id为空或者非特殊客户经理id时,显示佣金率加起字
			if(customer_id == null && remark == "投资顾问服务"){
				rate_str += "<span class=\"yj_dataspan right\"><strong>"+ rate +"</strong> <em>"+unit+"起</em></span> 佣金<div class=\"mt50 com_span\"><span class=\"chkbox chkbox_ckd\">&nbsp;</span>加入<a class=\"com_link\" href=\"javascript:void(0)\">“天添金”</a>计划,日享12倍活期收益</div>";
			}
			else{
				rate_str += "<span class=\"yj_dataspan right\"><strong>"+ rate +"</strong> <em>"+unit+"</em></span> 佣金<div class=\"mt50 com_span\"><span class=\"chkbox chkbox_ckd\">&nbsp;</span>加入<a class=\"com_link\" href=\"javascript:void(0)\">“天添金”</a>计划,日享12倍活期收益</div>";	
			}
			$(_pageId+" .yj_box").html(rate_str);
			//点击选择营业部改变了“绑定元素”,重新绑定勾选协议和查看协议内容事件
			togglePro();
			getAgreement();
			appUtils.setSStorageInfo("remark",remark);
		});	
示例#23
0
		appUtils.bindEvent($(_pageId + ".foot_box_fixed"), function(){
			if(user_id==undefined || user_id ==null || user_id == ""){
				appUtils.setSStorageInfo("hisPageCode",pageCode);
				appUtils.pageInit(pageCode, "account/login");
				return ;
			}else if(user_type==1){
				layerUtils.iAlert("投顾用户不能提问",-1);
				return;
			}else{
				$(_pageId + "#tiwen").show();
				$(_pageId + "#invest_name").html('向所有人提问');
			}
		});
示例#24
0
			var completeRegester = function(resultVo){
				if(resultVo.error_no == 0){
					var result = resultVo.results;
					var userInfo = result[0];
					//userInfo = $.jsonToStr(userInfo);
					userInfo = JSON.stringify(userInfo);
					appUtils.setSStorageInfo("userInfo_ytg",userInfo);
					//layerUtils.iMsg(0,"注册成功!");
					
					//注册成功后,直接登录
					loginFunc(mobile,password);
				}
			};
示例#25
0
		service.getSmsCode(param,function(data){
//			alert(JSON.stringify(data));
			var error_no = data.error_no;
			var error_info = data.error_info;
			var result = data.results;
			if(error_no == "0")
			{
		        //后台如果返回ip地址,则本地存储用户ip地址
			    if(result[0] && result[0].ip)
			    {
				    appUtils.setSStorageInfo("ip",result[0].ip);
			    }
				// 计时器
				var sumTime = 60;
				//处理获取验证码时发生的动作
				var handleCount = function(){
					// 获取验证码之后按钮隐藏
					$(_pageId+" .getmsg").hide();
					// 显示倒计时
					$(_pageId+" .time").show();
					//$(_pageId+" .cert_notice").show();
					$(_pageId+" .time").text(sumTime--+"秒后重发");
				};
				handleCount();
				startCountDown = window.setInterval(function(){
					handleCount();
				}, 1000);
				// 60 秒之后清除计时器
			    clearCountDown = setTimeout(function(){
					// 显示按钮
					$(_pageId+" .getmsg").show().html("重新发送");
					// 隐藏倒计时
					$(_pageId+" .time").hide();
					//$(_pageId+" .cert_notice").hide();
					$(_pageId+" .time").text(60);
					window.clearInterval(startCountDown);
					startCountDown = null;
				},61000);
				 //发送完验证码后,通过判断输入手机号是否一致,否则重新发送验证码
				 lastSendPhoneNumber = phoneNum;
				 // 调用读取短信验证码插件
				 require("shellPlugin").callShellMethod("sMSReceiverPlugin",null,null,null);
			}
			else
			{
				layerUtils.iAlert(error_info,-1);
				$(_pageId+" .mobile_form .code_pic").attr("src",global.serverUrl+"/nImgServlet?key="+Math.random());
				return false;
			}
		});
示例#26
0
		logoutTimer = setInterval(function()
		{
			var lastDoTime = appUtils.getSStorageInfo("_lastDoTime");
			if (new Date().getTime() - lastDoTime > 1000 * 60 * global.logoutTimeNum)
			{
				appUtils.clearSStorage("stock_userInfo");
				appUtils.clearSStorage("credit_userInfo");
				appUtils.setSStorageInfo("_isLoginIn", "false");
				clearStateTime(); // 清楚行情定时器
				layerUtils.iLayerClose();
				$(".top_title .logout").hide();
				appUtils.pageInit($("body #content div.page[data-display=block]").attr("id").replaceAll("_", "/"), "account/login");
			}
		}, 5000); // 5秒检测一次
示例#27
0
		appUtils.bindEvent($(_pageId + ".collect_iocn"), function(e) {
			if(user_id == undefined || user_id==null || user_id==""){
				var hisPageParam = {
						"view_id" : view_id
				};
				appUtils.setSStorageInfo("hisPageParam",JSON.stringify(hisPageParam));
				appUtils.setSStorageInfo("hisPageCode",pageCode);
				appUtils.pageInit(pageCode, "account/login");
				return ;
			}else if(user_type==1){
				layerUtils.iAlert("投顾不能收藏观点",-1);
				return;
			}
			
			var col_status = "";
			if($(this).hasClass('collected_iocn'))
				col_status = 0;
			else 
				col_status = 1;
			//关注或者取消关注组合
			subOrCancelCollection(view_id,col_status,$(this));
			e.stopPropagation();
		
		});
示例#28
0
	/**
	 * 初始化
	 */
	function init() {
		type=appUtils.getPageParam("type");
		if(appUtils.getPageParam("ques_id")){
			ques_id=appUtils.getPageParam("ques_id");		
			}
		if(ques_id==null&&""==ques_id){
			ques_id=appUtils.getPageParam("ques_id");		
		}
		
		queryQuesDetails();
		if(appUtils.getSStorageInfo("_prePageCode") != "ques/quesDetail1"){
			var prePageCode = appUtils.getSStorageInfo("_prePageCode");
			appUtils.clearSStorage("ytg_prePageCode");
			appUtils.setSStorageInfo("ytg_prePageCode",prePageCode);
		}
	}
示例#29
0
		appUtils.preBindEvent($(_pageId + "#ranking_listss"),".att_btn", function(e){
			//被关注人id
			
			var invest_id = $(this).parent(".li_rt").parent("li.ui ").attr("name");
			var html_id =$(this).attr("id");//当前点击的关注按钮id
			var index_id =$(this).attr("name");//获取索引
			if(!user_id){
				appUtils.setSStorageInfo("hisPageCode",pageCode);	
				appUtils.pageInit(pageCode,"account/login");
				}
				else {
					cancelOrAttInvest(html_id,index_id,invest_id);//取消or关注
				}
				e.stopPropagation(); 
				
			},"click"); 
示例#30
0
文件: end.js 项目: AntonySufer/seajs
		appUtils.bindEvent($(_pageId + "#match_select li"), function(){
			var index = $(this).index()+1;
			var redirect_type ="";
			if (index ==1 ) {
				//排行榜
				redirect_type = "public/rankingList";
	    	}if(index == 2){
               //比赛动态
	    		redirect_type = "public/competitionDynamics";
			}if(index == 3){
				//参赛名单
				redirect_type = "public/entryList";
		    }
			var dsname = $(_pageId + "#dsname").html();
			appUtils.clearSStorage("match_status");
			appUtils.setSStorageInfo("match_status",2);
			appUtils.pageInit(pageCode,redirect_type,{"match_name":dsname,"activity_type":activity_type});
			
		});