Browse Source

记住密码

hwq 4 years ago
parent
commit
254069e9e4

+ 7 - 0
api/finance.js

@@ -95,4 +95,11 @@ export function miner(data) {
 		method: 'post',
 		data
 	})
+}
+export function newMining(data) {
+	return request({
+		url: '/api/new_mining',
+		method: 'get',
+		data
+	})
 }

+ 1 - 1
pages.json

@@ -136,7 +136,7 @@
 		{
 			"path": "pages/finance/today",
 			"style": {
-				"navigationBarTitleText": "今日业绩",
+				"navigationBarTitleText": "业绩",
 				"navigationBarBackgroundColor":"#5771DF",
 				"navigationBarTextStyle": "white"
 			}

+ 3 - 1
pages/calculation/index.vue

@@ -106,7 +106,9 @@ export default {
 		this.loadData();
 	},
 	onShow() {
-		
+		let userInfo = uni.getStorageSync('userInfo') || '';
+		this.level = userInfo.level;
+		this.loadData();
 	},
 	//下拉刷新
 	onPullDownRefresh() {

+ 9 - 9
pages/calculation/myCalculation.vue

@@ -90,15 +90,15 @@ export default {
 						// 计算倒计时时间
 						obj.timeComputed(ar.mining_start_time * 1000, ar);
 					} else {
-						// 获取距离开始还需要多少时间
-						let arTime = ar.time.split(':');
-						let h = arTime[0];
-						let m = arTime[1];
-						let time = new Date();
-						// 设置时间
-						time.setHours(h, m, 0);
-						// 计算倒计时时间
-						obj.timeComputed(time.getTime(), ar);
+						// // 获取距离开始还需要多少时间
+						// let arTime = ar.time.split(':');
+						// let h = arTime[0];
+						// let m = arTime[1];
+						// let time = new Date();
+						// // 设置时间
+						// time.setHours(h, m, 0);
+						// // 计算倒计时时间
+						// obj.timeComputed(time.getTime(), ar);
 					}
 					
 					return e;

+ 24 - 15
pages/finance/allMiner.vue

@@ -27,20 +27,15 @@
 					</view>
 				</view>
 				<view class="nav flex" v-show="page != 1 || isLast">
-					<view class="next" @click="last" v-if="page != 1">
-						上一页
-					</view>
-					<view class="next" v-else>
-						已经是第一页了
-					</view>
-					<view class="next" v-if="isLast" @click="next">
-						下一页
-					</view>
-					<view class="next" v-else>
-						已经是最后一页了
+						<view class="next" @click="last" >
+							上一页
+						</view>
+						
+						<view class="next"  @click="next">
+							下一页
+						</view>
 					</view>
 				</view>
-			</view>
 			<view class="empty-box" v-show="list.length === 0"><empty></empty></view>
 		</view>
 	</view>
@@ -107,16 +102,30 @@ export default {
 			});
 		},
 		next(){
+			let that = this;
 			this.page = this.page + 1;
-			this.loadData();
 			this.loadDataNext();
+			if(this.isLast){
+				
+				this.loadData();
+			}else{
+				this.page = this.page - 1;
+				that.$api.msg('已经是最后一页了')
+			}
+			
+			
+			
 		},
 		last(){
+			let that = this;
 			if(this.page != 1){
 				this.page = this.page - 1;
+				this.loadData();
+				this.loadDataNext();
+			}else{
+				that.$api.msg('已经是第一页了')
 			}
-			this.loadData();
-			this.loadDataNext();
+			
 		}
 	}
 }

+ 33 - 6
pages/finance/details.vue

@@ -105,7 +105,7 @@
 				logo:'',
 				price:'',
 				mark:'',
-				charge: '',
+				charge: 0,
 				
 				_address_qr:'',
 				__money_address:'',
@@ -116,21 +116,28 @@
 				before: '',
 				number: '',
 				pm:'',
+				way: [],
+				address: '',
+				waypath: '',
 			};
 		},
 		onLoad(option) {
-			console.log(option,'1111');
+			console.log(option,"detail-option")
+			this.waypath = option.waypath
+			this.way = option.way
+			console.log("detail",this.way)
 			this.code = option.code;
 			this.logo = option.logo;
 			this.name = option.name;
 			this.price = option.price;
-			
+			this.charge = option.charge;
+			this.address = option.address
+			console.log(this.address,"detail")
 			this._address_qr = option._address_qr;
 			this.__money_address = option.__money_address;
 			this.mark = option.mark;
 			this.ids = option.ids;
 			this.keysAddr = option.keysAddr;
-			this.charge = option.charge;
 			this.moneyType();
 			this.loadData();
 		},
@@ -197,8 +204,28 @@
 			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+'&charge='+this.charge
-				})
+					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 + 
+						'&address=' + this.address + 
+						'&way=' + this.way + 
+					'&waypath=' + this.waypath
+				});
 				// this.$refs.popup.open();
 			},
 			close() {

+ 198 - 153
pages/finance/index.vue

@@ -1,64 +1,67 @@
 <template>
 	<view class="container">
-		<view class="list-box">
-			<view class="info-box">
-				<view class="flex" v-show="show == true">
-					<view class="info">
-						<view class="list-title">总资产合计(USDT)</view>
-						<view class="list-name clamp">{{like_usdt*1}}</view>
-						<view class="ustd">≈ {{like_rmb*1}}RMB</view>
+		<view>
+			<view class="list-box">
+				<view class="info-box">
+					<view class="flex" v-show="show == true">
+						<view class="info">
+							<view class="list-title">总资产合计(USDT)</view>
+							<view class="list-name clamp">{{ like_usdt * 1 }}</view>
+							<view class="ustd">≈ {{ like_rmb * 1 }}RMB</view>
+						</view>
+						<image class="image" src="../../static/img/img29.png" @click="showPick(false)"></image>
 					</view>
-					<image class="image" src="../../static/img/img29.png" @click="showPick(false)"></image>
-				</view>
-				<view class="flex" v-show="show == false">
-					<view class="info">
-						<view class="list-title">总资产合计(USDT)</view>
-						<view class="list-name clamp">****</view>
-						<view class="ustd">≈ ****RMB</view>
+					<view class="flex" v-show="show == false">
+						<view class="info">
+							<view class="list-title">总资产合计(USDT)</view>
+							<view class="list-name clamp">****</view>
+							<view class="ustd">≈ ****RMB</view>
+						</view>
+						<image class="image" src="../../static/img/img43.png" @click="showPick(true)"></image>
 					</view>
-					<image class="image" src="../../static/img/img43.png" @click="showPick(true)"></image>
-				</view>
-			</view>
-			<view class="list-tpl flex">
-				<view class="tpl" @click="navTo('/pages/finance/transfer')">
-					<image class="zhuanz" src="../../static/img/img10.png"></image>
-					<view class="tpl-name">转账</view>
 				</view>
-				<view class="tpl" @click="navTo('/pages/finance/recharge')"><!-- @click="recharge" -->
-					<image src="../../static/img/img08.png"></image>
-					<view class="tpl-name">充币</view>
-				</view>
-				<view class="tpl" @click="navTo('/pages/finance/withdraw')">
-					<image src="../../static/img/img09.png"></image>
-					<view class="tpl-name">提币</view>
+				<view class="list-tpl flex">
+					<view class="tpl" @click="navTo('/pages/finance/transfer')">
+						<image class="zhuanz" src="../../static/img/img10.png"></image>
+						<view class="tpl-name">转账</view>
+					</view>
+					<view class="tpl" @click="navTo('/pages/finance/recharge')">
+						<!-- @click="recharge" -->
+						<image src="../../static/img/img08.png"></image>
+						<view class="tpl-name">充币</view>
+					</view>
+					<view class="tpl" @click="navTo('/pages/finance/withdraw')">
+						<image src="../../static/img/img09.png"></image>
+						<view class="tpl-name">提币</view>
+					</view>
 				</view>
-			</view>
-			<!-- <view class="list-tips flex_item">
+
+				<!-- <view class="list-tips flex_item">
 				<image src="../../static/img/img07.png"></image>
 				<view>资产正在保护中</view>
 			</view> -->
-		</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>
-				<image src="../../static/img/img16.png"></image>
 			</view>
-			<view class="flex cell-list">
-				<view class="cell-tpl tips">
-					<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 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>
 				</view>
-				<view class="cell-tpl tip-box">
-					<view class="name">折合(USDT)</view>
-					<view class="tpl clamp">{{ls.usdt*1}}</view>
+				<view class="flex cell-list">
+					<view class="cell-tpl tips">
+						<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>
-		</view>
-		<!-- <uni-popup ref="popup" type="center">
+			<!-- <uni-popup ref="popup" type="center">
 			<view class="popup">
 				<view class="cancel flex" @click="close">
 					<view></view>
@@ -75,11 +78,12 @@
 				</view>
 			</view>
 		</uni-popup> -->
+		</view>
 	</view>
 </template>
 <script>
 import { moneyType } from '@/api/index.js';
-import { recharge,wallet } from '@/api/finance.js';
+import { recharge, wallet } from '@/api/finance.js';
 import easyselect from '@/components/easy-select/easy-select.vue';
 export default {
 	components: {
@@ -87,42 +91,43 @@ export default {
 	},
 	data() {
 		return {
-			num:'',
-			money:'',
-			type:'',
-			moneyTypeList:[],
-			list:'',
-			show:true,
-			like_rmb:'',
-			like_usdt:'',
+			num: '',
+			money: '',
+			type: '',
+			moneyTypeList: [],
+			list: '',
+			show: true,
+			like_rmb: '',
+			like_usdt: '',
 			wallet: '',
 		};
 	},
-	onLoad(option){
+	onLoad(option) {
 		this.moneyType();
 		this.loadData();
 	},
 	onShow() {
+		this.moneyType();
+		this.loadData();
 		let show = uni.getStorageSync('showPick');
-		if(show == false){
+		if (show == false) {
 			this.show = false;
 		}
-		if(show == true){
+		if (show == true) {
 			this.show = true;
 		}
-		
 	},
 	//下拉刷新
 	onPullDownRefresh() {
 		this.loadData();
 		this.moneyType();
-		setTimeout(function () {
+		setTimeout(function() {
 			uni.stopPullDownRefresh();
 		}, 1000);
 	},
 	methods: {
 		// 所有币种
-		async moneyType(){
+		async moneyType() {
 			let obj = this;
 			moneyType({}).then(({ data }) => {
 				obj.moneyTypeList = data;
@@ -131,32 +136,35 @@ export default {
 		// 请求载入数据
 		loadData() {
 			let obj = this;
+			uni.showLoading({
+				title:'加载中'
+			})
+			obj.loading = true;
 			wallet({}).then(({ data }) => {
-				console.log(data)
+				console.log(data);
 				obj.like_rmb = data.like_rmb;
 				obj.like_usdt = data.like_usdt;
 				obj.list = data.back;
+				uni.hideLoading();
 			});
 		},
-		showPick(item){
+		showPick(item) {
 			this.show = item;
 			uni.setStorage({
-			    key: 'showPick',
-			    data: item,
-			    success: function () {
-				   
-			    }
+				key: 'showPick',
+				data: item,
+				success: function() {}
 			});
 		},
-		recharge(){
+		recharge() {
 			this.$refs.popup.open();
 		},
-		 selectOne(options) {
+		selectOne(options) {
 			this.money = options.name;
 			this.type = options.code;
 		},
 		useOutClickSide() {
-			this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions()
+			this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions();
 		},
 		// pay(){
 		// 	let obj = this;
@@ -184,17 +192,50 @@ export default {
 				url
 			});
 		},
-		toDateils(ls,index){
-			console.log(ls,88)
-			this.moneyTypeList.forEach((e,ind)=>{
-				if(e.code === ls.name){
-					this.wallet = e.wallet;
-				}
-			})
+		toDateils(ls, index) {
+			console.log(ls, 88);
+			let way = ls.way.split(',');
+			console.log(way[0], 'money-----------', ls.money);
+			let path = 'address_' + way[0];
+			console.log(path);
+			console.log(path === 'address_TRC20');
+			let address = ls.money[path];
+			let wayaddress = {};
+			way.forEach(item => {
+				let path = 'address_' + item;
+				wayaddress[item] = ls.money[path];
+			});
+			let waypath = JSON.stringify(wayaddress);
 			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+'&charge='+ls.charge
-			})
-		},
+				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 +
+					'&address=' +
+					address +
+					'&way=' +
+					ls.way +
+					'&waypath=' +
+					waypath
+			});
+		}
 	}
 };
 </script>
@@ -208,67 +249,67 @@ page {
 		padding: 25rpx 40rpx;
 	}
 }
-.list-tips{
+.list-tips {
 	position: absolute;
 	right: 0;
 	top: 25rpx;
 	font-size: 24rpx;
-	background-color: #F4CA1C;
+	background-color: #f4ca1c;
 	padding: 14rpx 27rpx;
 	border-bottom-left-radius: 50rpx;
 	border-top-left-radius: 50rpx;
-	color: #5771DF;
-	image{
+	color: #5771df;
+	image {
 		width: 30rpx;
 		height: 31rpx;
 		margin-right: 12rpx;
 	}
 }
-.list-box{
-	background: linear-gradient(234.593deg, #0ADFFF  0%,#0171FD 100%);
+.list-box {
+	background: linear-gradient(234.593deg, #0adfff 0%, #0171fd 100%);
 	position: relative;
-	color: #FFFFFF;
+	color: #ffffff;
 	border-radius: 20rpx;
 	margin-bottom: 60rpx;
-	.info-box{
+	.info-box {
 		padding: 31rpx 43rpx;
-		.image{
+		.image {
 			width: 44rpx !important;
 			height: 30rpx !important;
 		}
-		.info{
+		.info {
 			width: 80%;
-			.list-title{
+			.list-title {
 				font-size: 30rpx;
 				font-weight: 500;
-				color: #FFFFFF;
+				color: #ffffff;
 			}
-			.list-name{
-				width:100%;
+			.list-name {
+				width: 100%;
 				font-size: 64rpx;
 				font-weight: bold;
 				padding: 25rpx 0rpx;
 			}
-			.ustd{
+			.ustd {
 				font-size: 30rpx;
 				font-weight: normal;
 			}
 		}
 	}
-	.list-tpl{
+	.list-tpl {
 		padding: 30rpx 100rpx;
 		background-color: #064285;
-		.tpl{
+		.tpl {
 			text-align: center;
-			image{
+			image {
 				width: 45rpx;
 				height: 42rpx;
 			}
-			.zhuanz{
+			.zhuanz {
 				width: 45rpx;
 				height: 42rpx;
 			}
-			.tpl-name{
+			.tpl-name {
 				font-size: 27rpx;
 				font-weight: bold;
 				padding-left: 10rpx;
@@ -276,87 +317,91 @@ page {
 		}
 	}
 }
-.list-cell{
+.list-cell {
 	padding-bottom: 58rpx;
-	.cell{
+	.cell {
 		padding-bottom: 31rpx;
-		image{
+		image {
 			width: 12rpx;
 			height: 24rpx;
 		}
-		.cell-title{
+		.cell-title {
 			font-size: 34rpx;
 			font-weight: 500;
-			color: #5771DF;
+			color: #5771df;
 		}
 	}
-	.cell-list{
+	.cell-list {
 		width: 100%;
-		.cell-tpl{
+		.cell-tpl {
 			text-align: left;
-			.name{
+			.name {
 				font-size: 24rpx;
 				font-weight: 500;
 				color: #999999;
 				padding-bottom: 15rpx;
 			}
 		}
-		.tip-box{
+		.tip-box {
 			text-align: right;
 			width: 40%;
 		}
-		.tip-tpl{
+		.tip-tpl {
 			text-align: center;
 			width: 30%;
 		}
-		.tips{
+		.tips {
 			width: 30%;
 		}
 	}
 }
-	//弹窗
-	.popup{
-		background-color: #FFFFFF;
-		border-radius: 25rpx;
-		font-size: 30rpx;
-		.cancel{
-			text-align: center;
+//弹窗
+.popup {
+	background-color: #ffffff;
+	border-radius: 25rpx;
+	font-size: 30rpx;
+	.cancel {
+		text-align: center;
+		width: 100%;
+		line-height: 60rpx;
+		.tip {
+			background-color: #5771df;
+			color: #ffffff;
+			width: 70rpx;
+			height: 70rpx;
+			border-top-right-radius: 25rpx;
+		}
+	}
+	.list-boxs {
+		padding: 0rpx 80rpx;
+		.password {
+			padding: 50rpx 0rpx;
 			width: 100%;
-			line-height: 60rpx;
-			.tip{
-				background-color: #5771DF;
-				color: #FFFFFF;
-				width:70rpx;
-				height: 70rpx;
-				border-top-right-radius:25rpx ;
+			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;
 			}
 		}
-		.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;
-				}
-			}
-			.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;
-				}
+		.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;
 			}
 		}
 	}
+}
+.loading {
+	width: 100%;
+	height: 100%;
+}
 </style>

+ 56 - 19
pages/finance/recharge.vue

@@ -18,15 +18,17 @@
 		</view>
 		
 		<view class="image-box" v-if="charge != 0">
-			<!-- <view class="item flex"  v-for="(item,index) in wayList" :key="index">
-				<view class="way" @click="chose(item)">{{item}}</view>
-			</view> -->
 			<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>
 				</view>
 			</view>
+			<!-- <view class="way-wrapper">
+				<view class="way" v-for="item in way" :key="item" @click="goway(item)">
+					{{item}}
+				</view>
+			</view> -->
 			<tki-qrcode
 				:cid="cid"
 				ref="qrcode"
@@ -107,7 +109,7 @@
 		},
 		data() {
 			return {
-				wayList: [],
+				way: [],
 				moneyTypeList: [],
 				charge: 0,
 				logo: '',
@@ -140,29 +142,30 @@
 				onval: true,
 				loadMake: true,
 				usingComponents: true,
+				wayAddress: []
 			};
 		},
 		onLoad(option) {
 			console.log(option)
 			if (option.name) {
+				this.way = option.way.split(",")
+				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.address
 				this.ids = option.ids;
 				this.addr = option.keysAddr;
-				if(this.addr == null || this.addr == ''){
-					this.showBtn = true
+				this.wayAddress = JSON.parse(option.waypath)
+				if (this.addr == null || this.addr == '') {
+					this.showBtn = true;
 				}
 			}
 			this.moneyType();
-			console.log(this.wayList)
 			
 		},
 		onShow() {
@@ -176,18 +179,21 @@
 					data
 				}) => {
 					obj.moneyTypeList = data;
-					obj.address = obj.moneyTypeList[1].wallet.address_TRC20;
-					obj.wayList = obj.moneyTypeList[0].way.split(',');
 					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;
+						if(obj.way[0] === "NO"){
+							obj.address = ''
+						}else {
+							obj.address = obj.moneyTypeList[0].wallet['address'+obj.way[0]]
+						}
+						
 						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
@@ -284,14 +290,22 @@
 				this.name = options.name;
 				this.code = options.code;
 				this.money = options.price;
-				this.address = options.wallet.address_TRC20;
+				// this.address = options.wallet.address_TRC20;
 				this.qr = options._address_qr;
 				this.qr = options._address_qr;
 				this.mark = options.mark;
 				this.addr = options.wallet.address;
 				this.ids = options.wallet.id;
-				this.wayList = options.way.split(',');
-				console.log(this.wayList)
+				this.way = options.way.split(',');
+				if(this.way[0] === "NO"){
+					this.wayAddress = []
+				}else {
+					this.way.forEach((item)=> {
+						this.wayAddress[item] = options.wallet['address_'+item]
+					})
+					this.address = this.wayAddress[this.way[0]]
+					console.log(this.wayAddress)
+				}
 			},
 			useOutClickSide() {
 				this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions()
@@ -309,8 +323,10 @@
 			creatQrcode() {
 				this.$refs.qrcode._makeCode();
 			},
-			chose(item) {
-				
+			goway(data) {
+				this.address = this.wayAddress[data],
+				console.log(this.wayAddress[data])
+				// this.address = 'www.baudu.com'
 			}
 		}
 	};
@@ -565,4 +581,25 @@
 		font-size: 100rpx;
 		text-align: center;
 	}
+	.way-wrapper {
+		width: 90%;
+		padding: 0 5%;
+		display: flex;
+		height: 40rpx;
+		margin-bottom: 60rpx;
+		justify-content: start;
+		.way {
+			width: 120rpx;
+			height: 75rpx;
+			line-height: 75rpx;
+			text-align: center;
+			border: 1px solid #7c90e3;
+			border-radius: 10rpx 10rpx 10rpx 10rpx;
+			color: #7c90e3;
+			background-color: #eff2ff;
+			font-size: 36rpx;
+			font-weight: bold;
+			margin-right: 30rpx;
+		}
+	}
 </style>

+ 93 - 36
pages/finance/today.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<view class="list-box flex">
 			<view class="list-tpl">
-				<view class="num">{{data.count || 0}}</view>
+				<view class="num">{{count || 0}}</view>
 				<view class="name">新增会员数</view>
 			</view>
 			<view class="list-tpl">
@@ -14,38 +14,43 @@
 			<view class="cell-name flex">
 				<view class="title">成员信息</view>
 				<view class="title-box flex">
-					<view class="title">等待算力</view>
-					<view class="title">今日新增</view>
-					<!-- <view class="title">等级</view> -->
+					<view class="title">状态</view>
+					<view class="title">算力</view>
+					<view class="title">购买时间</view>
 				</view>
 			</view>
 			<view class="cell-box flex" v-for="(ls,index) in list" :key='index'>
 				<view class="cell-tit flex_item">
-					<image :src="ls.avatar"></image>
+					<image :src="ls._user.avatar"></image>
 					<view class="tit-box">
 						<view class="tit-tpl clamp">{{ls.nickname}}</view>
 						<view class="tit-tip">{{ls.phone}}</view>
 					</view>
 				</view>
 				<view class="flex num-box">
-					<view class="num clamp">{{ls.wait_mining}}T</view>
-					<view class="num clamp">{{ls.today_mining}}T</view>
-					<!-- <view class="level">V{{ls.level}}</view> -->
+					<view class="num clamp">{{ls.status == 0 ? '准备中' : ls.status ==  1 ? '挖矿中' : '已到期'}}</view>
+					<view class="num clamp">{{ls.num}}T</view>
+					<view class="date">
+						<view class="year">
+							{{ ls.year }}
+						</view>
+						<view class="">
+							{{ ls.month }}-{{ ls.day }}
+						</view>
+						<view class="">
+							{{ ls.today }}
+						</view>
+					</view>
 				</view>
 			</view>
 			<view class="nav flex" v-show="page != 1 || isLast">
-				<view class="next" @click="last" v-if="page != 1">
+				<view class="next" @click="last" >
 					上一页
 				</view>
-				<view class="next" v-else>
-					已经是第一页了
-				</view>
-				<view class="next" v-if="isLast" @click="next">
+				
+				<view class="next"  @click="next">
 					下一页
 				</view>
-				<view class="next" v-else>
-					已经是最后一页了
-				</view>
 			</view>
 		</view>
 		<view class="empty-box" v-show="list.length === 0"><empty></empty></view>
@@ -53,7 +58,7 @@
 </template>
 
 <script>
-import { miner } from '@/api/finance.js';
+import { newMining,miner } from '@/api/finance.js';
 import empty from '@/components/empty';
 export default {
 	components: {
@@ -67,38 +72,53 @@ export default {
 			list:'',
 			isLast: true,
 			people_num: '',
+			count: '',
 		};
 	},
 	onLoad(option){
 		this.people_num = option.num
 		this.loadData();
 		this.loadDataNext();
+		this.getCount();
 	},
 	onShow() {
+		
 	},
 	methods: {
+		async getCount() {
+			let obj = this;
+			miner({new: 1}).then(e => {
+				obj.count = e.data.count;
+			})
+		},
 		// 请求载入数据
 		async loadData() {
 			let obj = this;
-			miner({
+			newMining({
 				page: obj.page,
 				limit: obj.limit,
-				new: 1,
 			}).then(({ data }) => {
 				obj.data = data;
-				obj.list = data.list;
-			   console.log(obj.list)
+				obj.list = data.data;
+				obj.list.forEach(e => {
+					let date = e._pay_time.split(' ');
+					e.today = date[1];
+					let all = date[0].split('-');
+					e.year = all[0];
+					e.month = all[1];
+					e.day = all[2];
+				})
+				console.log(obj.list);
 			});
 		},
 		async loadDataNext() {
 			let obj = this;
 			console.log(obj.page)
-			miner({
+			newMining({
 				page: obj.page + 1,
 				limit: obj.limit,
-				new: 1,
 			}).then(({ data }) => {
-				if(data.list.length === 0){
+				if(data.data.length === 0){
 					obj.isLast = false;
 				}else{
 					obj.isLast = true;
@@ -111,16 +131,30 @@ export default {
 			})
 		},
 		next(){
+			let that = this;
 			this.page = this.page + 1;
-			this.loadData();
 			this.loadDataNext();
+			if(this.isLast){
+				
+				this.loadData();
+			}else{
+				this.page = this.page - 1;
+				that.$api.msg('已经是最后一页了')
+			}
+			
+			
+			
 		},
 		last(){
+			let that = this;
 			if(this.page != 1){
 				this.page = this.page - 1;
+				this.loadData();
+				this.loadDataNext();
+			}else{
+				that.$api.msg('已经是第一页了')
 			}
-			this.loadData();
-			this.loadDataNext();
+			
 		}
 	}
 };
@@ -168,17 +202,33 @@ page {
 	}
 }
 .list-cell{
-		padding: 40rpx 25rpx;
+		padding: 40rpx 30rpx;
 		.cell-name{
-			padding:50rpx 50rpx;
+			padding: 40rpx 0;
+			.title {
+				text-align: center;
+				width: 40%;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
 			.title-box{
 				width: 60%;
+				.title {
+					text-align: center;
+					width: 33%;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+				}
 			}
 		}
 		.cell-box{
 			margin-bottom: 94rpx;
 			.cell-tit{
-				width: 36%;
+				width: 40%;
 				image{
 					width: 80rpx;
 					height: 80rpx;
@@ -201,16 +251,23 @@ page {
 				}
 			}
 			.num-box{
-				width: 64%;
+				width: 60%;
 				.num{
-					width: 50%;
+					width: 33%;
 					text-align: center;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
 				}
-				.level{
-					background-color: #FED82F;
-					border-radius: 25rpx;
-					padding: 8rpx 50rpx;
+				.date{
+					width: 33%;
+					padding-left: 10rpx;
+					text-align: left;
 					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
 				}
 			}
 		}

+ 76 - 20
pages/public/login.vue

@@ -10,9 +10,21 @@
 			<view class="username">密码</view>
 			<input class="input-box" type="password" v-model="password" placeholder="请输入密码" />
 		</view>
-		<view class="forget" @click="navTo('/pages/public/forget')">忘记密码</view>
+
+		<view class="forget flex">
+			<view class="mui-checkbox ">
+				<!-- <input id="chkRem" type="checkbox" checked="checked" class="RememberCheck"  @change="checkboxChange" /> -->
+				<checkbox-group @change="checkboxChange">
+					<checkbox id="chkRem" type="checkbox" :checked="rememberPsw" @tap="rememberPsw = !rememberPsw" style="transform:scale(0.8)" >记住密码</checkbox>
+				</checkbox-group>
+			</view>
+			<text @click="navTo('/pages/public/forget')">忘记密码</text>
+		</view>
 		<view class="login" @click="toLogin">登录</view>
-		<view class="login-tip">还没有账号?<text class="register" @click="navTo('/pages/public/register')">立即注册</text></view>
+		<view class="login-tip">
+			还没有账号?
+			<text class="register" @click="navTo('/pages/public/register')">立即注册</text>
+		</view>
 	</view>
 </template>
 
@@ -25,9 +37,25 @@ export default {
 		return {
 			phone: '',
 			password: '',
+			rememberPsw: true
 		};
 	},
 	onLoad() {},
+	mounted() {
+		let that = this;
+		//缓存的密码
+		const HCuname = uni.getStorageSync('HCuname');
+		//缓存的密码
+		const HCpassw = uni.getStorageSync('HCpassw');
+		//有缓存就赋值给文本没有就清空
+		if (HCuname && HCpassw) {
+			that.phone = HCuname;
+			that.password = HCpassw;
+		} else {
+			that.phone = '';
+			that.password = '';
+		}
+	},
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'login']),
 		//登录
@@ -47,14 +75,24 @@ export default {
 				password: obj.password
 			})
 				.then(function(e) {
+					if (obj.rememberPsw) {
+						uni.setStorageSync('HCuname', obj.phone);
+						uni.setStorageSync('HCpassw', obj.password);
+					} else {
+						uni.removeStorageSync('HCuname');
+						uni.removeStorageSync('HCpassw');
+						obj.phone = '';
+						obj.password = '';
+					}
 					uni.setStorageSync('token', e.data.token);
 					getUserInfo({}).then(e => {
 						obj.login();
 						// 保存返回用户数据
 						obj.setUserInfo(e.data);
+
 						uni.switchTab({
-							url:'/pages/index/index'
-						})
+							url: '/pages/index/index'
+						});
 					});
 				})
 				.catch(function(e) {
@@ -69,6 +107,20 @@ export default {
 		// 后退
 		navBack() {
 			uni.navigateBack();
+		},
+		checkboxChange: function(e) {
+			console.log(e.detail.value.length);
+			if (e.detail.value.length == 1) {
+				//获取缓存的账号
+				uni.getStorageSync('HCuname', this.phone);
+				uni.getStorageSync('HCpassw', this.password);
+			} else {
+				uni.removeStorageSync('HCuname');
+				uni.removeStorageSync('HCpassw');
+			}
+		},
+		rember(){
+			this.rememberPsw = ! this.rememberPsw
 		}
 	}
 };
@@ -76,13 +128,13 @@ export default {
 
 <style lang="scss">
 page {
-		min-height: 100%;
-		background-color: #ffffff;
-		.container {
-			width: 100%;
-			padding: 30% 60rpx;
-		}
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+		padding: 30% 60rpx;
 	}
+}
 .loginTitle {
 	font-weight: bold;
 	color: #333333;
@@ -95,38 +147,43 @@ page {
 	font-size: 34rpx;
 	padding-bottom: 34rpx;
 }
-.login-box{
+.login-box {
 	padding-top: 90rpx;
-	.username{
+	.username {
 		padding-bottom: 30rpx;
 		font-weight: 500;
 		color: #333333;
 		font-size: 32rpx;
 	}
 }
-.forget{
+.forget {
 	text-align: right;
 	margin: 70rpx 0rpx;
 	font-weight: 500;
 	color: #333333;
 	font-size: 28rpx;
+	.mui-checkbox{
+		font-weight: 500;
+		color: #333333;
+		font-size: 35rpx;
+	}
 }
-.login{
-	background-color: #5771DF;
+.login {
+	background-color: #5771df;
 	margin-top: 20rpx;
-	color: #FFFFFF;
+	color: #ffffff;
 	text-align: center;
 	padding: 26rpx 0rpx;
 	border-radius: 50rpx;
 }
-.login-tip{
+.login-tip {
 	padding: 60rpx 0rpx;
 	text-align: center;
 	font-weight: 500;
 	color: #333333;
 	font-size: 28rpx;
-	.register{
-		color: #5771DF;
+	.register {
+		color: #5771df;
 	}
 }
 // /* input 样式 */
@@ -137,5 +194,4 @@ page {
 // .placeholder {
 // 	color: #ffffff;
 // }
-
 </style>

+ 23 - 16
pages/user/myTeam.vue

@@ -50,20 +50,15 @@
 					</view>
 				</view>
 				<view class="nav flex" v-show="page != 1 || isLast">
-					<view class="next" @click="last" v-if="page != 1">
-						上一页
-					</view>
-					<view class="next" v-else>
-						已经是第一页了
-					</view>
-					<view class="next" v-if="isLast" @click="next">
-						下一页
-					</view>
-					<view class="next" v-else>
-						已经是最后一页了
+						<view class="next" @click="last" >
+							上一页
+						</view>
+						
+						<view class="next"  @click="next">
+							下一页
+						</view>
 					</view>
 				</view>
-			</view>
 			<view class="empty-box" v-show="list.length === 0"><empty></empty></view>
 		</view>
 	</view>
@@ -130,18 +125,30 @@ export default {
 			})
 		},
 		next(){
+			let that = this;
 			this.page = this.page + 1;
-			this.loadData();
 			this.loadDataNext();
-			console.log(this.page)
+			if(this.isLast){
+				
+				this.loadData();
+			}else{
+				this.page = this.page - 1;
+				that.$api.msg('已经是最后一页了')
+			}
+			
+			
 			
 		},
 		last(){
+			let that = this;
 			if(this.page != 1){
 				this.page = this.page - 1;
+				this.loadData();
+				this.loadDataNext();
+			}else{
+				that.$api.msg('已经是第一页了')
 			}
-			this.loadData();
-			this.loadDataNext();
+			
 		}
 	}
 };

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/manifest.json


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff suppressed because it is too large
+ 334 - 288
unpackage/dist/dev/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


BIN
unpackage/dist/dev/app-plus/static/img/jiazai.gif


Some files were not shown because too many files changed in this diff