Browse Source

修改

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

165
pages/menu/market/index.vue

@ -1,59 +1,61 @@
<template> <template>
<view class="main_con"> <view class="main_con">
<view class="title"> <view class="title">
Market 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>
</view> </view>
<view class="scroll"> <view class="main">
<view class="item flex" v-for="(item,index) in recordInfo"> <view class="title_item flex">
<view class="text2"> <view class="text1">Tranding Pairs</view>
{{item.name}}/USDT <view class="text1">Price/Vol</view>
</view> <view class="text1 flex">
<view class="text2"> 24h Chang
<view class="">
{{item.current_price_usd}} </view>
</view> </view>
<view class="t1"> <view class="scroll">
{{item.current_price}} <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>
<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>
<tab-bar :selectActive="3"></tab-bar>
</view> </view>
<tab-bar :selectActive="3"></tab-bar>
</view>
@ -64,44 +66,55 @@
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({
url: 'https://dncapi.fxhapp.com/api/coin/web-coinrank?page=1&type=0&pagesize=10', // url: 'https://dncapi.fxhapp.com/api/coin/web-coinrank?page=1&type=0&pagesize=10', //
header: { header: {
'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() {
this.$forceUpdate() console.log(_self.isStop)
} if (!_self.isStop) {
}); _self.getHomeSlideFunc()
}
},
}, 2000)
this.$forceUpdate()
}
});
},
}, },
onLoad() { onLoad() {
this.getHomeSlideFunc() this.getHomeSlideFunc()
} }
}; };
</script> </script>
<style scoped> <style scoped>
page{ page {
background-color: #FAFAFA; background-color: #FAFAFA;
} }
</style> </style>
<style> <style>

Loading…
Cancel
Save