소스 검색

bug修改

wangfei 6 년 전
부모
커밋
c3f5af1719
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13
    0
      src/views/vote/signup.vue

+ 13
- 0
src/views/vote/signup.vue 파일 보기

@@ -144,7 +144,20 @@ export default {
144 144
     messageWrite() {
145 145
       this.messagenum = this.postData.message.length;
146 146
     },
147
+    pageScroll() {
148
+      var currentPosition, timer;
149
+      var speed = 1;//页面滚动距离
150
+      timer = setInterval(function () {
151
+        currentPosition = document.documentElement.scrollTop || document.body.scrollTop;
152
+        currentPosition -= speed;
153
+        window.scrollTo(0, currentPosition);//页面向上滚动
154
+        currentPosition += speed; //speed变量
155
+        window.scrollTo(0, currentPosition);//页面向下滚动
156
+        clearInterval(timer);
157
+      }, 1);
158
+    },
147 159
     SubmitBtn() {
160
+      this.pageScroll()
148 161
       if (this.postData.photo == "") {
149 162
         Dialog.alert({ message: "请先上传您的全家福!" })
150 163
         return false;