Parcourir la source

apply and upgrade

lhl il y a 4 ans
Parent
commit
acb289468f

+ 30 - 0
pages.json

@@ -166,6 +166,36 @@
 					}
 					}
 				}
 				}
 			}
 			}
+		},
+		{
+			"path": "pages/public/success",
+			"style": {
+				// "navigationBarTitleText": "收益中心",
+				"navigationBarTextStyle": "white",
+				"app-plus": {
+					"titleNView": {
+						"backgroundColor": "#000",
+						"type": "float",
+						"titleText": "提交成功" 
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/user/applyList",
+			"style": {
+				"navigationBarTitleText": "收益中心",
+				"navigationBarTextStyle": "white",
+				"navigationBarBackgroundColor":"#000"
+			}
+		},
+		{
+			"path": "pages/user/upgrade",
+			"style": {
+				"navigationBarTitleText": "升级会员",
+				"navigationBarTextStyle": "white",
+				"navigationBarBackgroundColor":"#000"
+			}
 		}
 		}
 	],
 	],
 
 

+ 18 - 31
pages/profit/profit.vue

@@ -6,28 +6,15 @@
 				<view class="text">当前余额</view>
 				<view class="text">当前余额</view>
 				<view class="money"><text>¥</text>{{ money | getMoneyStyle }}</view>		
 				<view class="money"><text>¥</text>{{ money | getMoneyStyle }}</view>		
 			</view>
 			</view>
-			<!-- <view class="moneyTx" @click="navto('./withdrawal')">提现</view>
-			<view class="flex buttom-box">
-				<view class="buttom" @click="navto('/pages/money/recharge')">
-					<view class="icon"><image src="/static/icon/i6.png" mode="aspectFill" class="icon-img"></image></view>
-					<text>统计</text>
-				</view>
-				<view class="interval"></view>
-				<view class="buttom" @click="navto('./withdrawal')">
-					<view class="icon"><image src="/static/icon/i7.png" mode="aspectFill" class="icon-img"></image></view>
-					<text>提现</text>
-				</view>
-			</view> -->
 		</view>
 		</view>
 		<view class="navbar">
 		<view class="navbar">
 			<view v-for="(item,index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index}" @click="tabClick(index)">{{ item.text }}</view>
 			<view v-for="(item,index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index}" @click="tabClick(index)">{{ item.text }}</view>
 		</view>
 		</view>
-		<swiper :current="tabCurrentIndex" :style="{'height':maxheight+'px'}" class="swiper-box" duration="300" @change="changeTab">
+		<swiper :current="tabCurrentIndex" :style="{'height':maxheight}" class="swiper-box" duration="300" @change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
 				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
 				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
 					<!-- 空白页 -->
 					<!-- 空白页 -->
 					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
 					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-					
 					<!-- 订单列表 -->
 					<!-- 订单列表 -->
 					<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
 					<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
 						<view class="title-box">
 						<view class="title-box">
@@ -63,22 +50,20 @@ export default {
 		empty,
 		empty,
 		uniLoadMore
 		uniLoadMore
 	},
 	},
-	onReady() {
-		//初始化获取页面宽度
-		uni.createSelectorQuery().select('.content')
-			.fields(
-			{
-				size:true
-			},
-			data => {
-				console.log(data);
-				console.log(Math.floor((data.width /750) * 300));
-				//保存头部高度
-				this.maxheight =data.height - Math.floor((data.width / 750) * 570);
-				console.log(this.maxheight);
-				}
-			)
-			.exec();
+	onReady(res) {
+		var obj = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.swiper-box').boundingClientRect();
+				query.exec(function(res) {
+					console.log(res, 'ddddddddddddd');
+					obj.maxheight = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', obj.maxheight);
+				});
+			},
+			fail: res => {}
+		});
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {
@@ -181,13 +166,15 @@ page {
 	background: #000;
 	background: #000;
 	height: 100%;
 	height: 100%;
 }
 }
-.content-money {
+.content-money {
+	height: 430rpx;
 	padding-bottom: 30rpx;
 	padding-bottom: 30rpx;
 	background: $page-color-base;
 	background: $page-color-base;
 	position: relative;
 	position: relative;
 	.bg{ 
 	.bg{ 
 		position: absolute;
 		position: absolute;
 		width: 100%;
 		width: 100%;
+		height: 430rpx;
 	}
 	}
 	.moneyTx{
 	.moneyTx{
 		position: absolute;
 		position: absolute;

+ 31 - 17
pages/public/forget.vue

@@ -27,14 +27,15 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<view>
 			<view>
-				<button type="green" @click="register" class="uni-button uni-button-green">确定修改</button>
+				<button type="green" @click="loding?register():''" class="uni-button uni-button-green">确定修改</button>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
 import { mapMutations } from 'vuex';
 import { mapMutations } from 'vuex';
-import { verify, loginMobile, getUserInfo } from '@/api/login.js';
+import { verify, loginMobile, getUserInfo } from '@/api/login.js';
+import { registerReset } from '@/api/set.js';
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
@@ -44,6 +45,7 @@ export default {
 			countDown: 0, //倒计时
 			countDown: 0, //倒计时
 			password: '',
 			password: '',
 			repassword: '',
 			repassword: '',
+			loding:true,//是否载入中
 			
 			
 		};
 		};
 	},
 	},
@@ -60,7 +62,8 @@ export default {
 		...mapMutations('user', ['setUserInfo', 'login']),
 		...mapMutations('user', ['setUserInfo', 'login']),
 		// 手机登录
 		// 手机登录
 		register() {
 		register() {
-			let obj = this;
+			let obj = this;
+			console.log('dianji')
 			if (obj.phone == '') {
 			if (obj.phone == '') {
 				obj.$api.msg('请输入电话号码');
 				obj.$api.msg('请输入电话号码');
 				return;
 				return;
@@ -68,26 +71,37 @@ export default {
 			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.phone)) {
 			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.phone)) {
 				obj.$api.msg('请输入正确的手机号');
 				obj.$api.msg('请输入正确的手机号');
 				return;
 				return;
+			}
+			if(obj.password == '') {
+				obj.$api.msg('请输入新密码')
+				return 
+			}
+			if(obj.password != obj.repassword) {
+				obj.$api.msg('两次密码不一致')
+				return 
 			}
 			}
 			if (obj.code == '') {
 			if (obj.code == '') {
 				obj.$api.msg('请输入验证码');
 				obj.$api.msg('请输入验证码');
 				return;
 				return;
 			}
 			}
-
-			loginMobile({
-				phone: obj.phone, //账号
-				captcha: obj.code
+			obj.loding = false
+			registerReset({
+				// phone: obj.phone, //账号
+				// captcha: obj.code,
+				account: obj.account,
+				captcha: obj.code,
+				password: obj.password,
 			}).then(function(e) {
 			}).then(function(e) {
-				uni.setStorageSync('token', e.data.token);
-				getUserInfo({}).then(e => {
-					obj.login();
-					// 保存返回用户数据
-					obj.setUserInfo(e.data);
-					//成功跳转首页
-					uni.switchTab({
-						url: '/pages/index/index'
-					});
-				});
+				// uni.setStorageSync('token', e.data.token);
+				// getUserInfo({}).then(e => {
+				// 	obj.login();
+				// 	// 保存返回用户数据
+				// 	obj.setUserInfo(e.data);
+				// 	//成功跳转首页
+				// 	uni.switchTab({
+				// 		url: '/pages/index/index'
+				// 	});
+				// });
 			}).catch((e) => {
 			}).catch((e) => {
 				console.log(e);
 				console.log(e);
 			});
 			});

+ 114 - 0
pages/public/success.vue

@@ -0,0 +1,114 @@
+<template>
+	<view class="content">
+		<image src="../../static/img/success.png" mode="" class="okimg"></image>
+		<text class="tit">提交成功</text>
+		<text class="tit1">请耐心等待审核</text>
+		<view class="btn-wrapper" >
+			<navigator url="/pages/index/index" open-type="switchTab" class="bank">返回首页</navigator>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				orderId:'',
+				money: '',
+			}
+		},
+		onLoad() {
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.content{
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		padding-top: 277rpx;
+	}
+	.success-icon{
+		font-size: 160upx;
+		color: #5dbc7c;
+		margin-top: 100upx;
+	}
+	.tit{
+		margin-top: -50rpx;
+		font-size: 40rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;
+		line-height: 1.5;
+	}
+	.tit1 {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #B3B3B3;
+	}
+	.btn-group{
+		padding-top: 100upx;
+	}
+	.mix-btn {
+		margin-top: 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 600upx;
+		height: 80upx;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10upx;
+		&.hollow{
+			background: #fff;
+			color: #303133;
+			border: 1px solid #ccc;
+		}
+	}
+	.okimg {
+		width: 362rpx;
+		height: 267rpx;
+	}
+	.btn-wrapper {
+		margin-top: 46rpx;
+		display: flex;
+		.look-btn {
+			width: 301rpx;
+			height: 78rpx;
+			background: #901b21;
+			text-align: center;
+			line-height: 78rpx;
+			border-radius: 10rpx;
+			color: #fff;
+			margin-right: 37rpx;
+		}
+		.bank {
+			/* width: 301rpx;
+			height: 78rpx;
+			text-align: center;
+			line-height: 78rpx;
+			background: #FFFFFF;
+			border: 2px solid #901B21;
+			border-radius: 10rpx;
+			color: #901b21; */
+			width: 350rpx;
+			line-height: 80rpx;
+			text-align: center;
+			background: linear-gradient(-74deg, #CE9C6D, #FFECD6);
+			box-shadow: 3rpx 4rpx 5rpx 0px rgba(151, 118, 74, 0.5);
+			border-radius: 40rpx;
+		
+			font-size: 34rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #874B19;
+		}
+	}
+</style>

+ 222 - 0
pages/user/applyList.vue

@@ -0,0 +1,222 @@
+<template>
+	<view class="content">
+		<view class="navbar">
+			<view v-for="(item,index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index}" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{'height':height}" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" :style="{'height':height}">
+					<!-- 申请列表 -->
+					<view class="apply-box" v-for="item in 20">
+						<view class="box-top">
+							<image src="" mode="" class="user-img"></image>
+							<view class="user-info">
+								<view class="user-name clamp">
+								假猪套	假猪套假猪套假
+								</view>
+								<view class="user-phone">
+								13245678911
+								</view>
+							</view>
+						</view>
+						<view class="apply-info flex">
+							<view class="img-wrap">
+								<image src="" mode="" class="upimg" v-for="item in 2"></image>
+							</view>
+							<view class="btn-wrap flex" v-if="tabCurrentIndex == 0">
+								<view class="btn btn-reject">拒绝</view>
+								<view class="btn btn-pass">通过</view>
+							</view>
+							<view class="btn-wrap" v-if="tabCurrentIndex == 1">
+								已通过
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				height: '',
+				tabCurrentIndex: 0,
+				navList: [{
+						state: 0,
+						text: '未审核',
+						loadingType: 'more',
+						orderList: [],
+					},
+					{
+						state: 1,
+						text: '已审核',
+						loadingType: 'more',
+						orderList: [],
+					}
+				]
+			}
+		},
+		onReady(res) {
+			var obj = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						console.log(res, 'ddddddddddddd');
+						obj.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', obj.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		methods: {
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			loadData(source) {
+				console.log('swiper')
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				// let state = navItem.state+3;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				//修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 0 5px;
+		background: #000;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid $base-color;
+				}
+			}
+		}
+	}
+	.swiper-box {
+		background-color: #15130f;
+		.apply-box {
+			height: 317rpx;
+			width: 702rpx;
+			// background-color: red;
+			margin: 0 auto;
+			border-bottom: 1px solid #6c6a68;
+			padding-top: 30rpx;
+			.box-top {
+				height: 80rpx;
+				// background-color: #bfa;
+				display: flex;
+				justify-content: flex-start;
+				.user-img {
+					width: 80rpx;
+					height: 80rpx;
+					background-color: #eee;
+					margin-right: 20rpx;
+					flex-shrink: 0;
+					border-radius: 50%;
+				}
+				.user-name {
+					max-width: 500rpx;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+				}
+				.user-phone {
+					padding-top: 10rpx;
+					font-size: 22rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					color: #FFFFFF;
+				}
+			}
+			.apply-info {
+				padding: 25rpx 0 0 100rpx;
+				justify-content: space-between;
+				
+				.img-wrap {
+					.upimg {
+						width: 153rpx;
+						height: 152rpx;
+						border-radius: 10rpx;
+						background-color: #999;
+						margin-left: 10rpx;
+					}
+				}
+				.btn-wrap {
+					align-self: flex-end;
+					color: #FAD6B0;
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FAD6B0;
+					.btn {
+						width: 98rpx;
+						line-height: 47rpx;
+						text-align: center;
+					}
+					.btn-reject {
+						border: 1px solid #FAD6B0;
+						border-radius: 5rpx;
+						color: #FAD6B0;
+					}
+					.btn-pass {
+						background: linear-gradient(-74deg, #CE9C6D, #FFECD6);
+						border-image: linear-gradient(115deg, #FEEBD5, #FFFFFF, #E1AD7D) 1 1;
+						box-shadow: 3rpx 4rpx 5rpx 0rpx rgba(151, 118, 74, 0.5);
+						border-radius: 5rpx;
+						color: #874B19;
+						margin-left: 10rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 115 - 0
pages/user/upgrade.vue

@@ -0,0 +1,115 @@
+<template>
+	<view class="content">
+		<view class="user-info flex">
+			<image src="" mode="" class="user-img"></image>
+			<view class="user-name">
+				假猪套天下第一
+			</view>
+			<view class="tit">
+				尚未升级黑钻会员
+			</view>
+		</view>
+		<view class="up-box">
+			<view class="up">
+				<image src="../../static/img/upone.png" mode="" class="bg"></image>
+				<view class="up-price">
+					<text class="inconn">¥</text><text>10000</text>
+				</view>
+				<image src="../../static/img/uonow.png" mode="" class="uplevel"></image>
+			</view>
+			<view class="up">
+				<image src="../../static/img/uptow.png" mode="" class="bg"></image>
+				<view class="up-price">
+					<text class="inconn">¥</text><text>60000</text>
+				</view>
+				<image src="../../static/img/uonow.png" mode="" class="uplevel"></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.user-info {
+		flex-direction: column;
+		align-items: center;
+		text-align: center;
+		padding-top: 20rpx;
+		.user-img {
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 50%;
+			background-color: #eee;
+		}
+		.user-name {
+			margin-top: 20rpx;
+			width: 240rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			
+		}
+		.tit {
+			padding-top: 8rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: 400;
+			color: #999999;
+		}
+	}
+	.up-box {
+		padding: 30rpx 0 100rpx 0;
+		.up {
+			width: 690rpx;
+			height: 892rpx;
+			position: relative;
+			margin: 0 auto 34rpx;
+			.bg {
+				width: 690rpx;
+				height: 892rpx;
+				position: absolute;
+			}
+			.up-price {
+				font-size: 116rpx;
+				display: inline-block;
+				font-family: Source Han Sans CN;
+				font-weight: 800;
+				color: #C63535;
+				position: absolute;
+				top: 250rpx;
+				right: 0;
+				left: 0;
+				margin: auto;
+				display: flex;
+				justify-content: center;
+				.inconn {
+					font-size: 36rpx;
+					font-family: Source Han Sans CN;
+					font-weight: bold;
+					color: #C63535;
+					padding-top: 25rpx;
+				}
+			}
+			.uplevel {
+				width: 307rpx;
+				height: 80rpx;
+				position: absolute;
+				bottom: 118rpx;
+				right: 0;
+				left: 0;
+				margin: auto;
+			}
+		}
+		
+	}
+</style>

BIN
static/img/success.png


BIN
static/img/uonow.png


BIN
static/img/upone.png


BIN
static/img/uptow.png