From ef2e2e3f9c6d37cc47b14ce0444fb75e6aa19dd1 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Wed, 27 Aug 2025 18:12:21 +0800
Subject: [PATCH] 零时提交
---
src/page/list/tradingList/dazy.vue | 44 +++++++++++++++++++++++++++-----------------
1 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/src/page/list/tradingList/dazy.vue b/src/page/list/tradingList/dazy.vue
index eff8166..3d9eef8 100644
--- a/src/page/list/tradingList/dazy.vue
+++ b/src/page/list/tradingList/dazy.vue
@@ -7,22 +7,23 @@
<span @click="show = false"></span>
</div>
<h5>{{ $t("hj130") }}</h5>
- <h6>{{ currentItem.nowPrice | _toString }}</h6>
+ <h6>¥{{ currentItem.nowPrice | _toString }}</h6>
<div class="erty tghj">
<input
:placeholder="$t('hj262')"
- type="number"
+ type="text"
+ :minlength="4"
class="inpy"
v-model="num"
- @input="num = num.replace(/^(0+)|[^\d]+/g, '')"
+ @input="priceinput"
/>
- <a>{{ $t("hj117") }}</a>
+ <a>{{ $t("hj274") }}</a>
</div>
<p class="plm">
<span>{{ $t("hj263") }}</span>
- <a>{{ currentItem.nowPrice | _toString }}</a>
+ <a>¥{{ currentItem.nowPrice*num | _toString }}</a>
</p>
- <div class="erty">
+ <div class="erty" v-if="currentItem.password">
<input
:placeholder="$t('hj264')"
type="password"
@@ -34,7 +35,7 @@
<span>
{{ $t("hj54") }}
</span>
- <a>{{ enableAmt | _toString }}</a>
+ <a>¥{{ enableAmt | _toString }}</a>
</p>
<div class="maik" @click="getxiadan">{{ $t("hj85") }}</div>
</div>
@@ -47,19 +48,28 @@
export default {
methods: {
+ priceinput(e){
+ this.num = this.num.replace(/^(0+)|[^\d]+/g, '')
+ var maxnum = this.enableAmt/this.currentItem.nowPrice
+ if(this.num>=maxnum){
+ this.num = Math.floor(maxnum)
+ }
+ },
async getxiadan() {
if (!this.num) {
this.show = false;
this.$toast(this.$t("hj262"));
return;
}
- if (!this.password) {
- this.show = false;
- this.$toast(this.$t("hj264"));
- return;
- }
+ this.show = false;
+ // if (!this.password) {
+ // this.show = false;
+ // this.$toast(this.$t("hj264"));
+ // return;
+ // }
+
var opt = {
- stockCode: this.currentItem.code,
+ dzId: this.currentItem.id,
password: this.password,
num: this.num,
buyingType: "dz",
@@ -148,7 +158,7 @@
.erty {
width: 9.21rem;
height: 1.07rem;
- border: 0.0266rem solid #5c288c;
+ border: 0.0266rem solid #185546;
border-radius: 0.13rem;
margin: 0 auto;
display: flex;
@@ -177,7 +187,7 @@
}
.tghj {
- border: 0.0266rem solid #5c288c;
+ border: 0.0266rem solid #185546;
margin-top: 0.45rem;
}
@@ -200,7 +210,7 @@
.maik {
width: 9.21rem;
height: 1.07rem;
- background: #5c288c;
+ background: #185546;
border-radius: 0.26rem;
margin: 0 auto;
margin-top: 0.56rem;
@@ -210,4 +220,4 @@
font-size: 0.37rem;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3