From 6bf742b19037b59da70f2bc4119c9c0c68430870 Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Sat, 19 Jul 2025 18:22:38 +0800
Subject: [PATCH] 1
---
src/page/kline/index.vue | 91 +++++++++++++++++++++++----------------------
1 files changed, 46 insertions(+), 45 deletions(-)
diff --git a/src/page/kline/index.vue b/src/page/kline/index.vue
index b95d01a..407ea4d 100644
--- a/src/page/kline/index.vue
+++ b/src/page/kline/index.vue
@@ -9,7 +9,7 @@
</div>
<div class="right_title">
<div class="t_t" style="white-space: nowrap">
- <span>{{ singDetails.name }}</span>
+ <span>{{ singDetails.name }}({{ singDetails.gid }})</span>
</div>
<div class="b_t">
<span>{{ singDetails.spell }}</span>
@@ -44,7 +44,7 @@
(
Number($store.state.userInfo.userIndexAmt) / 0.9
).toFixed(2)
- : "₹" + $store.state.userInfo.userIndexAmt
+ : "" + $store.state.userInfo.userIndexAmt
}}
</span>
<span
@@ -55,7 +55,7 @@
style="white-space: nowarp"
>
{{
- "₹ " +
+ " " +
parseFloat(
$store.state.userInfo.enableAmt.toFixed(2)
).toLocaleString()
@@ -63,7 +63,7 @@
</span>
</div>
<div class="sanjiao">
-
+
</div>
</div>
<div class="bottom_balance">
@@ -93,9 +93,7 @@
}}{{ (singDetails.nowPrice - singDetails.preclose_px).toFixed(2) }}</span> -->
<span v-else>
{{
- (singDetails.nowPrice - singDetails.preclose_px).toFixed(
- 2
- ) || 0
+ (singDetails.nowPrice - singDetails.preclose_px).toFixed(2)
}}</span
>
</div>
@@ -106,9 +104,8 @@
<span v-if="singDetails.nowPrice === 0">-</span>
<!-- <span v-else>({{ singDetails.nowPrice - singDetails.preclose_px > 0 ? '+' : '' }}
{{ singDetails.hcrate ? singDetails.hcrate : '0' }}%)</span> -->
- <span v-else
- >({{ singDetails.hcrate > 0 ? "+" : "" }}
- {{ singDetails.hcrate ? singDetails.hcrate : "0" }}%)</span
+ <span v-else>
+ ({{ singDetails.hcrate ? singDetails.hcrate : "0" }}%)</span
>
</div>
</div>
@@ -170,16 +167,16 @@
</div>
</div>
<div class="k_line_detail">
- <Kline :type="singDetails.type" />
+ <Kline :key="key" :type="singDetails.type" />
</div>
<div
class="priect_top_bottom"
style="display: none"
v-if="
kLineDetails.if_us != 1 &&
- kLineDetails.type != 'hk' &&
- kLineDetails.type != 'hk' &&
- kLineDetails.if_zhishu == 0
+ kLineDetails.type != 'hk' &&
+ kLineDetails.type != 'hk' &&
+ kLineDetails.if_zhishu == 0
"
>
<div class="t_title">
@@ -427,7 +424,7 @@
<img src="../../assets/img/shoucangle.png" alt v-else />
</div>
<div class="right_xx" @click="handleJj()">
- <a href="#"><img src="../../assets/img/xiaoxi.png" alt /></a>
+ <a href="#"><img src="../../assets/img/xiaoxi.png" alt/></a>
</div>
</div>
<div class="rights">
@@ -435,17 +432,17 @@
<div class="top_buy" @click="goBuy(0)">
<span>{{ $t("hj84") }}</span>
</div>
- <div class="bottom_buy">
+ <!-- <div class="bottom_buy">
<span>{{ singDetails.nowPrice }}</span>
- </div>
+ </div> -->
</div>
<div class="sell_btn" @click="goBuy(1)">
<div class="top_sell">
<span>{{ $t("hj85") }}</span>
</div>
- <div class="bottom_sell">
+ <!-- <div class="bottom_sell">
<span>{{ singDetails.nowPrice }}</span>
- </div>
+ </div> -->
</div>
</div>
</div>
@@ -474,10 +471,11 @@
newsdetailList: [],
bayType: "",
timer: null,
+ key: 0
};
},
components: {
- Kline,
+ Kline
},
created() {
@@ -488,7 +486,7 @@
} else {
this.timer = setInterval(() => {
this.getSingDetails();
- }, 500);
+ }, 2000);
}
this.getOpation();
// this.$Lazyload();
@@ -504,7 +502,7 @@
// },
methods: {
async getHknews() {
- await api.queryIndexNews().then((res) => {
+ await api.queryIndexNews().then(res => {
if (res.status === 0) {
this.newsdetailList = res.data.data;
}
@@ -526,13 +524,13 @@
this.optionBtn = false;
this.$message({
message: this.$t("hj97"),
- type: "success",
+ type: "success"
});
} else {
this.optionBtn = false;
this.$message({
message: data.msg,
- type: "warning",
+ type: "warning"
});
}
} else {
@@ -542,12 +540,12 @@
this.optionBtn = false;
this.$message({
message: this.$t("hj96"),
- type: "success",
+ type: "success"
});
} else {
this.$message({
message: data.msg,
- type: "warning",
+ type: "warning"
});
this.optionBtn = false;
}
@@ -571,7 +569,7 @@
},
async getOpation() {
let opts = {
- code: this.$route.query.code,
+ code: this.$route.query.code
};
let data = await api.isOption(opts);
if (data.status === 0) {
@@ -584,9 +582,9 @@
async getSingDetails() {
let opts = {
code: this.kLineDetails.code,
- stockType: this.kLineDetails.type,
+ stockType: this.kLineDetails.type
};
- await api.getSingleStock(opts).then((res) => {
+ await api.getSingleStock(opts).then(res => {
if (res.status === 0) {
this.singDetails = res.data.stock;
this.bayType = res.data.stock.type;
@@ -598,7 +596,7 @@
}
const obj = {
pid: res.data.stock.code,
- type: res.data.stock.type,
+ type: res.data.stock.type
};
window.localStorage.setItem("kLine", JSON.stringify(obj));
// console.log(this.singDetails)
@@ -616,9 +614,9 @@
async getSingDetailUs() {
let opts = {
code: this.kLineDetails.code,
- stockType: this.kLineDetails.type,
+ stockType: this.kLineDetails.type
};
- await api.getUsDetail(opts).then((res) => {
+ await api.getUsDetail(opts).then(res => {
// console.log(res,1111123);
// var that = this
// if(!res){
@@ -662,8 +660,8 @@
this.$router.push({
path: "/newPage",
query: {
- listid: item.id,
- },
+ listid: item.id
+ }
});
},
goBuy(index) {
@@ -680,13 +678,14 @@
spell: this.singDetails.spell,
if_us: this.kLineDetails.if_us,
bayType: this.bayType,
- },
+ gid: this.singDetails.gid
+ }
});
if (navigator.vibrate) {
// 支持
navigator.vibrate([55]);
}
- },
+ }
},
filters: {
getName(spell) {
@@ -748,8 +747,8 @@
.replace(/年|月/g, "-")
.replace(/日/g, " ");
return beijingDatetime; // 2017-03-31 16:02:06
- },
- },
+ }
+ }
};
</script>
@@ -932,10 +931,10 @@
.top_now {
width: 100%;
// height: 65%;
- font-size: 0.741rem;
+ font-size: 25px;
display: flex;
align-items: center;
-
+ font-weight: bold;
span {
font-weight: 500;
}
@@ -955,7 +954,7 @@
}
.right_ets {
- max-width: 60%;
+ max-width: 70%;
height: 100%;
> div {
@@ -1168,10 +1167,11 @@
.top_buy {
width: 100%;
- height: 45%;
+ height: 100%;
display: flex;
justify-content: center;
- align-items: flex-end;
+ align-items: center;
+ font-size: 0.4rem;
}
.bottom_buy {
@@ -1193,10 +1193,11 @@
.top_sell {
width: 100%;
- height: 45%;
+ height: 100%;
display: flex;
justify-content: center;
- align-items: flex-end;
+ align-items: center;
+ font-size: 0.4rem;
}
.bottom_sell {
--
Gitblit v1.9.3