From 20c7c22d0394e6bfb9a4edda75c562b9a88603d8 Mon Sep 17 00:00:00 2001
From: vee <897831508@qq.com>
Date: Wed, 31 Aug 2022 17:17:53 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E7=BA=A6=E4=B8=8B=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/positionList/positionList.vue | 2 +
components/transaction/transaction.vue | 864 ++++++++++++-----------
main.js | 2 +
package-lock.json | 546 ++++++++++++++
package.json | 1 +
pages/markets/index.vue | 7 +-
pages/markets/trade.vue | 146 ++--
utils/axios.js | 4 +-
8 files changed, 1084 insertions(+), 488 deletions(-)
diff --git a/components/positionList/positionList.vue b/components/positionList/positionList.vue
index 8f6edac..dd3e973 100644
--- a/components/positionList/positionList.vue
+++ b/components/positionList/positionList.vue
@@ -43,6 +43,8 @@ export default {
}
},
+
+
bboList:{
type: Object,
default: () => {}
diff --git a/components/transaction/transaction.vue b/components/transaction/transaction.vue
index 0e28f38..45dd379 100644
--- a/components/transaction/transaction.vue
+++ b/components/transaction/transaction.vue
@@ -1,420 +1,446 @@
-
-
-
- {{ i18n.LONG }}
- {{ i18n.SHORT }}
-
-
-
- {{ priceTypeList[priceTypeValue].text }}
-
-
-
-
- {{ item.text }}
-
-
-
-
-
- {{ i18n.MarketOptimalPrice }}
-
-
- {{ currency }}
-
-
-
-
- {{ leverageValue }}
-
-
-
- {{ item }}
-
-
-
-
-
-
-
- {{ coin }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ type === 'buy' ? `${i18n.buyLong}${coin}` : `${i18n.sellSHORT}${coin}` }}
-
-
-
-
-
-
-
diff --git a/main.js b/main.js
index f5bd8d8..fe98342 100644
--- a/main.js
+++ b/main.js
@@ -14,9 +14,11 @@ import VI from './utils/language/vi_VN.js'
import api from './utils/api.js'
import constant from './utils/constant.js'
import websocket from './utils/websocket.js'
+import math from './utils/math.js'
Vue.prototype.$api = api
Vue.prototype.$constant = constant
Vue.prototype.$websocket = websocket
+Vue.prototype.$math = math
// 自定义底部导航栏
import tabBar from 'components/tabBar/tabBar.vue'
Vue.component('tab-bar', tabBar)
diff --git a/package-lock.json b/package-lock.json
index 1eb86c7..c6286c5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,10 +12,34 @@
"axios": "^0.27.2",
"echarts": "^5.3.3",
"js-md5": "^0.7.3",
+ "mathjs": "^11.1.0",
"uview-ui": "^2.0.33",
"vue-i18n": "^9.2.2"
}
},
+ "node_modules/@babel/parser": {
+ "version": "7.18.13",
+ "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.18.13.tgz",
+ "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==",
+ "peer": true,
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.18.9",
+ "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.18.9.tgz",
+ "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==",
+ "dependencies": {
+ "regenerator-runtime": "^0.13.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
"node_modules/@intlify/core-base": {
"version": "9.2.2",
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.2.2.tgz",
@@ -73,11 +97,123 @@
"node": ">= 14"
}
},
+ "node_modules/@vue/compiler-core": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.2.38.tgz",
+ "integrity": "sha512-/FsvnSu7Z+lkd/8KXMa4yYNUiqQrI22135gfsQYVGuh5tqEgOB0XqrUdb/KnCLa5+TmQLPwvyUnKMyCpu+SX3Q==",
+ "peer": true,
+ "dependencies": {
+ "@babel/parser": "^7.16.4",
+ "@vue/shared": "3.2.38",
+ "estree-walker": "^2.0.2",
+ "source-map": "^0.6.1"
+ }
+ },
+ "node_modules/@vue/compiler-dom": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.2.38.tgz",
+ "integrity": "sha512-zqX4FgUbw56kzHlgYuEEJR8mefFiiyR3u96498+zWPsLeh1WKvgIReoNE+U7gG8bCUdvsrJ0JRmev0Ky6n2O0g==",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-core": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
+ "node_modules/@vue/compiler-sfc": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.2.38.tgz",
+ "integrity": "sha512-KZjrW32KloMYtTcHAFuw3CqsyWc5X6seb8KbkANSWt3Cz9p2qA8c1GJpSkksFP9ABb6an0FLCFl46ZFXx3kKpg==",
+ "peer": true,
+ "dependencies": {
+ "@babel/parser": "^7.16.4",
+ "@vue/compiler-core": "3.2.38",
+ "@vue/compiler-dom": "3.2.38",
+ "@vue/compiler-ssr": "3.2.38",
+ "@vue/reactivity-transform": "3.2.38",
+ "@vue/shared": "3.2.38",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.25.7",
+ "postcss": "^8.1.10",
+ "source-map": "^0.6.1"
+ }
+ },
+ "node_modules/@vue/compiler-ssr": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.2.38.tgz",
+ "integrity": "sha512-bm9jOeyv1H3UskNm4S6IfueKjUNFmi2kRweFIGnqaGkkRePjwEcfCVqyS3roe7HvF4ugsEkhf4+kIvDhip6XzQ==",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-dom": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
"node_modules/@vue/devtools-api": {
"version": "6.2.1",
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz",
"integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ=="
},
+ "node_modules/@vue/reactivity": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.2.38.tgz",
+ "integrity": "sha512-6L4myYcH9HG2M25co7/BSo0skKFHpAN8PhkNPM4xRVkyGl1K5M3Jx4rp5bsYhvYze2K4+l+pioN4e6ZwFLUVtw==",
+ "peer": true,
+ "dependencies": {
+ "@vue/shared": "3.2.38"
+ }
+ },
+ "node_modules/@vue/reactivity-transform": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.2.38.tgz",
+ "integrity": "sha512-3SD3Jmi1yXrDwiNJqQ6fs1x61WsDLqVk4NyKVz78mkaIRh6d3IqtRnptgRfXn+Fzf+m6B1KxBYWq1APj6h4qeA==",
+ "peer": true,
+ "dependencies": {
+ "@babel/parser": "^7.16.4",
+ "@vue/compiler-core": "3.2.38",
+ "@vue/shared": "3.2.38",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.25.7"
+ }
+ },
+ "node_modules/@vue/runtime-core": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.2.38.tgz",
+ "integrity": "sha512-kk0qiSiXUU/IKxZw31824rxmFzrLr3TL6ZcbrxWTKivadoKupdlzbQM4SlGo4MU6Zzrqv4fzyUasTU1jDoEnzg==",
+ "peer": true,
+ "dependencies": {
+ "@vue/reactivity": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
+ "node_modules/@vue/runtime-dom": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.2.38.tgz",
+ "integrity": "sha512-4PKAb/ck2TjxdMSzMsnHViOrrwpudk4/A56uZjhzvusoEU9xqa5dygksbzYepdZeB5NqtRw5fRhWIiQlRVK45A==",
+ "peer": true,
+ "dependencies": {
+ "@vue/runtime-core": "3.2.38",
+ "@vue/shared": "3.2.38",
+ "csstype": "^2.6.8"
+ }
+ },
+ "node_modules/@vue/server-renderer": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.2.38.tgz",
+ "integrity": "sha512-pg+JanpbOZ5kEfOZzO2bt02YHd+ELhYP8zPeLU1H0e7lg079NtuuSB8fjLdn58c4Ou8UQ6C1/P+528nXnLPAhA==",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-ssr": "3.2.38",
+ "@vue/shared": "3.2.38"
+ },
+ "peerDependencies": {
+ "vue": "3.2.38"
+ }
+ },
+ "node_modules/@vue/shared": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.38.tgz",
+ "integrity": "sha512-dTyhTIRmGXBjxJE+skC8tTWCGLCVc4wQgRRLt8+O9p5ewBAjoBwtCAkLPrtToSr1xltoe3st21Pv953aOZ7alg==",
+ "peer": true
+ },
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@@ -103,6 +239,25 @@
"node": ">= 0.8"
}
},
+ "node_modules/complex.js": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmmirror.com/complex.js/-/complex.js-2.1.1.tgz",
+ "integrity": "sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg==",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/csstype": {
+ "version": "2.6.20",
+ "resolved": "https://registry.npmmirror.com/csstype/-/csstype-2.6.20.tgz",
+ "integrity": "sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==",
+ "peer": true
+ },
+ "node_modules/decimal.js": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.0.tgz",
+ "integrity": "sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg=="
+ },
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -120,6 +275,17 @@
"zrender": "5.3.2"
}
},
+ "node_modules/escape-latex": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/escape-latex/-/escape-latex-1.2.0.tgz",
+ "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw=="
+ },
+ "node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "peer": true
+ },
"node_modules/follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz",
@@ -146,11 +312,55 @@
"node": ">= 6"
}
},
+ "node_modules/fraction.js": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.2.0.tgz",
+ "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/javascript-natural-sort": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmmirror.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz",
+ "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw=="
+ },
"node_modules/js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
+ "node_modules/magic-string": {
+ "version": "0.25.9",
+ "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz",
+ "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
+ "peer": true,
+ "dependencies": {
+ "sourcemap-codec": "^1.4.8"
+ }
+ },
+ "node_modules/mathjs": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmmirror.com/mathjs/-/mathjs-11.1.0.tgz",
+ "integrity": "sha512-cbsEruLNoIlj5h5vOF+DUQVe4EsA/WNomSQDMnX2WafX9TLneBSCRMx2okgGnSLzLoMGWQ211KVzY55bEnQa8Q==",
+ "dependencies": {
+ "@babel/runtime": "^7.18.9",
+ "complex.js": "^2.1.1",
+ "decimal.js": "^10.4.0",
+ "escape-latex": "^1.2.0",
+ "fraction.js": "^4.2.0",
+ "javascript-natural-sort": "^0.7.1",
+ "seedrandom": "^3.0.5",
+ "tiny-emitter": "^2.1.0",
+ "typed-function": "^4.1.0"
+ },
+ "bin": {
+ "mathjs": "bin/cli.js"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@@ -170,6 +380,48 @@
"node": ">= 0.6"
}
},
+ "node_modules/nanoid": {
+ "version": "3.3.4",
+ "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz",
+ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
+ "peer": true,
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "peer": true
+ },
+ "node_modules/postcss": {
+ "version": "8.4.16",
+ "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.16.tgz",
+ "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==",
+ "peer": true,
+ "dependencies": {
+ "nanoid": "^3.3.4",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/regenerator-runtime": {
+ "version": "0.13.9",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
+ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
+ },
+ "node_modules/seedrandom": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmmirror.com/seedrandom/-/seedrandom-3.0.5.tgz",
+ "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
+ },
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
@@ -178,11 +430,39 @@
"node": ">=0.10.0"
}
},
+ "node_modules/source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/sourcemap-codec": {
+ "version": "1.4.8",
+ "resolved": "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
+ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
+ "peer": true
+ },
+ "node_modules/tiny-emitter": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
+ "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
+ },
"node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
+ "node_modules/typed-function": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmmirror.com/typed-function/-/typed-function-4.1.0.tgz",
+ "integrity": "sha512-DGwUl6cioBW5gw2L+6SMupGwH/kZOqivy17E4nsh1JI9fKF87orMmlQx3KISQPmg3sfnOUGlwVkroosvgddrlg==",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
"node_modules/uview-ui": {
"version": "2.0.33",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.33.tgz",
@@ -191,6 +471,19 @@
"HBuilderX": "^3.1.0"
}
},
+ "node_modules/vue": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/vue/-/vue-3.2.38.tgz",
+ "integrity": "sha512-hHrScEFSmDAWL0cwO4B6WO7D3sALZPbfuThDsGBebthrNlDxdJZpGR3WB87VbjpPh96mep1+KzukYEhpHDFa8Q==",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-dom": "3.2.38",
+ "@vue/compiler-sfc": "3.2.38",
+ "@vue/runtime-dom": "3.2.38",
+ "@vue/server-renderer": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
"node_modules/vue-i18n": {
"version": "9.2.2",
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz",
@@ -218,6 +511,20 @@
}
},
"dependencies": {
+ "@babel/parser": {
+ "version": "7.18.13",
+ "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.18.13.tgz",
+ "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==",
+ "peer": true
+ },
+ "@babel/runtime": {
+ "version": "7.18.9",
+ "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.18.9.tgz",
+ "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==",
+ "requires": {
+ "regenerator-runtime": "^0.13.4"
+ }
+ },
"@intlify/core-base": {
"version": "9.2.2",
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.2.2.tgz",
@@ -260,11 +567,120 @@
"@intlify/shared": "9.2.2"
}
},
+ "@vue/compiler-core": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.2.38.tgz",
+ "integrity": "sha512-/FsvnSu7Z+lkd/8KXMa4yYNUiqQrI22135gfsQYVGuh5tqEgOB0XqrUdb/KnCLa5+TmQLPwvyUnKMyCpu+SX3Q==",
+ "peer": true,
+ "requires": {
+ "@babel/parser": "^7.16.4",
+ "@vue/shared": "3.2.38",
+ "estree-walker": "^2.0.2",
+ "source-map": "^0.6.1"
+ }
+ },
+ "@vue/compiler-dom": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.2.38.tgz",
+ "integrity": "sha512-zqX4FgUbw56kzHlgYuEEJR8mefFiiyR3u96498+zWPsLeh1WKvgIReoNE+U7gG8bCUdvsrJ0JRmev0Ky6n2O0g==",
+ "peer": true,
+ "requires": {
+ "@vue/compiler-core": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
+ "@vue/compiler-sfc": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.2.38.tgz",
+ "integrity": "sha512-KZjrW32KloMYtTcHAFuw3CqsyWc5X6seb8KbkANSWt3Cz9p2qA8c1GJpSkksFP9ABb6an0FLCFl46ZFXx3kKpg==",
+ "peer": true,
+ "requires": {
+ "@babel/parser": "^7.16.4",
+ "@vue/compiler-core": "3.2.38",
+ "@vue/compiler-dom": "3.2.38",
+ "@vue/compiler-ssr": "3.2.38",
+ "@vue/reactivity-transform": "3.2.38",
+ "@vue/shared": "3.2.38",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.25.7",
+ "postcss": "^8.1.10",
+ "source-map": "^0.6.1"
+ }
+ },
+ "@vue/compiler-ssr": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.2.38.tgz",
+ "integrity": "sha512-bm9jOeyv1H3UskNm4S6IfueKjUNFmi2kRweFIGnqaGkkRePjwEcfCVqyS3roe7HvF4ugsEkhf4+kIvDhip6XzQ==",
+ "peer": true,
+ "requires": {
+ "@vue/compiler-dom": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
"@vue/devtools-api": {
"version": "6.2.1",
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz",
"integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ=="
},
+ "@vue/reactivity": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.2.38.tgz",
+ "integrity": "sha512-6L4myYcH9HG2M25co7/BSo0skKFHpAN8PhkNPM4xRVkyGl1K5M3Jx4rp5bsYhvYze2K4+l+pioN4e6ZwFLUVtw==",
+ "peer": true,
+ "requires": {
+ "@vue/shared": "3.2.38"
+ }
+ },
+ "@vue/reactivity-transform": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/reactivity-transform/-/reactivity-transform-3.2.38.tgz",
+ "integrity": "sha512-3SD3Jmi1yXrDwiNJqQ6fs1x61WsDLqVk4NyKVz78mkaIRh6d3IqtRnptgRfXn+Fzf+m6B1KxBYWq1APj6h4qeA==",
+ "peer": true,
+ "requires": {
+ "@babel/parser": "^7.16.4",
+ "@vue/compiler-core": "3.2.38",
+ "@vue/shared": "3.2.38",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.25.7"
+ }
+ },
+ "@vue/runtime-core": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.2.38.tgz",
+ "integrity": "sha512-kk0qiSiXUU/IKxZw31824rxmFzrLr3TL6ZcbrxWTKivadoKupdlzbQM4SlGo4MU6Zzrqv4fzyUasTU1jDoEnzg==",
+ "peer": true,
+ "requires": {
+ "@vue/reactivity": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
+ "@vue/runtime-dom": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.2.38.tgz",
+ "integrity": "sha512-4PKAb/ck2TjxdMSzMsnHViOrrwpudk4/A56uZjhzvusoEU9xqa5dygksbzYepdZeB5NqtRw5fRhWIiQlRVK45A==",
+ "peer": true,
+ "requires": {
+ "@vue/runtime-core": "3.2.38",
+ "@vue/shared": "3.2.38",
+ "csstype": "^2.6.8"
+ }
+ },
+ "@vue/server-renderer": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.2.38.tgz",
+ "integrity": "sha512-pg+JanpbOZ5kEfOZzO2bt02YHd+ELhYP8zPeLU1H0e7lg079NtuuSB8fjLdn58c4Ou8UQ6C1/P+528nXnLPAhA==",
+ "peer": true,
+ "requires": {
+ "@vue/compiler-ssr": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
+ "@vue/shared": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.38.tgz",
+ "integrity": "sha512-dTyhTIRmGXBjxJE+skC8tTWCGLCVc4wQgRRLt8+O9p5ewBAjoBwtCAkLPrtToSr1xltoe3st21Pv953aOZ7alg==",
+ "peer": true
+ },
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@@ -287,6 +703,22 @@
"delayed-stream": "~1.0.0"
}
},
+ "complex.js": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmmirror.com/complex.js/-/complex.js-2.1.1.tgz",
+ "integrity": "sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg=="
+ },
+ "csstype": {
+ "version": "2.6.20",
+ "resolved": "https://registry.npmmirror.com/csstype/-/csstype-2.6.20.tgz",
+ "integrity": "sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==",
+ "peer": true
+ },
+ "decimal.js": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.0.tgz",
+ "integrity": "sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg=="
+ },
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -301,6 +733,17 @@
"zrender": "5.3.2"
}
},
+ "escape-latex": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/escape-latex/-/escape-latex-1.2.0.tgz",
+ "integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw=="
+ },
+ "estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "peer": true
+ },
"follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz",
@@ -316,11 +759,46 @@
"mime-types": "^2.1.12"
}
},
+ "fraction.js": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.2.0.tgz",
+ "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA=="
+ },
+ "javascript-natural-sort": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmmirror.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz",
+ "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw=="
+ },
"js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
+ "magic-string": {
+ "version": "0.25.9",
+ "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.25.9.tgz",
+ "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
+ "peer": true,
+ "requires": {
+ "sourcemap-codec": "^1.4.8"
+ }
+ },
+ "mathjs": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmmirror.com/mathjs/-/mathjs-11.1.0.tgz",
+ "integrity": "sha512-cbsEruLNoIlj5h5vOF+DUQVe4EsA/WNomSQDMnX2WafX9TLneBSCRMx2okgGnSLzLoMGWQ211KVzY55bEnQa8Q==",
+ "requires": {
+ "@babel/runtime": "^7.18.9",
+ "complex.js": "^2.1.1",
+ "decimal.js": "^10.4.0",
+ "escape-latex": "^1.2.0",
+ "fraction.js": "^4.2.0",
+ "javascript-natural-sort": "^0.7.1",
+ "seedrandom": "^3.0.5",
+ "tiny-emitter": "^2.1.0",
+ "typed-function": "^4.1.0"
+ }
+ },
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@@ -334,21 +812,89 @@
"mime-db": "1.52.0"
}
},
+ "nanoid": {
+ "version": "3.3.4",
+ "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz",
+ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
+ "peer": true
+ },
+ "picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "peer": true
+ },
+ "postcss": {
+ "version": "8.4.16",
+ "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.16.tgz",
+ "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==",
+ "peer": true,
+ "requires": {
+ "nanoid": "^3.3.4",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ }
+ },
+ "regenerator-runtime": {
+ "version": "0.13.9",
+ "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
+ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
+ },
+ "seedrandom": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmmirror.com/seedrandom/-/seedrandom-3.0.5.tgz",
+ "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
+ },
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
+ "source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "peer": true
+ },
+ "sourcemap-codec": {
+ "version": "1.4.8",
+ "resolved": "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
+ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
+ "peer": true
+ },
+ "tiny-emitter": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
+ "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
+ },
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
+ "typed-function": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmmirror.com/typed-function/-/typed-function-4.1.0.tgz",
+ "integrity": "sha512-DGwUl6cioBW5gw2L+6SMupGwH/kZOqivy17E4nsh1JI9fKF87orMmlQx3KISQPmg3sfnOUGlwVkroosvgddrlg=="
+ },
"uview-ui": {
"version": "2.0.33",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.33.tgz",
"integrity": "sha512-M3NsLFAY0z95NGMnTCDUR/TvJb6a/UYZzi1km5Gi6TkBCaoHdbmtQymkc1C4eszeoQOrpEIhit/2V47UglzHRw=="
},
+ "vue": {
+ "version": "3.2.38",
+ "resolved": "https://registry.npmmirror.com/vue/-/vue-3.2.38.tgz",
+ "integrity": "sha512-hHrScEFSmDAWL0cwO4B6WO7D3sALZPbfuThDsGBebthrNlDxdJZpGR3WB87VbjpPh96mep1+KzukYEhpHDFa8Q==",
+ "peer": true,
+ "requires": {
+ "@vue/compiler-dom": "3.2.38",
+ "@vue/compiler-sfc": "3.2.38",
+ "@vue/runtime-dom": "3.2.38",
+ "@vue/server-renderer": "3.2.38",
+ "@vue/shared": "3.2.38"
+ }
+ },
"vue-i18n": {
"version": "9.2.2",
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz",
diff --git a/package.json b/package.json
index f062dfe..4d53c22 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"axios": "^0.27.2",
"echarts": "^5.3.3",
"js-md5": "^0.7.3",
+ "mathjs": "^11.1.0",
"uview-ui": "^2.0.33",
"vue-i18n": "^9.2.2"
}
diff --git a/pages/markets/index.vue b/pages/markets/index.vue
index e064526..4ef7824 100644
--- a/pages/markets/index.vue
+++ b/pages/markets/index.vue
@@ -58,12 +58,13 @@
const symbolGroup = this.$api.symbolGroup({
"model": "contract"
});
- symbolGroup.then(res => {
+ symbolGroup.then(res => {
+ console.log(res)
this.symbolList = res.USDT
})
.catch(e => {
- console.log(e)
+ console.log('请求接口错误',e)
uni.showToast({
title: e,
icon: 'none',
@@ -79,7 +80,7 @@
this.websock = new this.$websocket(this.$constant.WSSURL)
var that = this
this.websock.getWebSocketMsg(data => {
- console.log(data, 1111)
+
if (data.channel === 'conn') {
that.websock.setId(data.data);
that.websock.subPairsgroup();
diff --git a/pages/markets/trade.vue b/pages/markets/trade.vue
index c8c5913..f3dc838 100644
--- a/pages/markets/trade.vue
+++ b/pages/markets/trade.vue
@@ -7,7 +7,8 @@
-
+
@@ -55,107 +56,124 @@
return {
popupShow: false,
symbolList: [],
+ contractConfig: {},
symbol: {},
marketDetail: {
close: 0,
usdRate: 0
},
- bboList: {},
- type:'buy',
- sum:{}
+ bboList: {},
+ type: 'buy',
+ sum: {}
};
},
computed: {
i18n() {
return this.$t("markets");
},
- },
- onHide() {
- this.websock.closeSocket();
- },
- onUnload() {
- this.websock.closeSocket();
+ },
+ onHide() {
+ this.websock.closeSocket();
+ },
+ onUnload() {
+ this.websock.closeSocket();
},
onLoad() {
-
+
},
onShow() {
- this.getSymbolGroup();
- this.initWebSocket();
- this.symbol = uni.getStorageSync('symbol');
- if (this.symbol) {
- this.getMarketDetail()
+ this.getSymbolGroup();
+ this.initWebSocket();
+ this.symbol = uni.getStorageSync('symbol');
+ if (this.symbol) {
+ this.getMarketDetail()
this.getBboList();
- }
- this.type=uni.getStorageSync('orderType');
- console.log(this.type)
- this.type=this.type?this.type:'buy';
+ this.getContractConfig();
+ }
+
+
+ if (uni.getStorageSync('orderType')) {
+ this.type = uni.getStorageSync('orderType');
uni.removeStorageSync('orderType');
+ }
+
},
- methods: {
- statisticsSum(){
- this.sum.buy=0
- this.sum.sell=0
- console.log(this.sum.buy);
-
- for(var buy in this.bboList.buy){
- if(buy>=5){
- break;
- }
- this.sum.buy+=parseFloat(this.bboList.buy[buy].size)
- }
- for(var sell in this.bboList.sell){
- if(sell>=5){
- break;
- }
- this.sum.sell+=parseFloat(this.bboList.sell[sell].size)
- }
-
+ methods: {
+ onChangeType(type) {
+ this.type = type
+ },
+ statisticsSum() {
+ this.sum.buy = 0
+ this.sum.sell = 0
+ console.log(this.sum.buy);
+
+ for (var buy in this.bboList.buy) {
+ if (buy >= 5) {
+ break;
+ }
+ this.sum.buy += parseFloat(this.bboList.buy[buy].size)
+ }
+ for (var sell in this.bboList.sell) {
+ if (sell >= 5) {
+ break;
+ }
+ this.sum.sell += parseFloat(this.bboList.sell[sell].size)
+ }
+
},
getTradeList() {
const tradeList = this.$api.tradeList({
"symbol": this.symbol.symbol
});
tradeList.then(res => {
- this.tradeList = res
+ this.tradeList = res
- });
+ });
+ },
+ getContractConfig() {
+ const tradeList = this.$api.contractConfig({
+ "pair": this.symbol.symbol
+ });
+ tradeList.then(res => {
+ this.contractConfig = res
+ this.contractConfig.leverage=res.leverage.split(',')
+ });
},
getBboList() {
const bboList = this.$api.bboList({
"symbol": this.symbol.symbol
});
bboList.then(res => {
- this.bboList = res
- this.statisticsSum()
- });
+ this.bboList = res
+ this.statisticsSum()
+ });
},
getMarketDetail() {
const marketDetail = this.$api.marketDetail({
"symbol": this.symbol.symbol
});
marketDetail.then(res => {
- this.marketDetail = res
+ this.marketDetail = res
- })
+ })
},
getSymbolGroup() {
const symbolGroup = this.$api.symbolGroup({
"model": "contract"
});
symbolGroup.then(res => {
- this.symbolList = res.USDT
- this.symbol = uni.getStorageSync('symbol');
- if (!this.symbol) {
- this.symbol = this.symbolList[0]
- this.getMarketDetail()
- this.getBboList();
- this.switchTo(this.symbol);
-
- }
+ this.symbolList = res.USDT
+ this.symbol = uni.getStorageSync('symbol');
+ if (!this.symbol) {
+ this.symbol = this.symbolList[0]
+ this.getMarketDetail()
+ this.getBboList();
+ this.switchTo(this.symbol);
+
+ }
- });
+ });
@@ -170,9 +188,9 @@
this.websock.getWebSocketMsg(data => {
if (data.channel === 'conn') {
- that.websock.setId(data.data);
- that.websock.subPairsgroup();
- that.websock.subBbo(that.symbol.symbol)
+ that.websock.setId(data.data);
+ that.websock.subPairsgroup();
+ that.websock.subBbo(that.symbol.symbol)
that.websock.subDetail(that.symbol.symbol)
} else if (data.channel === 'market.pairsgroup') {
that.symbolList = data.data.USDT;
@@ -183,12 +201,12 @@
that.tradeList = data.data;
} else if (data.channel === 'market.' + that.symbol.symbol + '.detail') {
that.marketDetail = data.data;
- }else{
- console.log('未知',data.data)
+ } else {
+ console.log('未知', data.data)
}
});
},
-
+
depthChange(e) {
console.log(e);
},
@@ -211,13 +229,13 @@
switchTo(item) {
this.popupShow = false;
- this.websock.unSubBbo(this.symbol.symbol)
+ this.websock.unSubBbo(this.symbol.symbol)
this.websock.unSubTrade(this.symbol.symbol)
this.symbol = item;
uni.setStorageSync('symbol', this.symbol);
this.getMarketDetail()
this.getBboList();
- this.websock.subBbo(this.symbol.symbol)
+ this.websock.subBbo(this.symbol.symbol)
this.websock.subDetail(this.symbol.symbol)
}
diff --git a/utils/axios.js b/utils/axios.js
index 6914635..027cfe5 100644
--- a/utils/axios.js
+++ b/utils/axios.js
@@ -35,7 +35,7 @@ service.interceptors.request.use(
config.baseURL = constant.H5_MARKET_URL;
// #endif
// #ifdef APP-PLUS
- config.baseURL = Vue.prototype.MARKET_URL;
+ config.baseURL = constant.MARKET_URL
// #endif
}
@@ -136,7 +136,7 @@ service.interceptors.response.use(res => {
uni.hideLoading()
res=res.data;
- // console.log(res)
+ console.log('数据',res)
// console.log(res.data)
// console.log(res.data.data[0].nameAlias)
if (res.code===0||res.success) {