Browse Source

修改时间问题

master
liaoxinyu 1 month ago
parent
commit
e9e5bf8679
  1. 8
      pages/exchange/time-sharing.vue
  2. 14
      pages/financialManagement/index.vue
  3. 5
      static/chart_main/sevencoin.js

8
pages/exchange/time-sharing.vue

@ -110,12 +110,16 @@ export default {
// 11 2:00 AM EST // 11 2:00 AM EST
const dstEnd = this.getNthSunday(year, 10, 1, 2); // 0 10=11 const dstEnd = this.getNthSunday(year, 10, 1, 2); // 0 10=11
return now >= dstStart && now < dstEnd; return now >= dstStart && now < dstEnd;
}, },
// nm0 // nm0
getNthSunday(year, month, occurrence, hour) { getNthSunday(year, month, occurrence, hour) {
if (month === 10 && occurrence === 1) {
const date = new Date(year, 10, 3); // 113
date.setHours(hour, 0, 0, 0);
return date;
}
let date = new Date(year, month, 1); let date = new Date(year, month, 1);
let count = 0; let count = 0;
@ -134,7 +138,7 @@ export default {
let timeData = this.isDSTByRules() let timeData = this.isDSTByRules()
highstock.setOptions({ highstock.setOptions({
global: { global: {
timezoneOffset: timeData ? 16 * 60 : 17 * 60, timezoneOffset: timeData ? 16 * 60 : 16 * 60,
}, },
}); });

14
pages/financialManagement/index.vue

@ -39,14 +39,14 @@
<view style="margin: 40rpx 0px;" class="d-flex"> <view style="margin: 40rpx 0px;" class="d-flex">
<view class="d-flex" style="width: 180rpx;padding-top: 38rpx;margin-right: 20rpx;"> <view class="d-flex" style="width: 180rpx;padding-top: 38rpx;margin-right: 20rpx;">
<view><image src="@/assets/img/vipIco.png" mode="widthFix" style="width: 50rpx;"></image></view> <view><image src="@/assets/img/vipIco.png" mode="widthFix" style="width: 50rpx;"></image></view>
<view style="margin-top: 5rpx;font-weight: bold;color: #fbd96f;margin-left: 10rpx;">VIP {{financial.vip.level}}</view> <view style="margin-top: 5rpx;font-weight: bold;color: #fbd96f;margin-left: 10rpx;">VIP {{vip.level}}</view>
</view> </view>
<view style="width: 100%;"> <view style="width: 100%;">
<view class="m-b-ms">{{financial.vip.level==5?$t('common.grade'):$t('common.distance')}} VIP{{financial.nextVip.level}}</view> <view class="m-b-ms">{{vip.level==5?$t('common.grade'):$t('common.distance')}} VIP{{nextVip.level}}</view>
<el-progress :show-text="false" :percentage="financial.schedule"></el-progress> <el-progress :show-text="false" :percentage="financial.schedule"></el-progress>
<view class="d-flex justify-between m-t-ms"> <view class="d-flex justify-between m-t-ms">
<view>{{financial.performance}}</view> <view>{{financial.performance}}</view>
<view>{{financial.nextVip.performance}}</view> <view>{{nextVip.performance}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -106,7 +106,9 @@
activeCoin:{}, activeCoin:{},
userAdressList:[], userAdressList:[],
coin_name1:"USDT", coin_name1:"USDT",
financial:{} financial:{},
vip:{},
nextVip:{}
}; };
}, },
watch:{ watch:{
@ -139,8 +141,10 @@
// console.log(res); // console.log(res);
}); });
Wallet.financial_vip({}).then(res => { Wallet.financial_vip({}).then(res => {
console.log(res); // console.log(res);
this.financial = res.data this.financial = res.data
this.vip = res.data.vip
this.nextVip = res.data.nextVip
}); });
}, },
init(){ init(){

5
static/chart_main/sevencoin.js

@ -296,9 +296,8 @@ $(function () {
const year = date.getUTCFullYear(); const year = date.getUTCFullYear();
const start = new Date(Date.UTC(year, 2, 8, 18)); // March, 2nd Sunday const start = new Date(Date.UTC(year, 2, 8, 18)); // March, 2nd Sunday
const end = new Date(Date.UTC(year, 10, 3, 18)); // November, 1st Sunday const end = new Date(Date.UTC(year, 10, 3, 18)); // November, 1st Sunday
start.setUTCDate(14 - start.getUTCDay()); start.setUTCDate(13 - start.getUTCDay());
end.setUTCDate(7 - end.getUTCDay()); end.setUTCDate(3 - end.getUTCDay());
return date >= start && date < end; return date >= start && date < end;
} }
getResolutionTime() { getResolutionTime() {

Loading…
Cancel
Save