hwq 4 år sedan
förälder
incheckning
a15653c511
6 ändrade filer med 377 tillägg och 241 borttagningar
  1. 1 1
      pages/assets/myPing.vue
  2. 317 203
      pages/index/index.vue
  3. 1 1
      pages/index/node.vue
  4. 43 18
      pages/money/paySuccess.vue
  5. BIN
      static/img/paySuccess.png
  6. 15 18
      utils/wxAuthorized.js

+ 1 - 1
pages/assets/myPing.vue

@@ -111,7 +111,7 @@ export default {
 .bg {
 	width: 750rpx;
 	height: 248rpx;
-	background: #000000;
+	background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
 	border-bottom-left-radius: 150rpx;
 	border-bottom-right-radius: 150rpx;
 }

+ 317 - 203
pages/index/index.vue

@@ -1,31 +1,21 @@
 <template>
 	<view class="center">
-		<view class="box-title">
-			<image src="../../static/img/index7.png" mode=""></image>
-		</view>
+		<view class="box-title"><image src="../../static/img/index7.png" mode=""></image></view>
 		<view class="box-body">
 			<view class="navBox">
 				<view class="navBox-left">
-					<view class="navBox-item" @click="nav('./node')">
-						<image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image>
-					</view>
+					<view class="navBox-item" @click="nav('./node')"><image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image></view>
 				</view>
 				<view class="navBox-right">
-					<view class="navBox-item" @click="nav()">
-						<image src="../../static/img/index3.png" style="width: 385rpx; height: 216rpx; " mode="">
-						</image>
-					</view>
+					<view class="navBox-item" @click="nav('./convert')"><image src="../../static/img/index3.png" style="width: 385rpx; height: 216rpx; " mode=""></image></view>
 					<view class="navBox-item" @click="nav('/pages/index/appointment')">
-						<image src="../../static/img/index6.png"
-							style="width: 339rpx; height: 170rpx; margin-top: -12rpx;" mode=""></image>
+						<image src="../../static/img/index6.png" style="width: 339rpx; height: 170rpx; margin-top: -12rpx;" mode=""></image>
 					</view>
 				</view>
 			</view>
 			<view class="shopBox">
 				<view class="shopBox-top">
-					<view class="left">
-						<image src="../../static/img/index4.png" mode=""></image>
-					</view>
+					<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
 					<view class="between" style="margin-left: -140rpx;">
 						<text id="one">FilsCoin矿机拼购</text>
 						<text id="two">36轮</text>
@@ -37,263 +27,387 @@
 						<text class="number-left">100</text>
 						<text class="number-right">USDT/份</text>
 					</view>
-					<view class="quotient">
-						<text class="quotient-children">每轮限购1组,每组限购一份</text>
-					</view>
+					<view class="quotient"><text class="quotient-children">每轮限购1组,每组限购一份</text></view>
 				</view>
-				<image src="../../static/img/index5.png" style="width: 635rpx; height: 170rpx; margin: 40rpx 0;"
-					mode=""></image>
+				<image src="../../static/img/index5.png" style="width: 635rpx; height: 170rpx; margin: 40rpx 0;" mode=""></image>
 				<view class="shopBox-bottom">
 					<view class="forward">
-						<view class="forward-left">
-							我得预约:&nbsp 0
-						</view>
-						<view class="forward-right">
-							每组分数:&nbsp 11份
-						</view>
+						<view class="forward-left">我得预约:&nbsp 0</view>
+						<view class="forward-right">每组分数:&nbsp 11份</view>
 					</view>
 					<view class="consume">
-						GAS消耗:<text>0.50%LALA</text>
+						GAS消耗:
+						<text>0.50%LALA</text>
 					</view>
 					<view class="appointmentTime">
-						预约时间:<text>2021-07-21 08:00:00-2021-07-21 09:30:00</text>
+						预约时间:
+						<text>2021-07-21 08:00:00-2021-07-21 09:30:00</text>
 					</view>
 					<view class="lotteryTime">
-						开奖时间:<text>2021-07-21 08:00:00</text>
+						开奖时间:
+						<text>2021-07-21 08:00:00</text>
 					</view>
 				</view>
-				<view class="submit" @click="buy()">
-					预购
-				</view>
+				<view class="submit" @click="buy()">预购</view>
 			</view>
 		</view>
-		<u-popup v-model="show" mode="bottom" border-radius="40" height="868rpx" >
-			<view class="">
-				
+
+		<u-popup v-model="show" mode="bottom" border-radius="40" height="868rpx" :closeable="true">
+			<view class="yugo">
+				<view class="zhu">
+					注:每轮限购1组,每组限购1份
+					<span class="zhu-right">
+						最多可预约:
+						<span class="zhu-num">1份</span>
+					</span>
+				</view>
+				<view class="info-main">
+					<view class="info-box">
+						<view class="info-left">预约份数:</view>
+						<view class="info-right"><u-number-box v-model="value" @change="valChange"></u-number-box></view>
+					</view>
+					<view class="info-box">
+						<view class="info-left">预约金额:</view>
+						<view class="info-right">100USDT</view>
+					</view>
+					<view class="info-box">
+						<view class="info-left">预约手续费:</view>
+						<view class="info-right">1.0000LALA</view>
+					</view>
+				</view>
+				<view class="btn" @click="submit()">确定</view>
 			</view>
 		</u-popup>
+		<u-popup v-model="show1" mode="center" width="548rpx"  border-radius="14">
+				<view class="psw-wrapper">
+					<view class="psw-title">请输入支付密码</view>
+					<input type="password" v-model="password" class="psw-ipt"/>
+					<view class="psw-btn">
+						<text @click="cancel">取消</text>
+						<text class="psw-qd" @click="pswQd">确定</text>
+					</view>
+				</view>
+		</u-popup>
 	</view>
 </template>
 <script>
-	export default {
-		data() {
-			return {
-				show: false,//支付数量
-				show1: false,//支付密码
-			}
+export default {
+	data() {
+		return {
+			show: false, //支付数量弹窗控制
+			show1: false, //支付密码弹窗控制
+			value: 1,//购买数量
+			password:'',
+		};
+	},
+	//页面加载即刻发生
+	onload() {
+		this.loadDate();
+	},
+	methods: {
+		nav(url) {
+			uni.navigateTo({
+				url: url
+			});
 		},
-		//页面加载即刻发生
-		onload() {
-			this.loadDate();
+		async loadDate() {},
+		buy() {
+			this.show = true;
+		},
+		valChange(e) {
+			console.log(this.value)
+		},
+		submit() {
+			this.show = false;
+			this.show1 = true;
+		},
+		cancel() {
+			this.show1 = false
 		},
-		methods: {
-			nav(url) {
-				uni.navigateTo({
-					url: url
-				})
-			},
-			async loadDate() {
-
-			},
-			buy() {
-				this.show = true
-			}
-		}
 	}
+};
 </script>
 <style lang="scss">
-	.center {
-		height: auto;
-		min-height: 100%;
-		background-color: #FFFFFF;
-		padding-bottom: var(--window-bottom);
-		.box-title {
-			position: relative;
-			z-index: 1;
+.center {
+	height: auto;
+	min-height: 100%;
+	background-color: #ffffff;
+	padding-bottom: var(--window-bottom);
+	.box-title {
+		position: relative;
+		z-index: 1;
+		width: 100%;
+		height: 436rpx;
+
+		image {
 			width: 100%;
 			height: 436rpx;
-
-			image {
-				width: 100%;
-				height: 436rpx;
-			}
 		}
+	}
 
-		.box-body {
-			display: flex;
-			flex-direction: column;
-			justify-content: space-around;
-			width: 100%;
-			height: 100%;
-			position: relative;
-			z-index: 10;
-			margin-top: -40rpx;
-			border-top-left-radius: 40rpx;
-			border-top-right-radius: 40rpx;
-			background: #F8FBFE;
-
-			.navBox {
-				display: flex;
-
-				justify-content: space-around;
-
-				.navBox-left {
-					// margin: 20rpx 5rpx 10rpx 10rpx;
-					margin: 20rpx -24rpx 0 0;
+	.box-body {
+		display: flex;
+		flex-direction: column;
+		justify-content: space-around;
+		width: 100%;
+		height: 100%;
+		position: relative;
+		z-index: 10;
+		margin-top: -40rpx;
+		border-top-left-radius: 40rpx;
+		border-top-right-radius: 40rpx;
+		background: #f8fbfe;
 
-					mar .navBox-item {
-						image {
-							width: 100%;
-							height: 100%;
-						}
-					}
-				}
+		.navBox {
+			display: flex;
 
-				.navBox-right {
-					margin: 20rpx 0 0 -24rpx;
+			justify-content: space-around;
 
-					// margin: 20rpx 10rpx 5rpx 5rpx;
-					.navBox-item {
-						display: flex;
-						flex-direction: column;
-						align-items: center;
+			.navBox-left {
+				// margin: 20rpx 5rpx 10rpx 10rpx;
+				margin: 20rpx -24rpx 0 0;
 
-						image {}
+				mar .navBox-item {
+					image {
+						width: 100%;
+						height: 100%;
 					}
 				}
-
-
-
 			}
 
-			.shopBox {
-				padding: 0 30rpx;
-				margin-top: 45rpx;
-				width: 690rpx;
-				// height: 770rpx;
-				background: #FFFFFF;
-				box-shadow: 0rpx 0rpx 17rpx 0rpx rgba(0, 0, 0, 0.05);
-				border-radius: 10px;
-				margin: 0 auto;
-
-				.shopBox-top {
-					margin-top: 26rpx;
+			.navBox-right {
+				margin: 20rpx 0 0 -24rpx;
 
+				// margin: 20rpx 10rpx 5rpx 5rpx;
+				.navBox-item {
 					display: flex;
-					justify-content: space-between;
+					flex-direction: column;
 					align-items: center;
 
 					image {
-						height: 46rpx;
-						width: 48rpx;
 					}
+				}
+			}
+		}
 
-					#one {
-						font-size: 34rpx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #0F253A;
-					}
+		.shopBox {
+			padding: 0 30rpx;
+			margin-top: 45rpx;
+			width: 690rpx;
+			// height: 770rpx;
+			background: #ffffff;
+			box-shadow: 0rpx 0rpx 17rpx 0rpx rgba(0, 0, 0, 0.05);
+			border-radius: 10px;
+			margin: 0 auto;
 
-					#two {
-						margin-left: 11rpx;
-						font-size: 26rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #6D7C88;
-					}
+			.shopBox-top {
+				margin-top: 26rpx;
 
-					#three {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
 
-						font-size: 26rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #FF4C4C;
-					}
+				image {
+					height: 46rpx;
+					width: 48rpx;
 				}
 
-				.shopBox-between {
-					margin-top: 20rpx;
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
+				#one {
+					font-size: 34rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #0f253a;
+				}
 
-					.number {
-						.number-left {
+				#two {
+					margin-left: 11rpx;
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #6d7c88;
+				}
 
-							font-size: 40rpx;
-							font-family: PingFang SC;
-							font-weight: bold;
-							color: #44969D;
-						}
+				#three {
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #ff4c4c;
+				}
+			}
 
-						.number-right {
-							font-size: 24rpx;
-							font-family: PingFang SC;
-							font-weight: bold;
-							color: #44969D;
-						}
-					}
+			.shopBox-between {
+				margin-top: 20rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
 
-					.quotient {
-						.quotient-children {
-							font-size: 24rpx;
-							font-family: PingFang SC;
-							font-weight: 500;
-							color: #6D7C88;
-						}
+				.number {
+					.number-left {
+						font-size: 40rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #44969d;
 					}
 
-
-				}
-
-				.forward {
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-
-					.forward-left {
-						font-size: 26rpx;
+					.number-right {
+						font-size: 24rpx;
 						font-family: PingFang SC;
-						font-weight: 500;
-						color: #44969D;
+						font-weight: bold;
+						color: #44969d;
 					}
+				}
 
-					.forward-right {
+				.quotient {
+					.quotient-children {
 						font-size: 24rpx;
 						font-family: PingFang SC;
 						font-weight: 500;
-						color: #6D7C88;
+						color: #6d7c88;
 					}
 				}
-				.consume,.appointmentTime,.lotteryTime{
-					margin: 12rpx 0;
+			}
+
+			.forward {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.forward-left {
 					font-size: 26rpx;
 					font-family: PingFang SC;
-					font-weight: 400;
-					color: #6D7C88;
-					
-				}
-				.consume >text,.appointmentTime >text,.lotteryTime> text{
-					font-size: 10rpx;
-					font-family: PingFang SC;
 					font-weight: 500;
-					color: #000000;
+					color: #44969d;
 				}
-				.submit{
-					width: 600rpx;
-					height: 70rpx;
-					background: linear-gradient(90deg, #60BAB0, #45969B);
-					border-radius: 35rpx;
-					font-size: 32rpx;
+
+				.forward-right {
+					font-size: 24rpx;
 					font-family: PingFang SC;
 					font-weight: 500;
-					color: #FFFFFF;
-					text-align: center;
-					line-height: 70rpx;
-					margin: 40rpx auto;
+					color: #6d7c88;
 				}
 			}
+			.consume,
+			.appointmentTime,
+			.lotteryTime {
+				margin: 12rpx 0;
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #6d7c88;
+			}
+			.consume > text,
+			.appointmentTime > text,
+			.lotteryTime > text {
+				font-size: 10rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+			.submit {
+				width: 600rpx;
+				height: 70rpx;
+				background: linear-gradient(90deg, #60bab0, #45969b);
+				border-radius: 35rpx;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #ffffff;
+				text-align: center;
+				line-height: 70rpx;
+				margin: 40rpx auto;
+			}
+		}
+	}
+}
+.yugo {
+	padding-top: 80rpx;
+	position: relative;
+	height: 100%;
+	.zhu {
+		height: 112rpx;
+		border-top: 1px #eeeeee solid;
+		border-bottom: 1px #eeeeee solid;
+		line-height: 112rpx;
+		padding: 0 32rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #6d7c88;
+		.zhu-right {
+			display: inline-block;
+			padding-left: 60rpx;
+		}
+		.zhu-num {
+			color: #000000;
+		}
+	}
+	.info-main {
+		padding: 0 32rpx;
+		.info-box {
+			padding-top: 22rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			.info-left {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #6d7c88;
+			}
+			.info-right {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #0f253a;
+			}
+		}
+	}
+	.btn {
+		position: absolute;
+		bottom: 50rpx;
+		left: 50%;
+		margin-left: -342rpx;
+		width: 684rpx;
+		height: 86rpx;
+		background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+		border-radius: 10rpx;
+		text-align: center;
+		line-height: 86rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+	}
+}
+.psw-wrapper {
+		width: 548rpx;
+		height: 344rpx;
+		background-color: #FFFFFF;
+		.psw-title {
+			width: 100%;
+			font-size: 35rpx;
+			padding: 43rpx 0 49rpx;
+			text-align: center;
+			font-weight: 800;
+		}
+		.psw-ipt {
+			display: block;
+			background-color: #dce3ed;
+			height: 90rpx;
+			width: 464rpx;
+			padding-left: 30rpx;
+			margin: 0 auto;
+			font-size: 80rpx;
+		}
+		.psw-btn text{
+			display: inline-block;
+			text-align: center;
+			width: 50%;
+			padding-top: 29rpx;
+			font-size: 35rpx;
+		}
+		.psw-qd {
+			color:#45969B;
 		}
 	}
 </style>

+ 1 - 1
pages/index/node.vue

@@ -309,7 +309,7 @@ export default {
 			font-size: 35rpx;
 		}
 		.psw-qd {
-			color:#5771DF;
+			color:#45969B;
 		}
 	}
 </style>

+ 43 - 18
pages/money/paySuccess.vue

@@ -1,9 +1,11 @@
 <template>
 	<view class="content">
-		<text class="success-icon iconfont iconroundcheck"></text>
-		<text class="tit">支付成功</text>
+		<image class="success-icon" src="../../static/img/paySuccess.png" mode=""></image>
+		<text class="tit" v-if="type == 1">订单支付成功</text>
+		<text class="tit" v-else>订单预约成功</text>
 		<view class="btn-group">
-			<navigator :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
+			<navigator url="/pages/index/node" open-type="redirect" class="mix-btn" v-if="type == 1">我的节点</navigator>
+			<navigator url="/pages/assets/myPing" open-type="redirect" class="mix-btn" v-else>我的拼购</navigator>
 			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
 		</view>
 	</view>
@@ -13,12 +15,26 @@
 	export default {
 		data() {
 			return {
-				orderId:''
+				type: 2//1为节点支付成功2为预购成功
 			}
 		},
 		onLoad(opt) {
+			
 			// 保存订单号
-			this.orderId = opt.orderid;
+			if('type' in opt){
+				this.type = opt.type;
+			}
+			if (this.type == 1){
+				uni.setNavigationBarTitle({
+				  title:"支付成功"
+				})
+			}
+			if (this.type == 2) {
+				uni.setNavigationBarTitle({
+					  title:"预约成功"
+				})
+			}
+			
 		},
 		methods: {
 			
@@ -34,32 +50,41 @@
 		align-items: center;
 	}
 	.success-icon{
-		font-size: 160upx;
-		color: #5dbc7c;
-		margin-top: 100upx;
+		margin-top: 100rpx;
+		width: 302rpx;
+		height: 320rpx;
 	}
 	.tit{
-		font-size: 38upx;
-		color: #303133;
+		margin-top: 40rpx;
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
 	}
 	.btn-group{
-		padding-top: 100upx;
+		padding-top: 130rpx;
+		display: flex;
+		justify-content: flex-start;
 	}
 	.mix-btn {
 		margin-top: 30upx;
 		display: flex;
 		align-items: center;
 		justify-content: center;
-		width: 600upx;
-		height: 80upx;
+		width: 301rpx;
+		height: 78rpx;
+		background: #59BAB0;
+		border-radius: 10rpx;
 		font-size: $font-lg;
-		color: #fff;
-		background-color: $base-color;
-		border-radius: 10upx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;
 		&.hollow{
+			margin-left: 36rpx;
 			background: #fff;
-			color: #303133;
-			border: 1px solid #ccc;
+			color: #59BAB0;
+			border: 1px solid #59BAB0;
 		}
 	}
 </style>

BIN
static/img/paySuccess.png


+ 15 - 18
utils/wxAuthorized.js

@@ -223,25 +223,22 @@ function shareFun(config) {
 // 保存路由对象
 export function setRouter(route) {
 	return new Promise((ok, err) => {
-		if(route){
-			let router = getApp().$router;
-			console.log(router,'开始数据');
-			if (!router) {
-				const set = setInterval(() => {
-					router = getApp().$router;
-					console.log(router,'返回数据');
-					if (router) {
-						console.log(router,'结束');
-						clearInterval(set)
-						ok(router)
-					}
-				}, 100);
-			}else{
-				console.log(router,'成功');
-				ok(router)
-			}
+		router = getApp().$router;
+		console.log(router,'开始数据');
+		if (!router) {
+			const set = setInterval(() => {
+				router = getApp().$router;
+				console.log(router,'返回数据');
+				if (router) {
+					console.log(router,'结束');
+					clearInterval(set)
+					ok(router)
+				}
+			}, 100);
+		}else{
+			console.log(router,'成功');
+			ok(router)
 		}
-		
 	})
 }