Browse Source

修改

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

111
pages/menu/market/index.vue

@ -1,37 +1,39 @@
<template>
<view class="main_con">
<view class="title">
Market
</view>
<view class="title">
Market
</view>
<view class="main">
<view class="title_item flex">
<view class="text1">Tranding Pairs</view>
<view class="text1">Price/Vol</view>
<view class="text1 flex">
24h Chang
<view class="title_item flex">
<view class="text1">Tranding Pairs</view>
<view class="text1">Price/Vol</view>
<view class="text1 flex">
24h Chang
</view>
</view>
<view class="scroll">
<view class="item flex" v-for="(item,index) in recordInfo">
<view class="text2">
{{item.name}}/USDT
</view>
<view class="text2">
<view class="">
{{item.current_price_usd}}
</view>
</view>
<view class="t1">
{{item.current_price}}
<view class="scroll">
<view class="item flex" v-for="(item,index) in recordInfo">
<view class="text2">
{{item.name}}/USDT
</view>
<view class="text2">
<view class="">
{{item.current_price_usd}}
</view>
<view class="t1">
{{item.current_price}}
</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>
{{item.change_percent}}%
</view>
</view>
</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>
{{item.change_percent}}%
</view>
</view>
</view>
@ -51,8 +53,8 @@
</view>
<tab-bar :selectActive="3"></tab-bar>
</view>
<tab-bar :selectActive="3"></tab-bar>
</view>
@ -64,28 +66,39 @@
export default {
data() {
return {
recordInfo:[],
recordInfo: [],
isStop: false
}
},
onUnload: function() {
this.isStop = true
},
methods: {
getHomeSlideFunc(){
getHomeSlideFunc() {
var _self = this;
uni.request({
url: 'https://dncapi.fxhapp.com/api/coin/web-coinrank?page=1&type=0&pagesize=10', //
header: {
'content-type': 'application/x-www-form-urlencoded', //
},
success: (res) => {
this.recordInfo = res.data.data
setTimeout(function() {
console.log(_self.isStop)
if (!_self.isStop) {
_self.getHomeSlideFunc()
}
}, 2000)
this.$forceUpdate()
var _self = this;
uni.request({
url: 'https://dncapi.fxhapp.com/api/coin/web-coinrank?page=1&type=0&pagesize=10', //
header: {
'content-type': 'application/x-www-form-urlencoded', //
},
success: (res) => {
this.recordInfo=res.data.data
setTimeout(function(){_self.getHomeSlideFunc()},2000)
this.$forceUpdate()
}
});
}
});
},
},
},
@ -99,9 +112,9 @@
};
</script>
<style scoped>
page{
background-color: #FAFAFA;
}
page {
background-color: #FAFAFA;
}
</style>
<style>

Loading…
Cancel
Save