|
@@ -1,20 +1,25 @@
|
|
|
<template>
|
|
|
<view class="index-data">
|
|
|
<view class="index-top">
|
|
|
- <top-head></top-head>
|
|
|
+ <top-head></top-head>
|
|
|
<view class="top-text">
|
|
|
- <view class="text-item">{{$t('index.index.top.one')}}</view>
|
|
|
- <view class="text-item">{{$t('index.index.top.two')}}</view>
|
|
|
- <view class="text-item">{{$t('index.index.top.three')}}</view>
|
|
|
- <view class="text-item">{{$t('index.index.top.four')}}</view>
|
|
|
+ {{ $t('index.index.top.one') }}
|
|
|
+ <!-- <view class="text-item">{{$t('index.index.top.one')}}</view>-->
|
|
|
+ <!-- <view class="text-item">{{$t('index.index.top.two')}}</view>-->
|
|
|
+ <!-- <view class="text-item">{{$t('index.index.top.three')}}</view>-->
|
|
|
+ <!-- <view class="text-item">{{$t('index.index.top.four')}}</view>-->
|
|
|
</view>
|
|
|
<view class="top-but">
|
|
|
- <button @click="goToUrl(1)">{{$t('index.index.investment')}}</button>
|
|
|
+ <button @click="goToUrl(1)">{{ $t('index.index.investment') }}</button>
|
|
|
+ </view>
|
|
|
+ <view class="top-bottom">
|
|
|
+ <image class="bottom-img" src="@/static/img/index/cp.png" mode="aspectFill"></image>
|
|
|
+ <text class="bottom-text">{{ $t('index.index.top.cp') }}</text>
|
|
|
</view>
|
|
|
<view class="top-bottom">
|
|
|
<image class="bottom-img" src="@/static/img/index/dagou.svg" mode="aspectFill"></image>
|
|
|
- <text class="bottom-text">{{$t('index.index.top.five')}}</text>
|
|
|
- <text class="bottom-text" @click="goToUrl(2)">{{$t('index.index.top.six')}}</text>
|
|
|
+ <text class="bottom-text">{{ $t('index.index.top.five') }}{{days}}{{$t('index.index.top.four')}}</text>
|
|
|
+ <text class="bottom-text" @click="goToUrl(2)">{{ $t('index.index.top.six') }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="index-list">
|
|
@@ -22,7 +27,7 @@
|
|
|
<view class="title-img">
|
|
|
<image src="@/static/img/index/bnb2.png" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
- <view class="title-text">{{$t('index.index.list.title')}}({{total}})</view>
|
|
|
+ <view class="title-text">{{ $t('index.index.list.title') }}({{ total }})</view>
|
|
|
</view>
|
|
|
<division></division>
|
|
|
<earning-list @setTotal="setTotal"></earning-list>
|
|
@@ -40,7 +45,7 @@ import TopHead from "@/pages/index/components/top-head";
|
|
|
import EarningList from "@/pages/index/components/earning-list";
|
|
|
|
|
|
export default {
|
|
|
- components: {EarningList, TopHead, Division},
|
|
|
+ components: {EarningList, TopHead, Division},
|
|
|
data() {
|
|
|
return {
|
|
|
applicationLocale: '',
|
|
@@ -69,7 +74,8 @@ export default {
|
|
|
},
|
|
|
bnbNum: 0,
|
|
|
babAddress: '',
|
|
|
- total:0
|
|
|
+ total: 0,
|
|
|
+ days:365
|
|
|
|
|
|
}
|
|
|
|
|
@@ -77,13 +83,23 @@ export default {
|
|
|
watch: {},
|
|
|
async onLoad(query) {
|
|
|
this.getMyData()
|
|
|
+ this.handlerDateDurationCurrent()
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
- setTotal(total){
|
|
|
- this.total=total
|
|
|
+ handlerDateDurationCurrent() {
|
|
|
+ let d1 = new Date('2021-11-12')
|
|
|
+ let d2 = new Date()
|
|
|
+
|
|
|
+ let cha = Math.abs(d2.getTime() - d1.getTime())
|
|
|
+ this.days = parseInt(cha / (24 * 60 * 60 * 1000))
|
|
|
+ // let hours = parseInt(cha % (24 * 60 * 60 * 1000) / (60 * 60 * 1000))
|
|
|
+ // let mins = parseInt(cha % (60 * 60 * 1000) / (60 * 1000))
|
|
|
+ },
|
|
|
+ setTotal(total) {
|
|
|
+ this.total = total
|
|
|
},
|
|
|
goToUrl(type) {
|
|
|
switch (type) {
|
|
@@ -111,8 +127,8 @@ export default {
|
|
|
|
|
|
getMyData() {
|
|
|
this.babAddress = tokenpocketBnb.getAccounts()
|
|
|
- let token=uni.getStorageSync('token')
|
|
|
- if(token){
|
|
|
+ let token = uni.getStorageSync('token')
|
|
|
+ if (token) {
|
|
|
getMemberInfo().then((res) => {
|
|
|
if (res.code === 1) {
|
|
|
this.memberData = res.data
|
|
@@ -128,12 +144,13 @@ export default {
|
|
|
//@import "/static/css/common.css";
|
|
|
.index-data {
|
|
|
.index-top {
|
|
|
- box-shadow: 0 0 24rpx 0 rgba(0,0,0,0.08);
|
|
|
+ box-shadow: 0 0 24rpx 0 rgba(0, 0, 0, 0.08);
|
|
|
box-sizing: border-box;
|
|
|
overflow: hidden;
|
|
|
padding: 40rpx 0;
|
|
|
width: 100%;
|
|
|
background: linear-gradient(0deg, rgb(64, 74, 96) 0%, rgb(9, 21, 36) 100%);
|
|
|
+
|
|
|
.top-head {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
@@ -200,10 +217,14 @@ export default {
|
|
|
clear: both;
|
|
|
padding: 40rpx;
|
|
|
margin-top: 40rpx;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 36px;
|
|
|
|
|
|
.text-item {
|
|
|
color: #fff;
|
|
|
- font-size: 50rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
}
|
|
@@ -224,7 +245,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.top-bottom {
|
|
|
- padding: 40rpx;
|
|
|
+ padding: 10rpx 40rpx 0 40rpx;
|
|
|
|
|
|
.bottom-img {
|
|
|
display: inline-block;
|
|
@@ -243,6 +264,10 @@ export default {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .top-bottom:first-child {
|
|
|
+ padding: 40rpx 40rpx 0 40rpx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.index-list {
|