diff --git a/App.vue b/App.vue index 57ecc59..a948702 100644 --- a/App.vue +++ b/App.vue @@ -5,7 +5,7 @@ // i18n() { // return this.$t('index') // }, - // }, + // }, onLaunch: function() { console.log('App Launch') // #ifdef APP-PLUS diff --git a/components/entrustOrderList/entrustOrderList.vue b/components/entrustOrderList/entrustOrderList.vue index 0626827..c02216d 100644 --- a/components/entrustOrderList/entrustOrderList.vue +++ b/components/entrustOrderList/entrustOrderList.vue @@ -15,7 +15,7 @@ - {{item.direction}} + {{item.direction}} {{item.timestr}} {{ i18n.CloseTime }} {{item.timestr2}} @@ -49,10 +49,13 @@ {{ i18n.CurrentPrice }} {{marketDetail.close}} {{ i18n.status }} - {{item.status}} + + {{item.status=='undone'?i18n.undone:item.status=='opened'?i18n.opened:item.status=='revoked'?i18n.revoked:i18n.closed}} + {{ i18n.do }} - Stop/Limit + {{ i18n.StopLimit }} + {{ i18n.ExpectProfit }} @@ -63,17 +66,25 @@ {{ i18n.ClosePrice }} - {{item.currentPrice}} + {{item.closedPrice}} {{ i18n.status }} - {{item.status}} + + {{item.status=='undone'?i18n.undone:item.status=='opened'?i18n.opened:item.status=='revoked'?i18n.revoked:i18n.closed}} + + {{ i18n.PL }} - - {{item.profitAmount-item.fee}} + + + {{getPrice(item.profitAmount)}} + {{ i18n.status }} - {{item.status}} + + {{item.status=='undone'?i18n.undone:item.status=='opened'?i18n.opened:item.status=='revoked'?i18n.revoked:i18n.closed}} + {{ i18n.PL }} 0 @@ -115,7 +126,7 @@ - + @@ -199,8 +210,8 @@ itemData: {}, // 设置止盈数据 stopLimitData: {}, - profit:0, - loss:0 + profit: 0, + loss: 0 } }, computed: { @@ -209,7 +220,7 @@ }, }, watch: { - deep:true, + deep: true, symbol: { handler: function() { this.getContractOrderList() @@ -223,7 +234,7 @@ //全局事件在组件实例创建完成定义 created() { uni.$on('upData', num => { - if(num){ + if (num) { this.getContractOrderList() } }) @@ -235,18 +246,32 @@ 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) + // 获取位数 + 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) { @@ -258,12 +283,12 @@ getStopLimit(i) { this.stopLimitData = i this.stopModalShow = true - this.styValue=0; - this.stsValue=0; - this.profit=0 - this.loss=0 + this.styValue = 0; + this.stsValue = 0; + this.profit = 0 + this.loss = 0 }, - + // 获取撤销订单 closeItem(item, i) { this.itemData = item @@ -466,6 +491,7 @@ color: #00E8A2; margin-right: 28rpx; } + .sell { color: #F4506A; margin-right: 28rpx; diff --git a/components/showMore/showMore.vue b/components/showMore/showMore.vue index de8ecd7..074bed4 100644 --- a/components/showMore/showMore.vue +++ b/components/showMore/showMore.vue @@ -36,7 +36,7 @@ export default { }, data() { return { - title: 'Show more', + title: this.$t("recharge").ShowMore, collapseFlag: false, // 折叠状态 } }, @@ -49,7 +49,7 @@ export default { methods: { collapse() { this.collapseFlag = !this.collapseFlag; - this.title = this.collapseFlag ? 'Pick up' : 'Show more' + this.title = this.collapseFlag ? this.$t("recharge").Pickup : this.$t("recharge").ShowMore } diff --git a/pages.json b/pages.json index bd3b5fc..00f4c09 100644 --- a/pages.json +++ b/pages.json @@ -29,9 +29,19 @@ "navigationStyle": "custom" } }, - - + { + "path": "pages/login/useragreement", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/login/condition", + "style": { + "navigationStyle": "custom" + } + }, // markets { diff --git a/pages/charity/index.vue b/pages/charity/index.vue index b6f3510..5365044 100644 --- a/pages/charity/index.vue +++ b/pages/charity/index.vue @@ -15,7 +15,7 @@ {{item.title}} - Target: {{item.targetAmount}}{{" "}}{{coinTypeInfo.system_cropto_code}} + {{ i18n.Target }}{{item.targetAmount}}{{" "}}{{coinTypeInfo.system_cropto_code}} {{item.percentage}}% diff --git a/pages/home/index.vue b/pages/home/index.vue index 9818d41..ffc2733 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -100,11 +100,11 @@ margin: 'auto 102rpx auto 118rpx', }"> - - OK + {{i18n.OK}} @@ -375,17 +375,15 @@ }, // 读公告 toRead() { + this.popupShow = false api.noticeRead({ noticeId: this.noticeId }).then(res => { - + // this.noticeId = null; + // this.messageList=[]; + // this.noticeList(); }) - this.popupShow = false - setTimeout(() => { - this.noticeId = null; - this.messageList=[]; - this.noticeList(); - }, 1500) + }, go(url) { @@ -402,8 +400,12 @@ for (var i = 0; i < res.length; i++) { this.messageList.push(res[i].title) } - // 获取未读的公告 - this.getNoReadNotice() + if (this.notice[0].isRead == 'no') { + this.contentFirst = this.notice[0].content + this.noticeId = this.notice[0].id + this.popupShow = true + } + }) }, // 轮播 @@ -430,7 +432,10 @@ this.$store.commit('setLanguage', e.language) this.langTrue = e.title uni.setStorageSync('langTrue', e.title) - uni.redirectTo({ + // uni.redirectTo({ + // url: '/pages/home/index' + // }) + uni.reLaunch({ url: '/pages/home/index' }) }, diff --git a/pages/login/condition.vue b/pages/login/condition.vue new file mode 100644 index 0000000..d12ca36 --- /dev/null +++ b/pages/login/condition.vue @@ -0,0 +1,290 @@ + + + + + diff --git a/pages/login/register.vue b/pages/login/register.vue index de93369..74b34d3 100644 --- a/pages/login/register.vue +++ b/pages/login/register.vue @@ -1,7 +1,13 @@