Browse Source

修改

master
vee 4 years ago
parent
commit
9e04079d14
  1. 31
      pages/menu/market/index.vue

31
pages/menu/market/index.vue

@ -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>

Loading…
Cancel
Save