Browse Source

兼容苹果浏览器

jinsy 7 years ago
parent
commit
555eab9cc4

+ 3 - 0
frontend/saas-portal-web/src/components/conenter/addenterprise.vue

@@ -187,6 +187,7 @@ import { setTimeout, clearTimeout } from 'timers';
             //取消添加企业
             tjquxiao(){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 this.$router.push({name:'company',}); 
             },
             //检测企业名称1
@@ -401,6 +402,7 @@ import { setTimeout, clearTimeout } from 'timers';
                             setTimeout(()=>{
                                 this.$router.push({name:'company'});
                                 document.documentElement.scrollTop = 0;
+                                window.pageYOffset = 0;
                             },3000)
                         } else {
                             this.$message.error(res.data.message);
@@ -494,6 +496,7 @@ import { setTimeout, clearTimeout } from 'timers';
                                 this.isadd = true;//添加成功弹窗
                                 setTimeout(()=>{
                                     document.documentElement.scrollTop = 0;
+                                    window.pageYOffset = 0;
                                     let session = Session.get();
                                     session.account.realname = name;
                                     session.account.email = email;

+ 3 - 0
frontend/saas-portal-web/src/components/conenter/company.vue

@@ -220,6 +220,7 @@
             //分页
             handleCurrentChange(val){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 this.pagingtion(val,this.size);
             },
             //分页函数
@@ -383,12 +384,14 @@
             //查看企业详情
             getEnterpriseInfo(d){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 window.sessionStorage.setItem('content',JSON.stringify(d))
                 this.$router.push({path:'/details'});
             },
              //添加企业
             addEnterprise(){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
             },
             //关闭弹窗
             guanbitc(){

+ 3 - 0
frontend/saas-portal-web/src/components/conenter/details.vue

@@ -141,6 +141,7 @@ import Session from '@/utils/session'
             //修改企业信息
             xiugaiqiye(){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 this.modify = false;
                 setTimeout(()=>{
                     this.selects()
@@ -170,6 +171,7 @@ import Session from '@/utils/session'
             // 取消修改
             quxiaoxiugai(){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 this.modify = true;
             },
             // 保存修改
@@ -199,6 +201,7 @@ import Session from '@/utils/session'
                     .then(res=>{
                         if (res.data.success) {
                             document.documentElement.scrollTop = 0;
+                            window.pageYOffset = 0;
                             this.modify = true;
                             let session = Session.get();
                             session.account.email = email;

+ 9 - 4
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -241,7 +241,7 @@ import { setTimeout } from 'timers';
             if (!this.mytoken) {
                 this.$router.push({path:'/home'})
             };
-            document.documentElement.scrollTop = 0;
+            this.scrollout();
         },
         mounted(){
             let phone = this.mytoken.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
@@ -345,7 +345,7 @@ import { setTimeout } from 'timers';
             },
             // 分页
             handleCurrentChange(val) {
-                document.documentElement.scrollTop = 0;
+                this.scrollout();
                 this.pagingtion(val,this.size);
             },
             //分页函数
@@ -447,11 +447,11 @@ import { setTimeout } from 'timers';
             navproblem(){
                 this.$router.push({name: 'Home', params: {isporblem: false}})
                 this.$store.commit('problemfalse');
-                document.documentElement.scrollTop = 0;
+                this.scrollout();
                 this.setTurnHome();
             },
             home(){
-                document.documentElement.scrollTop = 0;
+                this.scrollout();
                 this.setTurnHome();
             },
             // 特色
@@ -472,6 +472,11 @@ import { setTimeout } from 'timers';
             gohome(e){
                 this.$store.commit('problemtrue')
             },
+            scrollout(){
+                document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
+                document.body.scrollTop = 0;
+            },
             //内容不足500固定高度
             boxheight(){
                 let H = this.$refs.qiyebox.offsetHeight;

+ 3 - 1
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -635,11 +635,13 @@
       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);
             }

+ 3 - 3
frontend/saas-portal-web/static/css/main.css

@@ -331,10 +331,10 @@ main > section {
 }
 .bz-yuandian {
     background: #FFCC01;
-    width: 16px;
-    height: 16px;
+    width: 14px;
+    height: 14px;
     border-radius: 50%;
-    margin: 4px 8px 0 0;
+    margin: 7px 8px 0 0;
 }
 .bz-right-conent li {
     border-bottom: 1px solid #E8ECEF;