浏览代码

首页验证更改

渣渣宝 4 年之前
父节点
当前提交
ed21c3e078
共有 3 个文件被更改,包括 47 次插入32 次删除
  1. 26 9
      pages/index/index.vue
  2. 4 11
      pages/login/reg.vue
  3. 17 12
      pages/scheduling/month_Scheduling.vue

+ 26 - 9
pages/index/index.vue

xqd xqd xqd
@@ -231,7 +231,7 @@
 		data() {
 			return {
 				docterInfo: {
-					name: "未登录",
+					name: "用户名",
 					avatar: "",
 					eva_num: "0",
 					is_then: "",
@@ -303,6 +303,7 @@
 					}
 
 					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.password)
@@ -764,19 +765,35 @@
 			},
 			//个人信息 右上角的编辑按钮
 			grxx() {
-				if (this.judgerenzheng()) {
-					uni.navigateTo({
-						url: '/pages/information/information'
-					})
-				}
+
+				uni.navigateTo({
+					url: '/pages/information/information'
+				})
+
 			},
 			//点击认证中心
 			gorz() {
-				if (this.judgerenzheng()) {
-					uni.navigateTo({
-						url: '/pages/login/doctorRenzheng'
+				if (!this.hasLogin) {
+					uni.showModal({
+						title: "提示",
+						content: "尚未登录,请前往登录",
+						confirmText: "去登录",
+						showCancel: true,
+						success(res) {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: "../login/login"
+								})
+							}
+
+						}
 					})
+					return false;
 				}
+				uni.navigateTo({
+					url: '/pages/login/doctorRenzheng'
+				})
+
 			},
 			evaluate() {
 				if (this.judgerenzheng()) {

+ 4 - 11
pages/login/reg.vue

xqd xqd xqd
@@ -58,10 +58,7 @@
 			<!-- 登录 -->
 			<u-button @click="startReg()" type="primary" shape="circle" :loading="isRotate">注册并登录</u-button>
 			<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;">
-				<text style="text-decoration:underline; color: #666666;" @click="gologin">去登录</text>
+				<u-button @click="toindex()" shape="circle" style="width: 45%;font-size: 30rpx;" hair-line="false">暂不注册</u-button>
 			</view>
 
 		</view>
@@ -111,8 +108,8 @@
 		},
 		methods: {
 			toindex() {
-				uni.switchTab({
-					url: "../index/index"
+				uni.navigateBack({
+					delta:1
 				})
 			},
 			//验证码点击事件
@@ -255,11 +252,7 @@
 				// 	_this.isRotate = false
 				// }, 3000)
 			},
-			gologin() {
-				uni.navigateBack({
-					url: "login"
-				})
-			}
+			
 
 		}
 	}

+ 17 - 12
pages/scheduling/month_Scheduling.vue

xqd xqd xqd xqd
@@ -4,7 +4,7 @@
 		<u-select v-model="hospitalListShow" :list="hospitalList" @confirm="setSelectHospital"></u-select>
 		<u-select v-model="timeShow" mode="mutil-column-auto" :list="timeList" @confirm="yearConfirm" :default-value="defaultIndex"></u-select>
 		<!--日视图弹出层-->
-		<u-popup v-model="popupShow" mode="bottom" border-radius="50">
+		<u-popup v-model="popupShow" mode="bottom" border-radius="50" @close="closePopup">
 			<!-- <view style="margin: 20rpx 0;" class="flex justify-center align-center">
 				<u-icon name="arrow-down" @click="close()"></u-icon>
 			</view> -->
@@ -182,6 +182,13 @@
 			}
 		},
 		methods: {
+			closePopup(){
+				saveDayType.mon = 0
+				saveDayType.aft = 0
+				saveDayType.nig = 0
+				
+			},
+			
 			close: async function() {
 				this.popupShow = false;
 				let SaveLists = [];
@@ -424,7 +431,6 @@
 			getimePate(str) {
 				var date = new Date(str.replace(/-/g, '/'));
 				return Date.parse(date);
-
 			},
 
 			getListTime: async function(org_id) {
@@ -552,49 +558,48 @@
 				this.saveDay = this.monthList[this.day + this.empty - 1];
 				if (id == 0) {
 					this.monthList[this.day + this.empty - 1].mon = 1 //
-					this.schedulingList[this.day - 1].mon = this.hospitalID
+					// this.schedulingList[this.day - 1].mon = this.hospitalID
 					this.saveDayType.mon = this.hospitalID;
 
 					this.monthList[this.day + this.empty - 1].aft = 1 //
-					this.schedulingList[this.day - 1].aft = this.hospitalID
+					// this.schedulingList[this.day - 1].aft = this.hospitalID
 					this.saveDayType.aft = this.hospitalID;
 
 					this.monthList[this.day + this.empty - 1].nig = 1 //
-					this.schedulingList[this.day - 1].nig = this.hospitalID
+					// this.schedulingList[this.day - 1].nig = this.hospitalID
 					this.saveDayType.nig = this.hospitalID;
 				} else {
-
 					switch (id) {
 						case 1:
 							if (this.monthList[this.day + this.empty - 1].mon == 1) { //当这个按钮状态为1 选择了医院且是当前医院
 								this.monthList[this.day + this.empty - 1].mon = 0 //就取消选择
-								this.schedulingList[this.day - 1].mon = 0
+								// this.schedulingList[this.day - 1].mon = 0
 								this.saveDayType.mon = 0;
 							} else if (this.monthList[this.day + this.empty - 1].mon == 0) {
 								this.monthList[this.day + this.empty - 1].mon = 1 //
-								this.schedulingList[this.day - 1].mon = this.hospitalID
+								// this.schedulingList[this.day - 1].mon = this.hospitalID
 								this.saveDayType.mon = this.hospitalID;
 							}
 							break;
 						case 2:
 							if (this.monthList[this.day + this.empty - 1].aft == 1) { //当这个按钮状态为1 选择了医院且是当前医院
 								this.monthList[this.day + this.empty - 1].aft = 0 //就取消选择
-								this.schedulingList[this.day - 1].aft = 0
+								// this.schedulingList[this.day - 1].aft = 0
 								this.saveDayType.aft = 0;
 							} else if (this.monthList[this.day + this.empty - 1].aft == 0) {
 								this.monthList[this.day + this.empty - 1].aft = 1 //
-								this.schedulingList[this.day - 1].aft = this.hospitalID
+								// this.schedulingList[this.day - 1].aft = this.hospitalID
 								this.saveDayType.aft = this.hospitalID;
 							}
 							break;
 						case 3:
 							if (this.monthList[this.day + this.empty - 1].nig == 1) { //当这个按钮状态为1 选择了医院且是当前医院
 								this.monthList[this.day + this.empty - 1].nig = 0 //就取消选择
-								this.schedulingList[this.day - 1].nig = 0
+								// this.schedulingList[this.day - 1].nig = 0
 								this.saveDayType.nig = 0;
 							} else if (this.monthList[this.day + this.empty - 1].nig == 0) {
 								this.monthList[this.day + this.empty - 1].nig = 1 //
-								this.schedulingList[this.day - 1].nig = this.hospitalID
+								// this.schedulingList[this.day - 1].nig = this.hospitalID
 								this.saveDayType.nig = this.hospitalID;
 							}
 							break;