hwq 3 éve
szülő
commit
6063fb6176

+ 2 - 2
manifest.json

@@ -4,8 +4,8 @@
     // __UNI__6FC8B70
     // "appid" : "__UNI__6FC8B70",
     "description" : "",
-    "versionName" : "1.0.2",
-    "versionCode" : 102,
+    "versionName" : "1.0.3",
+    "versionCode" : 103,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 7 - 0
pages.json

@@ -126,6 +126,13 @@
 				"enablePullDownRefresh": true
 			}
 		},
+		{
+			"path": "pages/finance/mation",
+			"style": {
+				"navigationBarTitleText": "交易记录",
+				"enablePullDownRefresh": true
+			}
+		},
 		{
 			"path": "pages/finance/xieyi",
 			"style": {

+ 97 - 33
pages/finance/details.vue

@@ -11,7 +11,7 @@
 			<image src="../../static/img/img37.png"></image>
 		</view>
 		<view class="list" v-show="list.length > 0">
-			<view class="list-box" v-for='(ls,index) in list' :key='index'>
+			<view class="list-box" v-for='(ls,index) in list' :key='index' @click="nav(index)">
 				<view class="flex">
 					<view class="list-tpl flex_item">
 						<image src="../../static/img/img36.png"></image>
@@ -28,6 +28,36 @@
 			<view class="tip"></view>
 			<view class="submit" @click="withdraw">提币</view>
 		</view>
+		<uni-popup ref="mation" type="center">
+			<view class="popup">
+				<view class="cancel flex" @click="close">
+					<view class="tip">x</view>
+				</view>
+				<view class="list-boxs">
+					<view class="textBox flex">
+						<view class="font">交易前:</view>
+						<view class="number">{{ before }} USDT</view>
+					</view>
+					<view class="xian"></view>
+					<view class="textBox flex">
+						<view class="font">交易额:</view>
+						<view class="number">{{ pm }}{{ number*1 }} USDT</view>
+					</view>
+					<view class="xian"></view>
+					<view class="textBox flex">
+						<view class="font">交易后:</view>
+						<view class="number">{{ balance*1 }} USDT</view>
+					</view>
+					<view class="xian"></view>
+					<scroll-view scroll-y="true"  class="textBox">
+						<view class="font">流水详情:</view>
+						<view class="text">
+							{{ text }}
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+		</uni-popup>
 		<uni-popup ref="popup" type="center">
 			<view class="popup">
 				<view class="cancel flex" @click="close">
@@ -75,14 +105,21 @@
 				logo:'',
 				price:'',
 				mark:'',
+				charge: '',
 				
 				_address_qr:'',
 				__money_address:'',
 				ids:'',
-				keysAddr:''
+				keysAddr:'',
+				text:'',
+				balance:'',
+				before: '',
+				number: '',
+				pm:'',
 			};
 		},
 		onLoad(option) {
+			console.log(option,'1111');
 			this.code = option.code;
 			this.logo = option.logo;
 			this.name = option.name;
@@ -93,6 +130,7 @@
 			this.mark = option.mark;
 			this.ids = option.ids;
 			this.keysAddr = option.keysAddr;
+			this.charge = option.charge;
 			this.moneyType();
 			this.loadData();
 		},
@@ -131,7 +169,7 @@
 					obj.num='';
 					obj.code = '';
 					uni.navigateTo({
-						url:'/pages/finance/recharge?LOGO='+data._address_qr+'&order_id='+data.order_id+'&ddress='+data.__money_address+'&id='+data.id
+						url:'/pages/finance/recharge?LOGO='+data._address_qr+'&order_id='+data.order_id+'&ddress='+data.__money_address+'&id='+data.id+'&=charge'+obj.charge
 					})
 				}).catch(e => {
 					obj.$refs.popup.close();
@@ -159,12 +197,13 @@
 			handleCancel(e) {},
 			recharge(){
 				uni.navigateTo({
-					url:'/pages/finance/recharge?logo='+this.logo+'&name='+this.name+'&code='+this.code+'&_address_qr='+this._address_qr+'&__money_address='+this.__money_address+'&mark='+this.mark+'&ids='+this.ids+'&keysAddr='+this.keysAddr
+					url:'/pages/finance/recharge?logo='+this.logo+'&name='+this.name+'&code='+this.code+'&_address_qr='+this._address_qr+'&__money_address='+this.__money_address+'&mark='+this.mark+'&ids='+this.ids+'&keysAddr='+this.keysAddr+'&charge='+this.charge
 				})
 				// this.$refs.popup.open();
 			},
 			close() {
-				this.$refs.popup.close();
+				// this.$refs.popup.close();
+				this.$refs.mation.close();
 			},
 			withdraw(){
 				uni.navigateTo({
@@ -176,6 +215,20 @@
 					url
 				});
 			},
+			nav(index) {
+				const obj = this;
+				obj.text = obj.list[index].mark;
+				obj.balance = obj.list[index].balance;
+				obj.number = obj.list[index].number;
+				if(obj.list[index].pm == 1) {
+					obj.pm = '+';
+					obj.before = obj.balance - obj.number;
+				}else{
+					obj.pm = '-';
+					obj.before = obj.balance*1 + obj.number*1;
+				}
+				this.$refs.mation.open();
+			}
 		}
 	};
 </script>
@@ -279,47 +332,58 @@
 	}
 	//弹窗
 	.popup{
-		background-color: #FFFFFF;
-		border-radius: 25rpx;
-		font-size: 30rpx;
+		height: 618rpx;
+		background: #FFFFFF;
+		box-shadow: 3rpx 3rpx 6rpx 0rpx rgba(31, 31, 31, 0.17);
+		border-radius: 40rpx;
+		width: 700rpx;
 		.cancel{
 			text-align: center;
 			width: 100%;
 			line-height: 60rpx;
+			position: relative;
 			.tip{
-				background-color: #5771DF;
-				color: #FFFFFF;
+				color: #000000;
 				width:70rpx;
 				height: 70rpx;
-				border-top-right-radius:25rpx ;
+				position: absolute;
+				top: 0;
+				right: 0;
 			}
 		}
 		.list-boxs{
-			padding: 0rpx 80rpx;
-			.password{
-				padding: 50rpx 0rpx;
-				width: 100%;
-				input{
-					width: 70%;
-					height: 80rpx;
-					border: 2rpx solid #999999;
-					padding-left: 25rpx;
-					box-shadow:0px 3px 5px 0px rgba(0, 0, 0, 0.27);
-					border-radius:11rpx;
+			width: 90%;
+			margin: 0 auto;
+			margin-top: 100rpx;
+			
+			.textBox {
+				padding: 24rpx 18rpx;
+				.font {
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #4F4F4F;
 				}
-			}
-			.confirm-btn{
-				padding-bottom: 120rpx;
-				padding-top: 30rpx;
-				text{
-					background-color: #5771DF;
-					color: #FFFFFF;
-					width: 70%;
-					text-align: center;
-					padding:25rpx 90rpx;
-					border-radius: 15rpx;
+				.number {
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FB3A2F;
+				}
+				.text {
+					text-indent:2em;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #4F4F4F;
 				}
 			}
+			.xian {
+				width: 100%;
+				height: 1px;
+				background: #E7DFE8;
+			}
+			
 		}
 	}
 </style>

+ 13 - 6
pages/finance/index.vue

@@ -38,7 +38,7 @@
 				<view>资产正在保护中</view>
 			</view> -->
 		</view>
-		<view class="list-cell" v-for="(ls,index) in list" :key='index' @click="toDateils(ls)">
+		<view class="list-cell" v-for="(ls,index) in list" :key='index' @click="toDateils(ls,index)">
 			<view class="cell flex">
 				<view class="cell-title">{{ls.name}}</view>
 				<image src="../../static/img/img16.png"></image>
@@ -58,7 +58,7 @@
 				</view>
 			</view>
 		</view>
-		<uni-popup ref="popup" type="center">
+		<!-- <uni-popup ref="popup" type="center">
 			<view class="popup">
 				<view class="cancel flex" @click="close">
 					<view></view>
@@ -74,7 +74,7 @@
 					<view class="confirm-btn" @click="pay"><text>确认充币</text></view>
 				</view>
 			</view>
-		</uni-popup>
+		</uni-popup> -->
 	</view>
 </template>
 <script>
@@ -94,7 +94,8 @@ export default {
 			list:'',
 			show:true,
 			like_rmb:'',
-			like_usdt:''
+			like_usdt:'',
+			wallet: '',
 		};
 	},
 	onLoad(option){
@@ -131,6 +132,7 @@ export default {
 		loadData() {
 			let obj = this;
 			wallet({}).then(({ data }) => {
+				console.log(data)
 				obj.like_rmb = data.like_rmb;
 				obj.like_usdt = data.like_usdt;
 				obj.list = data.back;
@@ -182,10 +184,15 @@ export default {
 				url
 			});
 		},
-		toDateils(ls){
+		toDateils(ls,index){
 			console.log(ls,88)
+			this.moneyTypeList.forEach((e,ind)=>{
+				if(e.code === ls.name){
+					this.wallet = e.wallet;
+				}
+			})
 			uni.navigateTo({
-				url:'/pages/finance/details?code='+ls.code+'&name='+ls.name+'&logo='+ls.LOGO+'&price='+ls.money.money+'&_address_qr='+ls._address_qr+'&__money_address='+ls.__money_address+'&mark='+ls.mark+'&ids='+ls.money.id+'&keysAddr='+ls.money.address
+				url:'/pages/finance/details?code='+ls.code+'&name='+ls.name+'&logo='+ls.LOGO+'&price='+ls.money.money+'&_address_qr='+ls._address_qr+'&__money_address='+ls.__money_address+'&mark='+ls.mark+'&ids='+ls.money.id+'&keysAddr='+ls.money.address+'&charge='+ls.charge
 			})
 		},
 	}

+ 59 - 0
pages/finance/mation.vue

@@ -0,0 +1,59 @@
+<template>
+	<view class="center">
+		<view class="box">
+			<view class="textBox flex">
+				<view class="font">交易前</view>
+				<view class="number">{{ before }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import {moneyLog} from '@/api/finance.js';
+export default {
+	data(){
+		return {
+			id:'',
+			before: '2000',
+			jy: '2000',
+			after: '2000',
+			text: '1111',
+			code: '',
+			type: '',
+		}
+	},
+	onLoad(option){
+		console.log(option)
+		this.id = option.id;
+		this.code = option.code;
+		this.type = option.type;
+		this.loadData();
+	},
+	methods:{
+		async loadData() {
+			let obj = this;
+			moneyLog({
+				page: 1,
+				limit: 10000,
+				type: obj.type,
+			}, obj.code,obj.id).then(({
+				data
+			}) => {
+				console.log(data);
+				obj.list = data.list;
+			});
+		},
+	}
+}
+</script>
+
+<style lang="scss">
+	.box {
+		
+		height: 618rpx;
+		background: #FFFFFF;
+		box-shadow: 3px 3px 6px 0px rgba(31, 31, 31, 0.17);
+		border-radius: 40px;
+	}
+</style>

+ 12 - 11
pages/finance/recharge.vue

@@ -18,7 +18,7 @@
 		</view>
 		
 		<view class="image-box" v-if="charge != 0">
-			<view class="tuijianbox" v-if="isShow">
+			<view class="tuijianbox" >
 				<view class="item" @click="gogo()" >
 					<image v-if="idx == 2" src="../../static/img/befor.png"></image>
 					<image v-else src="../../static/img/after.png"></image>
@@ -124,7 +124,6 @@
 				keysAddr:'',
 				showBtn:false,
 				idx: 1,
-				isShow: false,
 				cid: 'cid',
 				size: 150,
 				unit: '150',
@@ -137,20 +136,22 @@
 				onval: true,
 				loadMake: true,
 				usingComponents: true,
-				
+				way: '',
 			};
 		},
 		onLoad(option) {
+			console.log(option)
 			if (option.name) {
-				this.charge = option.charge;
 				this.name = option.name;
 				this.logo = option.logo;
+				this.charge = option.charge;
 				this.code = option.code;
 				this.mark = option.mark;
 				this.ids = option.ids;
 				this.keysAddr = option.keysAddr;
 				this.qr = option._address_qr;
-				this.address = option.wallet.address_TRC20;
+				
+				
 				this.ids = option.ids;
 				this.addr = option.keysAddr;
 				if(this.addr == null || this.addr == ''){
@@ -158,6 +159,8 @@
 				}
 			}
 			this.moneyType();
+			
+			
 		},
 		onShow() {
 
@@ -170,15 +173,17 @@
 					data
 				}) => {
 					obj.moneyTypeList = data;
+					obj.address = obj.moneyTypeList[1].wallet.address_TRC20;
 					if (obj.logo == '') {
 						this.charge = obj.moneyTypeList[0].charge;
 						obj.logo = obj.moneyTypeList[0].LOGO;
 						obj.name = obj.moneyTypeList[0].name;
 						obj.code = obj.moneyTypeList[0].code;
 						obj.money = obj.moneyTypeList[0].price;
-						obj.address = obj.moneyTypeList[0].wallet.address_TRC20;
+						// obj.address = obj.moneyTypeList[0].wallet.address_TRC20;
 						obj.qr = obj.moneyTypeList[0]._address_qr;
 						obj.mark = obj.moneyTypeList[0].mark;
+						obj.address = obj.moneyTypeList[1].wallet.address_TRC20;
 						obj.addr = obj.moneyTypeList[0].wallet.address;
 						if(obj.addr == null || obj.addr == ''){
 							obj.showBtn = true
@@ -281,11 +286,7 @@
 				this.mark = options.mark;
 				this.addr = options.wallet.address;
 				this.ids = options.wallet.id;
-				if(options.name == 'USDT'){
-					this.isShow = true;
-				}else {
-					this.isShow = false;
-				}
+				
 			},
 			useOutClickSide() {
 				this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions()

+ 1 - 0
pages/user/user.vue

@@ -94,6 +94,7 @@ export default {
 		};
 	},
 	onLoad(option){
+		
 		saveUrl();
 	},
 	onShow() {