Browse Source

文档bug全部修复

master
vee 3 years ago
parent
commit
55d25bae11
  1. 56
      components/entrustOrderList/entrustOrderList.vue
  2. 24
      components/positionList/positionList.vue
  3. 2
      manifest.json
  4. 37
      pages/markets/kLine.vue
  5. 5
      pages/me/transfer.vue
  6. 6
      pages/mine/mineDetails.vue
  7. 29
      pages/recharge/recharge.vue
  8. 9
      pages/subscription/details.vue
  9. 10
      utils/language/en_US.js
  10. 12
      utils/language/vi_VN.js
  11. 12
      utils/language/zh_TW.js

56
components/entrustOrderList/entrustOrderList.vue

@ -15,7 +15,7 @@
<view class="content" v-if="list.length">
<view class="card" v-for="(item, index) in list" :key="index">
<view class="header">
<text class="dealType" :class="{ long: item.direction === 'long' }">{{item.direction}}</text>
<text :class="item.direction" >{{item.direction}}</text>
<text class="time">{{item.timestr}}</text>
<text class="closeTimeTitle" v-show="type === 2 || type === 3">{{ i18n.CloseTime }}</text>
<text class="closeTime" v-show="type === 2 || type === 3">{{item.timestr2}}</text>
@ -38,7 +38,7 @@
<!-- 公共的 -->
<view class="center">
<view class="title">{{ i18n.AmountLeverage }}</view>
<view class="value">{{getHand(item)}}</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 !== 3">{{ i18n.StsPrice }}</view>
@ -47,7 +47,7 @@
<!-- Current Entrust Position-->
<view class="right" v-show="type === 0 || type === 1">
<view class="title">{{ i18n.CurrentPrice }}</view>
<view class="value" style="color:#F4506A;">{{item.currentPrice}}</view>
<view class="value" style="color:#F4506A;">{{marketDetail.close}}</view>
<view class="title" v-show="type === 0">{{ i18n.status }}</view>
<view class="value" v-show="type === 0">{{item.status}}</view>
<view class="title" v-show="type === 1">{{ i18n.do }}</view>
@ -100,22 +100,22 @@
<view class="stopModel">
<view class="title">
<text class="left">{{ i18n.StyPrice }}</text>
<text class="right">{{ i18n.ExpectProfit }} {{ stopLimitData.winStopPrice }}</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 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 }} {{ stopLimitData.lossStopPrice }}</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 class="number" type="number" v-model="stsValue" @input="stopModalChange"/>
<button class="btn add" @click="stsValueChange('add')"></button>
</view>
</view>
@ -199,6 +199,8 @@
itemData: {},
//
stopLimitData: {},
profit:0,
loss:0
}
},
computed: {
@ -230,6 +232,20 @@
timer2 = null;
},
methods: {
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)
@ -239,20 +255,12 @@
getStopLimit(i) {
this.stopLimitData = i
this.stopModalShow = true
this.styValue=0;
this.stsValue=0;
this.profit=0
this.loss=0
},
getHand(e) {
let i = e.leverage * e.hand
// i = '' + i
// i = parseFloat(i)
// let eformat = i.toExponential() //
// let tmpArray = eformat.match(/\d(?:\.(\d*))?e([+-]\d+)/) //
// let number = i.toFixed(Math.max(0, (tmpArray[1] || '').length - tmpArray[2]))
i = parseFloat(i.toPrecision(10))
// number = String(number)
i = String(i)
// return number.substring(0, number.indexOf(".") + 9);
return i.substring(0, i.indexOf(".") + 9);
},
//
closeItem(item, i) {
this.itemData = item
@ -268,7 +276,7 @@
this.list = res.data
for (var i = 0; i < this.list.length; i++) {
if (this.list[i].addTime) {
this.list[i].timestr = this.$index.getformatyymmddhhmmss(this.list[
this.list[i].timestr = this.$index.formatyymmddhhmmss(this.list[
i].addTime)
}
if (this.list[i].closedTime) {
@ -451,10 +459,14 @@
margin-bottom: 30rpx;
.header {
.dealType {
.buy {
color: #00E8A2;
margin-right: 28rpx;
}
.sell {
color: #F4506A;
margin-right: 28rpx;
}
.time {
margin-right: 16rpx;

24
components/positionList/positionList.vue

@ -7,7 +7,7 @@
<view class="sell">
<view class="item" v-for="(item, index) in bboList.sell" :key="index" @click="depthClick(item)">
<text class="price">{{ parseFloat(item.price).toFixed(item.baseCoinScale) }}</text>
<text class="num">{{ item.size }}</text>
<text class="num">{{ getItem(parseFloat(item.size)) }}</text>
<view class="sellbg" :style="`width: ${item.size/sum.sell*100 }%;`"></view>
</view>
</view>
@ -19,7 +19,7 @@
<view class="buy">
<view class="item" v-for="(item, index) in bboList.buy" :key="index" @click="depthClick(item)">
<text class="price">{{ parseFloat(item.price).toFixed(item.baseCoinScale) }}</text>
<text class="num">{{ item.size }}</text>
<text class="num">{{ getItem(parseFloat(item.size))}}</text>
<view class="buybg" :style="`width: ${item.size/sum.buy*100 }%;`"></view>
</view>
</view>
@ -62,6 +62,22 @@ export default {
},
},
methods: {
getItem(i) {
i = String(i)
var max=8
if(i.replace('.','').length>max){
if(i.indexOf('.')){
max+=1
}
i=i.substring(0,max)
}else{
if(!i.indexOf('.')){
i+='.'
}
i=i+new Array(max-i.replace('.','').length).fill('0').join('')
}
return i;
},
depthClick(e) {
this.popoverVisible = !this.popoverVisible;
},
@ -118,7 +134,7 @@ export default {
.num {
display: block;
width: 50%;
text-align: center;
text-align: left;
padding-right: 10rpx;
z-index: 1;
}
@ -158,7 +174,7 @@ export default {
.num {
display: block;
width: 50%;
text-align: center;
text-align: left;
padding-right: 10rpx;
z-index: 1;
}

2
manifest.json

@ -1,6 +1,6 @@
{
"name" : "samehome",
"appid" : "__UNI__C4028F6",
"appid" : "__UNI__0CF38A0",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "101",

37
pages/markets/kLine.vue

@ -348,7 +348,14 @@
</script>
<script module="klineE" lang="renderjs">
let kline
export default {
export default {
data() {
return {
start: 98,
end: 100
};
},
mounted() {
if (typeof window.echarts === 'function') {
@ -402,9 +409,25 @@
var chartDom = document.getElementById('kline');
if (!this.is) {
console.log("this.is11111111", this.is)
this.myChart = echarts.init(chartDom);
this.myChart = echarts.init(chartDom);
if(this.kdata.categoryData.length<100){
this.start=50
this.end=100
}else if(this.kdata.categoryData.length<200){
this.start=85
this.end=100
}else{
this.start=98
this.end=100
}
}else{
console.log(this.myChart.getModel().option.dataZoom[0].start)
this.start=this.myChart.getModel().option.dataZoom[0].start
this.end=this.myChart.getModel().option.dataZoom[0].end
}
this.is = true;
var option;
this.myChart.setOption(
@ -539,16 +562,16 @@
dataZoom: [{
type: 'inside',
start: 98,
end: 100
start: this.start,
end: this.end
},
{
show: false,
xAxisIndex: [0, 1],
type: 'slider',
top: '85%',
start: 98,
end: 100
start: this.start,
end: this.end
}
],
series: [{

5
pages/me/transfer.vue

@ -332,13 +332,12 @@
.numberDownSelect {
position: absolute;
width: 32rpx;
height: 32rpx;
top: 36rpx;
right: 148rpx;
right: 34rpx;
.all {
padding-left: 16rpx;
padding-left: 14rpx;
display: inline;
font-size: 28rpx;
color: #00E8A2;

6
pages/mine/mineDetails.vue

@ -17,7 +17,7 @@
<view class="bottom">
<view class="item">
<view class="title">{{ i18n.LockBTC }}{{" "}}{{detail.mineDetails.baseCoin}}</view>
<view class="value">{{ detail.mineDetails.limitMin }}</view>
<view class="value">{{ detail.mineDetails.baseAmount }}</view>
</view>
<view class="item">
<view class="title">{{ i18n.dayproduce }}</view>
@ -33,13 +33,13 @@
<!-- <input class="input" v-model="info.inviteCode" focus :placeholder="i18n.invuteCode"
placeholder-style="color:#A1A0A8" :disabled="detail.inviteCode" /> -->
<view class="allItem">
<input class="input" v-model="info.amount" :placeholder="i18n.lockBTC"
<input class="input" v-model="info.amount" :placeholder="i18n.lockBTC.replace('BTC',detail.mineDetails.baseCoin)"
placeholder-style="color:#A1A0A8" />
<view class="all" @click="info.amount=detail.userCapital">{{ i18n.ALL }}</view>
</view>
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="lockBTCBtned" @click="Lock">
{{ i18n.LockBTCBtn }}
{{ i18n.LockBTCBtn.replace('BTC',detail.mineDetails.baseCoin) }}{
</u-button>
</view>

29
pages/recharge/recharge.vue

@ -26,11 +26,11 @@
</view>
<view class="coinContent" v-if="pageState === 'crypto'">
<!-- coin选择框 -->
<view class="input-item">
<view class="input-item" @click="USDTPopupShow = true">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.PleaseChooseCoin" :disabled="true">
</u-input>
<view class="selectCoinBtn" @click="USDTPopupShow = true">{{coin}}
<view class="selectCoinBtn" >
</view>
</view>
@ -187,6 +187,7 @@
radioChange(e) {
this.coin = e.enname
this.coinCode = e.code
if (!e.address) {
let coinInfo = {
coinCode: e.code
@ -194,11 +195,11 @@
// code
api.rechargeAddress(coinInfo).then(res => {
this.coinAddress = res.address
this.qr = this.coinAddress
this.qr = QR.createQrCodeImg(this.coinAddress)
})
} else {
this.coinAddress = e.address
this.qr = this.coinAddress
this.qr = QR.createQrCodeImg(this.coinAddress)
}
},
//
@ -212,11 +213,15 @@
this.reInfo = res
if (this.pageState == 'crypto') {
if (this.reInfo.coins[0].address) {
this.coinAddress = this.reInfo.coins[0].address
let img = this.reInfo.coins[0].address
this.coin = this.reInfo.coins[0].enname
this.coinCode = this.reInfo.coins[0].code
this.getQr(img)
// this.coinAddress = this.reInfo.coins[0].address
// let img = this.reInfo.coins[0].address
// this.coin = this.$i18n.PleaseChooseCoin
// this.coinCode = this.reInfo.coins[0].code
// this.getQr(img)
this.coinAddress = '';
this.coin = ''
this.qr =''
} else {
let coinInfo = {
coinCode: this.reInfo.coins[0].code
@ -224,7 +229,7 @@
// code
api.rechargeAddress(coinInfo).then(res => {
this.coinAddress = res.address
this.qr = this.coinAddress
this.qr = this.getQr(this.coinAddress)
})
}
} else {
@ -380,7 +385,7 @@
}
.CoinAddressTitle {
width: 340rpx;
width: 50%;
height: 40rpx;
font-size: 14px;
display: inline-block;
@ -545,7 +550,7 @@
background: #323045;
border-radius: 40rpx;
text-align: center;
font-size: 32rpx;
font-size: 26rpx;
&.select {
background: #FF844B;

9
pages/subscription/details.vue

@ -53,7 +53,15 @@
</view>
<!-- 文字内容 -->
<!-- FullNameOfToken: 'Tên đầy đủ của mã thông báo:',
TotalCirculation: 'Giá đăng ký:',
ICOPrice: 'Giá đăng ký:',
ICOTime: 'Thời gian đăng ký:', -->
<view class="content">{{des}}</view>
<view class="content">{{i18n.FullNameOfToken+deinfo.sysCoinInfo.fullName}}</view>
<view class="content">{{i18n.TotalCirculation+deinfo.sysCoinInfo.issueAmount}}</view>
<view class="content">{{i18n.ICOPrice+deinfo.sysCoinInfo.initalPrice}} USDT</view>
<view class="content">{{i18n.ICOTime+deinfo.sysCoinInfo.initialReleasePhase}}</view>
</view>
</view>
@ -185,6 +193,7 @@
this.deinfo = res;
this.des = this.deinfo.sysCoinInfo.info
this.deinfo.lefttime=this.deinfo.lefttime/1000
this.countdown(this.deinfo.lefttime)
})
},

10
utils/language/en_US.js

@ -114,8 +114,8 @@ export default {
Fee: 'Fee',
buyLong: "Buy /Long ",
sellSHORT: 'Sell /Short ',
UnitPrice: 'Unit Price',
Number: 'Number',
UnitPrice: 'Price',
Number: 'Amount',
CurrentEntrust: 'Current Entrust',
Position: 'Position',
@ -325,7 +325,7 @@ export default {
Subscribe: 'Subscribe',
Ended: 'Ended',
ComingSoon: 'Coming soon',
STLTotalCirculation: 'STL total circulation',
STLTotalCirculation: 'Total circulation',
PrivateSalePrice: 'Private sale price',
ICOTime: 'ICO Time',
// Pending //Complete
@ -348,6 +348,10 @@ export default {
ProjectDetails: 'Project Details',
Video: 'Video',
WhiteBook: 'White Book',
FullNameOfToken: 'Full name of token:',
TotalCirculation: 'Total circulation:',
ICOPrice: 'ICO Price:',
ICOTime: 'Full name of token:',
},
//me

12
utils/language/vi_VN.js

@ -110,8 +110,8 @@ export default {
Fee: 'Phí',
buyLong: "Mua / Dài",
sellSHORT: 'Bán / Ngắn hạn',
UnitPrice: 'Đơn giá',
Number: 'Con số',
UnitPrice: 'giá bán',
Number: 'số lượng',
CurrentEntrust: 'Current Entrust',
Position: 'Chức vụ',
@ -321,7 +321,7 @@ export default {
Subscribe: 'Đặt mua',
Ended: 'Đã kết thúc',
ComingSoon: 'Sắp có',
STLTotalCirculation: 'STL tổng lưu hành',
STLTotalCirculation: 'tổng lưu hành',
PrivateSalePrice: 'Giá bán riêng',
ICOTime: 'Thời gian ICO',
// Pending //Complete
@ -344,6 +344,10 @@ export default {
ProjectDetails: 'Chi tiết dự án',
Video: 'Video',
WhiteBook: 'sách trắng',
FullNameOfToken: 'Tên đầy đủ của mã thông báo:',
TotalCirculation: 'Giá đăng ký:',
ICOPrice: 'Giá đăng ký:',
ICOTime: 'Thời gian đăng ký:',
},
//me
@ -379,7 +383,7 @@ export default {
ScanTheCode: 'Quét mã để tải xuống',
MyReferralID: 'ID giới thiệu của tôi:',
CopyID: 'Sao chép ID',
CopyLink: 'Sao chép',
ChangeLoginPassword: 'Thay đổi mật khẩu đăng nhập',
ChangeWithdrawalPassword: 'Thay đổi mật khẩu rút tiền',
BankCard: 'Thẻ ngân hàng',

12
utils/language/zh_TW.js

@ -110,7 +110,7 @@ export default {
Fee: '手續費',
buyLong: "買入/做多 ",
sellSHORT: '賣出/做空 ',
UnitPrice: '價',
UnitPrice: '價',
Number: '數量',
CurrentEntrust: '當前委託',
@ -322,7 +322,7 @@ export default {
Subscribe: '訂閱',
Ended: '結束',
ComingSoon: '快來了',
STLTotalCirculation: 'STL總發行量',
STLTotalCirculation: '總發行量',
PrivateSalePrice: '私募價格',
ICOTime: 'ICO時間',
// Pending //Complete
@ -345,6 +345,10 @@ export default {
ProjectDetails: '項目詳情',
Video: '視頻',
WhiteBook: '白皮書',
FullNameOfToken: '幣名全稱:',
TotalCirculation: '申購價格:',
ICOPrice: '申購價格:',
ICOTime: '申購時間:',
},
//me
@ -378,8 +382,8 @@ export default {
ShareWithFriends: '和朋友分享',
ScanTheCode: '掃碼下載',
MyReferralID: '我的推薦人ID:',
CopyID: '複製 ID',
CopyID: '複製',
CopyLink: '複製',
ChangeLoginPassword: '更改登錄密碼',
ChangeWithdrawalPassword: '更改提款密碼',
BankCard: '銀行卡',

Loading…
Cancel
Save