|
|
@ -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> |
|
|
@ -64,13 +66,16 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
recordInfo:[], |
|
|
|
recordInfo: [], |
|
|
|
isStop: false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onUnload: function() { |
|
|
|
this.isStop = true |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getHomeSlideFunc(){ |
|
|
|
getHomeSlideFunc() { |
|
|
|
|
|
|
|
var _self = this; |
|
|
|
uni.request({ |
|
|
@ -79,9 +84,17 @@ |
|
|
|
'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息 |
|
|
|
}, |
|
|
|
success: (res) => { |
|
|
|
this.recordInfo=res.data.data |
|
|
|
setTimeout(function(){_self.getHomeSlideFunc()},2000) |
|
|
|
this.recordInfo = res.data.data |
|
|
|
setTimeout(function() { |
|
|
|
console.log(_self.isStop) |
|
|
|
if (!_self.isStop) { |
|
|
|
_self.getHomeSlideFunc() |
|
|
|
} |
|
|
|
|
|
|
|
}, 2000) |
|
|
|
this.$forceUpdate() |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
@ -99,9 +112,9 @@ |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
page{ |
|
|
|
page { |
|
|
|
background-color: #FAFAFA; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|
<style> |
|
|
|