cmy 1 tahun lalu
induk
melakukan
1c523bcb20
4 mengubah file dengan 65 tambahan dan 32 penghapusan
  1. 30 13
      pages/game/history.vue
  2. 16 5
      pages/index/entertainment.vue
  3. 15 10
      pages/index/user.vue
  4. 4 4
      pages/myPledge/myPledge.vue

+ 30 - 13
pages/game/history.vue

@@ -2,15 +2,17 @@
 	<view class="all padding-v-30 padding-c-30">
 		<view class="list padding-v-10 flex" v-for="(item,ind) in list" :key="ind">
 			<view class="le">
-				<view class="qs padding-b-10">{{$t('set.a7')}}{{item.room.no}}{{$t('set.a8')}}</view>
-				<view class="dy padding-b-10" v-if="item.room.result_info">{{item.room.result_info.c*1}}</view>
+				<view class="qs padding-b-10">{{$t('set.a7')}}{{item.no}}{{$t('set.a8')}}</view>
+				<view class="dy padding-b-10" v-if="item.result_info">{{item.result_info.c*1}}</view>
 				<view class="dy padding-b-10" v-else>{{ $t("enter.a2") }}</view>
 			</view>
-			<view class="ri">
-				<view class="sx green" v-if="item.bet==1">{{ $t("enter.u6") }}</view>
-				<view class="sx green" v-if="item.bet==3">{{ $t("enter.u5") }}</view>
-				<view class="sx " v-if="item.bet==2">{{ $t("enter.u4") }}</view>
-				<view class="sx" v-if="item.bet==4">{{ $t("enter.u7") }}</view>
+			<view class="ri flex" v-if="item.result">
+				<template v-for="it in item.arr " v-if="it.value==1">
+					<view class="sx green" v-if="it.type==1">{{ $t("enter.u6") }}</view>
+					<view class="sx green" v-if="it.type==3">{{ $t("enter.u5") }}</view>
+					<view class="sx " v-if="it.type==2">{{ $t("enter.u4") }}</view>
+					<view class="sx" v-if="it.type==4">{{ $t("enter.u7") }}</view>
+				</template>
 			</view>
 		</view>
 	</view>
@@ -18,7 +20,7 @@
 
 <script>
 	import {
-		gameBetList
+		getGame
 	} from "@/api/game.js";
 	import empty from '@/components/empty';
 	export default {
@@ -51,15 +53,29 @@
 				if (that.loadingType == 'loading' || that.loadingType == 'noMore') {
 					return
 				}
-				gameBetList({
+				getGame({
 					page: that.page,
 					limit: that.limit,
-					id: that.id,
-				}).then(res => {
-					let list = res.data.bet_log
+				},that.id).then(res => {
+					let list = res.data.list.map((res)=>{
+						if(res.result){
+							let arr = [];
+							const ar  =res.result.split(",")
+							console.log(ar,'ar');
+							for (let i = 0; i < ar.length; i++) {
+								const s = ar[i].split(':');
+								arr.push({
+									type:s[0],
+									value:s[1]
+								})
+							}
+							res.arr = arr;
+						}
+						return res
+					})
 					that.list = that.list.concat(list)
 					that.page++
-					console.log('11111111', list);
+					console.log('11111111', that.list);
 					if (list.length == that.limit) {
 						that.loadingType = 'more'
 					} else {
@@ -92,6 +108,7 @@
 		}
 		.ri {
 			.sx {
+				padding-left: 10rpx;
 				font-size: 30rpx;
 				font-weight: bold;
 				color: #df5660;

+ 16 - 5
pages/index/entertainment.vue

@@ -356,9 +356,19 @@
 			},
 			// 密码输入完成后调用下注
 			KeyInfo(val) {
-				this.upOnBtnData.passwordArr = val;
-				this.colsePayPassword();
-				this.gameBetIn();
+				const that = this;
+				that.upOnBtnData.passwordArr = val;
+				that.colsePayPassword();
+				const typeList = ["上",'下','奇','偶'];
+				uni.showModal({
+					title: '提示',
+					content: `是否压住${that.upOnBtnData.value}USDT到${typeList[that.upOnBtnData.type-1]}`,
+					success: res => {
+						if(res.confirm){
+							that.gameBetIn();
+						}
+					},
+				});
 			},
 			// 参与压住
 			gameBetIn(type) {
@@ -478,6 +488,7 @@
 			// 获取游戏K线信息
 			getGameKline(reload = true) {
 				const that = this;
+				const lineNum = this.history.base.decimal;
 				gameKline({
 					page: 1,
 					limit: 60
@@ -491,8 +502,8 @@
 					for (let i = 0; i < list.length; i++) {
 						const ll = list[i];
 						const time = new Date(+ll.ts);
-						const addar = [+(+ll.o).toFixed(5), +(+ll.c).toFixed(5), +(+ll.l).toFixed(5), +(+ll.h)
-							.toFixed(5)
+						const addar = [+(+ll.o).toFixed(lineNum), +(+ll.c).toFixed(lineNum), +(+ll.l).toFixed(lineNum), +(+ll.h)
+							.toFixed(lineNum)
 						];
 						xarr.push(`${time.getHours()}:${time.getMinutes()}`)
 						linearr.push(addar)

+ 15 - 10
pages/index/user.vue

@@ -9,8 +9,11 @@
 					</image>
 					<view class="info">
 						<view class="infor margin-b-20">{{ userInfo.nickname || '游客' }}</view>
-						<view class="uservip">
-							{{userInfo.vip ? userInfo.vip_name: '粉丝'}}
+						<view class="uservip flex-start" v-if="userInfo.vip">
+							<text>
+							{{ userInfo.vip_name}}
+							</text>
+							<image class="vipIcon" :src="userInfo.vip_icon" mode="scaleToFill"></image>
 						</view>
 					</view>
 				</view>
@@ -155,6 +158,8 @@
 				sum_win: '', //累计收益
 				sum_bet: '', //个人交易量
 				group_sum_bet: '', // 团队交易量
+				userInfo:{}
+				
 			};
 		},
 		onShow() {
@@ -166,7 +171,7 @@
 			this.loadBaseData();
 		},
 		computed: {
-			...mapState('user', ['userInfo', 'hasLogin'])
+			...mapState('user', [ 'hasLogin'])
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
@@ -175,7 +180,8 @@
 			},
 			// 统计表
 			async getUser() {
-				const res = await getUser()
+				const res = await getUser();
+				this.userInfo = res.data;
 				this.recharge = res.data.recharge;
 				this.extractTotalPrice = res.data.extractTotalPrice;
 				this.sum_win = res.data.sum_win;
@@ -257,13 +263,12 @@
 					font-weight: 500;
 					color: #FFFFFF;
 				}
-
+				.vipIcon{
+					width: 40rpx;
+					height: 40rpx;
+					margin-left: 10rpx;
+				}
 				.uservip {
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					background: url('../../static/img/vip-bg.png') 100%/contain no-repeat;
-					padding: 6rpx 72rpx;
 					font-size: 20rpx;
 					font-weight: 500;
 					color: #93794B;

+ 4 - 4
pages/myPledge/myPledge.vue

@@ -24,9 +24,9 @@
 			<view class="title">
 				<text>{{ $t("myple.u7") }}</text>
 			</view>
-			<view class="title">
+			<!-- <view class="title">
 				<text>{{ $t("myple.u8") }}</text>
-			</view>
+			</view> -->
 		</view>
 		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
 			@change="changeTab">
@@ -62,12 +62,12 @@
 											{{item.add_time[1]}}
 										</view>
 									</view>
-									<view class="list-item">
+									<!-- <view class="list-item">
 										<view class="l-item">{{item.send_time[0]}}</view>
 										<view class="l-item">
 											{{item.send_time[1]}}
 										</view>
-									</view>
+									</view> -->
 								</view>
 							</view>
 							<!-- <view class="money">