|
@@ -87,7 +87,7 @@
|
|
|
<view class="last">
|
|
|
<view class="flex">
|
|
|
<text>{{$t('enter.u9')}}</text>
|
|
|
- <view class="flex" @click="nav('/pages/game/history')">
|
|
|
+ <view class="flex" @click="nav(`/pages/game/history?id=${history.base.id}`)">
|
|
|
<text>{{$t('enter.u10')}}</text>
|
|
|
<image class="lb" src="../../static/icon/jt.png" mode="scaleToFill"></image>
|
|
|
</view>
|
|
@@ -112,7 +112,7 @@
|
|
|
</view>
|
|
|
<view class="biwe">{{item.num*1}}</view>
|
|
|
<view class="biwe">{{item.get-item.num}}</view>
|
|
|
- <view class="biwe flex">
|
|
|
+ <view class="biwe flex-center">
|
|
|
<view v-if="item.status==1" class="list-buttom success margin-r-10">
|
|
|
{{$t('enter.u17')}}
|
|
|
</view>
|
|
@@ -122,7 +122,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="chz flex" @click="nav('/pages/user/money/recharge')">
|
|
|
<view>
|
|
|
<view class="yue padding-b-10">{{$t('enter.u15')}}</view>
|
|
@@ -145,9 +145,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="hint">
|
|
|
- <navigator url="/pages/transaction/transaction">
|
|
|
- <text>忘记支付密码?</text>
|
|
|
- </navigator>
|
|
|
+ <text @click="nav('/pages/user/set/transaction')">忘记支付密码?</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo"
|
|
@@ -232,6 +230,9 @@
|
|
|
import {
|
|
|
getTime
|
|
|
} from '@/utils/rocessor.js';
|
|
|
+ import {
|
|
|
+ clearInterval
|
|
|
+ } from 'timers';
|
|
|
export default {
|
|
|
components: {
|
|
|
taber,
|
|
@@ -287,7 +288,9 @@
|
|
|
// 弹窗数据像晴
|
|
|
alertDetail: {
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 保存获取下次游戏对象
|
|
|
+ getNextTimeObj: ''
|
|
|
};
|
|
|
},
|
|
|
onLoad() {},
|
|
@@ -309,6 +312,7 @@
|
|
|
return
|
|
|
}
|
|
|
this.getUserWallet();
|
|
|
+ this.gameInit();
|
|
|
},
|
|
|
// 关闭循环
|
|
|
onHide() {
|
|
@@ -331,6 +335,14 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.history.next) {
|
|
|
+ uni.showModal({
|
|
|
+ title: this.$t('enter.c4'),
|
|
|
+ content: "活动未开启,请等待活动开启",
|
|
|
+ showCancel: false,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
this.upOnBtnData.type = type;
|
|
|
this.openPayPassword();
|
|
|
},
|
|
@@ -401,41 +413,40 @@
|
|
|
gameWallet().then((res) => {
|
|
|
this.userWallet = +res.data.back.USDT.money.money
|
|
|
})
|
|
|
- if (this.history.next.id) {
|
|
|
- this.opTiem();
|
|
|
- } else {
|
|
|
- this.gameInit();
|
|
|
- }
|
|
|
},
|
|
|
// 开始倒计时
|
|
|
async opTiem() {
|
|
|
const that = this;
|
|
|
try {
|
|
|
+ console.log('kaishidaojishi');
|
|
|
// 关闭循环
|
|
|
- clearInterval(that.time.t);
|
|
|
+ // if (that.time.t) {
|
|
|
+ // clearInterval(that.time.t);
|
|
|
+ // }
|
|
|
if (that.history.base.id && that.history.next) {
|
|
|
console.log(that.history.base.id, that.history.next,
|
|
|
'that.history.base.id && that.history.next');
|
|
|
- that.time.t = setInterval(() => {
|
|
|
- const da = (new Date()).getTime();
|
|
|
- const timenum = that.history.next.open_time * 1000 - da;
|
|
|
- that.time.H = Math.floor(timenum / 1000 / 60 / 60);
|
|
|
- that.time.S = Math.floor(timenum / 1000 % 60)
|
|
|
- that.time.M = Math.floor(timenum / 1000 / 60 % 60);
|
|
|
- if (that.time.H == 0 && that.time.M == 0 && that.time.S == 0) {
|
|
|
- clearInterval(that.time.t);
|
|
|
- setTimeout(() => {
|
|
|
- setTimeout(() => {
|
|
|
- this.gameDataInit(that.gameList[that.actionIndex].id)
|
|
|
- }, 1000)
|
|
|
- }, 3000)
|
|
|
-
|
|
|
- }
|
|
|
+ that.time.t = setTimeout(() => {
|
|
|
+ // that.getOutTime();
|
|
|
}, 1000)
|
|
|
+ clearTimeout(that.time.t);
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.log(e, '定时');
|
|
|
}
|
|
|
+ },
|
|
|
+ // 获取倒计时时间
|
|
|
+ getOutTime() {
|
|
|
+ const that = this;
|
|
|
+ const da = (new Date()).getTime();
|
|
|
+ const timenum = that.history.next.open_time * 1000 - da;
|
|
|
+ that.time.H = Math.floor(timenum / 1000 / 60 / 60);
|
|
|
+ that.time.S = Math.floor(timenum / 1000 % 60)
|
|
|
+ that.time.M = Math.floor(timenum / 1000 / 60 % 60);
|
|
|
+ if (that.time.H == 0 && that.time.M == 0 && that.time.S == 0) {
|
|
|
+ clearInterval(that.time.t);
|
|
|
+ that.getGame(that.history.base.id)
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
changeTab(item, ind) {
|
|
@@ -480,7 +491,6 @@
|
|
|
id: this.history.base.id,
|
|
|
}).then((res) => {
|
|
|
this.betList.list = res.data.bet_log;
|
|
|
- console.log('aaa', this.betList.list);
|
|
|
})
|
|
|
},
|
|
|
// 获取游戏K线信息
|
|
@@ -515,19 +525,24 @@
|
|
|
})
|
|
|
},
|
|
|
// 获取当前项目信息
|
|
|
- getGame(type) {
|
|
|
+ getGame(id) {
|
|
|
const that = this;
|
|
|
return getGame({
|
|
|
page: that.history.page,
|
|
|
limit: that.history.limit
|
|
|
- }, type).then(({
|
|
|
+ }, id).then(({
|
|
|
data
|
|
|
}) => {
|
|
|
that.history.list = data.list || [];
|
|
|
that.history.base = data.game || {};
|
|
|
that.history.next = data.next_game || '';
|
|
|
that.history.now = data.now_game || '';
|
|
|
- if (that.history.next) {
|
|
|
+ if (!that.history.next && !that.getNextTimeObj) {
|
|
|
+ setTimeout(() => {
|
|
|
+ that.getGame(id)
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ if (that.history.next && !that.getNextTimeObj) {
|
|
|
that.opTiem();
|
|
|
}
|
|
|
})
|