Browse Source

合约下单

master
vee 3 years ago
parent
commit
20c7c22d03
  1. 2
      components/positionList/positionList.vue
  2. 864
      components/transaction/transaction.vue
  3. 2
      main.js
  4. 546
      package-lock.json
  5. 1
      package.json
  6. 7
      pages/markets/index.vue
  7. 146
      pages/markets/trade.vue
  8. 4
      utils/axios.js

2
components/positionList/positionList.vue

@ -43,6 +43,8 @@ export default {
}
},
bboList:{
type: Object,
default: () => {}

864
components/transaction/transaction.vue

@ -1,420 +1,446 @@
<template>
<view class="transaction">
<view class="tab" :class="type == 'buy' ? 'buy' : ''">
<view class="buy" :class="type == 'buy' ? 'select' : ''" @click="onChangeType('buy')">{{ i18n.LONG }}</view>
<view class="sell" :class="type == 'sell' ? 'select' : ''" @click="onChangeType('sell')">{{ i18n.SHORT }}
</view>
</view>
<view class="priceSelectBody">
<view class="priceTypeInput" @click="priceSelectListShow = true">{{ priceTypeList[priceTypeValue].text }}
</view>
<view class="shade" v-show="priceSelectListShow" @click="priceSelectListShow = false"></view>
<view class="priceTypeList" v-show="priceSelectListShow">
<view class="selectItem" :class="{ select: priceTypeValue === index }"
v-for="(item, index) in priceTypeList" :key="index" @click="selectChange(index)">
{{ item.text }}
</view>
</view>
</view>
<view class="coinPrice">
<view class="noInput" v-show="priceTypeValue === 0">{{ i18n.MarketOptimalPrice }}</view>
<u-input class="input" v-show="priceTypeValue !== 0" v-model="coinPrice" color="#A1A0A8" fontSize="20rpx"
border="none" :placeholder="i18n.enterAddressTips">
</u-input>
<view class="currencyName">{{ currency }}</view>
</view>
<view class="twoInput">
<view class="leverageSelectBody">
<view class="leverageInput" @click="leverageListShow = true">{{ leverageValue }}</view>
<view class="shade" v-show="leverageListShow" @click="leverageListShow = false"></view>
<view class="leverageList" v-show="leverageListShow">
<view class="selectItem" :class="{ select: leverageValue === item }"
v-for="(item, index) in leverageList" :key="index" @click="leverageSelectChange(item)">
{{ item }}
</view>
</view>
</view>
<view class="coinAmount">
<u-input class="input" v-model="coinAmount" color="#A1A0A8" fontSize="20rpx" border="none"
:placeholder="i18n.enterAddressTips">
</u-input>
<view class="currencyName">{{ coin }}</view>
</view>
</view>
<!-- 可用 Usable-->
<key-value-row class="text" :keyName="i18n.Usable" :value="`${coinPrice * coinAmount}${currency}`"
lineHeight="30rpx" size="24rpx" rightColor="#A1A0A8">
</key-value-row>
<!-- 总计 Total-->
<key-value-row class="text" :keyName="i18n.Total" :value="`${coinPrice * coinAmount}${currency}`"
lineHeight="30rpx" size="24rpx" rightColor="#A1A0A8">
</key-value-row>
<!-- 债券 Bond-->
<key-value-row class="text" :keyName="i18n.Bond" :value="`${coinPrice * coinAmount}${currency}`"
lineHeight="30rpx" size="24rpx" rightColor="#A1A0A8">
</key-value-row>
<!-- 手续费 -->
<key-value-row class="text" :keyName="i18n.Fee" :value="`${coinPrice * coinAmount}${currency}`"
lineHeight="30rpx" size="24rpx" rightColor="#A1A0A8">
</key-value-row>
<u-button class="button" :color="type == 'buy' ? '#00E8A2' : '#F4506A'" throttleTime="500" @click="btnClick">
{{ type === 'buy' ? `${i18n.buyLong}${coin}` : `${i18n.sellSHORT}${coin}` }}
</u-button>
</view>
</template>
<script>
import KeyValueRow from '../KeyValueRow/KeyValueRow.vue'
const COMPONENT_NAME = 'transaction'
export default {
components: { KeyValueRow },
name: COMPONENT_NAME,
props: {
coin: { //
type: String,
default() {
return 'BTC'
}
},
currency: { //
type: String,
default() {
return 'USDT'
}
},
type: { //
type: String,
default() {
return 'buy'
}
},
coinPrice: { //
type: Number,
default() {
return 0
}
},
coinAmount: { //
type: Number,
default() {
return 1
}
},
bgTransparent: { //
type: Boolean,
default() {
return false
}
},
},
data() {
return {
priceSelectListShow: false,
priceTypeValue: 0,
priceTypeList: [
{ value: 0, text: this.$t("markets").MarketPrice },
{ value: 1, text: this.$t("markets").LimitPrice },
],
leverageListShow: false,
leverageValue: 10,
leverageList: [
10,
20,
30,
50,
100,
],
}
},
computed: {
i18n() {
return this.$t("markets");
},
},
mounted() {
},
methods: {
onChangeType(type = 'buy') {
this.type = type
},
selectChange(index) {
this.priceTypeValue = index;
this.priceSelectListShow = false;
console.log(e);
},
leverageSelectChange(item) {
this.leverageValue = item;
this.leverageListShow = false;
console.log(e);
},
btnClick(){
},
}
}
</script>
<style scoped lang="scss">
.transaction {
width: 444rpx;
.tab {
display: flex;
border-radius: 16rpx;
background-color: rgba($color: #F4506A, $alpha: 0.1);
&.buy {
background-color: rgba($color: #00E8A2, $alpha: 0.1);
}
.buy {
flex: 1;
text-align: center;
height: 64rpx;
line-height: 64rpx;
font-size: 24rpx;
color: #F4506A;
border-radius: 16rpx;
&.select {
color: #15141F;
background-color: #00E8A2;
}
}
.sell {
flex: 1;
text-align: center;
height: 64rpx;
line-height: 64rpx;
font-size: 24rpx;
color: #00E8A2;
border-radius: 16rpx;
&.select {
color: #15141F;
background: #F4506A;
}
}
}
.priceSelectBody {
position: relative;
height: 64rpx;
margin-top: 24rpx;
background: #323045;
border-radius: 16rpx;
padding: 0 20rpx;
.priceTypeInput {
position: relative;
height: 64rpx;
line-height: 64rpx;
font-size: 20rpx;
color: #A1A0A8;
&::after {
display: block;
position: absolute;
content: '';
background-image: url(../../static/maskets/ic_ma_arrow_down.png);
background-repeat: no-repeat;
background-size: 32rpx;
width: 32rpx;
height: 32rpx;
top: 16rpx;
right: 0rpx;
}
}
.shade {
position: fixed;
top: 220rpx;
left: 0;
width: 750rpx;
height: 70vh;
background: transparent;
// background: #fff;
z-index: 0;
}
.priceTypeList {
overflow: hidden;
position: absolute;
top: 60rpx;
left: 0rpx;
z-index: 2;
background: #15141F;
border-radius: 10rpx;
width: 100%;
.selectItem {
height: 64rpx;
line-height: 64rpx;
font-size: 28rpx;
padding-left: 20rpx;
&.select {
background: #3f3e48;
}
}
}
}
.coinPrice {
position: relative;
margin-top: 20rpx;
height: 64rpx;
.noInput {
height: 64rpx;
background: #323045;
border-radius: 16rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
padding-left: 20rpx;
}
.input {
height: 64rpx;
background: #323045;
border-radius: 16rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
padding-left: 20rpx !important;
}
.currencyName {
position: absolute;
height: 32rpx;
top: 0rpx;
right: 20rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
}
}
.twoInput {
margin-top: 20rpx;
margin-bottom: 10rpx;
display: flex;
.leverageSelectBody {
position: relative;
width: 212rpx;
height: 64rpx;
background: #323045;
border-radius: 16rpx;
padding: 0 20rpx;
.leverageInput {
position: relative;
height: 64rpx;
line-height: 64rpx;
font-size: 20rpx;
color: #A1A0A8;
&::after {
display: block;
position: absolute;
content: '';
background-image: url(../../static/maskets/ic_ma_arrow_down.png);
background-repeat: no-repeat;
background-size: 32rpx;
width: 32rpx;
height: 32rpx;
top: 16rpx;
right: 0rpx;
}
}
.shade {
position: fixed;
top: 220rpx;
left: 0;
width: 750rpx;
height: 70vh;
background: transparent;
// background: #fff;
z-index: 0;
}
.leverageList {
overflow: hidden;
position: absolute;
top: 60rpx;
left: 0rpx;
z-index: 2;
background: #15141F;
border-radius: 10rpx;
width: 100%;
.selectItem {
height: 64rpx;
line-height: 64rpx;
font-size: 28rpx;
padding-left: 20rpx;
&.select {
background: #3f3e48;
}
}
}
}
.coinAmount {
position: relative;
height: 64rpx;
margin-left: 20rpx;
.input {
height: 64rpx;
background: #323045;
border-radius: 16rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
padding-left: 20rpx !important;
}
.currencyName {
position: absolute;
height: 32rpx;
top: 0rpx;
right: 20rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
}
}
}
.text {
margin: 0;
}
.button {
box-sizing: border-box;
height: 64rpx;
border-radius: 16rpx;
font-weight: 700;
font-size: 24rpx;
color: #15141F !important;
}
}
<template>
<view class="transaction">
<view class="tab" :class="type == 'buy' ? 'buy' : ''">
<view class="buy" :class="type == 'buy' ? 'select' : ''" @click="onChangeType('buy')">{{ i18n.LONG }}</view>
<view class="sell" :class="type == 'sell' ? 'select' : ''" @click="onChangeType('sell')">{{ i18n.SHORT }}
</view>
</view>
<view class="priceSelectBody">
<view class="priceTypeInput" @click="priceSelectListShow = true">{{ priceTypeList[priceTypeValue].text }}
</view>
<view class="shade" v-show="priceSelectListShow" @click="priceSelectListShow = false"></view>
<view class="priceTypeList" v-show="priceSelectListShow">
<view class="selectItem" :class="{ select: priceTypeValue === index }"
v-for="(item, index) in priceTypeList" :key="index" @click="selectChange(index)">
{{ item.text }}
</view>
</view>
</view>
<view class="coinPrice">
<view class="noInput" v-show="priceTypeValue === 0">{{ i18n.MarketOptimalPrice }}</view>
<u-input class="input" v-show="priceTypeValue !== 0" v-model="coinPrice" color="#A1A0A8" fontSize="20rpx"
border="none" :placeholder="i18n.enterAddressTips">
</u-input>
<view class="currencyName">{{ symbol.baseSymbol }}</view>
</view>
<view class="twoInput">
<view class="leverageSelectBody">
<view class="leverageInput" @click="leverageListShow = true">{{ leverageValue }}</view>
<view class="shade" v-show="leverageListShow" @click="leverageListShow = false"></view>
<view class="leverageList" v-show="leverageListShow">
<view class="selectItem" :class="{ select: leverageValue === item }"
v-for="(item, index) in contractConfig.leverage" :key="index"
@click="leverageSelectChange(item)">
{{ item }}
</view>
</view>
</view>
<view class="coinAmount">
<u-input class="input" v-model="coinAmount" color="#A1A0A8" fontSize="20rpx" border="none"
:placeholder="i18n.enterAddressTips">
</u-input>
<view class="currencyName">{{ symbol.coinSymbol }}</view>
</view>
</view>
<!-- 可用 Usable-->
<key-value-row class="text" :keyName="i18n.Usable" :value="`${contractConfig.useCapital}${symbol.baseSymbol}`"
lineHeight="30rpx" size="24rpx" rightColor="#A1A0A8">
</key-value-row>
<!-- 总计 Total-->
<key-value-row class="text" :keyName="i18n.Total"
:value="`${(priceTypeValue === 0?marketDetail.close*coinAmount:coinPrice*coinAmount).toFixed(4)}${symbol.baseSymbol}`"
lineHeight="30rpx" size="24rpx" rightColor="#A1A0A8">
</key-value-row>
<!-- 债券 Bond-->
<key-value-row class="text" :keyName="i18n.Bond"
:value="`${(priceTypeValue === 0?marketDetail.close/leverageValue:coinPrice/leverageValue).toFixed(4)}${symbol.baseSymbol}`"
lineHeight="30rpx" size="24rpx" rightColor="#A1A0A8">
</key-value-row>
<!-- 手续费 -->
<key-value-row class="text" :keyName="i18n.Fee"
:value="`${(priceTypeValue === 0?marketDetail.close/leverageValue*contractConfig.rate:coinPrice/leverageValue*contractConfig.rate).toFixed(4)}${symbol.baseSymbol}`"
lineHeight="30rpx" size="24rpx" rightColor="#A1A0A8">
</key-value-row>
<u-button class="button" :color="type == 'buy' ? '#00E8A2' : '#F4506A'" throttleTime="500" @click="contractOrder">
{{ type === 'buy' ? `${i18n.buyLong}${symbol.coinSymbol}` : `${i18n.sellSHORT}${symbol.coinSymbol}` }}
</u-button>
</view>
</template>
<script>
import KeyValueRow from '../KeyValueRow/KeyValueRow.vue'
const COMPONENT_NAME = 'transaction'
export default {
components: {
KeyValueRow
},
name: COMPONENT_NAME,
props: {
type: { //
type: String,
default () {
return 'buy'
}
},
contractConfig: {
type: Object,
default: () => {
leverage: [10]
}
},
symbol: {
type: Object,
default () {
}
},
marketDetail: { //
type: Object,
default () {
}
},
bgTransparent: { //
type: Boolean,
default () {
return false
}
},
},
data() {
return {
math:null,
priceSelectListShow: false,
priceTypeValue: 0,
priceTypeList: [{
value: 0,
text: this.$t("markets").MarketPrice
},
{
value: 1,
text: this.$t("markets").LimitPrice
},
],
leverageListShow: false,
leverageValue: 10,
coinPrice: 0,
coinAmount: 0
}
},
computed: {
i18n() {
return this.$t("markets");
},
},
mounted() {
this.leverageValue = this.contractConfig.leverage[0];
this.coinPrice = this.marketDetail.close
},
methods: {
onChangeType(type) {
this.$emit('onChangeType', type);
},
selectChange(index) {
this.priceTypeValue = index;
this.priceSelectListShow = false;
this.coinPrice = this.marketDetail.close
},
leverageSelectChange(item) {
this.leverageValue = item;
this.leverageListShow = false;
},
contractOrder() {
var data={
direction:this.type==='buy'?'long':'short',
amount:this.coinAmount,
pair:this.symbol.pair,
leverage:this.leverageValue,
tradeModel:this.priceTypeValue===0?'market':'limit',
price:this.priceTypeValue===0?this.marketDetail.close:this.coinPrice,
remarks:'1'
}
// #ifdef H5
data.source='H5'
// #endif
// #ifdef APP-PLUS
data.source='android'
// #endif
console.log(data);
const contractOrder = this.$api.contractOrder(data);
contractOrder.then(res => {
uni.showToast({
title: res.errMsg,
icon: 'success',
duration: 1500
})
});
},
}
}
</script>
<style scoped lang="scss">
.transaction {
width: 444rpx;
.tab {
display: flex;
border-radius: 16rpx;
background-color: rgba($color: #F4506A, $alpha: 0.1);
&.buy {
background-color: rgba($color: #00E8A2, $alpha: 0.1);
}
.buy {
flex: 1;
text-align: center;
height: 64rpx;
line-height: 64rpx;
font-size: 24rpx;
color: #F4506A;
border-radius: 16rpx;
&.select {
color: #15141F;
background-color: #00E8A2;
}
}
.sell {
flex: 1;
text-align: center;
height: 64rpx;
line-height: 64rpx;
font-size: 24rpx;
color: #00E8A2;
border-radius: 16rpx;
&.select {
color: #15141F;
background: #F4506A;
}
}
}
.priceSelectBody {
position: relative;
height: 64rpx;
margin-top: 24rpx;
background: #323045;
border-radius: 16rpx;
padding: 0 20rpx;
.priceTypeInput {
position: relative;
height: 64rpx;
line-height: 64rpx;
font-size: 20rpx;
color: #A1A0A8;
&::after {
display: block;
position: absolute;
content: '';
background-image: url(../../static/maskets/ic_ma_arrow_down.png);
background-repeat: no-repeat;
background-size: 32rpx;
width: 32rpx;
height: 32rpx;
top: 16rpx;
right: 0rpx;
}
}
.shade {
position: fixed;
top: 220rpx;
left: 0;
width: 750rpx;
height: 70vh;
background: transparent;
// background: #fff;
z-index: 0;
}
.priceTypeList {
overflow: hidden;
position: absolute;
top: 60rpx;
left: 0rpx;
z-index: 2;
background: #15141F;
border-radius: 10rpx;
width: 100%;
.selectItem {
height: 64rpx;
line-height: 64rpx;
font-size: 28rpx;
padding-left: 20rpx;
&.select {
background: #3f3e48;
}
}
}
}
.coinPrice {
position: relative;
margin-top: 20rpx;
height: 64rpx;
.noInput {
height: 64rpx;
background: #323045;
border-radius: 16rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
padding-left: 20rpx;
}
.input {
height: 64rpx;
background: #323045;
border-radius: 16rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
padding-left: 20rpx !important;
}
.currencyName {
position: absolute;
height: 32rpx;
top: 0rpx;
right: 20rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
}
}
.twoInput {
margin-top: 20rpx;
margin-bottom: 10rpx;
display: flex;
.leverageSelectBody {
position: relative;
width: 212rpx;
height: 64rpx;
background: #323045;
border-radius: 16rpx;
padding: 0 20rpx;
.leverageInput {
position: relative;
height: 64rpx;
line-height: 64rpx;
font-size: 20rpx;
color: #A1A0A8;
&::after {
display: block;
position: absolute;
content: '';
background-image: url(../../static/maskets/ic_ma_arrow_down.png);
background-repeat: no-repeat;
background-size: 32rpx;
width: 32rpx;
height: 32rpx;
top: 16rpx;
right: 0rpx;
}
}
.shade {
position: fixed;
top: 220rpx;
left: 0;
width: 750rpx;
height: 70vh;
background: transparent;
// background: #fff;
z-index: 0;
}
.leverageList {
overflow: hidden;
position: absolute;
top: 60rpx;
left: 0rpx;
z-index: 2;
background: #15141F;
border-radius: 10rpx;
width: 100%;
.selectItem {
height: 64rpx;
line-height: 64rpx;
font-size: 28rpx;
padding-left: 20rpx;
&.select {
background: #3f3e48;
}
}
}
}
.coinAmount {
position: relative;
height: 64rpx;
margin-left: 20rpx;
.input {
height: 64rpx;
background: #323045;
border-radius: 16rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
padding-left: 20rpx !important;
}
.currencyName {
position: absolute;
height: 32rpx;
top: 0rpx;
right: 20rpx;
color: #A1A0A8;
line-height: 64rpx;
font-size: 24rpx;
}
}
}
.text {
margin: 0;
}
.button {
box-sizing: border-box;
height: 64rpx;
border-radius: 16rpx;
font-weight: 700;
font-size: 24rpx;
color: #15141F !important;
}
}
</style>

2
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)

546
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",

1
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"
}

7
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();

146
pages/markets/trade.vue

@ -7,7 +7,8 @@
</navigation>
<view class="content">
<view class="transactionSide">
<transaction :coin="symbol.coinSymbol" :type="type" :currency="symbol.baseSymbol"></transaction>
<transaction v-on:onChangeType="onChangeType" :contractConfig="contractConfig" :symbol="symbol" :marketDetail="marketDetail"
:type="type" ></transaction>
</view>
<view class="positionSide">
<positionList v-on:depthChange="depthChange" :sum="sum" :marketDetail="marketDetail" :bboList="bboList">
@ -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)
}

4
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) {

Loading…
Cancel
Save