<template>
|
<div style="background-color: #F8FAF9;">
|
<van-nav-bar
|
:placeholder="true"
|
:safe-area-inset-top="true"
|
:title="$t('資訊')"
|
left-arrow
|
@click-left="$router.go(-1)">
|
</van-nav-bar>
|
<div class="body_title" >
|
<div @click="typeclick(item,index)" :class="typeindex==index?'body_title_txts':'body_title_txt'" v-for="(item,index) in typelist" :key="index">{{item.name}}</div>
|
</div>
|
<div class="body" v-for="(item,index) in pagelist" :key="index">
|
<div class="body_titles" v-if="typeindex==2">
|
<div class="body_titles_txt">JP</div>
|
<div class="body_titles_name">{{item.stockName}}</div>
|
</div>
|
<div class="body_price_tips">
|
<div class="body_price_tips_left">{{$t('参与金额')}}</div>
|
<div class="body_price_tips_rigth">{{item.orderAmount}}</div>
|
</div>
|
<div class="body_price_tips" v-if="typeindex==2">
|
<div class="body_price_tips_left">{{$t('实际购买金额')}}</div>
|
<div class="body_price_tips_rigth">{{item.purchaseAmount}}</div>
|
</div>
|
<div class="body_price_tips">
|
<div class="body_price_tips_left">{{$t('提交时间')}}</div>
|
<div class="body_price_tips_rigth">{{formatTimestamp(item.orderTime)}}</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
// import tabsList from "./favorites/tabs";
|
import * as api from "@/axios/api";
|
import headers from "@/page/login/components/header.vue";
|
export default {
|
components: { headers },
|
data() {
|
return {
|
pagelist:[],
|
typeindex:0,
|
status:0,
|
typelist:[
|
{
|
name:this.$t('审核中'),
|
key:0
|
},
|
{
|
name:this.$t('已驳回'),
|
key:2
|
},
|
{
|
name:this.$t('已完成'),
|
key:1
|
}
|
]
|
};
|
},
|
mounted() {
|
this.getpagelist();
|
},
|
methods: {
|
formatTimestamp(timestamp) {
|
const date = new Date(timestamp); // 将时间戳转换为 Date 对象
|
|
const day = date.getDate(); // 日期
|
const month = date.getMonth() + 1; // 月份(从 0 开始,所以下标要加 1)
|
const year = date.getFullYear(); // 年份
|
const hours = date.getHours(); // 小时
|
const minutes = date.getMinutes(); // 分钟
|
const seconds = date.getSeconds(); // 秒钟
|
|
// 格式化为 "日月年/时分秒" 格式
|
return `${month}.${day}.${year}/${hours}:${minutes}:${seconds}`;
|
},
|
typeclick(e,i){
|
this.typeindex = i
|
this.status = e.key
|
this.getpagelist()
|
},
|
async getpagelist(){
|
|
let result = await api.listIntraday({status:this.status});
|
if (result.status === 0) {
|
this.pagelist = result.data
|
} else {
|
|
}
|
},
|
onClickLeft() {
|
this.$router.push("/home");
|
},
|
},
|
};
|
</script>
|
|
<style scoped lang="less">
|
.body_titles_name{
|
margin-left: 15px;
|
color: #8c8c8c;
|
}
|
.body_titles_txt{
|
background-color: #EF3037;
|
color: #fff;
|
border-radius: 4px;
|
padding: 3px 6px;
|
font-size: 15px;
|
}
|
.body_titles{
|
display: flex;
|
align-items: center;
|
}
|
.body_price_tips_rigth{
|
color: #000;
|
}
|
.tips_img{
|
width: 14px;
|
margin-right: 10px;
|
}
|
.tips{
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
margin:0px 20px;
|
margin-top: 20px;
|
color: #8c8c8c;
|
line-height: 30px;
|
}
|
.btn_txt{
|
color: #fff;
|
height: 60px;
|
text-align: center;
|
line-height: 60px;
|
font-size: 20px;
|
}
|
.btn{
|
margin:0px 20px;
|
margin-top: 60px;
|
border-radius: 10px;
|
background-color: #185546;
|
|
}
|
.body_price_tips{
|
display: flex;
|
margin-top: 20px;
|
justify-content: space-between;
|
align-items: center;
|
color: #8c8c8c;
|
}
|
.body_price_input_ipt{
|
margin: 0 20px;
|
height: 60px;
|
}
|
.body_price_input{
|
margin: 0px 15px;
|
background-color: #fff;
|
border-radius: 10px;
|
border: 1px solid #dcdcdc;
|
}
|
.body_price_price{
|
display: flex;
|
justify-content: end;
|
}
|
.body_price_price{
|
display: flex;
|
margin: 40px 15px;
|
}
|
.body_price{
|
display: flex;
|
flex-direction: column;
|
}
|
.body_title_txts{
|
width: 30%;
|
color: #ffffff;
|
background-color: #185546;
|
border-radius: 20px;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
padding: 20px 0;
|
}
|
.body_title_txt{
|
width: 30%;
|
color: #858093;
|
border-radius: 20px;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
.body_title{
|
margin: 20px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
.body{
|
display: flex;
|
flex-direction: column;
|
padding: .533333rem .4rem;
|
border-radius: .426667rem;
|
background: var(--ex-default-bgcolor);
|
font-size: .346667rem;
|
box-shadow: 0 .026667rem 1.173333rem .106667rem rgba(0, 0, 0, .1);
|
margin: 0 20px;
|
margin-bottom: .213333rem;
|
|
}
|
/deep/.van-nav-bar__content{
|
background-color: #F8FAF9;
|
}
|
.search {
|
height: 1rem;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
margin: 15px 22px;
|
position: relative;
|
z-index: 99;
|
|
.search_content {
|
width: 100%;
|
height: 90%;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
|
.left_search {
|
width: 100%;
|
height: 100%;
|
background: #fff;
|
border-radius: 0.5rem;
|
display: flex;
|
.search_img {
|
width: 1rem;
|
height: 100%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
img {
|
width: 0.5rem;
|
height: 0.5rem;
|
}
|
}
|
|
.search_input {
|
width: 100%;
|
overflow: hidden;
|
height: 100%;
|
display: flex;
|
}
|
}
|
|
.right_search {
|
width: 140px;
|
line-height: 0.9rem;
|
text-align: center;
|
height: 100%;
|
border-radius: 0.5rem;
|
background-color: #0066ed;
|
color: #ffffff;
|
font-weight: bold;
|
margin-left: 20px;
|
}
|
}
|
/deep/ .van-nav-bar__content {
|
height: 65px;
|
}
|
/deep/ .van-nav-bar__title {
|
font-family: "DINPro";
|
width: 100%;
|
height: 1.17333rem;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
font-style: normal;
|
font-weight: 500;
|
font-size: 0.48rem;
|
color: #185546;
|
}
|
</style>
|