123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- var params=parseQueryString(window.location.href)
- $().ready(function(){
- clickRecord("openLink","链接打开")//链接打开
- // 审核中
- if(params.status==1) {
- $(".form").hide();
- $(".auditng").show();
- // 审核成功
- }else if(params.status==2) {
- $(".form").hide();
- $(".success").show();
- }else {
- $(".form").hide();
- $(".error").show();
- }
- })
- $(".button1").on("click",function(){
- clickRecord("applyAgainClick","再次申请点击")//再次申请
- if(params.typeId) {
- window.location.href="index.html?source="+params.source+"&phone="+params.phone+"&uid="+params.uid+"&token="+params.token+"&hasError="+1+"&typeId="+params.typeId
- }else {
- window.location.href="index.html?source="+params.source+"&phone="+params.phone+"&uid="+params.uid+"&token="+params.token+"&hasError="+1
- }
- })
- $(".button2").on("click",function(){
- clickRecord("applyAgainClick","再次申请点击")//再次申请
- if(params.typeId) {
- window.location.href="index.html?source="+params.source+"&phone="+params.phone+"&uid="+params.uid+"&token="+params.token+"&hasError="+1+"&hasCode=1"+"&typeId="+params.typeId
- }else {
- window.location.href="index.html?source="+params.source+"&phone="+params.phone+"&uid="+params.uid+"&token="+params.token+"&hasError="+1+"&hasCode=1"
- }
- })
- $(".top img").on("click",function(){
- // hasCode标识点击下一步不提交信息
- if(params.typeId) {
- window.location.href="identity.html?source="+params.source+"&phone="+params.phone+"&uid="+params.uid+"&token="+params.token+"&hasError="+params.hasError+"&code="+params.code+"&hasCode=1"+"&typeId="+params.typeId
- }else {
- window.location.href="identity.html?source="+params.source+"&phone="+params.phone+"&uid="+params.uid+"&token="+params.token+"&hasError="+params.hasError+"&code="+params.code+"&hasCode=1"
- }
-
- })
- //获取地址栏参数
- function parseQueryString(url) {
- var urlObj = {};
- var reg = /([^?=&]+)=([^?=&]+)/g;
- url.replace(reg, function($0, $1, $2) {
- urlObj[$1] = decodeURIComponent($2);
- })
- return urlObj;
- }
- // 展示错误提示信息
- function showMsg(msg) {
- $(".alert-info").show();
- $(".alert-info p").text(msg);
- setTimeout(function() {
- $(".alert-info").hide();
- }, 1000);
- }
- // 埋点
- function clickRecord(eventId,eventName){
- $.ajax({
- url:"/user/clickRecord",
- type:"post",
- dataType:"json",
- data:{
- event_id:eventId,
- event_name:eventName,
- channel_id:params.source
- },
- success:function(res) {
- }
- })
- }
|