Commit cc3d0bea by 梁建民

js

parent 00f07f20
Showing with 7 additions and 25 deletions
......@@ -154,6 +154,7 @@
.activate-content .form-wrap {
background: #ffffff;
padding-bottom: 20px;
padding-top: 20px;
}
.activate-content .form-wrap .inp-wrap {
......@@ -162,6 +163,10 @@
margin-left: 0.3rem;
}
.activate-content .form-wrap .inp-wrap:first-child{
border-top: none;
}
.activate-content .form-wrap .inp-wrap label {
font-size: 18px;
line-height: 1.3rem;
......@@ -220,7 +225,7 @@
}
.activate-content .next {
width: 305px;
width: 90%;
height: 40px;
line-height: 40px;
background: #1080d0;
......@@ -229,7 +234,7 @@
font-size: 16px;
color: #fff;
display: block;
margin: 1.333rem 0.933rem;
margin: 1.333rem auto 1.333rem;
font-weight: bold;
}
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
<?php
echo "var fwtime =".time().";";
\ No newline at end of file
!function(a,b){function c(){var b=f.getBoundingClientRect().width;b/i>540&&(b=540*i);var c=b/10;f.style.fontSize=c+"px",k.rem=a.rem=c}var d,e=a.document,f=e.documentElement,g=e.querySelector('meta[name="viewport"]'),h=e.querySelector('meta[name="flexible"]'),i=0,j=0,k=b.flexible||(b.flexible={});if(g){var l=g.getAttribute("content").match(/initial\-scale=([\d\.]+)/);l&&(j=parseFloat(l[1]),i=parseInt(1/j))}else if(h){var m=h.getAttribute("content");if(m){var n=m.match(/initial\-dpr=([\d\.]+)/),o=m.match(/maximum\-dpr=([\d\.]+)/);n&&(i=parseFloat(n[1]),j=parseFloat((1/i).toFixed(2))),o&&(i=parseFloat(o[1]),j=parseFloat((1/i).toFixed(2)))}}if(!i&&!j){var p=(a.navigator.appVersion.match(/android/gi),a.navigator.appVersion.match(/iphone/gi)),q=a.devicePixelRatio;i=p?q>=3&&(!i||i>=3)?3:q>=2&&(!i||i>=2)?2:1:1,j=1/i}if(f.setAttribute("data-dpr",i),!g){if(g=e.createElement("meta"),g.setAttribute("name","viewport"),g.setAttribute("content","initial-scale="+j+", maximum-scale="+j+", minimum-scale="+j+", user-scalable=no"),f.firstElementChild){f.firstElementChild.appendChild(g)}else{var r=e.createElement("div");r.appendChild(g),e.write(r.innerHTML)}}a.addEventListener("resize",function(){clearTimeout(d),d=setTimeout(c,300)},!1),a.addEventListener("pageshow",function(a){a.persisted&&(clearTimeout(d),d=setTimeout(c,300))},!1),"complete"===e.readyState?e.body.style.fontSize=12*i+"px":e.addEventListener("DOMContentLoaded",function(){e.body.style.fontSize=12*i+"px"},!1),c(),k.dpr=a.dpr=i,k.refreshRem=c,k.rem2px=function(a){var b=parseFloat(a)*this.rem;return "string"==typeof a&&a.match(/rem$/)&&(b+="px"),b},k.px2rem=function(a){var b=parseFloat(a)/this.rem;return "string"==typeof a&&a.match(/px$/)&&(b+="rem"),b}}(window,window.lib||(window.lib={}));
\ No newline at end of file
window.onload = function() {
// 在页面加载完毕或者也不用加载完毕,定义一个初始时间
var start = new Date();
// console.log(start);
// 在页面关闭前,调用sa的track方法
window.onbeforeunload = function() {
var end = new Date();
// 如果用户一直不关闭页面,可能出现超大值,可以根据业务需要处理,例如设置一个上限
var duration = (end.getTime() - start.getTime()) / 1000;
// console.log(duration);
// 定义一个记录页面停留时间的事件pageView,并且保存需要的属性(停留时间和当前页面的地址)
sensors.track('pageclose', {
pageStayTime: duration,
pageUrl: window.location.href
});
};
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment