hwq 3 vuotta sitten
vanhempi
commit
e158826696

+ 26 - 6
pages/conversion/candy.vue

@@ -3,16 +3,21 @@
 		<view class="content-money">
 			<view class="buttom">
 				<text class="text">可兑换积分</text>
-				<view class="icon"><text>¥</text>{{ money }}</view>
+				<view class="icon">{{ money }}</view>
 			</view>
 			<view class="interval"></view>
 			<view class="buttom">
-				<text class="text">申请兑换糖果</text>
-				<view class=" icon"><input class="input" type="number" v-model="withdrawal" placeholder="申请兑换糖果数量" placeholder-class="placeholder" /></view>
+				<text class="text">申请兑换积分数量</text>
+				<view class=" icon"><input class="input" type="number" v-model="withdrawal" placeholder="申请兑换积分数量" placeholder-class="placeholder" /></view>
+			</view>
+			<view class="interval"></view>
+			<view class="buttom">
+				<text class="text">可兑换成</text>
+				<view class="input">{{ moneyReta }}糖果</view>
 			</view>
 			<view class="interval"></view>
 			<view class="tip">
-				<view class=" tip-icon" @click="all()">全部转换</view>
+				<view class=" tip-icon" @click="allbuy()">全部转换</view>
 			</view>
 		</view>
 		<view class="code">
@@ -30,10 +35,20 @@ export default {
 	data(){
 		return{
 			money: 0,
-			withdrawal:'',
+			withdrawal: "",
 			buying: false,
+			all:'',
+			add:'',
 		}
 	},
+	computed: {
+		// 转换金额
+		moneyReta() {
+			// 保存当前选中的对象
+			const obj = this.all;
+			return (this.withdrawal * +obj.usdt_price) / +this.add.usdt_price;
+		},
+	},
 	onLoad() {
 		wallet({}).then(({ data }) => {
 			const obj = this
@@ -41,12 +56,17 @@ export default {
 			arr.forEach(e => {
 				if(e == 'USDC'){
 					obj.money = (data.back[e].money.money*1)
+					obj.all = data.back[e]
+				}
+				if(e == 'LALA'){
+					obj.money = (data.back[e].money.money*1)
+					obj.add = data.back[e]
 				}
 			});
 		});
 	},
 	methods:{
-		all(){
+		allbuy(){
 			this.withdrawal = this.money
 		},
 		buy(){

+ 47 - 3
pages/conversion/transfers.vue

@@ -6,13 +6,21 @@
 		</view>
 		<view class="main">
 			<view class="main-font">收款人账户</view>
-			<input class="main-input" type="text" value="" v-model="uid" placeholder="请输入收款人账户" placeholder-class="main-input" />
+			<input class="main-input" type="text" value="" v-model="account" placeholder="请输入收款人账户" placeholder-class="main-input" />
+		</view>
+		<view class="main">
+			<view class="main-font">收款人UID</view>
+			<input class="main-input" type="text" value="" v-model="uid" placeholder="请输入收款人UID" placeholder-class="main-input" />
+		</view>
+		<view class="main">
+			<view class="main-font">交易密码</view>
+			<input class="main-input" type="text" value="" v-model="password" placeholder="请输入交易密码" placeholder-class="main-input" />
 		</view>
 		<view class="main">
 			<view class="main-font">转账数量</view>
 			<input class="main-input" type="text" value="" v-model="num" placeholder="请输入转账数量" placeholder-class="main-input" />
 		</view>
-		<view class="btn">
+		<view class="btn" @click="transfer">
 			提交申请
 		</view>
 	</view>
@@ -24,7 +32,9 @@ export default {
 	data() {
 		return {
 			jf: 0, //可转账购物积分
-			uid: '', //收款人账户
+			uid: '', //收款人UID
+			account:'',//收款人账号
+			password:'',//交易密码
 			num: '' //转账数量
 		};
 	},
@@ -39,6 +49,40 @@ export default {
 				}
 			});
 		});
+	},
+	methods:{
+		transfer() {
+			let obj = this;
+			if (obj.account == '') {
+				obj.$api.msg('请输入对方账号!');
+				return;
+			}
+			if (obj.uid == '') {
+				obj.$api.msg('请输入对方UID!');
+				return;
+			}
+			if (obj.password == '') {
+				obj.$api.msg('请输入交易密码!');
+				return;
+			}
+			if (obj.num == '') {
+				obj.$api.msg('请输入转账数量!');
+				return;
+			}
+			goPay({
+				type: 'USDC',
+				num: obj.num,
+				to_uid: obj.uid,
+				trade_psw: obj.password,
+				to_user_account: obj.account
+			}).then(data => {
+				obj.num = '';
+				obj.UID = '';
+				obj.password = '';
+				obj.account = '';
+				obj.$api.msg(data.msg);
+			});
+		},
 	}
 };
 </script>

+ 68 - 73
pages/money/paySuccess.vue

@@ -4,87 +4,82 @@
 		<text class="tit" v-if="type == 1">订单支付成功</text>
 		<text class="tit" v-else>订单预约成功</text>
 		<view class="btn-group">
-			<navigator url="/pages/user/fulilist" 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/order/order" open-type="redirect" class="mix-btn">查看订单</navigator>
 			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				type: 2//1为兑换支付成功2为预购成功
-			}
-		},
-		onLoad(opt) {
-			
-			// 保存订单号
-			if('type' in opt){
-				this.type = opt.type;
-			}
-			if (this.type == 1){
-				uni.setNavigationBarTitle({
-				  title:"兑换成功"
-				})
-			}
-			if (this.type == 2) {
-				uni.setNavigationBarTitle({
-					  title:"预约成功"
-				})
-			}
-			
-		},
-		methods: {
-			
+export default {
+	data() {
+		return {
+			type: 2 //1为兑换支付成功2为预购成功
+		};
+	},
+	onLoad(opt) {
+		// 保存订单号
+		if ('type' in opt) {
+			this.type = opt.type;
 		}
-	}
+		if (this.type == 1) {
+			uni.setNavigationBarTitle({
+				title: '兑换成功'
+			});
+		}
+		if (this.type == 2) {
+			uni.setNavigationBarTitle({
+				title: '预约成功'
+			});
+		}
+	},
+	methods: {}
+};
 </script>
 
-<style lang='scss'>
-	.content{
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-	}
-	.success-icon{
-		margin-top: 100rpx;
-		width: 302rpx;
-		height: 320rpx;
-	}
-	.tit{
-		margin-top: 40rpx;
-		font-size: 32rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #333333;
-	}
-	.btn-group{
-		padding-top: 130rpx;
-		display: flex;
-		justify-content: flex-start;
-	}
-	.mix-btn {
-		margin-top: 30upx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 301rpx;
-		height: 78rpx;
-		background: #59BAB0;
-		border-radius: 10rpx;
-		font-size: $font-lg;
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #FFFFFF;
-		&.hollow{
-			margin-left: 36rpx;
-			background: #fff;
-			color: #59BAB0;
-			border: 1px solid #59BAB0;
-		}
+<style lang="scss">
+.content {
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+}
+.success-icon {
+	margin-top: 100rpx;
+	width: 302rpx;
+	height: 320rpx;
+}
+.tit {
+	margin-top: 40rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.btn-group {
+	padding-top: 130rpx;
+	display: flex;
+	justify-content: flex-start;
+}
+.mix-btn {
+	margin-top: 30upx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 301rpx;
+	height: 78rpx;
+	background: linear-gradient(0deg, #2e58ff, #32c6ff);
+	border-radius: 10rpx;
+	font-size: $font-lg;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	&.hollow {
+		margin-left: 36rpx;
+		background: #fff;
+		color: #438bed;
+		border: 1px solid #438bed;
 	}
+}
 </style>

+ 6 - 6
pages/user/user.vue

@@ -69,8 +69,8 @@
 					<view class="link" hover-class="common-hover"></view>
 				</view>
 				<view class="order-section">
-					<view class="order-item" @click="nav('/pages/user/extension')" hover-class="common-hover" :hover-stay-time="50">
-						<view class=" icon1 position-relative"><image class="icon-img" src="../../static/user/myTeam.png" mode="aspectFit"></image></view>
+					<view class="order-item" @click="nav('')" hover-class="common-hover" :hover-stay-time="50">
+						<view class=" icon1 position-relative"><image class="icon-img" src="../../static/user/myMoney.png" mode="aspectFit"></image></view>
 						<text>我的资产</text>
 					</view>
 					<view class="order-item" @click="nav('/pages/user/extension')" hover-class="common-hover" :hover-stay-time="50">
@@ -85,8 +85,8 @@
 						<view class="icon1 position-relative"><image class="icon-img" src="../../static/user/myShare.png" mode="aspectFit"></image></view>
 						<text>团队邀请</text>
 					</view>
-					<view class="order-item" @click="nav('/pages/user/extension')" hover-class="common-hover" :hover-stay-time="50">
-						<view class=" icon1 position-relative"><image class="icon-img" src="../../static/user/myTeam.png" mode="aspectFit"></image></view>
+					<view class="order-item" @click="nav('')" hover-class="common-hover" :hover-stay-time="50">
+						<view class=" icon1 position-relative"><image class="icon-img" src="../../static/user/bank.png" mode="aspectFit"></image></view>
 						<text>银行卡管理</text>
 					</view>
 					<view class="order-item" @click="nav('/pages/address/address')" hover-class="common-hover" :hover-stay-time="50">
@@ -108,7 +108,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="my-order">
+		<view class="my-order" style="margin-top: 80rpx;">
 			<view class="box-title flex ">
 				<view class="title1"><text>拼购工具</text></view>
 				<view class="link" hover-class="common-hover"></view>
@@ -459,7 +459,7 @@ page,
 }
 
 .my-order {
-	margin: 80rpx auto 0;
+	margin: 20rpx auto 0;
 	display: flex;
 	justify-content: space-between;
 	flex-direction: column;

BIN
static/img/paySuccess.png


BIN
static/user/bank.png


BIN
static/user/myMoney.png