From cf0d36bbe155ecdfd8bca429666405e830d0dc7a Mon Sep 17 00:00:00 2001
From: XIGUASSR <623844246@qq.com>
Date: Sat, 12 Nov 2022 04:22:49 +0800
Subject: [PATCH] 最新
---
src/page/kline/index.vue | 57 ++++++++++++++++++++++++++++++++-------------------------
1 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/src/page/kline/index.vue b/src/page/kline/index.vue
index 1d19f71..933266b 100644
--- a/src/page/kline/index.vue
+++ b/src/page/kline/index.vue
@@ -25,32 +25,17 @@
<div class="right">
<span v-if="$store.state.userInfo.userAmt==undefined">¥0.00</span>
<span
- v-if="$store.state.userInfo&&tabsItemIndex == 1"
+ v-if="$store.state.userInfo&&kLineDetails.if_zhishu!='0'"
style="white-space: nowarp;"
>
{{ '¥' + $store.state.userInfo.userIndexAmt
}}
</span>
<span
- v-if="$store.state.userInfo.userAmt!=undefined&&tabsItemIndex == 0"
+ v-if="$store.state.userInfo.userAmt!=undefined&&kLineDetails.if_zhishu=='0'"
style="white-space: nowarp;"
>
{{ '¥ ' + $store.state.userInfo.userAmt
- }}
- </span>
- <span
- v-if="$store.state.userInfo.userAmt!=undefined&&tabsItemIndex == 2"
- style="white-space: nowarp;"
- >
- {{ '¥ ' + $store.state.userInfo.userAmt
- }}
- </span>
- <span
- v-if="$store.state.userInfo&&tabsItemIndex == 3"
- style="white-space: nowarp;"
- >
- {{
- '¥' + $store.state.userInfo.userFuturesAmt
}}
</span>
</div>
@@ -226,7 +211,7 @@
</div>
</div>
</div>
- <div class="jianjie" :class="acseFlag ? 'isjj' : ''">
+ <div class="jianjie" :class="acseFlag ? 'isjj' : ''" ref="isjj" id="isjj">
<div class="top_jj">
<span>{{ '简介' }}</span>
</div>
@@ -243,24 +228,24 @@
<img src="../../assets/img/shoucangle.png" alt v-else />
</div>
<div class="right_xx" @click="handleJj()">
- <img src="../../assets/img/xiaoxi.png" alt />
+ <a href="#isjj"><img src="../../assets/img/xiaoxi.png" alt /></a>
</div>
</div>
<div class="rights">
<div class="buy_btn">
- <div class="top_buy">
+ <div class="top_buy" @click="goBuy(0)">
<span>{{ '卖出' }}</span>
</div>
<div class="bottom_buy">
- <span>{{ '145.533' }}</span>
+ <span>{{ singDetails.nowPrice }}</span>
</div>
</div>
- <div class="sell_btn" @click="goBuy()">
+ <div class="sell_btn" @click="goBuy(1)">
<div class="top_sell">
<span>{{ '买入' }}</span>
</div>
<div class="bottom_sell">
- <span>{{ '145.533' }}</span>
+ <span>{{ singDetails.nowPrice }}</span>
</div>
</div>
</div>
@@ -283,6 +268,7 @@
jianjie: "",
optionBtn:false,
isOptionOpt:false,
+ dialogFlag:false,
};
},
components: {
@@ -294,6 +280,7 @@
this.getOpation();
// this.$Lazyload();
this.getSingDetails();
+ this.getUserInfo();
},
methods: {
async option() {
@@ -321,6 +308,18 @@
this.optionBtn = false;
}
}
+ },
+ 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;
},
async getOpation () {
let opts = {
@@ -363,9 +362,16 @@
handleSc() {
this.scFlag = !this.scFlag;
},
- goBuy() {
+ goBuy(index) {
this.$router.push({
- path: "/TradingBuy"
+ path: "/TradingBuy",
+ query: {
+ t:index,
+ code:this.kLineDetails.code,
+ m:this.singDetails.nowPrice,
+ type:this.kLineDetails.if_zhishu,
+ name:this.kLineDetails.name,
+ }
});
}
}
@@ -393,6 +399,7 @@
height: 1.2rem;
display: flex;
justify-content: flex-end;
+ align-items: center;
}
.detail_title {
width: 100%;
--
Gitblit v1.9.3