Browse Source

合约下单

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

2
components/positionList/positionList.vue

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

848
components/transaction/transaction.vue

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

2
main.js

@ -14,9 +14,11 @@ import VI from './utils/language/vi_VN.js'
import api from './utils/api.js' import api from './utils/api.js'
import constant from './utils/constant.js' import constant from './utils/constant.js'
import websocket from './utils/websocket.js' import websocket from './utils/websocket.js'
import math from './utils/math.js'
Vue.prototype.$api = api Vue.prototype.$api = api
Vue.prototype.$constant = constant Vue.prototype.$constant = constant
Vue.prototype.$websocket = websocket Vue.prototype.$websocket = websocket
Vue.prototype.$math = math
// 自定义底部导航栏 // 自定义底部导航栏
import tabBar from 'components/tabBar/tabBar.vue' import tabBar from 'components/tabBar/tabBar.vue'
Vue.component('tab-bar', tabBar) Vue.component('tab-bar', tabBar)

546
package-lock.json

@ -12,10 +12,34 @@
"axios": "^0.27.2", "axios": "^0.27.2",
"echarts": "^5.3.3", "echarts": "^5.3.3",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"mathjs": "^11.1.0",
"uview-ui": "^2.0.33", "uview-ui": "^2.0.33",
"vue-i18n": "^9.2.2" "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": { "node_modules/@intlify/core-base": {
"version": "9.2.2", "version": "9.2.2",
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.2.2.tgz", "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.2.2.tgz",
@ -73,11 +97,123 @@
"node": ">= 14" "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": { "node_modules/@vue/devtools-api": {
"version": "6.2.1", "version": "6.2.1",
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz", "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz",
"integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==" "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": { "node_modules/asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@ -103,6 +239,25 @@
"node": ">= 0.8" "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": { "node_modules/delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
@ -120,6 +275,17 @@
"zrender": "5.3.2" "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": { "node_modules/follow-redirects": {
"version": "1.15.1", "version": "1.15.1",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz", "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz",
@ -146,11 +312,55 @@
"node": ">= 6" "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": { "node_modules/js-md5": {
"version": "0.7.3", "version": "0.7.3",
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz", "resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==" "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": { "node_modules/mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@ -170,6 +380,48 @@
"node": ">= 0.6" "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": { "node_modules/source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
@ -178,11 +430,39 @@
"node": ">=0.10.0" "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": { "node_modules/tslib": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" "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": { "node_modules/uview-ui": {
"version": "2.0.33", "version": "2.0.33",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.33.tgz", "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.33.tgz",
@ -191,6 +471,19 @@
"HBuilderX": "^3.1.0" "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": { "node_modules/vue-i18n": {
"version": "9.2.2", "version": "9.2.2",
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz", "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz",
@ -218,6 +511,20 @@
} }
}, },
"dependencies": { "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": { "@intlify/core-base": {
"version": "9.2.2", "version": "9.2.2",
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.2.2.tgz", "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.2.2.tgz",
@ -260,11 +567,120 @@
"@intlify/shared": "9.2.2" "@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": { "@vue/devtools-api": {
"version": "6.2.1", "version": "6.2.1",
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz", "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz",
"integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==" "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": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
@ -287,6 +703,22 @@
"delayed-stream": "~1.0.0" "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": { "delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
@ -301,6 +733,17 @@
"zrender": "5.3.2" "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": { "follow-redirects": {
"version": "1.15.1", "version": "1.15.1",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz", "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz",
@ -316,11 +759,46 @@
"mime-types": "^2.1.12" "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": { "js-md5": {
"version": "0.7.3", "version": "0.7.3",
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz", "resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==" "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": { "mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@ -334,21 +812,89 @@
"mime-db": "1.52.0" "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": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" "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": { "tslib": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" "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": { "uview-ui": {
"version": "2.0.33", "version": "2.0.33",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.33.tgz", "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.33.tgz",
"integrity": "sha512-M3NsLFAY0z95NGMnTCDUR/TvJb6a/UYZzi1km5Gi6TkBCaoHdbmtQymkc1C4eszeoQOrpEIhit/2V47UglzHRw==" "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": { "vue-i18n": {
"version": "9.2.2", "version": "9.2.2",
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz", "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz",

1
package.json

@ -13,6 +13,7 @@
"axios": "^0.27.2", "axios": "^0.27.2",
"echarts": "^5.3.3", "echarts": "^5.3.3",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"mathjs": "^11.1.0",
"uview-ui": "^2.0.33", "uview-ui": "^2.0.33",
"vue-i18n": "^9.2.2" "vue-i18n": "^9.2.2"
} }

5
pages/markets/index.vue

@ -59,11 +59,12 @@
"model": "contract" "model": "contract"
}); });
symbolGroup.then(res => { symbolGroup.then(res => {
console.log(res)
this.symbolList = res.USDT this.symbolList = res.USDT
}) })
.catch(e => { .catch(e => {
console.log(e) console.log('请求接口错误',e)
uni.showToast({ uni.showToast({
title: e, title: e,
icon: 'none', icon: 'none',
@ -79,7 +80,7 @@
this.websock = new this.$websocket(this.$constant.WSSURL) this.websock = new this.$websocket(this.$constant.WSSURL)
var that = this var that = this
this.websock.getWebSocketMsg(data => { this.websock.getWebSocketMsg(data => {
console.log(data, 1111)
if (data.channel === 'conn') { if (data.channel === 'conn') {
that.websock.setId(data.data); that.websock.setId(data.data);
that.websock.subPairsgroup(); that.websock.subPairsgroup();

84
pages/markets/trade.vue

@ -7,7 +7,8 @@
</navigation> </navigation>
<view class="content"> <view class="content">
<view class="transactionSide"> <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>
<view class="positionSide"> <view class="positionSide">
<positionList v-on:depthChange="depthChange" :sum="sum" :marketDetail="marketDetail" :bboList="bboList"> <positionList v-on:depthChange="depthChange" :sum="sum" :marketDetail="marketDetail" :bboList="bboList">
@ -55,14 +56,15 @@
return { return {
popupShow: false, popupShow: false,
symbolList: [], symbolList: [],
contractConfig: {},
symbol: {}, symbol: {},
marketDetail: { marketDetail: {
close: 0, close: 0,
usdRate: 0 usdRate: 0
}, },
bboList: {}, bboList: {},
type:'buy', type: 'buy',
sum:{} sum: {}
}; };
}, },
computed: { computed: {
@ -87,29 +89,36 @@
if (this.symbol) { if (this.symbol) {
this.getMarketDetail() this.getMarketDetail()
this.getBboList(); this.getBboList();
this.getContractConfig();
} }
this.type=uni.getStorageSync('orderType');
console.log(this.type)
this.type=this.type?this.type:'buy'; if (uni.getStorageSync('orderType')) {
this.type = uni.getStorageSync('orderType');
uni.removeStorageSync('orderType'); uni.removeStorageSync('orderType');
}
}, },
methods: { methods: {
statisticsSum(){ onChangeType(type) {
this.sum.buy=0 this.type = type
this.sum.sell=0 },
statisticsSum() {
this.sum.buy = 0
this.sum.sell = 0
console.log(this.sum.buy); console.log(this.sum.buy);
for(var buy in this.bboList.buy){ for (var buy in this.bboList.buy) {
if(buy>=5){ if (buy >= 5) {
break; break;
} }
this.sum.buy+=parseFloat(this.bboList.buy[buy].size) this.sum.buy += parseFloat(this.bboList.buy[buy].size)
} }
for(var sell in this.bboList.sell){ for (var sell in this.bboList.sell) {
if(sell>=5){ if (sell >= 5) {
break; break;
} }
this.sum.sell+=parseFloat(this.bboList.sell[sell].size) this.sum.sell += parseFloat(this.bboList.sell[sell].size)
} }
}, },
@ -118,44 +127,53 @@
"symbol": this.symbol.symbol "symbol": this.symbol.symbol
}); });
tradeList.then(res => { 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() { getBboList() {
const bboList = this.$api.bboList({ const bboList = this.$api.bboList({
"symbol": this.symbol.symbol "symbol": this.symbol.symbol
}); });
bboList.then(res => { bboList.then(res => {
this.bboList = res this.bboList = res
this.statisticsSum() this.statisticsSum()
}); });
}, },
getMarketDetail() { getMarketDetail() {
const marketDetail = this.$api.marketDetail({ const marketDetail = this.$api.marketDetail({
"symbol": this.symbol.symbol "symbol": this.symbol.symbol
}); });
marketDetail.then(res => { marketDetail.then(res => {
this.marketDetail = res this.marketDetail = res
}) })
}, },
getSymbolGroup() { getSymbolGroup() {
const symbolGroup = this.$api.symbolGroup({ const symbolGroup = this.$api.symbolGroup({
"model": "contract" "model": "contract"
}); });
symbolGroup.then(res => { symbolGroup.then(res => {
this.symbolList = res.USDT this.symbolList = res.USDT
this.symbol = uni.getStorageSync('symbol'); this.symbol = uni.getStorageSync('symbol');
if (!this.symbol) { if (!this.symbol) {
this.symbol = this.symbolList[0] this.symbol = this.symbolList[0]
this.getMarketDetail() this.getMarketDetail()
this.getBboList(); this.getBboList();
this.switchTo(this.symbol); this.switchTo(this.symbol);
} }
}); });
@ -183,8 +201,8 @@
that.tradeList = data.data; that.tradeList = data.data;
} else if (data.channel === 'market.' + that.symbol.symbol + '.detail') { } else if (data.channel === 'market.' + that.symbol.symbol + '.detail') {
that.marketDetail = data.data; that.marketDetail = data.data;
}else{ } else {
console.log('未知',data.data) console.log('未知', data.data)
} }
}); });
}, },

4
utils/axios.js

@ -35,7 +35,7 @@ service.interceptors.request.use(
config.baseURL = constant.H5_MARKET_URL; config.baseURL = constant.H5_MARKET_URL;
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
config.baseURL = Vue.prototype.MARKET_URL; config.baseURL = constant.MARKET_URL
// #endif // #endif
} }
@ -136,7 +136,7 @@ service.interceptors.response.use(res => {
uni.hideLoading() uni.hideLoading()
res=res.data; res=res.data;
// console.log(res) console.log('数据',res)
// console.log(res.data) // console.log(res.data)
// console.log(res.data.data[0].nameAlias) // console.log(res.data.data[0].nameAlias)
if (res.code===0||res.success) { if (res.code===0||res.success) {

Loading…
Cancel
Save