|
@@ -116,13 +116,14 @@
|
|
|
<view v-if="item.status==0" class="list-buttom primary margin-r-10">
|
|
|
{{$t('enter.a4')}}
|
|
|
</view>
|
|
|
- <view class="list-buttom red" v-if="item.result==1">
|
|
|
+ <view class="list-buttom red" v-if="item.result==1">
|
|
|
{{$t('enter.a5')}}
|
|
|
</view>
|
|
|
<view class="list-buttom success" v-if="item.result===0">
|
|
|
{{$t('enter.a6')}}
|
|
|
</view>
|
|
|
- <view @click="alertDetailOpen(item)" class="list-buttom primary margin-l-10" v-if="item.result===0||item.result==1">
|
|
|
+ <view @click="alertDetailOpen(item)" class="list-buttom primary margin-l-10"
|
|
|
+ v-if="item.result===0||item.result==1">
|
|
|
{{$t('enter.u18')}}
|
|
|
</view>
|
|
|
</view>
|
|
@@ -143,21 +144,21 @@
|
|
|
<inputPassword @commit='KeyInfo'></inputPassword>
|
|
|
</uni-popup>
|
|
|
<uni-popup type="center" ref="popupDetail">
|
|
|
- <view class="alert-detail">
|
|
|
- <view class="padding-c-30 padding-t-30 padding-b-30" v-if="alertDetail.result_info">
|
|
|
- <!-- <view class="padding-c-30 padding-t-30 padding-b-30"> -->
|
|
|
+ <view class="alert-detail" v-if="alertDetail.room">
|
|
|
+ <view class="padding-c-30 padding-t-30 padding-b-30" v-if="alertDetail.room.result_info">
|
|
|
+ <!-- <view class="padding-c-30 padding-t-30 padding-b-30"> -->
|
|
|
<view class="flex">
|
|
|
<view class="type">
|
|
|
- {{$t('set.a7')}}{{alertDetail.no}}{{$t('set.a8')}}
|
|
|
+ {{$t('set.a7')}}{{alertDetail.room.no}}{{$t('set.a8')}}
|
|
|
</view>
|
|
|
- <view class="num" >
|
|
|
- <view class="lis" v-if="List.result === 1">
|
|
|
+ <view class="num">
|
|
|
+ <view class="lis" v-if="alertDetail.result === 1">
|
|
|
<view class="liss green">{{$t('enter.a5')}}</view>
|
|
|
</view>
|
|
|
- <view class="lis" v-if="List.result === 0">
|
|
|
+ <view class="lis" v-if="alertDetail.result === 0">
|
|
|
<view class="liss red">{{$t('enter.a6')}}</view>
|
|
|
</view>
|
|
|
- <view class="lis" v-if="List.status === 0">
|
|
|
+ <view class="lis" v-if="alertDetail.status === 0">
|
|
|
<view class="liss primary">{{$t('enter.a4')}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -175,7 +176,7 @@
|
|
|
{{$t('gameList.a2')}}
|
|
|
</view>
|
|
|
<view class="num">
|
|
|
- {{alertDetail.game.timebar}}
|
|
|
+ {{alertDetail.room.game.timebar}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex">
|
|
@@ -184,47 +185,61 @@
|
|
|
</view>
|
|
|
<view class="num">
|
|
|
<!-- {{alertDetail.result_info.c}} -->
|
|
|
- {{List.num}}U
|
|
|
+ {{alertDetail.num}}U
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex">
|
|
|
<view class="type">
|
|
|
{{$t('gameList.a7')}}
|
|
|
</view>
|
|
|
- <view class="num">
|
|
|
+ <view class="num flex-start">
|
|
|
<!-- {{alertDetail.result_info.l}} -->
|
|
|
- <view class="lisT green" v-if="List.bet==1">{{ $t("enter.u6") }}</view>
|
|
|
- <view class="lisT red" v-if="List.bet==2">{{ $t("enter.u4") }}</view>
|
|
|
- <view class="lisT green" v-if="List.bet==3">{{ $t("enter.u5") }}</view>
|
|
|
- <view class="lisT red" v-if="List.bet==4">{{ $t("enter.u7") }}</view>
|
|
|
+ <view class="green" v-if="alertDetail.bet==1">{{ $t("enter.u6") }}</view>
|
|
|
+ <view class="red" v-if="alertDetail.bet==2">{{ $t("enter.u4") }}</view>
|
|
|
+ <view class="green" v-if="alertDetail.bet==3">{{ $t("enter.u5") }}</view>
|
|
|
+ <view class="red" v-if="alertDetail.bet==4">{{ $t("enter.u7") }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex">
|
|
|
<view class="type">
|
|
|
- {{$t('gameList.a8')}}
|
|
|
+ {{$t('gameList.a10')}}
|
|
|
</view>
|
|
|
<view class="num">
|
|
|
+ {{alertDetail.room.result_info.o}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="flex">
|
|
|
+ <view class="type">
|
|
|
+ {{$t('gameList.a5')}}
|
|
|
+ </view>
|
|
|
+ <view class="num" v-if="alertDetail.room.open_time">
|
|
|
<!-- {{alertDetail.result_info.h}} -->
|
|
|
- {{List.get}}
|
|
|
+ {{alertDetail.room.open_time}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex">
|
|
|
<view class="type">
|
|
|
{{$t('gameList.a9')}}
|
|
|
</view>
|
|
|
- <view class="num">
|
|
|
- {{alertDetail.result_info.o}}
|
|
|
+ <view class="num flex-start">
|
|
|
+ <template v-for="it in alertDetail.room.arr " v-if="it.value==1">
|
|
|
+ <view class="green" v-if="it.type==1">{{ $t("enter.u6") }}</view>
|
|
|
+ <view class="green" v-if="it.type==3">{{ $t("enter.u5") }}</view>
|
|
|
+ <view class="red" v-if="it.type==2">{{ $t("enter.u4") }}</view>
|
|
|
+ <view class="red" v-if="it.type==4">{{ $t("enter.u7") }}</view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex">
|
|
|
<view class="type">
|
|
|
- {{$t('gameList.a5')}}
|
|
|
+ {{$t('gameList.a8')}}
|
|
|
</view>
|
|
|
<view class="num">
|
|
|
<!-- {{alertDetail.result_info.h}} -->
|
|
|
- {{alertDetail.open_time}}
|
|
|
+ {{alertDetail.get}}
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
<button class="button" type="default" @click="$refs.popupDetail.close()"><text
|
|
|
class="button-text">{{$t("safe.d7")}}</text></button>
|
|
@@ -302,7 +317,7 @@
|
|
|
KlineList: {
|
|
|
c: ''
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
upOnBtnData: {
|
|
|
// 是否显示底部导航栏
|
|
|
show: false,
|
|
@@ -311,14 +326,12 @@
|
|
|
passwordArr: '',
|
|
|
value: '',
|
|
|
},
|
|
|
- // ???
|
|
|
- List: [],
|
|
|
// 弹窗数据像晴
|
|
|
- alertDetail:{},
|
|
|
+ alertDetail: {},
|
|
|
// 保存获取下次游戏对象
|
|
|
getNextTimeObj: '',
|
|
|
// 判断是否当前页面中
|
|
|
- loadPage:false,
|
|
|
+ loadPage: false,
|
|
|
};
|
|
|
},
|
|
|
onShow() {
|
|
@@ -354,10 +367,26 @@
|
|
|
getTime,
|
|
|
// 弹窗详情
|
|
|
alertDetailOpen(item) {
|
|
|
- this.alertDetail = item.room;
|
|
|
+ this.alertDetail = item;
|
|
|
+ console.log(this.alertDetail);
|
|
|
+ const res = this.alertDetail.room;
|
|
|
+ if (res.result_info) {
|
|
|
+ res.result_info.c = Number(res.result_info.c).toFixed(res.game.decimal)
|
|
|
+ }
|
|
|
+ if (res.result) {
|
|
|
+ let arr = [];
|
|
|
+ const ar = res.result.split(",")
|
|
|
+ for (let i = 0; i < ar.length; i++) {
|
|
|
+ const s = ar[i].split(':');
|
|
|
+ arr.push({
|
|
|
+ type: s[0],
|
|
|
+ value: s[1]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ res.arr = arr;
|
|
|
+ }
|
|
|
+ res.open_time = getTime(res.open_time);
|
|
|
this.$refs.popupDetail.open();
|
|
|
- this.List = item;
|
|
|
- console.log(item);
|
|
|
},
|
|
|
// 倒计时清理
|
|
|
initData() {
|
|
@@ -409,12 +438,12 @@
|
|
|
const that = this;
|
|
|
that.upOnBtnData.passwordArr = val;
|
|
|
that.colsePayPassword();
|
|
|
- const typeList = [that.$t('enter.u6'),that.$t('enter.u4'),that.$t('enter.u5'),that.$t('enter.u7')];
|
|
|
+ const typeList = [that.$t('enter.u6'), that.$t('enter.u4'), that.$t('enter.u5'), that.$t('enter.u7')];
|
|
|
uni.showModal({
|
|
|
title: that.$t('enter.c4'),
|
|
|
content: `${that.$t('enter.a8')}${that.upOnBtnData.value}USDT${that.$t('enter.a10')}${typeList[that.upOnBtnData.type-1]}`,
|
|
|
success: res => {
|
|
|
- if(res.confirm){
|
|
|
+ if (res.confirm) {
|
|
|
that.gameBetIn();
|
|
|
}
|
|
|
},
|
|
@@ -537,18 +566,19 @@
|
|
|
page: 1,
|
|
|
limit: 10,
|
|
|
id: that.history.base.id,
|
|
|
- }).then(({data}) => {
|
|
|
- that.betList.list = data.bet_log.map((res)=>{
|
|
|
- res.num=Number(res.num);
|
|
|
- res.get=Number(res.get);
|
|
|
- res.sexy = res.get-res.num;
|
|
|
- console.log(res);
|
|
|
- if(res.room.result_info){
|
|
|
+ }).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ that.betList.list = data.bet_log.map((res) => {
|
|
|
+ res.num = Number(res.num);
|
|
|
+ res.get = Number(res.get);
|
|
|
+ res.sexy = +(res.get - res.num).toFixed(2);
|
|
|
+ if (res.room.result_info) {
|
|
|
const obj = res.room.result_info
|
|
|
- obj.c =Number(obj.c).toFixed(lineNum)
|
|
|
- obj.o =Number(obj.o).toFixed(lineNum)
|
|
|
- obj.h =Number(obj.h).toFixed(lineNum)
|
|
|
- obj.l =Number(obj.l).toFixed(lineNum)
|
|
|
+ obj.c = Number(obj.c).toFixed(lineNum)
|
|
|
+ obj.o = Number(obj.o).toFixed(lineNum)
|
|
|
+ obj.h = Number(obj.h).toFixed(lineNum)
|
|
|
+ obj.l = Number(obj.l).toFixed(lineNum)
|
|
|
}
|
|
|
return res
|
|
|
});
|
|
@@ -572,7 +602,8 @@
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
const ll = list[i];
|
|
|
const time = new Date(+ll.ts);
|
|
|
- const addar = [+(+ll.o).toFixed(lineNum), +(+ll.c).toFixed(lineNum), +(+ll.l).toFixed(lineNum), +(+ll.h)
|
|
|
+ const addar = [+(+ll.o).toFixed(lineNum), +(+ll.c).toFixed(lineNum), +(+ll.l).toFixed(
|
|
|
+ lineNum), +(+ll.h)
|
|
|
.toFixed(lineNum)
|
|
|
];
|
|
|
xarr.push(`${time.getHours()}:${time.getMinutes()}`)
|
|
@@ -602,7 +633,7 @@
|
|
|
that.history.now = data.now_game || '';
|
|
|
// 是否不存在启动中的活动并判断防止重复调用创建倒计时
|
|
|
// 判断是否不存在游戏,并且没有倒计时对象,且在当前页面
|
|
|
- if (that.loadPage&&!that.history.next && !that.getNextTimeObj) {
|
|
|
+ if (that.loadPage && !that.history.next && !that.getNextTimeObj) {
|
|
|
that.getNextTimeObj = setInterval(() => {
|
|
|
that.getGame(id)
|
|
|
}, 1000)
|
|
@@ -1112,9 +1143,11 @@
|
|
|
&.success {
|
|
|
background: $color-green;
|
|
|
}
|
|
|
- &.red{
|
|
|
+
|
|
|
+ &.red {
|
|
|
background: $color-yellow;
|
|
|
}
|
|
|
+
|
|
|
&.primary {
|
|
|
background: #01ebf6;
|
|
|
color: #000000;
|
|
@@ -1153,36 +1186,49 @@
|
|
|
.alert-detail {
|
|
|
background-color: #FFF;
|
|
|
border-radius: 10rpx;
|
|
|
- width: 500rpx;
|
|
|
+ width: 600rpx;
|
|
|
+
|
|
|
+ .red {
|
|
|
+ color: #df5660;
|
|
|
+ }
|
|
|
+
|
|
|
+ .green {
|
|
|
+ color: $color-green;
|
|
|
+ }
|
|
|
|
|
|
.flex {
|
|
|
padding: 10rpx 0;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.lisT {
|
|
|
font-size: $font-lg;
|
|
|
font-weight: bold;
|
|
|
- &.red{
|
|
|
+
|
|
|
+ &.red {
|
|
|
color: #df5660;
|
|
|
}
|
|
|
- &.green{
|
|
|
+
|
|
|
+ &.green {
|
|
|
color: $color-green;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.lis {
|
|
|
.liss {
|
|
|
border-radius: 5rpx;
|
|
|
padding: 10rpx 20rpx;
|
|
|
font-size: 22rpx;
|
|
|
font-weight: 500;
|
|
|
- &.red{
|
|
|
+ color: #FFF;
|
|
|
+ &.red {
|
|
|
background: $color-yellow;
|
|
|
}
|
|
|
- &.green{
|
|
|
+
|
|
|
+ &.green {
|
|
|
background: $color-green;
|
|
|
}
|
|
|
+
|
|
|
&.primary {
|
|
|
background: #01ebf6;
|
|
|
}
|