Browse Source

修改默认语言和优化合约

master
ltlzx 4 years ago
parent
commit
6fcbf25db6
  1. 3
      i18n/index.js
  2. 14
      pages/exchange/open-position.vue

3
i18n/index.js

@ -19,7 +19,8 @@ requireComponent.keys().forEach(fileName => {
}) })
// 语言注入 // 语言注入
let i18n = new VueI18n({ let i18n = new VueI18n({
locale: uni.getStorageSync('language')||'zh-CN', // locale: uni.getStorageSync('language')||'zh-CN',
locale:'en',
messages: messages messages: messages
}) })
export default i18n; export default i18n;

14
pages/exchange/open-position.vue

@ -429,7 +429,7 @@
<view class="row d-flex m-y-xs justify-between fn-14 p-t-xs"> <view class="row d-flex m-y-xs justify-between fn-14 p-t-xs">
<view class="w-50 fn-left"> <view class="w-50 fn-left">
<view class="label">{{ $t("option.b6") }}</view> <view class="label">{{ $t("option.b6") }}</view>
<view class="color-light">{{item.unRealProfit}}</view> <view class="color-light" :class="item.unRealProfit>0?'increace':item.unRealProfit<0?'decreace':''">{{item.unRealProfit}}</view>
</view> </view>
<view class="w-50 fn-center"> <view class="w-50 fn-center">
<view class="label">{{ $t("contract.g8") }}</view> <view class="label">{{ $t("contract.g8") }}</view>
@ -778,8 +778,9 @@ export default {
{ label: this.$t("exchange.d6")+this.$t("contract.g5"), value: 0 } { label: this.$t("exchange.d6")+this.$t("contract.g5"), value: 0 }
], ],
shixian:[ shixian:[
{ label: this.$t("contract.d7"), value: 2 },
{ label: this.$t("contract.h8"), value: 1 }, { label: this.$t("contract.h8"), value: 1 },
{ label: this.$t("contract.d7"), value: 2 }
], ],
canvasShow:false, canvasShow:false,
myCanvas:'', myCanvas:'',
@ -1413,7 +1414,8 @@ export default {
closePositionShow(item) { closePositionShow(item) {
this.activeItem = item; this.activeItem = item;
this.pingActive=3 this.pingActive=3
this.$set(this.activeItem, "closeType", 1); // this.$set(this.activeItem, "closeType", 1);
this.$set(this.activeItem, "closeType", 2);
this.pingAmount = Math.round((this.activeItem.avail_position * 100) / 100); this.pingAmount = Math.round((this.activeItem.avail_position * 100) / 100);
this.showPing = true; this.showPing = true;
}, },
@ -1768,4 +1770,10 @@ export default {
.w-40{ .w-40{
width: 45%; width: 45%;
} }
.increace{
color: #53b987;
}
.decreace{
color: #ff231f;
}
</style> </style>
Loading…
Cancel
Save