|
|
@ -26,8 +26,10 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btn" :class="item.change_percent>0?'red':'green'"> |
|
|
|
<image src="../../../static/tongyonh/arrow-down-left1.png" mode="aspectFit" class="img1" v-if="item.change_percent>=0"></image> |
|
|
|
<image src="../../../static/tongyonh/arrow-down-left.png" mode="aspectFit" class="img1" v-if="item.change_percent<0"></image> |
|
|
|
<image src="../../../static/tongyonh/arrow-down-left1.png" mode="aspectFit" class="img1" |
|
|
|
v-if="item.change_percent>=0"></image> |
|
|
|
<image src="../../../static/tongyonh/arrow-down-left.png" mode="aspectFit" class="img1" |
|
|
|
v-if="item.change_percent<0"></image> |
|
|
|
{{item.change_percent}}% |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -65,10 +67,13 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
recordInfo: [], |
|
|
|
isStop: false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onUnload: function() { |
|
|
|
this.isStop = true |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getHomeSlideFunc() { |
|
|
|
|
|
|
@ -80,8 +85,16 @@ |
|
|
|
}, |
|
|
|
success: (res) => { |
|
|
|
this.recordInfo = res.data.data |
|
|
|
setTimeout(function(){_self.getHomeSlideFunc()},2000) |
|
|
|
setTimeout(function() { |
|
|
|
console.log(_self.isStop) |
|
|
|
if (!_self.isStop) { |
|
|
|
_self.getHomeSlideFunc() |
|
|
|
} |
|
|
|
|
|
|
|
}, 2000) |
|
|
|
this.$forceUpdate() |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|