Selaa lähdekoodia

注册页面修改

渣渣宝 4 vuotta sitten
vanhempi
commit
7bdd596a95

+ 2 - 2
pages/conversation/conversation.vue

xqd
@@ -98,8 +98,8 @@
 				qiehuan: true,
 				index:0,
 				keyword: "",
-				list:[],
-				listPhone:[],
+				list:[{},{}],
+				listPhone:[{},{}],
 			}
 		},
 		methods: {

+ 3 - 2
pages/index/index.vue

xqd xqd
@@ -37,7 +37,7 @@
 						<!-- 标签 -->
 						<view style="height: 60rpx;padding-left: 40rpx;padding-right: 40rpx;display: flex;" >
 							<view v-for="item,index in doctorlabel" :key="index">
-								<u-tag :show="index<4" style="margin-left: 10rpx;" :text="doctorlabel[index].label_name" bg-color="#E5F5FF" color="#0B73B9" border-color="#ffffff" shape="circle " size="mini"/>
+								<u-tag :show="index<4" style="margin-left: 10rpx;" :text="item.label_name" bg-color="#E5F5FF" color="#0B73B9" border-color="#ffffff" shape="circle " size="mini"/>
 							</view>
 						</view>
 						<view class="pr m-xcenter plr20">
@@ -301,8 +301,9 @@
 				this.src = res.data.avatar;
 				this.docterInfo.eva_num = res.data.eva_num;
 				this.docterInfo.is_then = res.data.is_then;
-				console.log(res.data)
+				
 				this.doctorlabel = res.data.label;
+				console.log("res.data",this.doctorlabel)
 				this.docterInfo.sign = res.data.sign;
 				this.docterInfo.score = res.data.score;
 				this.docterInfo.service_days = res.data.service_days;

+ 1 - 0
pages/information/information.vue

xqd
@@ -84,6 +84,7 @@
 				...mapMutations(['logout']),
 				getInfo: async function(){
 					let res = await this.$request.get('doctor/doctorInfoEdit')
+					console.log(res)
 					this.imgList.push(res.data.avatar);
 					this.placeholder1=res.data.sign;
 					this.placeholder2=res.data.intro;

+ 5 - 16
pages/login/login.vue

xqd xqd xqd xqd xqd xqd
@@ -67,7 +67,7 @@
 					<text style="text-decoration:underline; color: #666666;" @click="goreg">注册账号</text>
 				</view>
 				<view style="width: 50%;text-align: center;">
-					<text style="text-decoration:underline ; color: #666666;" @click="ispwd">{{ispwdlogin?'验证码':'号密码'}}登录</text>
+					<text style="text-decoration:underline ; color: #666666;" @click="ispwd">{{ispwdlogin?'验证码':'手机号密码'}}登录</text>
 				</view>
 			</view>
 		</view>
@@ -179,7 +179,7 @@
 					});
 					this.$refs.runCode.$emit('runCode'); //触发倒计时(一般用于请求成功验证码后调用)
 					setTimeout(function() {
-						_this.$refs.runCode.$emit('runCode', 0); //假装模拟下需要 终止倒计时
+						// _this.$refs.runCode.$emit('runCode', 0); //假装模拟下需要 终止倒计时
 						// uni.showToast({
 						// 	icon: 'none',
 						// 	position: 'bottom',
@@ -259,6 +259,7 @@
 					} else {
 						uni.showToast({
 							icon: 'none',
+							position: 'bottom',
 							title: res.message
 						});
 						return false;
@@ -324,9 +325,10 @@
 							} else {
 								uni.showToast({
 									icon: 'none',
+									position: 'bottom',
 									title: res.message
 								});
-								return false; 
+								return false;
 							}
 						} else {
 							uni.showToast({
@@ -406,13 +408,6 @@
 							that.openid = res.data.openid
 							that.show = true
 						}
-					}else{
-						console.log('到我了!');
-						uni.showToast({
-							icon: 'none',
-							title: res.message
-						});
-						return false;
 					}
 				})
 			},
@@ -457,12 +452,6 @@
 						
 						}, 2000)
 					}
-				}else{
-					uni.showToast({
-						icon: 'none',
-						title: res.message
-					});
-					return false;
 				}
 			}
 		}

+ 70 - 21
pages/login/reg.vue

xqd xqd xqd xqd xqd
@@ -42,12 +42,22 @@
 				</view>
 				<input v-model="confirmpwd" placeholder="请再次输入密码" :password="true" style="height: 28rpx;" maxlength="6" />
 			</view>
+			<!-- 验证码 -->
+			<view style="padding-bottom: 36rpx;display: flex;border-bottom: 1rpx solid #E0E0E0;margin-bottom: 60rpx" >
+				<!-- 图标 手机图标-->
+				<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/Verification.png" style="width: 32rpx;height: 32rpx;margin-right: 20rpx;"></image>
+				<!-- 线条 方向是竖-->
+				<view style="margin-right: 20rpx;">
+					<u-line color="#D8D8D8" direction="col" />
+				</view>
+				<wInput v-model="verCode" type="number" maxlength="6" placeholder="请输入验证码" isShowCode ref="runCode" @setCode="getVerCode()"></wInput>
+			</view>
 		</view>
 		<!-- 按钮 -->
 		<view style="height: auto;padding: 0 80rpx;">
 			<!-- 登录 -->
 			<u-button @click="startReg()" type="primary" shape="circle" :loading="isRotate">注册并登录</u-button>
-			<view style="margin: 60rpx 0 80rpx 0;">
+			<view style="margin: 30rpx 0 40rpx 0;">
 				<u-button @click="toindex()" shape="circle" style="width: 45%;font-size: 30rpx;" hair-line="false">暂不登录</u-button>
 			</view>
 			<view style="width: 100%;text-align: center;">
@@ -69,22 +79,12 @@
 				phoneData: '', // 用户/电话
 				password: "", //密码
 				confirmpwd: "", //确认密码
-				isRotate: false, //是否加载旋转
+				verCode: "", //验证码
+				sourceVerCode:"",// 后台返回的验证码
+				isRotate:false
 			}
 		},
-		// onShow() {
-		// 	uni.checkSession({
-		// 		success() {
-		// 			console.log("已登录")
-		// 			return;
-		// 		},
-		// 		fail() {
-		// 			uni.navigateTo({
-		// 				url: "../doctor_related/doctor_info"
-		// 			})
-		// 		}
-		// 	})
-		// },
+		
 		components: {
 			wInput,
 			wButton,
@@ -93,7 +93,47 @@
 			_this = this;
 		},
 		methods: {
-			isShowAgree() {},
+			//验证码点击事件
+			getVerCode: async function() {
+				//获取验证码
+				if (_this.phoneData.length != 11) {
+					uni.showToast({
+						icon: 'none',
+						position: 'bottom',
+						title: '手机号不正确'
+					});
+					return false;
+				}
+				console.log("手机号",_this.phoneData)
+				let res = await this.$request.post("common/putverfiy", {
+					'phone': _this.phoneData
+				});
+				console.log("res.data",res.data)
+				if (res.status == 0) {
+					uni.setStorageSync('verfiyCode', );
+					this.sourceVerCode = res.data
+					uni.showToast({
+						icon: 'none',
+						position: 'bottom',
+						title: '验证码发送,请查收'
+					});
+					this.$refs.runCode.$emit('runCode'); //触发倒计时(一般用于请求成功验证码后调用)
+					setTimeout(function() {
+						// _this.$refs.runCode.$emit('runCode', 0); //假装模拟下需要 终止倒计时
+						// uni.showToast({
+						// 	icon: 'none',
+						// 	position: 'bottom',
+						// 	title: '模拟倒计时终止'
+						// });
+					}, 3000)
+				} else {
+					uni.showToast({
+						icon: 'none',
+						position: 'bottom',
+						title: '请求失败'
+					});
+				}
+			},
 			startReg() {
 				//注册
 				if (this.isRotate) {
@@ -108,6 +148,14 @@
 					});
 					return false;
 				}
+				if (this.verCode != this.sourceVerCode) {
+					uni.showToast({
+						icon: 'none',
+						position: 'bottom',
+						title: '验证码不正确'
+					});
+					return false;
+				}
 				if (this.password.length != 6) {
 					uni.showToast({
 						icon: 'none',
@@ -124,17 +172,18 @@
 					})
 					return false
 				}
-				console.log("注册成功")
-				_this.isRotate = true
-				setTimeout(function() {
-					_this.isRotate = false
-				}, 3000)
+				_this.isRotate = true//开始加载动画
+				
+				// setTimeout(function() {//三秒后关闭加载动画
+				// 	_this.isRotate = false
+				// }, 3000)
 			},
 			gologin() {
 				uni.navigateBack({
 					url: "login"
 				})
 			}
+			
 		}
 	}
 </script>

+ 2 - 2
pages/scheduling/month_Scheduling.vue

xqd
@@ -30,12 +30,12 @@
 					<u-button shape="circle" :custom-style="monthList[day+empty-1].nig==0 ? nullStyle : monthList[day+empty-1].nig==1 ? nigStyle :otherStyle " throttleTime="1000" @click="modify(3)">晚上</u-button>
 					<text>{{hospitalTimes.wan.nightStartTime}} 至 {{hospitalTimes.wan.nightEndTime}}</text>
 				</view>
-			</view>
+			</view>weis1
 		</u-popup>
 		
 		<!-- 顶部标题和按钮 -->
 		<view class="flex justify-between align-center" style="margin: 40rpx 28rpx;">
-			<view style="font-size: 50rpx;flex-grow: 2;" @click="jumpYear">{{year}}年{{month+1}}月</view>
+			<view style="font-size: 50rpx;flex-grow: 2;" @click="selectYear">{{year}}年{{month+1}}月</view>
 			<view class="flex justify-around align-center" style="flex-grow: 3;">
 				<view class="drop-down" @click="hospitalListShow=!hospitalListShow">
 					<text>{{hospital}}</text>

+ 0 - 4
pages/service/more.vue

xqd
@@ -106,10 +106,6 @@
 
 		<!-- 图文咨询 -->
 		<view class="v" v-show="showList[1].flag&&(SubsectionList[curNow].name=='图文咨询')">
-			<!-- 标题 -->
-			<view class="title">图文咨询</view>
-			<!-- 线 -->
-			<u-line color="#e7e7e7" />
 			<!-- 基础价格 -->
 			<view class="list">
 				<!-- 左 -->