31 lines
749 B
JavaScript
31 lines
749 B
JavaScript
var vm = new Vue({
|
|
el: "#app",
|
|
data: {
|
|
readManPer: "57%",
|
|
tel: ""
|
|
},
|
|
mixins: [mixins],
|
|
mounted() {
|
|
this.showTopIcon()
|
|
this.showReadManPer(50, 100)
|
|
if (screen.availWidth !== 1280 && window.devicePixelRatio !== 1.5) {
|
|
new WOW().init();
|
|
};
|
|
},
|
|
methods: {
|
|
showTopIcon() {//顶部导航css
|
|
this.headerCss = true;
|
|
this.mobileLogo = "logo1.png"
|
|
},
|
|
showReadManPer(min, max) {//阅读人数百分比
|
|
this.readManPer = Math.floor(Math.random() * (max - min)) + min + "%";
|
|
},
|
|
articleApply() { //文章试用申请
|
|
if (this.tel) {
|
|
sessionStorage.setItem("tel", this.tel)
|
|
tool.setCookie("tel", this.tel, 1)
|
|
}
|
|
location.href = "/apply/"
|
|
}
|
|
}
|
|
}) |