|
|
@@ -256,7 +256,7 @@
|
|
|
</section>
|
|
|
<!-- end Service section -->
|
|
|
<!-- 下载 -->
|
|
|
- <section>
|
|
|
+ <section id="download">
|
|
|
<div class="container ts-worp" style="padding-top: 30px;">
|
|
|
<div class="section-title text-center" style="margin-bottom: 50px">
|
|
|
<p class="ts-title">下载</p>
|
|
|
@@ -353,16 +353,52 @@
|
|
|
})
|
|
|
},
|
|
|
beforeDestroy(){
|
|
|
- clearInterval(this.timer)
|
|
|
+ clearInterval(this.timer);
|
|
|
+ window.removeEventListener("scroll",this.handleFun);
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.clientId = Math.random().toString(36).substr(2)
|
|
|
+ this.clientId = Math.random().toString(36).substr(2);
|
|
|
// 从本地加载已经登录的信息
|
|
|
- this.account = Session.getAccount()
|
|
|
- document.documentElement.scrollTop = this.isfeature;
|
|
|
- $(window).scroll(function() {
|
|
|
+ this.account = Session.getAccount();
|
|
|
+ switch (this.isfeature) {
|
|
|
+ case 'feature':
|
|
|
+ this.feature2()
|
|
|
+ break;
|
|
|
+ case 'service':
|
|
|
+ this.service2()
|
|
|
+ break;
|
|
|
+ case 'download':
|
|
|
+ this.download()
|
|
|
+ break;
|
|
|
+ };
|
|
|
+ // document.documentElement.scrollTop = this.isfeature;
|
|
|
+ window.addEventListener("scroll",this.handleFun);
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ setTokenPage() {
|
|
|
+ return this.$url.web + '/set-token.html'
|
|
|
+ },
|
|
|
+ ssoPage() {
|
|
|
+ if (this.isLogin) {
|
|
|
+ return this.$url.sso + '/sassLogin?appId=sp&baseUrl=' +
|
|
|
+ encodeURIComponent(this.$url.api + '/api/auth/sso/callback/' + this.clientId)
|
|
|
+ }
|
|
|
+ if (this.isRegister) {
|
|
|
+ return this.$url.sso + '/sassLogin/register?appId=sp&baseUrl=' +
|
|
|
+ encodeURIComponent(this.$url.api + '/api/auth/sso/callback/' + this.clientId)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getnewproblem() {
|
|
|
+ return this.$store.state.isproblem;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleFun(){
|
|
|
let Y = $(window).scrollTop();
|
|
|
- if (Y >= 500 && Y <= 1500) {
|
|
|
+ if ($('#feature').offset()) {
|
|
|
+ var scrollH = Math.floor($('#feature').offset().top) - 260;//500
|
|
|
+ }
|
|
|
+ if (Y >= scrollH && Y <= scrollH + 1000) {
|
|
|
$(".animate1").stop();
|
|
|
$(".animate1").animate({
|
|
|
top:'0px',
|
|
|
@@ -375,7 +411,7 @@
|
|
|
opacity:'0'
|
|
|
},1000);
|
|
|
};
|
|
|
- if (Y > 1200 && Y < 2200) {
|
|
|
+ if (Y > scrollH + 700 && Y < scrollH + 1700) {
|
|
|
$(".animate2").stop();
|
|
|
$(".animate2").animate({
|
|
|
top:'0px',
|
|
|
@@ -388,7 +424,7 @@
|
|
|
opacity:'0'
|
|
|
},1000);
|
|
|
};
|
|
|
- if (Y > 1900 && Y < 2900) {
|
|
|
+ if (Y > scrollH + 1400 && Y < scrollH + 2400) {
|
|
|
$(".animate3").stop();
|
|
|
$(".animate3").animate({
|
|
|
top:'0px',
|
|
|
@@ -411,7 +447,7 @@
|
|
|
opacity:'0'
|
|
|
},1000);
|
|
|
};
|
|
|
- if (Y > 2600 && Y < 3600) {
|
|
|
+ if (Y > scrollH + 2100 && Y < scrollH + 3100) {
|
|
|
$(".animate4").stop();
|
|
|
$(".animate4").animate({
|
|
|
top:'0px',
|
|
|
@@ -434,27 +470,7 @@
|
|
|
opacity:'0'
|
|
|
},1000);
|
|
|
};
|
|
|
- })
|
|
|
- },
|
|
|
- computed: {
|
|
|
- setTokenPage() {
|
|
|
- return this.$url.web + '/set-token.html'
|
|
|
- },
|
|
|
- ssoPage() {
|
|
|
- if (this.isLogin) {
|
|
|
- return this.$url.sso + '/sassLogin?appId=sp&baseUrl=' +
|
|
|
- encodeURIComponent(this.$url.api + '/api/auth/sso/callback/' + this.clientId)
|
|
|
- }
|
|
|
- if (this.isRegister) {
|
|
|
- return this.$url.sso + '/sassLogin/register?appId=sp&baseUrl=' +
|
|
|
- encodeURIComponent(this.$url.api + '/api/auth/sso/callback/' + this.clientId)
|
|
|
- }
|
|
|
- },
|
|
|
- getnewproblem() {
|
|
|
- return this.$store.state.isproblem;
|
|
|
},
|
|
|
- },
|
|
|
- methods: {
|
|
|
listenOnCallback() {
|
|
|
const me = this
|
|
|
subscribe(this.clientId, '/sso/callback').then(data => {
|
|
|
@@ -509,7 +525,7 @@
|
|
|
me.isRegister = false
|
|
|
})
|
|
|
},
|
|
|
- // 下载1
|
|
|
+ // 下载
|
|
|
downloadOne(){
|
|
|
let url = 'https://saas-assets.usoftchina.com/UsoftchinaSaasClient_setup.exe';
|
|
|
let alink = document.createElement("a");
|
|
|
@@ -578,34 +594,38 @@
|
|
|
//常见问题
|
|
|
navproblem(){
|
|
|
this.$store.commit('problemfalse');
|
|
|
- // document.documentElement.scrollTop = 0;
|
|
|
clearInterval(this.timer);
|
|
|
this.animate(0);
|
|
|
},
|
|
|
home() {
|
|
|
clearInterval(this.timer);
|
|
|
this.animate(0);
|
|
|
- this.setTurnHome();
|
|
|
},
|
|
|
//特色
|
|
|
feature2(){
|
|
|
clearInterval(this.timer);
|
|
|
- this.animate(690);
|
|
|
- this.setTurnHome();
|
|
|
+ setTimeout(()=>{
|
|
|
+ let featH = Math.floor($('#feature').offset().top) - 70;
|
|
|
+ this.animate(featH);//690
|
|
|
+ },10);
|
|
|
},
|
|
|
//功能
|
|
|
service2(){
|
|
|
clearInterval(this.timer);
|
|
|
- this.animate(3530);
|
|
|
- this.setTurnHome();
|
|
|
+ setTimeout(()=>{
|
|
|
+ let servH = Math.floor($('#service').offset().top) - 129;
|
|
|
+ this.animate(servH);//3530
|
|
|
+ },10);
|
|
|
},
|
|
|
// 下载
|
|
|
download(){
|
|
|
// document.documentElement.scrollTop = 4190;
|
|
|
// window.scrollTo(0,4190);
|
|
|
clearInterval(this.timer);
|
|
|
- this.animate(4190);
|
|
|
- this.setTurnHome();
|
|
|
+ setTimeout(()=>{
|
|
|
+ let dowH = Math.floor($('#download').offset().top) - 100;
|
|
|
+ this.animate(dowH);
|
|
|
+ },10)
|
|
|
},
|
|
|
//添加鼠标滚轮事件,鼠标滚动的时候清除定时器,否则无法滚动
|
|
|
scrollout(){
|
|
|
@@ -615,18 +635,25 @@
|
|
|
animate(target) {
|
|
|
clearInterval(this.timer);
|
|
|
this.timer = setInterval(function () {
|
|
|
- var leader = document.documentElement.scrollTop;
|
|
|
+ var leader = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
|
|
|
var step = (target - leader) / 10;
|
|
|
step = step > 0 ? Math.ceil(step) : Math.floor(step);
|
|
|
leader = leader + step;
|
|
|
document.documentElement.scrollTop = leader;
|
|
|
+ window.pageYOffset = leader;
|
|
|
+ document.body.scrollTop = leader;
|
|
|
if (leader === target) {
|
|
|
clearInterval(this.timer);
|
|
|
}
|
|
|
}, 5);
|
|
|
},
|
|
|
- gohome(e){
|
|
|
- this.$store.commit('problemtrue')
|
|
|
+ gohome(ev){
|
|
|
+ var ev = ev || window.event;
|
|
|
+ if (ev.target.childNodes[0].data == '帮助中心') {
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ this.$store.commit('problemtrue')
|
|
|
+ }
|
|
|
// this.isproblem = true
|
|
|
}
|
|
|
}
|