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> </view>
<view class="btn" :class="item.change_percent>0?'red':'green'"> <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-left1.png" mode="aspectFit" class="img1"
<image src="../../../static/tongyonh/arrow-down-left.png" mode="aspectFit" class="img1" v-if="item.change_percent<0"></image> 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}}% {{item.change_percent}}%
</view> </view>
</view> </view>
@ -64,13 +66,16 @@
export default { export default {
data() { data() {
return { return {
recordInfo:[], recordInfo: [],
isStop: false
} }
}, },
onUnload: function() {
this.isStop = true
},
methods: { methods: {
getHomeSlideFunc(){ getHomeSlideFunc() {
var _self = this; var _self = this;
uni.request({ uni.request({
@ -79,9 +84,17 @@
'content-type': 'application/x-www-form-urlencoded', // 'content-type': 'application/x-www-form-urlencoded', //
}, },
success: (res) => { success: (res) => {
this.recordInfo=res.data.data this.recordInfo = res.data.data
setTimeout(function(){_self.getHomeSlideFunc()},2000) setTimeout(function() {
console.log(_self.isStop)
if (!_self.isStop) {
_self.getHomeSlideFunc()
}
}, 2000)
this.$forceUpdate() this.$forceUpdate()
} }
}); });
@ -99,9 +112,9 @@
}; };
</script> </script>
<style scoped> <style scoped>
page{ page {
background-color: #FAFAFA; background-color: #FAFAFA;
} }
</style> </style>
<style> <style>

Loading…
Cancel
Save