|
@@ -1,4 +1,8 @@
|
|
|
function initSwiper() {
|
|
|
+ if (this.$swiper) {
|
|
|
+ this.$swiper.destroy()
|
|
|
+ this.$swiper = null
|
|
|
+ }
|
|
|
var interleaveOffset = 0.5; //视差比值
|
|
|
|
|
|
function playAnOfIndex(index, type = true, delay) {
|
|
@@ -28,8 +32,8 @@ function initSwiper() {
|
|
|
direction: 'vertical',
|
|
|
mousewheel: true,
|
|
|
//设置宽度为全屏
|
|
|
- width: window.innerWidth,
|
|
|
- height: window.innerHeight,
|
|
|
+ width: $(window).width(),
|
|
|
+ height: $(window).height(),
|
|
|
allowSlideNext: false,
|
|
|
lazy: {
|
|
|
loadPrevNext: true,
|
|
@@ -279,7 +283,9 @@ var vPage = new Vue({
|
|
|
},
|
|
|
mounted: function () {
|
|
|
initPlayMusic()
|
|
|
- initSwiper.bind(this)()
|
|
|
+ this.$nextTick(function () {
|
|
|
+ initSwiper.bind(this)()
|
|
|
+ }.bind(this))
|
|
|
},
|
|
|
methods: {
|
|
|
goExp: function (type) {
|
|
@@ -323,7 +329,7 @@ var vPage = new Vue({
|
|
|
}
|
|
|
_this.pageInfo = res.data
|
|
|
_this.$nextTick(function () {
|
|
|
- initSwiper.bind(_this)()
|
|
|
+ initSwiper.bind(_this)();
|
|
|
})
|
|
|
} else {
|
|
|
location.replace('/swordfish/about')
|
|
@@ -363,7 +369,7 @@ var vPage = new Vue({
|
|
|
if (res && res.error_msg === '' && res.data) {
|
|
|
_this.pageInfo = res.data
|
|
|
_this.$nextTick(function () {
|
|
|
- initSwiper.bind(_this)()
|
|
|
+ initSwiper.bind(_this)();
|
|
|
})
|
|
|
}
|
|
|
}
|