hwq 2 years ago
parent
commit
89053aba2c

+ 36 - 0
api/wallet.js

@@ -110,3 +110,39 @@ export function tbhandle(data) {
 		data
 	});
 }
+
+// 我的充幣列表
+export function czlist(data) {
+	return request({
+		url: '/user/czlist',
+		method: 'get',
+		data
+	});
+}
+
+// 我的充幣详情
+export function czinfo(data) {
+	return request({
+		url: '/user/czinfo',
+		method: 'get',
+		data
+	});
+}
+
+// 我的提幣列表
+export function txlist(data) {
+	return request({
+		url: '/user/txlist',
+		method: 'get',
+		data
+	});
+}
+
+// 我的提币详情
+export function txinfo(data) {
+	return request({
+		url: '/user/txinfo',
+		method: 'get',
+		data
+	});
+}

+ 24 - 0
pages.json

@@ -140,6 +140,30 @@
 				"navigationBarTitleText": "密碼"
 			}
 		},
+		{
+			"path": "pages/user/tbRecord",
+			"style": {
+				"navigationBarTitleText": "提幣記錄"
+			}
+		},
+		{
+			"path": "pages/user/cbRecord",
+			"style": {
+				"navigationBarTitleText": "充幣記錄"
+			}
+		},
+		{
+			"path": "pages/user/tbDetail",
+			"style": {
+				"navigationBarTitleText": "提幣详情"
+			}
+		},
+		{
+			"path": "pages/user/cbDetail",
+			"style": {
+				"navigationBarTitleText": "充幣详情"
+			}
+		},
 		{
 			"path": "pages/user/authrz",
 			"style": {

+ 1 - 1
pages/transaction/cbdetail.vue

@@ -3,7 +3,7 @@
 		<view class="vheight"></view>
 		<view class="top flex">
 			<image @click="back()" class="top-icon1" src="../../static/img/cb2.png" mode=""></image>
-			<image class="top-icon2" src="../../static/img/cb1.png" mode=""></image>
+			<image @click="navTo('/pages/user/cbRecord')" class="top-icon2" src="../../static/img/cb1.png" mode=""></image>
 		</view>
 		<view class="title">充幣</view>
 		<view class="type flex" @click="navTo('/pages/transaction/cblist')">

+ 1 - 1
pages/transaction/tbdetail.vue

@@ -3,7 +3,7 @@
 		<view class="vheight"></view>
 		<view class="top flex">
 			<image @click="back()" class="top-icon1" src="../../static/img/cb2.png" mode=""></image>
-			<image class="top-icon2" src="../../static/img/cb1.png" mode=""></image>
+			<image @click="navTo('/pages/user/tbRecord')" class="top-icon2" src="../../static/img/cb1.png" mode=""></image>
 		</view>
 		<view class="title">提幣</view>
 		<view class="type flex" @click="navTo('/pages/transaction/cblist')">

+ 87 - 0
pages/user/cbDetail.vue

@@ -0,0 +1,87 @@
+<template>
+	<view class="content">
+		<view class="title b-b">+{{ info.num }}{{ info.coin }}</view>
+		<view class="row b-b flex">
+			<text class="tit">類型</text>
+			<view class="input">普通充幣</view>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">狀態</text>
+			<view class="input">{{ info.status == 1 ? '待审核' : info.status == 2 ? '完成' : '失败' }}</view>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">時間</text>
+			<view class="input">{{ info.addtime }}</view>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">轉賬憑證</text>
+			<view class="image"><image :src="info.payimg" mode=""></image></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { czinfo } from '@/api/wallet.js';
+export default {
+	data() {
+		return {
+			id: '',
+			info: ''
+		};
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.loadData();
+	},
+	onShow() {},
+	methods: {
+		loadData() {
+			czinfo({ oid: this.id }).then(e => {
+				this.info = e.data;
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+	background: #fff;
+}
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 40rpx 30rpx;
+	background: #fff;
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 28rpx;
+		color: #707a8a;
+	}
+	.input {
+		text-align: right;
+		flex: 1;
+		font-size: 28rpx;
+		color: #000;
+	}
+	.image {
+		width: 160rpx;
+		height: 160rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+.title {
+	padding: 50rpx 30rpx;
+	font-size: 48rpx;
+	font-weight: bold;
+	color: #fcd535;
+}
+</style>

+ 118 - 0
pages/user/cbRecord.vue

@@ -0,0 +1,118 @@
+<template>
+	<view class="content">
+		<view class="main">
+			<view class="main-title">
+				<view class="main-title-item">幣種</view>
+				<view class="main-title-item">時間</view>
+			</view>
+			<view class="main-info" v-for="(item, index) in list" @click="navTo('/pages/user/cbDetail?id=' + item.id)">
+				<view class="main-info-top flex">
+					<view class="main-info-title">{{ item.coin }}</view>
+					<view class="main-info-type">{{ item.status == 1 ? '待审核' : item.status == 2 ? '完成' : '失败' }}</view>
+				</view>
+				<view class="main-info-bottom flex">
+					<view class="main-bottom-item left">
+						<view class="main-bottom-item-font">數量</view>
+						<view class="main-bottom-item-num">{{ item.num }}</view>
+					</view>
+					<view class="main-bottom-item center">
+						<view class="main-bottom-item-font">手續費</view>
+						<view class="main-bottom-item-num">0.0000</view>
+					</view>
+					<view class="main-bottom-item right">
+						<view class="main-bottom-item-font">時間</view>
+						<view class="main-bottom-item-num">{{ item.addtime }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { czlist } from '@/api/wallet.js';
+export default {
+	data() {
+		return {
+			list: []
+		};
+	},
+	onLoad() {},
+	onShow() {
+		this.loadData();
+	},
+	methods: {
+		loadData() {
+			czlist({ page: 1, limit: 1000 }).then(e => {
+				this.list = e.data;
+			});
+		},
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+	background: #f5f5f5;
+}
+.main {
+	margin: 10rpx 0 0;
+	background: #fff;
+	padding: 20rpx;
+	.main-title {
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		padding: 20rpx 0;
+		border-bottom: 1px solid #fcfcfc;
+	}
+	.main-info {
+		padding: 20rpx 20rpx;
+		border-bottom: 1px solid #fcfcfc;
+		.main-info-top {
+			.main-info-title {
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #707a8a;
+			}
+			.main-info-type {
+				font-size: 28rpx;
+				color: #707a8a;
+			}
+		}
+		.main-info-bottom {
+			margin: 20rpx 0 0;
+			.left {
+				text-align: left;
+			}
+			.center {
+				text-align: center;
+			}
+			.right {
+				text-align: right;
+			}
+			.main-bottom-item {
+				width: 33%;
+				.main-bottom-item-font {
+					font-size: 28rpx;
+					color: #cbcbcb;
+				}
+				.main-bottom-item-num {
+					height: 80rpx;
+					margin-top: 20rpx;
+					font-size: 28rpx;
+					color: #000;
+				}
+			}
+		}
+	}
+}
+</style>

+ 95 - 0
pages/user/tbDetail.vue

@@ -0,0 +1,95 @@
+<template>
+	<view class="content">
+		<view class="title b-b">-{{ info.num }}{{ info.coinname.toUpperCase() }}</view>
+		<view class="row b-b flex">
+			<text class="tit">類型</text>
+			<view class="input">普通提幣</view>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">手續費</text>
+			<view class="input">{{ info.fee }}</view>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">實際到賬</text>
+			<view class="input">{{ info.mum }}</view>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">提幣地址</text>
+			<view class="input">{{ info.address }}</view>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">狀態</text>
+			<view class="input">{{ info.status == 1 ? '待审核' : info.status == 2 ? '完成' : '失败' }}</view>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">時間</text>
+			<view class="input">{{ info.addtime }}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { txinfo } from '@/api/wallet.js';
+export default {
+	data() {
+		return {
+			id: '',
+			info: ''
+		};
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.loadData();
+	},
+	onShow() {},
+	methods: {
+		loadData() {
+			txinfo({ oid: this.id }).then(e => {
+				this.info = e.data;
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+	background: #fff;
+}
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 40rpx 30rpx;
+	background: #fff;
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 28rpx;
+		color: #707a8a;
+	}
+	.input {
+		text-align: right;
+		flex: 1;
+		font-size: 28rpx;
+		color: #000;
+	}
+	.image {
+		width: 160rpx;
+		height: 160rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+.title {
+	padding: 50rpx 30rpx;
+	font-size: 48rpx;
+	font-weight: bold;
+	color: #fcd535;
+}
+</style>

+ 118 - 0
pages/user/tbRecord.vue

@@ -0,0 +1,118 @@
+<template>
+	<view class="content">
+		<view class="main">
+			<view class="main-title">
+				<view class="main-title-item">幣種</view>
+				<view class="main-title-item">時間</view>
+			</view>
+			<view class="main-info" v-for="(item, index) in list" @click="navTo('/pages/user/tbDetail?id=' + item.id)">
+				<view class="main-info-top flex">
+					<view class="main-info-title">{{ item.coinname.toUpperCase() }}</view>
+					<view class="main-info-type">{{ item.status == 1 ? '待审核' : item.status == 2 ? '完成' : '失败' }}</view>
+				</view>
+				<view class="main-info-bottom flex">
+					<view class="main-bottom-item left">
+						<view class="main-bottom-item-font">實際到賬</view>
+						<view class="main-bottom-item-num">{{ item.mum }}</view>
+					</view>
+					<view class="main-bottom-item center">
+						<view class="main-bottom-item-font">手續費</view>
+						<view class="main-bottom-item-num">{{ item.fee }}</view>
+					</view>
+					<view class="main-bottom-item right">
+						<view class="main-bottom-item-font">時間</view>
+						<view class="main-bottom-item-num">{{ item.addtime }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { txlist } from '@/api/wallet.js';
+export default {
+	data() {
+		return {
+			list: []
+		};
+	},
+	onLoad() {},
+	onShow() {
+		this.loadData();
+	},
+	methods: {
+		loadData() {
+			txlist({ page: 1, limit: 1000 }).then(e => {
+				this.list = e.data;
+			});
+		},
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+	background: #f5f5f5;
+}
+.main {
+	margin: 10rpx 0 0;
+	background: #fff;
+	padding: 20rpx;
+	.main-title {
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		padding: 20rpx 0;
+		border-bottom: 1px solid #fcfcfc;
+	}
+	.main-info {
+		padding: 20rpx 20rpx;
+		border-bottom: 1px solid #fcfcfc;
+		.main-info-top {
+			.main-info-title {
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #707a8a;
+			}
+			.main-info-type {
+				font-size: 28rpx;
+				color: #707a8a;
+			}
+		}
+		.main-info-bottom {
+			margin: 20rpx 0 0;
+			.left {
+				text-align: left;
+			}
+			.center {
+				text-align: center;
+			}
+			.right {
+				text-align: right;
+			}
+			.main-bottom-item {
+				width: 33%;
+				.main-bottom-item-font {
+					font-size: 28rpx;
+					color: #cbcbcb;
+				}
+				.main-bottom-item-num {
+					height: 80rpx;
+					margin-top: 20rpx;
+					font-size: 28rpx;
+					color: #000;
+				}
+			}
+		}
+	}
+}
+</style>