<template>
|
<div class="warehouse_page">
|
<div class="content">
|
<div class="top_title" :class="titleDialog ? 'active' : ''" ref="topTitle">
|
<div class="titles">
|
<div class="left_title" >
|
<div class="title">
|
<span>余额宝</span>
|
</div>
|
<!-- <div class="img">-->
|
<!-- <img src="../../assets/img/xiala.png" alt />-->
|
<!-- </div>-->
|
</div>
|
<div class="right_box"></div>
|
</div>
|
|
</div>
|
<div class="warehouse_card">
|
|
<div class="tabs_card">
|
<div class="tabs_card_content">
|
|
<!-- 持仓 currentIndex: 0 -->
|
<div class="over">
|
<van-list v-model="loading" :finished="finished" :finished-text="$t('hj43')"
|
@load="onLoad" :immediate-check="immediate">
|
<div class="tabs_o">
|
<div class="tabs_o_items" v-for="(item) in this.$store.state.yebs" :key="item.id">
|
<div class="tabs_o_title">
|
<div style="width: calc(100% - 3.5rem);">
|
<span class="title">周期 {{item.returnTime}} 天-金额 {{item.money}}</span>
|
<span class="buy_to_sell" :class="maichu">
|
{{item.returnOfRate}}% </span>
|
<!-- <span class="multiple">333</span>-->
|
<!-- <span class="nums">444</span>-->
|
</div>
|
|
<div class="right_btn pingbtn">
|
<span style="margin-right: 0;">₹ {{item.money}}</span>
|
</div>
|
</div>
|
<!-- <div class="center_price">-->
|
<!-- <div class="profit">-->
|
<!-- <span>{{ item.profitAndLose }}</span>-->
|
<!-- </div>-->
|
<!-- <div class="start_price jiantou">-->
|
<!-- <span>{{ item.buyOrderPrice }}</span>-->
|
<!-- </div>-->
|
<!-- <div class="new_price">-->
|
<!-- <span>{{ item.now_price }}</span>-->
|
<!-- </div>-->
|
<!-- </div>-->
|
<!-- <div class="bottom_price_title">-->
|
<!-- <div class="profit_title">-->
|
<!-- <span>{{ $t('hj118') }}</span>-->
|
<!-- </div>-->
|
<!-- <div class="start_price">-->
|
<!-- <span>{{ $t('hj119') }}</span>-->
|
<!-- </div>-->
|
<!-- <div class="new_price">-->
|
<!-- <span>{{ $t('hj120') }}</span>-->
|
<!-- </div>-->
|
<!-- </div>-->
|
|
</div>
|
</div>
|
</van-list>
|
|
<!-- 平仓 -->
|
|
</div>
|
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="dialog" v-if="titleDialog" @click="titleDialog = false"></div>
|
</div>
|
</template>
|
|
<script>
|
import { Toast } from 'vant'
|
// import { MessageBox } from 'mint-ui'
|
import * as api from '@/axios/api'
|
export default {
|
data () {
|
return {
|
tabsArr: ['余额宝'],
|
tabsCurrentIndex: 0,
|
titleName: this.$t('hj114'),
|
indexSettingInfo: {},
|
futuresSettingInfo: {},
|
tabsPositionNumArr: [],
|
yebs: [],
|
titleIndex: 0,
|
settingInfo: {},
|
tabsPcArr: [],
|
titleDialog: false,
|
total: 0,
|
totals: 0,
|
totalss: 0,
|
loading: false,
|
finished: false,
|
finisheds: false,
|
finishedss: false,
|
page: 1,
|
pages: 1,
|
pagess: 1,
|
immediate: false,
|
loadings: false,
|
loadingss: false,
|
tabsOrderList: [],
|
xgTotal: 0,
|
tabsXgArr: [],
|
loadingXg: false,
|
finishedXg: false
|
}
|
},
|
mounted () {
|
this.getUserInfo()
|
this.getIndexSettingInfo()
|
this.getSettingInfo()
|
this.getYebs()
|
},
|
created () {
|
if (this.$route.query.index) {
|
this.tabsCurrentIndex = Number(this.$route.query.index)
|
}
|
},
|
methods: {
|
|
async getYebs () {
|
// 获取用户信息
|
let data = await api.getYebs()
|
|
if (data.status === 0) {
|
this.$store.state.yebs = data.data
|
console.log(this.$store.state.yebs)
|
} else {
|
Toast(data.msg)
|
}
|
},
|
onLoad () {
|
// 持仓
|
this.page++
|
switch (this.titleIndex) {
|
case 0:
|
// 沪深京持仓
|
this.getListDetail()
|
break
|
case 1:
|
// 指数持仓
|
this.getzhishuListDetail()
|
break
|
|
default:
|
break
|
}
|
},
|
onLoads () {
|
// 平仓
|
this.pages++
|
switch (this.titleIndex) {
|
case 0:
|
// 沪深京平仓
|
this.getListDetails()
|
break
|
case 1:
|
// 指数平仓
|
this.getzhishuListDetails()
|
break
|
default:
|
break
|
}
|
},
|
onLoadss () {
|
this.pagess++
|
switch (this.titleIndex) {
|
case 1:
|
this.getorderList()
|
break
|
default:
|
break
|
}
|
},
|
onLoadXg () {
|
// this.getNewXg();
|
},
|
|
async getIndexSettingInfo () {
|
// 网站设置信息 指数
|
let data = await api.getIndexSetting()
|
if (data.status === 0) {
|
// 成功
|
this.indexSettingInfo = data.data
|
} else {
|
Toast(data.msg)
|
}
|
},
|
|
async getSettingInfo () {
|
let data = await api.getSetting()
|
if (data.status === 0) {
|
// 成功
|
this.settingInfo = data.data
|
} else {
|
Toast(data.msg)
|
}
|
},
|
async getUserInfo () {
|
// 获取用户信息
|
// let showcookie = this.getCookie('USER_TOKEN');
|
let data = await api.getUserInfo()
|
if (data.status === 0) {
|
// this.getProductSetting()
|
this.$store.state.userInfo = data.data
|
} else {
|
Toast(data.msg)
|
}
|
this.$store.state.user = this.user
|
}
|
|
},
|
filters: {
|
gettime (time) {
|
if (!time) {
|
return ''
|
}
|
var nd = new Date(time)
|
var y = nd.getFullYear()
|
var mm = nd.getMonth() + 1
|
var d = nd.getDate()
|
var h = nd.getHours()
|
var m = nd.getMinutes()
|
var c = nd.getSeconds()
|
if (mm < 10) {
|
mm = '0' + mm
|
}
|
if (d < 10) {
|
d = '0' + d
|
}
|
if (h < 10) {
|
h = '0' + h
|
}
|
if (m < 10) {
|
m = '0' + m
|
}
|
if (c < 10) {
|
c = '0' + c
|
}
|
// 17:35:2922-06-2022
|
return y + '/' + mm + '/' + d + ' ' + h + ':' + m + ':' + c
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="less">
|
/deep/ .mint-msgbox-title {
|
font-size: 0.4rem !important;
|
}
|
|
.pingbtn {
|
width: auto !important;
|
height: auto !important;
|
background: rgb(45, 106, 233);
|
color: rgb(255, 255, 255);
|
padding: 0.2rem 0.4rem;
|
border-radius: 0.2rem !important;
|
}
|
|
.pink {
|
color: #eb2f96;
|
background: #fff0f6;
|
border-color: #ffadd2;
|
}
|
|
.red {
|
color: #f5222d;
|
background: #fff1f0;
|
border-color: #ffa39e;
|
}
|
|
.blue {
|
color: #1890ff;
|
background: #e6f7ff;
|
border-color: #91d5ff;
|
}
|
|
.green {
|
color: #52c41a;
|
background: #f6ffed;
|
border-color: #b7eb8f;
|
}
|
|
.purple {
|
color: #722ed1;
|
background: #f9f0ff;
|
border-color: #d3adf7;
|
}
|
|
@boxCenter: {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
|
;
|
@topCardColor: #bdbdbd;
|
|
.warehouse_page {
|
width: 100%;
|
height: calc(100% - 1.2974rem);
|
}
|
|
.content {
|
width: 100%;
|
height: 100%;
|
position: relative;
|
}
|
|
.top_title.active {
|
height: 6.5rem;
|
}
|
|
.top_title {
|
width: 100%;
|
height: 0.9231rem;
|
position: absolute;
|
top: 0.6rem;
|
z-index: 10;
|
overflow: hidden;
|
transition: all 0.3s;
|
padding: 0 .3rem;
|
|
.titles {
|
width: 100%;
|
height: 0.9231rem;
|
display: flex;
|
padding: 0 0.1rem;
|
}
|
|
.left_title,
|
.right_box {
|
// width: 50%;
|
height: 100%;
|
display: flex;
|
}
|
|
.title {
|
width: auto;
|
height: 100%;
|
font-size: 0.4897rem;
|
display: flex;
|
align-items: center;
|
|
span {
|
font-size: 0.4897rem;
|
font-weight: 600;
|
}
|
}
|
|
.img {
|
// width: 40%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
|
img {
|
width: 0.6rem;
|
height: 0.6rem;
|
}
|
}
|
}
|
|
.warehouse_card {
|
width: 100%;
|
height: calc(100% - 1rem);
|
position: absolute;
|
top: 1.5231rem;
|
z-index: 0;
|
padding: 0 0.3333rem;
|
background: rgb(242, 243, 247);
|
|
.top_card {
|
width: 100%;
|
height: 4.2308rem;
|
border-radius: 0.15rem;
|
margin-top: 0.3rem;
|
background: #fff;
|
|
.card_content {
|
width: 100%;
|
height: 100%;
|
padding: 0.4rem;
|
|
.t_title {
|
width: 100%;
|
height: 0.5128rem;
|
display: flex;
|
align-items: center;
|
|
span {
|
font-size: 0.3046rem;
|
font-weight: bold;
|
}
|
}
|
|
.t_price {
|
width: 100%;
|
height: 0.5128rem;
|
display: flex;
|
align-items: center;
|
|
.price {
|
font-weight: 600;
|
font-size: 0.4246rem;
|
margin-top: 0.07rem;
|
}
|
|
.profits {
|
font-weight: 800;
|
font-size: 0.2846rem;
|
color: #dd2c34;
|
margin-top: 0.2rem;
|
margin-left: 0.2rem;
|
}
|
}
|
|
.balance {
|
width: 100%;
|
height: 0.3846rem;
|
margin-top: 0.428rem;
|
display: flex;
|
|
>div {
|
width: 50%;
|
height: 100%;
|
color: @topCardColor;
|
|
span {
|
font-weight: 600;
|
}
|
}
|
}
|
|
.num {
|
width: 100%;
|
height: 0.3846rem;
|
margin-top: 0.1rem;
|
display: flex;
|
|
>div {
|
width: 50%;
|
height: 100%;
|
|
span {
|
font-weight: 600;
|
}
|
}
|
|
.right_margin {
|
color: rgb(81, 164, 99);
|
|
span {
|
font-weight: normal !important;
|
}
|
}
|
}
|
|
.margin {
|
width: 100%;
|
height: 0.3846rem;
|
margin-top: 0.2rem;
|
display: flex;
|
|
>div {
|
width: 50%;
|
height: 100%;
|
color: @topCardColor;
|
|
span {
|
font-weight: 600;
|
}
|
}
|
}
|
|
.prices {
|
width: 100%;
|
height: 0.3846rem;
|
margin-top: 0.1rem;
|
display: flex;
|
|
>div {
|
width: 50%;
|
height: 100%;
|
|
span {
|
font-weight: 600;
|
}
|
}
|
}
|
}
|
}
|
}
|
|
.over {
|
width: 100%;
|
height: calc(100% - 0.7179rem);
|
overflow: auto;
|
padding: 0 0.3rem;
|
}
|
|
.tabs_card {
|
width: 100%;
|
height: 100%;
|
margin-top: 0.3rem;
|
background: #fff;
|
border-radius: 0.2rem;
|
padding-top: 0.15rem;
|
}
|
|
.over::-webkit-scrollbar {
|
display: none;
|
}
|
|
.tabs_card_content {
|
width: 100%;
|
height: 100%;
|
|
.tabs_top_title {
|
width: 100%;
|
height: 1rem;
|
border-bottom: 0.01rem solid #ececec;
|
display: flex;
|
align-items: center;
|
font-size: 0.4103rem;
|
padding: 0.2rem 0.3rem 0;
|
justify-content: space-between;
|
overflow-x: scroll;
|
|
&::-webkit-scrollbar {
|
display: none;
|
}
|
|
>div {
|
// width: 20%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
white-space: nowrap;
|
padding: 0 0.3rem;
|
|
span {
|
display: inline-block;
|
height: 100%;
|
font-weight: 550;
|
// line-height: 0.7179rem;
|
text-align: center;
|
|
}
|
|
span.active {
|
color: rgb(62, 121, 226);
|
text-align: center;
|
// border-bottom: 0.1rem solid rgb(62, 121, 226);
|
|
}
|
|
span.active::after {
|
content: '';
|
width: 80%;
|
|
height: 0.001rem;
|
display: block;
|
margin: 0 auto;
|
margin-top: 0.3rem;
|
border-bottom: 0.06rem solid rgb(62, 121, 226);
|
}
|
|
}
|
}
|
|
.tabs_o {
|
width: 100%;
|
margin-top: 0.3rem;
|
|
>.tabs_o_items {
|
width: 100%;
|
// height: 2.2rem;
|
position: relative;
|
border-bottom: 0.01rem solid #ececec;
|
// margin-bottom: 0.1rem;
|
padding: 0.3rem 0;
|
|
.tabs_o_title {
|
width: 100%;
|
// height: 0.7179rem;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
|
span {
|
display: inline-block;
|
margin-right: 0.2rem;
|
}
|
|
.title {
|
font-weight: 600;
|
font-size: 0.4059rem;
|
}
|
|
.buy_to_sell {
|
|
padding: 0.08rem 0.1rem;
|
|
font-weight: 600;
|
}
|
|
.multiple {
|
padding: 0.08rem 0.1rem;
|
background: rgb(236, 243, 252);
|
color: rgb(42, 108, 230);
|
font-weight: 600;
|
;
|
}
|
|
.nums {
|
color: @topCardColor;
|
}
|
}
|
|
.center_price {
|
width: 100%;
|
// height: 0.3846rem;
|
display: flex;
|
align-items: center;
|
margin-top: 0.3rem;
|
|
>div {
|
width: 28%;
|
height: 100%;
|
|
span {
|
font-weight: 600;
|
}
|
}
|
|
.profit {
|
color: rgb(209, 79, 91);
|
}
|
}
|
|
.bottom_price_title {
|
width: 100%;
|
// height: 0.4rem;
|
margin-top: 0.2rem;
|
display: flex;
|
align-items: center;
|
|
>div {
|
width: 28%;
|
height: 100%;
|
color: @topCardColor;
|
|
span {
|
font-weight: 600;
|
}
|
}
|
}
|
}
|
}
|
}
|
|
.waiting {
|
width: 100%;
|
margin-top: 0.3rem;
|
position: relative;
|
|
.waiting_box {
|
width: 100%;
|
height: 4rem;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
margin-top: 1rem;
|
|
>div {
|
width: 60%;
|
height: 100%;
|
|
img {
|
width: 100%;
|
height: 100%;
|
}
|
|
.gd {
|
display: inline-block;
|
width: 100%;
|
text-align: center;
|
color: rgb(133, 133, 133);
|
}
|
|
.trading {
|
width: 100%;
|
height: 2rem;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
|
span {
|
display: inline-block;
|
width: 4.1026rem;
|
height: 1.0256rem;
|
background: #f7f7f7;
|
color: #3773dd;
|
font-weight: 600;
|
font-size: 0.4615rem;
|
text-align: center;
|
line-height: 1.0256rem;
|
border-radius: 0.2rem;
|
}
|
}
|
}
|
}
|
}
|
|
.right_btn {
|
width: 1.9949rem;
|
height: 0.6667rem;
|
// line-height: 0.6667rem;
|
// position: absolute;
|
right: 1%;
|
top: 27%;
|
// background: #f7f7f7;
|
// color: #3773dd;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
border-radius: 0.15rem;
|
|
span {
|
font-weight: 600;
|
font-size: 0.2846rem;
|
}
|
}
|
|
.right_count {
|
width: 1.7949rem;
|
height: 0.6667rem;
|
position: absolute;
|
right: 1%;
|
top: 20%;
|
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
border-radius: 0.3rem;
|
|
span {
|
font-weight: 600;
|
font-size: 0.3846rem;
|
}
|
}
|
|
.profit_res {
|
width: 100% !important;
|
margin-top: .2rem;
|
}
|
|
.oes {
|
// height: 1.5rem !important;
|
}
|
|
.dialog {
|
width: 100%;
|
height: 100%;
|
position: absolute;
|
top: 0;
|
background: rgba(0, 0, 0, .5);
|
z-index: 9;
|
}
|
|
.overflow_box {
|
width: 100%;
|
height: 1.5rem;
|
border-radius: .2rem;
|
padding: 0 .3rem;
|
margin: .3rem 0;
|
background: #fff;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
|
>div {
|
height: 50%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.left_titles {
|
color: rgb(129, 131, 133);
|
font-size: .3815rem;
|
|
span {
|
font-weight: normal !important;
|
|
}
|
}
|
|
.right_price {
|
color: rgb(128, 135, 145);
|
}
|
}
|
|
.kuan {
|
width: auto !important;
|
// padding-left: 0.5rem;
|
letter-spacing: 0.02rem;
|
}
|
|
.kuans {
|
width: auto !important;
|
padding-left: 0.5rem;
|
letter-spacing: 0.02rem;
|
}
|
|
.left_price {
|
font-weight: normal;
|
|
span {
|
font-size: 0.3rem;
|
color: #000;
|
font-weight: 500 !important;
|
;
|
}
|
}
|
|
.left_price {
|
font-weight: normal;
|
|
span {
|
font-size: 0.3rem;
|
color: #000;
|
font-weight: 500 !important;
|
;
|
}
|
}
|
|
.numDemo {
|
font-size: 0.3rem;
|
color: #000;
|
font-weight: 500 !important;
|
;
|
}
|
|
.maichu {
|
color: rgb(225, 57, 65);
|
background: rgb(252, 238, 240);
|
}
|
|
.mairu {
|
color: rgb(109, 175, 125);
|
background: rgb(215, 243, 235);
|
}
|
|
.jiantou {
|
position: relative;
|
}
|
|
.jiantou::before {
|
content: '';
|
background-image: url('../../assets/img/youyou.png');
|
background-size: 100% 100%;
|
width: 0.6rem;
|
height: 0.2rem;
|
font-size: 0.8rem;
|
position: absolute;
|
right: 0.5rem;
|
top: calc(50% - 0.15rem);
|
}
|
</style>
|