Browse Source

合并

master
j1ack 3 years ago
parent
commit
1e578ec94e
  1. 21
      components/entrustOrderList/entrustOrderList.vue
  2. 10
      components/transaction/transaction.vue
  3. 17
      manifest.json
  4. 10
      pages/charity/details.vue
  5. 6
      pages/markets/kLine.vue
  6. 4
      pages/me/index.vue
  7. 43
      pages/me/transfer.vue
  8. 35
      pages/withdrawal/chooseAddress.vue
  9. 2
      utils/constant.js
  10. 2
      utils/language/en_US.js
  11. 2
      utils/language/vi_VN.js
  12. 2
      utils/language/zh_TW.js

21
components/entrustOrderList/entrustOrderList.vue

@ -22,12 +22,6 @@
<view class="closeBtn" v-show="type === 0" @click="closeItem(item,index)">{{
i18n.close
}}</view>
<text class="righttype3" v-show="type === 3">
<text class="title">{{ i18n.PL }}:{{" "}}</text>
<text class="value" style="color:#00E8A2;">
<!-- {{item.currentPl}} --> 0
</text>
</text>
</view>
@ -69,8 +63,11 @@
{{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" style="color:#00E8A2;" v-show="type === 1">
{{getValue(item.profitAmount/item.bondAmount)}}%
<view class="value" v-show="type === 1" :style="
getValue(item.direction=='buy'
?(marketDetail.close-item.openedPrice)*item.hand/item.bondAmount:(item.openedPrice-marketDetail.close)*item.hand/item.bondAmount)>=0?'color:#00E8A2;':'color:#F4506A'">
<!-- {{getValue(item.profitAmount/item.bondAmount)}}% -->
{{getValue(item.direction=='buy'?(marketDetail.close-item.openedPrice)*item.hand/item.bondAmount:(item.openedPrice-marketDetail.close)*item.hand/item.bondAmount)}}%
</view>
<view class="title" v-show="type === 1||type === 2">{{ i18n.ExpectProfit }}</view>
@ -106,16 +103,16 @@
</view>
</view>
<!-- Revoked -->
<!-- <view class="right" v-show="type === 3">
<view class="title">{{ i18n.status }}</view>
<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> -->
<view class="title">{{ i18n.PL }}</view>
<view class="value" style="color:#00E8A2;">
0
</view>
</view> -->
</view>
</view>
</view>

10
components/transaction/transaction.vue

@ -114,7 +114,8 @@
},
data() {
return {
return {
newSymbol:'',
math:null,
priceSelectListShow: false,
priceTypeValue: 0,
@ -148,13 +149,18 @@
marketDetail: {
deep: true,
handler: function (n,i) {
this.coinPrice = n.close
if(this.newSymbol!=n.symbol){
this.coinPrice = this.marketDetail.close
}
this.newSymbol=n.symbol
}
}
},
mounted() {
this.leverageValue = this.contractConfig.leverage[0];
this.coinPrice = this.marketDetail.close
this.newSymbol=this.marketDetail.symbol
},
methods: {

17
manifest.json

@ -84,7 +84,22 @@
}
}
},
"nativePlugins" : {}
"nativePlugins" : {
"HF-Step" : {
"__plugin_info__" : {
"name" : "原生计步器(Android和IOS)",
"description" : "计步器,原生计步器插件,安卓,IOS",
"platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=6632",
"android_package_name" : "com.samehome",
"ios_bundle_id" : "com.samehome",
"isCloud" : true,
"bought" : 1,
"pid" : "6632",
"parameters" : {}
}
}
}
},
"h5" : {
"publicPath" : "/",

10
pages/charity/details.vue

@ -5,7 +5,7 @@
<view class="body">
<view class="titleBody">
<!-- 海报 -->
<u--image class="img" :showLoading="true" :src="baseURL+detail.charityDetails.img" width="750rpx"
<u--image class="img" :showLoading="true" :src="baseURL+imgDetail" width="750rpx"
height="762rpx"></u--image>
<!-- 文章标题 -->
<view class="title">{{detail.charityDetails.title}}</view>
@ -117,6 +117,7 @@
name: "charityDetails",
data() {
return {
imgDetail:'',
id:'',
baseURL:'',
DonatePopupShow: false,
@ -131,7 +132,9 @@
},
radioValue: '',
detail:{
charityDetails:{},
charityDetails:{
img:null,
},
coins:[{}],
},
};
@ -189,6 +192,9 @@
charityId:id
}).then(res => {
this.detail=res;
this.imgDetail=res.charityDetails.img
this.coinInfo.coinCode=this.detail.coins[0].enname
this.coinInfo.coinCode2=this.detail.coins[0].code
})

6
pages/markets/kLine.vue

@ -90,15 +90,15 @@
</view>
</view>
</view>
<view class="btn">
<!-- open按钮 -->
<u-button class="button" color="#00E8A2" throttleTime="500" @click="btnClick('buy')">
{{ i18n.open }}
{{ i18n.LONG }}
</u-button>
<!-- close按钮 -->
<u-button class="button" color="#F4506A" throttleTime="500" @click="btnClick('sell')">
{{ i18n.close }}
{{ i18n.SHORT }}
</u-button>
</view>

4
pages/me/index.vue

@ -10,7 +10,7 @@
<view class="contentBody">
<!-- 用户头像和id -->
<view class="userInfo">
<u-image class="headImg" :src="baseURL+userInfo.headImg" width="160rpx" height="160rpx"
<u-image class="headImg" :src="baseURL+imgDetail" width="160rpx" height="160rpx"
radius="160rpx"></u-image>
<view class="idAndAccount">
<view class="id">ID:{{userInfo.uid}}</view>
@ -100,6 +100,7 @@
name: 'me',
data() {
return {
imgDetail:'',
baseURL:'',
// 退
showLogOut: false,
@ -132,6 +133,7 @@
//
getUserInfo() {
api.userInfo().then(res => {
this.imgDetail=res.headImg
this.userInfo=res
})
},

43
pages/me/transfer.vue

@ -30,7 +30,7 @@
<view class="text">{{ i18n.To }}</view>
<view class="input-item">
<u-input class="input" v-model="i18toWays" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.TradingAccount" :disabled="true">
:placeholder="i18n.OptionAccount" :disabled="true">
</u-input>
<view class="downSelect" @click="accountPopupShowTo = true"></view>
</view>
@ -94,18 +94,17 @@
@touchmove.stop.prevent="">
<radio-group class="radioGroup" >
<!-- v-for="(item, index) in 3" :key="index" -->
<label class="checkBox" @click="getAccount('exchange','form')">
<label class="checkBox" @click="getAccount('exchange','form'),getCoinOrAccount()">
<view class="name">{{i18n.Balanceaccount}}</view>
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.fromWays=='Balance account'"></radio>
</label>
<label class="checkBox" @click="getAccount('contract','form')">
<label class="checkBox" @click="getAccount('contract','form'),getCoinOrAccount()">
<view class="name">{{i18n.Contractaccount}}</view>
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.fromWays=='Contract account'"></radio>
</label>
</radio-group>
</scroll-view>
<u-button class="button" color="#00E8A2" throttleTime="500" @click="getCoinOrAccount">OK
<u-button class="button" color="#00E8A2" throttleTime="500" @click="accountPopupShow=false">OK
</u-button>
</view>
</u-popup>
@ -119,11 +118,11 @@
@touchmove.stop.prevent="">
<radio-group class="radioGroup" >
<!-- v-for="(item, index) in 3" :key="index" -->
<label class="checkBox" @click="getAccount('contract','to')">
<label class="checkBox" @click="getAccount('contract','to'),getCoinOrAccount()">
<view class="name">{{i18n.Contractaccount}}</view>
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.toWays=='Contract account'"></radio>
</label>
<label class="checkBox" @click="getAccount('exchange','to')">
<label class="checkBox" @click="getAccount('exchange','to'),getCoinOrAccount()">
<view class="name">{{i18n.Balanceaccount}}</view>
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.toWays=='Balance account'"></radio>
</label>
@ -131,7 +130,7 @@
</radio-group>
</scroll-view>
<u-button class="button" color="#00E8A2" throttleTime="500" @click="getCoinOrAccount">OK
<u-button class="button" color="#00E8A2" throttleTime="500" @click="accountPopupShowTo=false">OK
</u-button>
</view>
</u-popup>
@ -187,6 +186,14 @@
},
onLoad() {
this.baseURL = constant.BASE_URL
this.coinInfo.fromWays='exchange';
this.coinInfo.toWays='contract';
this.transCoinInfo.fromWays='Balance account';
this.i18fromWays=this.$t("me").Balanceaccount
this.transCoinInfo.toWays='Contract account';
this.i18toWays=this.$t("me").Contractaccount
this.getInfo()
},
onShow() {},
@ -213,12 +220,13 @@
if(e=='exchange'){
this.transCoinInfo.fromWays='Balance account'
this.i18fromWays=this.$t("me").Balanceaccount
}else{
console.log(123456)
this.transCoinInfo.fromWays='Contract account'
this.i18fromWays=this.$t("me").Contractaccount
}
this.coinInfo.fromWays=e
this.getInfo()
}else{
if(e=='exchange'){
this.transCoinInfo.toWays='Balance account'
@ -267,13 +275,16 @@
fromWays:this.coinInfo.fromWays,
}).then(res => {
this.coinWayInfo=res
this.accountPopupShow = false
this.accountPopupShowTo = false
})
},
//
getInfo(type) {
api.getTransferConfig({}).then(res => {
this.coinWayInfo={};
this.info={};
api.getTransferConfig({
fromWays:this.coinInfo.fromWays
}).then(res => {
this.info = res
//
if(type){
@ -283,13 +294,7 @@
this.coinInfo.coinCode=this.info.coinList[0].enname
this.coinCode = this.info.coinList[0].enname
this.coinCode2 = this.info.coinList[0].code
this.coinInfo.fromWays='exchange';
this.coinInfo.toWays='contract';
this.transCoinInfo.fromWays='Balance account';
this.i18fromWays=this.$t("me").Balanceaccount
this.transCoinInfo.toWays='Contract account';
this.i18toWays=this.$t("me").Contractaccount
})
},
USDTRadioChange(e) {},

35
pages/withdrawal/chooseAddress.vue

@ -2,10 +2,23 @@
<view class="main">
<!-- nav -->
<navigation>{{ i18n.ChooseAddress }}
<view slot="right" class="right" @click="editFlag = !editFlag;">{{
editFlag ? i18n.OK : i18n.Edit
}}
<!-- #ifdef H5 -->
<view slot="right" class="right" @click="editFlag = !editFlag;">{{
editFlag ? i18n.OK : i18n.Edit
}}
</view>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<view slot="right" class="right2" @click="editFlag = !editFlag;">{{
editFlag ? i18n.OK : i18n.Edit
}}
</view>
<!-- #endif -->
</navigation>
<!-- #ifdef APP-PLUS -->
@ -232,6 +245,22 @@
border-radius: 8px;
color: #FFBC1F;
}
.right2{
width: 82rpx;
height: 56rpx;
line-height: 56rpx;
position: absolute;
right: 32rpx;
top: 70%;
transform: translateY(-50%);
font-size: 24rpx;
background: rgba(246, 166, 9, 0.1);
border-radius: 8px;
color: #FFBC1F;
}
.content {

2
utils/constant.js

@ -1,5 +1,5 @@
const IS_TEST = true;
const IS_TEST = false;
const H5_BASE_URL = '/api';
const BASE_URL = IS_TEST?'https://sapi.payairs.com':'https://api.gream.ltd';
const H5_MARKET_URL = '/market';

2
utils/language/en_US.js

@ -448,7 +448,7 @@ export default {
SelectCurrency: 'Select currency',
PleaseChooseCoin: 'Please choose coin',
From: 'From',
OptionAccount: 'Option account',
OptionAccount: 'Choose account',
To: 'To',
TradingAccount: 'Trading account',
TransferNumber: 'Transfer number',

2
utils/language/vi_VN.js

@ -437,7 +437,7 @@ export default {
SelectCurrency: 'Chọn đơn vị tiền tệ',
PleaseChooseCoin: 'Vui lòng chọn đơn vị tiền tệ',
From: 'chuyển ra ngoài',
OptionAccount: 'Tài khoản Tùy chọn',
OptionAccount: 'chọn tài khoản',
To: 'chuyển giao',
TradingAccount: 'tài khoản giao dịch',
TransferNumber: 'Số tiền chuyển khoản',

2
utils/language/zh_TW.js

@ -444,7 +444,7 @@ export default {
SelectCurrency: '選擇幣種',
PleaseChooseCoin: '請選擇幣種',
From: '轉出',
OptionAccount: '期權賬戶',
OptionAccount: '選擇帳戶',
To: '轉入',
TradingAccount: '交易賬戶',
TransferNumber: '轉帳金額',

Loading…
Cancel
Save