Browse Source

合并

master
j1ack 3 years ago
parent
commit
4cab300a06
  1. 16
      components/entrustOrderList/entrustOrderList.vue
  2. 4
      components/transaction/transaction.vue
  3. 114
      pages/home/index.vue
  4. 2
      pages/markets/trade.vue
  5. 26
      pages/me/transfer.vue
  6. 3
      pages/recharge/rechargeRecord.vue
  7. 2
      pages/subscription/details.vue
  8. 19
      utils/index.js
  9. 2
      utils/language/en_US.js

16
components/entrustOrderList/entrustOrderList.vue

@ -17,7 +17,7 @@
<view class="header"> <view class="header">
<text :class="item.direction" >{{item.direction}}</text> <text :class="item.direction" >{{item.direction}}</text>
<text class="time">{{item.timestr}}</text> <text class="time">{{item.timestr}}</text>
<text class="closeTimeTitle" v-show="type === 2 || type === 3">{{ i18n.CloseTime }}</text> <text class="closeTimeTitle" v-show="type === 2">{{ i18n.CloseTime }}</text>
<text class="closeTime" v-show="type === 2">{{item.timestr2}}</text> <text class="closeTime" v-show="type === 2">{{item.timestr2}}</text>
<view class="closeBtn" v-show="type === 0 || type === 1" @click="closeItem(item,index)">{{ <view class="closeBtn" v-show="type === 0 || type === 1" @click="closeItem(item,index)">{{
i18n.close i18n.close
@ -32,8 +32,8 @@
<view class="value">{{item.openedPrice}}</view> <view class="value">{{item.openedPrice}}</view>
<view class="title">{{ i18n.Bond }}</view> <view class="title">{{ i18n.Bond }}</view>
<view class="value">{{item.bondAmount}}</view> <view class="value">{{item.bondAmount}}</view>
<view class="title" v-show="type !== 3&&type !== 0">{{ i18n.StyPrice }}</view> <view class="title" v-show="type !== 3||type !== 0">{{ i18n.StyPrice }}</view>
<view class="value" v-show="type !== 3&&type !== 0">{{item.winStopPrice}}</view> <view class="value" v-show="type !== 3||type !== 0">{{item.winStopPrice}}</view>
</view> </view>
<!-- 公共的 --> <!-- 公共的 -->
<view class="center"> <view class="center">
@ -41,8 +41,8 @@
<view class="value">{{item.hand}} * {{item.leverage}}</view> <view class="value">{{item.hand}} * {{item.leverage}}</view>
<view class="title">{{ i18n.Fee }}</view> <view class="title">{{ i18n.Fee }}</view>
<view class="value">{{item.fee}}</view> <view class="value">{{item.fee}}</view>
<view class="title" v-show="type !== 3&&type !== 0">{{ i18n.StsPrice }}</view> <view class="title" v-show="type !== 3||type !== 0">{{ i18n.StsPrice }}</view>
<view class="value" v-show="type !== 3&&type !== 0">{{item.lossStopPrice}}</view> <view class="value" v-show="type !== 3||type !== 0">{{item.lossStopPrice}}</view>
</view> </view>
<!-- Current Entrust Position--> <!-- Current Entrust Position-->
<view class="right" v-show="type === 0 || type === 1"> <view class="right" v-show="type === 0 || type === 1">
@ -53,7 +53,7 @@
<view class="title" v-show="type === 1">{{ i18n.do }}</view> <view class="title" v-show="type === 1">{{ i18n.do }}</view>
<view class="value" style="color:#00E8A2;" v-show="type === 1" @click="getStopLimit(item)"> <view class="value" style="color:#00E8A2;" v-show="type === 1" @click="getStopLimit(item)">
Stop/Limit</view> Stop/Limit</view>
<view class="title"v-show="type === 1&&type === 2">{{ i18n.ExpectProfit }}</view> <view class="title" v-show="type === 1||type === 2">{{ i18n.ExpectProfit }}</view>
<view class="value" v-show="type === 1" <view class="value" v-show="type === 1"
:style="parseFloat(getItem(item.direction=='buy'?(marketDetail.close-item.openedPrice)*item.hand:(item.openedPrice-marketDetail.close)*item.hand))>=0?'color:#00E8A2':'color:#F4506A'"> :style="parseFloat(getItem(item.direction=='buy'?(marketDetail.close-item.openedPrice)*item.hand:(item.openedPrice-marketDetail.close)*item.hand))>=0?'color:#00E8A2':'color:#F4506A'">
{{getItem(item.direction=='buy'?(marketDetail.close-item.openedPrice)*item.hand:(item.openedPrice-marketDetail.close)*item.hand)}} {{getItem(item.direction=='buy'?(marketDetail.close-item.openedPrice)*item.hand:(item.openedPrice-marketDetail.close)*item.hand)}}
@ -279,11 +279,11 @@
this.list = res.data this.list = res.data
for (var i = 0; i < this.list.length; i++) { for (var i = 0; i < this.list.length; i++) {
if (this.list[i].addTime) { if (this.list[i].addTime) {
this.list[i].timestr = this.$index.formatyymmddhhmmss(this.list[ this.list[i].timestr = this.$index.formatmmddhhmmss(this.list[
i].addTime) i].addTime)
} }
if (this.list[i].closedTime) { if (this.list[i].closedTime) {
this.list[i].timestr2 = this.$index.formatyymmddhhmmss(this.list[ this.list[i].timestr2 = this.$index.formatmmddhhmmss(this.list[
i].closedTime) i].closedTime)
} }

4
components/transaction/transaction.vue

@ -190,9 +190,11 @@
duration: 1500 duration: 1500
}) })
setTimeout(()=>{ setTimeout(()=>{
//使uni.$emit
uni.$emit("upData",true) uni.$emit("upData",true)
// usable
this.$emit('change','')
},800) },800)
//使uni.$emit
}); });
}, },
} }

114
pages/home/index.vue

@ -20,27 +20,29 @@
</view> </view>
<!-- 轮播图 --> <!-- 轮播图 -->
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<u-swiper class="swiper" :list="swiperList" @click="bannerClick" previousMargin="48rpx" nextMargin="80rpx" circular <u-swiper class="swiper" :list="swiperList" @click="bannerClick" previousMargin="48rpx" nextMargin="80rpx"
:autoplay="true" radius="32rpx" bgColor="rgba(0,0,0,0)" height="360rpx"> circular :autoplay="true" radius="32rpx" bgColor="rgba(0,0,0,0)" height="360rpx">
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<u-swiper class="swiper" :list="swiperList" @click="bannerClick" previousMargin="48rpx" nextMargin="80rpx" circular <u-swiper class="swiper" :list="swiperList" @click="bannerClick" previousMargin="48rpx"
:autoplay="true" radius="32rpx" bgColor="rgba(0,0,0,0)" height="360rpx" style="margin-top: 145rpx;"> nextMargin="80rpx" circular :autoplay="true" radius="32rpx" bgColor="rgba(0,0,0,0)" height="360rpx"
style="margin-top: 145rpx;">
<!-- #endif --> <!-- #endif -->
</u-swiper> </u-swiper>
<!-- 消息 --> <!-- 消息 -->
<view class="message" @click="go('/pages/me/notification')"> <view class="message" @click="go('/pages/me/notification')">
<u-icon class="icon" name="../../static/home/ic_proclamation.png" size="60rpx" width="60rpx"></u-icon> <u-icon class="icon" name="../../static/home/ic_proclamation.png" size="60rpx" width="60rpx">
</u-icon>
<!-- <view class="text">{{ i18n.homeMessage }}</view> --> <!-- <view class="text">{{ i18n.homeMessage }}</view> -->
<u-notice-bar class="notice" :text="messageList" icon="" fontSize="24rpx" bgColor="#211F32" color="#fff" <u-notice-bar class="notice" :text="messageList" icon="" fontSize="24rpx" bgColor="#211F32"
direction="column" > color="#fff" direction="column">
</u-notice-bar> </u-notice-bar>
</view> </view>
<!-- 三个按钮 --> <!-- 三个按钮 -->
<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" width="144rpx" <u--image class="img" :showLoading="true" src="../../static/home/img_recharge.png"
height="144rpx"></u--image> width="144rpx" height="144rpx"></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')">
@ -49,8 +51,8 @@
<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" width="144rpx" <u--image class="img" :showLoading="true" src="../../static/home/img_Subcription.png"
height="144rpx"></u--image> width="144rpx" height="144rpx"></u--image>
<view class="text">{{ i18n.Subcription }}</view> <view class="text">{{ i18n.Subcription }}</view>
</view> </view>
</view> </view>
@ -61,8 +63,9 @@
<view id="chart" :stepsNum="stepsNum" :stepTarget="stepTarget" :change:stepTarget="echarts.stepTargetReceive" <view id="chart" :stepsNum="stepsNum" :stepTarget="stepTarget"
:change:stepsNum="echarts.receive" style="width: 280rpx;height:280rpx; font-size: 40rpx;"> :change:stepTarget="echarts.stepTargetReceive" :change:stepsNum="echarts.receive"
style="width: 280rpx;height:280rpx; font-size: 40rpx;">
</view> </view>
@ -156,7 +159,7 @@
swiperList: [ swiperList: [
], ],
bannerList:[], bannerList: [],
videoShow: false, videoShow: false,
videoUrl: '', videoUrl: '',
videoList: [], videoList: [],
@ -194,7 +197,7 @@
this.updateSteps('show'); this.updateSteps('show');
// #endif // #endif
// #ifdef H5 // #ifdef H5
this.stepsNum=0; this.stepsNum = 0;
// #endif // #endif
}, },
@ -208,57 +211,57 @@
}, },
methods: { methods: {
// //
updateSteps(soucre){ updateSteps(soucre) {
var today=this.$index.formatyymmdd(new Date().getTime()); var today = this.$index.formatyymmdd(new Date().getTime());
var stepsNum_date= uni.getStorageSync("stepsNum_date"); var stepsNum_date = uni.getStorageSync("stepsNum_date");
var isUpdate=false; var isUpdate = false;
console.log(today) // console.log(today)
console.log(uni.getStorageSync("stepsNum_date")) // console.log(uni.getStorageSync("stepsNum_date"))
console.log(stepsNum_date) // console.log(stepsNum_date)
if(stepsNum_date){ if (stepsNum_date) {
if(today!=stepsNum_date.date){ if (today != stepsNum_date.date) {
uni.setStorageSync("stepsNum_date",null); uni.setStorageSync("stepsNum_date", null);
}else{ } else {
if(this.stepsNum==0){ if (this.stepsNum == 0) {
this.stepsNum=stepsNum_date.newStepsNum; this.stepsNum = stepsNum_date.newStepsNum;
} }
if(parseInt(this.stepsNum)>parseInt(stepsNum_date.stepsNum)){ if (parseInt(this.stepsNum) > parseInt(stepsNum_date.stepsNum)) {
uni.setStorageSync("stepsNum_date",{ uni.setStorageSync("stepsNum_date", {
stepsNum:stepsNum_date.stepsNum, stepsNum: stepsNum_date.stepsNum,
date:today, date: today,
newStepsNum:this.stepsNum newStepsNum: this.stepsNum
}); });
if(soucre){ if (soucre) {
isUpdate=true; isUpdate = true;
} }
} }
} }
}else{ } else {
isUpdate=true; isUpdate = true;
} }
if(isUpdate){ if (isUpdate) {
this.$api.updateSteps({ this.$api.updateSteps({
steps: this.stepsNum steps: this.stepsNum
}).then(res => { }).then(res => {
console.log(res,'res更新') console.log(res, 'res更新')
uni.setStorageSync("stepsNum_date",{ uni.setStorageSync("stepsNum_date", {
stepsNum:this.stepsNum, stepsNum: this.stepsNum,
date:today, date: today,
newStepsNum:this.stepsNum newStepsNum: this.stepsNum
}); });
}) })
} }
console.log(this.stepsNum) console.log(this.stepsNum)
}, },
bannerClick(i){ bannerClick(i) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.runtime.openUrl(this.bannerList[i].adUrl) plus.runtime.openUrl(this.bannerList[i].adUrl)
// #endif // #endif
@ -278,18 +281,17 @@
closeConfirm() { closeConfirm() {
this.$api.receivStepsAward().then(res => { this.$api.receivStepsAward().then(res => {
uni.$u.toast(this.$t("markets").Succeeded) uni.$u.toast(this.$t("markets").Succeeded)
this.closeModalShow=false
}) })
this.closeModalShow = false
}, },
// //
getSept() { getSept() {
try{ try {
// //
StepCounter.startStep((res) => { StepCounter.startStep((res) => {
console.log(res, '步数res'); console.log(res, '步数res');
this.stepCount = res.stepCount this.stepCount = res.stepCount
this.stepsNum=res.stepCount; this.stepsNum = res.stepCount;
this.updateSteps(); this.updateSteps();
//res.stepCount //res.stepCount
}, (res) => { }, (res) => {
@ -312,8 +314,8 @@
} }
}); });
}catch(e){ } catch (e) {
console.error("获取步数出错",e) console.error("获取步数出错", e)
} }
}, },
startStep() { startStep() {
@ -374,10 +376,12 @@
}).then(res => { }).then(res => {
}) })
this.noticeId = null;
this.popupShow = false this.popupShow = false
setTimeout(() => {
this.noticeId = null;
this.getNoReadNotice() this.getNoReadNotice()
console.log(res, '已经读了吗') }, 1500)
}, },
go(url) { go(url) {
uni.navigateTo({ uni.navigateTo({
@ -402,7 +406,7 @@
api.indexBanner({ api.indexBanner({
'mark': 'APP_INDEX' 'mark': 'APP_INDEX'
}).then(res => { }).then(res => {
this.bannerList=res this.bannerList = res
for (var i = 0; i < res.length; i++) { for (var i = 0; i < res.length; i++) {
this.swiperList.push(this.baseURL + res[i].adImgPath) this.swiperList.push(this.baseURL + res[i].adImgPath)
} }
@ -516,7 +520,7 @@
methods: { methods: {
receive(newValue, oldValue, ownerVm, vm) { receive(newValue, oldValue, ownerVm, vm) {
console.log(newValue,'变化') console.log(newValue, '变化')
this.initEcharts() this.initEcharts()
// if(!this.myChart){ // if(!this.myChart){
// this.initEcharts() // this.initEcharts()
@ -525,7 +529,7 @@
// } // }
}, },
stepTargetReceive(newValue, oldValue, ownerVm, vm){ stepTargetReceive(newValue, oldValue, ownerVm, vm) {
}, },
initEcharts() { initEcharts() {

2
pages/markets/trade.vue

@ -15,7 +15,7 @@
<view class="transactionSide"> <view class="transactionSide">
<transaction v-on:onChangeType="onChangeType" :contractConfig="contractConfig" :symbol="symbol" <transaction v-on:onChangeType="onChangeType" :contractConfig="contractConfig" :symbol="symbol"
:marketDetail="marketDetail" :type="type"></transaction> :marketDetail="marketDetail" :type="type" @change="getContractConfig"></transaction>
</view> </view>
<view class="positionSide"> <view class="positionSide">
<positionList v-on:depthChange="depthChange" :sum="sum" :marketDetail="marketDetail" <positionList v-on:depthChange="depthChange" :sum="sum" :marketDetail="marketDetail"

26
pages/me/transfer.vue

@ -41,7 +41,7 @@
:placeholder="i18n.pamount" > :placeholder="i18n.pamount" >
</u-input> </u-input>
<view class="numberDownSelect">{{coinInfo.coinCode||''}} <view class="numberDownSelect">{{coinInfo.coinCode||''}}
<view class="all" @click="coinInfo.tranAmt=coinWayInfo.userCapital">{{i18n.ALL}}</view> <view class="all" @click="coinInfo.tranAmt=coinWayInfo.userCapital?coinWayInfo.userCapital:info.userCapital">{{i18n.ALL}}</view>
</view> </view>
</view> </view>
<view class="Usable">{{ i18n.Usable }} <view class="Usable">{{ i18n.Usable }}
@ -188,21 +188,20 @@
}, },
onShow() {}, onShow() {},
methods: { methods: {
// // tranAmt: null,
reset(){ reset(){
this.type='' // this.type=''
this.coinWayInfo={} // this.coinWayInfo={}
this.transCoinInfo={ // this.transCoinInfo={
coinCode:null, // coinCode:null,
fromWays:null, // fromWays:null,
} // }
this.coinCode=null, // this.coinCode=null,
this.coinCode2=null, // this.coinCode2=null,
this.coinInfo={ this.coinInfo={
coinCode: null, // coinCode: null,
fromWays: null, fromWays: null,
toWays: null, toWays: null,
tranAmt: null,
} }
}, },
getAccount(e,type){ getAccount(e,type){
@ -230,7 +229,8 @@
uni.$u.toast(this.$t("login").Transfersucceeded) uni.$u.toast(this.$t("login").Transfersucceeded)
setTimeout(() => { setTimeout(() => {
this.getInfo(true) this.getInfo(true)
this.reset() // this.reset()
this.coinInfo.tranAmt=null
}, 1200) }, 1200)
}) })
}, },

3
pages/recharge/rechargeRecord.vue

@ -39,7 +39,7 @@
<key-value-row :keyName="i18n.Fees" :value="(item.tranAmt-item.realAmount)+item.coinCode"></key-value-row> <key-value-row :keyName="i18n.Fees" :value="(item.tranAmt-item.realAmount)+item.coinCode"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.timestr"></key-value-row> <key-value-row :keyName="i18n.Time" :value="item.timestr"></key-value-row>
</view> </view>
<view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;"> <view class="digitalShowMore" style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
<show-more> <show-more>
<key-value-row :keyName="i18n.Address" :value="item.toAddress"></key-value-row> <key-value-row :keyName="i18n.Address" :value="item.toAddress"></key-value-row>
<key-value-row :keyName="i18n.Hash" :value="item.txid"></key-value-row> <key-value-row :keyName="i18n.Hash" :value="item.txid"></key-value-row>
@ -178,6 +178,7 @@
/deep/ .digitalShowMore .KeyValueRow .value{ /deep/ .digitalShowMore .KeyValueRow .value{
position: static !important; position: static !important;
word-break: break-all !important; word-break: break-all !important;
line-height: 38rpx !important;
} }
.main { .main {

2
pages/subscription/details.vue

@ -61,7 +61,7 @@
<view class="content">{{i18n.FullNameOfToken+deinfo.sysCoinInfo.fullName}}</view> <view class="content">{{i18n.FullNameOfToken+deinfo.sysCoinInfo.fullName}}</view>
<view class="content">{{i18n.TotalCirculation+deinfo.sysCoinInfo.issueAmount}}</view> <view class="content">{{i18n.TotalCirculation+deinfo.sysCoinInfo.issueAmount}}</view>
<view class="content">{{i18n.ICOPrice+deinfo.sysCoinInfo.initalPrice}} USDT</view> <view class="content">{{i18n.ICOPrice+deinfo.sysCoinInfo.initalPrice}} USDT</view>
<view class="content">{{i18n.ICOTime+deinfo.sysCoinInfo.initialReleasePhase}}</view> <view class="content">{{i18n.ICOTime+":"+deinfo.sysCoinInfo.initialReleasePhase}}</view>
<video class="video" v-show="videoShow" id="video" :enable-progress-gesture="false" autoplay="true" <video class="video" v-show="videoShow" id="video" :enable-progress-gesture="false" autoplay="true"
:src="videoUrl" controls x5-video-player-type="h5-page" @fullscreenchange="ifStopVideo"></video> :src="videoUrl" controls x5-video-player-type="h5-page" @fullscreenchange="ifStopVideo"></video>
</view> </view>

19
utils/index.js

@ -62,6 +62,25 @@ var utils = {
// return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s; // return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
return D + '/' + M + '/' + Y + ' ' + h + ':' + m + ':' + s; return D + '/' + M + '/' + Y + ' ' + h + ':' + m + ':' + s;
}, },
// 日月时分秒
formatmmddhhmmss: function(time) {
var date = new Date(time)
var localTime = date.getTime()
var localOffset = date.getTimezoneOffset() * 60000 //获得当地时间偏移的毫秒数
var utc = localTime + localOffset; //utc即GMT时间
var offset = uni.getStorageSync('coinTypeInfo').system_timezone //时区拿接口的
var beijing = utc + (3600000 * offset);
date = new Date(beijing)
var Y = date.getFullYear()
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
// return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
return D + '/' + M + '/' + ' ' + h + ':' + m + ':' + s;
},
formatyymmddhhmm: function(time) { formatyymmddhhmm: function(time) {
var date = new Date(time) var date = new Date(time)

2
utils/language/en_US.js

@ -218,7 +218,7 @@ export default {
invuteCode: 'Please type your invute code', invuteCode: 'Please type your invute code',
lockBTC: 'Please type you want to lock BTC quantity ', lockBTC: 'Please type you want to lock BTC quantity ',
ALL: 'ALL', ALL: 'ALL',
LockBTCBtn: 'Lock BTC and begin prouce', LockBTCBtn: 'Khoá BTC và sản xuất đầu',
MineRecord: 'Mine Record', MineRecord: 'Mine Record',
NoData: 'No Data', NoData: 'No Data',

Loading…
Cancel
Save