Browse Source

合约订单

master
vee 3 years ago
parent
commit
437012786b
  1. 20
      components/kline/tradingView/datafeed.js
  2. 6
      pages.json
  3. 22
      pages/home/index.vue
  4. 753
      pages/markets/contractOrder.vue
  5. BIN
      static/home/img_Mine.png
  6. BIN
      static/home/img_Order.png
  7. BIN
      static/home/img_Subcription.png
  8. BIN
      static/home/img_recharge.png
  9. 2
      utils/language/en_US.js
  10. 2
      utils/language/vi_VN.js
  11. 2
      utils/language/zh_TW.js
  12. 9
      utils/websocket.js

20
components/kline/tradingView/datafeed.js

@ -32,7 +32,17 @@ FeedBase.prototype.getSendSymbolName = function(symbolName) {
var name = symbolName.split('/') var name = symbolName.split('/')
return (name[0] + name[1]).toLocaleLowerCase() return (name[0] + name[1]).toLocaleLowerCase()
} }
FeedBase.prototype.defaultConfiguration = function defaultConfiguration() {
//设置默认配置
return {
supports_search: false,
supports_group_request: false,
supported_resolutions: ['1', '5', '15', '30', '60', '1D', '1W', '1M'],
supports_marks: false,
supports_timescale_marks: false,
supports_time: true
};
};
FeedBase.prototype.resolveSymbol = function(symbolName, onResolve, onError) { FeedBase.prototype.resolveSymbol = function(symbolName, onResolve, onError) {
onResolve({ onResolve({
"name": symbolName, "name": symbolName,
@ -46,7 +56,11 @@ FeedBase.prototype.resolveSymbol = function(symbolName, onResolve, onError) {
"type": "bitcoin", "type": "bitcoin",
"volume_precision": 10, "volume_precision": 10,
"has_intraday": true, "has_intraday": true,
"intraday_multipliers": ['1', '5', '15', '30', '60', '240', '1440'], // 时间 "intraday_multipliers": ['1', '5', '15', '30', '60', '1D', '1W','1M'], // 时间
"supported_resolutions": ['1', '5', '15', '30', '60', '1D', '1W','1M'], // 时间
"supports_marks": false,
"supports_timescale_marks": false,
"supported_time": true,
"has_weekly_and_monthly": false, "has_weekly_and_monthly": false,
"has_no_volume": false, "has_no_volume": false,
"regular_session": "24x7", "regular_session": "24x7",
@ -65,7 +79,7 @@ FeedBase.prototype.resolveSymbol = function(symbolName, onResolve, onError) {
const resolutionFormat = (resolution, name, to) => { const resolutionFormat = (resolution, name, to) => {
let req = `market.${name}.kline.${resolution}min`; let req = `market.${name}.kline.${resolution}min`;
let minutes = resolution; let minutes = resolution;
console.log(resolution)
if (resolution.includes('D')) { if (resolution.includes('D')) {
if (resolution.length < 2) resolution = '1' + resolution; if (resolution.length < 2) resolution = '1' + resolution;
req = `market.${name}.kline.${parseInt(resolution)}day`; req = `market.${name}.kline.${parseInt(resolution)}day`;

6
pages.json

@ -62,6 +62,12 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/markets/contractOrder",
"style": {
"navigationStyle": "custom"
}
},
// charity // charity
{ {

22
pages/home/index.vue

@ -42,19 +42,24 @@
<view class="btnDiv"> <view class="btnDiv">
<view class="item" @click="goto('recharge')"> <view class="item" @click="goto('recharge')">
<u--image class="img" :showLoading="true" src="../../static/home/img_recharge.png" <u--image class="img" :showLoading="true" src="../../static/home/img_recharge.png"
width="144rpx" height="144rpx"></u--image> width="123rpx" height="123rpx"></u--image>
<view class="text">{{ i18n.Recharge }}</view> <view class="text">{{ i18n.Recharge }}</view>
</view> </view>
<view class="item" @click="goto('mine')"> <view class="item" @click="goto('mine')">
<u--image class="img" :showLoading="true" src="../../static/home/img_Mine.png" width="144rpx" <u--image class="img" :showLoading="true" src="../../static/home/img_Mine.png"
height="144rpx"></u--image> width="123rpx" height="123rpx"></u--image>
<view class="text">{{ i18n.Mine }}</view> <view class="text">{{ i18n.Mine }}</view>
</view> </view>
<view class="item" @click="goto('subcription')"> <view class="item" @click="goto('subcription')">
<u--image class="img" :showLoading="true" src="../../static/home/img_Subcription.png" <u--image class="img" :showLoading="true" src="../../static/home/img_Subcription.png"
width="144rpx" height="144rpx"></u--image> width="123rpx" height="123rpx"></u--image>
<view class="text">{{ i18n.Subcription }}</view> <view class="text">{{ i18n.Subcription }}</view>
</view> </view>
<view class="item" @click="goto('contractOrder')">
<u--image class="img" :showLoading="true" src="../../static/home/img_Order.png"
width="123rpx" height="123rpx"></u--image>
<view class="text">{{ i18n.Order }}</view>
</view>
</view> </view>
<!-- 步数 --> <!-- 步数 -->
<view class="steps"> <view class="steps">
@ -485,6 +490,9 @@
case 'subcription': case 'subcription':
url = '/pages/subscription/index'; url = '/pages/subscription/index';
break; break;
case 'contractOrder':
url = '/pages/markets/contractOrder';
break;
default: default:
break; break;
} }
@ -828,15 +836,15 @@
} }
.btnDiv { .btnDiv {
margin: 32rpx 48rpx; margin: 32rpx 34rpx;
.item { .item {
display: inline-block; display: inline-block;
width: 218rpx; width: 172rpx;
text-align: center; text-align: center;
.img { .img {
margin: 0 36rpx 16rpx; margin: 0 26rpx 16rpx;
} }
} }
} }

753
pages/markets/contractOrder.vue

@ -0,0 +1,753 @@
<template>
<view class="entrustOrderList">
<navigation>{{ i18n.contractOrder }}</navigation>
<!-- 四个tab -->
<view class="tab">
<view class="item" :class="{ select: type === 1 }" @click="onChangeType(1)">{{ i18n.Position }}
</view>
<view class="item" :class="{ select: type === 2 }" @click="onChangeType(2)">{{ i18n.Closed }}
</view>
<view class="item" :class="{ select: type === 0 }" @click="onChangeType(0)">{{ i18n.CurrentEntrust }}
</view>
<view class="item" :class="{ select: type === 3 }" @click="onChangeType(3)">{{ i18n.Revoked }}
</view>
</view>
<!-- 卡片列表 -->
<view class="content" v-if="list.length">
<view class="card" v-for="(item, index) in list" :key="index">
<view class="header">
<text :class="item.direction">{{item.direction}}</text>
<text class="time">{{item.timestr}}</text>
<text class="closeTimeTitle" v-show="type === 2">{{ i18n.CloseTime }}</text>
<text class="closeTime" v-show="type === 2">{{item.timestr2}}</text>
<view class="closeBtn" v-show="type === 0" @click="closeItem(item,index)">{{
i18n.close
}}</view>
</view>
<view class="infoBody">
<view class="item">
<!-- 公共的 -->
<view class="left">
<view class="title">{{ item.pair }}</view>
<view class="value">{{item.openedPrice}}</view>
<view class="title">{{ i18n.Bond }}</view>
<view class="value">{{item.bondAmount}}</view>
<view class="title" v-show="type == 1||type == 2">{{ i18n.StyPrice }}</view>
<view class="value" v-show="type ==1||type == 2">{{item.winStopPrice}}</view>
<view class="closeBtn" v-show="type === 1" @click="Margincall(item)">
{{ i18n.Margincall }}
</view>
</view>
<!-- 公共的 -->
<view class="center">
<view class="title">{{ i18n.AmountLeverage }}</view>
<view class="value">{{item.hand}} * {{item.leverage}}</view>
<view class="title">{{ i18n.Fee }}</view>
<view class="value">{{item.fee}}</view>
<view class="title" v-show="type == 1||type == 2">{{ i18n.StsPrice }}</view>
<view class="value" v-show="type == 1||type == 2">{{item.lossStopPrice}}</view>
<!-- <view class="title" v-show="type === 1">{{ i18n.do }}</view> -->
<view class="closeBtn" v-show="type === 1" @click="getStopLimit(item)">
{{ i18n.StopLimit }}
</view>
</view>
<!-- Current Entrust Position-->
<view class="right" v-show="type === 0 || type === 1">
<view class="title">{{ i18n.CurrentPrice }}</view>
<view class="value" style="color:#F4506A;">{{latest[item.pair]}}</view>
<!-- <view class="title" v-show="type === 0">{{ i18n.status }}</view>
<view class="value" v-show="type === 0">
{{item.status=='undone'?i18n.undone:item.status=='opened'?i18n.opened:item.status=='revoked'?i18n.revoked:i18n.closed}}
</view> -->
<view class="title" v-show="type === 1">{{ i18n.ROE }}</view>
<view class="value" v-show="type === 1" :style="
getValue(item.direction=='buy'
?(latest[item.pair]-item.openedPrice)*item.hand/item.bondAmount:(item.openedPrice-latest[item.pair])*item.hand/item.bondAmount)>=0?'color:#00E8A2;':'color:#F4506A'">
<!-- {{getValue(item.profitAmount/item.bondAmount)}}% -->
{{getValue(item.direction=='buy'?(latest[item.pair]-item.openedPrice)*item.hand/item.bondAmount:(item.openedPrice-latest[item.pair])*item.hand/item.bondAmount)}}%
</view>
<view class="title" v-show="type === 1||type === 2">{{ i18n.ExpectProfit }}</view>
<view class="value" v-show="type === 1"
:style="parseFloat(getItem(item.direction=='buy'?(latest[item.pair]-item.openedPrice)*item.hand:(item.openedPrice-latest[item.pair])*item.hand))>=0?'color:#00E8A2':'color:#F4506A'">
{{getItem(item.direction=='buy'?(latest[item.pair]-item.openedPrice)*item.hand:(item.openedPrice-latest[item.pair])*item.hand)}}
</view>
<view class="value" style="color:#00E8A2;" v-show="type === 2">0</view>
<!-- <view class="title" v-show="type === 1">{{ i18n.do }}</view> -->
<view class="closeBtn" v-show="type === 1" @click="closeItem(item,index)">{{
i18n.close
}}</view>
</view>
<!-- Closed -->
<view class="right" v-show="type === 2">
<view class="title">{{ i18n.ClosePrice }}</view>
<view class="value" style="color:#00E8A2;">{{item.closedPrice}}</view>
<view class="title">{{ i18n.ROE }}</view>
<view class="value">
<!-- {{item.status=='undone'?i18n.undone:item.status=='opened'?i18n.opened:item.status=='revoked'?i18n.revoked:i18n.closed}} -->
<view class="value" :style="(item.profitAmount/item.bondAmount)*100>=0?'color:#00E8A2;':'color:#F4506A'">
{{getValue(item.profitAmount/item.bondAmount)}}%
</view>
</view>
<view class="title">{{ i18n.PL }}</view>
<!-- <view class="value" :style="item.profitAmount-item.fee>=0?'color:#00E8A2;':'color:#F4506A'">
{{item.profitAmount-item.fee}}</view> -->
<view class="value" :style="item.profitAmount>=0?'color:#00E8A2;':'color:#F4506A'">
{{getPrice(item.profitAmount)}}
</view>
</view>
<!-- Revoked -->
<view class="right" v-show="type === 3">
<!-- <view class="title">{{ i18n.status }}</view>
<view class="value" style="color:#F4506A;">
{{item.status=='undone'?i18n.undone:item.status=='opened'?i18n.opened:item.status=='revoked'?i18n.revoked:i18n.closed}}
</view> -->
<view class="title">{{ i18n.PL }}</view>
<view class="value" style="color:#00E8A2;">
0
</view>
</view>
</view>
</view>
</view>
</view>
<!-- close确认框 -->
<u-modal :show="closeModalShow" :confirmText="i18n.Confirm" :cancelText="i18n.Cancel" :showCancelButton="true"
:title="i18n.WarmTips" :content='i18n.WarmTipsText' @confirm="closeConfirm" @cancel="closeModalShow = false"
confirmColor="#00E8A2" cancelColor="#96959E">
</u-modal>
<!-- stop确认框 -->
<u-modal :show="stopModalShow" :confirmText="i18n.Confirm" :cancelText="i18n.Cancel" :showCancelButton="true"
:title="i18n.StopLimit" :content='i18n.WarmTipsText' @confirm="stopConfirm" @cancel="stopModalShow = false"
confirmColor="#00E8A2" cancelColor="#96959E">
<view class="stopModel">
<view class="title">
<text class="left">{{ i18n.StyPrice }}</text>
<text class="right">{{ i18n.ExpectProfit }} {{ profit }}</text>
</view>
<view class="numberInput">
<button class="btn sub" :class="{ disabled: stySubBtnDisabled || styValue <= 0 }"
:disabled="stySubBtnDisabled" @click="styValueChange('sub')"></button>
<input class="number" type="number" v-model="styValue" @input="stopModalChange" />
<button class="btn add" @click="styValueChange('add')"></button>
</view>
<view class="title">
<text class="left">{{ i18n.StsPrice }}</text>
<text class="right">{{ i18n.ExpectLoss }} {{ loss }}</text>
</view>
<view class="numberInput">
<button class="btn sub" :class="{ disabled: stsSubBtnDisabled || stsValue <= 0 }"
:disabled="stsSubBtnDisabled" @click="stsValueChange('sub')"></button>
<input class="number" type="number" v-model="stsValue" @input="stopModalChange" />
<button class="btn add" @click="stsValueChange('add')"></button>
</view>
</view>
</u-modal>
<!-- 追加保证金 -->
<u-modal :show="stopModalShowZui" :confirmText="i18n.Confirm" :cancelText="i18n.Cancel" :showCancelButton="true"
:title="i18n.Margincall" :content='i18n.WarmTipsText' @confirm="stopConfirm" @cancel="stopModalShowZui = false"
confirmColor="#00E8A2" cancelColor="#96959E">
<view class="stopModel">
<view class="title">
<text class="left">{{ i18n.AmountTrue }}</text>
<!-- <text class="right">{{ i18n.ExpectProfit }} {{ profit }}</text> -->
</view>
<view class="numberInput">
<button class="btn sub" :class="{ disabled: stySubBtnDisabled || styValue <= 0 }"
:disabled="stySubBtnDisabled" @click="styValueChange('sub')"></button>
<input class="number" type="number" v-model="styValue" @input="stopModalChange" />
<button class="btn add" @click="styValueChange('add')"></button>
</view>
</view>
</u-modal>
<u-empty :text="i18n.Dataisempty" mode="data" v-if="!list.length"></u-empty>
</view>
</template>
<script>
const COMPONENT_NAME = 'transaction'
let timer1 = null;
let timer2 = null;
export default {
name: COMPONENT_NAME,
data() {
return {
list: [],
latest:{},
status: 'opened',
closeModalShow: false,
stopModalShow: false,
type: 1,
stopModalShowZui:false,
test: 0,
dealList: [{
dealType: 'long'
},
{
dealType: 'long'
},
],
styValue: 0,
stsValue: 0,
stySubBtnDisabled: false,
stsSubBtnDisabled: false,
//
itemData: {},
//
stopLimitData: {},
profit: 0,
loss: 0
}
},
computed: {
i18n() {
return this.$t("markets");
},
},
watch: {
deep: true,
symbol: {
handler: function() {
this.getContractOrderList()
}
},
},
mounted() {
this.initWebSocket();
this.getContractOrderList()
},
//
created() {
uni.$on('upData', num => {
if (num) {
this.getContractOrderList()
}
})
},
onHide() {
clearTimeout(timer2);
clearInterval(timer2);
timer1 = null;
timer2 = null;
},
methods: {
initWebSocket() {
this.websock = new this.$websocket(this.$constant.WSSURL) // xxx URL
var that = this
this.websock.getWebSocketMsg(data => {
if (data.channel === 'conn') {
that.websock.id = data.data
that.websock.subLatest();
// that.websock.subKHistory(that.type, that.symbol.symbol)
// that.websock.subKline(that.type, that.symbol.symbol)
} else if (data.channel === 'market.latest') {
that.latest = data.data;
}
});
},
//
getValue(e){
let data = e*100
data = parseFloat(data.toPrecision(10))
data = String(data)
return data.substring(0, data.indexOf(".") + 3);
},
//
getPrice(s) {
var i=s;
/*
js 数字精度问题
*/
i = parseFloat(i.toPrecision(10))
i = String(i)
return i.substring(0, i.indexOf(".") + 5);
},
stopModalChange() {
if (this.stopLimitData.direction === 'buy') {
if (this.styValue)
this.profit = this.getItem((this.styValue - this.stopLimitData.openedPrice) * this.stopLimitData
.hand)
if (this.stsValue)
this.loss = this.getItem((this.stsValue - this.stopLimitData.openedPrice) * this.stopLimitData
.hand)
} else {
if (this.styValue)
this.profit = this.getItem((this.stopLimitData.openedPrice - this.styValue) * this.stopLimitData
.hand)
if (this.stsValue)
this.loss = this.getItem((this.stopLimitData.openedPrice - this.stsValue) * this.stopLimitData
.hand)
}
},
getItem(i) {
i = parseFloat(i.toPrecision(10))
i = String(i)
return i.substring(0, i.indexOf(".") + 9);
},
//
getStopLimit(i) {
this.stopLimitData = i
this.stopModalShow = true
this.styValue = 0;
this.stsValue = 0;
this.profit = 0
this.loss = 0
},
//
Margincall(i){
this.stopLimitData = i
this.stopModalShowZui=true
this.styValue = 0;
this.stsValue = 0;
this.profit = 0
this.loss = 0
},
//
closeItem(item, i) {
this.itemData = item
this.closeModalShow = true
},
//
getContractOrderList() {
const orderList = this.$api.contractOrderList({
"status": this.status,
});
orderList.then(res => {
this.list = res.data
for (var i = 0; i < this.list.length; i++) {
if (this.list[i].addTime) {
this.list[i].timestr = this.$index.formatmmddhhmmss(this.list[
i].addTime)
}
if (this.list[i].closedTime) {
this.list[i].timestr2 = this.$index.formatmmddhhmmss(this.list[
i].closedTime)
}
}
});
},
/**
* 类型改变
* @param {*} type
*/
onChangeType(type = 0) {
this.type = type
if (this.type == 0) {
this.status = 'undone'
}
if (this.type == 1) {
this.status = 'opened'
}
if (this.type == 2) {
this.status = 'closed'
}
if (this.type == 3) {
this.status = 'revoked'
}
this.getContractOrderList()
},
/**
* close确认弹窗
*/
closeConfirm() {
// undo
if (this.type == 0) {
const orderList = this.$api.contractCancel({
"orderNo": this.itemData.orderNo,
});
orderList.then(res => {
uni.$u.toast(this.$t("markets").Succeeded)
this.closeModalShow = false
this.getContractOrderList()
});
}
// opened
if (this.type == 1) {
const orderList = this.$api.contractClosed({
"orderNo": this.itemData.orderNo,
});
orderList.then(res => {
uni.$u.toast(this.$t("markets").Succeeded)
this.closeModalShow = false
setTimeout(() => {
this.getContractOrderList()
}, 600)
});
}
},
/**
* stop确认弹窗
*/
stopConfirm() {
if(this.stopModalShow){
if (this.styValue < 0 || this.stsValue < 0) {
uni.showToast({
title: this.i18n.lessThan,
icon: 'none',
duration: 2000 //
})
return;
}
const orderList = this.$api.setWinOrLossStopPrice({
"orderNo": this.stopLimitData.orderNo,
"winStopPrice": this.styValue,
"lossStopPrice": this.stsValue,
});
orderList.then(res => {
uni.$u.toast(this.$t("markets").Succeeded)
this.stopModalShow = false
setTimeout(() => {
this.getContractOrderList()
}, 800)
});
}
if(this.stopModalShowZui){
if (this.styValue < 0) {
uni.showToast({
title: this.i18n.lessThan,
icon: 'none',
duration: 2000 //
})
return;
}
const orderList = this.$api.addBond({
"orderNo": this.stopLimitData.orderNo,
"amount": this.styValue,
});
orderList.then(res => {
uni.$u.toast(this.$t("markets").Succeeded)
this.stopModalShowZui = false
setTimeout(() => {
this.getContractOrderList()
}, 800)
});
}
},
/**
* styValue值变化
*/
styValueChange(type = 'sub') {
if (type === 'sub') { //
this.styValue = parseInt(this.styValue) //
this.styValue -= 1;
if (this.styValue <= 0) {
this.stySubBtnDisabled = true;
this.styValue = 0
} else {
this.stySubBtnDisabled = false;
}
} else { //
this.styValue = parseInt(this.styValue) //
this.styValue += 1;
if (this.styValue <= 0) {
this.stySubBtnDisabled = true;
this.styValue = 0
} else {
this.stySubBtnDisabled = false;
}
}
},
/**
* stsValue值变化
*/
stsValueChange(type = 'sub') {
if (type === 'sub') { //
this.stsValue = parseInt(this.stsValue) //
this.stsValue -= 1;
if (this.stsValue <= 0) {
this.stsSubBtnDisabled = true;
this.stsValue = 0
} else {
this.stsSubBtnDisabled = false;
}
} else { //
this.stsValue = parseInt(this.stsValue) //
this.stsValue += 1;
if (this.stsValue <= 0) {
this.stsSubBtnDisabled = true;
this.stsValue = 0
} else {
this.stsSubBtnDisabled = false;
}
}
},
}
}
</script>
<style scoped lang="scss">
.righttype3{
position: absolute;
right: 115rpx;
}
.closeBtn {
display: inline-block;
// width: 98rpx;
padding: 0 12rpx;
height: 48rpx;
border-radius: 8rpx;
line-height: 48rpx;
background-color: rgba($color: rgb(0, 232, 162), $alpha: 0.1);
font-size: 24rpx;
text-align: center;
color: rgb(0, 232, 162);
margin-top: 22rpx;
}
/deep/ .u-empty {
top: 500% !important;
}
/deep/ .u-modal__content__text {
color: #96959E !important;
}
.entrustOrderList {
position: relative;
.tab {
display: flex;
background: #211F32;
margin-top: 120rpx;
.item {
height: 64rpx;
line-height: 64rpx;
flex: 1;
font-size: 24rpx;
text-align: center;
&.select {
background: #323045;
color: #00E8A2;
}
}
}
.content {
padding: 32rpx;
.card {
position: relative;
font-size: 24rpx;
color: #A1A0A8;
background: #211F32;
border-radius: 20rpx;
padding: 24rpx 32rpx;
margin-bottom: 30rpx;
.header {
.buy {
color: #00E8A2;
margin-right: 28rpx;
}
.sell {
color: #F4506A;
margin-right: 28rpx;
}
.time {
margin-right: 16rpx;
}
.closeTimeTitle {
margin-right: 16rpx;
}
.closeBtn {
position: absolute;
right: 32rpx;
top: 20rpx;
display: inline-block;
width: 98rpx;
height: 48rpx;
border-radius: 8rpx;
line-height: 48rpx;
background-color: rgba($color: #F4506A, $alpha: 0.1);
font-size: 24rpx;
text-align: center;
color: #F4506A;
margin-top: 0;
}
}
.infoBody {
.item {
display: flex;
.title {
margin-top: 30rpx;
line-height: 32rpx;
}
.value {
color: #FFFFFF;
}
.left {
flex: 1;
text-align: left;
}
.center {
// flex: 1;
text-align: center;
}
.right {
flex: 1;
text-align: right;
}
}
}
}
}
/deep/.u-popup__content {
background: #323045;
.u-modal__title {
color: #fff;
}
.u-modal__content__text {
text-align: center;
}
}
.stopModel {
width: 560rpx;
font-size: 24rpx;
.title {
display: flex;
justify-content: space-between;
width: 560rpx;
margin: 24rpx 0;
.left {}
.right {
color: #A1A0A8;
}
}
.numberInput {
display: flex;
height: 88rpx;
background: #211F32;
border-radius: 32rpx;
overflow: hidden;
.btn {
width: 80rpx;
background: #16141f;
padding: 0;
border-radius: 0;
&.sub {
background-image: url(../../static/maskets/sub.png);
background-repeat: no-repeat;
background-size: 32rpx;
background-position: 24rpx 28rpx;
}
&.add {
background-image: url(../../static/maskets/add.png);
background-repeat: no-repeat;
background-size: 32rpx;
background-position: 24rpx 28rpx;
}
&.button-hover {
background: #211F32;
&.sub::after {
background-image: url(../../static/maskets/sub.png);
background-repeat: no-repeat;
background-size: 64rpx;
background-position: 46rpx 56rpx;
}
&.add::after {
background-image: url(../../static/maskets/add.png);
background-repeat: no-repeat;
background-size: 64rpx;
background-position: 46rpx 56rpx;
}
}
&.disabled {
background: #211F32;
&.sub::after {
background-image: url(../../static/maskets/sub.png);
background-repeat: no-repeat;
background-size: 64rpx;
background-position: 46rpx 56rpx;
}
}
}
.number {
flex: 1;
border-left: 2rpx solid #323045;
border-right: 2rpx solid #323045;
text-align: center;
height: 88rpx;
;
line-height: 88rpx;
font-size: 24rpx;
}
}
}
}
</style>

BIN
static/home/img_Mine.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/home/img_Order.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/home/img_Subcription.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/home/img_recharge.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

2
utils/language/en_US.js

@ -85,6 +85,7 @@ export default {
Recharge: 'Recharge', Recharge: 'Recharge',
Mine: 'Mine', Mine: 'Mine',
Subcription: 'Subcription', Subcription: 'Subcription',
Order: 'Order',
TodaySteps: "Today's steps", TodaySteps: "Today's steps",
ReceiveEarnings: "Receive yesterday's earnings", ReceiveEarnings: "Receive yesterday's earnings",
WarmTips: 'Warm Tips', WarmTips: 'Warm Tips',
@ -159,6 +160,7 @@ export default {
SellPrice:'Sell Price', SellPrice:'Sell Price',
open:'Open', open:'Open',
AmountTrue:'Amount', AmountTrue:'Amount',
contractOrder: 'Contract order'
}, },
// 捐赠页面相关 // 捐赠页面相关

2
utils/language/vi_VN.js

@ -83,6 +83,7 @@ export default {
Recharge: 'nạp điện', Recharge: 'nạp điện',
Mine: 'khai thác mỏ', Mine: 'khai thác mỏ',
Subcription: 'Đăng ký', Subcription: 'Đăng ký',
Order: 'Gọi món',
TodaySteps: 'các bước hôm nay', TodaySteps: 'các bước hôm nay',
ReceiveEarnings: 'Nhận thu nhập của ngày hôm qua', ReceiveEarnings: 'Nhận thu nhập của ngày hôm qua',
WarmTips: 'Lời khuyên tử tế', WarmTips: 'Lời khuyên tử tế',
@ -156,6 +157,7 @@ export default {
SellPrice: 'gia ban', SellPrice: 'gia ban',
open: 'mở một vị trí', open: 'mở một vị trí',
AmountTrue:'lượng', AmountTrue:'lượng',
contractOrder: 'hợp đồng đặt hàng'
}, },
// 捐赠页面相关 // 捐赠页面相关

2
utils/language/zh_TW.js

@ -84,6 +84,7 @@ export default {
Recharge: '充值', Recharge: '充值',
Mine: '挖礦', Mine: '挖礦',
Subcription: '申購', Subcription: '申購',
Order: '訂單',
TodaySteps: "今天的步数", TodaySteps: "今天的步数",
ReceiveEarnings: "領取昨天的收益", ReceiveEarnings: "領取昨天的收益",
WarmTips: '溫馨提示', WarmTips: '溫馨提示',
@ -159,6 +160,7 @@ export default {
SellPrice:'賣價', SellPrice:'賣價',
open:'開倉', open:'開倉',
AmountTrue:'數量', AmountTrue:'數量',
contractOrder: '合約訂單'
}, },

9
utils/websocket.js

@ -191,6 +191,14 @@ class WebSocketClass {
writeToScreen(massage) { writeToScreen(massage) {
console.log(massage); console.log(massage);
} }
subLatest() {
this.publicSend('sub', 'latest', ['market.latest'], null)
}
unSubLatest() {
this.publicSend('un_sub', 'latest', ['market.latest'], null)
}
subPairsgroup() { subPairsgroup() {
@ -270,6 +278,7 @@ class WebSocketClass {
} }
publicSend(event, type, channel, date) { publicSend(event, type, channel, date) {
console.log(this.id)
var data = { var data = {
event: event, event: event,
type: type, type: type,

Loading…
Cancel
Save