From 61944978f51ca99a001162ac1ff3d32dcd5315ed Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Wed, 16 Jul 2025 14:54:58 +0800
Subject: [PATCH] 1
---
src/components/Dialog/index.vue | 30
src/axios/api.js | 60
src/page/trading/buy.vue | 18
src/locales/ens.json | 20
src/page/authentication/index.vue | 3
src/page/markets/aiTrading.vue | 193 +
src/locales/fra.json | 20
src/components/foot.vue | 128
src/page/home/components/echart.vue | 15
src/page/list/tradingList/data.list.vue | 1
src/page/user/recharge-sure.vue | 8
src/page/markets/blockTradingOrder.vue | 96
src/page/markets/ipoOrder.vue | 101
src/page/trading/stockRecord.vue | 205 +
src/page/home/Record.vue | 185
src/page/home/homeIndex.vue | 12
src/router/index.js | 51
src/components/stock-list.vue | 78
src/page/user/Warehouse/Stockdetail.vue | 186 +
src/page/trading/TradeNew.vue | 92
src/page/markets/fund.vue | 301 ++
src/page/newUser/setting.vue | 55
src/locales/kor.json | 20
src/page/watchlists/watchlists.vue | 212
src/page/markets/fundOrder.vue | 223 +
src/locales/jp.json | 20
src/page/kline/index.vue | 20
src/page/user/recharge.vue | 9
src/locales/cht.json | 20
src/locales/en.json | 20
src/page/login/login.vue | 32
src/page/login/components/header.vue | 17
src/page/kline/components/kLine.vue | 3024 ++++++++++++-----------
src/mixins/myMixin.js | 26
static/css/public2.css | 4
src/page/login/register.vue | 25
src/locales/zh.json | 20
src/page/markets/blockTrading.vue | 322 ++
src/page/markets/ipo.vue | 241 +
src/locales/de.json | 20
src/utils/filter.js | 35
src/page/bankCard/index.vue | 3
src/components/index-component.vue | 59
src/page/markets/aiTradingOrder.vue | 68
src/components/tabHead.vue | 2
static/css/public1.css | 4
src/page/markets/markets.vue | 82
src/axios/api.url.js | 4
src/locales/hi.json | 20
src/App.vue | 4
src/page/kline/kIndex.vue | 1090 ++++++++
src/locales/th.json | 20
src/page/user/account.vue | 93
53 files changed, 5,566 insertions(+), 2,051 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 6fdac31..7afffd0 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -182,6 +182,10 @@
/deep/ .van-list__error-text {
line-height: 1.925926rem !important;
}
+/deep/ .van-nav-bar .van-icon {
+ color: @green;
+ font-size: 0.4rem;
+}
#app {
width: 100vw;
diff --git a/src/axios/api.js b/src/axios/api.js
index f6adfce..85f7a4c 100644
--- a/src/axios/api.js
+++ b/src/axios/api.js
@@ -603,3 +603,63 @@
export function getHomePageData() {
return post("/api/stock/getHomePageData.do");
}
+
+// 获取市场tab数据
+export function getIndicesList(options) {
+ return get("/api/stock/getIndicesList.do", options);
+}
+
+// 获取市场指数图数据
+export function getIndicesAndKData(options) {
+ return get("/api/stock/getIndicesAndKData.do", options);
+}
+
+// ai交易列表
+export function getStockAiList(options) {
+ return get("/api/lnk/getStockAiList.do", options);
+}
+
+// ai交易
+export function buyStockAi(options) {
+ return get("/api/lnk/buyStockAi.do", options);
+}
+
+// 汇率
+export function getRateInfo(options) {
+ return get("/api/lnk/getRateInfo.do", options);
+}
+
+// ai交易订单列表
+export function getStockAiOrderList(options) {
+ return get("/api/lnk/getStockAiOrderList.do", options);
+}
+
+// 大宗交易列表(新)
+export function getDzListTwo(options) {
+ return post("/api/stock/getDzList.do", options);
+}
+
+// 大宗交易下单(新)
+export function getBuyStockDz(options) {
+ return get("/user/buyStockDz.do", options);
+}
+
+// 大宗交易订单列表
+export function getDzOrderList(options) {
+ return get("/api/stock/getDzOrderList.do", options);
+}
+
+// IPO列表
+export function getStockSubscribeList(options) {
+ return get("/user/getStockSubscribeList.do", options);
+}
+
+// IPO订单列表
+export function getStockSubscribeOrderList(options) {
+ return get("/user/getStockSubscribeOrderList.do", options);
+}
+
+// 账户持仓数据
+export function getMyPositionProfitAndLose(options) {
+ return get("/user/position/getMyPositionProfitAndLose.do", options);
+}
diff --git a/src/axios/api.url.js b/src/axios/api.url.js
index b10c450..d9b038f 100644
--- a/src/axios/api.url.js
+++ b/src/axios/api.url.js
@@ -9,9 +9,9 @@
// baseURL: '/',
// baseURL: 'https://api.coinbtcs.com/',
// 0311
- baseURL: "https://stockapi.yanshiz.com/",
+ // baseURL: "https://stockapi.yanshiz.com/",
// 本地
- // baseURL: "http://192.168.10.20:8091/",
+ baseURL: "http://192.168.10.20:8091/",
util: {
image: "/util/image.html" // 图片上传
}
diff --git a/src/components/Dialog/index.vue b/src/components/Dialog/index.vue
index 8c737cc..54e0bb8 100644
--- a/src/components/Dialog/index.vue
+++ b/src/components/Dialog/index.vue
@@ -26,42 +26,42 @@
props: {
title: {
type: String,
- default: "标题",
+ default: "标题"
},
"confirm-button-text": {
type: String,
- default: "hj161",
+ default: "hj161"
},
"cancel-button-text": {
type: String,
- default: "qx",
+ default: "qx"
},
"show-cancel-button": {
type: Boolean,
- default: true,
+ default: true
},
"show-confirm-button": {
type: Boolean,
- default: true,
+ default: true
},
confirm: {
type: Function,
- default: () => {},
- },
+ default: () => {}
+ }
},
components: {
- [Dialog.Component.name]: Dialog.Component,
+ [Dialog.Component.name]: Dialog.Component
},
data() {
return {
- show: false,
+ show: false
};
},
- methods: {},
+ methods: {}
};
</script>
-<style scoped lang="less">
+<style scoped lang="less">
.zyd-dialog {
padding: 24px;
font-family: "PingFang SC";
@@ -77,7 +77,7 @@
display: flex;
justify-content: center;
text-align: center;
- line-height: 65px;
+ line-height: 55px;
margin-top: 40px;
.cancel-dialog {
flex: 1;
@@ -91,11 +91,11 @@
flex: 1;
height: 100%;
padding: 0 15px;
- background-color: #1989fa;
- border: 1px solid #1989fa;
+ background-color: #c4d600;
+ border: 1px solid #c4d600;
color: #fff;
margin-left: 20px;
}
}
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/components/foot.vue b/src/components/foot.vue
index f1e10b6..24e054c 100644
--- a/src/components/foot.vue
+++ b/src/components/foot.vue
@@ -10,52 +10,97 @@
{{ item.name }}
</div>
</div> -->
- <div :class="touch == 1 ? 'footDemos' : 'footDemo'" @click="goRouter('/home_index', 1)">
+ <div
+ :class="touch == 1 ? 'footDemos' : 'footDemo'"
+ @click="goRouter('/home_index', 1)"
+ >
<div class="footImgDeft">
- <img v-show="$store.state.select == '/home_index'" src="../assets/foot/home-act.png" />
- <img v-show="$store.state.select != '/home_index'" src="../assets/foot/home.png" />
+ <img
+ v-show="$store.state.select == '/home_index'"
+ src="../assets/foot/home-act.png"
+ />
+ <img
+ v-show="$store.state.select != '/home_index'"
+ src="../assets/foot/home.png"
+ />
</div>
<div :class="$store.state.select == '/home_index' ? 'blueFont' : ''">
{{ $t("hj224") }}
</div>
</div>
- <div :class="touch == 3 ? 'footDemos' : 'footDemo'" @click="goRouter('/markets', 3)">
+ <div
+ :class="touch == 3 ? 'footDemos' : 'footDemo'"
+ @click="goRouter('/markets', 3)"
+ >
<div class="footImgDeft">
- <img v-show="$store.state.select == '/markets'" src="../assets/foot/language-act.png" />
- <img v-show="$store.state.select != '/markets'" src="../assets/foot/language.png" />
+ <img
+ v-show="$store.state.select == '/markets'"
+ src="../assets/foot/language-act.png"
+ />
+ <img
+ v-show="$store.state.select != '/markets'"
+ src="../assets/foot/language.png"
+ />
</div>
<div :class="$store.state.select == '/markets' ? 'blueFont' : ''">
{{ $t("hj62") }}
</div>
</div>
- <div :class="touch == 6 ? 'footDemos' : 'footDemo'" @click="goRouter('/watchlists', 6)">
+ <div
+ :class="touch == 6 ? 'footDemos' : 'footDemo'"
+ @click="goRouter('/watchlists', 6)"
+ >
<div class="footImgDeft">
- <img v-show="$store.state.select == '/watchlists'" src="../assets/foot/selected-act.png" />
- <img v-show="$store.state.select != '/watchlists'" src="../assets/foot/selected.png" />
+ <img
+ v-show="$store.state.select == '/watchlists'"
+ src="../assets/foot/selected-act.png"
+ />
+ <img
+ v-show="$store.state.select != '/watchlists'"
+ src="../assets/foot/selected.png"
+ />
</div>
<div :class="$store.state.select == '/watchlists' ? 'blueFont' : ''">
{{ $t("hj61") }}
</div>
</div>
- <div :class="touch == 7 ? 'footDemos' : 'footDemo'" @click="goRouter('/tradeNew', 7)">
+ <div
+ :class="touch == 7 ? 'footDemos' : 'footDemo'"
+ @click="goRouter('/tradeNew', 7)"
+ >
<div class="footImgDeft">
- <img v-show="$store.state.select == '/tradeNew'" src="../assets/foot/transaction-act.png" />
- <img v-show="$store.state.select != '/tradeNew'" src="../assets/foot/transaction.png" />
+ <img
+ v-show="$store.state.select == '/tradeNew'"
+ src="../assets/foot/transaction-act.png"
+ />
+ <img
+ v-show="$store.state.select != '/tradeNew'"
+ src="../assets/foot/transaction.png"
+ />
</div>
<div :class="$store.state.select == '/tradeNew' ? 'blueFont' : ''">
{{ $t("hj225") }}
</div>
</div>
- <div :class="touch == 8 ? 'footDemos' : 'footDemo'" @click="goRouter('/account', 8)">
+ <div
+ :class="touch == 8 ? 'footDemos' : 'footDemo'"
+ @click="goRouter('/account', 8)"
+ >
<div class="footImgDeft">
- <img v-show="$store.state.select == '/account'" src="../assets/foot/account-act.png" />
- <img v-show="$store.state.select != '/account'" src="../assets/foot/account.png" />
+ <img
+ v-show="$store.state.select == '/account'"
+ src="../assets/foot/account-act.png"
+ />
+ <img
+ v-show="$store.state.select != '/account'"
+ src="../assets/foot/account.png"
+ />
</div>
<div :class="$store.state.select == '/account' ? 'blueFont' : ''">
{{ $t("Account") }}
</div>
</div>
- <div :class="touch == 2 ? 'footDemos' : 'footDemo'" @click="goRouter('/trading-list', 2)">
+ <!-- <div :class="touch == 2 ? 'footDemos' : 'footDemo'" @click="goRouter('/trading-list', 2)">
<div class="footImgDeft">
<img v-show="$store.state.select == '/trading-list'"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANGSURBVHgB3Zm/b9NAFMe/F2UoWxnL5LIVBgpsMJCqfwDhx8bQ8AdAki1UiMQSAiQGkh2FVGJECIayAc1Ax5JObCRMjGSKKpByvGc3IrEdx/bdOaEfyVJ0u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blueFont' : ''">
{{ $t("hj227") }}
</div>
- </div>
+ </div> -->
</div>
</template>
@@ -100,38 +145,56 @@
// actImg: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOiSURBVHgB7VnNUhpBEO4exErlhE8gPoFgxSRVOQRvOeoxp2wstYhaFXwC8QmCVf5QQMHmCcRbckJvKU0Qb7mJtxz1GDDT6cFCd5flZ9khaIrvArvTMzs90/31dA/AIwfCAGAYiRCM/TZEAKfVs/xD53BDRdNMV0EztCtgrKx9EgAJ10YJqXxudwM0QpsCvOphHK8f8ICRTnIEVKWanNO1GwI0wFiKxzBYP+s2eQUEZEVFyVhaj4EG+FbAWFndFCJQQoSQrUHChnwanMhndlkv3LI2KSWEIFZidRN8om8TUo4qgrUCIM7bW6gqCRbM7F7FJr+8GhGIB/w37JAvyprc6Nek+lLAMFYjOI7K3sP2FjqWQhpm2n0yRpz9hOoFJIjZevnwC88KGEsfEohi02kyRLRdyO4lehljcWU9yT3s5kNwJUlumbn9FHhAwItwgyIRkzz5J9YPI+LbfHa35w+f/Tg5is7MXvL6xaA5Fv/yOG+i0eehs/Lp117H6mkH2lMk27vgrU/3Z7/KpISsl8Bhil5MqisLtaNIkvBZPh2P9jt5BTOdqspaMEqE29b3Xqi24w40KBIw2dLAFMkR1ZOtdoOrX6hPSUqaub2tdv3a+oD75BsUOVfI7RVBM5RfTM/MHio/4Mc7guDn2HR0Firl02O3fq4KMGcb7KyOFW5Q5IKZ2f8JAwJP8tf07KtDXveIlaJvlXh2XSl//+bs42pC71fWLqwDeKFIXWgxKUWz9eCUaaaurHItTqxW3xagkMx/PXmFfGYnaXNujjsc+eedci0KIDE3WyBRtnWgQYPqY0nbCwGvnTKtNBqAyeZfDvkVPzTpFw1zIbi8eyFhyinTMQ5wQLmGIYMEXHRq15IPDBOPXoEx0ITGkQMD6pQa6yRHTPfECY6Z2dESDPWklCrw3WZlsW6y6kwlgA441rwDDdCiAEdKz6khM5yWs5RvE1Kpoi3ss4kw3527CpOYpOYucWAy4vGwX5r27wMBGQJ5f6RSx458dt90E11kU2skMc2P34yF+acKPjCi0WFjpMCwMVJg2BgpMGyMFBg2/nMF8D4/HhrIWcK3o1UBSZaTJIZ13KL0C1UdtJV4XPLjlsKWEV+PCUkl6zviohJLXkEb2ItgHWQJQtZ7BS+yCgGiaNZx8+NemVteTyHSR3hAaFcddK2NVsonXyIzLyZ4BV7CA0Cn0mbn8nrjTquW4PSv6/XpIMDZWyWAophL7xzBCCOM4Iq/amJyomlCik4AAAAASUVORK5CYII='
// },
{
- path: '/home_index', key: 1, name: this.$t("hj224"), img: require('../assets/foot/home-act.png'),
- actImg: require('../assets/foot/home.png')
+ path: "/home_index",
+ key: 1,
+ name: this.$t("hj224"),
+ img: require("../assets/foot/home-act.png"),
+ actImg: require("../assets/foot/home.png")
},
{
- path: '/trading-list', key: 2, name: this.$t("hj225"), img: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANGSURBVHgB3Zm/b9NAFMe/F2UoWxnL5LIVBgpsMJCqfwDhx8bQ8AdAki1UiMQSAiQGkh2FVGJECIayAc1Ax5JObCRMjGSKKpByvGc3IrEdx/bdOaEfyVJ0uUTva3/fu/M74D9HwBQluYwl5DFEHxl08Ez0YAD9AtzAixR0bWJcok5XQ7cQvQIeyBL9Y5U+LQd+L9GjyyYRLWhCj4CKzDmBC+QizXeF3CUhe1BETUBFWmSVF/Qpj2S0KEdsFVslE/DP5yVMs0schpQvR5QfddFHTOILqMjCsV0s6CRhfkQXENfnSXGFbES11WwBbJdTVAIFtpAukfJjugDdPk9Gn0TUSYQ9bUKwANcur7T7PCkhZdcvwC2NXSwif3ARz0VnfCjjm5ShR7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hT0If0HEaBU/LltZgiOUkJoYOlITH02K211mBGE85QYvvz6kuUath7X7OMcXQns369hV2Is/526AlTHLN26Y2z5/OzSSgHNeBJrpxs//Yy/nbHYRIgfXb1719IAlje2xk5HNC6SULCx1We0PVSCFkGKJ/nbFluapp2YmymhsWXGyBunJ/G9nQFZaxFzO5XDfuG6lmBrEXsp53hdVUJPyFvvxZu7Y+PNjGcmcaCkuRs22oxd+Fa8gKRJ1ap0LWHY3K2tOVvI8f+GQYkgIhrPXAeJrChLUXlcqqxI59QHlWcYcQPlMimTiwxlH3CM4AEHvtYJ8BAf+W0lndY4IbZQMvHzQR1wmEGtd60mO44/OmG3kayoI0GdBjNyjnvTuRv8HfIViY+mpr1QV1vr0tgSl7nGz+ozFT7ks2MU0y4vkHblKE/nblB6Uu8WHwZILqTzuakEKILSk/oVPIFv7ej+Fk8icDEHWznK4nxP9cvJ6U8WQSGC+2cPjI8Qz7YJwev5nprLXgL0icA/W5VtrhXqUi8AAAAASUVORK5CYII='
+ path: "/trading-list",
+ key: 2,
+ name: this.$t("hj225"),
+ img:
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANGSURBVHgB3Zm/b9NAFMe/F2UoWxnL5LIVBgpsMJCqfwDhx8bQ8AdAki1UiMQSAiQGkh2FVGJECIayAc1Ax5JObCRMjGSKKpByvGc3IrEdx/bdOaEfyVJ0uUTva3/fu/M74D9HwBQluYwl5DFEHxl08Ez0YAD9AtzAixR0bWJcok5XQ7cQvQIeyBL9Y5U+LQd+L9GjyyYRLWhCj4CKzDmBC+QizXeF3CUhe1BETUBFWmSVF/Qpj2S0KEdsFVslE/DP5yVMs0schpQvR5QfddFHTOILqMjCsV0s6CRhfkQXENfnSXGFbES11WwBbJdTVAIFtpAukfJjugDdPk9Gn0TUSYQ9bUKwANcur7T7PCkhZdcvwC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GH7kGY82tujfM9czAdXArmd06axK5KBOhT0If0HEaBU/LltZgiOUkJoYOlITH02K211mBGE85QYvvz6kuUath7X7OMcXQns369hV2Is/526AlTHLN26Y2z5/OzSSgHNeBJrpxs//Yy/nbHYRIgfXb1719IAlje2xk5HNC6SULCx1We0PVSCFkGKJ/nbFluapp2YmymhsWXGyBunJ/G9nQFZaxFzO5XDfuG6lmBrEXsp53hdVUJPyFvvxZu7Y+PNjGcmcaCkuRs22oxd+Fa8gKRJ1ap0LWHY3K2tOVvI8f+GQYkgIhrPXAeJrChLUXlcqqxI59QHlWcYcQPlMimTiwxlH3CM4AEHvtYJ8BAf+W0lndY4IbZQMvHzQR1wmEGtd60mO44/OmG3kayoI0GdBjNyjnvTuRv8HfIViY+mpr1QV1vr0tgSl7nGz+ozFT7ks2MU0y4vkHblKE/nblB6Uu8WHwZILqTzuakEKILSk/oVPIFv7ej+Fk8icDEHWznK4nxP9cvJ6U8WQSGC+2cPjI8Qz7YJwev5nprLXgL0icA/W5VtrhXqUi8AAAAASUVORK5CYII="
},
{
- path: '/warehouse', key: 4, name: this.$t("hj226"), img: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAwCAYAAABuZUjcAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAATPSURBVHgB7Vm/bxNJFP5mL3fCV0F5FRv+geTaa8658q4g0dFR4Ig/gECBkggRR0LEAqSEHhFT0EIoKCH2PwCmofVSUcYFBCQUD+/NbGLvzo+dtWPT8KE18Xp+fPvmzffevBX4EViVMX1egUCVrnn6+ywkOviCBeyIXsgQM5gmViUT3VCE84gQowSmQ5wtLLBrJcwQ6KGP5VBr6y6TBls5wnOwO7jwDX/ivuigBCJMEmzpCPvwkWbM0GqsyhpKYLLEBeqB7eaJyS7WZBc35WJIl9GJszW1OvgI7dBnMvSdffhDetnax2T95zTuBgoQ7uPsq8Ai9bioJhgGS5mg6xseWn21Tg/Yo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CLsk6cAhXJmS8FyzGu7AdFKh1N9wNZh+iuDwMSwre42a0JzdaLSl1LwZaXIYS/3n8DQBoawBKW5PeAAAAAElFTkSuQmCC"
+ }
+ ]
};
},
- mounted() { },
+ mounted() {},
methods: {
goRouter(url, index) {
+ this.$router.push(url);
this.touch = index;
setTimeout(() => {
this.touch = 0;
}, 500);
- this.$router.push(url);
if (navigator.vibrate) {
// 支持
navigator.vibrate([55]);
}
- },
- },
+ }
+ }
};
</script>
@@ -244,4 +307,5 @@
// .footCss {
// background: @purple;
-// }</style>
+// }
+</style>
diff --git a/src/components/index-component.vue b/src/components/index-component.vue
index 759455c..02818e9 100644
--- a/src/components/index-component.vue
+++ b/src/components/index-component.vue
@@ -1,10 +1,16 @@
<template>
- <div class="index_component" :class="dataObj.chg > 0 ? 'bg-green' : 'bg-red'">
- <div class="item_title line-one">{{ dataObj.name }}</div>
+ <div
+ class="index_component"
+ :class="dataObj.chg > 0 ? 'bg-green' : 'bg-red'"
+ @click="toLine"
+ >
+ <div class="item_title">
+ <span class="line-one">{{ dataObj.name }}</span>
+ </div>
<div class="item_price">{{ dataObj.last }}</div>
<div class="item_index flex-between">
<span>{{ dataObj.chg }}</span>
- <span>{{ dataObj.chgPct }}</span>
+ <span>{{ dataObj.chgPct }}%</span>
</div>
<div style="width:100%;flex:1">
<Echart :ids="ids" :colorType="dataObj.chg / 1" :data="klist"></Echart>
@@ -23,26 +29,40 @@
},
dataObj: {
type: Object,
- default: () => {
- return {
- name: "",
- last: "",
- chg: "",
- chgPct: "",
- kdata: []
- };
- }
+ default: () => {}
}
},
computed: {
klist() {
- return this.dataObj.kdata.map(item => {
+ console.log(this.dataObj, "aaaaaaaaaaaaa");
+ if (!this.dataObj.kData || this.dataObj.kData.length == 0) return [];
+ return this.dataObj.kData.map(item => {
return item.c;
});
}
},
components: {
Echart
+ },
+ methods: {
+ // 跳转到指数图
+ toLine() {
+ // 点击进入详情
+ const obj = {
+ pid: this.dataObj.id || "",
+ type: this.dataObj.stockType || ""
+ };
+ window.localStorage.setItem("kLine", JSON.stringify(obj));
+
+ this.$router.push({
+ path: "/kLineIndex",
+ query: {
+ // if_us: 1,
+ code: this.dataObj.id,
+ type: this.dataObj.stockType
+ }
+ });
+ }
}
};
</script>
@@ -56,7 +76,7 @@
}
.bg-green {
- background-color: rgba(green, 0.1);
+ background-color: #f3fbf9;
color: green;
}
@@ -70,11 +90,18 @@
.item_title {
padding: 0 0.5em;
- font-size: 0.4em;
+ font-size: 0.35em;
+ color: #333;
+ font-weight: 500;
+
+ span {
+ width: 100%;
+ display: inline-block;
+ }
}
.item_price {
- padding: 0.5em 0.5em;
+ padding: 0.4em 0.5em;
font-size: 0.4em;
}
diff --git a/src/components/stock-list.vue b/src/components/stock-list.vue
index 30656ee..36a09df 100644
--- a/src/components/stock-list.vue
+++ b/src/components/stock-list.vue
@@ -6,7 +6,12 @@
<van-col span="8" class="flex-end head_item">{{ $t("Change") }}</van-col>
</van-row>
- <van-row class="markets_item" v-for="item in stockList" :key="item.id">
+ <van-row
+ class="markets_item"
+ v-for="item in stockList"
+ :key="item.id"
+ @click="toDetails(item)"
+ >
<van-col span="12" class="item_n">
<div class="flex-start">
<span class="i_icon">{{ item.stock_type }}</span>
@@ -22,10 +27,22 @@
<div class="flex-end">{{ item.hcrateP }}</div>
</van-col>
- <div class="edit flex-end" v-show="editorShow">
+ <div
+ class="edit flex-end"
+ v-show="editorShow"
+ @click.stop="deleteStock(item)"
+ >
<span>{{ $t("移除") }}</span>
</div>
</van-row>
+
+ <!-- 无数据时显示 -->
+ <div
+ class="no_data flex-center"
+ v-show="!stockList || stockList.length == 0"
+ >
+ <img src="@/assets/img/zhaobudao2.png" alt="" />
+ </div>
<n-pagination
:pageNo.sync="pageNum"
@@ -38,6 +55,7 @@
<script>
import nPagination from "@/components/nPagination.vue";
import * as api from "@/axios/api";
+import { Toast } from "vant";
export default {
name: "stock_list",
components: {
@@ -45,10 +63,9 @@
},
data() {
return {
- editorShow: false, // 编辑状态
pageNum: 1,
pageSize: 10,
- total: 0,
+ total: 1,
stockList: []
};
},
@@ -58,17 +75,29 @@
default: () => {
return {};
}
+ },
+ listApi: {
+ default: () => {
+ return api.getStockByType;
+ }
+ },
+ // 编辑状态
+ editorShow: {
+ type: Boolean,
+ default: false
}
},
watch: {
propOption: {
handler(val) {
+ this.pageNum = 1;
this.getStockList();
}
},
pageNum: {
handler(val) {
- console.log(val);
+ // this.stockList = [];
+ this.getStockList();
}
}
},
@@ -76,11 +105,8 @@
this.getStockList();
},
methods: {
- onEdit() {
- this.editorShow = !this.editorShow;
- },
+ // 获取数据
async getStockList() {
- // 获取数据
let opt = {
pageNum: this.pageNum,
pageSize: this.pageSize,
@@ -92,9 +118,39 @@
opt = { ...opt, ...this.propOption };
- let data = await api.getStockByType(opt);
+ let data = await this.listApi(opt);
this.stockList = data.data.list;
- this.total = data.data.total;
+ this.total = data.data.total || 1;
+ },
+ // 点击进入详情
+ toDetails(item) {
+ const obj = {
+ pid: item.code || "",
+ type: item.stock_type || ""
+ };
+ window.localStorage.setItem("kLine", JSON.stringify(obj));
+
+ this.$router.push({
+ path: "/kline",
+ query: {
+ code: item.code,
+ type: item.stock_type
+ }
+ });
+ },
+ // 删除自选股
+ async deleteStock(item) {
+ let opt = {
+ code: item.code
+ };
+ let data = await api.delOption(opt);
+ if (data.status === 0) {
+ this.$emit("update:editorShow", false);
+ Toast.success(data.msg);
+ this.getStockList();
+ } else {
+ Toast.fail(data.msg);
+ }
}
}
};
diff --git a/src/components/tabHead.vue b/src/components/tabHead.vue
index 0e845bd..d7c2401 100644
--- a/src/components/tabHead.vue
+++ b/src/components/tabHead.vue
@@ -146,6 +146,8 @@
if (data.status === 0 && data.data.list) {
this.lists = [...this.lists, ...data.data.list];
+ } else if (data.status != 0) {
+ this.finished = true;
}
if (data.data.list && data.data.list.length <= 0) {
diff --git a/src/locales/cht.json b/src/locales/cht.json
index 87f5556..ac409fe 100644
--- a/src/locales/cht.json
+++ b/src/locales/cht.json
@@ -623,5 +623,23 @@
"待认缴": "Pending payment",
"待转股": "Pending Stock Conversion",
"已转股": "Transferred stock",
- "未中标": "Audit not passed"
+ "未中标": "Audit not passed",
+ "发行时间": "Publish time",
+ "可申购数量": "Available Quantity",
+ "申购": "Purchase Application",
+ "市场价": "Market Price",
+ "最小购买数量": "Min Buy Quantity",
+ "请输入": "Please enter",
+ "低于最小申购金额": "Below the minimum subscription amount",
+ "投资周期": "Investment Cycle",
+ "投资金额": "Investment Amount",
+ "基金订单": "Fund Orders",
+ "进行中": "In Progress",
+ "已赎回": "Redeemed",
+ "赎回时间": "Redeemed Time",
+ "总赎回金额": "Redeemed Total Amount",
+ "购买密码": "Buy password",
+ "最小购买": "Min Buy",
+ "操作确认": "Operation Confirmation",
+ "相关股票": "Related Stocks"
}
\ No newline at end of file
diff --git a/src/locales/de.json b/src/locales/de.json
index 5accfff..6217b97 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -618,5 +618,23 @@
"待认缴": "Pending payment",
"待转股": "Pending Stock Conversion",
"已转股": "Transferred stock",
- "未中标": "Audit not passed"
+ "未中标": "Audit not passed",
+ "发行时间": "Publish time",
+ "可申购数量": "Available Quantity",
+ "申购": "Purchase Application",
+ "市场价": "Market Price",
+ "最小购买数量": "Min Buy Quantity",
+ "请输入": "Please enter",
+ "低于最小申购金额": "Below the minimum subscription amount",
+ "投资周期": "Investment Cycle",
+ "投资金额": "Investment Amount",
+ "基金订单": "Fund Orders",
+ "进行中": "In Progress",
+ "已赎回": "Redeemed",
+ "赎回时间": "Redeemed Time",
+ "总赎回金额": "Redeemed Total Amount",
+ "购买密码": "Buy password",
+ "最小购买": "Min Buy",
+ "操作确认": "Operation Confirmation",
+ "相关股票": "Related Stocks"
}
\ No newline at end of file
diff --git a/src/locales/en.json b/src/locales/en.json
index b13db27..533b44d 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -638,5 +638,23 @@
"待认缴": "Pending payment",
"待转股": "Pending Stock Conversion",
"已转股": "Transferred stock",
- "未中标": "Audit not passed"
+ "未中标": "Audit not passed",
+ "发行时间": "Publish time",
+ "可申购数量": "Available Quantity",
+ "申购": "Purchase Application",
+ "市场价": "Market Price",
+ "最小购买数量": "Min Buy Quantity",
+ "请输入": "Please enter",
+ "低于最小申购金额": "Below the minimum subscription amount",
+ "投资周期": "Investment Cycle",
+ "投资金额": "Investment Amount",
+ "基金订单": "Fund Orders",
+ "进行中": "In Progress",
+ "已赎回": "Redeemed",
+ "赎回时间": "Redeemed Time",
+ "总赎回金额": "Redeemed Total Amount",
+ "购买密码": "Buy password",
+ "最小购买": "Min Buy",
+ "操作确认": "Operation Confirmation",
+ "相关股票": "Related Stocks"
}
\ No newline at end of file
diff --git a/src/locales/ens.json b/src/locales/ens.json
index 8909768..49bbe62 100644
--- a/src/locales/ens.json
+++ b/src/locales/ens.json
@@ -632,5 +632,23 @@
"待认缴": "Pending payment",
"待转股": "Pending Stock Conversion",
"已转股": "Transferred stock",
- "未中标": "Audit not passed"
+ "未中标": "Audit not passed",
+ "发行时间": "Publish time",
+ "可申购数量": "Available Quantity",
+ "申购": "Purchase Application",
+ "市场价": "Market Price",
+ "最小购买数量": "Min Buy Quantity",
+ "请输入": "Please enter",
+ "低于最小申购金额": "Below the minimum subscription amount",
+ "投资周期": "Investment Cycle",
+ "投资金额": "Investment Amount",
+ "基金订单": "Fund Orders",
+ "进行中": "In Progress",
+ "已赎回": "Redeemed",
+ "赎回时间": "Redeemed Time",
+ "总赎回金额": "Redeemed Total Amount",
+ "购买密码": "Buy password",
+ "最小购买": "Min Buy",
+ "操作确认": "Operation Confirmation",
+ "相关股票": "Related Stocks"
}
\ No newline at end of file
diff --git a/src/locales/fra.json b/src/locales/fra.json
index ba62efe..a91faac 100644
--- a/src/locales/fra.json
+++ b/src/locales/fra.json
@@ -617,5 +617,23 @@
"待认缴": "Pending payment",
"待转股": "Pending Stock Conversion",
"已转股": "Transferred stock",
- "未中标": "Audit not passed"
+ "未中标": "Audit not passed",
+ "发行时间": "Publish time",
+ "可申购数量": "Available Quantity",
+ "申购": "Purchase Application",
+ "市场价": "Market Price",
+ "最小购买数量": "Min Buy Quantity",
+ "请输入": "Please enter",
+ "低于最小申购金额": "Below the minimum subscription amount",
+ "投资周期": "Investment Cycle",
+ "投资金额": "Investment Amount",
+ "基金订单": "Fund Orders",
+ "进行中": "In Progress",
+ "已赎回": "Redeemed",
+ "赎回时间": "Redeemed Time",
+ "总赎回金额": "Redeemed Total Amount",
+ "购买密码": "Buy password",
+ "最小购买": "Min Buy",
+ "操作确认": "Operation Confirmation",
+ "相关股票": "Related Stocks"
}
\ No newline at end of file
diff --git a/src/locales/hi.json b/src/locales/hi.json
index 702565e..f159954 100644
--- a/src/locales/hi.json
+++ b/src/locales/hi.json
@@ -637,5 +637,23 @@
"待认缴": "लंबित भुगतान",
"待转股": "लंबित स्टॉक रूपांतरण",
"已转股": "संक्रांत स्टॉक",
- "未中标": "लेखापरीक्षा पारित नहीं हुई"
+ "未中标": "लेखापरीक्षा पारित नहीं हुई",
+ "发行时间": "प्रकाशन समय",
+ "可申购数量": "उपलब्ध मात्रा",
+ "申购": "खरीद आवेदन",
+ "市场价": "बाजार भाव",
+ "最小购买数量": "न्यूनतम खरीद मात्रा",
+ "请输入": "कृपया दर्ज करें",
+ "低于最小申购金额": "न्यूनतम सदस्यता राशि से नीचे",
+ "投资周期": "निवेश चक्र",
+ "投资金额": "निवेश की राशि",
+ "基金订单": "निधि आदेश",
+ "进行中": "चालू",
+ "已赎回": "छुड़ाया",
+ "赎回时间": "उद्धारित समय",
+ "总赎回金额": "उद्धारित कुल राशि",
+ "购买密码": "पासवर्ड खरीदें",
+ "最小购买": "न्यूनतम खरीद",
+ "操作确认": "ऑपरेशन पुष्टिकरण",
+ "相关股票": "पर"
}
\ No newline at end of file
diff --git a/src/locales/jp.json b/src/locales/jp.json
index e3aa00a..46cf250 100644
--- a/src/locales/jp.json
+++ b/src/locales/jp.json
@@ -619,5 +619,23 @@
"待认缴": "Pending payment",
"待转股": "Pending Stock Conversion",
"已转股": "Transferred stock",
- "未中标": "Audit not passed"
+ "未中标": "Audit not passed",
+ "发行时间": "Publish time",
+ "可申购数量": "Available Quantity",
+ "申购": "Purchase Application",
+ "市场价": "Market Price",
+ "最小购买数量": "Min Buy Quantity",
+ "请输入": "Please enter",
+ "低于最小申购金额": "Below the minimum subscription amount",
+ "投资周期": "Investment Cycle",
+ "投资金额": "Investment Amount",
+ "基金订单": "Fund Orders",
+ "进行中": "In Progress",
+ "已赎回": "Redeemed",
+ "赎回时间": "Redeemed Time",
+ "总赎回金额": "Redeemed Total Amount",
+ "购买密码": "Buy password",
+ "最小购买": "Min Buy",
+ "操作确认": "Operation Confirmation",
+ "相关股票": "Related Stocks"
}
\ No newline at end of file
diff --git a/src/locales/kor.json b/src/locales/kor.json
index b1c6c43..feea140 100644
--- a/src/locales/kor.json
+++ b/src/locales/kor.json
@@ -619,5 +619,23 @@
"待认缴": "Pending payment",
"待转股": "Pending Stock Conversion",
"已转股": "Transferred stock",
- "未中标": "Audit not passed"
+ "未中标": "Audit not passed",
+ "发行时间": "Publish time",
+ "可申购数量": "Available Quantity",
+ "申购": "Purchase Application",
+ "市场价": "Market Price",
+ "最小购买数量": "Min Buy Quantity",
+ "请输入": "Please enter",
+ "低于最小申购金额": "Below the minimum subscription amount",
+ "投资周期": "Investment Cycle",
+ "投资金额": "Investment Amount",
+ "基金订单": "Fund Orders",
+ "进行中": "In Progress",
+ "已赎回": "Redeemed",
+ "赎回时间": "Redeemed Time",
+ "总赎回金额": "Redeemed Total Amount",
+ "购买密码": "Buy password",
+ "最小购买": "Min Buy",
+ "操作确认": "Operation Confirmation",
+ "相关股票": "Related Stocks"
}
\ No newline at end of file
diff --git a/src/locales/th.json b/src/locales/th.json
index 91ac787..a52eed0 100644
--- a/src/locales/th.json
+++ b/src/locales/th.json
@@ -619,5 +619,23 @@
"待认缴": "Pending payment",
"待转股": "Pending Stock Conversion",
"已转股": "Transferred stock",
- "未中标": "Audit not passed"
+ "未中标": "Audit not passed",
+ "发行时间": "Publish time",
+ "可申购数量": "Available Quantity",
+ "申购": "Purchase Application",
+ "市场价": "Market Price",
+ "最小购买数量": "Min Buy Quantity",
+ "请输入": "Please enter",
+ "低于最小申购金额": "Below the minimum subscription amount",
+ "投资周期": "Investment Cycle",
+ "投资金额": "Investment Amount",
+ "基金订单": "Fund Orders",
+ "进行中": "In Progress",
+ "已赎回": "Redeemed",
+ "赎回时间": "Redeemed Time",
+ "总赎回金额": "Redeemed Total Amount",
+ "购买密码": "Buy password",
+ "最小购买": "Min Buy",
+ "操作确认": "Operation Confirmation",
+ "相关股票": "Related Stocks"
}
\ No newline at end of file
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 3b1a095..fd8d22a 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -623,5 +623,23 @@
"待认缴": "待认缴",
"待转股": "待转股",
"已转股": "已转股",
- "未中标": "未中标"
+ "未中标": "未中标",
+ "发行时间": "发行时间",
+ "可申购数量": "可申购数量",
+ "申购": "申购",
+ "市场价": "市场价",
+ "最小购买数量": "最小购买数量",
+ "请输入": "请输入",
+ "低于最小申购金额": "低于最小申购金额",
+ "投资周期": "投资周期",
+ "投资金额": "投资金额",
+ "基金订单": "基金订单",
+ "进行中": "进行中",
+ "已赎回": "已赎回",
+ "赎回时间": "赎回时间",
+ "总赎回金额": "总赎回金额",
+ "购买密码": "购买密码",
+ "最小购买": "最小购买",
+ "操作确认": "操作确认",
+ "相关股票": "相关股票"
}
\ No newline at end of file
diff --git a/src/mixins/myMixin.js b/src/mixins/myMixin.js
new file mode 100644
index 0000000..552f772
--- /dev/null
+++ b/src/mixins/myMixin.js
@@ -0,0 +1,26 @@
+import * as api from "@/axios/api";
+export const myMixin = {
+ data() {
+ return {
+ utm: 1, // US转MX汇率
+ mtu: 1 // MX转US汇率
+ };
+ },
+ created() {
+ this.getExchangeRate();
+ },
+ methods: {
+ // 获取汇率
+ async getExchangeRate() {
+ let data = await api.getRateInfo();
+ data.data &&
+ data.data.forEach(item => {
+ if (item.currency === "USD") {
+ this.utm = item.rata;
+ } else if (item.currency === "MXN") {
+ this.mtu = item.rata;
+ }
+ });
+ }
+ }
+};
diff --git a/src/page/authentication/index.vue b/src/page/authentication/index.vue
index 4b322cd..b657f3a 100644
--- a/src/page/authentication/index.vue
+++ b/src/page/authentication/index.vue
@@ -325,6 +325,7 @@
</script>
<style scoped lang="less">
+@green: #c4d600;
/deep/ .van-nav-bar__content {
height: 65px;
}
@@ -420,7 +421,7 @@
display: flex;
align-items: center;
justify-content: center;
- background: #5c288c;
+ background: @green;
font-size: 0.4103rem;
color: #fff;
diff --git a/src/page/bankCard/index.vue b/src/page/bankCard/index.vue
index 251bd2d..e5bbf71 100644
--- a/src/page/bankCard/index.vue
+++ b/src/page/bankCard/index.vue
@@ -290,6 +290,7 @@
</script>
<style scoped lang="less">
+@green: #c4d600;
.bank_card_page {
width: 100%;
height: 100%;
@@ -369,7 +370,7 @@
display: flex;
align-items: center;
justify-content: center;
- background: #1b79f5;
+ background: @green;
font-size: 0.4103rem;
color: #fff;
diff --git a/src/page/home/Record.vue b/src/page/home/Record.vue
index 349edf8..835ab0f 100644
--- a/src/page/home/Record.vue
+++ b/src/page/home/Record.vue
@@ -11,7 +11,9 @@
<!-- <div class="main-title">{{ $t("請選擇提款账户") }}</div> -->
<van-cell
is-link
- :title="rechargeAccountData.name?rechargeAccountData.name:$t('請選擇')"
+ :title="
+ rechargeAccountData.name ? rechargeAccountData.name : $t('請選擇')
+ "
@click="rechargeAccountShow = true"
/>
<van-action-sheet
@@ -22,62 +24,59 @@
@select="rechargeAccountSelect"
/>
<div class="pages_box">
- <!-- <div class="pages_box_after">账变前</div> -->
- <div class="pages_box_after">{{$t('je')}}</div>
- <!-- <div class="pages_box_after">账变后</div> -->
- <div class="pages_box_after">{{$t('操作时间')}}</div>
- <div class="pages_box_after">{{$t('描述')}}</div>
+ <!-- <div class="pages_box_after">账变前</div> -->
+ <div class="pages_box_after">{{ $t("je") }}</div>
+ <!-- <div class="pages_box_after">账变后</div> -->
+ <div class="pages_box_after">{{ $t("操作时间") }}</div>
+ <div class="pages_box_after">{{ $t("描述") }}</div>
</div>
- <div class="pages_box" v-for="(item,index) in pagelist" :key="index">
- <!-- <div class="pages_box_after">₹{{item.after}}</div> -->
- <div class="pages_box_after">₹{{item.amount }}</div>
- <!-- <div class="pages_box_after">₹{{item.beFore}}</div> -->
- <div class="pages_box_after">{{
- $moment(item.createTime).format(
- "DD-MM-YYYY hh:mm:ss A"
- )
- }}</div>
- <div class="pages_box_after">{{item.descs}}</div>
+ <div class="pages_box" v-for="(item, index) in pagelist" :key="index">
+ <!-- <div class="pages_box_after">₹{{item.after}}</div> -->
+ <div class="pages_box_after">{{ item.amount }}</div>
+ <!-- <div class="pages_box_after">₹{{item.beFore}}</div> -->
+ <div class="pages_box_after">
+ {{ $moment(item.createTime).format("DD-MM-YYYY hh:mm:ss A") }}
+ </div>
+ <div class="pages_box_after">{{ item.descs }}</div>
</div>
</div>
</div>
-
</template>
<script>
- import * as api from "@/axios/api";
+import * as api from "@/axios/api";
export default {
data() {
return {
- userInfo:'',
- pagelist:[],
+ userInfo: "",
+ pagelist: [],
rechargeAccountActions: [
{
- name: this.$t('gm'),
- key: "BUY",
+ name: this.$t("gm"),
+ key: "BUY"
},
{
- name: this.$t('hj121'),
- key: "CLOSE_POSITION",
+ name: this.$t("hj121"),
+ key: "CLOSE_POSITION"
},
{
- name: this.$t('hj44'),
- key: "HANDLING_CHARGE",
- },
+ name: this.$t("hj44"),
+ key: "HANDLING_CHARGE"
+ }
],
rechargeAccountShow: false,
rechargeAccountData: {},
- type:'',
+ type: ""
};
},
mounted() {
- this.getUserInfo()
+ this.getUserInfo();
this.getpagelist();
},
methods: {
rechargeAccountSelect(e) {
this.rechargeAccountData = e;
- this.type = e.key
+ this.type = e.key;
this.getpagelist();
},
async getUserInfo() {
@@ -90,74 +89,80 @@
} else {
}
},
- async getpagelist(){
- let result = await api.moneylogAll({ userId: this.$store.state.userInfo.id,type:this.type,pageSize:9999, });
+ async getpagelist() {
+ let result = await api.moneylogAll({
+ userId: this.$store.state.userInfo.id,
+ type: this.type,
+ pageSize: 9999
+ });
if (result.status === 0) {
- this.pagelist = result.data.records
+ this.pagelist = result.data.records;
} else {
-
}
- },
- },
+ }
+ }
};
</script>
<style scoped lang="less">
- main {
- padding: 0 0.4rem 0.53333rem;
- box-sizing: border-box;
- }
- .main-title {
- font-style: normal;
- font-weight: 400;
- font-size: 0.37333rem;
- color: #8c9fad;
- margin-top: 0.3rem;
- }
+@green: #c4d600;
+main {
+ padding: 0 0.4rem 0.53333rem;
+ box-sizing: border-box;
+}
+.main-title {
+ font-style: normal;
+ font-weight: 400;
+ font-size: 0.37333rem;
+ color: #8c9fad;
+ margin-top: 0.3rem;
+}
- .pages_box_after{
- flex: 1;
- text-align: center;
- }
- .pages_box{
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- justify-content: center;
- height: 60px;
- line-height: 60px;
- background-color: #fff;
- flex: 1;
- border-bottom: 1px solid #acc4d4;
- font-size: 12px;
- }
- .pages{
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- /deep/ .van-cell {
- list-style: none;
- width: 100%;
- margin-top: 0.26667rem;
- background: #fff;
- border-radius: 0.10667rem;
- list-style: none;
- border: none;
- font-family: Arial, sans-serif;
- font-style: normal;
- font-weight: 500;
- font-size: 0.37333rem;
- line-height: 0.53333rem;
- padding: 0.32rem 0.4rem;
- box-sizing: border-box;
- margin-top: 0.26667rem;
- box-shadow: 0 0.16rem 0.32rem #eaeaea99;
- margin-bottom: 20px;
- }
+.pages_box_after {
+ flex: 1;
+ text-align: center;
+ font-size: 1.2em;
+}
+.pages_box {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ justify-content: center;
+ height: 60px;
+ line-height: 60px;
+ background-color: #fff;
+ flex: 1;
+ border-bottom: 1px solid @green;
+ font-size: 12px;
+}
+.pages {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ font-size: 10vw;
+}
+/deep/ .van-cell {
+ list-style: none;
+ width: 100%;
+ margin-top: 0.26667rem;
+ background: #fff;
+ border-radius: 0.10667rem;
+ list-style: none;
+ border: none;
+ font-family: Arial, sans-serif;
+ font-style: normal;
+ font-weight: 500;
+ font-size: 0.37333rem;
+ line-height: 0.53333rem;
+ padding: 0.32rem 0.4rem;
+ box-sizing: border-box;
+ margin-top: 0.26667rem;
+ box-shadow: 0 0.16rem 0.32rem #eaeaea99;
+ margin-bottom: 20px;
+}
/deep/ .van-nav-bar__content {
height: 65px;
}
diff --git a/src/page/home/components/echart.vue b/src/page/home/components/echart.vue
index 896776e..0e7d7ce 100644
--- a/src/page/home/components/echart.vue
+++ b/src/page/home/components/echart.vue
@@ -5,6 +5,7 @@
</template>
<script>
import * as echarts from "echarts";
+import { data } from "jquery";
export default {
props: {
ids: {
@@ -28,15 +29,15 @@
oneDay: 24 * 3600 * 1000
};
},
+ watch: {
+ data: {
+ handler(newVal, oldVal) {
+ this.initCharts();
+ },
+ }
+ },
methods: {
initCharts() {
- // let data = [];
- // for (var i = 0; i < 1000; i++) {
- // data.push(this.randomData());
- // }
-
- // console.log("dadadadad",data);
-
var chartDom = document.getElementById("main" + this.ids);
var myChart = echarts.init(chartDom, "dark");
var option;
diff --git a/src/page/home/homeIndex.vue b/src/page/home/homeIndex.vue
index 03e2198..5d82c36 100644
--- a/src/page/home/homeIndex.vue
+++ b/src/page/home/homeIndex.vue
@@ -42,7 +42,7 @@
</div>
</div>
<div class="swiper-slide">
- <div class="nav_item flex-center">
+ <div class="nav_item flex-center" @click="toPage('/fund')">
<img src="../../assets/img/home_4.png" alt="" />
<span>{{ $t("理财基金") }}</span>
</div>
@@ -168,8 +168,14 @@
let data = await api.getHomePageData();
this.newsList = data.data.newsList;
- this.mxDataStockBeans = data.data.mxDataStockBeans;
- this.usDataStockBeans = data.data.usDataStockBeans;
+ this.mxDataStockBeans = data.data.mxDataStockBeans.map(item => {
+ item.kData = item.kdata;
+ return item;
+ });
+ this.usDataStockBeans = data.data.usDataStockBeans.map(item => {
+ item.kData = item.kdata;
+ return item;
+ });
// console.log(
// "home",
diff --git a/src/page/kline/components/kLine.vue b/src/page/kline/components/kLine.vue
index a6e9fb8..e2347d8 100644
--- a/src/page/kline/components/kLine.vue
+++ b/src/page/kline/components/kLine.vue
@@ -6,27 +6,60 @@
<div class="periodWrap kline_periodWrap" ref="kline_periodWrap">
<!-- DWM 分 -->
<div class="btnGroup" style="position: relative">
- <div class="btn2" v-for="(item, index) in KLinePeriodMenu" :class="{ active: KLinePeriodIndex == index }"
- :key="item.ID" @click="OnClickKLinePeriodMenu(index, item, 'kline')">
+ <div
+ class="btn2"
+ v-for="(item, index) in KLinePeriodMenu"
+ :class="{ active: KLinePeriodIndex == index }"
+ :key="item.ID"
+ @click="OnClickKLinePeriodMenu(index, item, 'kline')"
+ >
<span>{{ item.Name }}</span>
</div>
- <div style="position: absolute; right: 0; top: 25px; z-index: 99" v-if="isShow == true">
- <div class="btnGroup" v-show="IsShowRightMenu" style="display: flex; flex-direction: column">
- <div class="btn" :class="{ active: KLineRightIndex == index }" v-for="(item, index) in KLineRightMenu"
- :key="item.ID" style="padding: 10px" @click="OnClickKLineRightMenu(index, item)">
+ <div
+ style="position: absolute; right: 0; top: 25px; z-index: 99"
+ v-if="isShow == true"
+ >
+ <div
+ class="btnGroup"
+ v-show="IsShowRightMenu"
+ style="display: flex; flex-direction: column"
+ >
+ <div
+ class="btn"
+ :class="{ active: KLineRightIndex == index }"
+ v-for="(item, index) in KLineRightMenu"
+ :key="item.ID"
+ style="padding: 10px"
+ @click="OnClickKLineRightMenu(index, item)"
+ >
{{ item.Name }}
</div>
- <div class="btn" v-for="item in KLineIndexMenu" :key="item.ID" style="padding: 10px"
- @click="ChangeKLineIndex(item)">
+ <div
+ class="btn"
+ v-for="item in KLineIndexMenu"
+ :key="item.ID"
+ style="padding: 10px"
+ @click="ChangeKLineIndex(item)"
+ >
{{ item.Name }}
</div>
</div>
</div>
</div>
</div>
- <div class="hqchart" id="hqchart_minute" ref="kline" v-show="chartType == 'minute'"></div>
- <div class="hqchart" id="hqchart_kline" ref="kline2" v-show="chartType == 'kline'"></div>
+ <div
+ class="hqchart"
+ id="hqchart_minute"
+ ref="kline"
+ v-show="chartType == 'minute'"
+ ></div>
+ <div
+ class="hqchart"
+ id="hqchart_kline"
+ ref="kline2"
+ v-show="chartType == 'kline'"
+ ></div>
</div>
</div>
</div>
@@ -34,1531 +67,1560 @@
</template>
<script>
- import * as echarts from "echarts";
+import * as echarts from "echarts";
- import _ from "lodash";
- import HQChart from "hqchart";
- import "hqchart/src/jscommon/umychart.resource/css/tools.css";
- import "hqchart/src/jscommon/umychart.resource/font/iconfont.css";
- import EastMoney from "../../../eastmoney/HQData.js";
- import i18n from "@/locales/index.js";
+import _ from "lodash";
+import HQChart from "hqchart";
+import "hqchart/src/jscommon/umychart.resource/css/tools.css";
+import "hqchart/src/jscommon/umychart.resource/font/iconfont.css";
+import EastMoney from "../../../eastmoney/HQData.js";
+import i18n from "@/locales/index.js";
- HQChart.Chart.MARKET_SUFFIX_NAME.GetMarketStatus = function(symbol) {
- return 2;
- }; // 一直交易
- function DefaultData() {}
+HQChart.Chart.MARKET_SUFFIX_NAME.GetMarketStatus = function(symbol) {
+ return 2;
+}; // 一直交易
+function DefaultData() {}
- DefaultData.GetMinuteOption = function() {
- var option = {
- Type: "分钟走势图", // 创建图形类型
- // Type:'分钟走势图横屏',
- Language: "EN", // 英文 'EN' 简体中文:'CN' 繁体中文:"TC"
- // 窗口指标
- Windows: [
- // { Index:"KDJ", Modify: false, Change: true, Close: true},
- // { Index: "KDJ", Modify: false, Change: false, Close: false }
- ],
+DefaultData.GetMinuteOption = function() {
+ var option = {
+ Type: "分钟走势图", // 创建图形类型
+ // Type:'分钟走势图横屏',
+ Language: "EN", // 英文 'EN' 简体中文:'CN' 繁体中文:"TC"
+ // 窗口指标
+ Windows: [
+ // { Index:"KDJ", Modify: false, Change: true, Close: true},
+ // { Index: "KDJ", Modify: false, Change: false, Close: false }
+ ],
- Symbol: "AAPL.usa",
- IsAutoUpdate: true, // 是自动更新数据
- AutoUpdateFrequency: 20000,
- DayCount: 1, // 1 最新交易日数据 >1 多日走势图
- IsShowRightMenu: false, // 是否显示右键菜单
- CorssCursorTouchEnd: true,
+ Symbol: "AAPL.usa",
+ IsAutoUpdate: true, // 是自动更新数据
+ AutoUpdateFrequency: 20000,
+ DayCount: 1, // 1 最新交易日数据 >1 多日走势图
+ IsShowRightMenu: false, // 是否显示右键菜单
+ CorssCursorTouchEnd: true,
- CorssCursorInfo: {
- Left: 1,
- Right: 1
+ CorssCursorInfo: {
+ Left: 1,
+ Right: 1
+ },
+
+ MinuteLine: {
+ IsDrawAreaPrice: true, // 是否画价格面积图
+ IsShowAveragePrice: true // 不显示均线
+ },
+
+ // 边框
+ Border: {
+ Left: 1, // 左边间距
+ Right: 1, // 右边间距
+ Top: 0,
+ Bottom: 1,
+ AutoRight: {
+ Blank: 10,
+ MinWidth: 40
},
+ AutoLeft: {
+ Blank: 10,
+ MinWidth: 40
+ }
+ },
- MinuteLine: {
- IsDrawAreaPrice: true, // 是否画价格面积图
- IsShowAveragePrice: true, // 不显示均线
- },
-
- // 边框
- Border: {
- Left: 1, // 左边间距
- Right: 1, // 右边间距
- Top: 0,
- Bottom: 1,
- AutoRight: {
- Blank: 10,
- MinWidth: 40
- },
- AutoLeft: {
- Blank: 10,
- MinWidth: 40
- },
- },
-
- // 子框架设置
- // Height 是否显示成交量 柱状图 0 false
- Frame: [{
+ // 子框架设置
+ // Height 是否显示成交量 柱状图 0 false
+ Frame: [
+ {
SplitCount: 5
- }, {
+ },
+ {
SplitCount: 3,
Height: 0
- }],
-
- // 扩展图形
- ExtendChart: [
- // {Name:'MinuteTooltip' } //手机端tooltip
- ],
- };
-
- return option;
- };
-
- DefaultData.GetMinuteIndexMenu = function() {
- var data = [{
- Name: "MACD",
- ID: "MACD",
- WindowIndex: 2
- },
- {
- Name: "KDJ",
- ID: "KDJ",
- WindowIndex: 2
- },
- {
- Name: "DMI",
- ID: "DMI",
- WindowIndex: 2
- },
- {
- Name: "ROC",
- ID: "ROC",
- WindowIndex: 2
- },
- ];
-
- return data;
- };
-
- DefaultData.GetKLineIndexMenu = function() {
- var data = [{
- Name: "MA",
- ID: "MA",
- WindowIndex: 0
- },
- {
- Name: "BOLL",
- ID: "BOLL",
- WindowIndex: 0
- },
- {
- Name: "MACD",
- ID: "MACD",
- WindowIndex: 1
- },
- {
- Name: "KDJ",
- ID: "KDJ",
- WindowIndex: 1
- },
- {
- Name: "DMI",
- ID: "DMI",
- WindowIndex: 1
- },
- {
- Name: "ROC",
- ID: "ROC",
- WindowIndex: 1
- },
- ];
-
- return data;
- };
-
- DefaultData.GetTestSymbolMenu = function() {
- // 品种代码规则 ${东方财富品种代码}_${东方财富市场}.${HQChart内部市场后缀}
- var data = [{
- Title: "美股",
- Icon: "",
- Sub: [{
- Name: "网易",
- Code: "NTES_105.usa",
- },
- {
- Name: "微软",
- Code: "MSFT_105.usa",
- },
- {
- Name: "亚马逊",
- Code: "AMZN_105.usa",
- },
- {
- Name: "人人网",
- Code: "RENN_106.usa",
- },
- {
- Name: "滴滴",
- Code: "DIDI_106.usa",
- },
- {
- Name: "阿里巴巴",
- Code: "BABA_106.usa",
- },
- {
- Name: "知乎",
- Code: "ZH_106.usa",
- },
- {
- Name: "道琼斯",
- Code: "DJIA_100.usa",
- },
- {
- Name: "标普500",
- Code: "SPX_100.usa",
- },
- {
- Name: "纳斯达克",
- Code: "NDX_100.usa",
- },
- ],
- },
- {
- Title: "沪深A股",
- Icon: "",
- Sub: [{
- Name: "浦发银行",
- Code: "600000_1.sh",
- },
- {
- Name: "东方财富",
- Code: "300059_0.sz",
- },
- {
- Name: "上证指数",
- Code: "000001_1.sh",
- },
- {
- Name: "深证成指",
- Code: "399001_0.sz",
- },
- ],
- },
- {
- Title: "北交所",
- Icon: "",
- Sub: [{
- Name: "凯添燃气",
- Code: "831010_0.bj",
- },
- {
- Name: "驱动力",
- Code: "838275_0.bj",
- },
- {
- Name: "齐鲁华信",
- Code: "830832_0.bj",
- },
- {
- Name: "苏轴股份",
- Code: "430418_0.bj",
- },
- ],
- },
- {
- Title: "ETF基金",
- Icon: "",
- Sub: [{
- Name: "50ETF基金",
- Code: "510800_1.sh",
- },
- {
- Name: "上证180ETF",
- Code: "510180_1.sh",
- },
- {
- Name: "恒生ETF",
- Code: "159920_0.sz",
- },
- {
- Name: "创业板50ETF",
- Code: "159949_0.sz",
- },
- ],
- },
- {
- Title: "港股",
- Icon: "",
- Sub: [{
- Name: "比亚迪股份",
- Code: "01211_116.hk",
- },
- {
- Name: "招商银行",
- Code: "03968_116.hk",
- },
- {
- Name: "汇丰控股",
- Code: "00005_116.hk",
- },
- {
- Name: "长和",
- Code: "00001_116.hk",
- },
- {
- Name: "恒生指数",
- Code: "HSI_100.hk",
- },
- ],
- },
- {
- Title: "外汇",
- Icon: "",
- Sub: [{
- Name: "美元兑加元",
- Code: "USDCAD_119.FOREX",
- },
- {
- Name: "美元兑港币",
- Code: "USDHKD_119.FOREX",
- },
- {
- Name: "美元兑欧元",
- Code: "USDEUR_119.FOREX",
- },
- {
- Name: "欧元兑英镑",
- Code: "EURGBP_119.FOREX",
- },
- {
- Name: "美元指数",
- Code: "UPI_100.ET",
- },
- ],
- },
- {
- Title: "上海期货交易所",
- Icon: "",
- Sub: [{
- Name: "沪铜主力",
- Code: "CUM_113.SHFE",
- },
- {
- Name: "沪锡主力",
- Code: "SNM_113.SHFE",
- },
- {
- Name: "沪金主力",
- Code: "AUM_113.SHFE",
- },
- {
- Name: "沪镍主力",
- Code: "NIM_113.SHFE",
- },
- {
- Name: "橡胶主力",
- Code: "RUM_113.SHFE",
- },
- {
- Name: "螺纹钢主力",
- Code: "RBM_113.SHFE",
- },
- {
- Name: "沪银主力",
- Code: "AGM_113.SHFE",
- },
- {
- Name: "线材主力",
- Code: "WRM_113.SHFE",
- },
- {
- Name: "沪铅主力",
- Code: "PBM_113.SHFE",
- },
- {
- Name: "沪锌主力",
- Code: "ZNM_113.SHFE",
- },
- {
- Name: "石油沥青主力",
- Code: "BUM_113.SHFE",
- },
- {
- Name: "沪铝主力",
- Code: "ALM_113.SHFE",
- },
- {
- Name: "燃油主力",
- Code: "FUM_113.SHFE",
- },
- {
- Name: "热轧卷板主力",
- Code: "HCM_113.SHFE",
- },
- {
- Name: "纸浆主力",
- Code: "SPM_113.SHFE",
- },
- {
- Name: "不锈钢主力",
- Code: "SSM_113.SHFE",
- },
- ],
- },
- {
- Title: "上海国际能源交易中心",
- Icon: "",
- Sub: [{
- Name: "原油主力",
- Code: "SCM_142.SHFE",
- },
- {
- Name: "20号胶主力",
- Code: "NRM_142.SHFE",
- },
- {
- Name: "低硫燃油主力",
- Code: "LUM_142.SHFE",
- },
- {
- Name: "国际铜主力",
- Code: "BCM_142.SHFE",
- },
- ],
- },
- {
- Title: "大连商品交易所",
- Icon: "",
- Sub: [{
- Name: "玉米主力",
- Code: "CM_114.DCE",
- },
- {
- Name: "豆一主力",
- Code: "AM_114.DCE",
- },
- {
- Name: "豆二主力",
- Code: "BM_114.DCE",
- },
- {
- Name: "豆粕主力",
- Code: "MM_114.DCE",
- },
- {
- Name: "豆油主力",
- Code: "YM_114.DCE",
- },
- {
- Name: "棕榈油主力",
- Code: "PM_114.DCE",
- },
- {
- Name: "聚乙烯主力",
- Code: "LM_114.DCE",
- },
- {
- Name: "聚氯乙烯主力",
- Code: "VM_114.DCE",
- },
-
- {
- Name: "焦炭主力",
- Code: "JM_114.DCE",
- },
- {
- Name: "焦煤主力",
- Code: "JMM_114.DCE",
- },
- {
- Name: "纤维板主力",
- Code: "FBM_114.DCE",
- },
- {
- Name: "胶合板主力",
- Code: "BBM_114.DCE",
- },
- {
- Name: "铁矿石主力",
- Code: "IM_114.DCE",
- },
- {
- Name: "鸡蛋主力",
- Code: "JDM_114.DCE",
- },
-
- {
- Name: "聚丙烯主力",
- Code: "PPM_114.DCE",
- },
- {
- Name: "玉米淀粉主力",
- Code: "CSM_114.DCE",
- },
- {
- Name: "乙二醇主力",
- Code: "EGM_114.DCE",
- },
- {
- Name: "粳米主力",
- Code: "RRM_114.DCE",
- },
- {
- Name: "苯乙烯主力",
- Code: "EBM_114.DCE",
- },
- {
- Name: "LPG主力",
- Code: "PGM_114.DCE",
- },
- {
- Name: "生猪主力",
- Code: "LHM_114.DCE",
- },
- ],
- },
- {
- Title: "郑州商品交易所",
- Icon: "",
- Sub: [{
- Name: "强麦主力",
- Code: "WHM_115.CZC",
- },
- {
- Name: "普麦主力",
- Code: "PMM_115.CZC",
- },
- {
- Name: "一号棉花主力",
- Code: "CFM_115.CZC",
- },
- {
- Name: "白糖主力",
- Code: "SRM_115.CZC",
- },
- {
- Name: "PTA主力",
- Code: "TAM_115.CZC",
- },
- {
- Name: "菜油主力",
- Code: "OIM_115.CZC",
- },
- {
- Name: "早籼稻主力",
- Code: "RIM_115.CZC",
- },
- {
- Name: "甲醇主力",
- Code: "MAM_115.CZC",
- },
- {
- Name: "玻璃主力",
- Code: "FGM_115.CZC",
- },
- {
- Name: "菜籽主力",
- Code: "RSM_115.CZC",
- },
- {
- Name: "菜粕主力",
- Code: "RMM_115.CZC",
- },
- {
- Name: "粳稻主力",
- Code: "JRM_115.CZC",
- },
- {
- Name: "晚籼稻主力",
- Code: "LRM_115.CZC",
- },
- {
- Name: "硅铁主力",
- Code: "SFM_115.CZC",
- },
- {
- Name: "锰硅主力",
- Code: "SMM_115.CZC",
- },
- {
- Name: "动力煤主力",
- Code: "ZCM_115.CZC",
- },
- {
- Name: "棉纱主力",
- Code: "CYM_115.CZC",
- },
- {
- Name: "苹果主力",
- Code: "APM_115.CZC",
- },
- {
- Name: "红枣主力",
- Code: "CJM_115.CZC",
- },
- {
- Name: "尿素主力",
- Code: "URM_115.CZC",
- },
- {
- Name: "纯碱主力",
- Code: "SAM_115.CZC",
- },
- {
- Name: "短纤主力",
- Code: "PFM_115.CZC",
- },
- {
- Name: "花生主力",
- Code: "PKM_115.CZC",
- },
- ],
- },
- {
- Title: "中国金融期货交易所",
- Icon: "",
- Sub: [{
- Name: "二债主力",
- Code: "TS-130130_8.CFE",
- },
- {
- Name: "五债主力",
- Code: "TF-050130_8.CFE",
- },
- {
- Name: "十债主力",
- Code: "T-110130_8.CFE",
- },
- {
- Name: "上证主力",
- Code: "IH-070130_8.CFE",
- },
- {
- Name: "中证主力",
- Code: "IC-060130_8.CFE",
- },
- {
- Name: "沪深主力",
- Code: "IF-040130_8.CFE",
- },
- ],
- },
- {
- Title: "芝加哥商业交易所",
- Icon: "",
- Sub: [{
- Name: "小麦当月连续",
- Code: "ZW00Y_103.CBOT",
- },
- {
- Name: "迷你小麦当月连续",
- Code: "XW00Y_103.CBOT",
- },
- {
- Name: "玉米当月连续",
- Code: "ZC00Y_103.CBOT",
- },
- {
- Name: "迷你玉米当月连续",
- Code: "XC00Y_103.CBOT",
- },
- {
- Name: "大豆当月连续",
- Code: "ZS00Y_103.CBOT",
- },
- {
- Name: "迷你大豆当月连续",
- Code: "XK00Y_103.CBOT",
- },
- {
- Name: "豆油当月连续",
- Code: "ZL00Y_103.CBOT",
- },
- {
- Name: "豆粕当月连续",
- Code: "ZM00Y_103.CBOT",
- },
- {
- Name: "燕麦当月连续",
- Code: "ZO00Y_103.CBOT",
- },
- {
- Name: "稻谷当月连续",
- Code: "ZR00Y_103.CBOT",
- },
-
- {
- Name: "小型纳指当月连续",
- Code: "NQ00Y_103.CBOT",
- },
- {
- Name: "小型标普当月连续",
- Code: "ES00Y_103.CBOT",
- },
- {
- Name: "小型道指当月连续",
- Code: "YM00Y_103.CBOT",
- },
-
- {
- Name: "2年美国债当月连续",
- Code: "TU00Y_103.CBOT",
- },
- {
- Name: "5年美国债当月连续",
- Code: "FV00Y_103.CBOT",
- },
- {
- Name: "10年美国债当月连续",
- Code: "TY00Y_103.CBOT",
- },
- {
- Name: "30年美国债当月连续",
- Code: "US00Y_103.CBOT",
- },
- {
- Name: "超国债当月连续",
- Code: "UL00Y_103.CBOT",
- },
- ],
- },
- {
- Title: "纽约商品交易所",
- Icon: "",
- Sub: [{
- Name: "NYMEX原油",
- Code: "CL00Y_102.NYMEX",
- },
- {
- Name: "NYMEX铂金",
- Code: "PL00Y_102.NYMEX",
- },
- {
- Name: "迷你原油",
- Code: "QM00Y_102.NYMEX",
- },
- {
- Name: "NYMEX燃油",
- Code: "HO00Y_102.NYMEX",
- },
- {
- Name: "NYMEX汽油",
- Code: "RB00Y_102.NYMEX",
- },
- {
- Name: "NYMEX钯金",
- Code: "PA00Y_102.NYMEX",
- },
- {
- Name: "热轧钢卷",
- Code: "HR00Y_102.NYMEX",
- },
- {
- Name: "天然气",
- Code: "NG00Y_102.NYMEX",
- },
- ],
- },
- {
- Title: "纽约商业期货交易所",
- Icon: "",
- Sub: [{
- Name: "COMEX白银",
- Code: "SI00Y_101.COMEX",
- },
- {
- Name: "迷你白银",
- Code: "QI00Y_101.COMEX",
- },
- {
- Name: "微型黄金",
- Code: "MGC00Y_101.COMEX",
- },
- {
- Name: "迷你黄金",
- Code: "QO00Y_101.COMEX",
- },
- {
- Name: "COMEX黄金",
- Code: "GC00Y_101.COMEX",
- },
- {
- Name: "COMEX铜",
- Code: "HG00Y_101.COMEX",
- },
- ],
- },
- {
- Title: "纽约期货交易所",
- Icon: "",
- Sub: [{
- Name: "棉花当月连续",
- Code: "CT00Y_108.NYBOT",
- }, ],
- },
- {
- Title: "伦敦金属交易所",
- Icon: "",
- Sub: [{
- Name: "综合镍03",
- Code: "NI-LNKT_109.LME",
- },
- {
- Name: "综合铜03",
- Code: "CA-LCPT_109.LME",
- },
- {
- Name: "综合铝03",
- Code: "AH-LALT_109.LME",
- },
- {
- Name: "综合锡03",
- Code: "SN-LTNT_109.LME",
- },
- {
- Name: "综合锌03",
- Code: "ZS-LZNT_109.LME",
- },
- {
- Name: "综合铅03",
- Code: "PB-LLDT_109.LME",
- },
- ],
- },
- {
- Title: "东京商品交易所",
- Icon: "",
- Sub: [{
- Name: "日铂金当月连续",
- Code: "JPL00Y_111.TOCOM",
- },
- {
- Name: "日白银当月连续",
- Code: "JAG00Y_111.TOCOM",
- },
- {
- Name: "日原油当月连续",
- Code: "JCO00Y_111.TOCOM",
- },
- {
- Name: "日煤油当月连续",
- Code: "JKE00Y_111.TOCOM",
- },
- {
- Name: "日橡胶当月连续",
- Code: "JRU00Y_111.TOCOM",
- },
- {
- Name: "日黄金当月连续",
- Code: "JAU00Y_111.TOCOM",
- },
- {
- Name: "日汽油当月连续",
- Code: "JGL00Y_111.TOCOM",
- },
- ],
- },
- {
- Title: "美国洲际交易所",
- Icon: "",
- Sub: [{
- Name: "布伦特原油当月连续",
- Code: "B00Y_112.IPE",
- },
- {
- Name: "重柴油当月连续",
- Code: "G00Y_112.IPE",
- },
- ],
- },
- ];
-
- return data;
- };
-
- // k形图
- DefaultData.GetKLineOption = function() {
- var option = {
- Type: "历史K线图", // 创建图形类型
- Language: "EN", // 英文 'EN' 简体中文:'CN' 繁体中文:"TC"
- // 窗口指标
- Windows: [{
- Index: "MA",
- Modify: true,
- Change: false,
- height: 20
- },
- // { Index: 'MA', Modify: true, Modify: false, Change: false, height: 20 },
- {
- Index: "ATR",
- Modify: false,
- Change: false,
- Close: false
- },
- // { Index: 'MACD', Modify: true, Change: true, Close: false }
- ],
- Symbol: "600015.sh",
- IsAutoUpdate: true, // 是自动更新数据
- AutoUpdateFrequency: 15000,
- IsApiPeriod: true,
- IsShowRightMenu: false, // 是否显示右键菜单
- // CorssCursorTouchEnd:true,
-
- KLine: {
- DragMode: 1, // 拖拽模式 0 禁止拖拽 1 数据拖拽 2 区间选择
- Right: 0, // 复权 0 不复权 1 前复权 2 后复权
- Period: 0, // 周期 0 日线 1 周线 2 月线 3 年线
- MaxReqeustDataCount: 1000, // 数据个数
- PageSize: 60, // 一屏显示多少数据
- KLineDoubleClick: false, // 双击分钟走势图
- IsShowTooltip: true, // 是否显示K线提示信息
- DrawType: 0,
- RightSpaceCount: 2,
- },
-
- CorssCursorInfo: {
- Left: 0,
- Right: 1
- },
-
- // 标题设置
- KLineTitle: {
- IsShowName: false, // 不显示股票名称
- IsShowSettingInfo: false, // 不显示周期/复权
- isShowDateTime: true,
- },
-
- // 边框
- Border: {
- Left: 1, // 左边间距
- Right: 1, // 右边间距
- Top: 0,
- Bottom: 15,
- AutoRight: {
- Blank: 10,
- MinWidth: 40
- },
- },
-
- // 子框架设置
- Frame: [{
- SplitCount: 5,
- IsShowLeftText: false,
- IsShowYLine: false,
- Custom: [{
- Type: 0,
- Position: "right",
- }, ],
- },
- {
- SplitCount: 3,
- IsShowLeftText: false
- },
- {
- SplitCount: 3,
- IsShowLeftText: false
- },
- ],
-
- // 扩展图形
- ExtendChart: [
- // { Name:'KLineTooltip' }, //手机端tooltip
- ],
- };
-
- return option;
- };
-
- DefaultData.GetMinuteDayMenu = function() {
- var data = [{
- Name: "1D",
- ID: 1
- },
- {
- Name: "2D",
- ID: 2
- },
- {
- Name: "3D",
- ID: 3
- },
- {
- Name: "4D",
- ID: 4
- },
- {
- Name: "5D",
- ID: 5
- },
- ];
-
- return data;
- };
-
- DefaultData.GetKLinePeriodMenu = function() {
- var data = [
- // { Name: i18n.t('hj86'), ID: 3 },分时额外处理
- // { Name: i18n.t("hj86"), ID: 4 },
- {
- Name: i18n.t("hj87"),
- ID: 0
- },
- {
- Name: i18n.t("hj88"),
- ID: 1
- },
- {
- Name: i18n.t("hj89"),
- ID: 2
- },
- {
- Name: i18n.t("hj90"),
- ID: 4
- },
- {
- Name: i18n.t("hj91"),
- ID: 5
- },
- {
- Name: i18n.t("hj92"),
- ID: 7
- },
- ];
-
- return data;
- };
-
- DefaultData.GetKLineRightMenu = function() {
- var data = [{
- Name: i18n.t("hj93"),
- ID: 0
- },
- {
- Name: i18n.t("hj94"),
- ID: 1
- },
- {
- Name: i18n.t("hj95"),
- ID: 2
- },
- ];
-
- return data;
- };
-
- export default {
- props: {
- hktype: {
- type: String,
- default: "",
- },
- },
- data() {
- return {
- key: 0,
- active: 0,
- MinuteDayMenu: DefaultData.GetMinuteDayMenu(),
- MinuteDayIndex: 0,
- KLinePeriodMenu: DefaultData.GetKLinePeriodMenu(),
- KLinePeriodIndex: 0,
- KLineRightMenu: DefaultData.GetKLineRightMenu(),
- KLineRightIndex: 0,
- IsShowRightMenu: true,
- MinuteIndexMenu: DefaultData.GetMinuteIndexMenu(),
- KLineIndexMenu: DefaultData.GetKLineIndexMenu(),
-
- // Symbol:'000001_0.sh',
- // 上海 1.sh 深圳0.sz 北京0.bj
-
- Symbol: "", // HQChart内部编码美股加后缀.usa AAPL.usa
-
- Chart: null, // 图形控件 分时图
- KLineChart: null, // 图形控件 K线图
- NavMenuAry: DefaultData.GetTestSymbolMenu(),
-
- VolChartHeight: 10,
- chartType: "kline",
- timerss: null,
- isShow: false,
- xData: [],
- };
- },
-
- created() {
- const {
- query
- } = this.$route;
- if (query.if_zhishu === "0") {
- this.Symbol = `${query.code}_${query.sok}.${query.type}`;
- } else if (query.code.indexOf("hk") > -1 && query.if_zhishu !== 0) {
- this.Symbol = `${query.if_zhishu}_${query.sok}.hk`;
- } else {
- this.Symbol = `${query.if_zhishu}_${query.sok}.${query.type}`;
}
- // this.Symbol = 'BRK_A106.usa'
+ ],
- console.log("------?????", this.Symbol);
- // 写入localStorage
- localStorage.setItem("hqchart_symbol", this.Symbol);
- },
-
- mounted() {
- this.offHeight = this.$refs["rightContent"].offsetHeight;
- this.OnSize();
- this.SetChartStyle();
- // this.CreateMinuteChart();
-
- // this.CreateKLineChart();
- this.$nextTick(() => {
- // this.timerss = setInterval(() => {
- this.CreateMinuteChart();
- this.CreateKLineChart();
- // }, 3000);
- // this.CreateMinuteChart();
- // this.CreateKLineChart();
- // this.timerss = setInterval(() => {
- // // this.KLineChart = null
- // // this.CreateMinuteChart();
- // // this.CreateKLineChart();
- // console.log(this.KLinePeriodMenu);
- // //此处为了 让k线实时刷新
- // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, 0, 'kline')
- // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, this.KLinePeriodMenu[this.KLinePeriodIndex],
- // 'kline')
- // }, 3000);
- });
- let that = this;
- window.onresize = _.debounce(this.OnSize, 200);
- // 自适应K线图
- var elementResizeDetectorMaker = require("element-resize-detector");
-
- // 创建实例,无参数
- var erd = elementResizeDetectorMaker(); // 使用默认选项(将使用基于对象的方法)。
-
- // 创建实例带参数
- // 使用基于超快速滚动的方法。
- // 这是推荐的策略。
- elementResizeDetectorMaker({
- // var erdUltraFast = elementResizeDetectorMaker({
- strategy: "scroll",
- callOnAdd: true, // callOnAdd选项,用于确定在添加侦听器时是否应调用它们。默认为true。
- // 如果为true,则确保在添加侦听器后将对其进行调用。如果为false,则在添加侦听器时将不保证其
- // 被调用(不会阻止其被调用)
- debug: true,
- });
- // 监听class为staticNextMain的元素 大小变化
- var self = this;
- // 侦听元素的调整大小事件,并使用元素作为调整大小事件的参数来调用侦听器函数。传递给函数的选项将
- // 覆盖实例选项
- erd.listenTo(this.$refs["rightContent"], function(element) {
- var width = element.offsetWidth;
- var height = element.offsetHeight;
- self.tableHeight = height - 10; // 将监听到的宽高进行赋值
- self.tableWidth = width - 20;
- that.offHeight = height;
- that.OnSize();
- });
- },
- beforeDestroy() {
- clearInterval(this.timerss); // 在组件销毁前清除定时器
- this.timerss = null
- },
- methods: {
-
- OnSize() {
- var width = this.$refs.right.clientWidth;
- // var rightTab = this.$refs.rightTab
- // var periodWrap = this.$refs.minute_periodWrap
- // var indexWrap = this.$refs.minute_indexWrap
- // var statementWrap = this.$refs.minute_statementWrap
- // // var chartHeight = window.innerHeight - rightTab.offsetHeight - periodWrap.offsetHeight - indexWrap.offsetHeight;
- var chartHeight = this.offHeight;
-
- var kline = this.$refs.kline;
- kline.style.width = width + "px";
- kline.style.height = chartHeight + "px";
- var kline2 = this.$refs.kline2;
- kline2.style.width = width + "px";
- kline2.style.height = chartHeight + "px";
-
- if (this.Chart) this.Chart.OnSize();
- if (this.KLineChart) this.KLineChart.OnSize();
- },
-
- changeRightContent(type) {
- this.KLinePeriodIndex = 0;
- this.chartType = type;
- this.$nextTick(() => {
- this.OnSize();
- });
- },
-
- SetChartStyle() {
- EastMoney.HQData.SetMinuteChartCoordinate();
- var blackStyle = HQChart.Chart.HQChartStyle.GetStyleConfig(
- HQChart.Chart.STYLE_TYPE_ID.WHITE_ID
- ); // 读取黑色风格配置
-
- blackStyle.UpBarColor = "#449b54"; //上涨
- blackStyle.DownBarColor = "#e13b45";
- HQChart.Chart.JSChart.SetStyle(blackStyle);
- },
-
- CreateMinuteChart() {
- // if (this.Chart) return;
-
- var option = DefaultData.GetMinuteOption();
- option.Symbol = this.Symbol;
- option.NetworkFilter = (data, callback) => {
- this.NetworkFilter(data, callback);
- }; // 网络请求回调函数
-
- var chart = HQChart.Chart.JSChart.Init(this.$refs.kline);
- chart.SetOption(option);
- this.Chart = chart;
- },
-
- CreateKLineChart() {
- if (this.KLineChart) return;
-
- var option = DefaultData.GetKLineOption();
- option.Symbol = this.Symbol;
-
- option.NetworkFilter = (data, callback) => {
- this.NetworkFilter(data, callback);
-
- // this.NetworkFilter(data, callback);
- }; // 网络请求回调函数
- var chart = HQChart.Chart.JSChart.Init(this.$refs.kline2);
- HQChart.Chart.JSChart.GetResource().FrameLogo.Text = null;
- chart.SetOption(option);
- this.KLineChart = chart;
- },
-
- ChangeSymbol(
- symbol // 切换股票
- ) {
- var symbolUpper = symbol.toUpperCase();
- var isShowVolChart = EastMoney.HQData.IsShowVolChart(symbolUpper);
- var frame = this.Chart.JSChartContainer.Frame.SubFrame[1];
- if (isShowVolChart) {
- if (frame.Height <= 0) frame.Height = this.VolChartHeight;
- } else {
- if (frame.Height > 0) this.VolChartHeight = frame.Height;
- frame.Height = 0;
- }
- var period = this.KLineChart.JSChartContainer.Period;
- var isShowRightMenu = EastMoney.HQData.IsEnableRight(period, symbol); // 是否显示复权菜单
- this.IsShowRightMenu = isShowRightMenu;
-
- this.Symbol = symbol;
- this.Chart.ChangeSymbol(this.Symbol);
- this.KLineChart.ChangeSymbol(this.Symbol);
- },
-
- OnClickMinuteDayMenu(
- index,
- item // 分时图天数
- ) {
- this.MinuteDayIndex = index;
- this.Chart.ChangeDayCount(item.ID);
- },
-
- OnClickKLinePeriodMenu(
- index,
- item,
- type // K线周期
- ) {
- console.log('1');
- //分时额外处理才注释的
- this.chartType = type;
- this.KLinePeriodIndex = index;
- this.KLineChart.ChangePeriod(item.ID);
- },
-
- OnClickKLineRightMenu(
- index,
- item // K线复权
- ) {
- this.KLineRightIndex = index;
- this.KLineChart.ChangeRight(item.ID);
- },
-
- ChangeMinuteIndex(
- item // 切换分时图指标
- ) {
- if (this.Chart) this.Chart.ChangeIndex(item.WindowIndex, item.ID);
- },
-
- ChangeKLineIndex(
- item // 切换K线图指标
- ) {
- if (this.KLineChart) {
- this.KLineChart.ChangeIndex(item.WindowIndex, item.ID);
- }
- },
-
- NetworkFilter(
- data,
- callback // 第3方数据替换接口
- ) {
- EastMoney.HQData.Log("[HQChartDemo::NetworkFilter] data", data);
-
- this.timerss = setInterval(() => {
- switch (data.Name) {
- // 分时图数据对接
- case "MinuteChartContainer::RequestMinuteData":
- EastMoney.HQData.NetworkFilter(data, callback);
- break;
- case "MinuteChartContainer::RequestHistoryMinuteData":
- EastMoney.HQData.NetworkFilter(data, callback);
- break;
-
- case "KLineChartContainer::RequestHistoryData": // 日线全量数据下载
- EastMoney.HQData.NetworkFilter(data, callback);
- break;
- case "KLineChartContainer::RequestRealtimeData": // 日线实时数据更新
- EastMoney.HQData.NetworkFilter(data, callback);
- break;
- case "KLineChartContainer::RequestFlowCapitalData": // 流通股本
- EastMoney.HQData.NetworkFilter(data, callback);
- break;
- case "KLineChartContainer::ReqeustHistoryMinuteData": // 分钟全量数据下载
- EastMoney.HQData.NetworkFilter(data, callback);
- break;
- case "KLineChartContainer::RequestMinuteRealtimeData": // 分钟增量数据更新
- EastMoney.HQData.NetworkFilter(data, callback);
- break;
- }
- }, 2000);
-
-
- },
-
- handleSelect(key, keyPath) {
- console.log(key, keyPath);
- this.ChangeSymbol(keyPath[1]);
- },
-
- handleOpen(key, keyPath) {
- console.log(key, keyPath);
- },
-
- handleClose(key, keyPath) {
- console.log(key, keyPath);
- },
- },
+ // 扩展图形
+ ExtendChart: [
+ // {Name:'MinuteTooltip' } //手机端tooltip
+ ]
};
+
+ return option;
+};
+
+DefaultData.GetMinuteIndexMenu = function() {
+ var data = [
+ {
+ Name: "MACD",
+ ID: "MACD",
+ WindowIndex: 2
+ },
+ {
+ Name: "KDJ",
+ ID: "KDJ",
+ WindowIndex: 2
+ },
+ {
+ Name: "DMI",
+ ID: "DMI",
+ WindowIndex: 2
+ },
+ {
+ Name: "ROC",
+ ID: "ROC",
+ WindowIndex: 2
+ }
+ ];
+
+ return data;
+};
+
+DefaultData.GetKLineIndexMenu = function() {
+ var data = [
+ {
+ Name: "MA",
+ ID: "MA",
+ WindowIndex: 0
+ },
+ {
+ Name: "BOLL",
+ ID: "BOLL",
+ WindowIndex: 0
+ },
+ {
+ Name: "MACD",
+ ID: "MACD",
+ WindowIndex: 1
+ },
+ {
+ Name: "KDJ",
+ ID: "KDJ",
+ WindowIndex: 1
+ },
+ {
+ Name: "DMI",
+ ID: "DMI",
+ WindowIndex: 1
+ },
+ {
+ Name: "ROC",
+ ID: "ROC",
+ WindowIndex: 1
+ }
+ ];
+
+ return data;
+};
+
+DefaultData.GetTestSymbolMenu = function() {
+ // 品种代码规则 ${东方财富品种代码}_${东方财富市场}.${HQChart内部市场后缀}
+ var data = [
+ {
+ Title: "美股",
+ Icon: "",
+ Sub: [
+ {
+ Name: "网易",
+ Code: "NTES_105.usa"
+ },
+ {
+ Name: "微软",
+ Code: "MSFT_105.usa"
+ },
+ {
+ Name: "亚马逊",
+ Code: "AMZN_105.usa"
+ },
+ {
+ Name: "人人网",
+ Code: "RENN_106.usa"
+ },
+ {
+ Name: "滴滴",
+ Code: "DIDI_106.usa"
+ },
+ {
+ Name: "阿里巴巴",
+ Code: "BABA_106.usa"
+ },
+ {
+ Name: "知乎",
+ Code: "ZH_106.usa"
+ },
+ {
+ Name: "道琼斯",
+ Code: "DJIA_100.usa"
+ },
+ {
+ Name: "标普500",
+ Code: "SPX_100.usa"
+ },
+ {
+ Name: "纳斯达克",
+ Code: "NDX_100.usa"
+ }
+ ]
+ },
+ {
+ Title: "沪深A股",
+ Icon: "",
+ Sub: [
+ {
+ Name: "浦发银行",
+ Code: "600000_1.sh"
+ },
+ {
+ Name: "东方财富",
+ Code: "300059_0.sz"
+ },
+ {
+ Name: "上证指数",
+ Code: "000001_1.sh"
+ },
+ {
+ Name: "深证成指",
+ Code: "399001_0.sz"
+ }
+ ]
+ },
+ {
+ Title: "北交所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "凯添燃气",
+ Code: "831010_0.bj"
+ },
+ {
+ Name: "驱动力",
+ Code: "838275_0.bj"
+ },
+ {
+ Name: "齐鲁华信",
+ Code: "830832_0.bj"
+ },
+ {
+ Name: "苏轴股份",
+ Code: "430418_0.bj"
+ }
+ ]
+ },
+ {
+ Title: "ETF基金",
+ Icon: "",
+ Sub: [
+ {
+ Name: "50ETF基金",
+ Code: "510800_1.sh"
+ },
+ {
+ Name: "上证180ETF",
+ Code: "510180_1.sh"
+ },
+ {
+ Name: "恒生ETF",
+ Code: "159920_0.sz"
+ },
+ {
+ Name: "创业板50ETF",
+ Code: "159949_0.sz"
+ }
+ ]
+ },
+ {
+ Title: "港股",
+ Icon: "",
+ Sub: [
+ {
+ Name: "比亚迪股份",
+ Code: "01211_116.hk"
+ },
+ {
+ Name: "招商银行",
+ Code: "03968_116.hk"
+ },
+ {
+ Name: "汇丰控股",
+ Code: "00005_116.hk"
+ },
+ {
+ Name: "长和",
+ Code: "00001_116.hk"
+ },
+ {
+ Name: "恒生指数",
+ Code: "HSI_100.hk"
+ }
+ ]
+ },
+ {
+ Title: "外汇",
+ Icon: "",
+ Sub: [
+ {
+ Name: "美元兑加元",
+ Code: "USDCAD_119.FOREX"
+ },
+ {
+ Name: "美元兑港币",
+ Code: "USDHKD_119.FOREX"
+ },
+ {
+ Name: "美元兑欧元",
+ Code: "USDEUR_119.FOREX"
+ },
+ {
+ Name: "欧元兑英镑",
+ Code: "EURGBP_119.FOREX"
+ },
+ {
+ Name: "美元指数",
+ Code: "UPI_100.ET"
+ }
+ ]
+ },
+ {
+ Title: "上海期货交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "沪铜主力",
+ Code: "CUM_113.SHFE"
+ },
+ {
+ Name: "沪锡主力",
+ Code: "SNM_113.SHFE"
+ },
+ {
+ Name: "沪金主力",
+ Code: "AUM_113.SHFE"
+ },
+ {
+ Name: "沪镍主力",
+ Code: "NIM_113.SHFE"
+ },
+ {
+ Name: "橡胶主力",
+ Code: "RUM_113.SHFE"
+ },
+ {
+ Name: "螺纹钢主力",
+ Code: "RBM_113.SHFE"
+ },
+ {
+ Name: "沪银主力",
+ Code: "AGM_113.SHFE"
+ },
+ {
+ Name: "线材主力",
+ Code: "WRM_113.SHFE"
+ },
+ {
+ Name: "沪铅主力",
+ Code: "PBM_113.SHFE"
+ },
+ {
+ Name: "沪锌主力",
+ Code: "ZNM_113.SHFE"
+ },
+ {
+ Name: "石油沥青主力",
+ Code: "BUM_113.SHFE"
+ },
+ {
+ Name: "沪铝主力",
+ Code: "ALM_113.SHFE"
+ },
+ {
+ Name: "燃油主力",
+ Code: "FUM_113.SHFE"
+ },
+ {
+ Name: "热轧卷板主力",
+ Code: "HCM_113.SHFE"
+ },
+ {
+ Name: "纸浆主力",
+ Code: "SPM_113.SHFE"
+ },
+ {
+ Name: "不锈钢主力",
+ Code: "SSM_113.SHFE"
+ }
+ ]
+ },
+ {
+ Title: "上海国际能源交易中心",
+ Icon: "",
+ Sub: [
+ {
+ Name: "原油主力",
+ Code: "SCM_142.SHFE"
+ },
+ {
+ Name: "20号胶主力",
+ Code: "NRM_142.SHFE"
+ },
+ {
+ Name: "低硫燃油主力",
+ Code: "LUM_142.SHFE"
+ },
+ {
+ Name: "国际铜主力",
+ Code: "BCM_142.SHFE"
+ }
+ ]
+ },
+ {
+ Title: "大连商品交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "玉米主力",
+ Code: "CM_114.DCE"
+ },
+ {
+ Name: "豆一主力",
+ Code: "AM_114.DCE"
+ },
+ {
+ Name: "豆二主力",
+ Code: "BM_114.DCE"
+ },
+ {
+ Name: "豆粕主力",
+ Code: "MM_114.DCE"
+ },
+ {
+ Name: "豆油主力",
+ Code: "YM_114.DCE"
+ },
+ {
+ Name: "棕榈油主力",
+ Code: "PM_114.DCE"
+ },
+ {
+ Name: "聚乙烯主力",
+ Code: "LM_114.DCE"
+ },
+ {
+ Name: "聚氯乙烯主力",
+ Code: "VM_114.DCE"
+ },
+
+ {
+ Name: "焦炭主力",
+ Code: "JM_114.DCE"
+ },
+ {
+ Name: "焦煤主力",
+ Code: "JMM_114.DCE"
+ },
+ {
+ Name: "纤维板主力",
+ Code: "FBM_114.DCE"
+ },
+ {
+ Name: "胶合板主力",
+ Code: "BBM_114.DCE"
+ },
+ {
+ Name: "铁矿石主力",
+ Code: "IM_114.DCE"
+ },
+ {
+ Name: "鸡蛋主力",
+ Code: "JDM_114.DCE"
+ },
+
+ {
+ Name: "聚丙烯主力",
+ Code: "PPM_114.DCE"
+ },
+ {
+ Name: "玉米淀粉主力",
+ Code: "CSM_114.DCE"
+ },
+ {
+ Name: "乙二醇主力",
+ Code: "EGM_114.DCE"
+ },
+ {
+ Name: "粳米主力",
+ Code: "RRM_114.DCE"
+ },
+ {
+ Name: "苯乙烯主力",
+ Code: "EBM_114.DCE"
+ },
+ {
+ Name: "LPG主力",
+ Code: "PGM_114.DCE"
+ },
+ {
+ Name: "生猪主力",
+ Code: "LHM_114.DCE"
+ }
+ ]
+ },
+ {
+ Title: "郑州商品交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "强麦主力",
+ Code: "WHM_115.CZC"
+ },
+ {
+ Name: "普麦主力",
+ Code: "PMM_115.CZC"
+ },
+ {
+ Name: "一号棉花主力",
+ Code: "CFM_115.CZC"
+ },
+ {
+ Name: "白糖主力",
+ Code: "SRM_115.CZC"
+ },
+ {
+ Name: "PTA主力",
+ Code: "TAM_115.CZC"
+ },
+ {
+ Name: "菜油主力",
+ Code: "OIM_115.CZC"
+ },
+ {
+ Name: "早籼稻主力",
+ Code: "RIM_115.CZC"
+ },
+ {
+ Name: "甲醇主力",
+ Code: "MAM_115.CZC"
+ },
+ {
+ Name: "玻璃主力",
+ Code: "FGM_115.CZC"
+ },
+ {
+ Name: "菜籽主力",
+ Code: "RSM_115.CZC"
+ },
+ {
+ Name: "菜粕主力",
+ Code: "RMM_115.CZC"
+ },
+ {
+ Name: "粳稻主力",
+ Code: "JRM_115.CZC"
+ },
+ {
+ Name: "晚籼稻主力",
+ Code: "LRM_115.CZC"
+ },
+ {
+ Name: "硅铁主力",
+ Code: "SFM_115.CZC"
+ },
+ {
+ Name: "锰硅主力",
+ Code: "SMM_115.CZC"
+ },
+ {
+ Name: "动力煤主力",
+ Code: "ZCM_115.CZC"
+ },
+ {
+ Name: "棉纱主力",
+ Code: "CYM_115.CZC"
+ },
+ {
+ Name: "苹果主力",
+ Code: "APM_115.CZC"
+ },
+ {
+ Name: "红枣主力",
+ Code: "CJM_115.CZC"
+ },
+ {
+ Name: "尿素主力",
+ Code: "URM_115.CZC"
+ },
+ {
+ Name: "纯碱主力",
+ Code: "SAM_115.CZC"
+ },
+ {
+ Name: "短纤主力",
+ Code: "PFM_115.CZC"
+ },
+ {
+ Name: "花生主力",
+ Code: "PKM_115.CZC"
+ }
+ ]
+ },
+ {
+ Title: "中国金融期货交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "二债主力",
+ Code: "TS-130130_8.CFE"
+ },
+ {
+ Name: "五债主力",
+ Code: "TF-050130_8.CFE"
+ },
+ {
+ Name: "十债主力",
+ Code: "T-110130_8.CFE"
+ },
+ {
+ Name: "上证主力",
+ Code: "IH-070130_8.CFE"
+ },
+ {
+ Name: "中证主力",
+ Code: "IC-060130_8.CFE"
+ },
+ {
+ Name: "沪深主力",
+ Code: "IF-040130_8.CFE"
+ }
+ ]
+ },
+ {
+ Title: "芝加哥商业交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "小麦当月连续",
+ Code: "ZW00Y_103.CBOT"
+ },
+ {
+ Name: "迷你小麦当月连续",
+ Code: "XW00Y_103.CBOT"
+ },
+ {
+ Name: "玉米当月连续",
+ Code: "ZC00Y_103.CBOT"
+ },
+ {
+ Name: "迷你玉米当月连续",
+ Code: "XC00Y_103.CBOT"
+ },
+ {
+ Name: "大豆当月连续",
+ Code: "ZS00Y_103.CBOT"
+ },
+ {
+ Name: "迷你大豆当月连续",
+ Code: "XK00Y_103.CBOT"
+ },
+ {
+ Name: "豆油当月连续",
+ Code: "ZL00Y_103.CBOT"
+ },
+ {
+ Name: "豆粕当月连续",
+ Code: "ZM00Y_103.CBOT"
+ },
+ {
+ Name: "燕麦当月连续",
+ Code: "ZO00Y_103.CBOT"
+ },
+ {
+ Name: "稻谷当月连续",
+ Code: "ZR00Y_103.CBOT"
+ },
+
+ {
+ Name: "小型纳指当月连续",
+ Code: "NQ00Y_103.CBOT"
+ },
+ {
+ Name: "小型标普当月连续",
+ Code: "ES00Y_103.CBOT"
+ },
+ {
+ Name: "小型道指当月连续",
+ Code: "YM00Y_103.CBOT"
+ },
+
+ {
+ Name: "2年美国债当月连续",
+ Code: "TU00Y_103.CBOT"
+ },
+ {
+ Name: "5年美国债当月连续",
+ Code: "FV00Y_103.CBOT"
+ },
+ {
+ Name: "10年美国债当月连续",
+ Code: "TY00Y_103.CBOT"
+ },
+ {
+ Name: "30年美国债当月连续",
+ Code: "US00Y_103.CBOT"
+ },
+ {
+ Name: "超国债当月连续",
+ Code: "UL00Y_103.CBOT"
+ }
+ ]
+ },
+ {
+ Title: "纽约商品交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "NYMEX原油",
+ Code: "CL00Y_102.NYMEX"
+ },
+ {
+ Name: "NYMEX铂金",
+ Code: "PL00Y_102.NYMEX"
+ },
+ {
+ Name: "迷你原油",
+ Code: "QM00Y_102.NYMEX"
+ },
+ {
+ Name: "NYMEX燃油",
+ Code: "HO00Y_102.NYMEX"
+ },
+ {
+ Name: "NYMEX汽油",
+ Code: "RB00Y_102.NYMEX"
+ },
+ {
+ Name: "NYMEX钯金",
+ Code: "PA00Y_102.NYMEX"
+ },
+ {
+ Name: "热轧钢卷",
+ Code: "HR00Y_102.NYMEX"
+ },
+ {
+ Name: "天然气",
+ Code: "NG00Y_102.NYMEX"
+ }
+ ]
+ },
+ {
+ Title: "纽约商业期货交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "COMEX白银",
+ Code: "SI00Y_101.COMEX"
+ },
+ {
+ Name: "迷你白银",
+ Code: "QI00Y_101.COMEX"
+ },
+ {
+ Name: "微型黄金",
+ Code: "MGC00Y_101.COMEX"
+ },
+ {
+ Name: "迷你黄金",
+ Code: "QO00Y_101.COMEX"
+ },
+ {
+ Name: "COMEX黄金",
+ Code: "GC00Y_101.COMEX"
+ },
+ {
+ Name: "COMEX铜",
+ Code: "HG00Y_101.COMEX"
+ }
+ ]
+ },
+ {
+ Title: "纽约期货交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "棉花当月连续",
+ Code: "CT00Y_108.NYBOT"
+ }
+ ]
+ },
+ {
+ Title: "伦敦金属交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "综合镍03",
+ Code: "NI-LNKT_109.LME"
+ },
+ {
+ Name: "综合铜03",
+ Code: "CA-LCPT_109.LME"
+ },
+ {
+ Name: "综合铝03",
+ Code: "AH-LALT_109.LME"
+ },
+ {
+ Name: "综合锡03",
+ Code: "SN-LTNT_109.LME"
+ },
+ {
+ Name: "综合锌03",
+ Code: "ZS-LZNT_109.LME"
+ },
+ {
+ Name: "综合铅03",
+ Code: "PB-LLDT_109.LME"
+ }
+ ]
+ },
+ {
+ Title: "东京商品交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "日铂金当月连续",
+ Code: "JPL00Y_111.TOCOM"
+ },
+ {
+ Name: "日白银当月连续",
+ Code: "JAG00Y_111.TOCOM"
+ },
+ {
+ Name: "日原油当月连续",
+ Code: "JCO00Y_111.TOCOM"
+ },
+ {
+ Name: "日煤油当月连续",
+ Code: "JKE00Y_111.TOCOM"
+ },
+ {
+ Name: "日橡胶当月连续",
+ Code: "JRU00Y_111.TOCOM"
+ },
+ {
+ Name: "日黄金当月连续",
+ Code: "JAU00Y_111.TOCOM"
+ },
+ {
+ Name: "日汽油当月连续",
+ Code: "JGL00Y_111.TOCOM"
+ }
+ ]
+ },
+ {
+ Title: "美国洲际交易所",
+ Icon: "",
+ Sub: [
+ {
+ Name: "布伦特原油当月连续",
+ Code: "B00Y_112.IPE"
+ },
+ {
+ Name: "重柴油当月连续",
+ Code: "G00Y_112.IPE"
+ }
+ ]
+ }
+ ];
+
+ return data;
+};
+
+// k形图
+DefaultData.GetKLineOption = function() {
+ var option = {
+ Type: "历史K线图", // 创建图形类型
+ Language: "EN", // 英文 'EN' 简体中文:'CN' 繁体中文:"TC"
+ // 窗口指标
+ Windows: [
+ {
+ Index: "MA",
+ Modify: true,
+ Change: false,
+ height: 20
+ },
+ // { Index: 'MA', Modify: true, Modify: false, Change: false, height: 20 },
+ {
+ Index: "ATR",
+ Modify: false,
+ Change: false,
+ Close: false
+ }
+ // { Index: 'MACD', Modify: true, Change: true, Close: false }
+ ],
+ Symbol: "600015.sh",
+ IsAutoUpdate: true, // 是自动更新数据
+ AutoUpdateFrequency: 15000,
+ IsApiPeriod: true,
+ IsShowRightMenu: false, // 是否显示右键菜单
+ // CorssCursorTouchEnd:true,
+
+ KLine: {
+ DragMode: 1, // 拖拽模式 0 禁止拖拽 1 数据拖拽 2 区间选择
+ Right: 0, // 复权 0 不复权 1 前复权 2 后复权
+ Period: 0, // 周期 0 日线 1 周线 2 月线 3 年线
+ MaxReqeustDataCount: 1000, // 数据个数
+ PageSize: 60, // 一屏显示多少数据
+ KLineDoubleClick: false, // 双击分钟走势图
+ IsShowTooltip: true, // 是否显示K线提示信息
+ DrawType: 0,
+ RightSpaceCount: 2
+ },
+
+ CorssCursorInfo: {
+ Left: 0,
+ Right: 1
+ },
+
+ // 标题设置
+ KLineTitle: {
+ IsShowName: false, // 不显示股票名称
+ IsShowSettingInfo: false, // 不显示周期/复权
+ isShowDateTime: true
+ },
+
+ // 边框
+ Border: {
+ Left: 1, // 左边间距
+ Right: 1, // 右边间距
+ Top: 0,
+ Bottom: 15,
+ AutoRight: {
+ Blank: 10,
+ MinWidth: 40
+ }
+ },
+
+ // 子框架设置
+ Frame: [
+ {
+ SplitCount: 5,
+ IsShowLeftText: false,
+ IsShowYLine: false,
+ Custom: [
+ {
+ Type: 0,
+ Position: "right"
+ }
+ ]
+ },
+ {
+ SplitCount: 3,
+ IsShowLeftText: false
+ },
+ {
+ SplitCount: 3,
+ IsShowLeftText: false
+ }
+ ],
+
+ // 扩展图形
+ ExtendChart: [
+ // { Name:'KLineTooltip' }, //手机端tooltip
+ ]
+ };
+
+ return option;
+};
+
+DefaultData.GetMinuteDayMenu = function() {
+ var data = [
+ {
+ Name: "1D",
+ ID: 1
+ },
+ {
+ Name: "2D",
+ ID: 2
+ },
+ {
+ Name: "3D",
+ ID: 3
+ },
+ {
+ Name: "4D",
+ ID: 4
+ },
+ {
+ Name: "5D",
+ ID: 5
+ }
+ ];
+
+ return data;
+};
+
+DefaultData.GetKLinePeriodMenu = function() {
+ var data = [
+ // { Name: i18n.t('hj86'), ID: 3 },分时额外处理
+ // { Name: i18n.t("hj86"), ID: 4 },
+ {
+ Name: i18n.t("hj87"),
+ ID: 0
+ },
+ {
+ Name: i18n.t("hj88"),
+ ID: 1
+ },
+ {
+ Name: i18n.t("hj89"),
+ ID: 2
+ },
+ {
+ Name: i18n.t("hj90"),
+ ID: 4
+ },
+ {
+ Name: i18n.t("hj91"),
+ ID: 5
+ },
+ {
+ Name: i18n.t("hj92"),
+ ID: 7
+ }
+ ];
+
+ return data;
+};
+
+DefaultData.GetKLineRightMenu = function() {
+ var data = [
+ {
+ Name: i18n.t("hj93"),
+ ID: 0
+ },
+ {
+ Name: i18n.t("hj94"),
+ ID: 1
+ },
+ {
+ Name: i18n.t("hj95"),
+ ID: 2
+ }
+ ];
+
+ return data;
+};
+
+export default {
+ props: {
+ hktype: {
+ type: String,
+ default: ""
+ }
+ },
+ data() {
+ return {
+ key: 0,
+ active: 0,
+ MinuteDayMenu: DefaultData.GetMinuteDayMenu(),
+ MinuteDayIndex: 0,
+ KLinePeriodMenu: DefaultData.GetKLinePeriodMenu(),
+ KLinePeriodIndex: 0,
+ KLineRightMenu: DefaultData.GetKLineRightMenu(),
+ KLineRightIndex: 0,
+ IsShowRightMenu: true,
+ MinuteIndexMenu: DefaultData.GetMinuteIndexMenu(),
+ KLineIndexMenu: DefaultData.GetKLineIndexMenu(),
+
+ // Symbol:'000001_0.sh',
+ // 上海 1.sh 深圳0.sz 北京0.bj
+
+ Symbol: "", // HQChart内部编码美股加后缀.usa AAPL.usa
+
+ Chart: null, // 图形控件 分时图
+ KLineChart: null, // 图形控件 K线图
+ NavMenuAry: DefaultData.GetTestSymbolMenu(),
+
+ VolChartHeight: 10,
+ chartType: "kline",
+ timerss: null,
+ isShow: false,
+ xData: []
+ };
+ },
+
+ created() {
+ const { query } = this.$route;
+ if (query.if_zhishu === "0") {
+ this.Symbol = `${query.code}_${query.sok}.${query.type}`;
+ } else if (query.code.indexOf("hk") > -1 && query.if_zhishu !== 0) {
+ this.Symbol = `${query.if_zhishu}_${query.sok}.hk`;
+ } else {
+ this.Symbol = `${query.if_zhishu}_${query.sok}.${query.type}`;
+ }
+ // this.Symbol = 'BRK_A106.usa'
+
+ console.log("------?????", this.Symbol);
+ // 写入localStorage
+ localStorage.setItem("hqchart_symbol", this.Symbol);
+ },
+
+ mounted() {
+ this.offHeight = this.$refs["rightContent"].offsetHeight;
+ this.OnSize();
+ this.SetChartStyle();
+ // this.CreateMinuteChart();
+
+ // this.CreateKLineChart();
+ this.$nextTick(() => {
+ // this.timerss = setInterval(() => {
+ this.CreateMinuteChart();
+ this.CreateKLineChart();
+ // }, 3000);
+ // this.CreateMinuteChart();
+ // this.CreateKLineChart();
+ // this.timerss = setInterval(() => {
+ // // this.KLineChart = null
+ // // this.CreateMinuteChart();
+ // // this.CreateKLineChart();
+ // console.log(this.KLinePeriodMenu);
+ // //此处为了 让k线实时刷新
+ // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, 0, 'kline')
+ // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, this.KLinePeriodMenu[this.KLinePeriodIndex],
+ // 'kline')
+ // }, 3000);
+ });
+ let that = this;
+ window.onresize = _.debounce(this.OnSize, 200);
+ // 自适应K线图
+ var elementResizeDetectorMaker = require("element-resize-detector");
+
+ // 创建实例,无参数
+ var erd = elementResizeDetectorMaker(); // 使用默认选项(将使用基于对象的方法)。
+
+ // 创建实例带参数
+ // 使用基于超快速滚动的方法。
+ // 这是推荐的策略。
+ elementResizeDetectorMaker({
+ // var erdUltraFast = elementResizeDetectorMaker({
+ strategy: "scroll",
+ callOnAdd: true, // callOnAdd选项,用于确定在添加侦听器时是否应调用它们。默认为true。
+ // 如果为true,则确保在添加侦听器后将对其进行调用。如果为false,则在添加侦听器时将不保证其
+ // 被调用(不会阻止其被调用)
+ debug: true
+ });
+ // 监听class为staticNextMain的元素 大小变化
+ var self = this;
+ // 侦听元素的调整大小事件,并使用元素作为调整大小事件的参数来调用侦听器函数。传递给函数的选项将
+ // 覆盖实例选项
+ erd.listenTo(this.$refs["rightContent"], function(element) {
+ var width = element.offsetWidth;
+ var height = element.offsetHeight;
+ self.tableHeight = height - 10; // 将监听到的宽高进行赋值
+ self.tableWidth = width - 20;
+ that.offHeight = height;
+ that.OnSize();
+ });
+ },
+ beforeDestroy() {
+ clearInterval(this.timerss); // 在组件销毁前清除定时器
+ this.timerss = null;
+ },
+ methods: {
+ OnSize() {
+ var width = this.$refs.right.clientWidth;
+ // var rightTab = this.$refs.rightTab
+ // var periodWrap = this.$refs.minute_periodWrap
+ // var indexWrap = this.$refs.minute_indexWrap
+ // var statementWrap = this.$refs.minute_statementWrap
+ // // var chartHeight = window.innerHeight - rightTab.offsetHeight - periodWrap.offsetHeight - indexWrap.offsetHeight;
+ var chartHeight = this.offHeight;
+
+ var kline = this.$refs.kline;
+ kline.style.width = width + "px";
+ kline.style.height = chartHeight + "px";
+ var kline2 = this.$refs.kline2;
+ kline2.style.width = width + "px";
+ kline2.style.height = chartHeight + "px";
+
+ if (this.Chart) this.Chart.OnSize();
+ if (this.KLineChart) this.KLineChart.OnSize();
+ },
+
+ changeRightContent(type) {
+ this.KLinePeriodIndex = 0;
+ this.chartType = type;
+ this.$nextTick(() => {
+ this.OnSize();
+ });
+ },
+
+ SetChartStyle() {
+ EastMoney.HQData.SetMinuteChartCoordinate();
+ var blackStyle = HQChart.Chart.HQChartStyle.GetStyleConfig(
+ HQChart.Chart.STYLE_TYPE_ID.WHITE_ID
+ ); // 读取黑色风格配置
+
+ blackStyle.UpBarColor = "#449b54"; //上涨
+ blackStyle.DownBarColor = "#e13b45";
+ HQChart.Chart.JSChart.SetStyle(blackStyle);
+ },
+
+ CreateMinuteChart() {
+ // if (this.Chart) return;
+
+ var option = DefaultData.GetMinuteOption();
+ option.Symbol = this.Symbol;
+ option.NetworkFilter = (data, callback) => {
+ this.NetworkFilter(data, callback);
+ }; // 网络请求回调函数
+
+ var chart = HQChart.Chart.JSChart.Init(this.$refs.kline);
+ chart.SetOption(option);
+ this.Chart = chart;
+ },
+
+ CreateKLineChart() {
+ if (this.KLineChart) return;
+
+ var option = DefaultData.GetKLineOption();
+ option.Symbol = this.Symbol;
+
+ option.NetworkFilter = (data, callback) => {
+ this.NetworkFilter(data, callback);
+
+ // this.NetworkFilter(data, callback);
+ }; // 网络请求回调函数
+ var chart = HQChart.Chart.JSChart.Init(this.$refs.kline2);
+ HQChart.Chart.JSChart.GetResource().FrameLogo.Text = null;
+ chart.SetOption(option);
+ this.KLineChart = chart;
+ },
+
+ ChangeSymbol(
+ symbol // 切换股票
+ ) {
+ var symbolUpper = symbol.toUpperCase();
+ var isShowVolChart = EastMoney.HQData.IsShowVolChart(symbolUpper);
+ var frame = this.Chart.JSChartContainer.Frame.SubFrame[1];
+ if (isShowVolChart) {
+ if (frame.Height <= 0) frame.Height = this.VolChartHeight;
+ } else {
+ if (frame.Height > 0) this.VolChartHeight = frame.Height;
+ frame.Height = 0;
+ }
+ var period = this.KLineChart.JSChartContainer.Period;
+ var isShowRightMenu = EastMoney.HQData.IsEnableRight(period, symbol); // 是否显示复权菜单
+ this.IsShowRightMenu = isShowRightMenu;
+
+ this.Symbol = symbol;
+ this.Chart.ChangeSymbol(this.Symbol);
+ this.KLineChart.ChangeSymbol(this.Symbol);
+ },
+
+ OnClickMinuteDayMenu(
+ index,
+ item // 分时图天数
+ ) {
+ this.MinuteDayIndex = index;
+ this.Chart.ChangeDayCount(item.ID);
+ },
+
+ OnClickKLinePeriodMenu(
+ index,
+ item,
+ type // K线周期
+ ) {
+ console.log("1");
+ //分时额外处理才注释的
+ this.chartType = type;
+ this.KLinePeriodIndex = index;
+ this.KLineChart.ChangePeriod(item.ID);
+ },
+
+ OnClickKLineRightMenu(
+ index,
+ item // K线复权
+ ) {
+ this.KLineRightIndex = index;
+ this.KLineChart.ChangeRight(item.ID);
+ },
+
+ ChangeMinuteIndex(
+ item // 切换分时图指标
+ ) {
+ if (this.Chart) this.Chart.ChangeIndex(item.WindowIndex, item.ID);
+ },
+
+ ChangeKLineIndex(
+ item // 切换K线图指标
+ ) {
+ if (this.KLineChart) {
+ this.KLineChart.ChangeIndex(item.WindowIndex, item.ID);
+ }
+ },
+
+ NetworkFilter(
+ data,
+ callback // 第3方数据替换接口
+ ) {
+ EastMoney.HQData.Log("[HQChartDemo::NetworkFilter] data", data);
+ if (this.timerss) {
+ clearInterval(this.timerss);
+ this.timerss = null;
+ }
+ this.timerss = setInterval(() => {
+ switch (data.Name) {
+ // 分时图数据对接
+ case "MinuteChartContainer::RequestMinuteData":
+ EastMoney.HQData.NetworkFilter(data, callback);
+ break;
+ case "MinuteChartContainer::RequestHistoryMinuteData":
+ EastMoney.HQData.NetworkFilter(data, callback);
+ break;
+
+ case "KLineChartContainer::RequestHistoryData": // 日线全量数据下载
+ EastMoney.HQData.NetworkFilter(data, callback);
+ break;
+ case "KLineChartContainer::RequestRealtimeData": // 日线实时数据更新
+ EastMoney.HQData.NetworkFilter(data, callback);
+ break;
+ case "KLineChartContainer::RequestFlowCapitalData": // 流通股本
+ EastMoney.HQData.NetworkFilter(data, callback);
+ break;
+ case "KLineChartContainer::ReqeustHistoryMinuteData": // 分钟全量数据下载
+ EastMoney.HQData.NetworkFilter(data, callback);
+ break;
+ case "KLineChartContainer::RequestMinuteRealtimeData": // 分钟增量数据更新
+ EastMoney.HQData.NetworkFilter(data, callback);
+ break;
+ }
+ }, 2000);
+ },
+
+ handleSelect(key, keyPath) {
+ console.log(key, keyPath);
+ this.ChangeSymbol(keyPath[1]);
+ },
+
+ handleOpen(key, keyPath) {
+ console.log(key, keyPath);
+ },
+
+ handleClose(key, keyPath) {
+ console.log(key, keyPath);
+ }
+ }
+};
</script>
<style lang="less">
- @animation-duration: 0.3s;
+@animation-duration: 0.3s;
- .box {
+.box {
+ width: 100%;
+ height: 100%;
+ // display: flex;
+ position: relative;
+ overflow: hidden;
+ background: none;
+
+ .left,
+ .right {
+ // position: absolute;
+ top: 0;
+ }
+
+ .left {
+ width: 240px;
+ height: 100%;
+ box-sizing: border-box;
+ left: 0;
+ // padding-top: 17px;
+ overflow-x: auto;
+
+ .el-menu {
+ min-height: 100%;
+
+ .el-submenu__title:hover {
+ background-color: #363636 !important;
+ }
+
+ .el-menu-item:hover {
+ background-color: #363636 !important;
+ }
+ }
+ }
+
+ .right {
+ left: 240px;
+ // width: calc(100% - 240px);
width: 100%;
height: 100%;
- // display: flex;
- position: relative;
- overflow: hidden;
- background: none;
+ @rightTabHeight: 40px;
+ display: flex;
+ flex-direction: column;
- .left,
- .right {
- // position: absolute;
- top: 0;
- }
-
- .left {
- width: 240px;
- height: 100%;
+ .rightTab {
+ height: @rightTabHeight;
+ width: 100%;
+ background: #191919;
+ border-bottom: 1px solid #000;
box-sizing: border-box;
- left: 0;
- // padding-top: 17px;
- overflow-x: auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ // flex-direction: column;
- .el-menu {
- min-height: 100%;
+ > .btn {
+ cursor: pointer;
+ width: 100%;
+ text-align: center;
+ color: #000;
- .el-submenu__title:hover {
- background-color: #363636 !important;
+ &:first-child {
+ padding-right: 60px;
+ text-align: right;
}
- .el-menu-item:hover {
- background-color: #363636 !important;
+ &:last-child {
+ padding-left: 60px;
+ text-align: left;
+ }
+
+ &:hover,
+ &.active {
+ color: #c4d600;
}
}
}
- .right {
- left: 240px;
- // width: calc(100% - 240px);
+ .rightContent {
+ // height: calc(100% - @rightTabHeight);
+ height: calc(100% - @rightTabHeight);
width: 100%;
- height: 100%;
- @rightTabHeight: 40px;
- display: flex;
- flex-direction: column;
- .rightTab {
- height: @rightTabHeight;
- width: 100%;
- background: #191919;
- border-bottom: 1px solid #000;
- box-sizing: border-box;
+ .kline_periodWrap {
display: flex;
+ justify-content: space-between;
+ background: #191919;
+
+ .btnGroup:first-child {
+ width: 60%;
+ }
+
+ .btnGroup:last-child {
+ width: 100%;
+ }
+ }
+ }
+
+ .btnGroup {
+ // border: 1px solid #242424;
+ color: #000;
+ display: flex;
+ background: #fff;
+
+ .btn {
+ margin: 0 0.1rem;
align-items: center;
justify-content: center;
- // flex-direction: column;
-
- >.btn {
- cursor: pointer;
- width: 100%;
- text-align: center;
- color: #000;
-
- &:first-child {
- padding-right: 60px;
- text-align: right;
- }
-
- &:last-child {
- padding-left: 60px;
- text-align: left;
- }
-
- &:hover,
- &.active {
- color: rgb(2, 99, 226);
- }
- }
- }
-
- .rightContent {
- // height: calc(100% - @rightTabHeight);
- height: calc(100% - @rightTabHeight);
- width: 100%;
-
- .kline_periodWrap {
- display: flex;
- justify-content: space-between;
- background: #191919;
-
- .btnGroup:first-child {
- width: 60%;
- }
-
- .btnGroup:last-child {
- width: 100%;
- }
- }
- }
-
- .btnGroup {
- // border: 1px solid #242424;
+ // border-right: 1px solid #242424;
color: #000;
- display: flex;
- background: #fff;
+ cursor: pointer;
- .btn {
- margin: 0 0.1rem;
- align-items: center;
- justify-content: center;
- // border-right: 1px solid #242424;
- color: #000;
- cursor: pointer;
-
- &:last-child {
- border-right: none;
- }
- }
-
- .active {
- color: rgb(2, 99, 226);
- font-weight: 800;
- background: rgb(245, 245, 245);
+ &:last-child {
+ border-right: none;
}
}
- // .el-button-group{
- // width: 100%;
- // display: flex;
-
- // .el-button{
- // flex: 1;
- // }
- // }
-
- #hqchart_minute {
- // height: 100%;
- background-color: #fff;
- height: 5rem;
- position: relative;
- }
-
- #hqchart_kline {
- // height: 100% !important;
- background-color: #fff;
- height: 5rem;
- position: relative;
- }
-
- .statementWrap {
- background: #191919;
- padding: 10px;
- font-size: 12px;
- color: #de432d;
- line-height: 20px;
- text-align: center;
+ .active {
+ color: #c4d600;
+ font-weight: 800;
+ background: rgb(245, 245, 245);
}
}
- }
- // .schart-drawing {
- // height: 100% !important;
- // }
- .periodWrap {
- height: 0.7rem;
- // margin: 0.01rem 0 0.13rem 0;
- display: flex;
- align-items: center;
- justify-content: center;
- background: #fff !important;
- }
+ // .el-button-group{
+ // width: 100%;
+ // display: flex;
- .btnGroup {
- height: 100%;
+ // .el-button{
+ // flex: 1;
+ // }
+ // }
- .bt2 {
- height: 100% !important;
- box-shadow: none !important;
+ #hqchart_minute {
+ // height: 100%;
+ background-color: #fff;
+ height: 5rem;
+ position: relative;
+ }
- img {
- width: 0.5rem; //dengwo xia
- height: 0.5rem;
- }
+ #hqchart_kline {
+ // height: 100% !important;
+ background-color: #fff;
+ height: 5rem;
+ position: relative;
+ }
+
+ .statementWrap {
+ background: #191919;
+ padding: 10px;
+ font-size: 12px;
+ color: #de432d;
+ line-height: 20px;
+ text-align: center;
}
}
+}
- .btn2 {
- width: 9.4%;
- display: flex;
- margin: 0 0.15rem;
- justify-content: center;
- align-items: center;
- border-radius: 0.15rem;
+// .schart-drawing {
+// height: 100% !important;
+// }
+.periodWrap {
+ height: 0.7rem;
+ // margin: 0.01rem 0 0.13rem 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #fff !important;
+}
+
+.btnGroup {
+ height: 100%;
+
+ .bt2 {
+ height: 100% !important;
+ box-shadow: none !important;
img {
- width: 0.5rem;
+ width: 0.5rem; //dengwo xia
height: 0.5rem;
}
+ }
+}
- .active {
- color: rgb(2, 99, 226);
- font-weight: 800;
- background: rgb(245, 245, 245);
- }
+.btn2 {
+ width: 9.4%;
+ display: flex;
+ margin: 0 0.15rem;
+ justify-content: center;
+ align-items: center;
+ border-radius: 0.15rem;
+
+ img {
+ width: 0.5rem;
+ height: 0.5rem;
}
- canvas {
- height: 100% !important;
+ .active {
+ color: #c4d600;
+ font-weight: 800;
+ background: rgb(245, 245, 245);
}
+}
- .hqchart {
- width: 100%;
- height: 100vh;
- }
+canvas {
+ height: 100% !important;
+}
+
+.hqchart {
+ width: 100%;
+ height: 100vh;
+}
</style>
diff --git a/src/page/kline/index.vue b/src/page/kline/index.vue
index 1d0ecc9..8c46cb3 100644
--- a/src/page/kline/index.vue
+++ b/src/page/kline/index.vue
@@ -44,7 +44,7 @@
(
Number($store.state.userInfo.userIndexAmt) / 0.9
).toFixed(2)
- : "₹" + $store.state.userInfo.userIndexAmt
+ : "MX$" + $store.state.userInfo.userIndexAmt
}}
</span>
<span
@@ -55,7 +55,7 @@
style="white-space: nowarp"
>
{{
- "₹ " +
+ "MX$ " +
parseFloat(
$store.state.userInfo.enableAmt.toFixed(2)
).toLocaleString()
@@ -82,7 +82,7 @@
}}</span> -->
<span
:class="singDetails.hcrate > 0 ? 'price green' : 'price red'"
- >₹{{ singDetails.nowPrice }}</span
+ >MX${{ singDetails.nowPrice }}</span
>
</div>
<div class="bottom_now">
@@ -92,7 +92,7 @@
? '+' : ''
}}{{ (singDetails.nowPrice - singDetails.preclose_px).toFixed(2) }}</span> -->
<span v-else>
- ₹{{
+ MX${{
(singDetails.nowPrice - singDetails.preclose_px).toFixed(2)
}}</span
>
@@ -121,7 +121,7 @@
:class="
singDetails.hcrate > 0 ? 'number green' : 'number red'
"
- >₹{{ singDetails.open_px }}</span
+ >MX${{ singDetails.open_px }}</span
>
</div>
<div class="rights topes">
@@ -133,7 +133,7 @@
:class="
singDetails.hcrate > 0 ? 'number green' : 'number red'
"
- >₹{{ singDetails.today_max }}</span
+ >MX${{ singDetails.today_max }}</span
>
</div>
</div>
@@ -147,7 +147,7 @@
:class="
singDetails.hcrate > 0 ? 'number green' : 'number red'
"
- >₹{{ singDetails.preclose_px }}</span
+ >MX${{ singDetails.preclose_px }}</span
>
</div>
<div class="rights bots">
@@ -159,7 +159,7 @@
:class="
singDetails.hcrate > 0 ? 'number green' : 'number red'
"
- >₹{{ singDetails.today_min }}</span
+ >MX${{ singDetails.today_min }}</span
>
</div>
</div>
@@ -433,7 +433,7 @@
<span>{{ $t("hj84") }}</span>
</div>
<div class="bottom_buy">
- <span>₹{{ singDetails.nowPrice }}</span>
+ <span>MX${{ singDetails.nowPrice }}</span>
</div>
</div>
<div class="sell_btn" @click="goBuy(1)">
@@ -441,7 +441,7 @@
<span>{{ $t("hj85") }}</span>
</div>
<div class="bottom_sell">
- <span>₹{{ singDetails.nowPrice }}</span>
+ <span>MX${{ singDetails.nowPrice }}</span>
</div>
</div>
</div>
diff --git a/src/page/kline/kIndex.vue b/src/page/kline/kIndex.vue
new file mode 100644
index 0000000..3fc9ab7
--- /dev/null
+++ b/src/page/kline/kIndex.vue
@@ -0,0 +1,1090 @@
+<template>
+ <div class="kline_detail_page">
+ <div class="content">
+ <div class="detail_title">
+ <div class="ti_cont">
+ <div class="top_back">
+ <div class="left_back" @click="handleBackaa()">
+ <img src="../../assets/img/zuojiantou.png" alt />
+ </div>
+ <div class="right_title">
+ <div class="t_t" style="white-space: nowrap">
+ <span>{{ singDetails.name }}({{ singDetails.gid }})</span>
+ </div>
+ <div class="b_t">
+ <span>{{ singDetails.spell }}</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="real_time_detail">
+ <div class="left_now_price">
+ <div class="top_now">
+ <span
+ :class="singDetails.hcrate > 0 ? 'price green' : 'price red'"
+ >MX$ {{ singDetails.nowPrice }}</span
+ >
+ </div>
+ <div class="bottom_now">
+ <div>
+ <span v-if="singDetails.nowPrice === 0">-</span>
+ <span v-else>
+ MX$
+ {{
+ (singDetails.nowPrice - singDetails.preclose_px).toFixed(2)
+ }}</span
+ >
+ </div>
+ <div
+ class="tew"
+ :class="singDetails.hcrate > 0 ? 'number green' : 'number red'"
+ >
+ <span v-if="singDetails.nowPrice === 0">-</span>
+ <span v-else>
+ ({{ singDetails.hcrate ? singDetails.hcrate : "0" }}%)</span
+ >
+ </div>
+ </div>
+ </div>
+ <div class="right_ets">
+ <div class="tops">
+ <div class="lefts topes">
+ <span class="titles">{{ $t("hj72") }}</span>
+ <span
+ :class="
+ singDetails.hcrate > 0 ? 'number green' : 'number red'
+ "
+ >MX$ {{ singDetails.open_px }}</span
+ >
+ </div>
+ <div class="rights topes">
+ <span class="titles">{{ $t("hj73") }}</span>
+ <span
+ :class="
+ singDetails.hcrate > 0 ? 'number green' : 'number red'
+ "
+ >MX$ {{ singDetails.today_max }}</span
+ >
+ </div>
+ </div>
+ <div class="bottoms">
+ <div class="lefts bots">
+ <span class="titles">{{ $t("hj74") }}</span>
+ <span
+ :class="
+ singDetails.hcrate > 0 ? 'number green' : 'number red'
+ "
+ >MX$ {{ singDetails.preclose_px }}</span
+ >
+ </div>
+ <div class="rights bots">
+ <span class="titles">{{ $t("hj75") }}</span>
+ <span
+ :class="
+ singDetails.hcrate > 0 ? 'number green' : 'number red'
+ "
+ >MX$ {{ singDetails.today_min }}</span
+ >
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="k_line_detail">
+ <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
+ "
+ >
+ <div class="t_title">
+ <span>{{ $t("hj76") }}</span>
+ </div>
+ <div class="charts">
+ <div class="left_s">
+ <div class="t_ma">
+ <span>{{ $t("hj77") }}</span>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.sell1 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.sell1_num }}</span>
+ </div>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.sell2 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.sell2_num }}</span>
+ </div>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.sell3 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.sell3_num }}</span>
+ </div>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.sell4 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.sell4_num }}</span>
+ </div>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.sell5 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.sell5_num }}</span>
+ </div>
+ </div>
+ </div>
+ <div class="right_h">
+ <div class="t_ma">
+ <span>{{ $t("hj78") }}</span>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.buy1 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.buy1_num }}</span>
+ </div>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.buy2 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.buy2_num }}</span>
+ </div>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.buy3 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.buy3_num }}</span>
+ </div>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.buy4 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.buy4_num }}</span>
+ </div>
+ </div>
+ <div class="ets">
+ <div class="left_sell1">
+ <span>{{ singDetails.buy5 }}</span>
+ </div>
+ <div class="right_sell1">
+ <span>{{ singDetails.buy5_num }}</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="priect_top_bottom" v-if="kLineDetails.if_us == 1">
+ <div class="t_title">
+ <span>{{ $t("hj79") }}</span>
+ </div>
+ <div class="charts">
+ <div class="left_s">
+ <div class="t_ma">
+ <span>{{ $t("hj80") }}</span>
+ </div>
+ <div
+ class="ets"
+ v-for="(item, i) in timedata.data.details"
+ :key="i"
+ >
+ <div class="left_sell1">
+ <span>{{ item.split(",")[0] }}</span>
+ </div>
+ <div class="right_sell1"></div>
+ </div>
+ </div>
+ <div class="right_h">
+ <div class="t_ma">
+ <span>{{ $t("hj81") }}</span>
+ </div>
+ <div
+ class="ets"
+ v-for="(item, i) in timedata.data.details"
+ :key="i"
+ >
+ <div class="left_sell1">
+ <span>{{ item.split(",")[1] }}</span>
+ </div>
+ <div class="right_sell1"></div>
+ </div>
+ </div>
+ <div class="right_h">
+ <div class="t_ma">
+ <span>{{ $t("hj82") }}</span>
+ </div>
+ <div
+ class="ets"
+ v-for="(item, i) in timedata.data.details"
+ :key="i"
+ >
+ <div class="left_sell1">
+ <span>{{ item.split(",")[2] }}</span>
+ </div>
+ <div class="right_sell1"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="recommendation">
+ <div class="division"></div>
+ <div class="recommendation_title">{{ $t("相关股票") }}</div>
+ <stock-list :propOption="propOption"></stock-list>
+ </div>
+ </div>
+</template>
+
+<script>
+import Kline from "./components/kLine.vue";
+import stockList from "@/components/stock-list.vue";
+import * as api from "@/axios/api";
+import { Toast } from "vant";
+
+export default {
+ name: "kline",
+ data() {
+ return {
+ news: "tab_2",
+ kLineDetails: {}, // K线图详情数据
+ singDetails: {},
+ scFlag: false,
+ acseFlag: false,
+ jianjie: "",
+ optionBtn: false,
+ isOptionOpt: false,
+ dialogFlag: false,
+ timedata: [],
+ newsdetailList: [],
+ bayType: "",
+ timer: null,
+ key: 0
+ };
+ },
+ components: {
+ Kline,
+ stockList
+ },
+ computed: {
+ propOption() {
+ // 传递给列表组件的类型值
+ return { stockType: this.$route.query.type };
+ }
+ },
+ created() {
+ const { query } = this.$route;
+ this.kLineDetails = query;
+ if (query.if_us === "1") {
+ this.getSingDetailUs();
+ } else {
+ this.timer = setInterval(() => {
+ this.getSingDetails();
+ }, 2000);
+ }
+ this.getOpation();
+ // this.$Lazyload();
+ this.getUserInfo();
+ this.getNohknews();
+ },
+ beforeDestroy() {
+ this.clearInterval(this.timer); // 在组件销毁前清除定时器
+ },
+ // beforeDestroy() {
+ // this.Klinetype = false;
+ // window.clearInterval()
+ // },
+ methods: {
+ async getHknews() {
+ await api.queryIndexNews().then(res => {
+ if (res.status === 0) {
+ this.newsdetailList = res.data.data;
+ }
+ });
+ },
+ async getNohknews() {
+ let data = await api.queryNewsList(4);
+ this.newsdetailList = data.data.list;
+ },
+ async option() {
+ if (this.optionBtn) {
+ return;
+ }
+ this.optionBtn = true;
+ if (this.isOptionOpt) {
+ let data = await api.delOption({ code: this.kLineDetails.code });
+ if (data.status === 0) {
+ this.getOpation();
+ this.optionBtn = false;
+ this.$message({
+ message: this.$t("hj97"),
+ type: "success"
+ });
+ } else {
+ this.optionBtn = false;
+ this.$message({
+ message: data.msg,
+ type: "warning"
+ });
+ }
+ } else {
+ let data = await api.addOption({ code: this.kLineDetails.code });
+ if (data.status === 0) {
+ this.getOpation();
+ this.optionBtn = false;
+ this.$message({
+ message: this.$t("hj96"),
+ type: "success"
+ });
+ } else {
+ this.$message({
+ message: data.msg,
+ type: "warning"
+ });
+ this.optionBtn = false;
+ }
+ }
+ if (navigator.vibrate) {
+ // 支持
+ navigator.vibrate([55]);
+ }
+ },
+ 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 = {
+ code: this.$route.query.code
+ };
+ let data = await api.isOption(opts);
+ if (data.status === 0) {
+ // 0 --> 未添加
+ this.isOptionOpt = false;
+ } else {
+ this.isOptionOpt = true;
+ }
+ },
+ async getSingDetails() {
+ let opts = {
+ code: this.kLineDetails.code,
+ stockType: this.kLineDetails.type
+ };
+ await api.getSingleStock(opts).then(res => {
+ if (res.status === 0) {
+ this.singDetails = res.data.stock;
+ this.bayType = res.data.stock.type;
+
+ if (res.data.introduction) {
+ this.jianjie = res.data.introduction;
+ } else {
+ this.jianjie = res.data.indexintroduction;
+ }
+ const obj = {
+ pid: res.data.stock.code,
+ type: res.data.stock.type
+ };
+ window.localStorage.setItem("kLine", JSON.stringify(obj));
+ // console.log(this.singDetails)
+ // if (this.kLineDetails.if_zhishu !== '0' && this.singDetails.gid.indexOf('hk') > -1) {
+ // this.getHknews()
+ // } else {
+ // this.getNohknews()
+ // }
+ // this.timer = setTimeout(() => {
+ // this.getSingDetails(); // 再次调用自身,形成递归效果
+ // }, 500);
+ }
+ });
+ },
+ async getSingDetailUs() {
+ let opts = {
+ code: this.kLineDetails.code,
+ stockType: this.kLineDetails.type
+ };
+ await api.getUsDetail(opts).then(res => {
+ // console.log(res,1111123);
+ // var that = this
+ // if(!res){
+ // setTimeout(() => {
+ // that.getSingDetailUs()
+ // }, 3000);
+
+ // }
+ if (res.status === 0) {
+ this.singDetails = res.data.stock;
+ this.timedata = res.data.timedata;
+ if (res.data.introduction) {
+ this.jianjie = res.data.introduction;
+ } else {
+ this.jianjie = res.data.indexintroduction;
+ }
+ this.getNohknews();
+ console.log(this.singDetails);
+ }
+ });
+ },
+ handleJj() {
+ this.acseFlag = true;
+ setTimeout(() => {
+ this.acseFlag = false;
+ }, 1000);
+ if (navigator.vibrate) {
+ // 支持
+ navigator.vibrate([55]);
+ }
+ },
+ handleBackaa() {
+ clearInterval(this.timer);
+ window.localStorage.removeItem("kLine");
+ this.$router.go(-1);
+ },
+ handleSc() {
+ this.scFlag = !this.scFlag;
+ },
+ godetail(item) {
+ this.$router.push({
+ path: "/newPage",
+ query: {
+ listid: item.id
+ }
+ });
+ },
+ goBuy(index) {
+ clearInterval(this.timer);
+ this.$router.push({
+ path: "/TradingBuy",
+ query: {
+ t: index,
+ code: this.kLineDetails.code,
+ m: this.singDetails.nowPrice,
+ type: this.kLineDetails.if_zhishu,
+ id: this.singDetails.id,
+ name: this.kLineDetails.name,
+ 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) {
+ // if (name.length > 15) {
+ // return name.substring(0, 14)
+ // } else {
+ return spell;
+ // }
+ },
+ gettime(time) {
+ if (!time) {
+ return "";
+ }
+ var nd = new Date(time);
+ var y = nd.getFullYear();
+ var mm = nd.getMonth() + 1;
+ var d = nd.getDate();
+ var h = nd.getHours();
+ var m = nd.getMinutes();
+ var c = nd.getSeconds();
+ if (mm < 10) {
+ mm = "0" + mm;
+ }
+ if (d < 10) {
+ d = "0" + d;
+ }
+ if (h < 10) {
+ h = "0" + h;
+ }
+ if (m < 10) {
+ m = "0" + m;
+ }
+ if (c < 10) {
+ c = "0" + c;
+ }
+ // 17:35:2922-06-2022
+ return d + "/" + mm + "/" + y + " " + h + ":" + m + ":" + c; //日月年时分秒
+ // return y + '-' + mm + '-' + d + ' ' + h + ':' + m + ':' + c
+ },
+ utc2beijing(utcDatetime) {
+ // 转为正常的时间格式 年-月-日 时:分:秒
+ var tPos = utcDatetime.indexOf("T");
+ // var Z_pos = utcDatetime.indexOf('Z')
+ var yearMonthDay = utcDatetime.substr(0, tPos);
+ var hourMinuteSecond = utcDatetime.substr(tPos + 1, tPos - tPos - 1);
+ var newDatetime = yearMonthDay + " " + hourMinuteSecond; // 2017-03-31 08:02:06
+
+ // 处理成为时间戳
+ var timestamp = new Date(Date.parse(newDatetime));
+ timestamp = timestamp.getTime();
+ timestamp = timestamp / 1000;
+
+ // 增加8个小时,北京时间比utc时间多八个时区
+ var timestamp2 = timestamp + 8 * 60 * 60;
+
+ // 时间戳转为时间
+ var beijingDatetime = new Date(parseInt(timestamp2) * 1000)
+ .toLocaleString()
+ .replace(/年|月/g, "-")
+ .replace(/日/g, " ");
+ return beijingDatetime; // 2017-03-31 16:02:06
+ }
+ }
+};
+</script>
+
+<style scoped lang="less">
+.news-tab {
+ width: 100%;
+ position: relative;
+ left: 0;
+ right: 0;
+ margin: auto;
+ margin-top: 0.2rem;
+ border-radius: 0.4rem 0.4rem 0 0;
+ padding-top: 0.3rem;
+
+ .t_title {
+ width: 100%;
+ font-size: 0.4546rem;
+ margin-top: 0.2rem;
+ padding: 0 0.3rem;
+
+ span {
+ font-weight: 700;
+ }
+ }
+
+ /deep/.is-selected .tab-name {
+ position: relative;
+ }
+
+ /deep/.mint-navbar .mint-tab-item.is-selected {
+ border: 0 !important;
+ border-bottom: none;
+ }
+
+ /deep/.is-selected .tab-name:after {
+ position: absolute;
+ display: block;
+ content: "";
+ height: 0.07rem;
+ background-color: #1381a4;
+ width: 100%;
+ left: 0;
+ bottom: -0.25rem;
+ }
+}
+
+.news-content {
+ position: relative;
+ padding: 0.3rem;
+}
+
+.item-out {
+ position: relative;
+ border-left: 0.01rem solid rgba(192, 192, 192, 0.8);
+ padding: 0 0.25rem 1rem 0.25rem;
+}
+
+.item-out::before {
+ content: "●";
+ position: absolute;
+ top: -0.1rem;
+ left: -0.128rem;
+ margin: auto;
+}
+
+.item-times {
+ color: #999;
+ margin-bottom: 0.15rem;
+}
+
+.titContent {
+ position: relative;
+ width: 100%;
+ font-size: 0.35rem;
+ line-height: 0.46rem;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -webkit-line-clamp: 2;
+ display: -webkit-box;
+}
+
+.ti_cont {
+ width: 100%;
+ display: flex;
+}
+
+.kline_detail_page {
+ width: 100%;
+ // height: calc(100% - 1.7rem);
+ overflow: auto;
+
+ > .content {
+ width: 100%;
+ height: 100%;
+ position: relative;
+ }
+}
+
+.recommendation {
+ width: 100%;
+ font-size: 10vw;
+ .division {
+ height: 0.25em;
+ width: 100%;
+ background-color: #f0f0f0;
+ }
+
+ .recommendation_title {
+ font-size: 0.5em;
+ padding: 0.5em 0.5em 0;
+ }
+}
+
+.sss {
+ width: 50%;
+ height: 1.2rem;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+}
+
+.detail_title {
+ width: 100%;
+ // height: 3.2rem;
+ padding: 0 0.3rem;
+ background: #fff;
+
+ .top_back {
+ width: 50%;
+ height: 1.2rem;
+ display: flex;
+ align-items: center;
+
+ .left_back {
+ width: 0.8rem;
+ height: 80%;
+ display: flex;
+ align-items: center;
+
+ > img {
+ margin-top: 0.2rem;
+ width: 0.6rem;
+ height: 0.6rem;
+ }
+ }
+
+ .right_title {
+ width: 3rem;
+ height: 80%;
+
+ .t_t {
+ width: 100%;
+ height: 70%;
+ display: flex;
+ align-items: center;
+ font-size: 0.4615rem;
+
+ span {
+ font-weight: 600;
+ }
+ }
+
+ .b_t {
+ width: 100%;
+ height: 30%;
+ font-size: 0.3615rem;
+ display: flex;
+ align-items: flex-start;
+ color: #8c8c8c;
+ }
+ }
+ }
+}
+
+.k_line_detail {
+ width: 100%;
+ height: calc(100vh - 300px);
+ background: #fff;
+ border-radius: 0 0 0.3rem 0.3rem;
+}
+
+.real_time_detail {
+ width: 100%;
+ // height: 2rem;
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ align-items: center;
+ padding: 0.3rem 0;
+
+ .left_now_price {
+ // width: 35%;
+ height: 100%;
+
+ .top_now {
+ width: 100%;
+ // height: 65%;
+ font-size: 25px;
+ display: flex;
+ align-items: center;
+ font-weight: bold;
+ span {
+ font-weight: 500;
+ }
+ }
+
+ .bottom_now {
+ width: 100%;
+ // height: 35%;
+ display: flex;
+ padding-left: 0.1rem;
+ padding-top: 0.1rem;
+ }
+
+ .tew {
+ margin-left: 0.2rem;
+ }
+ }
+
+ .right_ets {
+ max-width: 70%;
+ height: 100%;
+
+ > div {
+ width: 100%;
+ padding: 0.15rem 0;
+ display: flex;
+ align-items: center;
+
+ > div {
+ // width: 50%;
+ height: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 0.1rem;
+ .titles {
+ padding-right: 0.1rem;
+ }
+ }
+ }
+ }
+}
+
+.topes {
+ span {
+ display: inline-block;
+ // padding-top: 0.6rem;
+ }
+}
+
+.bots {
+ span {
+ display: inline-block;
+ // padding-top: 0.2rem;
+ }
+}
+
+.titles {
+ color: rgb(159, 159, 159);
+}
+
+.border_bottom {
+ width: 100%;
+ height: 0.05rem;
+ border-bottom: 0.02rem solid rgb(235, 235, 235);
+ position: absolute;
+ top: 3rem;
+}
+
+.priect_top_bottom {
+ width: 100%;
+ background: #fff;
+ padding: 0.3rem 0.3rem;
+ margin-top: 0.2rem;
+ border-radius: 0.3rem 0.3rem 0 0;
+
+ .t_title {
+ width: 100%;
+ height: 15%;
+ font-size: 0.4546rem;
+ margin-top: 0.2rem;
+
+ span {
+ font-weight: 800;
+ }
+ }
+
+ .charts {
+ width: 100%;
+ height: 85%;
+ display: flex;
+ justify-content: space-between;
+ margin-top: 0.6rem;
+
+ > div {
+ width: 49%;
+ height: 100%;
+ }
+
+ .t_ma {
+ width: 100%;
+ height: 0.3rem;
+ color: rgb(0, 0, 0);
+ display: flex;
+ font-size: 0.3046rem;
+ }
+ }
+}
+
+.ets {
+ width: 100%;
+ height: 0.5rem;
+ display: flex;
+ margin-top: 0.08rem;
+
+ > div {
+ width: 50%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ }
+
+ .right_sell1 {
+ justify-content: flex-end;
+ }
+
+ span {
+ font-weight: 600;
+ }
+}
+
+.left_s {
+ color: #028f52;
+}
+
+.right_h {
+ color: #d50000;
+}
+
+.ob_detail {
+ width: 100%;
+ height: 10rem;
+ background: #fff;
+ margin-bottom: 1.2821rem;
+ margin-top: 0.3rem;
+
+ .ob_content {
+ width: 100%;
+ height: 100%;
+ padding: 0 0.3rem;
+
+ .ob_title {
+ width: 100%;
+ height: 1rem;
+ display: flex;
+ align-items: center;
+ font-size: 0.5128rem;
+ }
+
+ .details {
+ width: 100%;
+ height: 1rem;
+ display: flex;
+ font-size: 0.3846rem;
+
+ .left_details {
+ width: 40%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ }
+
+ .right_details {
+ width: 60%;
+ height: 100%;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ }
+ }
+ }
+}
+
+.jianjie {
+ width: 100%;
+ // height: 5rem;
+ background: rgb(255, 255, 255);
+ margin-top: 0.2rem;
+ border-radius: 0.3rem;
+ margin-bottom: 0.3rem;
+ padding: 0.4rem 0.3rem;
+
+ .top_jj {
+ width: 100%;
+ height: 1.3rem;
+ display: flex;
+ align-items: center;
+ font-size: 0.4546rem;
+
+ span {
+ font-weight: 800;
+ }
+ }
+
+ .jet {
+ width: 100%;
+
+ span {
+ line-height: 0.5rem;
+ }
+ }
+}
+
+@-webkit-keyframes zy {
+ 10% {
+ transform: rotate(15deg);
+ }
+
+ 20% {
+ transform: rotate(-10deg);
+ }
+
+ 30% {
+ transform: rotate(5deg);
+ }
+
+ 40% {
+ transform: rotate(-5deg);
+ }
+
+ 50%,
+ 100% {
+ transform: rotate(0deg);
+ }
+}
+
+.isjj {
+ animation: zy 2.5s 0.15s linear infinite;
+ animation: zy 2.5s 0.15s linear infinite;
+ animation: zy 2.5s 0.15s linear infinite;
+ animation: zy 2.5s 0.15s linear infinite;
+ animation: zy 2.5s 0.15s linear infinite;
+ animation: zy 2.5s 0.15s linear infinite;
+ animation: zy 2.5s 0.15s linear infinite;
+ animation: zy 2.5s 0.15s linear infinite;
+}
+
+.content_money {
+ width: 80%;
+ height: 80%;
+}
+
+.sanjiao {
+ width: 0.4rem;
+ height: 0.4rem;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ img {
+ width: 0.4rem;
+ height: 0.4rem;
+ }
+}
+
+.top_price {
+ width: 100%;
+ height: 70%;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+
+ .left {
+ // width: 0.8rem;
+ height: 0.4103rem;
+ border-radius: 0.1rem;
+ background: #4d73b1;
+ color: #fff;
+ font-size: 0.3077rem;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ span {
+ display: inline-block;
+ transform: scale(0.8);
+ font-weight: 600;
+ }
+ }
+
+ .right {
+ width: auto;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ white-space: nowrap;
+ margin-left: 0.1rem;
+ margin-right: 0.1rem;
+ min-width: 1.9rem;
+
+ span {
+ font-weight: 600;
+ text-align: right;
+ }
+ }
+}
+
+.bottom_balance {
+ width: 100%;
+ height: 30%;
+ display: flex;
+ justify-content: flex-end;
+ font-size: 0.3077rem;
+ color: #acaeaf;
+ transform: scale(0.9);
+ margin-left: 0.2rem;
+ padding-right: 0.68rem;
+}
+</style>
diff --git a/src/page/list/tradingList/data.list.vue b/src/page/list/tradingList/data.list.vue
index d861f45..193caff 100644
--- a/src/page/list/tradingList/data.list.vue
+++ b/src/page/list/tradingList/data.list.vue
@@ -224,7 +224,6 @@
type: item.stock_type || "",
};
window.localStorage.setItem("kLine", JSON.stringify(obj));
- // return;
var codes = item.code;
var names = item.name;
var ifZhishu = "0";
diff --git a/src/page/login/components/header.vue b/src/page/login/components/header.vue
index 0e4afbe..9f96e38 100644
--- a/src/page/login/components/header.vue
+++ b/src/page/login/components/header.vue
@@ -1,8 +1,9 @@
<template>
<div class="header_history">
<div class="header_content">
- <div class="left_back" @click="$router.push('/home')">
- <img src="../../../assets/img/back.png" alt="" />
+ <div class="left_back" @click="$router.go(-1)">
+ <!-- <img src="../../../assets/img/back.png" alt="" /> -->
+ <van-icon name="arrow-left" color="#c4d600" size=".5rem" />
</div>
<div class="right_mess">
<span>{{ mess }}</span>
@@ -39,11 +40,11 @@
{
text: "English",
icon: require("@/assets/ico/english.png"),
- lang: "zh-CN",
+ lang: "zh-CN"
},
- { text: "हिंदी", icon: require("@/assets/ico/india.png"), lang: "en" },
+ { text: "हिंदी", icon: require("@/assets/ico/india.png"), lang: "en" }
// { text: '繁体中文', icon: require('@/assets/ico/tw.png'), lang: 'tw' }
- ],
+ ]
};
},
methods: {
@@ -61,11 +62,11 @@
} else {
Toast(data.msg);
}
- },
+ }
},
mounted() {
this.getInfoSite();
- },
+ }
};
</script>
@@ -129,4 +130,4 @@
height: 50%;
}
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/page/login/login.vue b/src/page/login/login.vue
index 7a36fea..adfb805 100644
--- a/src/page/login/login.vue
+++ b/src/page/login/login.vue
@@ -50,7 +50,7 @@
}}<span
@click="$router.push('/register')"
data-v-8cc76a7b=""
- style="color: rgb(5, 106, 239)"
+ style="color:#c4d600"
>{{ $t("免費註冊") }}</span
>
</div>
@@ -74,11 +74,11 @@
userPassword: "",
userName: "",
btnClass: false,
- medium: "medium",
+ medium: "medium"
};
},
components: {
- headers,
+ headers
},
mounted() {
const ret = window.localStorage.getItem("login_admin");
@@ -111,7 +111,7 @@
async loginIN() {
let opts = {
phone: this.userName,
- userPwd: this.userPassword,
+ userPwd: this.userPassword
};
let data = await api.login(opts);
@@ -122,7 +122,7 @@
"login_admin",
JSON.stringify({
phone: this.userName,
- userPassword: this.userPassword,
+ userPassword: this.userPassword
})
);
} else {
@@ -145,14 +145,15 @@
// 支持
navigator.vibrate([55]);
}
- },
+ }
},
beforeDestroy() {},
- created() {},
+ created() {}
};
</script>
<style scoped lang="less">
+@green: #c4d600;
.password-operate {
display: flex;
justify-content: space-between;
@@ -164,6 +165,11 @@
line-height: 0.53333rem;
color: #8c9fad;
}
+}
+
+/deep/ .van-checkbox__icon--checked .van-icon {
+ background: @green;
+ border-color: @green;
}
.register {
@@ -237,7 +243,7 @@
.password {
width: 100%;
height: 50px;
- background: rgb(246, 246, 247);
+ background: #fff;
// background: #1e1e1e;
border-radius: 0.3564rem;
@@ -253,11 +259,11 @@
/deep/.el-input__inner {
width: 100%;
height: 70px;
- background-color: rgb(246, 246, 247) !important;
+ background-color: #fff !important;
// background: #1e1e1e;
border-radius: 8px;
font-size: 0.45rem !important;
- border: none;
+ border: #ddd solid 1px;
}
.bottom_btns {
@@ -269,13 +275,15 @@
margin-top: 40px;
height: 60px;
border-radius: 8px;
+ background: @green;
+ border: none;
}
.top_btn {
border: none;
width: 100%;
height: 1.25rem;
border-radius: 8px;
- background: #0066ed;
+ background: @green;
color: #fff;
display: flex;
align-items: center;
@@ -423,7 +431,7 @@
}
.on .top_btn {
- background: #2d8cf0 !important;
+ background: @green !important;
}
/deep/.el-icon-circle-close::before {
diff --git a/src/page/login/register.vue b/src/page/login/register.vue
index 3caaf43..914c954 100644
--- a/src/page/login/register.vue
+++ b/src/page/login/register.vue
@@ -53,7 +53,7 @@
<van-checkbox v-model="checked">{{
$t("我已閱讀並同意")
}}</van-checkbox>
- <span @click="gotoxy" style="color: rgb(5, 106, 239)">{{
+ <span @click="gotoxy" style="color: #c4d600">{{
$t("《用戶服務協議》")
}}</span>
</div>
@@ -68,7 +68,7 @@
<div class="register" @click="$router.push('/login')">
{{ $t("已有賬號?")
- }}<span style="color: rgb(5, 106, 239)">{{ $t("馬上登錄") }}</span>
+ }}<span style="color: #c4d600">{{ $t("馬上登錄") }}</span>
</div>
</div>
</div>
@@ -85,7 +85,7 @@
export default {
components: {
- headers,
+ headers
},
name: "newRegister",
data() {
@@ -100,7 +100,7 @@
code: "",
userPassword: "",
btnClass: false,
- rePassword: "",
+ rePassword: ""
};
},
mounted() {
@@ -109,7 +109,7 @@
: "";
},
methods: {
- gotoxy(){
+ gotoxy() {
this.$router.push("/help_fwxy");
},
handleInput() {
@@ -147,7 +147,7 @@
phone: this.phone,
yzmCode: "6666",
userPwd: this.userPassword,
- agentCode: this.userName,
+ agentCode: this.userName
};
let data = await api.register(opts);
if (data.status === 0) {
@@ -163,12 +163,13 @@
// 支持
navigator.vibrate([55]);
}
- },
- },
+ }
+ }
};
</script>
-<style scoped lang="less">
+<style scoped lang="less">
+@green: #c4d600;
.register {
font-style: normal;
font-weight: 400;
@@ -180,6 +181,10 @@
}
.radio-con {
margin-top: 0.32rem;
+}
+/deep/ .van-checkbox__icon--checked .van-icon {
+ background: @green;
+ border-color: @green;
}
/deep/ .van-checkbox__label {
font-style: normal;
@@ -291,6 +296,8 @@
margin-top: 40px;
height: 60px;
border-radius: 8px;
+ background-color: @green;
+ border-color: @green;
}
.mes {
width: 100%;
diff --git a/src/page/markets/aiTrading.vue b/src/page/markets/aiTrading.vue
index 67478ba..eb1a037 100644
--- a/src/page/markets/aiTrading.vue
+++ b/src/page/markets/aiTrading.vue
@@ -8,40 +8,40 @@
</template>
</page-head>
- <div class="trading_card" v-for="i in 5" :key="i">
+ <div class="trading_card" v-for="i in list" :key="i.id">
<p class="card_label1 flex-start">
- <span class="label_icon">US</span>
- <span>444</span>
+ <span class="label_icon">{{ i.stockType }}</span>
+ <span>{{ i.stockName }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("最低认购金额") }}</span>
- <span>$ 2,000</span>
+ <span>{{ i.stockType | currencySymbol }} {{ i.minPrice }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("交易成功率") }}</span>
- <span>100%</span>
+ <span>{{ i.successRate }}%</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("预期收益") }}</span>
- <span>3</span>
+ <span>{{ i.expectedEarning }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("交易周期") }}</span>
- <span>1天</span>
+ <span>{{ i.cycle + $t("hj87") }}</span>
</p>
- <p class="card_buy flex-center">
+ <p class="card_buy flex-center" @click="buyOpen(i)">
<van-icon name="add-square" size=".4em" />
<span>{{ $t("gm") }}</span>
</p>
</div>
<!-- 无数据时显示 -->
- <div class="no_data flex-center">
+ <div class="no_data flex-center" v-show="!list || list.length == 0">
<img src="@/assets/img/zhaobudao2.png" alt="" />
</div>
@@ -50,14 +50,77 @@
:pageSize="pageSize"
:total="total"
></n-pagination>
+
+ <!-- 购买弹窗 -->
+ <van-popup v-model="buyShow" round>
+ <van-form class="buy_popup" @submit="popupSubmit">
+ <div class="popup_title flex-center">
+ <span>{{ `AI ${$t("量化交易")}` }}</span>
+ </div>
+
+ <div class="division"></div>
+
+ <div class="popup_name popup_item flex-start">
+ <span class="popup_icon">{{ popupData.stockType }}</span>
+ <span>{{ popupData.stockName }}</span>
+ </div>
+
+ <div class="popup_item flex-between">
+ <span>{{ $t("最低认购金额") }}</span>
+ <span>
+ {{ popupData.stockType | currencySymbol }} {{ popupData.minPrice }}
+ </span>
+ </div>
+
+ <div class="popup_item" style="display: grid;">
+ <p class="flex-start">
+ <span style="color:red">*</span>
+ <span>{{ $t("申购金额") }}</span>
+ </p>
+ <van-field
+ v-model="popupPrice"
+ :placeholder="$t('请输入')"
+ type="number"
+ clearable
+ :rules="[
+ { required: true, message: $t('请输入') },
+ { validator, message: $t('低于最小申购金额') }
+ ]"
+ />
+ </div>
+
+ <div
+ class="popup_item popup_name flex-end"
+ v-if="popupPrice && popupData.stockType != 'MEX'"
+ >
+ <span>≈ MX$ {{ (utm * popupPrice).toFixed(2) }}</span>
+ </div>
+
+ <div class="division"></div>
+
+ <div class="buts flex-between">
+ <p class="flex-center" @click="buyShow = false">
+ <span>{{ $t("qx") }}</span>
+ </p>
+ <p class="flex-center" native-type="submit">
+ <!-- <span>{{ $t("qr") }}</span> -->
+ <van-button native-type="submit">{{ $t("qr") }}</van-button>
+ </p>
+ </div>
+ </van-form>
+ </van-popup>
</div>
</template>
<script>
import PageHead from "@/components/pageHead.vue";
import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
+import { myMixin } from "@/mixins/myMixin";
+import { Toast } from "vant";
export default {
+ mixins: [myMixin],
components: {
PageHead,
nPagination
@@ -66,8 +129,56 @@
return {
pageNum: 1,
pageSize: 10,
- total: 1
+ total: 1,
+ list: [],
+ buyShow: false, // 购买弹窗控制
+ popupData: {}, // 点击购买的数据
+ popupPrice: "" // 购买金额
};
+ },
+ created() {
+ this.getStockAiList();
+ },
+ methods: {
+ // 获取列表数据
+ async getStockAiList() {
+ let options = {
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ };
+ let data = await api.getStockAiList(options);
+ if (data.status == 0) {
+ this.list = data.data.list;
+ this.total = data.data.total || 1;
+ }
+ },
+ // 购买弹窗
+ buyOpen(i) {
+ this.popupData = i;
+ this.popupPrice = "";
+ this.buyShow = true;
+ },
+ // 提交购买
+ async popupSubmit() {
+ let opt = {
+ buyNum: this.popupPrice,
+ id: this.popupData.id
+ };
+
+ let data = await api.buyStockAi(opt);
+
+ if (data.status == 0) {
+ Toast.success();
+ setTimeout(() => {
+ this.buyShow = false;
+ }, 1000);
+ } else {
+ Toast.fail(data.msg);
+ }
+ },
+ validator(val) {
+ return val >= this.popupData.minPrice;
+ }
}
};
</script>
@@ -81,6 +192,68 @@
min-height: 100vh;
padding-bottom: 0.3em;
+ .buy_popup {
+ width: 8em;
+ /deep/ .van-cell {
+ padding: 0;
+ font-size: 0.4em;
+ }
+ /deep/ .van-field__body {
+ border: 0.01em solid #f5f5f5;
+ height: 2.5em;
+ padding: 0 0.5em;
+ margin-top: 0.5em;
+ }
+ /deep/ .van-button {
+ border: none;
+ font-size: 1em;
+ color: @green;
+ }
+ .division {
+ width: 100%;
+ height: 0.25em;
+ background-color: #f5f5f5;
+ }
+ .popup_title {
+ width: 100%;
+ min-height: 1.22em;
+ font-weight: bold;
+ padding: 0 0.25em;
+ }
+ .popup_name {
+ color: @green;
+ .popup_icon {
+ background: @green;
+ color: #fff;
+ padding: 0.2em 0.35em;
+ border-radius: 0.15em;
+ margin-right: 0.3em;
+ font-size: 0.3em;
+ }
+ }
+ .popup_item {
+ width: 7.5em;
+ margin: 0 auto;
+ padding: 0.35em 0;
+ border-bottom: #f5f5f5 solid 0.01em;
+ }
+ span {
+ font-size: 0.4em;
+ }
+ .buts {
+ width: 100%;
+ height: 1.22em;
+ p {
+ height: 100%;
+ flex: 1;
+ }
+ & > p:last-child {
+ border-left: #f5f5f5 solid 0.01em;
+ color: @green;
+ }
+ }
+ }
+
.trading_card {
width: 9.5em;
margin: 0.25em auto 0;
diff --git a/src/page/markets/aiTradingOrder.vue b/src/page/markets/aiTradingOrder.vue
index 03df934..b5c9cf6 100644
--- a/src/page/markets/aiTradingOrder.vue
+++ b/src/page/markets/aiTradingOrder.vue
@@ -4,43 +4,43 @@
<div class="order_tabs">
<van-tabs v-model="active" swipe-threshold="1">
- <van-tab :title="$t('hj160')" :name="0"></van-tab>
- <van-tab :title="$t('申购中')" :name="1"></van-tab>
- <van-tab :title="$t('交易中')" :name="2"></van-tab>
- <van-tab :title="$t('成功')" :name="3"></van-tab>
- <van-tab :title="$t('失败')" :name="4"></van-tab>
+ <van-tab :title="$t('hj160')" name=""></van-tab>
+ <van-tab :title="$t('申购中')" name="wait"></van-tab>
+ <van-tab :title="$t('交易中')" name="passed"></van-tab>
+ <van-tab :title="$t('成功')" name="finished"></van-tab>
+ <van-tab :title="$t('失败')" name="notPass"></van-tab>
</van-tabs>
</div>
- <div class="trading_card" v-for="i in 5" :key="i">
+ <div class="trading_card" v-for="i in list" :key="i.id">
<p class="card_label1 flex-start">
- <span class="label_icon">MEX</span>
- <span> Escaneo de Tendencias</span>
+ <span class="label_icon">{{ i.stockType }}</span>
+ <span>{{ i.stockName }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("申购金额") }}</span>
- <span>MX$ 5,000</span>
+ <span>{{ i.stockType | currencySymbol }} {{ i.buyAmount }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("实际收益") }}</span>
- <span>MX$ 50</span>
+ <span>{{ i.stockType | currencySymbol }} {{ i.realEarning }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("状态") }}</span>
- <span class="zt">交易中</span>
+ <span class="zt">{{ status[i.status] }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("提交时间") }}</span>
- <span>11/07/2025 03:08:18 AM</span>
+ <span>{{ i.buyDate | gettime }}</span>
</p>
</div>
<!-- 无数据时显示 -->
- <div class="no_data flex-center">
+ <div class="no_data flex-center" v-show="!list || list.length == 0">
<img src="@/assets/img/zhaobudao2.png" alt="" />
</div>
@@ -55,6 +55,7 @@
<script>
import PageHead from "@/components/pageHead.vue";
import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
export default {
components: {
@@ -66,8 +67,47 @@
pageNum: 1,
pageSize: 10,
total: 1,
- active: 0
+ active: "",
+ list: [],
+ status: {
+ wait: this.$t("申购中"),
+ passed: this.$t("交易中"),
+ finished: this.$t("成功"),
+ notPass: this.$t("失败")
+ }
};
+ },
+ watch: {
+ active: {
+ handler(val) {
+ this.pageNum = 1;
+ this.getStockAiOrderList();
+ }
+ },
+ pageNum: {
+ handler(val) {
+ this.list = [];
+ this.getStockAiOrderList();
+ }
+ }
+ },
+ created() {
+ this.getStockAiOrderList();
+ },
+ methods: {
+ // 获取订单列表
+ async getStockAiOrderList() {
+ let data = await api.getStockAiOrderList({
+ pageNum: this.pageNum,
+ pageSize: this.pageSize,
+ status: this.active
+ });
+
+ if (data.status == 0) {
+ this.list = data.data.list;
+ this.total = data.data.total;
+ }
+ }
}
};
</script>
diff --git a/src/page/markets/blockTrading.vue b/src/page/markets/blockTrading.vue
index 57034db..33874dc 100644
--- a/src/page/markets/blockTrading.vue
+++ b/src/page/markets/blockTrading.vue
@@ -22,40 +22,41 @@
}}</van-button>
</div>
- <!-- <div class="trading_card" v-for="i in 5" :key="i">
- <p class="card_label1 flex-start">
- <span class="label_icon">US</span>
- <span>444</span>
+ <div class="trading_card" v-for="i in list" :key="i.id">
+ <div class="card_label2 flex-between" style="height:1.8em" @click="toDetails(i)">
+ <div>
+ <p class="flex-start">
+ <span class="label_icon">{{ i.stockType }}</span>
+ <span class="label_name line-one">{{ i.stockSpell }}</span>
+ </p>
+ <p class="flex-start gp">
+ <span>{{ i.stockName }}</span>
+ </p>
+ </div>
+
+ <div class="flex-end">
+ <van-icon name="arrow" color="#969799" size=".5em" />
+ </div>
+ </div>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("市场价") }}</span>
+ <span>{{ i.stockType | currencySymbol }} {{ i.nowPrice }}</span>
</p>
<p class="card_label2 flex-between">
- <span>{{ $t("最低认购金额") }}</span>
- <span>$ 2,000</span>
+ <span>{{ $t("最小购买数量") }}</span>
+ <span>{{ i.stockNum }}</span>
</p>
- <p class="card_label2 flex-between">
- <span>{{ $t("交易成功率") }}</span>
- <span>100%</span>
- </p>
-
- <p class="card_label2 flex-between">
- <span>{{ $t("预期收益") }}</span>
- <span>3</span>
- </p>
-
- <p class="card_label2 flex-between">
- <span>{{ $t("交易周期") }}</span>
- <span>1天</span>
- </p>
-
- <p class="card_buy flex-center">
+ <p class="card_buy flex-center" @click="buyOpen(i)">
<van-icon name="add-square" size=".4em" />
- <span>{{ $t("gm") }}</span>
+ <span>{{ $t("hj85") }}</span>
</p>
- </div> -->
+ </div>
<!-- 无数据时显示 -->
- <div class="no_data flex-center">
+ <div class="no_data flex-center" v-show="!list || list.length == 0">
<img src="@/assets/img/zhaobudao2.png" alt="" />
</div>
@@ -64,12 +65,81 @@
:pageSize="pageSize"
:total="total"
></n-pagination>
+
+ <!-- 购买弹窗 -->
+ <van-popup v-model="buyShow" round>
+ <van-form class="buy_popup" @submit="popupSubmit">
+ <div class="popup_title flex-center">
+ <span>{{ popupData.stockName }}</span>
+ </div>
+
+ <div class="division"></div>
+
+ <div class="popup_item flex-between">
+ <span>{{ $t("市场价") }}</span>
+ <span>
+ {{ popupData.stockType | currencySymbol }} {{ popupData.nowPrice }}
+ </span>
+ </div>
+
+ <div class="popup_item flex-between">
+ <span>{{ $t("最小购买数量") }}</span>
+ <span>
+ {{ popupData.stockNum }}
+ </span>
+ </div>
+
+ <div class="popup_item flex-between-start">
+ <span style="color:red">*</span>
+ <van-field
+ v-model="popFrom.password"
+ :label="$t('购买密码')"
+ :placeholder="$t('请输入')"
+ :rules="[{ required: true, message: $t('请输入') }]"
+ />
+ </div>
+
+ <div class="popup_item flex-between">
+ <p class="flex-start">
+ <span style="color:red">*</span>
+ <span>{{ $t("sl") }}</span>
+ </p>
+ <span>
+ <van-stepper
+ v-model="popFrom.num"
+ integer
+ :min="popupData.stockNum"
+ />
+ </span>
+ </div>
+
+ <div class="popup_item flex-end">
+ <div class="zxgm flex-center" @click="minimum">
+ <span>{{ $t("最小购买") }}</span>
+ </div>
+ </div>
+
+ <div class="division"></div>
+
+ <div class="buts flex-between">
+ <p class="flex-center" @click="buyShow = false">
+ <span>{{ $t("qx") }}</span>
+ </p>
+ <p class="flex-center" native-type="submit">
+ <!-- <span>{{ $t("qr") }}</span> -->
+ <van-button native-type="submit">{{ $t("qr") }}</van-button>
+ </p>
+ </div>
+ </van-form>
+ </van-popup>
</div>
</template>
<script>
import PageHead from "@/components/pageHead.vue";
import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
+import { Toast } from "vant";
export default {
components: {
@@ -81,12 +151,87 @@
pageNum: 1,
pageSize: 10,
total: 1,
- searchValue: ""
+ searchValue: "",
+ list: [],
+ buyShow: false, // 购买弹窗控制
+ popupData: {}, // 点击购买的数据
+ popFrom: {
+ password: "",
+ num: 0
+ }
};
},
+ watch: {
+ pageNum() {
+ this.list = [];
+ this.getDzListTwo();
+ }
+ },
+ created() {
+ this.getDzListTwo();
+ },
methods: {
+ // 提交搜索
submit() {
- console.log(this.searchValue);
+ this.pageNum = 1;
+ this.getDzListTwo();
+ },
+ // 获取列表数据
+ async getDzListTwo() {
+ let opt = {
+ pageNum: this.pageNum,
+ pageSize: this.pageSize,
+ keyWords: this.searchValue
+ // orderBy: ""
+ };
+ let data = await api.getDzListTwo(opt);
+ if (data.status === 0) {
+ this.total = data.data.total;
+ this.list = data.data.list;
+ }
+ },
+ // 购买弹窗
+ buyOpen(i) {
+ this.popupData = i;
+ this.buyShow = true;
+ },
+ // 提交购买
+ async popupSubmit() {
+ let opt = {
+ ...this.popFrom,
+ dzId: this.popupData.id
+ };
+
+ let data = await api.getBuyStockDz(opt);
+
+ if (data.status == 0) {
+ Toast.success();
+ setTimeout(() => {
+ this.buyShow = false;
+ }, 1000);
+ } else {
+ Toast.fail(data.msg);
+ }
+ },
+ // 最小购买
+ minimum() {
+ this.popFrom.num = this.popupData.stockNum;
+ },
+ // 点击进入详情
+ toDetails(item) {
+ const obj = {
+ pid: item.id || "",
+ type: item.stockType || ""
+ };
+ window.localStorage.setItem("kLine", JSON.stringify(obj));
+
+ this.$router.push({
+ path: "/kline",
+ query: {
+ code: item.id,
+ type: item.stockType
+ }
+ });
}
}
};
@@ -94,6 +239,8 @@
<style lang="less" scoped>
@green: #c4d600;
+@grey-two: #969799;
+@red: #ee0a24;
.block_trading {
font-size: 10vw;
width: 100%;
@@ -101,6 +248,95 @@
min-height: 100vh;
padding-bottom: 0.3em;
padding-top: 1.4em;
+
+ .buy_popup {
+ width: 8.8em;
+ /deep/ .van-cell {
+ padding: 0;
+ font-size: 0.4em;
+ }
+ /deep/ .van-field__body {
+ // border: 0.01em solid #f5f5f5;
+ // height: 2.5em;
+ // padding: 0 0.5em;
+ // margin-top: 0.5em;
+ }
+ /deep/ .van-field__label {
+ color: #000;
+ }
+ /deep/ .van-stepper__minus {
+ width: 1rem;
+ height: 1rem;
+ }
+ /deep/ .van-stepper__plus {
+ width: 1rem;
+ height: 1rem;
+ }
+ /deep/ .van-stepper__input {
+ height: 1rem;
+ width: 2rem;
+ font-size: 0.4rem;
+ }
+ .division {
+ width: 100%;
+ height: 0.25em;
+ background-color: #f5f5f5;
+ }
+ .popup_title {
+ width: 100%;
+ min-height: 1.22em;
+ font-weight: bold;
+ padding: 0 0.25em;
+ }
+ .popup_name {
+ color: @green;
+ .popup_icon {
+ background: @green;
+ color: #fff;
+ padding: 0.2em 0.35em;
+ border-radius: 0.15em;
+ margin-right: 0.3em;
+ font-size: 0.3em;
+ }
+ }
+ .popup_item {
+ width: 8.3em;
+ margin: 0 auto;
+ padding: 0.35em 0;
+ border-bottom: #f5f5f5 solid 0.01em;
+
+ .zxgm {
+ height: 0.8em;
+ width: 2em;
+ border-radius: 0.1em;
+ border: #ddd solid 0.01em;
+ span {
+ font-size: 0.3em;
+ }
+ }
+ }
+ span {
+ font-size: 0.4em;
+ }
+ .buts {
+ width: 100%;
+ height: 1.22em;
+
+ /deep/ .van-button {
+ border: none;
+ font-size: 1em;
+ color: @green;
+ }
+ p {
+ height: 100%;
+ flex: 1;
+ }
+ & > p:last-child {
+ border-left: #f5f5f5 solid 0.01em;
+ color: @green;
+ }
+ }
+ }
.popup_head {
display: flex;
@@ -160,6 +396,7 @@
width: 9em;
border-bottom: #f5f5f5 solid 0.01em;
}
+
.card_label2 {
height: 1.1em;
color: #323233;
@@ -168,8 +405,28 @@
font-weight: 300;
}
& > span:last-child {
- color: #969799;
+ color: @grey-two;
font-size: 0.36em;
+ }
+ .gp {
+ margin-top: 0.22em;
+ color: @grey-two;
+ font-size: 0.9em;
+ }
+ .app {
+ color: @green;
+ font-size: 0.6em;
+ }
+ .label_name {
+ color: @green;
+ width: 14em;
+ }
+ span.zje {
+ color: @red;
+ font-size: 0.48em;
+ }
+ span.zt {
+ color: @green;
}
}
@@ -189,6 +446,15 @@
font-size: 0.3em;
}
}
+
+ .label_icon {
+ background: @green;
+ color: #fff;
+ padding: 0.2em 0.35em;
+ border-radius: 0.15em;
+ margin-right: 0.3em;
+ font-size: 0.3em !important;
+ }
}
.head_right {
diff --git a/src/page/markets/blockTradingOrder.vue b/src/page/markets/blockTradingOrder.vue
index aa61ddb..6a939f4 100644
--- a/src/page/markets/blockTradingOrder.vue
+++ b/src/page/markets/blockTradingOrder.vue
@@ -4,61 +4,65 @@
<div class="order_tabs">
<van-tabs v-model="active" swipe-threshold="1">
- <van-tab :title="$t('hj160')" :name="0"></van-tab>
- <van-tab :title="$t('申购中')" :name="1"></van-tab>
- <van-tab :title="$t('待成交')" :name="2"></van-tab>
- <van-tab :title="$t('成功')" :name="3"></van-tab>
- <van-tab :title="$t('失败')" :name="4"></van-tab>
- <van-tab :title="$t('已取消')" :name="5"></van-tab>
+ <van-tab :title="$t('hj160')" name=""></van-tab>
+ <van-tab :title="$t('申购中')" name="0"></van-tab>
+ <van-tab :title="$t('成功')" name="1"></van-tab>
+ <van-tab :title="$t('失败')" name="2"></van-tab>
</van-tabs>
</div>
- <div class="trading_card" v-for="i in 5" :key="i">
- <div class="card_label2 flex-between" style="height:1.8em">
+ <div class="trading_card" v-for="i in list" :key="i.id">
+ <div
+ class="card_label2 flex-between"
+ style="height:1.8em"
+ @click="toDetails(i)"
+ >
<div>
<p class="flex-start gp">
<span>{{ $t("hj52") }}</span>
</p>
<p class="flex-start">
- <span class="label_icon">US</span>
- <span class="label_name line-one">Advance Auto Parts Inc.</span>
+ <span class="label_icon">{{ i.stockGid }}</span>
+ <span class="label_name line-one">{{ i.stockName }}</span>
</p>
</div>
<div class="flex-end">
- <span class="app">APP</span>
+ <span class="app">{{ i.stockSpell }}</span>
<van-icon name="arrow" color="#969799" size=".5em" />
</div>
</div>
<p class="card_label2 flex-between">
<span>{{ $t("sl") }}</span>
- <span>5,000</span>
+ <span>{{ i.orderNum }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("hj81") }}</span>
- <span>$ 44.48</span>
+ <span>{{ i.stockGid | currencySymbol }} {{ i.buyOrderPrice }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("总金额") }}</span>
- <span class="zje">MX$ 484,920.96</span>
+ <span class="zje"
+ >{{ i.stockGid | currencySymbol }} {{ i.orderTotalPrice }}</span
+ >
</p>
<p class="card_label2 flex-between">
<span>{{ $t("状态") }}</span>
- <span class="zt">交易中</span>
+ <span class="zt">{{ status[i.checkType] }}</span>
</p>
-
+
<p class="card_label2 flex-between">
<span>{{ $t("提交时间") }}</span>
- <span>11/07/2025 03:08:18 AM</span>
+ <span>{{ i.buyOrderTime | gettime }}</span>
</p>
</div>
<!-- 无数据时显示 -->
- <div class="no_data flex-center">
+ <div class="no_data flex-center" v-show="!list || list.length == 0">
<img src="@/assets/img/zhaobudao2.png" alt="" />
</div>
@@ -73,6 +77,8 @@
<script>
import PageHead from "@/components/pageHead.vue";
import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
+import { Toast } from "vant";
export default {
components: {
@@ -84,8 +90,60 @@
pageNum: 1,
pageSize: 10,
total: 1,
- active: 0
+ active: "",
+ list: [],
+ status: {
+ 0: this.$t("申购中"),
+ 1: this.$t("成功"),
+ 2: this.$t("失败")
+ }
};
+ },
+ watch: {
+ pageNum() {
+ this.list = [];
+ this.getDzOrderList();
+ },
+ active() {
+ this.pageNum = 1;
+ this.getDzOrderList();
+ }
+ },
+ methods: {
+ // 获取数据
+ async getDzOrderList() {
+ let opt = {
+ pageNum: this.pageNum,
+ pageSize: this.pageSize,
+ status: this.active
+ };
+ let data = await api.getDzOrderList(opt);
+ if (data.status == 0) {
+ this.list = data.data.list;
+ this.total = data.data.total;
+ } else {
+ Toast(data.msg);
+ }
+ },
+ // 点击进入详情
+ toDetails(item) {
+ const obj = {
+ pid: item.id || "",
+ type: item.stockGid || ""
+ };
+ window.localStorage.setItem("kLine", JSON.stringify(obj));
+
+ this.$router.push({
+ path: "/kline",
+ query: {
+ code: item.id,
+ type: item.stockGid
+ }
+ });
+ }
+ },
+ created() {
+ this.getDzOrderList();
}
};
</script>
diff --git a/src/page/markets/fund.vue b/src/page/markets/fund.vue
new file mode 100644
index 0000000..2ba52b2
--- /dev/null
+++ b/src/page/markets/fund.vue
@@ -0,0 +1,301 @@
+<template>
+ <div class="fund">
+ <page-head :title="$t('理财基金')">
+ <template slot="right">
+ <div class="head_right" @click="$router.push('/fundOrder')">
+ {{ $t("订单") }}
+ </div>
+ </template>
+ </page-head>
+
+ <div class="trading_card" v-for="i in list" :key="i.id">
+ <p class="card_label2 flex-start">
+ <span style="font-weight: 800;">{{ i.title }}</span>
+ <span></span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("syl") }}</span>
+ <span>{{ i.returnOfRate }}%</span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("投资周期") }}</span>
+ <span>{{ i.returnTime }} {{ $t("hj87") }}</span>
+ </p>
+
+ <!-- <p class="card_label2 flex-between">
+ <span>{{ $t("投资金额") }}</span>
+ <span class="lv">MX$ {{ i.buyLowestNum }}</span>
+ </p> -->
+
+ <p class="card_buy flex-center" @click="buyOpen(i)">
+ <van-icon name="shopping-cart" size=".4em" />
+ <span>{{ $t("hj85") }}</span>
+ </p>
+ </div>
+
+ <!-- 无数据时显示 -->
+ <div class="no_data flex-center" v-show="!list || list.length == 0">
+ <img src="@/assets/img/zhaobudao2.png" alt="" />
+ </div>
+
+ <!-- <n-pagination
+ :pageNo.sync="pageNum"
+ :pageSize="pageSize"
+ :total="total"
+ ></n-pagination> -->
+
+ <!-- 购买弹窗 -->
+ <van-popup v-model="buyShow" round>
+ <van-form class="buy_popup" @submit="popupSubmit">
+ <div class="popup_title flex-center">
+ <span>{{ $t("hj225") }}</span>
+ </div>
+
+ <div class="division"></div>
+
+ <div class="popup_item flex-between">
+ <span>{{ $t("hj48") }}</span>
+ <span> MX$ {{ myMoney.availableBalance }} </span>
+ </div>
+
+ <div class="popup_item flex-between-start">
+ <span style="color:red">*</span>
+ <van-field
+ v-model="amount"
+ :label="$t('hj263')"
+ :placeholder="$t('请输入')"
+ type="number"
+ :max="myMoney.availableBalance"
+ :rules="[{ required: true, message: $t('请输入') }]"
+ />
+ </div>
+
+ <div class="division"></div>
+
+ <div class="buts flex-between">
+ <p class="flex-center" @click="buyShow = false">
+ <span>{{ $t("qx") }}</span>
+ </p>
+ <p class="flex-center" native-type="submit">
+ <!-- <span>{{ $t("qr") }}</span> -->
+ <van-button native-type="submit">{{ $t("qr") }}</van-button>
+ </p>
+ </div>
+ </van-form>
+ </van-popup>
+ </div>
+</template>
+
+<script>
+import PageHead from "@/components/pageHead.vue";
+import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
+import { myMixin } from "@/mixins/myMixin";
+import { Toast } from "vant";
+
+export default {
+ mixins: [myMixin],
+ components: {
+ PageHead,
+ nPagination
+ },
+ data() {
+ return {
+ pageNum: 1,
+ pageSize: 10,
+ total: 1,
+ list: [],
+ buyShow: false, // 购买弹窗控制
+ popupData: {}, // 点击购买的数据
+ amount: "", // 购买金额
+ myMoney: {} // 用户金额数据
+ };
+ },
+ created() {
+ this.getStockAiList();
+ this.getMoney();
+ },
+ methods: {
+ // 获取金额
+ async getMoney() {
+ let data = await api.getMoney();
+ if (data.status == 0) {
+ this.myMoney = data.data[0];
+ }
+ },
+ // 获取列表数据
+ async getStockAiList() {
+ // let options = {
+ // pageNum: this.pageNum,
+ // pageSize: this.pageSize
+ // };
+ let data = await api.getYebInfo();
+ this.list = data.data;
+ // this.total = data.data.total || 1;
+ },
+ // 购买弹窗
+ buyOpen(i) {
+ this.popupData = i;
+ this.buyShow = true;
+ },
+ // 提交购买
+ async popupSubmit() {
+ let opt = {
+ eId: this.popupData.id,
+ money: this.amount
+ };
+ let data = await api.BuyYeb(opt);
+
+ if (data.status == 0) {
+ Toast.success();
+ setTimeout(() => {
+ this.buyShow = false;
+ }, 1000);
+ } else {
+ Toast.fail(data.msg);
+ }
+ },
+ validator(val) {
+ return val > this.popupData.minPrice;
+ }
+ }
+};
+</script>
+
+<style lang="less" scoped>
+@green: #c4d600;
+@dark_green: #07c160;
+@red: #ee0a24;
+.fund {
+ font-size: 10vw;
+ width: 100%;
+ background-color: #f5f5f5;
+ min-height: 100vh;
+ padding-bottom: 0.3em;
+
+ .buy_popup {
+ width: 8em;
+ /deep/ .van-cell {
+ padding: 0;
+ font-size: 0.4em;
+ }
+ /deep/ .van-field__body {
+ // border: 0.01em solid #f5f5f5;
+ // height: 2.5em;
+ // padding: 0 0.5em;
+ // margin-top: 0.5em;
+ }
+ /deep/ .van-button {
+ border: none;
+ font-size: 1em;
+ color: @green;
+ }
+ .division {
+ width: 100%;
+ height: 0.25em;
+ background-color: #f5f5f5;
+ }
+ .popup_title {
+ width: 100%;
+ height: 1.22em;
+ font-weight: bold;
+ }
+ .popup_name {
+ color: @green;
+ .popup_icon {
+ background: @green;
+ color: #fff;
+ padding: 0.2em 0.35em;
+ border-radius: 0.15em;
+ margin-right: 0.3em;
+ font-size: 0.3em;
+ }
+ }
+ .popup_item {
+ width: 7.5em;
+ margin: 0 auto;
+ padding: 0.35em 0;
+ border-bottom: #f5f5f5 solid 0.01em;
+ }
+ span {
+ font-size: 0.4em;
+ }
+ .buts {
+ width: 100%;
+ height: 1.22em;
+ p {
+ height: 100%;
+ flex: 1;
+ }
+ & > p:last-child {
+ border-left: #f5f5f5 solid 0.01em;
+ color: @green;
+ }
+ }
+ }
+
+ .trading_card {
+ width: 9.5em;
+ margin: 0.25em auto 0;
+ border-radius: 0.25em;
+ background: #fff;
+ .card_buy {
+ height: 1.33em;
+ color: @red;
+ box-shadow: 0 -0.05333rem 0.26667rem #0000000d;
+
+ span {
+ font-size: 0.45em;
+ font-weight: 600;
+ margin-left: 0.2em;
+ }
+ }
+ .card_label2,
+ .card_label1 {
+ margin: 0 auto;
+ width: 9em;
+ border-bottom: #f5f5f5 solid 0.01em;
+ }
+ .card_label2 {
+ height: 1.1em;
+ color: #323233;
+ span {
+ font-size: 0.4em;
+ font-weight: 300;
+ }
+ & > span:last-child {
+ color: #969799;
+ font-size: 0.36em;
+ }
+ .lv {
+ color: @dark_green !important;
+ font-size: 0.45em !important;
+ }
+ }
+
+ .card_label1 {
+ color: @green;
+ height: 1.33em;
+
+ span {
+ font-size: 0.4em;
+ }
+ .label_icon {
+ background: @green;
+ color: #fff;
+ padding: 0.2em 0.35em;
+ border-radius: 0.15em;
+ margin-right: 0.3em;
+ font-size: 0.3em;
+ }
+ }
+ }
+
+ .head_right {
+ color: @green;
+ font-size: 0.4em;
+ }
+}
+</style>
diff --git a/src/page/markets/fundOrder.vue b/src/page/markets/fundOrder.vue
new file mode 100644
index 0000000..fc6a448
--- /dev/null
+++ b/src/page/markets/fundOrder.vue
@@ -0,0 +1,223 @@
+<template>
+ <div class="fund_order">
+ <page-head :title="`${$t('基金订单')}`"> </page-head>
+
+ <!-- <div class="order_tabs">
+ <van-tabs v-model="active" swipe-threshold="1">
+ <van-tab :title="$t('hj160')" name=""></van-tab>
+ <van-tab :title="$t('进行中')" name="1"></van-tab>
+ <van-tab :title="$t('已赎回')" name="2"></van-tab>
+ </van-tabs>
+ </div> -->
+
+ <div class="trading_card" v-for="i in list" :key="i.id">
+ <p class="card_label2 flex-start">
+ <span style="font-weight: 800;">{{ i.title }}</span>
+ <span></span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("hj273") }}</span>
+ <span>{{ i.buyTime }}</span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("syl") }}</span>
+ <span>{{ i.returnOfRate }}</span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("投资周期") }}</span>
+ <span>{{ i.returnTime }} {{ $t("hj87") }}</span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("投资金额") }}</span>
+ <span class="lv">MX$ {{ i.money }}</span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("状态") }}</span>
+ <span class="zt">{{ status[i.state] }}</span>
+ </p>
+
+ <!-- <p class="card_label2 flex-between">
+ <span>{{ $t("赎回时间") }}</span>
+ <span>08/07/2025 07:53:02 AM</span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("总赎回金额") }}</span>
+ <span class="lv">MX$ 13</span>
+ </p> -->
+ </div>
+
+ <!-- 无数据时显示 -->
+ <div class="no_data flex-center" v-show="!list || list.length == 0">
+ <img src="@/assets/img/zhaobudao2.png" alt="" />
+ </div>
+
+ <!-- <n-pagination
+ :pageNo.sync="pageNum"
+ :pageSize="pageSize"
+ :total="total"
+ ></n-pagination> -->
+ </div>
+</template>
+
+<script>
+import PageHead from "@/components/pageHead.vue";
+import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
+
+export default {
+ components: {
+ PageHead,
+ nPagination
+ },
+ data() {
+ return {
+ pageNum: 1,
+ pageSize: 10,
+ total: 1,
+ active: 0,
+ list: [],
+ status: {
+ 1: this.$t("进行中"),
+ 2: this.$t("已赎回")
+ }
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ async getList() {
+ let data = await api.getYebs();
+ if (data.status == 0) {
+ this.list = data.data;
+ }
+ }
+ }
+};
+</script>
+
+<style lang="less" scoped>
+@green: #c4d600;
+@grey-two: #969799;
+@red: #ee0a24;
+@dark_green: #07c160;
+.fund_order {
+ font-size: 10vw;
+ width: 100%;
+ background-color: #f5f5f5;
+ min-height: 100vh;
+ padding-bottom: 0.3em;
+ // padding-top: 1.4em;
+ padding-top: 0.1em;
+ position: relative;
+ /deep/ .van-tabs--line .van-tabs__wrap {
+ height: 1.2em;
+ }
+ /deep/ .van-tab__text--ellipsis {
+ overflow: visible;
+ }
+ /deep/ .van-tab {
+ font-size: 0.4em;
+ }
+ /deep/ .van-tabs__line {
+ background-color: @green;
+ height: 0.1em;
+ width: 1em;
+ }
+
+ .order_tabs {
+ width: 100%;
+ position: fixed;
+ top: 1.22em;
+ left: 0;
+ z-index: 999;
+ }
+
+ .trading_card {
+ width: 9.5em;
+ margin: 0.25em auto 0;
+ border-radius: 0.25em;
+ background: #fff;
+ .card_buy {
+ height: 1.33em;
+ color: @green;
+ box-shadow: 0 -0.05333rem 0.26667rem #0000000d;
+
+ span {
+ font-size: 0.45em;
+ font-weight: 600;
+ margin-left: 0.2em;
+ }
+ }
+ .card_label2,
+ .card_label1 {
+ margin: 0 auto;
+ width: 9em;
+ border-bottom: #f5f5f5 solid 0.01em;
+ }
+ .card_label2 {
+ height: 1.1em;
+ color: #323233;
+ span {
+ font-size: 0.4em;
+ font-weight: 300;
+ }
+ & > span:last-child {
+ color: @grey-two;
+ font-size: 0.36em;
+ }
+ .gp {
+ margin-bottom: 0.2em;
+ }
+ .app {
+ color: @green;
+ font-size: 0.6em;
+ }
+ .label_name {
+ color: @grey-two;
+ width: 14em;
+ }
+ span.zje {
+ color: @red;
+ font-size: 0.48em;
+ }
+ span.zt {
+ color: @green;
+ }
+ .lv {
+ color: @dark_green !important;
+ font-size: 0.45em !important;
+ }
+ }
+
+ .card_label1 {
+ color: @green;
+ height: 1.33em;
+
+ span {
+ font-size: 0.4em;
+ }
+ }
+
+ .label_icon {
+ background: @green;
+ color: #fff;
+ padding: 0.2em 0.35em;
+ border-radius: 0.15em;
+ margin-right: 0.3em;
+ font-size: 0.3em !important;
+ }
+ }
+
+ .head_right {
+ color: @green;
+ font-size: 0.4em;
+ }
+}
+</style>
diff --git a/src/page/markets/ipo.vue b/src/page/markets/ipo.vue
index 06d4c57..ecc4d18 100644
--- a/src/page/markets/ipo.vue
+++ b/src/page/markets/ipo.vue
@@ -8,40 +8,54 @@
</template>
</page-head>
- <!-- <div class="trading_card" v-for="i in 5" :key="i">
- <p class="card_label1 flex-start">
- <span class="label_icon">US</span>
- <span>444</span>
+ <div class="trading_card" v-for="i in list" :key="i.id">
+ <div class="card_label1 flex-between-start">
+ <div>
+ <p class="flex-start gp">
+ <span>{{ i.code }}</span>
+ </p>
+ <p class="flex-start">
+ <span class="label_icon">{{ i.stockType }}</span>
+ <span class="label_name line-one">{{ i.name }}</span>
+ </p>
+ </div>
+
+ <div class="flex-end">
+ <span class="label_status" v-if="i.listDate > Date.now()">{{
+ $t("待上市")
+ }}</span>
+ <span class="label_status1" v-else>{{ $t("已上市") }}</span>
+ </div>
+ </div>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("hj81") }}</span>
+ <span>{{ i.stockType | currencySymbol }} {{ i.price }}</span>
</p>
<p class="card_label2 flex-between">
- <span>{{ $t("最低认购金额") }}</span>
- <span>$ 2,000</span>
+ <span>{{ $t("可申购数量") }}</span>
+ <span>{{ i.orderNumber }}</span>
</p>
<p class="card_label2 flex-between">
- <span>{{ $t("交易成功率") }}</span>
- <span>100%</span>
+ <span>{{ $t("发行时间") }}</span>
+ <span>{{ i.subscriptionTime | gettime }}</span>
</p>
<p class="card_label2 flex-between">
- <span>{{ $t("预期收益") }}</span>
- <span>3</span>
+ <span>{{ $t("上市时间") }}</span>
+ <span>{{ i.listDate | gettime }}</span>
</p>
- <p class="card_label2 flex-between">
- <span>{{ $t("交易周期") }}</span>
- <span>1天</span>
- </p>
-
- <p class="card_buy flex-center">
+ <p class="card_buy flex-center" @click="buyOpen(i)">
<van-icon name="add-square" size=".4em" />
- <span>{{ $t("gm") }}</span>
+ <span>{{ $t("申购") }}</span>
</p>
- </div> -->
+ </div>
<!-- 无数据时显示 -->
- <div class="no_data flex-center">
+ <div class="no_data flex-center" v-show="!list || list.length === 0">
<img src="@/assets/img/zhaobudao2.png" alt="" />
</div>
@@ -50,12 +64,32 @@
:pageSize="pageSize"
:total="total"
></n-pagination>
+
+ <!-- 购买弹窗 -->
+ <van-popup v-model="buyShow" round>
+ <van-form class="buy_popup" @submit="popupSubmit">
+ <div class="popup_title flex-center">
+ <span>{{ $t("操作确认") }}</span>
+ </div>
+
+ <div class="buts flex-between">
+ <p class="flex-center" @click="buyShow = false">
+ <span>{{ $t("qx") }}</span>
+ </p>
+ <p class="flex-center" native-type="submit">
+ <van-button native-type="submit">{{ $t("qr") }}</van-button>
+ </p>
+ </div>
+ </van-form>
+ </van-popup>
</div>
</template>
<script>
import PageHead from "@/components/pageHead.vue";
import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
+import { Toast } from "vant";
export default {
components: {
@@ -67,12 +101,61 @@
pageNum: 1,
pageSize: 10,
total: 1,
- searchValue: ""
+ searchValue: "",
+ buyShow: false, // 购买弹窗控制
+ popupData: {}, // 点击购买的数据
+ list: []
};
},
+ watch: {
+ pageNum() {
+ this.list = [];
+ this.getStockSubscribeList();
+ }
+ },
+ created() {
+ this.getStockSubscribeList();
+ },
methods: {
- submit() {
- console.log(this.searchValue);
+ // 购买弹窗
+ buyOpen(i) {
+ this.popupData = i;
+ this.buyShow = true;
+ },
+ // 购买提交
+ async popupSubmit() {
+ let opt = {
+ newCode: this.popupData.code,
+ applyNums: this.popupData.orderNumber,
+ password: this.popupData.password,
+ newlistId: this.popupData.newlistId,
+ type: this.popupData.type,
+ }
+ let data = await api.getNewAdd(opt);
+ console.log(data.status);
+
+ if (data.status == 0) {
+ Toast.success();
+ setTimeout(() => {
+ this.buyShow = false;
+ }, 1000);
+ } else {
+ Toast.fail(data.msg);
+ }
+ },
+ // 获取列表
+ async getStockSubscribeList() {
+ let opt = {
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ };
+ let data = await api.getStockSubscribeList(opt);
+ if (data.status === 0) {
+ this.list = data.data.list;
+ this.total = data.data.total || 1;
+ } else {
+ Toast(data.msg);
+ }
}
}
};
@@ -80,6 +163,7 @@
<style lang="less" scoped>
@green: #c4d600;
+@brown: #ff976a;
.ipo {
font-size: 10vw;
width: 100%;
@@ -124,8 +208,25 @@
.card_label1 {
color: @green;
- height: 1.33em;
-
+ min-height: 1.33em;
+ padding: 0.25em 0;
+ .label_name {
+ // width: 14em;
+ flex: 1;
+ color: #969799;
+ }
+ .label_status {
+ background-color: @brown;
+ color: #fff;
+ padding: 0.3em 0.5em;
+ border-radius: 0.3em;
+ }
+ .label_status1 {
+ background-color: @green;
+ color: #fff;
+ padding: 0.3em 0.5em;
+ border-radius: 0.3em;
+ }
span {
font-size: 0.4em;
}
@@ -137,6 +238,98 @@
margin-right: 0.3em;
font-size: 0.3em;
}
+ .gp {
+ margin-bottom: 0.2em;
+ }
+ }
+ }
+ .buy_popup {
+ width: 8.8em;
+ /deep/ .van-cell {
+ padding: 0;
+ font-size: 0.4em;
+ }
+ /deep/ .van-field__body {
+ // border: 0.01em solid #f5f5f5;
+ // height: 2.5em;
+ // padding: 0 0.5em;
+ // margin-top: 0.5em;
+ }
+ /deep/ .van-field__label {
+ color: #000;
+ }
+ /deep/ .van-stepper__minus {
+ width: 1rem;
+ height: 1rem;
+ }
+ /deep/ .van-stepper__plus {
+ width: 1rem;
+ height: 1rem;
+ }
+ /deep/ .van-stepper__input {
+ height: 1rem;
+ width: 2rem;
+ font-size: 0.4rem;
+ }
+ .division {
+ width: 100%;
+ height: 0.25em;
+ background-color: #f5f5f5;
+ }
+ .popup_title {
+ width: 100%;
+ min-height: 2.22em;
+ font-weight: bold;
+ padding: 0 0.25em;
+ border: #f5f5f5 solid 0.01em;
+ }
+ .popup_name {
+ color: @green;
+ .popup_icon {
+ background: @green;
+ color: #fff;
+ padding: 0.2em 0.35em;
+ border-radius: 0.15em;
+ margin-right: 0.3em;
+ font-size: 0.3em;
+ }
+ }
+ .popup_item {
+ width: 8.3em;
+ margin: 0 auto;
+ padding: 0.35em 0;
+ border-bottom: #f5f5f5 solid 0.01em;
+
+ .zxgm {
+ height: 0.8em;
+ width: 2em;
+ border-radius: 0.1em;
+ border: #ddd solid 0.01em;
+ span {
+ font-size: 0.3em;
+ }
+ }
+ }
+ span {
+ font-size: 0.4em;
+ }
+ .buts {
+ width: 100%;
+ height: 1.22em;
+
+ /deep/ .van-button {
+ border: none;
+ font-size: 1em;
+ color: @green;
+ }
+ p {
+ height: 100%;
+ flex: 1;
+ }
+ & > p:last-child {
+ border-left: #f5f5f5 solid 0.01em;
+ color: @green;
+ }
}
}
diff --git a/src/page/markets/ipoOrder.vue b/src/page/markets/ipoOrder.vue
index e98724a..62ebc4c 100644
--- a/src/page/markets/ipoOrder.vue
+++ b/src/page/markets/ipoOrder.vue
@@ -4,77 +4,83 @@
<div class="order_tabs">
<van-tabs v-model="active" swipe-threshold="1">
- <van-tab :title="$t('hj160')" :name="0"></van-tab>
- <van-tab :title="$t('申购中')" :name="1"></van-tab>
- <van-tab :title="$t('hj70')" :name="2"></van-tab>
- <van-tab :title="$t('待认缴')" :name="3"></van-tab>
- <van-tab :title="$t('待转股')" :name="4"></van-tab>
- <van-tab :title="$t('已转股')" :name="5"></van-tab>
- <van-tab :title="$t('已取消')" :name="6"></van-tab>
- <van-tab :title="$t('未中标')" :name="7"></van-tab>
+ <van-tab :title="$t('hj160')" name=""></van-tab>
+ <van-tab :title="$t('申购中')" name="1"></van-tab>
+ <van-tab :title="$t('hj132')" name="2"></van-tab>
+ <van-tab :title="$t('hj133')" name="3"></van-tab>
+ <van-tab :title="$t('hj134')" name="4"></van-tab>
+ <van-tab :title="$t('hj135')" name="5"></van-tab>
+ <van-tab :title="$t('已上市')" name="6"></van-tab>
</van-tabs>
</div>
- <div class="trading_card" v-for="i in 5" :key="i">
+ <div class="trading_card" v-for="i in list" :key="i.id">
<div class="card_label2 flex-between" style="height:1.8em">
<div>
- <p class="flex-start gp">
+ <p class="flex-between gp">
<span>{{ $t("hj52") }}</span>
+ <!-- <span class="app">TEST03</span> -->
</p>
<p class="flex-start">
- <span class="label_icon">US</span>
- <span class="label_name line-one">Advance Auto Parts Inc.</span>
+ <span class="label_icon">{{ i.stockType }}</span>
+ <span class="label_name line-one">{{ i.newName }}</span>
</p>
- </div>
-
- <div class="flex-end">
- <span class="app">APP</span>
- <van-icon name="arrow" color="#969799" size=".5em" />
</div>
</div>
<p class="card_label2 flex-between">
- <span>{{ $t("sl") }}</span>
- <span>5,000</span>
+ <span>{{ $t("hj81") }}</span>
+ <span>{{ i.stockType | currencySymbol }} {{ i.buyPrice }}</span>
</p>
<p class="card_label2 flex-between">
- <span>{{ $t("hj81") }}</span>
- <span>$ 44.48</span>
+ <span>{{ $t("sl") }}</span>
+ <span>{{ i.applyNums }}</span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("发行时间") }}</span>
+ <span>{{ i.subscriptionTime | gettime }}</span>
+ </p>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("上市时间") }}</span>
+ <span>{{ i.listDate | gettime }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("总金额") }}</span>
- <span class="zje">MX$ 484,920.96</span>
+ <span class="zje">{{ i.stockType | currencySymbol }} {{ i.bond }}</span>
</p>
<p class="card_label2 flex-between">
<span>{{ $t("状态") }}</span>
- <span class="zt">交易中</span>
+ <span class="zt">{{ status[i.status] }}</span>
</p>
-
+
<p class="card_label2 flex-between">
<span>{{ $t("提交时间") }}</span>
- <span>11/07/2025 03:08:18 AM</span>
+ <span>{{ i.addTime }}</span>
</p>
</div>
<!-- 无数据时显示 -->
- <div class="no_data flex-center">
+ <div class="no_data flex-center" v-show="!list || list.length == 0">
<img src="@/assets/img/zhaobudao2.png" alt="" />
</div>
- <n-pagination
+ <!-- <n-pagination
:pageNo.sync="pageNum"
:pageSize="pageSize"
:total="total"
- ></n-pagination>
+ ></n-pagination> -->
</div>
</template>
<script>
import PageHead from "@/components/pageHead.vue";
import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
export default {
components: {
@@ -84,10 +90,42 @@
data() {
return {
pageNum: 1,
- pageSize: 10,
+ pageSize: 1000,
total: 1,
- active: 0
+ active: "",
+ list: [],
+ status: {
+ 1: this.$t("申购中"),
+ 2: this.$t("hj132"),
+ 3: this.$t("hj133"),
+ 4: this.$t("hj134"),
+ 5: this.$t("hj135"),
+ 6: this.$t("已上市")
+ }
};
+ },
+ watch: {
+ pageNum() {
+ this.list = [];
+ this.getStockSubscribeOrderList();
+ },
+ active() {
+ this.getStockSubscribeOrderList();
+ }
+ },
+ created() {
+ this.getStockSubscribeOrderList();
+ },
+ methods: {
+ async getStockSubscribeOrderList() {
+ let opt = {
+ status: this.active
+ };
+ let data = await api.getUserNewGuList(opt);
+ if (data.status === 0) {
+ this.list = data.data;
+ }
+ }
}
};
</script>
@@ -162,10 +200,11 @@
}
.gp {
margin-bottom: 0.2em;
+ width: 9em;
}
.app {
color: @green;
- font-size: 0.6em;
+ font-size: 0.45em;
}
.label_name {
color: @grey-two;
diff --git a/src/page/markets/markets.vue b/src/page/markets/markets.vue
index e66caf3..38ed571 100644
--- a/src/page/markets/markets.vue
+++ b/src/page/markets/markets.vue
@@ -20,17 +20,17 @@
<div class="tabs flex-between">
<div
class="tab_item flex-center"
- :class="{ active: item.value == tab }"
+ :class="{ active: item.pid == tab }"
v-for="item in tabList"
- :key="item.value"
- @click="tab = item.value"
+ :key="item.pid"
+ @click="tab = item.pid"
>
- <span>{{ item.name }}</span>
+ <span>{{ item.abbreviation }}</span>
</div>
</div>
<div class="markets_echart">
- <index-component :ids="'markets'"></index-component>
+ <index-component :ids="'markets'" :dataObj="kData"></index-component>
<!-- <van-skeleton title :row="3" /> -->
</div>
@@ -58,18 +58,25 @@
},
{
text: this.$t("墨西哥"),
- value: "MX",
+ value: "MEX",
name: "墨西哥"
}
],
- tabList: [
- { name: "Dow Jones", value: 1 },
- { name: "S&P 500", value: 2 },
- { name: "NASDAQ", value: 3 }
+ tabList: [],
+ usList: [
+ { abbreviation: "Dow Jones" },
+ { abbreviation: "S&P 500" },
+ { abbreviation: "NASDAQ" }
+ ],
+ mxList: [
+ { abbreviation: "IPC" },
+ { abbreviation: "INMEX" },
+ { abbreviation: "NASDAQ" }
],
tab: 1,
pageNum: 1,
- pageSize: 10
+ pageSize: 10,
+ kData: {}
};
},
components: {
@@ -78,24 +85,67 @@
stockList,
indexComponent
},
+ watch: {
+ tab() {
+ this.getIndicesAndKData();
+ }
+ },
computed: {
- switchText() { // 切换文字
+ switchText() {
+ // 切换文字
return this.$t(this.$store.state.marketsSwitch.name) || this.$t("美国");
},
- propOption() { // 传递给列表组件的类型值
+ propOption() {
+ // 传递给列表组件的类型值
return { stockType: this.$store.state.marketsSwitch.value };
}
},
- created() {
- if (!this.$store.state.marketsSwitch.name) { // 如果没有选过,默认选择第一个
+ async created() {
+ if (!this.$store.state.marketsSwitch.name) {
+ // 如果没有选过,默认选择第一个
this.$store.commit("MARKET_CHANGE", this.actions[0]);
}
+ await this.getTabData();
+ this.tab = this.tabList[0].pid;
},
mounted() {},
methods: {
// 选择
- onSelect(e) {
+ async onSelect(e) {
this.$store.commit("MARKET_CHANGE", e);
+ await this.getTabData();
+ this.tab = this.tabList[0].pid;
+ },
+ // 获取tab数据
+ async getTabData() {
+ let stockType = this.$store.state.marketsSwitch.value;
+ let data = await api.getIndicesList({
+ stockType
+ });
+
+ // 数据重构
+ let list = [];
+ if (stockType == "US") list = this.usList;
+ if (stockType == "MEX") list = this.mxList;
+ this.tabList = list.map((item, index) => {
+ item = { ...item, ...data.data[index + 1] };
+ return item;
+ });
+
+ // console.log("dadadadadad", this.tabList);
+ },
+ // 获取指数图
+ async getIndicesAndKData() {
+ let data = await api.getIndicesAndKData({
+ pid: this.tab,
+ stockType: this.$store.state.marketsSwitch.value
+ });
+ this.kData = data.data;
+ // console.log("getIndicesAndKData", this.kData);
+ },
+ // tab切换
+ tabChange() {
+ this.getIndicesAndKData();
}
}
};
diff --git a/src/page/newUser/setting.vue b/src/page/newUser/setting.vue
index 8b5022e..fd7499a 100644
--- a/src/page/newUser/setting.vue
+++ b/src/page/newUser/setting.vue
@@ -149,7 +149,7 @@
cirNewPassword: "", // 确认新密码
userInfo: [],
onlineService: "",
- language: "",
+ language: ""
};
},
components: { Language },
@@ -243,7 +243,7 @@
// 判断是否登录
this.$store.commit("dialogVisible", false);
this.$store.state.userInfo = data.data;
- document.title = 'Setting'
+ document.title = "Setting";
this.userInfo = data.data;
} else {
this.$store.commit("dialogVisible", true);
@@ -264,7 +264,7 @@
// 退出登录
MessageBox.confirm(this.$t("hj149"), this.$t(""), {
confirmButtonText: this.$t("qr"),
- cancelButtonText: this.$t("hj106"),
+ cancelButtonText: this.$t("hj106")
})
.then(() => {
this.toRegister();
@@ -327,7 +327,7 @@
if (this.newPassword === this.cirNewPassword) {
let opts = {
oldPwd: this.oldPassword,
- newPwd: this.newPassword,
+ newPwd: this.newPassword
};
let data = await api.changePassword(opts);
if (data.status === 0) {
@@ -337,7 +337,7 @@
this.settingDialog = false;
Notify({
type: "success",
- message: this.$t("密码修改成功"),
+ message: this.$t("密码修改成功")
});
this.toRegister();
} else {
@@ -353,27 +353,28 @@
// 支持
navigator.vibrate([55]);
}
- },
- },
+ }
+ }
};
</script>
<style scoped lang="less">
- /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: #14181f;
- }
+@green: #c4d600;
+/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: #14181f;
+}
.right_gos_txt {
margin-right: 15px;
@@ -423,7 +424,7 @@
width: 100%;
height: 1.3rem;
border-radius: 0.15rem;
- background: #2d6ae9;
+ background: @green;
color: #fff;
font-size: 0.4615rem;
margin-top: 0.5rem;
@@ -463,15 +464,15 @@
}
.btn_s_box {
- border: none;
- background: #409eff;
- color: #fff;
+ border: @green solid 0.01em;
+ background: #fff;
+ color: @green;
height: 70px;
width: 100%;
line-height: 70px;
font-size: 16px;
text-align: center;
- border-radius: 15px;
+ border-radius: 5px;
font-weight: 600;
margin: 40px 20px 0 20px;
}
diff --git a/src/page/trading/TradeNew.vue b/src/page/trading/TradeNew.vue
index c7205a8..b56beb8 100644
--- a/src/page/trading/TradeNew.vue
+++ b/src/page/trading/TradeNew.vue
@@ -14,33 +14,42 @@
</van-col>
</van-row>
- <van-row class="list_item" v-for="item in 10" :key="item">
+ <van-row
+ class="list_item"
+ v-for="i in list"
+ :key="i.id"
+ @click="toDetails(i)"
+ >
<van-col span="8" class="item_n">
<div class="flex-start">
- <span class="i_icon">US</span>
- <span class="i_hint">WINVU</span>
+ <span class="i_icon">{{ i.stockGid }}</span>
+ <span class="i_hint">{{ i.stockSpell }}</span>
</div>
- <div class="i_name">124.1</div>
+ <div class="i_name">
+ {{ i.orderNum * i.now_price }}
+ </div>
</van-col>
<van-col span="8" class="item_n">
- <p class="flex-start">18</p>
- <p class="flex-start i_name">24.1 (24.1%)</p>
+ <p class="flex-start">{{ i.orderNum }}</p>
+ <p class="flex-start i_name">
+ {{ i.profitAndLose }} ({{ i.profitAndLoseParent }})
+ </p>
</van-col>
<van-col span="8" class="item_n">
<div class="flex-end" style="margin-bottom: .15em;">
- <span>10</span>
+ <span>{{ i.buyOrderPrice }}</span>
</div>
<div class="flex-end">
- <span>12.41</span>
+ <span>{{ i.now_price }}</span>
</div>
</van-col>
- <van-col span="24" class="flex-start transaction_type">
+ <!-- <van-col span="24" class="flex-start transaction_type">
<span>AI交易</span>
- </van-col>
- <van-col span="24" class="flex-between item_card">
+ </van-col> -->
+ <!-- <van-col span="24" class="flex-between item_card">
<div class="card_label">
<p>建仓成本</p>
- <p>100</p>
+ <p>{{ i.orderTotalPrice }}</p>
</div>
<div class="card_label">
<p>平仓金额</p>
@@ -50,17 +59,69 @@
<p>预期收益</p>
<p>-10</p>
</div>
- </van-col>
+ </van-col> -->
</van-row>
+
+ <!-- 无数据时显示 -->
+ <div class="no_data flex-center" v-show="!list || list.length == 0">
+ <img src="@/assets/img/zhaobudao2.png" alt="" />
+ </div>
+
+ <n-pagination
+ :pageNo.sync="pageNum"
+ :pageSize="pageSize"
+ :total="total"
+ ></n-pagination>
</div>
</template>
<script>
import tabHead from "@/components/tabHead.vue";
+import * as api from "@/axios/api";
+import nPagination from "@/components/nPagination.vue";
export default {
components: {
- tabHead
+ tabHead,
+ nPagination
+ },
+ data() {
+ return {
+ pageNum: 1,
+ pageSize: 1,
+ total: 1,
+ list: []
+ };
+ },
+ watch: {
+ pageNum() {
+ this.getList();
+ }
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ // 获取数据
+ async getList() {
+ let data = await api.getchicang({
+ state: 0,
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ });
+
+ if (data.status === 0) {
+ this.list = data.data.list;
+ this.total = data.data.total;
+ }
+ },
+ // 跳转详情
+ toDetails(i) {
+ this.$router.push({
+ path: "/Stockdetail",
+ query: { codes: i.positionSn }
+ });
+ }
}
};
</script>
@@ -73,9 +134,10 @@
.trade_new {
width: 100%;
- height: 100%;
+ // height: 100%;
background: #fff;
font-size: 10vw;
+ padding-bottom: 1.3rem;
.list_head {
background-color: @green2;
diff --git a/src/page/trading/buy.vue b/src/page/trading/buy.vue
index 17b4a91..ec92d34 100644
--- a/src/page/trading/buy.vue
+++ b/src/page/trading/buy.vue
@@ -19,7 +19,7 @@
<div class="cot">
<div class="lefts">
<div class="top_new">
- <span>₹{{ nowPrice | _toLocaleString }}</span>
+ <span>MX${{ nowPrice | _toLocaleString }}</span>
</div>
<div class="bottom_es">
<span>{{ $t("hj98") }}</span>
@@ -95,29 +95,29 @@
<div class="tr_rs">
<div class="top_bzz" style="padding-bottom: 0.2rem">
<span style="text-align: left">
- {{ $t("交易总额") }}(₹)
+ {{ $t("交易总额") }}(MX$)
</span>
<span style="text-align: right">
- {{ $t("hj103") }}(₹)
+ {{ $t("hj103") }}(MX$)
</span>
</div>
<div class="bottom_bzz">
<span>
- ₹{{
+ MX${{
((nowPrice * selectCycle.replace("X", "")) * num)
| _toLocaleString
}}
</span>
<span style="white-space: nowarp">
- ₹{{ moneyData.availableBalance | _toLocaleString }}
+ MX${{ moneyData.availableBalance | _toLocaleString }}
</span>
</div>
</div>
<div class="tr_rs">
<div class="top_bzz" style="padding-bottom: 0.2rem">
<span style="text-align: left">
- {{ $t("hj44") }}(₹)
+ {{ $t("hj44") }}(MX$)
</span>
<span style="text-align: right">
</span>
@@ -125,7 +125,7 @@
<div class="bottom_bzz">
<span>
- ₹{{(
+ MX${{(
((nowPrice * selectCycle.replace("X", "")) * num)*sxf).toFixed(2)}}
</span>
<span style="white-space: nowarp">
@@ -184,8 +184,8 @@
</div>
</div> -->
<div class="btn_buy" @click="gdOrSetBuy()">
- <!-- <div :class="tabsCurrentIndex == 0 ? 'maichu' : ''">#3b82f6 -->
- <div class="maichu" style="background-color:#3b82f6">
+ <!-- <div :class="tabsCurrentIndex == 0 ? 'maichu' : ''">#c4d600 -->
+ <div class="maichu" style="background-color:#c4d600">
<span>{{ tabsCurrentIndex == 0 ? $t("hj84") : $t("gm") }}</span>
</div>
</div>
diff --git a/src/page/trading/stockRecord.vue b/src/page/trading/stockRecord.vue
new file mode 100644
index 0000000..8ed4321
--- /dev/null
+++ b/src/page/trading/stockRecord.vue
@@ -0,0 +1,205 @@
+<template>
+ <div class="stock_record">
+ <page-head :title="$t('hj121')"> </page-head>
+
+ <div class="trading_card" v-for="i in list" :key="i.id">
+ <p class="card_label2 flex-between">
+ <span>{{ $t("訂單編號") }}</span>
+ <span> {{ i.buyOrderId }}</span>
+ </p>
+
+ <div class="card_label1 flex-between" @click="toDetails(i)">
+ <div>
+ <p class="flex-start gp">
+ <span>{{ i.stockName }}</span>
+ </p>
+ <p class="flex-start">
+ <span class="label_icon">{{ i.stockGid }}</span>
+ <span class="label_name line-one">{{ i.stockSpell }}</span>
+ </p>
+ </div>
+
+ <div class="flex-end">
+ <van-icon name="arrow" size=".4em" />
+ </div>
+ </div>
+
+ <p class="card_label2 flex-between">
+ <span>{{ $t("倉位(股)") }}</span>
+ <span>{{ i.orderNum }}</span>
+ </p>
+
+ <p class="card_label2 flex-center">
+ <van-button
+ plain
+ type="primary"
+ round block
+ @click="$router.push(`/Stockdetail?codes=${i.positionSn}`)"
+ >{{ $t("hj238") }}</van-button
+ >
+ </p>
+ </div>
+
+ <!-- 无数据时显示 -->
+ <div class="no_data flex-center" v-show="!list || list.length === 0">
+ <img src="@/assets/img/zhaobudao2.png" alt="" />
+ </div>
+
+ <n-pagination
+ :pageNo.sync="pageNum"
+ :pageSize="pageSize"
+ :total="total"
+ ></n-pagination>
+ </div>
+</template>
+<script>
+import PageHead from "@/components/pageHead.vue";
+import nPagination from "@/components/nPagination.vue";
+import * as api from "@/axios/api";
+export default {
+ name: "stockRecord",
+ components: {
+ PageHead,
+ nPagination
+ },
+ data() {
+ return {
+ pageNum: 1,
+ pageSize: 10,
+ total: 1,
+ list: []
+ };
+ },
+ watch: {
+ pageNum() {
+ this.getList();
+ }
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ // 获取数据
+ async getList() {
+ let data = await api.getchicang({
+ state: 1,
+ pageNum: this.pageNum,
+ pageSize: this.pageSize
+ });
+
+ if (data.status === 0) {
+ this.list = data.data.list;
+ this.total = data.data.total;
+ }
+ },
+ // 点击进入详情
+ toDetails(item) {
+ const obj = {
+ pid: item.stockCode || "",
+ type: item.stockGid || ""
+ };
+ window.localStorage.setItem("kLine", JSON.stringify(obj));
+
+ this.$router.push({
+ path: "/kline",
+ query: {
+ code: item.stockCode,
+ type: item.stockGid
+ }
+ });
+ }
+ }
+};
+</script>
+<style lang="less" scoped>
+@green: #c4d600;
+@brown: #ff976a;
+.stock_record {
+ font-size: 10vw;
+ width: 100%;
+ background-color: #f5f5f5;
+ min-height: 100vh;
+ padding-bottom: 0.3em;
+
+ .trading_card {
+ width: 9.5em;
+ margin: 0.25em auto 0;
+ border-radius: 0.25em;
+ background: #fff;
+ .card_buy {
+ height: 1.33em;
+ color: @green;
+ box-shadow: 0 -0.05333rem 0.26667rem #0000000d;
+
+ span {
+ font-size: 0.45em;
+ font-weight: 600;
+ margin-left: 0.2em;
+ }
+ }
+ .card_label2,
+ .card_label1 {
+ margin: 0 auto;
+ width: 9em;
+ border-bottom: #f5f5f5 solid 0.01em;
+ }
+ .card_label2 {
+ height: 1.1em;
+ color: #323233;
+ span {
+ font-size: 0.4em;
+ font-weight: 300;
+ }
+ & > span:last-child {
+ color: #969799;
+ font-size: 0.36em;
+ }
+ /deep/ .van-button__text {
+ font-size: 1.2em;
+ }
+ /deep/ .van-button--plain.van-button--primary {
+ color: @green;
+ border-color: @green;
+ }
+ }
+
+ .card_label1 {
+ color: @green;
+ min-height: 1.33em;
+ padding: 0.25em 0;
+ .label_name {
+ // width: 14em;
+ flex: 1;
+ color: #969799;
+ }
+ .label_status {
+ background-color: @brown;
+ color: #fff;
+ padding: 0.3em 0.5em;
+ border-radius: 0.3em;
+ }
+ .label_status1 {
+ background-color: @green;
+ color: #fff;
+ padding: 0.3em 0.5em;
+ border-radius: 0.3em;
+ }
+ span {
+ font-size: 0.4em;
+ }
+ .label_icon {
+ background: @green;
+ color: #fff;
+ padding: 0.2em 0.35em;
+ border-radius: 0.15em;
+ margin-right: 0.3em;
+ font-size: 0.3em;
+ }
+ .gp {
+ margin-bottom: 0.2em;
+ color: #333;
+ }
+ }
+ }
+}
+</style>
diff --git a/src/page/user/Warehouse/Stockdetail.vue b/src/page/user/Warehouse/Stockdetail.vue
index 4a23891..688d90b 100644
--- a/src/page/user/Warehouse/Stockdetail.vue
+++ b/src/page/user/Warehouse/Stockdetail.vue
@@ -12,37 +12,62 @@
</van-nav-bar>
<div class="bottomIfr">
- <div class="pagebox">
- <div class="pagebox_left">{{ $t("盈虧") }} (INR)</div>
- <div class="pagebox_right">₹{{ pages.profitAndLose | _toString }}</div>
+ <div class="pagebox" @click="toDetails">
+ <div class="pagebox_left">
+ <span class="i_icon">{{ pages.stockGid }}</span>
+ <span class="i_hint">{{ pages.stockSpell }}</span>
+ </div>
+ <div class="pagebox_right">
+ <van-icon name="arrow" size="1.2em" />
+ </div>
</div>
<div class="pagebox">
- <div class="pagebox_left">{{ $t("hj141") }} (INR)</div>
- <div class="pagebox_right">₹{{ pages.profitAndLoseParent }}</div>
+ <div class="pagebox_left">{{ $t("盈虧") }}</div>
+ <div class="pagebox_right">
+ {{ pages.stockGid | currencySymbol }}
+ {{ pages.profitAndLose | _toString }}
+ </div>
+ </div>
+ <div class="pagebox">
+ <div class="pagebox_left">{{ $t("hj141") }}</div>
+ <div class="pagebox_right">
+ {{ pages.stockGid | currencySymbol }} {{ pages.profitAndLoseParent }}
+ </div>
</div>
<div class="pagebox">
<div class="pagebox_left">{{ $t("倉位(股)") }}</div>
- <div class="pagebox_right">₹{{ pages.orderNum }}</div>
+ <div class="pagebox_right">{{ pages.orderNum }}</div>
</div>
<div class="pagebox" v-if="pages.now_price">
- <div class="pagebox_left">{{ $t("hj40") }}(INR)</div>
- <div class="pagebox_right">₹{{ pages.now_price | _toString }}</div>
+ <div class="pagebox_left">{{ $t("hj40") }}</div>
+ <div class="pagebox_right">
+ {{ pages.stockGid | currencySymbol }}
+ {{ pages.now_price | _toString }}
+ </div>
</div>
<div class="pagebox">
<div class="pagebox_left">
- {{ $t("持倉價") }} (INR)
+ {{ $t("持倉價") }}
</div>
- <div class="pagebox_right">₹{{ pages.buyOrderPrice | _toString }}</div>
+ <div class="pagebox_right">
+ {{ pages.stockGid | currencySymbol }}
+ {{ pages.buyOrderPrice | _toString }}
+ </div>
</div>
<div class="pagebox">
<div class="pagebox_left">
- {{ $t("訂單金額") }} (INR)
+ {{ $t("訂單金額") }}
</div>
- <div class="pagebox_right">₹{{ pages.orderTotalPrice | _toString }}</div>
+ <div class="pagebox_right">
+ {{ pages.stockGid | currencySymbol }}
+ {{ pages.orderTotalPrice | _toString }}
+ </div>
</div>
<div class="pagebox">
- <div class="pagebox_left">{{ $t("hj44") }} (INR)</div>
- <div class="pagebox_right">₹{{ pages.orderFee | _toString }}</div>
+ <div class="pagebox_left">{{ $t("hj44") }}</div>
+ <div class="pagebox_right">
+ {{ pages.stockGid | currencySymbol }} {{ pages.orderFee | _toString }}
+ </div>
</div>
<div class="pagebox">
<div class="pagebox_left">
@@ -50,7 +75,6 @@
</div>
<div class="pagebox_right">{{ pages.buyOrderId }}</div>
</div>
-
<div class="pagebox" v-if="pages.buyOrderTime">
<div class="pagebox_left">{{ $t("持倉時間") }}</div>
<div class="pagebox_right">
@@ -63,16 +87,52 @@
{{ $moment(pages.sellOrderTime).format("DD-MM-YYYY hh:mm:ss A") }}
</div>
</div>
+ <div class="buttonbox flex-center" v-show="!pages.sellOrderTime">
+ <van-button type="primary" @click="close"> {{ $t("平仓") }}</van-button>
+ </div>
+
+ <Dialog ref="closeDialog" :title="$t('确认平仓')" :confirm="confirm">
+ <template v-slot:center>
+ <div>
+ <div class="hang">
+ <div class="left">{{ $t("hj39") }}</div>
+ <div class="right">{{ pages.stockName }}</div>
+ </div>
+ <div class="hang">
+ <div class="left">{{ $t("買漲/買跌") }}</div>
+ <div class="right">{{ $t(pages.orderDirection) }}</div>
+ </div>
+ <div class="hang">
+ <div class="left">{{ $t("倉位(股)") }}</div>
+ <input
+ class="input_box"
+ type="number"
+ :max="pages.orderNum"
+ :placeholder="$t('hj262')"
+ v-model="ordernum"
+ />
+ </div>
+ <div class="hang">
+ <div class="left">{{ $t("類型") }}</div>
+ <div class="right">{{ $t("市價") }}</div>
+ </div>
+ </div>
+ </template>
+ </Dialog>
</div>
</div>
</template>
<script>
+import Dialog from "@/components/Dialog";
import * as api from "@/axios/api";
+import { Notify } from "vant";
export default {
+ components: { Dialog },
data() {
return {
pages: {},
+ ordernum: ""
};
},
// 生命周期 - 创建完成(访问当前this实例)
@@ -88,17 +148,55 @@
},
async getInfoSite() {
var res = {
- positionSn: this.$route.query.codes,
+ positionSn: this.$route.query.codes
};
let data = await api.findByPostionSn(res);
if (data.status === 0) {
this.pages = data.data;
}
},
- },
+ // 点击进入详情
+ toDetails() {
+ const obj = {
+ pid: this.pages.stockCode || "",
+ type: this.pages.stockGid || ""
+ };
+ window.localStorage.setItem("kLine", JSON.stringify(obj));
+
+ this.$router.push({
+ path: "/kline",
+ query: {
+ code: this.pages.stockCode,
+ type: this.pages.stockGid
+ }
+ });
+ },
+ // 打开平仓弹窗
+ close() {
+ this.$refs.closeDialog.show = true;
+ this.ordernum = "";
+ },
+ // 平仓
+ async confirm() {
+ this.$refs.closeDialog.show = false;
+ const res = await api.sell({
+ positionSn: this.pages.positionSn,
+ number: this.ordernum
+ });
+ if (res.status === 0) {
+ this.finished = false;
+ Notify({ type: "success", message: res.msg });
+ this.$router.go(-1);
+ } else {
+ Notify({ type: "danger", message: res.msg });
+ }
+ }
+ }
};
</script>
-<style scoped lang='less'>
+<style scoped lang="less">
+@dark_green: #07c160;
+@green: #c4d600;
/deep/ .van-nav-bar__content {
height: 65px;
}
@@ -124,14 +222,62 @@
height: calc(100% - 65px);
// height:;
background-color: #fff !important;
+ font-size: 10vw;
+
+ .buttonbox {
+ padding-top: 1.2em;
+
+ /deep/ .van-button--primary {
+ background-color: @green;
+ border-color: @green;
+ font-size: 0.4em;
+ }
+ }
}
.pagebox {
- margin: 0 15px;
- height: 60px;
+ margin: 0 0.6em;
+ height: 3.2em;
+ font-size: 0.4em;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #ddd;
+
+ .i_icon {
+ border-radius: 0 26em 26em 0;
+ background: @dark_green;
+ color: #fff;
+ padding: 0.1em 0.5em 0.1em 0.4em;
+ margin-right: 0.3em;
+ font-size: 0.8em;
+ }
+
+ .i_name {
+ margin-top: 0.2em;
+ // color: #777777;
+ font-size: 0.9em;
+ }
+ .pagebox_right {
+ color: #969799;
+ }
+}
+
+.hang {
+ display: flex;
+ justify-content: space-between;
+ .left {
+ font-style: normal;
+ font-weight: 500;
+ font-size: 0.34667rem;
+ color: #8c9fad;
+ }
+ .right {
+ font-style: normal;
+ font-weight: 500;
+ font-size: 0.34667rem;
+ color: #14181f;
+ text-align: right;
+ }
}
.conentIfr {
width: 100%;
diff --git a/src/page/user/account.vue b/src/page/user/account.vue
index b140d42..c241500 100644
--- a/src/page/user/account.vue
+++ b/src/page/user/account.vue
@@ -19,8 +19,8 @@
</div>
<div class="wallet_price flex-between">
- <span>MX$ 16,407,946.28</span>
- <span>MX$ 3,247,918.14</span>
+ <span>{{ moneyData.symbol }} {{ moneyData.totalMoney }}</span>
+ <span>{{ moneyData.symbol }} {{ moneyData.availableBalance }}</span>
</div>
<div class="wallet_price_name flex-between">
@@ -28,22 +28,22 @@
<span>{{ $t("hj48") }}</span>
</div>
- <div class="wallet_record flex-center">
+ <div class="wallet_record flex-center" @click="toPage('/Record')">
<span>{{ $t("账户变动记录") }}</span>
<van-icon name="play" size=".5em" />
</div>
</div>
<div class="account_tabs flex-between">
- <div class="tab flex-center ">
+ <div class="tab flex-center" @click="toPage('/recharge')">
<img src="@/assets/img/cz.png" alt="" />
<span>{{ $t("hj172") }}</span>
</div>
- <div class="tab flex-center ">
+ <div class="tab flex-center" @click="toPage('/RechargeSure')">
<img src="@/assets/img/tx.png" alt="" />
<span>{{ $t("subdka") }}</span>
</div>
- <div class="tab flex-center ">
+ <div class="tab flex-center" @click="toPage('/rechargelist')">
<img src="@/assets/img/jl.png" alt="" />
<span>{{ $t("jl") }}</span>
</div>
@@ -51,12 +51,12 @@
<div class="account_card">
<div class="held_head flex-between">
- <div class="flex-center head_left">
+ <div class="flex-center head_left" @click="toPage('/tradeNew')">
<span>{{ $t("hj2") }}</span>
<img src="@/assets/img/cc_ss.png" alt="" />
</div>
- <div class="flex-center head_right">
- <span>{{ $t("jl") }}</span>
+ <div class="flex-center head_right" @click="toPage('/stockRecord')">
+ <span>{{ $t("hj121") }}</span>
<img src="@/assets/img/cc_jl.png" alt="" />
</div>
</div>
@@ -67,7 +67,7 @@
<p>{{ $t("Worth") }}</p>
</div>
<div class="item_right flex-end">
- 3,010 MXN
+ {{ positionData.mxMarketValue }} MXN
</div>
</div>
@@ -76,9 +76,24 @@
<span class="held_icon">MEX</span>
<p>{{ $t("持仓收益") }}</p>
</div>
- <div class="item_right flex-end" :class="'rise'">
- <img src="@/assets/img/rise.png" alt="" />
- 2,010 (201%)
+ <div
+ class="item_right flex-end"
+ :class="{
+ descend: positionData.mxPositionEarnings < 0,
+ rise: positionData.mxPositionEarnings > 0
+ }"
+ >
+ <img
+ src="@/assets/img/rise.png"
+ v-if="positionData.mxPositionEarnings > 0"
+ />
+ <img
+ src="@/assets/img/descend.png"
+ alt=""
+ v-else-if="positionData.mxPositionEarnings < 0"
+ />
+ {{ positionData.mxPositionEarnings }}
+ ({{ positionData.mxPositionEarningsParent }})
</div>
</div>
@@ -88,7 +103,7 @@
<p>{{ $t("Worth") }}</p>
</div>
<div class="item_right flex-end">
- 685,059.11 USD
+ {{ positionData.usMarketValue }} USD
</div>
</div>
@@ -97,9 +112,24 @@
<span class="held_icon2">US</span>
<p>{{ $t("持仓收益") }}</p>
</div>
- <div class="item_right flex-end" :class="'descend'">
- <img src="@/assets/img/descend.png" alt="" />
- 191,980.42 (38.94%)
+ <div
+ class="item_right flex-end"
+ :class="{
+ descend: positionData.usPositionEarnings < 0,
+ rise: positionData.usPositionEarnings > 0
+ }"
+ >
+ <img
+ src="@/assets/img/rise.png"
+ v-if="positionData.usPositionEarnings > 0"
+ />
+ <img
+ src="@/assets/img/descend.png"
+ alt=""
+ v-else-if="positionData.usPositionEarnings < 0"
+ />
+ {{ positionData.usPositionEarnings }}
+ ({{ positionData.usPositionEarningsParent }})
</div>
</div>
</div>
@@ -116,12 +146,28 @@
},
data() {
return {
- userInfo: {}
+ userInfo: {}, // 用户信息
+ moneyData: {}, // 账户金额
+ positionData: {} // 账户持仓数据
};
},
methods: {
+ // 获取账户金额
+ async getMoney() {
+ let data = await api.getMoney();
+ if (data.status === 0) {
+ this.moneyData = data.data[0];
+ }
+ },
+ // 获取账户持仓数据
+ async getMyPositionProfitAndLose() {
+ let data = await api.getMyPositionProfitAndLose();
+ if (data.status === 0) {
+ this.positionData = data.data;
+ }
+ },
+ // 获取用户信息
async getUserInfo() {
- // 获取用户信息
let data = await api.getUserInfodata();
if (data.status === 0) {
// 判断是否登录
@@ -131,10 +177,17 @@
} else {
this.$store.commit("dialogVisible", true);
}
+ },
+ // 跳转
+ toPage(url) {
+ if (!url) return;
+ this.$router.push(url);
}
},
created() {
this.getUserInfo();
+ this.getMoney();
+ this.getMyPositionProfitAndLose();
}
};
</script>
@@ -146,7 +199,7 @@
@dark_green: #07c160;
.account {
width: 100%;
- height: 100%;
+ min-height: 100vh;
background: #fff;
font-size: 10vw;
padding-top: 0.2em;
diff --git a/src/page/user/recharge-sure.vue b/src/page/user/recharge-sure.vue
index aa8f783..5773c17 100644
--- a/src/page/user/recharge-sure.vue
+++ b/src/page/user/recharge-sure.vue
@@ -205,7 +205,7 @@
clipboard.onClick(e);
},
onClickLeft() {
- this.$router.push("/user");
+ this.$router.push("/account");
},
yhkselect(e) {
this.yhkrechargeSelect = e;
@@ -235,10 +235,12 @@
</script>
<style lang="less" scoped>
+@green: #c4d600;
.but {
width: 100%;
color: #ffffff;
- background-color: #1989fa;
+ background-color: @green;
+ border: none;
border-radius: 8px;
height: 66px;
font-size: 22px;
@@ -354,7 +356,7 @@
cursor: pointer;
}
.myr {
- color: rgb(5, 106, 239);
+ color: @green;
cursor: pointer;
}
.dz-title {
diff --git a/src/page/user/recharge.vue b/src/page/user/recharge.vue
index 9e90069..f5c032c 100644
--- a/src/page/user/recharge.vue
+++ b/src/page/user/recharge.vue
@@ -39,8 +39,8 @@
If you encounter any deposit problems, please contact online customer service
</div>
<div style="display: flex;justify-content: space-between;align-items: center;margin-top: 20px;">
- <div class="payclass" @click="paytype=1" :style="paytype==1?'border: 1px solid #1989FA;':'border: 1px solid #e5e8ed;'">Pay 1</div>
- <div class="payclass" @click="paytype=2" :style="paytype==2?'border: 1px solid #1989FA;':'border: 1px solid #e5e8ed;'">Pay 2</div>
+ <div class="payclass" @click="paytype=1" :style="paytype==1?'border: 1px solid #c4d600;':'border: 1px solid #e5e8ed;'">Pay 1</div>
+ <div class="payclass" @click="paytype=2" :style="paytype==2?'border: 1px solid #c4d600;':'border: 1px solid #e5e8ed;'">Pay 2</div>
</div>
<van-button class="but" type="primary" style="margin-top: 1.04rem; margin-bottom: 1.04rem"
@click="selCzFns">{{ $t("hj172") }}</van-button>
@@ -193,7 +193,7 @@
clipboard.onClick(e);
},
onClickLeft() {
- this.$router.push("/user");
+ this.$router.push("/account");
},
select(e) {
this.rechargeSelect = e;
@@ -226,7 +226,8 @@
.but {
width: 100%;
color: #ffffff;
- background-color: #1989fa;
+ background-color: #c4d600;
+ border: none;
border-radius: 8px;
height: 66px;
font-size: 22px;
diff --git a/src/page/watchlists/watchlists.vue b/src/page/watchlists/watchlists.vue
index ea3f028..8c7245e 100644
--- a/src/page/watchlists/watchlists.vue
+++ b/src/page/watchlists/watchlists.vue
@@ -1,125 +1,143 @@
<template>
- <div class="watchlists">
- <tab-head></tab-head>
+ <div class="watchlists">
+ <tab-head></tab-head>
- <div class="swiper">
- <div class="swiper-wrapper flex-start">
- <div class="swiper-slide">
- <index-component :ids="'watchlists1'"></index-component>
- </div>
- <div class="swiper-slide">
- <index-component :ids="'watchlists2'"></index-component>
- </div>
- <div class="swiper-slide">
- <index-component :ids="'watchlists3'"></index-component>
- </div>
- </div>
+ <div class="swiper">
+ <div class="swiper-wrapper flex-start">
+ <div class="swiper-slide" v-for="i in usDataStockBeans" :key="i.id">
+ <index-component :ids="'c' + i.id" :dataObj="i"></index-component>
</div>
-
- <div class="division"></div>
-
- <div class="subheading">
- <div class="subheading_title flex-start">
- <img src="../../assets/img/shortcut.png" alt="">
- <span style="flex:1">{{ $t('hj61') }}</span>
- <span class="edit" @click="onEdit">{{ editorShow ? $t('完成') : $t('编辑') }}</span>
- </div>
-
- <stock-list ref="stockList"></stock-list>
- </div>
+ </div>
</div>
+
+ <div class="division"></div>
+
+ <div class="subheading">
+ <div class="subheading_title flex-start">
+ <img src="../../assets/img/shortcut.png" alt="" />
+ <span style="flex:1">{{ $t("hj61") }}</span>
+ <span class="edit" @click="onEdit">{{
+ editorShow ? $t("完成") : $t("编辑")
+ }}</span>
+ </div>
+
+ <stock-list
+ ref="stockList"
+ :listApi="listApi"
+ :editorShow.sync="editorShow"
+ ></stock-list>
+ </div>
+ </div>
</template>
<script>
import tabHead from "@/components/tabHead.vue";
import indexComponent from "@/components/index-component.vue";
import stockList from "@/components/stock-list.vue";
+import * as api from "@/axios/api";
export default {
- name: 'watchlists',
- components: {
- tabHead, indexComponent, stockList
+ name: "watchlists",
+ components: {
+ tabHead,
+ indexComponent,
+ stockList
+ },
+ computed: {},
+ data() {
+ return {
+ msg: "watchlists",
+ editorShow: false,
+ usDataStockBeans: [],
+ listApi: api.getMyList
+ };
+ },
+ created() {
+ this.getData();
+ },
+ methods: {
+ onEdit() {
+ // this.$refs.stockList.onEdit();
+ this.editorShow = !this.editorShow;
},
- computed: {
- },
- data() {
- return {
- msg: 'watchlists',
- editorShow: false,
- }
- },
- methods: {
- onEdit() {
- this.$refs.stockList.onEdit()
- this.editorShow = !this.editorShow
- }
+
+ // 获取首页数据
+ async getData() {
+ let data = await api.getHomePageData();
+
+ console.log(data.data.usDataStockBeans, "djwkaldjwaldkj");
+
+ this.usDataStockBeans = data.data.usDataStockBeans.map(item => {
+ item.kData = item.kdata;
+ return item;
+ });
}
-}
+ }
+};
</script>
<style lang="less" scoped>
@green: #c4d600;
.watchlists {
- font-size: 10vw;
- width: 100vw;
- min-height: 100vh;
- padding-bottom: 1.5rem;
+ font-size: 10vw;
+ width: 100vw;
+ min-height: 100vh;
+ padding-bottom: 1.5rem;
- .subheading {
- padding-bottom: .25em;
+ .subheading {
+ padding-bottom: 0.25em;
- .subheading_title {
- display: flex;
- align-items: center;
- padding: .35em .25em .35em .25em;
+ .subheading_title {
+ display: flex;
+ align-items: center;
+ padding: 0.35em 0.25em 0.35em 0.25em;
- .edit {
- color: @green;
- }
+ .edit {
+ color: @green;
+ }
- img {
- width: .5em;
- height: .5em;
- margin-right: .25em;
- }
+ img {
+ width: 0.5em;
+ height: 0.5em;
+ margin-right: 0.25em;
+ }
- span {
- font-size: .5em;
- line-height: .5em;
- font-weight: 500;
- }
- }
+ span {
+ font-size: 0.5em;
+ line-height: 0.5em;
+ font-weight: 500;
+ }
+ }
+ }
+
+ .division {
+ width: 100%;
+ height: 0.25em;
+ background-color: #f5f5f5;
+ }
+
+ .swiper {
+ width: 10em;
+ overflow-x: auto;
+ padding-bottom: 0.25em;
+
+ &::-webkit-scrollbar {
+ display: none;
}
- .division {
- width: 100%;
- height: .25em;
- background-color: #f5f5f5;
+ .swiper-wrapper {
+ width: 14.5em;
+ margin-top: 0.4em;
+ padding-left: 0.25em;
+
+ .swiper-slide {
+ margin-right: 0.25em;
+ width: 4.5em;
+ height: 3.2em;
+ background-color: rgba(red, 0.1);
+ border-radius: 0.1em;
+ }
}
-
- .swiper {
- width: 10em;
- overflow-x: auto;
- padding-bottom: .25em;
-
- &::-webkit-scrollbar {
- display: none;
- }
-
- .swiper-wrapper {
- width: 14.5em;
- margin-top: .4em;
- padding-left: .25em;
-
- .swiper-slide {
- margin-right: .25em;
- width: 4.5em;
- height: 3.2em;
- background-color: rgba(red, .1);
- border-radius: .1em;
- }
- }
- }
-
+ }
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/router/index.js b/src/router/index.js
index 8c68275..4a98d02 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -191,6 +191,30 @@
},
component: () => import("@/page/markets/ipoOrder.vue")
},
+ // 理财基金
+ {
+ path: "/fund",
+ name: "fund",
+ meta: {
+ title: i18n.t("理财基金"),
+ requireAuth: true,
+ show: true,
+ index: 1
+ },
+ component: () => import("@/page/markets/fund.vue")
+ },
+ // 理财基金订单
+ {
+ path: "/fundOrder",
+ name: "fundOrder",
+ meta: {
+ title: i18n.t("基金订单"),
+ requireAuth: true,
+ show: true,
+ index: 2
+ },
+ component: () => import("@/page/markets/fundOrder.vue")
+ },
// 自选
{
path: "/watchlists",
@@ -213,7 +237,19 @@
},
component: () => import("@/page/trading/TradeNew.vue")
},
- // 新交易页面
+ // 平仓记录页面
+ {
+ path: "/stockRecord",
+ name: "stockRecord",
+ meta: {
+ title: i18n.t("jl"),
+ requireAuth: true,
+ show: true,
+ index: 1
+ },
+ component: () => import("@/page/trading/stockRecord.vue")
+ },
+ // 账户页面
{
path: "/account",
name: "account",
@@ -235,6 +271,18 @@
index: 1
},
component: () => import("@/page/home/newList.vue")
+ },
+ // 指数图
+ {
+ path: "/kLineIndex",
+ name: "kLineIndex",
+ meta: {
+ title: i18n.t("hj238"),
+ requireAuth: true,
+ show: true,
+ index: 1
+ },
+ component: () => import("@/page/kline/kIndex.vue")
},
//#endregion
//#region 旧路由---------------------------------------------
@@ -630,6 +678,7 @@
title: i18n.t("订单详情"),
requireAuth: true,
hasHeader: false,
+ show: true,
index: 22
},
component: Stockdetail
diff --git a/src/utils/filter.js b/src/utils/filter.js
index 4e7ed63..d07651c 100644
--- a/src/utils/filter.js
+++ b/src/utils/filter.js
@@ -49,3 +49,38 @@
// 重新组合金额和小数部分
return amount + decimalPart;
}
+// 根据type返回货币符号
+export function currencySymbol(type) {
+ if (type == "US") return "$";
+ else if (type == "MEX") return "MX$";
+}
+// 根据时间戳返回时间
+export function gettime(time) {
+ if (!time) {
+ return "";
+ }
+ var nd = new Date(time);
+ var y = nd.getFullYear();
+ var mm = nd.getMonth() + 1;
+ var d = nd.getDate();
+ var h = nd.getHours();
+ var m = nd.getMinutes();
+ var c = nd.getSeconds();
+ if (mm < 10) {
+ mm = "0" + mm;
+ }
+ if (d < 10) {
+ d = "0" + d;
+ }
+ if (h < 10) {
+ h = "0" + h;
+ }
+ if (m < 10) {
+ m = "0" + m;
+ }
+ if (c < 10) {
+ c = "0" + c;
+ }
+ // 17:35:2922-06-2022
+ return d + "-" + mm + "-" + y + " " + h + ":" + m + ":" + c;
+}
diff --git a/static/css/public1.css b/static/css/public1.css
index 0567901..0ad7c94 100644
--- a/static/css/public1.css
+++ b/static/css/public1.css
@@ -12643,12 +12643,12 @@
}
.mint-msgbox-confirm {
- color: #26a2ff;
+ color: #c4d600;
width: 50%
}
.mint-msgbox-confirm:active {
- color: #26a2ff
+ color: #c4d600
}
.msgbox-bounce-enter {
diff --git a/static/css/public2.css b/static/css/public2.css
index 56d197e..bfd1cb4 100644
--- a/static/css/public2.css
+++ b/static/css/public2.css
@@ -12672,12 +12672,12 @@
}
.mint-msgbox-confirm {
- color: #26a2ff;
+ color: #c4d600;
width: 50%
}
.mint-msgbox-confirm:active {
- color: #26a2ff
+ color: #c4d600
}
.msgbox-bounce-enter {
--
Gitblit v1.9.3