소스 검색

弹窗、bug、第一版

ck110 1 개월 전
부모
커밋
b5264f1d41

+ 6 - 1
components/DialogBoxW3/DialogBoxW3.scss

@@ -7,7 +7,7 @@
 	align-items: center;
 	width: 100%;
 	height: 100%;
-	background-color: rgba(0,0,0,0.3);
+	background-color: rgba(0,0,0,0.5);
 	z-index: 99999;
 	
 	// position: fixed; /* 固定定位,覆盖整个视口 */
@@ -35,6 +35,11 @@
 	background-size: 572rpx 356rpx;
 	border-radius: 24rpx;
 	overflow: hidden;
+	position: relative;
+	.close {
+		width:40rpx;height:40rpx;padding:2rpx;
+		position: absolute;right:20rpx;top:20rpx;
+	}
 	.title{
 		display: flex;
 		justify-content: center;

+ 3 - 0
components/DialogBoxW3/DialogBoxW3.vue

@@ -2,6 +2,9 @@
 	<view class="page-total" v-if="isShow">
 		<view class="box" :class="AClass[AnIndex][AnIdx]">
 			<view class="dialog-box">
+				<view class="close" @click="onCancel">
+					<image src="../../static/w3/dialog_close.png" mode="widthFix"></image>
+				</view>
 				<view class="title">{{options.title}}</view>
 				<view class="content" v-if="options.DialogType == 'input'">
 					<input type="text" v-model="options.value" :placeholder="options.placeholder">

+ 9 - 8
pages/login/login.vue

@@ -31,7 +31,8 @@
 					<view class="other_list">
 						<text class="left" v-if="false">忘记密码</text>
 						<text class="left" v-else></text>
-						<text class="right" @click="type = 'mobile'">验证码登录</text>
+						<text class="right" @click="type = 'mobile'" v-if="false">验证码登录</text>
+						<text class="right" @click="toRegist">还没有账号?开始注册</text>
 					</view>
 				</block>
 				<block v-if="type == 'mobile'">
@@ -100,11 +101,6 @@
 			}
 		},
 		onLoad() {
-			if (getApp().globalData.skey != "") {
-				uni.switchTab({
-					url: "/pages/index/home"
-				});
-			}
 			setTimeout(function() {
 				uni.setNavigationBarColor({
 					frontColor: '#ffffff',
@@ -117,7 +113,12 @@
 			}, 200);
 		},
 		onShow() {
-			this.loadData();
+			if (getApp().globalData.skey != "") {
+				uni.switchTab({
+					url: "/pages/index/home"
+				});
+			}
+			// this.loadData();
 		},
 		methods: {
 			onBack() {},
@@ -145,7 +146,7 @@
 			},
 			toRegist() {
 				uni.navigateTo({
-					url: "/pages/index/register",
+					url: "/pages/login/reg",
 				});
 			},
 			toLogin() {

+ 15 - 6
pages/login/reg.vue

@@ -10,24 +10,24 @@
 
 			<view class="name">昵称:</view>
 			<view class="item">
-				<input type="text" class="input" v-model="nickname" placeholder="请输入您的昵称" />
+				<input type="text" class="input" v-model="nickname" maxlength="30" placeholder="请输入您的昵称" />
 			</view>
 			<view class="name">手机号码:</view>
 			<view class="item">
-				<input type="text" class="input" v-model="mobile" placeholder="请输入手机号码" />
+				<input type="text" class="input" v-model="mobile" maxlength="11" placeholder="请输入手机号码" />
 			</view>
 			<view class="name">验证码:</view>
 			<view class="item">
-				<input type="text" class="input" v-model="code" placeholder="请输入验证码" />
+				<input type="text" class="input" v-model="code" maxlength="6" placeholder="请输入验证码" />
 				<view class="btn">获取验证码</view>
 			</view>
 			<view class="name">登录密码:</view>
 			<view class="item">
-				<input type="password" class="input" v-model="password" placeholder="请输入登录密码" />
+				<input type="password" class="input" v-model="password" maxlength="50" placeholder="请输入登录密码" />
 			</view>
 			<view class="name">确认密码:</view>
 			<view class="item">
-				<input type="password" class="input" v-model="password2" placeholder="请再次输入登录密码" />
+				<input type="password" class="input" v-model="password2" maxlength="50" placeholder="请再次输入登录密码" />
 			</view>
 			<text class="btn_submit" @click="toReg">注册</text>
 
@@ -149,7 +149,16 @@
 								title: res.data.str,
 								icon: "none",
 							});
-							setTimeout(function() {}, 1500);
+
+							// #ifdef APP-PLUS
+
+							uni.navigateTo({
+								url: '/pages/login/login'
+							})
+
+							// #endif
+
+							// setTimeout(function() {}, 1500);
 							// console.log("res.data", res.data);
 							// uni.setStorageSync("wapptoken", res.data.skey);
 							// getApp().globalData.skey = res.data.skey;

+ 71 - 65
pages/my/my.scss

@@ -13,81 +13,87 @@ page {
 	width:750rpx;
 }
 .header {
-	display: flex;flex-direction: row;justify-content: space-between;align-items: center;color:$title;
+	display: flex;flex-direction: row;justify-content: flex-end;align-items: flex-end;color:$title;
 	width:750rpx;height:calc(var(--status-bar-height) + 100rpx);z-index: 999;
 	padding-top: calc(var(--status-bar-height) + 220rpx);
-	width:750rpx;height:460rpx;
-	background: url("../../static/home/my_top_bg.png");background-size: 100% 100%;background-repeat: no-repeat;z-index: 0;
-	
-	.title {
-		font-size: 34rpx;
-	}
-	.left {
-		padding-left: 50rpx;width:200rpx;
-		image {
-			width:136rpx;border-radius: 100rpx;border:solid 4rpx #fff;
-		}
-	}
-	.right {
-		color:#fff;width:400rpx;font-size: 40rpx;
-		.nickname {
-			font-weight: bold;margin-bottom: 10rpx;
-			display: flex;flex-direction: row;justify-content: flex-start;align-items: center;
-			image {
-				width:76rpx;margin-left: 8rpx;margin-right: 10rpx;
-			}
-			.siming {
-				display: flex;flex-direction: row;justify-content: center;align-items: center;
-				width: 84rpx;height: 32rpx;
-				border-radius: 12rpx 12rpx 12rpx 12rpx;
-				border: 2rpx solid #FFFFFF;
-				font-size: 20rpx;color:#fff;font-weight: normal;
-			}
-		}
-		.join_date {
-			display: flex;flex-direction: row;justify-content: flex-start;align-items: center;
-			font-size: 28rpx;color:#fff;
+	width:750rpx;height:600rpx;
+	background: url("../../static/home/avator.png");background-size: 750rpx 750rpx;background-repeat: no-repeat;z-index: 0;
+	.infoBg {
+		display: flex;flex-direction: row;justify-content: space-between;align-items: center;
+		width:750rpx;height:280rpx;
+		background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
+		padding-top:80rpx;
+		
+		.left {
+			padding-left: 50rpx;width:200rpx;
 			image {
-				width:36rpx;margin-left: 6rpx;
+				width:136rpx;height:136rpx;border-radius: 100rpx;border:solid 4rpx #fff;
 			}
 		}
-	}
-	.dashang {
-		width:150rpx;
-		.sel {
-			display: flex;flex-direction: row;justify-content: center;align-items: center;
-			width: 130rpx;
-			height: 64rpx;
-			background: linear-gradient( 137deg, #FF5869 0%, #FF3C83 100%);
-			border-radius: 16rpx 16rpx 16rpx 16rpx;
-			border: 2rpx solid #FFFFFF;
-			.name {
-				color:#fff;font-size: 20rpx;margin-right: 12rpx;
+		.right {
+			color:#fff;width:400rpx;font-size: 40rpx;
+			.nickname {
+				font-weight: bold;margin-bottom: 10rpx;
+				display: flex;flex-direction: row;justify-content: flex-start;align-items: center;
+				image {
+					width:76rpx;margin-left: 8rpx;margin-right: 10rpx;
+				}
+				.siming {
+					display: flex;flex-direction: row;justify-content: center;align-items: center;
+					width: 84rpx;height: 32rpx;
+					border-radius: 12rpx 12rpx 12rpx 12rpx;
+					border: 2rpx solid #FFFFFF;
+					font-size: 20rpx;color:#fff;font-weight: normal;
+				}
 			}
-			.block {
-				width: 48rpx;
-				height: 48rpx;
-				background: #FFFFFF;
-				border-radius: 8rpx 8rpx 8rpx 8rpx;
+			.join_date {
+				display: flex;flex-direction: row;justify-content: flex-start;align-items: center;
+				font-size: 28rpx;color:#fff;
+				image {
+					width:36rpx;margin-left: 6rpx;
+				}
 			}
 		}
-		.selno {
-			display: flex;flex-direction: row;justify-content: center;align-items: center;
-			width: 130rpx;
-			height: 64rpx;
-			background-color: rgba(255, 255, 255, 0.35);
-			border-radius: 16rpx 16rpx 16rpx 16rpx;
-			border: 2rpx solid #FFFFFF;
-			.name {
-				color:#fff;font-size: 20rpx;
+		.dashang {
+			width:150rpx;
+			.sel {
+				display: flex;flex-direction: row;justify-content: center;align-items: center;
+				width: 130rpx;
+				height: 64rpx;
+				background: linear-gradient( 137deg, #FF5869 0%, #FF3C83 100%);
+				border-radius: 16rpx 16rpx 16rpx 16rpx;
+				border: 2rpx solid #FFFFFF;
+				.name {
+					color:#fff;font-size: 20rpx;margin-right: 12rpx;
+				}
+				.block {
+					width: 48rpx;
+					height: 48rpx;
+					background: #FFFFFF;
+					border-radius: 8rpx 8rpx 8rpx 8rpx;
+				}
 			}
-			.blockGray {
-				width: 48rpx;margin-right: 12rpx;
-				height: 48rpx;background-color: #fff;
-				border-radius: 8rpx 8rpx 8rpx 8rpx;
+			.selno {
+				display: flex;flex-direction: row;justify-content: center;align-items: center;
+				width: 130rpx;
+				height: 64rpx;
+				background-color: rgba(255, 255, 255, 0.35);
+				border-radius: 16rpx 16rpx 16rpx 16rpx;
+				border: 2rpx solid #FFFFFF;
+				.name {
+					color:#fff;font-size: 20rpx;
+				}
+				.blockGray {
+					width: 48rpx;margin-right: 12rpx;
+					height: 48rpx;background-color: #fff;
+					border-radius: 8rpx 8rpx 8rpx 8rpx;
+				}
 			}
+			
 		}
-		
+	}
+	.title {
+		font-size: 34rpx;
 	}
 }
 .thread {
@@ -121,7 +127,7 @@ page {
 	}
 	
 	.numlist2 {
-		display: flex;flex-direction: row;justify-content: center;align-items: center;
+		display: flex;flex-direction: row;justify-content: flex-start;align-items: center;
 		flex-wrap: wrap;
 		background: #28292D;
 		border-radius: 24rpx;

+ 22 - 20
pages/my/my.vue

@@ -2,28 +2,30 @@
 	<view class="page">
 		<view class="topBody">
 			<view class="header">
-				<view class="left">
-					<image class="img" mode="widthFix" src="../../static/home/avator.png"></image>
-				</view>
-				<view class="right">
-					<view class="nickname">
-						<text>{{myinfo.nickname}}</text>
-						<image src="../../static/me/icon_vip.png" mode="widthFix" />
-						<view class="siming">已实名</view>
-					</view>
-					<view class="join_date">
-						{{myinfo.join_name}}
-						<image src="../../static/me/arrow_right.png" mode="widthFix" />
+				<view class="infoBg">
+					<view class="left">
+						<image class="img" mode="widthFix" src="../../static/home/avator.png"></image>
 					</view>
-				</view>
-				<view class="dashang" @click="chkSel">
-					<view class="sel" v-if="sel == 1">
-						<view class="name">关闭<br />打赏</view>
-						<view class="block"></view>
+					<view class="right">
+						<view class="nickname">
+							<text>{{myinfo.nickname}}</text>
+							<image src="../../static/me/icon_vip.png" mode="widthFix" />
+							<view class="siming">已实名</view>
+						</view>
+						<view class="join_date">
+							{{myinfo.join_name}}
+							<image src="../../static/me/arrow_right.png" mode="widthFix" />
+						</view>
 					</view>
-					<view class="selno" v-else>
-						<view class="blockGray"></view>
-						<view class="name">开启<br />打赏</view>
+					<view class="dashang" @click="chkSel">
+						<view class="sel" v-if="sel == 1">
+							<view class="name">关闭<br />打赏</view>
+							<view class="block"></view>
+						</view>
+						<view class="selno" v-else>
+							<view class="blockGray"></view>
+							<view class="name">开启<br />打赏</view>
+						</view>
 					</view>
 				</view>
 			</view>

+ 1 - 1
pages/w3/box.vue

@@ -72,7 +72,7 @@
 						天,最多可完成{{item.num}}次探索。
 					</view>
 					<view class="act">
-						<block v-if="tab2 == 1">
+						<block v-if="tab2 == 1 && item.num_have < item.num">
 							<image class="icon" mode="widthFix" src="../../static/w3/tansuo.png"
 								@click="onDuihuan(item)"></image>
 						</block>

+ 1 - 1
pages/w3/invite.vue

@@ -55,7 +55,7 @@
 							<view class="bg"></view>
 							<text style="margin-top: 0rpx;font-size: 24rpx;color: #999999;">暂无数据</text>
 						</view>
-						<view v-else class="item" v-for="(item, index) in zt_list" :key="index">
+						<view class="item" v-for="(item, index) in zt_list" :key="index" v-if="index < 4">
 							<view class="info">
 								<view class="left">
 									<image class="img" src="../../static/w3/w3_1.png" mode="heightFix" />

+ 1 - 1
pages/w3/levRule.vue

@@ -2,7 +2,7 @@
 	<view class="page">
 		<view class="top">
 			<view class="bgnum">
-				{{myinfo.num_gmb+myinfo.num_gmd}}
+				{{myinfo.num_gmb}}
 			</view>
 		</view>
 		<view class="top2">

+ 51 - 7
pages/w3/ucenter.vue

@@ -8,7 +8,7 @@
 						<text class="nickname">{{myinfo.nickname}}</text>
 						<image class="iconV" mode="widthFix" src="../../static/w3/w3_icon_2.png"></image>
 					</view>
-					<view class="num">{{myinfo.num_gmb + myinfo.num_gmd}}</view>
+					<view class="num">{{myinfo.num_gmb}}</view>
 					<view class="desc">
 						可用数量
 						<image class="arrow" mode="widthFix" src="../../static/w3/wenhao.png"></image>
@@ -45,7 +45,7 @@
 		<view class="thread"></view>
 		<view class="thread"></view>
 
-		<view class="list_item" v-for="(item,index) in list">
+		<view class="list_item" v-for="(item,index) in list" v-if="index == 0">
 			<view class="item1">
 				<text class="left">{{item.name}}</text>
 				<text class="right">已拓中{{item.num_have}}/{{item.num}}</text>
@@ -53,8 +53,10 @@
 			<view class="item2">
 				<view class="left">
 					<image class="icon" mode="widthFix" :src="'../../static/w3/box/box_'+item.id+'.png'"></image>
-					<text class="name">待解锁:{{item.num_sign}}/{{item.num_task}}天</text>
-					<text class="time">开拓日期:{{item.tdate}}</text>
+					<block v-if="item.num_have > 0">
+						<text class="name">待解锁:{{item.num_sign}}/{{item.num_task}}天</text>
+						<text class="time">开拓日期:{{item.tdate}}</text>
+					</block>
 				</view>
 				<view class="right">
 					<view class="content">
@@ -62,8 +64,14 @@
 						天,最多可完成{{item.num}}次探索。
 					</view>
 					<view class="act">
-						<text class="sign_name"></text>
-						<!-- <image class="icon" mode="widthFix" src="../../static/w3/tansuo.png"></image> -->
+						<block v-if="myinfo.is_idcheck < 1">
+							<image class="icon" mode="widthFix" src="../../static/w3/tansuo.png" @click="onIdcheck()">
+							</image>
+						</block>
+						<block v-else-if="item.num_have < 1">
+							<image class="icon" mode="widthFix" src="../../static/w3/tansuo.png" @click="onGetBox()">
+							</image>
+						</block>
 					</view>
 				</view>
 			</view>
@@ -75,6 +83,7 @@
 		<view class="thread2"></view>
 
 
+		<DialogBoxW3 ref="DialogBoxW3"></DialogBoxW3>
 	</view>
 </template>
 
@@ -154,7 +163,7 @@
 					url: this.$apiHost + "/Box/getlist", //仅为示例,并非真实接口地址。
 					data: {
 						uuid: getApp().globalData.uuid,
-						tab: 2,
+						tab: 1,
 						type: 1,
 					},
 					header: {
@@ -190,12 +199,47 @@
 						});
 						if (res.data.success == "yes") {
 							this.loadInfo();
+							this.loadBoxList();
 						}
 					},
 					complete: (com) => {
 						uni.hideLoading();
 					},
 				});
+			},
+			onIdcheck() {
+				let that = this;
+				this.$refs['DialogBoxW3'].confirm({
+					title: '实名',
+					content: '您未实名,实名后领取50个暗物质开启星际通行证',
+					DialogType: 'inquiry',
+					btn1: '',
+					btn2: '',
+					animation: 0
+				}).then((res) => {
+
+					uni.navigateTo({
+						url: '/pages/my/idcheck',
+					})
+
+				})
+			},
+			onGetBox() {
+				let that = this;
+				this.$refs['DialogBoxW3'].confirm({
+					title: '探索',
+					content: '您还没有开通探索卡,快去激活吧!',
+					DialogType: 'inquiry',
+					btn1: '',
+					btn2: '',
+					animation: 0
+				}).then((res) => {
+
+					uni.navigateTo({
+						url: '/pages/w3/box',
+					})
+
+				})
 			}
 		}
 	}

BIN
static/w3/dialog_bg.png


BIN
static/w3/dialog_close.png