Browse Source

Merge branch 'master' of http://git.liuniu946.com/lhl/nzhbsr

lhl 3 years ago
parent
commit
6a498130ab

+ 54 - 0
api/wallet.js

@@ -56,3 +56,57 @@ export function paycoin(data) {
 		data
 	});
 }
+
+// 提幣列表
+export function txcoin(data) {
+	return request({
+		url: '/api/User/txcoin',
+		method: 'get',
+		data
+	});
+}
+
+// 提幣詳情
+export function txpage(data) {
+	return request({
+		url: '/api/User/txpage',
+		method: 'get',
+		data
+	});
+}
+
+// 提幣地址
+export function addresslist(data) {
+	return request({
+		url: '/api/User/addresslist',
+		method: 'get',
+		data
+	});
+}
+
+// 添加提幣地址
+export function upplusaddress(data) {
+	return request({
+		url: '/api/User/upplusaddress',
+		method: 'get',
+		data
+	});
+}
+
+// 刪除地址
+export function deladdress(data) {
+	return request({
+		url: '/api/User/deladdress',
+		method: 'get',
+		data
+	});
+}
+
+// 提幣
+export function tbhandle(data) {
+	return request({
+		url: '/api/user/tbhandle',
+		method: 'get',
+		data
+	});
+}

+ 11 - 6
pages/transaction/cbdetail.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="vheight"></view>
 		<view class="top flex">
-			<image @click="navTo('/pages/transaction/cblist')" class="top-icon1" src="../../static/img/cb2.png" mode=""></image>
+			<image @click="back()" class="top-icon1" src="../../static/img/cb2.png" mode=""></image>
 			<image class="top-icon2" src="../../static/img/cb1.png" mode=""></image>
 		</view>
 		<view class="title">充幣</view>
@@ -39,9 +39,9 @@
 			<view class="btn" @click="copy(info.czaddress)">複製地址</view>
 		</view>
 		<view class="info">
-			<view class="info-item red">最小充值金額:0.00BTC,小於最小金額的充值將不會上賬且無法退回</view>
+			<view class="info-item red">最小充值金額:{{ info.czminnum }}{{ info.title }},小於最小金額的充值將不會上賬且無法退回</view>
 			<view class="info-item">請選擇正確的充值通道網絡,否則資產將不可找回</view>
-			<view class="info-item">最小充值金額:0.00BTC,小於最小金額的充值將不會上賬且無法退回</view>
+			<view class="info-item">最小充值金額:{{ info.czminnum }}{{ info.title }},小於最小金額的充值將不會上賬且無法退回</view>
 			<view class="info-item">您的充值地址不會經常改變,可以重複充值;如有更改,我們會盡量通過網站公告或郵件通知您</view>
 			<view class="info-item">請務必確認電腦及瀏覽器安全,防止信息被篡改或洩露</view>
 		</view>
@@ -80,7 +80,8 @@ export default {
 			loadMake: true,
 			usingComponents: true,
 			num: '',
-			image: ''
+			image: '',
+			image1: ''
 		};
 	},
 	onLoad(opt) {
@@ -99,6 +100,9 @@ export default {
 		qrR(res) {
 			console.log(res, '123456');
 		},
+		back() {
+			uni.navigateBack();
+		},
 		navTo(url) {
 			uni.navigateTo({
 				url
@@ -111,6 +115,7 @@ export default {
 			}).then(data => {
 				console.log('data', data);
 				this.image = data[0].src;
+				this.image1 = data[0].img;
 			});
 		},
 		copy(item) {
@@ -134,10 +139,10 @@ export default {
 			if (this.num < 0) {
 				return this.$api.msg('充值金額不能為0');
 			}
-			if (!this.image) {
+			if (!this.image1) {
 				return this.$api.msg('請上傳轉款憑證');
 			}
-			paycoin({ cid: this.id, zznum: this.num, payimg: this.image, coinname: this.info.title }).then(e => {
+			paycoin({ cid: this.id, zznum: this.num, payimg: this.image1, coinname: this.info.title }).then(e => {
 				this.num = '';
 				this.image = '';
 				return this.$api.msg('提交申請成功,請耐心等待審核');

+ 9 - 3
pages/transaction/cblist.vue

@@ -5,7 +5,7 @@
 				<view class="ss-main-icon"><image src="../../static/img/ss.png" mode=""></image></view>
 				<input type="text" @blur="loadData()" v-model="keyworld" placeholder="搜索您需要的幣種" />
 			</view>
-			<view class="ss-font">取消</view>
+			<view class="ss-font" @click="navTo('/pages/user/user')">取消</view>
 		</view>
 		<!-- <view class="title">热门币种</view>
 		<view class="rmbz flex">
@@ -65,9 +65,14 @@ export default {
 				this.bilist = e.data;
 			});
 		},
-		navTo(opt) {
+		navTo(url) {
 			uni.navigateTo({
-				url: '/pages/transaction/cbdetail?type=' + opt
+				url,
+				fail() {
+					uni.switchTab({
+						url
+					});
+				}
 			});
 		},
 		nav(opt) {
@@ -103,6 +108,7 @@ page,
 		.ss-main-icon {
 			width: 32rpx;
 			height: 32rpx;
+			margin-right: 20rpx;
 			image {
 				width: 100%;
 				height: 100%;

+ 236 - 17
pages/transaction/tbdetail.vue

@@ -1,33 +1,252 @@
 <template>
 	<view class="content">
-
+		<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>
+		</view>
+		<view class="title">提幣</view>
+		<view class="type flex" @click="navTo('/pages/transaction/cblist')">
+			<view class="type-left">幣種</view>
+			<view class="type-right">
+				<view class="type-name">{{ info.title }}</view>
+				<image class="type-icon" src="../../static/icon/user-back.png" mode=""></image>
+			</view>
+		</view>
+		<view class="main">
+			<view class="main-title">提幣網絡</view>
+			<view class="main-list">{{ info.czline }}</view>
+			<view class="main-title" style="margin-top: 20rpx;">提幣地址</view>
+			<view class="sr-input"><input placeholder="請輸入提幣地址" type="number" v-model="address" /></view>
+			<view class="sr-sl flex">
+				<view class="sr-title">提幣數量</view>
+				<view class="sr-num" v-if="info">可用 {{ money }} {{ info.name.toLocaleUpperCase() }}</view>
+			</view>
+			<view class="sr-input flex">
+				<input placeholder="請輸入提幣數量" type="number" v-model="num" />
+				<view class="main-type-box">
+					<view class="main-type" v-if="info">{{ info.name.toLocaleUpperCase() }}</view>
+					<view class="all" @click="qb()">全部</view>
+				</view>
+			</view>
+			<view class="sr-btn" @click="submit()">提交</view>
+			<view class="sr-tip flex" v-if="num">
+				<view class="sr-tip-item">實際到賬</view>
+				<view class="sr-tip-item" v-if="info.sxftype == 1">{{ num * 1 * (1 - (info.txsxf * 1) / 100) }}</view>
+				<view class="sr-tip-item" v-if="info.sxftype == 2">{{ num * 1 - info.txsxf_n * 1 }}</view>
+			</view>
+		</view>
+		<view class="info">
+			<view class="info-item red">
+				提币扣除{{ info.sxftype == 1 ? info.txsxf + '%' : info.txsxf_n + info.title }}手续费 , 輸小提幣數量:{{ info.txminnum
+				}}{{ info.title }},小於最小金額的提幣將不會到賬且無法退回
+			</view>
+			<view class="info-item">為保障資金安全,當您賬戶安全策略變更,密碼修改,我們會對提幣進行人工審核,請耐心等待工作人員電話或郵件聯繫.</view>
+			<view class="info-item">請務必確認電腦及瀏覽器安全,防止信息被篡改或洩露</view>
+		</view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-
-			}
+import { txpage, tbhandle } from '@/api/wallet.js';
+import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
+import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+export default {
+	data() {
+		return {
+			id: '',
+			info: '',
+			address: '',
+			num: '',
+			money: ''
+		};
+	},
+	onLoad(opt) {
+		this.id = opt.type;
+		this.loadData();
+	},
+	onShow() {},
+	onReachBottom() {},
+	onReady() {},
+	methods: {
+		loadData() {
+			txpage({ id: this.id }).then(({ data }) => {
+				this.info = data.info;
+				this.money = data.money;
+			});
 		},
-		onLoad() {
-
+		qrR(res) {
+			console.log(res, '123456');
 		},
-		onShow() {
-
+		back() {
+			uni.navigateBack();
 		},
-		onReachBottom() {
-
+		qb() {
+			this.num = this.money;
 		},
-		onReady() {
-
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
 		},
-		methods: {
-
+		submit() {
+			console.log(222);
+			if (this.num < 0) {
+				return this.$api.msg('提幣數量不能為0');
+			}
+			if (!this.address) {
+				return this.$api.msg('請輸入上傳地址');
+			}
+			tbhandle({ id: this.id, num: this.num, address: this.address }).then(e => {
+				this.num = '';
+				this.image = '';
+				return this.$api.msg('提交申請成功,請耐心等待審核');
+			});
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-</style>
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+	background: #f5f5f5;
+}
+.vheigh {
+	height: var(--status-bar-height);
+}
+.top {
+	padding: 20rpx 40rpx;
+	.top-icon1 {
+		width: 52rpx;
+		height: 36rpx;
+	}
+	.top-icon2 {
+		width: 48rpx;
+		height: 48rpx;
+	}
+}
+.title {
+	padding: 20rpx 20rpx 0;
+	font-size: 52rpx;
+	font-weight: 500;
+}
+.type {
+	margin: 20rpx auto 0;
+	width: 690rpx;
+	background: #ffffff;
+	border-radius: 20rpx;
+	padding: 30rpx 20rpx;
+	.type-left {
+		font-size: 32rpx;
+		color: #000;
+	}
+	.type-right {
+		display: flex;
+		align-items: center;
+		.type-name {
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #fcd535;
+			margin-right: 10rpx;
+		}
+		.type-icon {
+			width: 24rpx;
+			height: 24rpx;
+		}
+	}
+}
+.main {
+	margin: 20rpx auto 0;
+	width: 690rpx;
+	background: #ffffff;
+	border-radius: 20rpx;
+	padding: 30rpx 20rpx;
+	.main-title {
+		font-size: 32rpx;
+		color: #000;
+	}
+	.main-list {
+		margin-top: 20rpx;
+		width: 200rpx;
+		height: 70rpx;
+		line-height: 70rpx;
+		text-align: center;
+		border: 2px solid #fcd535;
+		border-radius: 10rpx;
+		font-size: 28rpx;
+		color: #fcd535;
+	}
+	.sr-input {
+		margin-top: 20rpx;
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 80rpx;
+		line-height: 80rpx;
+		background: #f5f5f5;
+		border-radius: 20rpx;
+		padding: 0rpx 30rpx;
+		input {
+			font-size: 28rpx;
+			padding-left: 30rpx;
+			background: #f5f5f5;
+		}
+	}
+	.sr-sl {
+		margin-top: 20rpx;
+		.sr-num {
+			color: #707a8a;
+			font-size: 24rpx;
+		}
+	}
+	.main-type-box {
+		display: flex;
+		align-items: center;
+		.main-type {
+			font-size: 32rpx;
+			color: #707a8a;
+			margin-right: 20rpx;
+		}
+		.all {
+			font-size: 32rpx;
+			color: #707a8a;
+		}
+	}
+	.sr-btn {
+		width: 100%;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		border-radius: 10rpx;
+		margin: 20rpx auto 0;
+		background: linear-gradient(to left, #eeb80d, #ffe35b);
+		font-size: 28rpx;
+		color: #000;
+	}
+	.sr-tip {
+		margin-top: 20rpx;
+		.sr-tip-item {
+			font-size: 24rpx;
+			color: #707a8a;
+		}
+	}
+}
+.info {
+	margin: 20rpx auto 0;
+	width: 690rpx;
+	background: #ffffff;
+	border-radius: 20rpx;
+	padding: 30rpx 20rpx;
+	.info-item {
+		font-size: 24rpx;
+		color: #000;
+		margin-bottom: 20rpx;
+	}
+	.red {
+		color: red;
+	}
+}
+</style>

+ 178 - 20
pages/transaction/tblist.vue

@@ -1,33 +1,191 @@
 <template>
 	<view class="content">
-
+		<view class="ss-box flex">
+			<view class="ss-main">
+				<view class="ss-main-icon"><image src="../../static/img/ss.png" mode=""></image></view>
+				<input type="text" @blur="loadData()" v-model="keyworld" placeholder="搜索您需要的幣種" />
+			</view>
+			<view class="ss-font" @click="navTo('/pages/user/user')">取消</view>
+		</view>
+		<view class="title">可提幣列表</view>
+		<scroll-view class="swiper-box" scroll-y="true" :style="{ height: maxheight }">
+			<view class="list" v-for="(item, index) in bilist" @click="nav(item)">
+				<view class="list-item flex">
+					<view class="list-item-left">
+						<view class="list-title">{{ item.cname }}</view>
+						<view class="list-tip">{{ item.title }}</view>
+					</view>
+					<view class="list-item-right">
+						<view class="kc">{{ item.cnum }}</view>
+						<view class="back"><image src="../../static/icon/user-back.png" mode=""></image></view>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-
-			}
-		},
-		onLoad() {
-
-		},
-		onShow() {
-
-		},
-		onReachBottom() {
-
+import { txcoin } from '@/api/wallet.js';
+export default {
+	data() {
+		return {
+			keyworld: '',
+			rmlist: ['USDT', 'BTC', 'ETH', 'TRX'],
+			bilist: [],
+			maxheight: ''
+		};
+	},
+	onLoad() {},
+	onShow() {
+		this.loadData();
+	},
+	onReachBottom() {},
+	onReady(res) {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.swiper-box').boundingClientRect();
+				query.exec(function(res) {
+					_this.maxheight = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.maxheight);
+				});
+			},
+			fail: res => {}
+		});
+	},
+	methods: {
+		loadData() {
+			txcoin({ name: this.keyworld }).then(e => {
+				this.bilist = e.data;
+			});
 		},
-		onReady() {
-
+		navTo(url) {
+			uni.navigateTo({
+				url,
+				fail() {
+					uni.switchTab({
+						url
+					});
+				}
+			});
 		},
-		methods: {
-
+		nav(opt) {
+			uni.navigateTo({
+				url: '/pages/transaction/tbdetail?type=' + opt.id
+			});
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-</style>
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+	background: #ffffff;
+}
+.ss-box {
+	padding: 12rpx 62rpx 10rpx 34rpx;
+	border-bottom: 1px solid #f6f6f6;
+	.ss-main {
+		width: 537rpx;
+		padding: 10rpx 0;
+		background: #f6f6f6;
+		border-radius: 26rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.ss-main-icon {
+			width: 32rpx;
+			height: 32rpx;
+			margin-right: 20rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		input {
+			font-size: 20rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #aaaaaa;
+		}
+	}
+	.ss-font {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #070707;
+	}
+}
+.title {
+	display: inline-block;
+	margin: 30rpx 0 0 18rpx;
+	padding: 0 10rpx 13rpx;
+	border-bottom: 4rpx solid #f4d03c;
+}
+.rmbz {
+	padding: 32rpx 0;
+	justify-content: center;
+	.rmbz-item {
+		width: 130rpx;
+		height: 52rpx;
+		border: 2rpx solid #848a8f;
+		border-radius: 10rpx;
+		text-align: center;
+		line-height: 52rpx;
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #000000;
+		margin: 0 16rpx;
+	}
+}
+.list {
+	margin-top: 6rpx;
+	padding: 0 24rpx;
+	.list-item {
+		padding: 42rpx 0 24rpx;
+		.list-item-left {
+			display: flex;
+			align-items: center;
+			.list-title {
+				width: 200rpx;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #5d5f70;
+			}
+			.list-tip {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #5d5f70;
+			}
+		}
+		.list-item-right {
+			display: flex;
+			align-items: center;
+			line-height: 1;
+			.kc {
+				font-size: 20rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #5d5f70;
+				margin-right: 20rpx;
+			}
+			.back {
+				width: 24rpx;
+				height: 24rpx;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+}
+</style>

BIN
unpackage/安卓/hy.keystore


+ 2 - 0
unpackage/安卓/证书详情.txt

@@ -0,0 +1,2 @@
+别名:inc.hy.com
+密码:112233