Browse Source

死循环,注掉js引入

master
mk 2 years ago
parent
commit
c3ded4cbcb
  1. 2
      public/index.html
  2. 34
      src/views/next/screen-content-left/jinshui-impression/index.vue

2
public/index.html

@ -15,7 +15,7 @@
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<script src="./js/gcoord.global.js"></script> <script src="./js/gcoord.global.js"></script>
<script src="./js/h5player/h5player.min.js"></script> <script src="./js/h5player/h5player.min.js"></script>
<script src="https://unpkg.com/@turf/turf/turf.min.js"></script> <!-- <script src="https://unpkg.com/@turf/turf/turf.min.js"></script> -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" /> --> <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" /> -->
<link rel="stylesheet" href="./css/animate.min-4.1.1.css"> <link rel="stylesheet" href="./css/animate.min-4.1.1.css">
<% if (process.env.NODE_ENV === 'development') { %> <% if (process.env.NODE_ENV === 'development') { %>

34
src/views/next/screen-content-left/jinshui-impression/index.vue

@ -95,20 +95,36 @@ export default {
this.videoStatus = 'end' this.videoStatus = 'end'
}, },
// //
textScroll () { // textScroll () {
// this.textScrollId = setTimeout(() => {
// this.textScroll()
// }, 40)
// this.$nextTick(() => {
// if (this.scrollViewTop >= -this.$refs['para-container'].children[0].children[0].offsetHeight) {
// this.scrollViewTop -= 1
// } else {
// clearTimeout(this.textScrollId)
// this.scrollViewTop = 0
// this.textScroll()
// }
// })
// }
textScroll() {
this.textScrollId = setTimeout(() => { this.textScrollId = setTimeout(() => {
this.textScroll()
}, 40)
this.$nextTick(() => { this.$nextTick(() => {
if (this.scrollViewTop >= -this.$refs['para-container'].children[0].children[0].offsetHeight) { if (this.scrollViewTop >= -this.$refs['para-container'].children[0].children[0].offsetHeight) {
this.scrollViewTop -= 1 this.scrollViewTop -= 1;
this.textScroll(); //
} else { } else {
clearTimeout(this.textScrollId) clearTimeout(this.textScrollId);
this.scrollViewTop = 0 this.scrollViewTop = 0;
this.textScroll() //
} this.textScroll();
})
} }
});
}, 40);
}
} }
} }
</script> </script>

Loading…
Cancel
Save