xuhaolan 3 jaren geleden
bovenliggende
commit
3e2106c7db

+ 2 - 2
api/calculation.js

@@ -16,9 +16,9 @@ export function buyMining(data,id) {
 		data
 	});
 }
-export function charge(data,id){
+export function charge(data){
 	return request({
-		url:'/api/mining/charge/'+id,
+		url:'/api/mining/charge',
 		method:'post',
 		data
 	})

+ 8 - 0
api/user.js

@@ -18,6 +18,14 @@ export function getUser(data) {
 		data
 	});
 }
+//电费
+export function charge(data){
+	return request({
+		method:'get',
+		data,
+		url:'/api/electric/list'
+	})
+}
 //推荐人
 export function spread_people(data) {
 	return request({

+ 2 - 2
manifest.json

@@ -4,8 +4,8 @@
     // __UNI__6FC8B70
     // "appid" : "__UNI__6FC8B70",
     "description" : "",
-    "versionName" : "1.0.6",
-    "versionCode" : 106,
+    "versionName" : "1.0.7",
+    "versionCode" : 107,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 37 - 22
pages.json

@@ -1,6 +1,5 @@
 {
-	"pages": [
-		{
+	"pages": [{
 			"path": "pages/public/login",
 			"style": {
 				"navigationBarTitleText": "登录",
@@ -16,7 +15,7 @@
 			"style": {
 				"navigationBarTitleText": ""
 			}
-		}, 
+		},
 		{
 			"path": "pages/public/forget",
 			"style": {
@@ -26,12 +25,12 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTextStyle":"black",
+				"navigationBarTextStyle": "black",
 				"navigationBarTitleText": "",
 				"enablePullDownRefresh": true,
-				"onReachBottomDistance":50,
+				"onReachBottomDistance": 50,
 				"app-plus": {
-					"titleNView":false
+					"titleNView": false
 				}
 			}
 		},
@@ -70,7 +69,7 @@
 			"style": {
 				"navigationBarTitleText": "算力",
 				"enablePullDownRefresh": true
-				
+
 			}
 		},
 		{
@@ -78,7 +77,7 @@
 			"style": {
 				"navigationBarTitleText": "平台介绍",
 				"enablePullDownRefresh": true
-				
+
 			}
 		},
 		{
@@ -98,7 +97,7 @@
 			"style": {
 				// "navigationStyle": "custom",
 				"navigationBarTitleText": "商品详情",
-				"navigationBarBackgroundColor":"#FFFFFF",
+				"navigationBarBackgroundColor": "#FFFFFF",
 				// "navigationBarTextStyle":"",
 				"navigationBarTextStyle": "black"
 			}
@@ -152,6 +151,12 @@
 				"navigationBarTitleText": "充币"
 			}
 		},
+		{
+			"path": "pages/user/recharge",
+			"style": {
+				"navigationBarTitleText": "充值电费"
+			}
+		},
 		{
 			"path": "pages/finance/details",
 			"style": {
@@ -162,7 +167,7 @@
 			"path": "pages/finance/transfer",
 			"style": {
 				"navigationBarTitleText": "转账",
-				"navigationBarBackgroundColor":"#141E47",
+				"navigationBarBackgroundColor": "#141E47",
 				"navigationBarTextStyle": "white"
 			}
 		},
@@ -200,7 +205,7 @@
 			"path": "pages/user/myTeam",
 			"style": {
 				"navigationBarTitleText": "我的社区",
-				"navigationBarBackgroundColor":"#141E47",
+				"navigationBarBackgroundColor": "#141E47",
 				"navigationBarTextStyle": "white"
 			}
 		},
@@ -219,7 +224,7 @@
 		{
 			"path": "pages/user/revenue",
 			"style": {
-				"navigationBarTitleText": "算力收益"
+				"navigationBarTitleText": "矿机收益"
 			}
 		},
 		{
@@ -253,17 +258,27 @@
 			"style": {
 				"navigationBarTitleText": "矿机列表"
 			}
+		}, {
+			"path": "pages/index/shoppingDetails",
+
+			"style": {
+				"navigationBarTitleText": "商品详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/charge",
+			"style": {
+				"navigationBarTitleText": "电费",
+				"enablePullDownRefresh": false,
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+
+
 		}
-	    ,{
-            "path" : "pages/index/shoppingDetails",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "商品详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",

+ 11 - 10
pages/calculation/myCalculation.vue

@@ -44,9 +44,9 @@
 				<view class="item-name">购买时间</view>
 				<view class="item-val">{{ls._pay_time}}</view>
 			</view>
-			<view class="dianfei" @click="getDf(ls.electric_price*30,ls.id)">
+			<!-- <view class="dianfei" @click="getDf(ls.electric_price*30)">
 				支付电费
-			</view>
+			</view> -->
 
 		</view>
 		<uni-popup ref="popup" type="center">
@@ -192,12 +192,11 @@
 					return
 				}
 				obj.isHiden = true
-				console.log(obj.id ,obj.num,obj.password,'我是你爹');
+				console.log(obj.id ,'131',obj.num,'12',obj.password);
 				charge({
-							
-							trade_psw: obj.password
-						},
-						obj.id
+							trade_psw: obj.password,
+							num:obj.dianfei
+						}
 					)
 					.then(data => {
 						obj.$api.msg(data.msg);
@@ -231,10 +230,11 @@
 				this.$refs.popup.close();
 				this.isHiden = false
 			},
-			getDf(dianfei,id) {
+			
+			getDf(dianfei) {
 				this.$refs.popup.open();
-				this.dianfei = dianfei,
-				this.id = id
+				this.dianfei = dianfei
+				// this.id = id
 			},
 			close() {
 				this.$refs.popup.close();
@@ -483,6 +483,7 @@
 		.item {
 			display: flex;
 			justify-content: space-between;
+			align-items: baseline;
 
 			.item-val {
 				font-weight: bold;

+ 2 - 1
pages/index/index.vue

@@ -77,7 +77,7 @@
 						</view>
 					</view>
 					<view class="title-right">
-						单价:<text>{{item.cost_money*1/item.step}}  </text>{{item.cost_money_type}}/T
+						单价:<text>{{(item.cost_money*1/item.step).toFixed(3)}}  </text>{{item.cost_money_type}}/T
 					</view>
 				</view>
 				<view class="cpContent">
@@ -195,6 +195,7 @@
 
 
 			async loadDatass() {
+				console.trace()
 				let obj = this;
 				uni.showLoading({
 					title: '加载中...'

+ 5 - 5
pages/public/register.vue

@@ -80,16 +80,16 @@
 					obj.$api.msg('请输入验证码');
 					return;
 				}
-				if (obj.invitation == '') {
-					obj.$api.msg('请输入邀请码');
-					return;
-				}
+				// if (obj.invitation == '') {
+				// 	obj.$api.msg('请输入邀请码');
+				// 	return;
+				// }
 				register({
 					phone: obj.phone, //账号
 					captcha: obj.code, //验证码
 					password:obj.loginPass,
 					trade_password:obj.payPass,
-					invite_code:obj.invitation
+					// invite_code:obj.invitation
 				}).then(function(e) {
 					uni.showToast({
 						title: '注册成功',

+ 236 - 0
pages/user/charge.vue

@@ -0,0 +1,236 @@
+<template>
+	<view class="content">
+		<view class="bg">
+			<image src="../../static/user/bg.png" mode=""></image>
+		</view>
+		<view class="header">
+			<view class="header-left" @click="toBack()">
+				<image class="goback" src="../../static/user/fanhui.png" mode=""></image>
+			</view>
+			<view class="header-title">
+				电费
+			</view>
+		</view>
+		<view class="box-title">
+			<view class="yue">
+				电费余额
+			</view>
+			<view class="yuan">
+				{{yue}}元
+			</view>
+		</view>
+		<view class="box-content">
+			<view class="content-title">
+				<view class="left">
+					电费明细
+				</view>
+				<view class="right" @click="navTo()">
+					立即充值
+				</view>
+			</view>
+			<view class="box">
+				<view class="content-content" v-for="item in list">
+					<view class="money">
+						{{item.pm>0?'+':'-'}}{{item.number}}
+					</view>
+					<view class="time">
+						{{item.add_time}}
+					</view>
+				</view>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import { mapMutations } from 'vuex';
+	import { getUserInfo } from '@/api/user.js';
+	import {
+		charge
+	} from '../../api/user.js'
+	import {
+		mapState
+	} from 'vuex';
+
+	export default {
+		data() {
+			return {
+				pm: 1, //收入
+				yue: 0, //电费余额
+				list: [] //电费订单列表
+
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+			
+		},
+		onLoad() {
+
+			this.loadData()
+		},
+		onShow() {
+			
+			this.loadData()
+			getUserInfo().then(res=>{
+				this.setUserInfo(res.data);
+			})
+			
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login']),
+			toBack() {
+				uni.switchTab({
+					url: "/pages/user/user"
+				})
+			},
+			navTo() {
+				uni.navigateTo({
+					url: "recharge"
+				})
+			},
+			loadData() {
+				let obj = this
+				charge().then(res => {
+					obj.list = res.data
+					console.log(res, '2222');
+					obj.yue = obj.userInfo.electric_fee
+					console.log(obj.yue);
+					console.log(obj.userInfo, '2222');
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		margin: 0;
+		padding: 0;
+		height: 100%;
+	}
+
+	.bg {
+		width: 750rpx;
+		height: 357rpx;
+
+		image {
+			height: 100%;
+			width: 100%;
+		}
+	}
+
+	.header {
+		width: 100%;
+		z-index: 99;
+		position: absolute;
+		left: 0;
+		top: 0;
+		z-index: 99;
+		margin: 30rpx auto;
+		display: flex;
+		justify-content: center;
+
+
+		.header-left {
+			position: absolute;
+			left: 25rpx;
+			top: 0;
+			height: 60rpx;
+			display: flex;
+			align-items: center;
+		}
+
+		.goback {
+			z-index: 100;
+			width: 34rpx;
+			height: 34rpx;
+		}
+
+		.header-title {
+
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #FFFFFF;
+		}
+
+	}
+
+	.box-title {
+		position: absolute;
+		margin-top: -200rpx;
+		// margin: 0 auto;
+		display: flex;
+		margin: -200rpx auto;
+		left: 72.5rpx;
+		justify-content: center;
+		flex-direction: column;
+		align-items: center;
+		width: 605rpx;
+		height: 225rpx;
+		background: #FFFFFF;
+		border-radius: 20rpx 20rpx 0 0;
+
+		.yue {
+			font-size: 38rpx;
+			font-weight: 500;
+			color: #333333;
+			line-height: 54rpx;
+		}
+
+		.yuan {
+			margin-top: 15rpx;
+			font-size: 38rpx;
+			font-weight: bold;
+			color: #FF6600;
+			line-height: 54rpx;
+		}
+	}
+
+	.box-content {
+		margin: 0 25rpx;
+
+		.content-title {
+			margin-top: 100rpx;
+			justify-content: space-between;
+			display: flex;
+
+			.left {
+
+				font-size: 32rpx;
+				font-weight: 500;
+				color: #141E47;
+			}
+
+			.right {
+				font-size: 26rpx;
+				text-align: center;
+				line-height: 48rpx;
+				font-weight: 500;
+				color: #141E47;
+				width: 138rpx;
+				height: 48rpx;
+				background: #F7F6FB;
+				border: 2rpx solid #141E47;
+				border-radius: 10rpx;
+			}
+
+		}
+	}
+
+	.box {}
+
+	.content-content {
+		padding: 0 20rpx;
+		display: flex;
+		justify-content: space-between;
+		border-bottom: 1rpx solid #E1E1E1;
+		line-height: 100rpx;
+
+		.money {}
+
+		.time {}
+	}
+</style>

+ 600 - 0
pages/user/recharge.vue

@@ -0,0 +1,600 @@
+<template>
+	<view class="content">
+		<view class="top_box">
+			<text class="yue-tit">当前余额:</text>
+			<!--  | parseFloatNum -->
+			<text class="yue-num">{{ (now_money*1).toFixed(3)}}USDT</text>
+		</view>
+
+		<view class="line_box"></view>
+
+		<view class="cz_box">
+			<view class="cz_wrap">
+				<text class="cz_tit">USDT</text>
+				<input class="cz_input" type="number" v-model="money" @focus="changeNum()" placeholder="请输入充值金额"
+					placeholder-class="placeholder" />
+			</view>
+			<view class="zc_list_box">
+				<view class="zc_list_price" :class="{ seletPrice: seletNum == item }" @click="seletChange(item, index)"
+					v-for="(item, index) in list" :key="index">
+					{{ item}}USDT
+				</view>
+			</view>
+		</view>
+		<view class="line_box"></view>
+		<button class="add-btn up" @click="!payLoding ? confirm() : ''">立即充值</button>
+		<view class="curtain" :class="{'ishiden':isHiden}" @touchmove.stop.prevent="moveHandle">
+			<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>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		miningDateils,
+		buyMining,
+		mymining,
+		charge
+	} from '@/api/calculation.js';
+	import {
+		recharge,
+		wallet
+	} from '@/api/finance.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+
+	// import { rechargeWechat, rechargeIndex } from '@/api/wallet.js';
+
+	// import { rechargeWechat, rechargeRoutine, rechargeIndex } from '@/api/wallet.js';
+
+	import {
+		mapState
+	} from 'vuex';
+	// import { spreadCommission, userBalance,moneyChong } from '@/api/wallet.js';
+	export default {
+		// filters: {
+		// 	getMoneyStyle,
+		// 	// 去处小数点后的0
+		// 	parseFloatNum(clock) {
+		// 		return parseFloat(clock);
+		// 	}
+		// },
+		data() {
+			return {
+				
+				password:'',
+				type: 'weixin',
+				money: '', //充值金额
+				payLoding: false, //是否加载中
+				isHiden: true,//是否显示
+				list: [
+					"300",
+					"200",
+					"150",
+					"100",
+					"50"
+				],
+				now_money: '',
+				seletNum: '300', // 选中
+				zhuyi: [],
+				quota: '', // 送的钱
+				typeText: 0, // 0-微信 1-佣金
+			};
+		},
+		onLoad(options) {
+			this.loadData();
+		},
+		onShow() {
+			this.loadData();
+		},
+		computed: {
+			// #ifdef H5
+			// ...mapState(['weichatObj', 'userInfo'])
+			// #endif
+			// #ifdef MP
+			...mapState(['userInfo'])
+			// #endif
+		},
+		methods: {
+			pswQd() {
+				let obj = this;
+				if (obj.password === '') {
+					obj.$api.msg('请输入交易密码!');
+					return
+				}
+				obj.isHiden = true
+				console.log(obj.id ,'131',obj.num,'12',obj.password);
+				charge({
+							trade_psw: obj.password,
+							num:obj.money
+						}
+					)
+					.then(data => {
+						obj.$api.msg(data.msg);
+						obj.password = '';
+						obj.num = 1;
+						setTimeout(function() {
+							uni.navigateTo({
+								url: '/pages/user/charge'
+							});
+						}, 1500);
+					})
+					.catch(e => {
+						obj.password = '';
+						obj.num = 1;
+						if (e.msg == '交易密码错误') {
+							return;
+						}
+						console.log(e);
+						var reg = new RegExp('购买矿机所需的');
+						if (e.msg.match(reg) == -1) {} else {
+							setTimeout(function() {
+								uni.navigateTo({
+									url: '/pages/finance/recharge'
+								});
+							}, 1500);
+						}
+					});
+			},
+			cancel() {
+				this.password = ''
+				this.isHiden = true
+			},
+			buy() {
+				this.isHiden = false
+				},
+
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			changeNum() {
+				this.seletNum = this.money = '';
+				console.log(this.seletNum, this.money);
+			},
+			seletChange(item, index) {
+				this.seletNum = item;
+				this.seletMoney = item;
+				this.money = item
+			},
+			// 切换选中对象
+			// tabRadio(e) {
+			// 	this.type = e.detail.value;
+			// 	if (e.detail.value == 'weixin') {
+			// 		this.typeText = 0
+			// 	} else {
+			// 		this.typeText = 1
+			// 	}
+			// },
+			// 充值金额
+			rechargeXuan(item) {
+				this.money = item.price;
+				this.quota = item.quota;
+			},
+
+			// loadData() {
+			// 	moneyChong({}).then(({
+			// 		data
+			// 	}) => {
+			// 		console.log(data, "123456789");
+			// 		this.list = data.recharge_quota;
+			// 	});
+			// 	userBalance({}).then(({
+			// 		data
+			// 	}) => {
+			// 		this.now_money = data.now_money;
+			// 	});
+			// },
+			//获取余额
+			loadData() {
+				let obj = this
+				wallet().then(res => {
+					console.log(res, 'da2');
+					obj.now_money = res.data.back.USDT.money.money
+				})
+			},
+
+			// 提交
+			confirm() {
+				//是否输入金额,如不是提示充值金额
+				
+				let obj = this;
+				obj.isHiden = false
+				obj.payLoding = true;
+				if (!obj.money) {
+					obj.$api.msg('请输入金额');
+					obj.payLoding = false;
+					return;
+				}
+
+
+			},
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+		background: #ffffff;
+	}
+
+	.top_box {
+		padding: 20rpx 26rpx 20rpx 47rpx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.yue-tit {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+
+		.yue-num {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ff6f0f;
+		}
+	}
+
+	.line_box {
+		width: 100%;
+		height: 20rpx;
+		background: #f8f8f8;
+	}
+
+	.cz_box {
+		padding: 40rpx 20rpx 20rpx;
+
+		.cz_wrap {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding-bottom: 20rpx;
+			border-bottom: 1px solid #e6e6e6;
+
+			.cz_tit {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+			}
+
+			.cz_input {
+				text-align: right;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				// color: #BFBFBF;
+			}
+		}
+
+		.zc_list_box {
+			display: flex;
+			flex-wrap: wrap;
+
+			.zc_list_price {
+				width: 202rpx;
+				height: 60rpx;
+				// background: #f0f0f0;
+
+				border-radius: 8rpx;
+				margin-top: 36rpx;
+				margin-right: 50rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+
+				&:nth-child(3n) {
+					margin-right: 0;
+				}
+			}
+
+			.seletPrice {
+				// background: linear-gradient(143.2747deg, #fff, #f3f3f3);
+				background: #141E47;
+				border: 3rpx solid #141E47;
+				color: #ffffff;
+			}
+		}
+	}
+
+	.recha-box {
+		padding: 50rpx 30rpx 0;
+		display: flex;
+		flex-wrap: wrap;
+
+		.recha-frame {
+			width: 210rpx;
+			height: 181rpx;
+			border: 1px solid #dbdede;
+			border-radius: 20rpx;
+			display: flex;
+			align-items: center;
+			flex-direction: column;
+			justify-content: center;
+			margin-right: 30rpx;
+			margin-bottom: 30rpx;
+
+			&:nth-child(3n) {
+				margin-right: 0;
+			}
+
+			.recha-top {
+				display: flex;
+				align-items: center;
+
+				.recha-img {
+					width: 64rpx;
+					height: 62rpx;
+				}
+
+				.recha-tit {
+					margin-left: 10rpx;
+					font-size: 36rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+				}
+			}
+
+			.recha-song {
+				margin-top: 20rpx;
+				font-size: $font-base;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #ff9900;
+			}
+		}
+
+		.select-frame {
+			border: 1px solid #ef041f;
+		}
+	}
+
+	.rechar-box {
+		padding: 30rpx 20rpx 0;
+
+		.rechar-title {
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			margin-bottom: 10rpx;
+		}
+
+		.rechar-text {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+	}
+
+	.cz-type {
+		margin-top: 22rpx;
+		display: flex;
+		justify-content: space-between;
+		padding: 32rpx;
+		align-items: center;
+
+		.type-left {
+			display: flex;
+			align-items: center;
+
+			.icon {
+				height: 38rpx;
+
+				image {
+					width: 48rpx;
+					height: 38rpx;
+				}
+			}
+
+			.iconweixin {
+				color: #36cb59;
+			}
+
+			.tit {
+				margin-left: 12rpx;
+				font-size: 30rpx;
+				color: #333333;
+			}
+		}
+
+		.type-right {
+			image {
+				width: 36rpx;
+				height: 36rpx;
+			}
+		}
+	}
+
+	.add-btn {
+		&.modified {}
+
+		&.up {
+			color: #FFFFFF;
+			background: #141E47;
+		}
+
+		margin-top: 100rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 604rpx;
+		height: 90rpx;
+		border: 2rpx solid #FFFFFF;
+		border-radius: 10rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #F21F5D;
+		line-height: 90rpx;
+		text-align: center;
+	}
+
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+			padding-right: 25rpx;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+				display: flex;
+			}
+
+			.yongjing {
+				width: 48rpx;
+				height: 48rpx;
+			}
+
+			.iconweixin1 {
+				color: #18bf16;
+			}
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
+	}
+
+	.active-bg {
+		background: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
+		color: #FFFFFF !important;
+	}
+	
+	.curtain {
+		position: fixed;
+		width: 100%;
+		height: 100%;
+		top: 0;
+		background-color: rgba($color: #000000, $alpha: 0.2);
+	
+		.psw-wrapper {
+			position: fixed;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -100%);
+			width: 548.6rpx;
+			height: 344.4rpx;
+			background-color: #FFFFFF;
+			border-radius: 15rpx 15rpx;
+	
+			.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: #5771DF;
+			}
+		}
+	}
+	.ishiden {
+		display: none;
+	}
+</style>

+ 3 - 3
pages/user/revenue.vue

@@ -7,11 +7,11 @@
 		<view class="list">
 			<view class="list-item flex">
 				<view class="item-tpl">
-					<view class="tpl name">有效算力</view>
+					<view class="tpl name">运行中矿机</view>
 					<view class="tpl num">{{ list.doing  }}{{ navList[currentIndex].slUnit }}</view>
 				</view>
 				<view class="item-tpl">
-					<view class="tpl name">待生效算力</view>
+					<view class="tpl name">待运行矿机</view>
 					<view class="tpl num">{{ list.stand }}{{ navList[currentIndex].slUnit }}</view>
 				</view>
 			</view>
@@ -86,7 +86,7 @@
 					</view>
 					<view class="item">
 						<view class="item-title">
-							今日可用
+							收益明细
 							<!-- <text>{{ +item.machine.first_step_get_ratio }}</text> -->
 						</view>
 						<view class="item-value">{{ item.get_money | four }}{{ item.get_money_type }}</view>

+ 270 - 217
pages/user/user.vue

@@ -16,15 +16,24 @@
 			<view class="list-title">我的工具</view>
 			<view class="list-cell flex" @click="navTo('/pages/calculation/myCalculation')">
 				<view class="cell-info flex_item">
-					<image src="../../static/tabBar/tab-calculation-current.png" style="width: 40rpx; height: 40rpx;"></image>
+					<image src="../../static/tabBar/tab-calculation-current.png" style="width: 40rpx; height: 40rpx;">
+					</image>
 					<view class="cell-name">我的订单</view>
 				</view>
 				<image src="../../static/img/img23.png"></image>
 			</view>
+			<view class="list-cell flex" @click="navTo('/pages/user/charge')">
+				<view class="cell-info flex_item">
+					<image src="../../static/user/charge.png" style="width: 40rpx; height: 40rpx;">
+					</image>
+					<view class="cell-name">我的电费</view>
+				</view>
+				<image src="../../static/img/img23.png"></image>
+			</view>
 			<view class="list-cell flex" @click="navTo('/pages/user/revenue')">
 				<view class="cell-info flex_item">
 					<image src="../../static/img/img54.png" style="width: 40rpx; height: 40rpx;"></image>
-					<view class="cell-name">算力收益</view>
+					<view class="cell-name">挖矿收益</view>
 				</view>
 				<image src="../../static/img/img23.png"></image>
 			</view>
@@ -49,7 +58,7 @@
 				</view>
 				<image src="../../static/img/img23.png"></image>
 			</view>
-		     	<view class="list-cell flex" @click="navTo('/pages/user/payment')">
+			<view class="list-cell flex" @click="navTo('/pages/user/payment')">
 				<view class="cell-info flex_item">
 					<image class="img2" src="../../static/img/img19.png"></image>
 					<view class="cell-name">支付密码</view>
@@ -96,151 +105,176 @@
 					<view class="pop-tip">微信咨询客服</view>
 				</view>
 			</view>
-			<view class="close_icon" @click="close"><image src="../../static/img/img49.png"></image></view>
+			<view class="close_icon" @click="close">
+				<image src="../../static/img/img49.png"></image>
+			</view>
 		</uni-popup>
 	</view>
 </template>
 <script>
-import { getUserInfo,getUser } from '@/api/user.js';
-import { mapState, mapMutations } from 'vuex';
-import { saveUrl, interceptor } from '@/utils/loginUtils.js';
-import uniPopup from '@/components/uni-popup/uni-popup.vue';
-import { logout } from '@/api/set.js';
-export default {
-	components: {
-		uniPopup
-	},
-	data() {
-		return {
-			userInfo:'',
-			phone:'',
-		};
-	},
-	onLoad(option){
-		saveUrl();
-	},
-	onShow() {
-		// 判断是否已经登录
-		if (this.hasLogin) {
-			this.loadBaseData();
-		} else {
-			this.userInfo = '';
-		}
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		this.loadBaseData();
-		setTimeout(function () {
-			uni.stopPullDownRefresh();
-		}, 1000);
-	},
-	computed: {
-		...mapState('user', ['hasLogin'])
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo','logout']),
-		// 加载初始数据
-		loadBaseData() {
-			let obj = this;
-			getUserInfo({})
-				.then(({ data }) => {
-					obj.userInfo = data;
-					var tel = obj.userInfo.account;
-					var reg = /^(\d{3})\d{4}(\d{4})$/;
-					obj.phone = tel.replace(reg, "$1****$2");
-					obj.setUserInfo(data);
-				})
-				.catch(e => {
-					console.log(e);
-				});
+	import {
+		getUserInfo,
+		getUser
+	} from '@/api/user.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	import uniPopup from '@/components/uni-popup/uni-popup.vue';
+	import {
+		logout
+	} from '@/api/set.js';
+	export default {
+		components: {
+			uniPopup
 		},
-		server(){
-			this.$refs.popup.open();
+		data() {
+			return {
+				userInfo: '',
+				phone: '',
+			};
 		},
-		close(){
-			this.$refs.popup.close();
+		onLoad(option) {
+			saveUrl();
 		},
-		/**
-		 * 统一跳转接口,拦截未登录路由
-		 * navigator标签现在默认没有转场动画,所以用view
-		 */
-		navTo(url) {
-			uni.navigateTo({
-				url
-			});
+		onShow() {
+			// 判断是否已经登录
+			if (this.hasLogin) {
+				this.loadBaseData();
+			} else {
+				this.userInfo = '';
+			}
 		},
-		//退出登录
-		toLogout() {
-			let obj = this;
-			uni.showModal({
-				content: '确定要退出登录么',
-				success: e => {
-					if (e.confirm) {
-						logout({}).then(e => {
-							obj.logout();
-							uni.navigateTo({
-								url:'/pages/public/login'
-							})
-						})
-						.catch(e => {
-							console.log(e);
-						});
-					}
-				}
-			});
+		//下拉刷新
+		onPullDownRefresh() {
+			this.loadBaseData();
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		},
-	}
-};
+		computed: {
+			...mapState('user', ['hasLogin'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'logout']),
+			// 加载初始数据
+			loadBaseData() {
+				let obj = this;
+				getUserInfo({})
+					.then(({
+						data
+					}) => {
+						obj.userInfo = data;
+						var tel = obj.userInfo.account;
+						var reg = /^(\d{3})\d{4}(\d{4})$/;
+						obj.phone = tel.replace(reg, "$1****$2");
+						obj.setUserInfo(data);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			server() {
+				this.$refs.popup.open();
+			},
+			close() {
+				this.$refs.popup.close();
+			},
+			/**
+			 * 统一跳转接口,拦截未登录路由
+			 * navigator标签现在默认没有转场动画,所以用view
+			 */
+			navTo(url) {
+				uni.navigateTo({
+					url
+				});
+			},
+			//退出登录
+			toLogout() {
+				let obj = this;
+				uni.showModal({
+					content: '确定要退出登录么',
+					success: e => {
+						if (e.confirm) {
+							logout({}).then(e => {
+									obj.logout();
+									uni.navigateTo({
+										url: '/pages/public/login'
+									})
+								})
+								.catch(e => {
+									console.log(e);
+								});
+						}
+					}
+				});
+			},
+		}
+	};
 </script>
 
 <style lang="scss">
-page {
-	min-height: 100%;
-	background-color: #ffffff;
-	.container {
-		width: 100%;
-		padding-bottom: 50rpx;
+	page {
+		min-height: 100%;
+		background-color: #ffffff;
+
+		.container {
+			width: 100%;
+			padding-bottom: 50rpx;
+		}
 	}
-}
-.user-box{
-	width: 100%;
-	height: 440rpx;
-	padding: 60rpx 35rpx;
-	background-image: url(../../static/user/bg.png);
-	background-size: 100% 100%;
-	color: #FFFFFF;
-	align-items: flex-start;
-	.header{
-		width: 125rpx;
-		height: 125rpx;
-		border-radius: 100%;
-		margin-top: 10%;
+
+	.user-box {
+		width: 100%;
+		height: 440rpx;
+		padding: 60rpx 35rpx;
+		background-image: url(../../static/user/bg.png);
+		background-size: 100% 100%;
+		color: #FFFFFF;
+		align-items: flex-start;
+
+		.header {
+			width: 125rpx;
+			height: 125rpx;
+			border-radius: 100%;
+			margin-top: 10%;
+		}
 	}
-}
-	.user-info{
+
+	.user-info {
 		padding-left: 30rpx;
-		.name{
+
+		.name {
 			font-weight: 500;
 			font-size: 48rpx;
 		}
-		.phone{
+
+		.phone {
 			font-size: 42rpx;
 			font-weight: 500;
 			color: #FFFFFF;
 			padding-top: 50rpx;
 		}
-		.uuid{
+
+		.uuid {
 			font-size: 30rpx;
 			padding-top: 20rpx;
 		}
-		.level-box{
+
+		.level-box {
 			margin-top: 25rpx;
 			position: relative;
-			.image{
+
+			.image {
 				width: 128rpx;
-				height:45rpx;
+				height: 45rpx;
 			}
-			.level{
+
+			.level {
 				position: absolute;
 				top: 12rpx;
 				left: 62rpx;
@@ -250,114 +284,133 @@ page {
 			}
 		}
 	}
-.list-box{
-	width: 100%;
-	margin-top: -60rpx;
-	background-color: #FFFFFF;
-	border-top-right-radius: 70rpx;
-	border-top-left-radius: 70rpx;
-	padding: 60rpx 66rpx 0rpx 55rpx;
-	.list-title{
-		font-weight: bold;
-		color: #333333;
-		font-size: 36rpx;
+
+	.list-box {
+		width: 100%;
+		margin-top: -60rpx;
+		background-color: #FFFFFF;
+		border-top-right-radius: 70rpx;
+		border-top-left-radius: 70rpx;
+		padding: 60rpx 66rpx 0rpx 55rpx;
+
+		.list-title {
+			font-weight: bold;
+			color: #333333;
+			font-size: 36rpx;
+		}
+
+		.list-cell {
+			padding-top: 40rpx;
+			border-bottom: 1rpx solid #F3F3F3;
+			padding-bottom: 30rpx;
+
+			.cell-info {
+				image {
+					width: 49rpx;
+					height: 38rpx;
+				}
+
+				.cell-name {
+					padding-left: 17rpx;
+					color: #666666;
+					font-size: 30rpx;
+					font-weight: 500;
+				}
+			}
+
+			image {
+				width: 16rpx;
+				height: 25rpx;
+			}
+		}
+	}
+
+	.img1 {
+		width: 46rpx !important;
+		height: 40rpx !important;
 	}
-	.list-cell{
-		padding-top: 40rpx;
-		border-bottom: 1rpx solid #F3F3F3;
-		padding-bottom: 30rpx;
-		.cell-info{
-			image{
-				width: 49rpx;
-				height: 38rpx;
+
+	.img2 {
+		width: 40rpx !important;
+		height: 42rpx !important;
+	}
+
+	.img3 {
+		width: 42rpx !important;
+		height: 42rpx !important;
+	}
+
+	.img4 {
+		width: 42rpx !important;
+		height: 41rpx !important;
+	}
+
+	.img5 {
+		width: 44rpx !important;
+		height: 40rpx !important;
+	}
+
+	//弹窗
+	.popup {
+		width: 640rpx;
+		background-color: #FFFFFF;
+		border-radius: 15rpx;
+		text-align: center;
+
+		.popup-dox {
+			position: relative;
+			top: -60rpx;
+
+			.popup-logo {
+				width: 460rpx;
+				height: 132rpx;
 			}
-			.cell-name{
-				padding-left: 17rpx;
-				color: #666666;
+
+			.pop-title {
+				font-size: 40rpx;
+				font-weight: bold;
+				color: #333333;
+				padding: 25rpx 0rpx;
+				margin-bottom: 50rpx;
+			}
+
+			.popup-text {
+				width: 400rpx;
+				height: 400rpx;
+				margin-bottom: 50rpx;
+			}
+
+			.pop-tip {
 				font-size: 30rpx;
 				font-weight: 500;
+				color: #333333;
 			}
 		}
-		image{
-			width: 16rpx;
-			height: 25rpx;
-		}
 	}
-}
-.img1{
-	width: 46rpx !important;
-	height: 40rpx !important;
-}
-.img2{
-	width: 40rpx !important;
-	height: 42rpx !important;
-}
-.img3{
-	width: 42rpx !important;
-	height: 42rpx !important;
-}
-.img4{
-	width: 42rpx !important;
-	height: 41rpx !important;
-}
-.img5{
-	width: 44rpx !important;
-	height: 40rpx !important;
-}
-//弹窗
-.popup {
-	width: 640rpx;
-	background-color: #FFFFFF;
-	border-radius: 15rpx;
-	text-align: center;
-	.popup-dox{
-		position: relative;
-		top: -60rpx;
-		.popup-logo {
-			width: 460rpx;
-			height: 132rpx;
-		}
-		.pop-title{
-			font-size: 40rpx;
-			font-weight: bold;
-			color: #333333;
-			padding: 25rpx 0rpx;
-			margin-bottom: 50rpx;
-		}
-		.popup-text{
-			width: 400rpx;
-			height: 400rpx;
-			margin-bottom: 50rpx;
-		}
-		.pop-tip{
-			font-size: 30rpx;
-			font-weight: 500;
-			color: #333333;
+
+	.close_icon {
+		width: 60rpx;
+		height: 60rpx;
+		margin: 88rpx auto 0;
+	
+	image {
+			width: 100%;
+			height: 100%;
 		}
 	}
-}
 
-.close_icon {
-	width: 60rpx;
-	height: 60rpx;
-	margin: 88rpx auto 0;
-	image {
-		width: 100%;
-		height: 100%;
+	.submit {
+		margin: 37rpx auto 38rpx;
+		width: 560rpx;
+		background-color: #fff;
+		color: #141E47;
+		text-align: center;
+		// padding:26rpx 0rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		border: #141E47 1px solid;
+		border-radius: 50rpx;
+		font-size: 28rpx;
+
 	}
-}
-.submit{
-			margin: 37rpx auto 38rpx;
-			width: 560rpx;
-			background-color: #fff;
-			color: #141E47;
-			text-align: center;
-			// padding:26rpx 0rpx;
-			height: 80rpx;
-			line-height: 80rpx;
-			border: #141E47 1px solid;
-			border-radius: 50rpx;
-			font-size: 28rpx;
-			
-		}
 </style>

BIN
static/user/charge.png


BIN
static/user/fanhui.png


+ 10 - 0
store/index.js

@@ -10,6 +10,16 @@ const store = new Vuex.Store({
 		homeURL:'http://btc.ttfc.pro/',//h5页面域名 
 		urlFile:'/index',//项目部署所在文件夹
 		loginInterceptor:false,//是否打开强制登录
+		
+		
+		userInfo: {}, //登录信息
+		loginInterceptor:false,//是否打开强制登录
+		
+		// weichatInfo:{},//保存微信注册信息
+		weichatObj:'',//微信对象
+
+		latitude: '',
+		longitude: '',
 	},
 	mutations: {
 		

File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/wgt/__UNI__C82D2C8/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/wgt/__UNI__C82D2C8/app-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/wgt/__UNI__C82D2C8/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/wgt/__UNI__C82D2C8/manifest.json


BIN
unpackage/cache/wgt/__UNI__C82D2C8/static/user/charge.png


BIN
unpackage/cache/wgt/__UNI__C82D2C8/static/user/fanhui.png


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


BIN
unpackage/dist/build/app-plus/static/user/charge.png


BIN
unpackage/dist/build/app-plus/static/user/fanhui.png


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