<template>
|
<div style="background-color: #F8FAF9;">
|
<van-nav-bar
|
:placeholder="true"
|
:safe-area-inset-top="true"
|
:title="$t('智能日内')"
|
left-arrow
|
@click-left="onClickLeft">
|
<template #right>
|
<img @click="$router.push('/smart_list')" style="width: 20px;" src="../../assets/img/record.svg"/>
|
</template>
|
</van-nav-bar>
|
<div class="body_title">
|
<div class="body_title_txt">{{$t('日股')}}</div>
|
</div>
|
<div class="body" v-for="(item,index) in pagelist" :key="index">
|
<div class="body_price">
|
<div class="body_price_price">{{$t('hj48')}} <span style="font-weight: bold;">{{price}} JPY </span></div>
|
<div class="body_price_input">
|
<input class="body_price_input_ipt" v-model="values[item.id]" :placeholder="$t('请输入参与金额')" type="number"/>
|
</div>
|
<div class="body_price_tips">
|
<div class="body_price_tips_left">{{$t('je')}}: {{item.minAmount}}JPY-{{item.maxAmount}}JPY </div>
|
<div class="body_price_tips_rigth">{{$t('hj141')}}:{{item.profit}}</div>
|
</div>
|
</div>
|
<div class="btn">
|
<div @click="gopay(item)" class="btn_txt">{{$t('hj237')}}</div>
|
</div>
|
<!-- <div class="tips">
|
<img class="tips_img" src="../../assets/img/tips.svg"/>
|
以保证账户信息的真实性、有效性、避免洗钱诈骗风险、我们不会参与任何其他组织或者个人共享账户信息。
|
</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 {
|
gpcode: "",
|
values:{},
|
pagelist:[],
|
price:'',
|
};
|
},
|
mounted() {
|
this.getpagelist();
|
this.getenableAmt()
|
},
|
methods: {
|
async gopay(item){
|
var data = {
|
smartId: item.id,
|
orderAmount:this.values[item.id]
|
}
|
const res = await api.addIntraday(data);
|
if(res.status==0){
|
this.$toast(this.$t("hj276"));
|
}
|
},
|
async getenableAmt() {
|
const res = await api.getMoney();
|
const data = res.data.filter((item) => item.accectType === "ALL");
|
this.price = data[0].availableBalance;
|
},
|
async getpagelist(){
|
let result = await api.getlistSmart();
|
if (result.status === 0) {
|
this.pagelist = result.data
|
} else {
|
|
}
|
},
|
onClickLeft() {
|
this.$router.push("/home");
|
},
|
sousuo() {
|
this.$refs.tabsList.sousuo = this.gpcode;
|
},
|
gpinput(e) {
|
this.gpcode = e.target.value;
|
},
|
},
|
};
|
</script>
|
|
<style scoped lang="less">
|
.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: 40px 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_txt{
|
padding: 15px 0;
|
width: max-content;
|
border-bottom: 2px solid #185546;
|
margin: 0 15px;
|
}
|
.body_title{
|
|
border-bottom: 1px solid #dcdcdc;
|
}
|
.body{
|
display: flex;
|
flex-direction: column;
|
|
|
}
|
/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>
|