hwq hace 4 años
padre
commit
4d343b8679
Se han modificado 5 ficheros con 48 adiciones y 410 borrados
  1. 6 1
      pages.json
  2. 39 67
      pages/assets/assets.vue
  3. 2 2
      pages/index/convert.vue
  4. 0 339
      pages/index/index.vue
  5. 1 1
      pages/index/node.vue

+ 6 - 1
pages.json

@@ -231,7 +231,12 @@
 		{
 			"path": "pages/assets/assets",
 			"style": {
-				"navigationBarTitleText": "资产"
+				"navigationBarTitleText": "资产",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
 			}
 		},
 		{

+ 39 - 67
pages/assets/assets.vue

@@ -1,10 +1,9 @@
 <template>
 	<view class="container">
+		<view class="title">资产</view>
 		<view>
 			<view class="list-box">
-				<view class="bg">
-					<image src="../../static/img/assets-bg.png" mode=""></image>					
-				</view>
+				<view class="bg"><image src="../../static/img/assets-bg.png" mode=""></image></view>
 				<view class="info-box">
 					<view class="flex" v-show="show == true">
 						<view class="info">
@@ -46,7 +45,10 @@
 			</view>
 			<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>
+					<view class="cell-title flex">
+						<image :src="ls.LOGO" mode="scaleToFill" class="logo"></image>
+						<view class="name">{{ ls.name }}</view>
+					</view>
 					<image src="../../static/img/img16.png"></image>
 				</view>
 				<view class="flex cell-list">
@@ -54,38 +56,17 @@
 						<view class="name">可用</view>
 						<view class="tpl">{{ ls.money.money * 1 }}</view>
 					</view>
-					<view class="cell-tpl tip-tpl">
-						<view class="name">冻结</view>
-						<view class="tpl">{{ ls.lock_moeny }}</view>
-					</view>
 					<view class="cell-tpl tip-box">
 						<view class="name">折合(USDT)</view>
 						<view class="tpl clamp">{{ ls.usdt * 1 }}</view>
 					</view>
 				</view>
 			</view>
-			<!-- <uni-popup ref="popup" type="center">
-			<view class="popup">
-				<view class="cancel flex" @click="close">
-					<view></view>
-					<view class="tip">x</view>
-				</view>
-				<view class="list-boxs">
-					<view class="popup-text">购买数量:</view>
-					<view class="password"><input type="number" v-model="num" placeholder="请输入算力数量"></view>
-					<view class="popup-text">币种选择:</view>
-					 <view class="content" @click="useOutClickSide">
-					        <easy-select ref="easySelect" :options='moneyTypeList' :value="money" @selectOne="selectOne"></easy-select>
-					    </view>
-					<view class="confirm-btn" @click="pay"><text>确认充币</text></view>
-				</view>
-			</view>
-		</uni-popup> -->
 		</view>
 	</view>
 </template>
 <script>
-import { recharge, wallet,moneyType } from '@/api/finance.js';
+import { wallet } from '@/api/finance.js';
 import easyselect from '@/components/easy-select/easy-select.vue';
 export default {
 	components: {
@@ -97,19 +78,17 @@ export default {
 			money: '',
 			type: '',
 			moneyTypeList: [],
-			list: '',
+			list: [],
 			show: true,
 			like_rmb: '',
 			like_usdt: '',
-			wallet: '',
+			wallet: ''
 		};
 	},
 	onLoad(option) {
-		this.moneyType();
 		this.loadData();
 	},
 	onShow() {
-		this.moneyType();
 		this.loadData();
 		let show = uni.getStorageSync('showPick');
 		if (show == false) {
@@ -122,31 +101,29 @@ export default {
 	//下拉刷新
 	onPullDownRefresh() {
 		this.loadData();
-		this.moneyType();
 		setTimeout(function() {
 			uni.stopPullDownRefresh();
 		}, 1000);
 	},
 	methods: {
-		// 所有币种
-		async moneyType() {
-			let obj = this;
-			moneyType({}).then(({ data }) => {
-				obj.moneyTypeList = data;
-			});
-		},
 		// 请求载入数据
 		loadData() {
 			let obj = this;
 			uni.showLoading({
-				title:'加载中'
-			})
+				title: '加载中'
+			});
 			obj.loading = true;
 			wallet({}).then(({ data }) => {
 				console.log(data);
-				obj.like_rmb = data.like_rmb;
-				obj.like_usdt = data.like_usdt;
-				obj.list = data.back;
+				obj.like_rmb = data.all_rmb;
+				obj.like_usdt = data.all_usdt;
+				const arr = Object.keys(data.back);
+				console.log(arr);
+				let ar = [];
+				arr.forEach(e => {
+					ar.push(data.back[e]);
+				});
+				obj.list = ar;
 				uni.hideLoading();
 			});
 		},
@@ -158,9 +135,6 @@ export default {
 				success: function() {}
 			});
 		},
-		recharge() {
-			this.$refs.popup.open();
-		},
 		selectOne(options) {
 			this.money = options.name;
 			this.type = options.code;
@@ -168,24 +142,6 @@ export default {
 		useOutClickSide() {
 			this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions();
 		},
-		// pay(){
-		// 	let obj = this;
-		// 	recharge({
-		// 		num:obj.num,
-		// 		money_type:obj.type
-		// 	},obj.buyId).then(({ data }) => {
-		// 		console.log(data)
-		// 		obj.$api.msg(data.msg);
-		// 		obj.$refs.popup.close();
-		// 		obj.num='';
-		// 		obj.type = '';
-		// 		uni.navigateTo({
-		// 			url:'/pages/finance/recharge?LOGO='+data._address_qr+'&order_id='+data.order_id+'&ddress='+data.__money_address+'&id='+data.id
-		// 		})
-		// 	}).catch(e => {
-		// 		obj.$refs.popup.close();
-		// 	});
-		// },
 		close() {
 			this.$refs.popup.close();
 		},
@@ -235,7 +191,7 @@ export default {
 					'&way=' +
 					ls.way +
 					'&waypath=' +
-					waypath+
+					waypath +
 					'&less=' +
 					ls.less
 			});
@@ -253,6 +209,13 @@ page {
 		padding: 25rpx 40rpx;
 	}
 }
+.title {
+	font-size: 46rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: $font-color-dark;
+	margin-bottom: 30rpx;
+}
 .list-tips {
 	position: absolute;
 	right: 0;
@@ -333,7 +296,7 @@ page {
 				font-size: 27rpx;
 				font-weight: bold;
 				padding-left: 10rpx;
-				color: #FFFFFF;
+				color: #ffffff;
 			}
 		}
 	}
@@ -350,6 +313,16 @@ page {
 			font-size: 34rpx;
 			font-weight: 500;
 			color: #5771df;
+			.logo{
+				border-radius: 99rpx;
+				width:50rpx ;
+				height:50rpx ;
+			}
+			.name{
+				margin-left: 20rpx;
+				color: $font-color-dark;
+				font-weight: bold;
+			}
 		}
 	}
 	.cell-list {
@@ -425,5 +398,4 @@ page {
 	width: 100%;
 	height: 100%;
 }
-
 </style>

+ 2 - 2
pages/index/convert.vue

@@ -37,9 +37,9 @@ export default {
 	data() {
 		return {
 			index: 0, //当前选中的兑出币种
-			moneyType: [],
+			moneyType: [],//兑出币种类型
 			add: { LOGO: '', name: '' }, //兑入币种
-			pushMoney: '',
+			pushMoney: '',//要兑换的金额
 			lodingType: false, //判断是否已经载入币种分类分类数据
 			show: false
 		};

+ 0 - 339
pages/index/index.vue

@@ -51,62 +51,15 @@
 				<view class="submit" @click="buy()">预购</view>
 			</view>
 		</view>
-<<<<<<< HEAD
-
-		<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>
-=======
 		<u-popup v-model="show" mode="bottom" border-radius="40" height="868rpx" :closeable="true" close-icon="关闭"><view>出淤泥而不染,濯清涟而不妖</view></u-popup>
->>>>>>> 55401fd4b35f86aff3b25e611b15e4543f0fa312
 	</view>
 </template>
 <script>
 export default {
 	data() {
 		return {
-<<<<<<< HEAD
-			show: false, //支付数量弹窗控制
-			show1: false, //支付密码弹窗控制
-			value: 1,//购买数量
-			password:'',
-=======
 			show: false, //支付数量
 			show1: false //支付密码
->>>>>>> 55401fd4b35f86aff3b25e611b15e4543f0fa312
 		};
 	},
 	//页面加载即刻发生
@@ -118,29 +71,11 @@ export default {
 			uni.navigateTo({
 				url: url
 			});
-<<<<<<< HEAD
-		},
-		async loadDate() {},
-		buy() {
-			this.show = true;
-		},
-		valChange(e) {
-			console.log(this.value)
-		},
-		submit() {
-			this.show = false;
-			this.show1 = true;
-		},
-		cancel() {
-			this.show1 = false
-		},
-=======
 		},
 		async loadDate() {},
 		buy() {
 			this.show = true;
 		}
->>>>>>> 55401fd4b35f86aff3b25e611b15e4543f0fa312
 	}
 };
 </script>
@@ -149,48 +84,6 @@ export default {
 	height: auto;
 	min-height: 100%;
 	background-color: #ffffff;
-<<<<<<< HEAD
-	padding-bottom: var(--window-bottom);
-	.box-title {
-		position: relative;
-		z-index: 1;
-		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;
-
-				mar .navBox-item {
-					image {
-						width: 100%;
-						height: 100%;
-					}
-=======
 }
 .box-title {
 	position: relative;
@@ -230,48 +123,10 @@ export default {
 				image {
 					width: 100%;
 					height: 100%;
->>>>>>> 55401fd4b35f86aff3b25e611b15e4543f0fa312
-				}
-			}
-		}
-
-<<<<<<< HEAD
-			.navBox-right {
-				margin: 20rpx 0 0 -24rpx;
-
-				// margin: 20rpx 10rpx 5rpx 5rpx;
-				.navBox-item {
-					display: flex;
-					flex-direction: column;
-					align-items: center;
-
-					image {
-					}
 				}
 			}
 		}
 
-		.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;
-
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-
-				image {
-					height: 46rpx;
-					width: 48rpx;
-=======
 		.navBox-right {
 			margin: 20rpx 0 0 -24rpx;
 
@@ -282,82 +137,11 @@ export default {
 				align-items: center;
 
 				image {
->>>>>>> 55401fd4b35f86aff3b25e611b15e4543f0fa312
 				}
 			}
 		}
 	}
 
-<<<<<<< HEAD
-				#one {
-					font-size: 34rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #0f253a;
-				}
-
-				#two {
-					margin-left: 11rpx;
-					font-size: 26rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #6d7c88;
-				}
-
-				#three {
-					font-size: 26rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #ff4c4c;
-				}
-			}
-
-			.shopBox-between {
-				margin-top: 20rpx;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-
-				.number {
-					.number-left {
-						font-size: 40rpx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #44969d;
-					}
-
-					.number-right {
-						font-size: 24rpx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #44969d;
-					}
-				}
-
-				.quotient {
-					.quotient-children {
-						font-size: 24rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #6d7c88;
-					}
-				}
-			}
-
-			.forward {
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-
-				.forward-left {
-					font-size: 26rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #44969d;
-				}
-
-				.forward-right {
-=======
 	.shopBox {
 		padding: 0 30rpx;
 		margin-top: 45rpx;
@@ -427,135 +211,12 @@ export default {
 
 			.quotient {
 				.quotient-children {
->>>>>>> 55401fd4b35f86aff3b25e611b15e4543f0fa312
 					font-size: 24rpx;
 					font-family: PingFang SC;
 					font-weight: 500;
 					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;
 		}
 
 		.forward {

+ 1 - 1
pages/index/node.vue

@@ -334,5 +334,5 @@ page {
 	.psw-qd {
 		color: #5771df;
 	}
-}
+
 </style>