Bläddra i källkod

Merge branch 'master' of http://git.liuniu946.com/cmy/NFT

hwq 4 år sedan
förälder
incheckning
fabcc153c6
6 ändrade filer med 240 tillägg och 108 borttagningar
  1. 25 0
      api/finance.js
  2. 135 83
      pages/assets/myPing.vue
  3. 71 21
      pages/assets/teamDetails.vue
  4. 9 4
      pages/index/datile.vue
  5. BIN
      static/img/bgTip2.png
  6. BIN
      static/img/pgTip.png

+ 25 - 0
api/finance.js

@@ -106,10 +106,35 @@ export function tbjl(data) {
 		data
 	})
 }
+// 用去币种
 export function moneyType(data) {
 	return request({
 		url: '/api/all/money_type',
 		method: 'get',
 		data
 	});
+}
+// 获取拼购记录
+export function pinkLog(data) {
+	return request({
+		url: '/api/lala/join',
+		method: 'get',
+		data
+	});
+}
+// 获取详细记录
+export function pinkLogDate(data,id) {
+	return request({
+		url: '/api/lala/join/'+id,
+		method: 'get',
+		data
+	});
+}
+// 获取拼购记录
+export function systemWallet(data) {
+	return request({
+		url: '/api/systemWallet',
+		method: 'get',
+		data
+	});
 }

+ 135 - 83
pages/assets/myPing.vue

@@ -6,9 +6,9 @@
 				<view class="info-num">{{happy || '0.00' }}</view>
 				<view class="info-font">福气值</view>
 			</view> -->
-			<view class="info">
-				<view class="info-num">{{luck || '0.00' }}</view>
-				<view class="info-font">幸运值</view>
+			<view class="info" v-for="ls in listType">
+				<view class="info-num">{{ ls.num || '0.00' }}</view>
+				<view class="info-font">昨日{{ ls.name }}分红值</view>
 			</view>
 			<!-- <view class="info">
 				<view class="info-num">{{honor || '0.00' }}</view>
@@ -29,96 +29,150 @@
 			<view class="xian"></view>
 			<view class="join-font">参与记录</view>
 		</view>
-		<scroll-view scroll-y="true" @scrolltolower="loadData">
-			<view v-for="(item,index) in list" :key="index" class="box" @click="nav(item)">
-				<view class="title">
-					<view class="log"><image src="" mode=""></image></view>
-					<view class="name">{{item.name}}</view>
-					<view class="lun">{{item.lun}}</view>
-					<view class="more">详情</view>
-				</view>
-				<view class="main">
-					<view class="main-info">
-						<view class="main-left">参与份数</view>
-						<view class="main-right">{{item.fen}}人份</view>
-					</view>
-					<view class="main-info">
-						<view class="main-left">参与金额</view>
-						<view class="main-right">{{item.money}}USDT</view>
-					</view>
-					<view class="main-info">
-						<view class="main-left">参与时间</view>
-						<view class="main-right">{{item.time}}</view>
+		<view v-for="(item, index) in list" :key="index" class="box" @click="nav(item)">
+			<view class="title flex">
+				<view class="flex clamp">
+					<view class="log"><image src="../../static/img/pgTip.png" mode="scaleToFill"></image></view>
+					<view class="name clamp">{{ item.name }}</view>
+					<view class="lun">
+						<text>{{ item.lun }}</text>
+						<text v-if="item.status == 0">未开始</text>
+						<text v-if="item.status == 1">已拼中</text>
+						<text v-if="item.status == 2">未拼中</text>
+						<text v-if="item.status == 3">已失败</text>
 					</view>
 				</view>
+				<view class="more">详情</view>
 			</view>
-		</scroll-view>
+			<view class="main">
+				<view class="main-info">
+					<view class="main-left">参与份数</view>
+					<view class="main-right">{{ item.fen }}人份</view>
+				</view>
+				<view class="main-info">
+					<view class="main-left">参与金额</view>
+					<view class="main-right">{{ item.money + item.type }}</view>
+				</view>
+				<view class="main-info">
+					<view class="main-left">参与时间</view>
+					<view class="main-right">{{ item.time }}</view>
+				</view>
+			</view>
+		</view>
+		<u-loadmore style="margin-top: 10rpx;" :icon="true" icon-type="flower" :status="loadtype" />
 	</view>
 </template>
 
 <script>
+import { pinkLog, systemWallet } from '@/api/finance.js';
 export default {
 	data() {
 		return {
-			happy: '0.00',
-			luck: '0.00',
-			honor: '0.00',
-			usdt: '0.00',
-			fil: '0.00',
-			list: [
-				{
-					name: 'FilsCoin矿机拼购',
-					lun: '36轮',
-					fen: 1,
-					money: 100,
-					time: '2021-07-23 14:00:20'
-				},
-				{
-					name: 'FilsCoin矿机拼购',
-					lun: '36轮',
-					fen: 1,
-					money: 100,
-					time: '2021-07-23 14:00:20'
-				},
-				{
-					name: 'FilsCoin矿机拼购',
-					lun: '36轮',
-					fen: 1,
-					money: 100,
-					time: '2021-07-23 14:00:20'
-				},
-			],
-			loadtype: '',
+			// happy: '0.00',
+			// luck: '0.00',
+			// honor: '0.00',
+			// usdt: '0.00',
+			// fil: '0.00',
+			list: [],
+			listType: [], //分红数量
+			loadtype: 'loadmore',
 			page: 1,
 			limit: 10,
-		}
+			bonus: 0 //分红
+		};
 	},
-	methods:{
-		nav(e) {
-			uni.navigateTo({
-				url: '/pages/assets/teamDetails'
+	onReachBottom() {
+		this.loadData();
+	},
+	onLoad() {
+		this.loadData();
+		this.systemWallet();
+	},
+	methods: {
+		// 获取昨日分红
+		systemWallet() {
+			systemWallet()
+				.then(e => {
+					for (let a in e.data.back) {
+						const num = +e.data.back[a].money.money;
+						if (num > 0) {
+							this.listType.push({
+								name: e.data.back[a].money.money_type,
+								num: num
+							});
+						}
+					}
+					console.log(this.listType);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		loadData() {
+			let that = this;
+			if (that.loadtype == 'nomore') {
+				return;
+			}
+			that.loadtype = 'loading';
+			pinkLog({
+				page: that.page,
+				limit: that.limit
 			})
+				.then(e => {
+					const data = e.data.list.map(ls => {
+						const lun = ls.group_num > 0 ? ls.group_num + '轮' : '';
+						const time = new Date(ls.pay_time * 1000);
+						return {
+							name: ls.activity.name,
+							lun,
+							fen: 1,
+							money: +ls.cost,
+							type: ls.cost_money_type,
+							time: time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate(),
+							image: ls.activity.background_image,
+							id: ls.id,
+							status: ls.status
+						};
+					});
+					that.list.push(...data);
+					// 判断是否还有数据
+					if (that.list.length >= that.limit) {
+						that.page++;
+						that.loadtype = 'loadmore';
+					} else {
+						that.loadtype = 'nomore';
+					}
+				})
+				.catch(e => {
+					console.log(e);
+				});
 		},
+		nav(e) {
+			uni.navigateTo({
+				url: '/pages/assets/teamDetails?id=' + e.id
+			});
+		}
 	}
-}
+};
 </script>
 
 <style lang="scss">
-.center,page {
+.center,
+page {
 	height: 100%;
-	background: #F7FBFE;
+	background: #f7fbfe;
 }
 .bg {
 	width: 750rpx;
 	height: 248rpx;
-	background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
 	border-bottom-left-radius: 150rpx;
 	border-bottom-right-radius: 150rpx;
 }
 .zong {
 	width: 690rpx;
 	height: 181rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
 	border-radius: 20rpx;
 	margin: -150rpx auto 0;
@@ -132,20 +186,20 @@ export default {
 			font-size: 50rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #0F253A;
+			color: #0f253a;
 		}
 		.info-font {
 			font-size: 28rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #6D7C88;
+			color: #6d7c88;
 		}
 	}
 }
 .money {
 	width: 690rpx;
 	height: 143rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
 	border-radius: 20rpx;
 	margin: 10rpx auto 0;
@@ -158,13 +212,13 @@ export default {
 			font-size: 40rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #0F253A;
+			color: #0f253a;
 		}
 		.money-font {
 			font-size: 24rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #6D7C88;
+			color: #6d7c88;
 		}
 	}
 }
@@ -177,7 +231,7 @@ export default {
 	.xian {
 		width: 6rpx;
 		height: 30rpx;
-		background: #0F253A;
+		background: #0f253a;
 		border-radius: 4rpx;
 	}
 	.join-font {
@@ -185,7 +239,7 @@ export default {
 		font-size: 30rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #0F253A;
+		color: #0f253a;
 	}
 }
 .box:first-child {
@@ -194,20 +248,16 @@ export default {
 .box {
 	margin: 20rpx auto 0;
 	width: 690rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
 	border-radius: 20rpx;
 	padding: 26rpx 36rpx 30rpx 30rpx;
 	position: relative;
 	.title {
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
 		.log {
 			width: 48rpx;
 			height: 46rpx;
-			background: #00BCD4;
-			image{
+			image {
 				width: 100%;
 				height: 100%;
 			}
@@ -217,26 +267,28 @@ export default {
 			font-size: 34rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #0F253A;
+			color: #0f253a;
+			max-width: 100%;
 		}
 		.lun {
 			padding-left: 10rpx;
 			font-size: 26rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
-			color: #6D7C88;
+			color: #6d7c88;
 		}
 		.more {
-			padding-left: 158rpx;
+			padding-left: 10rpx;
 			font-size: 28rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #44969D;
+			color: #44969d;
+			flex-shrink: 0;
 		}
 	}
 	.main {
 		margin-top: 26rpx;
-		.main-info{
+		.main-info {
 			padding-top: 16rpx;
 			display: flex;
 			justify-content: space-between;
@@ -244,13 +296,13 @@ export default {
 				font-size: 26rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
-				color: #6D7C88;
+				color: #6d7c88;
 			}
 			.main-right {
 				font-size: 26rpx;
 				font-family: PingFang SC;
 				font-weight: bold;
-				color: #0F253A;
+				color: #0f253a;
 			}
 		}
 	}

+ 71 - 21
pages/assets/teamDetails.vue

@@ -1,61 +1,114 @@
 <template>
 	<view class="center">
 		<view class="box">
-			<view class="title">
-				<view class="log"><image src="" mode=""></image></view>
-				<view class="name">FilsCoin矿机拼购</view>
-				<view class="lun">36轮</view>
-				<view class="more">已开奖</view>
+			<view class="title flex">
+				<view class="flex">
+					<view class="log"><image src="../../static/img/pgTip.png" mode="scaleToFill"></image></view>
+					<view class="name">{{ item.name }}</view>
+					<view class="lun">{{ item.lun }}</view>
+				</view>
+				<view v-if="item.status == 0" class="more text-gray">未开始</view>
+				<view v-if="item.status >0" class="more text-success" >已开奖</view>
 			</view>
 			<view class="main">
 				<view class="main-info rule">每轮限购1组,每组限购1份</view>
 				<view class="main-info time">
 					开奖时间:
-					<text>2021-07-21 08:00:00</text>
+					<text>{{item.stopTime}}</text>
 				</view>
-				<view class="main-info new">该轮预约1份,拼中1份,退回0份</view>
+				<view class="main-info new">该轮预约{{item.bingos+item.fails}}份,拼中{{item.bingos}}份,退回{{item.fails}}份</view>
 			</view>
 		</view>
 		<view class="box">
 			<view class="allTitle">
-				<view class="title-left">第1组 预约份数/总份数:11/11</view>
-				<view class="title-right">未中奖</view>
+				<view class="title-left">第{{item.table_id}}组 预约份数/总份数:{{item.joins}}/{{item.join_number}}</view>
+				<view class="title-right text-gray" v-if="item.status == 0">未开奖</view>
+				<view class="title-right text-success" v-if="item.status == 1">已中奖</view>
+				<view class="title-right text-danger" v-if="item.status == 2">未中奖</view>
+				<view class="title-right text-warning" v-if="item.status == 3">未成团</view>
 			</view>
 			<view class="yu-main">
-				<view class="img"><image src="" mode=""></image></view>
+				<view class="img"><image src="../../static/img/bgTip2.png" mode="scaleToFill"></image></view>
 				<view class="yu-info">
-					<view class="info">
+					<view class="info" v-if="item.status > 1">
 						<view class="yu-font">回退本金</view>
-						<view class="yu-num">100USDT</view>
+						<view class="yu-num">{{item.cost+item.type}}</view>
 					</view>
 					<view class="info">
 						<view class="yu-font">收益</view>
-						<view class="yu-num">3USDT</view>
+						<view class="yu-num">{{item.join_award+item.type}}</view>
 					</view>
 					<view class="info">
 						<view class="yu-font">唯一凭证</view>
-						<view class="yu-num">LALA122002552000</view>
+					</view>
+					<view class="info">
+						<view class="yu-num">{{item.order_id}}</view>
 					</view>
 				</view>
 			</view>
 			<view class="boom">
 				<view class="boom-font">当前组爆快</view>
-				<view class="boom-num">
+				<!-- <view class="boom-num">
 					LALA122002552000
 					<br />
 					LALA122002552000
-				</view>
+				</view> -->
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+import { pinkLogDate } from '@/api/finance.js';
 export default {
 	data() {
 		return {
-			data: ''
+			id: '',
+			item: {}
 		};
+	},
+	onLoad(e) {
+		this.id = e.id;
+		this.getDate();
+	},
+	methods: {
+		getDate() {
+			pinkLogDate({}, this.id)
+				.then(e => {
+					const ls = e.data;
+					const lun = ls.group_num > 0 ? ls.group_num + '轮' : '';
+					const time = new Date(ls.pay_time * 1000);
+					let sy = ls.join_award*ls.cost/100+'';
+					const num = sy.split('.')[1]
+					// 判断小数点是否超过8位数标
+					if(num&&num.length>8){
+						sy = (+sy).toFixed(8);
+					}
+					this.item = {
+						name: ls.activity.name,
+						lun,
+						fen: 1,
+						money: +ls.cost,
+						type: ls.cost_money_type,
+						time: time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate(),
+						stopTime:'',
+						image: ls.activity.background_image,
+						id: ls.id,
+						status: ls.status,
+						bingos:ls.bingos,
+						fails:ls.fails,
+						table_id:ls.table_id,
+						joins:ls.joins.length,
+						join_number:ls.activity.join_number,
+						cost:+ls.cost,
+						join_award:+sy,
+						order_id:ls.order_id
+					};
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		}
 	}
 };
 </script>
@@ -74,13 +127,9 @@ page {
 	border-radius: 20rpx;
 	padding: 26rpx 36rpx 30rpx 30rpx;
 	.title {
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
 		.log {
 			width: 48rpx;
 			height: 46rpx;
-			background: #00bcd4;
 			image {
 				width: 100%;
 				height: 100%;
@@ -175,6 +224,7 @@ page {
 			display: flex;
 			justify-content: space-between;
 			.yu-font {
+				flex-shrink: 0;
 				font-size: 26rpx;
 				font-family: PingFang SC;
 				font-weight: 500;

+ 9 - 4
pages/index/datile.vue

@@ -5,7 +5,7 @@
 				<view class="shopBox-top">
 					<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
 					<view class="between" style="margin-left: -340rpx;">
-						<text id="one">{{ list.data.name }}</text>
+						<text id="one">{{ list.data?list.data.name:'' }}</text>
 						<text id="two">{{ list.lun }}轮</text>
 					</view>
 					<text id="three">预约中</text>
@@ -44,7 +44,7 @@
 				<view class="shopBox-top">
 					<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
 					<view class="between" style="margin-left: -340rpx;">
-						<text id="one">{{ list.data.name }}</text>
+						<text id="one">{{ list.data?list.data.name:'' }}</text>
 						<text id="two">{{ list.lun+1 }}轮</text>
 					</view>
 					<text id="three" style="color: #44969D;">待上架</text>
@@ -84,7 +84,7 @@
 					<view class="shopBox-top">
 						<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
 						<view class="between" style="margin-left: -340rpx;">
-							<text id="one">{{ list.data.name }}</text>
+							<text id="one">{{ list.data?list.data.name:'' }}</text>
 							<text id="two">{{ item.group_num*1 }}轮</text>
 						</view>
 						<text id="three" style="color: #6D7C88;">已开奖</text>
@@ -170,7 +170,12 @@ export default {
 			limit: 10,
 			page: 1,
 			id: '',
-			list: '',
+			list: {
+				data:{
+					name:'',
+					cost:''
+				}
+			},
 			history:false,
 			show: false, //支付数量
 			show1: false, //支付密码

BIN
static/img/bgTip2.png


BIN
static/img/pgTip.png