Explorar el Código

Ltb2020年11月9日15:58:56 完善登录界面

老狐\25396 hace 4 años
padre
commit
6fd8a353c8

+ 3 - 2
common/env.js

xqd
@@ -1,4 +1,5 @@
-export const envHost = 'https://xiaoyunimg.top/api/v2/'; //开发环境
+export const envHost = 'http://182.92.112.142/api/v2/'; //开发环境
+// export const envHost = 'https://t5.9026.com/api/v2/';
 // export const imgHost='https://www.juyinzhengxin.com/';
 export const imgHost = 'https://zhengda.oss-cn-chengdu.aliyuncs.com/juyin';
-export const imglocal = 'https://xiaoyunimg.top/';
+export const imglocal = 'http://182.92.112.142/';

+ 8 - 7
components/watch-input.vue

xqd xqd xqd
@@ -175,8 +175,8 @@
 		align-items: center;
 		/* height: 36rpx; */   /* Input 高度 */
 		color: #333333;
-		padding: 30rpx 32rpx;
-		margin:15rpx 0;
+		/* padding: 30rpx 32rpx; */
+		/* margin:15rpx 0; */
 	}
 	.img{
 		width: 32rpx;
@@ -187,9 +187,10 @@
 		flex: 1;
 		text-align: left;
 		font-size: 28rpx;
+		height: 28rpx;
 		/* line-height: 100rpx; */
 		padding-right: 10rpx;
-		margin-left: 20rpx;
+		/* margin-left: 20rpx; */
 	}
 	.vercode {
 		color: rgba(0,0,0,0.7);
@@ -200,9 +201,9 @@
 		color: rgba(0,0,0,0.4) !important;
 	}
 	.oBorder{
-	    border: none;
-	    border-radius: 2.5rem ;
-	    -webkit-box-shadow: 0 0 60rpx 0 rgba(43,86,112,.1) ;
-	    box-shadow: 0 0 60rpx 0 rgba(43,86,112,.1) ;
+	    /* border: none; */
+	    /* border-radius: 2.5rem ; */
+	    /* -webkit-box-shadow: 0 0 60rpx 0 rgba(43,86,112,.1) ; */
+	    /* box-shadow: 0 0 60rpx 0 rgba(43,86,112,.1) ; */
 	}
 </style>

+ 1 - 1
main.js

xqd
@@ -11,7 +11,7 @@ Vue.use(uView);
 
 Vue.config.productionTip = false;
 
-//挂载全局对象
+//挂载全局对象1
 //Vue.prototype.$store = store
 Vue.prototype.$request = request
 Vue.prototype.$util = util

+ 3 - 2
pages.json

xqd xqd
@@ -79,7 +79,8 @@
 		 {
 			"path": "pages/menzhen/menzhen",
 			"style": {
-				"navigationBarTitleText": "门诊预约"
+				"navigationBarTitleText": "门诊预约",
+				"onReachBottomDistance":20
 			}
 		 },
 		//门诊预约详情   
@@ -195,7 +196,7 @@
 		"current": 0, //当前激活的模式(list 的索引项)
 		"list": [{
 			"name": "test", //模式名称
-			"path": "pages/zixun/xiangqing", //启动页面,必选
+			"path": "pages/login/login", //启动页面,必选
 			"query": "" //启动参数,在页面的onLoad函数里面得到
 		}]
 	}

+ 7 - 0
pages/conversation/conversation.vue

xqd xqd
@@ -53,6 +53,9 @@
 		},
 		mounted() {
 
+		},
+		onShow() {
+			this.getcnversationList()
 		},
 		data() {
 			return {
@@ -81,6 +84,10 @@
 				uni.navigateTo({
 					url: "call"
 				})
+			},
+			getcnversationList:async function(){
+				let res =await this.$request.post("/doctor/getUserListMsg")
+				console.log(res)
 			}
 			
 		}

+ 205 - 42
pages/conversation/conversationWindow.vue

xqd xqd xqd
@@ -1,69 +1,93 @@
 <template>
 	<view class="main">
-		<view class="cu-chat">
-			<view class="cu-item self">
-				<view class="main">
-					<view class="content bg-green shadow">
-						<text>喵喵喵!喵喵喵!喵喵喵!喵喵!喵喵!!喵!喵喵喵!</text>
-					</view>
+		<view class="cu-chat" v-for="(item,index) in messages" :key="index">
+			<view class="cu-item self" v-if="item.receiverId!=currentUser.uuid">
+				<view class="time-lag">
+					{{renderMessageDate(message, index)}}
 				</view>
-				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
-			</view>
-			<view class="cu-item">
-				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
-				<view class="main">
-					<view class="content shadow">
-						<text>喵喵喵!喵喵喵!</text>
+				<view class="main" v-if="item.type=='text'">
+					<view class="content bg-green shadow">
+						<text>{{item.payload.text}}</text>
 					</view>
 				</view>
-			</view>
-			<view class="cu-item self">
-				<view class="main">
-					<image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" class="radius" mode="widthFix"></image>
+				<view class="main" v-else-if="item.type =='image'">
+					<image :src="item.payload.url" @click="yulan(item.payload.url)" :style="'width:'+item.payload.width+'rpx;height'+item.payload.height+'rpx;'"
+					 class="radius" mode="widthFix"></image>
 				</view>
-				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
-			</view>
-			<view class="cu-item self">
-				<view class="main">
-					<view class="action text-bold text-grey">
-						3"
-					</view>
-					<view class="content shadow">
-						<text class="cuIcon-sound text-xxl padding-right-xl"> </text>
-					</view>
+				<view class="main" v-else="item.type =='audio'">
+					<GoEasyAudioPlayer :src="item.payload.url" :duration="item.payload.duration" />
 				</view>
-				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
+				<view class="cu-avatar radius" :style="'background-image:url('+currentUser.avatar+');'"></view>
 			</view>
-			<view class="cu-item">
+			<view class="cu-item" v-else>
 				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
-				<view class="main">
+				<view class="main" v-if="item.type=='text'">
 					<view class="content shadow">
-						xxxxxxs
+						<text>{{item.payload.text}}</text>
 					</view>
 				</view>
+				<view class="main" v-else-if="item.type =='image'">
+					<image :src="item.payload.url" @click="yulan(item.payload.url)" :style="'width:'+item.payload.width+'rpx;height'+item.payload.height+'rpx;'"
+					 class="radius" mode="widthFix"></image>
+				</view>
+				<view class="main" v-else="item.type =='audio'">
+					<GoEasyAudioPlayer :src="item.payload.url" :duration="item.payload.duration" />
+				</view>
 			</view>
 		</view>
-		<view :class="InputBottom!=0?'cu-bar foot input cur':'cu-bar foot input'" :style="'bottom:'+InputBottom+'px'">
+		<view :class="InputBottom!=0?'cu-bar foot tab input cur':'cu-bar foot input'" :style="'bottom:'+InputBottom+'px'">
 			<view class="action" @click="sendvoice">
 				<text class="cuIcon-sound text-grey"></text>
 			</view>
-			<input v-if="!isvoice" class="solid-bottom" @focus="InputFocus" @blur="InputBlur" :adjust-position="false" :focus="false"
-			 maxlength="300" placeholder="请输入" cursor-spacing="10"></input>
-			<button class="flex-sub" style="font-size: 30rpx; height: 64rpx;padding: 0;" v-else>按住发送语音</button>
-			<view class="action" style="margin-right: 20rpx;">
+			<input v-if="!isvoice" v-model="keyword" class="solid-bottom" @focus="InputFocus" @blur="InputBlur" :disabled="isinput"
+			 :adjust-position="false" :focus="false" maxlength="300" :placeholder="textinput" cursor-spacing="10"></input>
+			<button class="flex-sub" style="font-size: 30rpx; height: 64rpx;padding: 0;" @touchstart.stop="onRecordStart"
+			 @touchend.stop="onRecordEnd" v-else>{{audio.recording ? '松开发送':'按住发送语音'}}</button>
+			<view class="action" style="margin-right: 20rpx;" @click="sendImage">
 				<text class="cuIcon-picfill text-grey"></text>
 			</view>
-			<button class="cu-btn bg-green shadow">发送</button>
+			<button class="cu-btn bg-green shadow" @click="sendMessage">发送</button>
 		</view>
 	</view>
 </template>
 
 <script>
+	import {
+		sendMessages
+	} from "../../common/goeasyimutil.js"
+	import GoEasyAudioPlayer from "../../components/GoEasyAudioPlayer/GoEasyAudioPlayer.vue";
+	const recorderManager = uni.getRecorderManager()
 	export default {
 		components: {
-
+			GoEasyAudioPlayer
 		},
-		onLoad() {
+		onLoad(op) {
+			this.imService = getApp().globalData.imService;
+			this.doctorInfo = JSON.parse(op.doctor)
+			//对话数据
+			this.friend = {
+				uuid: this.doctorInfo.id,
+				name: this.doctorInfo.name,
+				avatar: this.doctorInfo.avatar
+			};
+			this.currentUser = this.imService.currentUser;
+			let privateMessages = this.imService.getPrivateMessages(this.friend.uuid);
+			this.messages = privateMessages.sentMessages;
+			this.pendingMessages = privateMessages.pendingMessages;
+			uni.setNavigationBarTitle({
+				title: this.friend.name
+			});
+
+			this.initialListeners();
+
+
+			//每次进入聊天页面,总是滚动到底部
+			this.scrollToBottom()
+
+			//收到的消息设置为已读
+			if (this.messages.length != 0) {
+				this.imService.markPrivateMessageAsRead(this.friend.uuid);
+			}
 
 		},
 		mounted() {
@@ -73,10 +97,41 @@
 			return {
 				keyword: "",
 				InputBottom: 0,
-				isvoice: false
+				isvoice: false,
+				textinput: "请输入",
+				isinput: false,
+				messages: [],
+				self_messages: [],
+				friend: null,
+				currentUser: null,
+				imService: null,
+				audio: {
+					//语音录音中
+					recording: false,
+				},
+				doctorInfo: {}
+			}
+		},
+		onPullDownRefresh: function(e) {
+			this.loadMoreHistoryMessage();
+		},
+		onUnload() {
+			//退出聊天页面之前,清空页面传入的监听器
+			if (this.imService) {
+				this.imService.onNewPrivateMessageReceive = (friendId, message) => {};
 			}
 		},
 		methods: {
+			renderMessageDate(message, index) {
+				if (index === 0) {
+					return this.formatDate(message.timestamp)
+				} else {
+					if (message.timestamp - this.messages[index - 1].timestamp > 5 * 60 * 1000) {
+						return this.formatDate(message.timestamp)
+					}
+				}
+				return ''
+			},
 			InputFocus(e) {
 				this.InputBottom = e.detail.height
 			},
@@ -85,13 +140,121 @@
 			},
 			sendvoice() {
 				this.isvoice = !this.isvoice
-			}
+			},
+			subscribeMessage() { //订阅消息
+
+			},
+			yulan(url) {
+				uni.previewImage({
+					urls: [url],
+					current: url
+				})
+			},
+			initialListeners() {
+				//传入监听器,收到一条私聊消息总是滚到到页面底部
+				this.imService.onNewPrivateMessageReceive = (friendId, message) => {
+					if (friendId == this.friend.uuid) {
+						this.imService.markPrivateMessageAsRead(friendId);
+						//收到新消息,是滚动到最底部
+						this.scrollToBottom()
+					}
+				};
+				// 录音监听器
+				this.initRecorderListeners();
+			},
+			initRecorderListeners() {
+				let self = this;
+				// 监听录音开始
+				recorderManager.onStart(function() {
+					self.audio.recording = true;
+				});
+
+				//录音结束后,发送
+				recorderManager.onStop(function(res) {
+					console.log(res)
+					self.audio.recording = false;
+					self.imService.sendPrivateAudioMessage(self.friend.uuid, res)
+				});
+
+				// 监听录音报错
+				recorderManager.onError(function(res) {
+					console.log("录音报错:", res);
+				})
+			},
+			onRecordStart(event) {
+				try {
+					recorderManager.start();
+				} catch (e) {
+					uni.showModal({
+						title: '发送语音错误',
+						content: '请联系客服'
+					});
+				}
+				event.preventDefault();
+			},
+			onRecordEnd() {
+				try {
+					recorderManager.stop();
+				} catch (e) {
+					uni.showModal({
+						title: '发送语音错误',
+						content: '请联系客服'
+					});
+				}
+			},
+			sendMessage() { //发送消息
+				if (this.keyword.trim() != '') {
+					console.log(this.friend.uuid)
+					this.imService.sendPrivateTextMessage(this.friend.uuid, this.keyword);
+				}
+				this.keyword = "";
+			},
+			scrollToBottom() {
+				this.$nextTick(function() {
+					uni.pageScrollTo({
+						scrollTop: 2000000,
+						duration: 10
+					})
+				})
+			},
+			sendImage() {
+				uni.chooseImage({
+					count: 1,
+					success: (res) => {
+						this.imService.sendPrivateImageMessage(this.friend.uuid, res);
+					}
+				})
+			},
+			loadMoreHistoryMessage() { //历史消息
+				let lastMessageTimeStamp = Date.now();
+				let lastMessage = this.messages[0];
+				if (lastMessage) {
+					lastMessageTimeStamp = lastMessage.timestamp;
+				}
+				var currentLength = this.messages.length;
+				let promise = this.imService.loadPrivateHistoryMessage(this.friend.uuid, lastMessageTimeStamp);
+				promise.then(messages => {
+					if (messages.length == currentLength) {
+						this.allHistoryLoaded = true
+					}
+					this.messages = messages;
+					uni.stopPullDownRefresh();
+				}).catch(e => {
+					console.log(e)
+					uni.stopPullDownRefresh();
+				})
+			},
 		}
 	};
 </script>
 
-<style scoped lang="scss">
+<style lang="scss">
 	page {
 		padding-bottom: 100rpx;
 	}
+
+	.time-lag {
+		font-size: 20rpx;
+		text-align: center;
+	}
 </style>

+ 35 - 36
pages/index/index.vue

xqd xqd xqd xqd xqd xqd
@@ -10,9 +10,8 @@
 					<view v-if="true" class="m-bg-white bdr4 pb20 header-box" style="border-radius: 32rpx;">
 						<view class="plr20 pt20 m-dpflex m-justify-start " style="margin-bottom: 60rpx;">
 							<view>
-							 
 								<image binderror="_binderror" mode="scaleToFill" :src="src" style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
-								<view v-if="!docterInfo.is_then" class="flex justify-center align-center" style="border-radius:30rpx ;font-size: 20rpx;padding: 10rpx;background-color: #EEAA3F;color: #FFFFFF;position: relative;top: -20rpx;"
+								<view v-if="!renzheng" class="flex justify-center align-center" style="border-radius:30rpx ;font-size: 20rpx;padding: 10rpx;background-color: #EEAA3F;color: #FFFFFF;position: relative;top: -20rpx;"
 								 @click="gorz">未认证</view>
 								<view v-else class="flex justify-center align-center" style="border-radius:30rpx ;font-size: 20rpx;padding: 10rpx;background-color: #84BB43;color: #FFFFFF;position: relative;top: -20rpx;">已认证</view>
 							</view>
@@ -142,18 +141,23 @@
 				 @touchend.prevent="touchend" class="padding-lr-sm padding-tb-sm bg-white margin-top-sm" style="border-radius: 32rpx;">
 					<view class="flex justify-start align-center">
 						<!-- 1为订单通知 2为系统通知 3为通知类型 -->
-						<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/ddtz.png" v-if="item.type==1" style="width: 30rpx;height: 30rpx;"></image>
-						<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/xttz.png" v-else-if="item.type==2" style="width: 30rpx;height: 30rpx;"></image>
+						<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/ddtz.png" v-if="item.type=='电话订单'||item.type=='图文订单'" style="width: 30rpx;height: 30rpx;"></image>
+						<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/xttz.png" v-else-if="item.type=='错误'"style="width: 30rpx;height: 30rpx;"></image>
 						<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/home/tzlx.png" v-else style="width: 30rpx;height: 30rpx;"></image>
-						<text class="text-lg margin-left-xs">{{item.type}}</text>
+						<text class="text-lg margin-left-xs" style="margin-right: 20rpx;">{{item.type}}</text>
+						<view v-if="item.status=='未读'" class="flex align-center">
+							<view style="width: 14rpx;height: 14rpx;border-radius: 50%;background-color:#FF4F61 ;"></view>
+							<text class="margin-left-xs" style="font-size: 24rpx;color: #FF4F61;">{{item.status}}</text>
+						</view>
+						<view v-else>
+							<text class="margin-left-xs" style="font-size: 24rpx;color: #747474;">{{item.status}}</text>
+						</view>
 						<text class="flex-sub text-right">{{item.created_at}}</text>
 					</view>
 					<view class="margin-top-sm">
 						{{item.content}}
 					</view>
-					<view class="text-right" style="position: relative">
-						<u-badge size="mini" :absolute="false" type="error" :is-dot="true"></u-badge><text class="margin-left-xs">{{item.status}}</text>
-					</view>
+
 				</view>
 			</view>
 			<view class="cu-tabbar-height"></view>
@@ -192,14 +196,14 @@
 					name: "",
 					avatar: "",
 					eva_num: "",
-					is_then: false,
+					is_then: "",
 					label: "",
 					sign: "",
 					score: "",
 					service_days: "",
 					service_persons: ""
 				},
-				page:1,
+				page: 1,
 				docterMessageList: [],
 				//认证弹窗
 				rzModal: false,
@@ -261,12 +265,7 @@
 				this.docterInfo.name = res.data.name;
 				this.src = res.data.avatar;
 				this.docterInfo.eva_num = res.data.eva_num;
-				if(res.data.is_then==0){
-					this.docterInfo.is_then = false;
-				}else{
-					this.docterInfo.is_then = true;
-				}
-				
+				this.docterInfo.is_then = res.data.is_then;
 				this.docterInfo.label = res.data.label;
 				this.docterInfo.sign = res.data.sign;
 				this.docterInfo.score = res.data.score;
@@ -274,22 +273,22 @@
 				this.docterInfo.service_persons = res.data.service_persons;
 			},
 			getDocterMessage: async function() {
-			 
+
 				let res = await this.$request.post("docterMessage/docterMessageList", {
 					curPage: this.page,
 					pageSize: 10
 				});
-				if(res.data===null){
+				if (res.data === null) {
 					uni.showToast({
-						title:'到底了',
-						duration:5000,
-						icon:'none'
+						title: '到底了',
+						duration: 5000,
+						icon: 'none'
 					})
 					return false;
-				}	 
-				 this.docterMessageList=this.docterMessageList.concat(res.data)
-			
-	 
+				}
+				this.docterMessageList = this.docterMessageList.concat(res.data)
+
+
 				// this.docterMessageList = res.data
 				// console.log('我是',this.docterMessageList);
 			},
@@ -299,21 +298,21 @@
 				console.log(res);
 				if (res.message == "success") {
 					uni.showToast({
-						title:'操作完成',
-						duration:2000,
-						icon:'none'
+						title: '操作完成',
+						duration: 2000,
+						icon: 'none'
 					})
-					this.page=1;
-					this.docterMessageList=[];
+					this.page = 1;
+					this.docterMessageList = [];
 					this.getDocterMessage();
-				}else if(res.message == '操作失败!'){
+				} else if (res.message == '操作失败!') {
 					uni.showToast({
-						title:'操作完成',
-						duration:2000,
-						icon:'none'
+						title: '操作完成',
+						duration: 2000,
+						icon: 'none'
 					})
-					this.page=1;
-					this.docterMessageList=[];
+					this.page = 1;
+					this.docterMessageList = [];
 					this.getDocterMessage();
 				}
 			},

+ 1 - 1
pages/information/information.vue

xqd
@@ -114,7 +114,7 @@
 				     success: (res) => {
 						 let tempFilePaths = res.tempFilePaths;		 
 							const uploadTask = wx.uploadFile({
-								 url: 'https://xiaoyunimg.top/api/v2/Common/uploadFile',
+								 url: 'http://182.92.112.142/api/v2/Common/uploadFile',
 								 filePath: tempFilePaths[0],
 								 name: 'file',
 								 success: function (uploadFileRes) { 

+ 0 - 96
pages/login/css/main.css

xqd
@@ -1,96 +0,0 @@
-.content {
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	/* margin-top: 128rpx; */
-}
-
-/* 头部 logo */
-.header {
-	width: 161rpx;
-	height: 161rpx;
-	box-shadow: 0rpx 0rpx 60rpx 0rpx rgba(0, 0, 0, 0.1);
-	border-radius: 50%;
-	background-color: #000000;
-	margin-top: 80rpx;
-	margin-bottom: 72rpx;
-	margin-left: auto;
-	margin-right: auto;
-}
-
-.header image {
-	width: 161rpx;
-	height: 161rpx;
-	border-radius: 50%;
-}
-
-/* 主体 */
-.main {
-	display: flex;
-	flex-direction: column;
-	padding-left: 70rpx;
-	padding-right: 70rpx;
-}
-
-.tips {
-	color: #999999;
-	font-size: 28rpx;
-	margin-top: 64rpx;
-	margin-left: 48rpx;
-}
-
-/* 登录按钮 */
-.wbutton {
-	margin-top: 20rpx;
-}
-
-/* 其他登录方式 */
-.other_login {
-	display: flex;
-	flex-direction: row;
-	justify-content: center;
-	align-items: center;
-	margin-top: 256rpx;
-	text-align: center;
-}
-
-.login_icon {
-	border: none;
-	font-size: 64rpx;
-	margin: 0 64rpx 0 64rpx;
-	color: rgba(0, 0, 0, 0.7)
-}
-
-.wechat_color {
-	color: #83DC42;
-}
-
-.weibo_color {
-	color: #F9221D;
-}
-
-.github_color {
-	color: #24292E;
-}
-
-/* 底部 */
-.footer {
-	display: flex;
-	flex-direction: row;
-	justify-content: flex-end;
-	align-items: center;
-	font-size: 28rpx;
-	margin-top: 25rpx;
-	color: rgba(0, 0, 0, 0.7);
-	text-align: center;
-	height: 40rpx;
-	line-height: 40rpx;
-}
-.footer view{
-	margin-right: 25rpx;
-}
-.footer text {
-	font-size: 24rpx;
-	margin-left: 15rpx;
-	margin-right: 15rpx;
-}

+ 40 - 44
pages/login/doctorRenzheng.vue

xqd xqd xqd xqd xqd
@@ -28,10 +28,10 @@
 		<view style="padding: 0 28rpx;">
 			<view class="flex align-center" style="margin: 20rpx 0;">
 				<view style="width: 30%;font-weight: bold;" class="felx align-center">
-					<view>医生姓名</view>
+					<view>医生姓名</view>
 				</view>
 				<view style="width: 70%;">
-					<u-input v-model="form.name"  type="text" :border="false" placeholder="请填写真实姓名" input-align="right" />
+					<u-input v-model="form.name" type="text" :border="false" placeholder="请填写真实姓名" input-align="right" />
 				</view>
 			</view>
 			<u-line color="#f0f2f5" />
@@ -260,18 +260,6 @@
 					name: '', //姓名
 					sex: '', //性别
 					ID: '', //身份证
-					works:[  // 入库数组
-						{ 
-							hospital: '', //医院id
-							department: '', //科室id
-							qualifications: '' //资质id
-						},
-						{ 
-							hospital: '', //医院id
-							department: '', //科室id
-							qualifications: '' //资质id
-						}
-					],
 					work1: { //工作机构
 						name: '工作机构一',
 						province: '选择省份', //省
@@ -290,12 +278,10 @@
 						department: '科室名称', //科室
 						qualifications: '默认资质' //资质
 					},
-					// certificate: [], //证书
-					// idPhoto: [], //身份证
-					// doctorQualification: [] ,//医生资格
-					practice: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg",'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg'], // 医师执业证书(清晰照片和信息页面) 必须两个都传,不可以只上传一个
-					card_photo: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg","https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg"], //身份证 , 必须两个都传,不可以只上传一个
-					is_quail: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg","https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg"] //医生资格, 必须两个都传,不可以只上传一个
+					fromwork: [], // 向后台传的科室和资质
+					certificate: [], //证书
+					idPhoto: [], //身份证
+					doctorQualification: [] //医生资格
 				},
 				//性别选择
 				sexshow: false,
@@ -559,42 +545,40 @@
 			},
 			//医院选择器
 			yy(e) {
-				console.log('打开了医院选择器1',e)
+				console.log('打开了医院选择器1')
 				this.form.work1.hospital = e[0].label
-				this.form.works[0].hospital = e[0].value;
-				 
+				this.work[0].id = e[0].value
 				this.departmentconfirm()
 			},
 			yy2(e) {
-				console.log('打开了医院选择器2',e)
+				console.log('打开了医院选择器2')
 				this.form.work2.hospital = e[0].label
-				this.form.works[1].hospital = e[0].value;
+				this.work[1].id = e[0].value
 				this.departmentconfirm()
 			},
 			//科室
 			ks(e) {
-				console.log('打开了科室选择器1',e)
+				console.log('打开了科室选择器1')
 				this.form.work1.department = e[0].label
-				this.form.works[0].department = e[0].value;
-				
+				this.work[0].depart = e[0].value
 				this.qualificationsconfirm()
 			},
 			ks2(e) {
-				console.log('打开了科室选择器2',e)
+				console.log('打开了科室选择器2')
 				this.form.work2.department = e[0].label
-				this.form.works[1].department = e[0].value;
+				this.work[1].depart = e[0].value
 				this.qualificationsconfirm()
 			},
 			//资质
 			zz(e) {
 				console.log('打开了资质选择器1')
 				this.form.work1.qualifications = e[0].label
-				this.form.works[0].qualifications = e[0].value;
+				this.work[0].qualifications = e[0].value
 			},
 			zz2(e) {
 				console.log('打开了资质选择器2')
 				this.form.work2.qualifications = e[0].label
-				this.form.works[1].qualifications = e[0].value;
+				this.work[1].qualifications = e[0].value
 			},
 			/*******************接口*********************/
 			//省
@@ -680,20 +664,32 @@
 			},
 			// 保存
 			bc: async function() {
-				 
-				if(typeof this.form.works != 'string'){
-					this.form.works = JSON.stringify(this.form.works);
+				console.log(this.province);
+				return false;
+				// 提交需要参数
+				let froms = {
+					doctor_name: '', //姓名
+					doctor_sex: 1, //性别,1男,2女
+					doctor_card: '', //身份证
+					work: [{ //工作机构
+						id: '医院的id',
+						depart: '科室id', //省
+						qualifications: '资质id', //市
+
+					}, {
+						id: '医院的id',
+						depart: '科室id', //省
+						qualifications: '资质id', //市
+					}],
+					practice: [], // 医师执业证书(清晰照片和信息页面) 必须两个都传,不可以只上传一个
+					card_photo: [], //身份证 , 必须两个都传,不可以只上传一个
+					is_quail: [] //医生资格, 必须两个都传,不可以只上传一个
 				}
-				
 				// 注意要 {'doctor_name':'ddd',doctor_sex:1....}分开传值因为我方便拦截垃圾数据
-				let res = await this.$request.post('doctor/addthen', this.form);
-				console.log('res...:',res);
-				if(res.status==0){
-					uni.switchTab({
-						url: '../index/index'
-					})
-				}
-				
+				let res = await this.$request.post('doctor/addthen', froms);
+				uni.switchTab({
+					url: '../index/index'
+				})
 			},
 			ChooseImage() {
 				let that = this;

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 61 - 43
pages/login/login.vue


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 51 - 20
pages/login/reg.vue


+ 58 - 17
pages/menzhen/menzhen.vue

xqd xqd xqd xqd xqd xqd
@@ -10,14 +10,14 @@
 		<!-- 上面的下拉菜单中 -->
 		<!-- value2状态  0为处理中 1为历史记录-->
 		<view v-for="item,index in list" :key='index' :data-index="index" @click="xiangqing">
-			<view class="list_view" v-if="value2==item.zt">
+			<view class="list_view">
 				<!-- 状态 0待履行 1已完成 -->
 				<view class="flex align-center" style="margin-bottom: 30rpx;">
-					<view style="width: 70%;" v-if="item.zt == 0" class="flex align-center">
+					<view style="width: 70%;" v-if="item.zt == 4" class="flex align-center">
 						<view style="width: 12rpx;height: 12rpx;border-radius: 50rpx;background-color: #ff9294;margin-right: 20rpx;"></view>
 						<view style="color: #ff9294;font-size: 30rpx;font-weight:bold ;">待履行</view>
 					</view>
-					<view style="width: 70%;" v-else-if="item.zt == 1" class="flex align-center">
+					<view style="width: 70%;" v-else-if="item.zt == 5" class="flex align-center">
 						<view style="width: 12rpx;height: 12rpx;border-radius: 50rpx;background-color: #b8b8b8;margin-right: 20rpx;"></view>
 						<view style="color: #b8b8b8;font-size: 30rpx;font-weight:bold ;">已完成</view>
 					</view>
@@ -35,19 +35,19 @@
 					</view>
 					<view class="nr">
 						<view class="left">年龄:</view>
-						<view class="right">{{item.age}}</view>
+						<view class="right">{{item.birthday}}</view>
 					</view>
 					<view class="nr">
 						<view class="left">订单号:</view>
-						<view class="right">{{item.order}}</view>
+						<view class="right">{{item.order_sn}}</view>
 					</view>
 					<view class="nr">
 						<view class="left">下单时间:</view>
-						<view class="right">{{item.time}}</view>
+						<view class="right">{{item.created_at}}</view>
 					</view>
 					<view class="nr">
 						<view class="left">预约时间:</view>
-						<view class="right">{{item.appointment}}</view>
+						<view class="right">{{item.appoint_time}}</view>
 					</view>
 				</view>
 			</view>
@@ -59,7 +59,7 @@
 <script>
 	export default {
 		onLoad(e) {
-			this.getLists(7);
+			this.getLists(this.num,this.value1,this.value2)
 		},
 		data() {
 			return {
@@ -72,6 +72,14 @@
 					{
 						label: '预约时间倒序',
 						value: 1,
+					},
+					{
+						label: '下单时间正序',
+						value: 2,
+					},
+					{
+						label: '下单时间倒序',
+						value: 3,
 					}
 				],
 				options2: [{
@@ -111,32 +119,56 @@
 					order: 'ZX202000010',
 					time: '2020年10月28日17:11:10',
 					appointment: '2020年10月29日16:05:59'
-				}]
+				}],
+				num:1
 			}
 		},
 		methods: {
 			
-				getLists: async function(n) {
+				getLists: async function(curPage,timeSort,comStatus) {
 						//备注:curPage当前页,pageSize一页显示多少条,appointment 固定值为1
 						// timeSort:排序条件(不填写为默认排序,0=预约时间正序,1=预约时间倒叙,2=下单时间正序,3=下单时间倒叙),comStatus完成状态(不填写为全部类型,0=已完成,1=未完成)
 						// 根据备注去操作接口
 					let res = await this.$request.post('patient/orderPatientList', {
-						'curPage': 1,
-						'pageSize': n,
-						'appointment':1
+						'curPage': curPage,
+						'pageSize': 5,
+						'appointment':1,
+						'timeSort':timeSort,
+						'comStatus':comStatus
 					})
-					if (res.status == 0) {
+					// 如果要加载第二页
+					if(curPage!=1){
+						console.log('页数curPage',curPage)
+						console.log('类型typeAll',timeSort)
+						console.log('状态processing',comStatus)
+						let data = res.data;
+						this.list= this.list.concat(data)
+						// Array.prototype.push.apply(this.list, data);
+						console.log('list',this.list)
+					}else{
+						console.log('c',curPage)
+						console.log('t',timeSort)
+						console.log('p',comStatus)
 						let data = res.data;
-						console.log('我是打他:', data)
-						this.list = data;
-						console.log('我是list', this.list)
+						this.list = data
+						console.log(this.list)
 					}
 				},
 			close1(e) {
 				this.value1 = e
+				//重新选择就清空
+				this.list = []
+				this.num= 1
+				//调用接口 页数 类型 状态
+				this.getLists(this.num,this.value1,this.value2)
 			},
 			close2(e) {
 				this.value2 = e
+				//重新选择就清空
+				this.list = []
+				this.num= 1
+				//调用接口 页数 类型 状态
+				this.getLists(this.num,this.value1,this.value2)
 			},
 			// 详情
 			xiangqing(e) {
@@ -145,6 +177,15 @@
 					url: 'menzhenxq?data=' + this.list[e.currentTarget.dataset.index]
 				})
 			}
+		},
+		//页面到底监听
+		onReachBottom() {
+			this.num++
+			console.log('到底', this.num);
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+			this.getLists(this.num,this.value1,this.value2)
 		}
 	}
 </script>

+ 1 - 1
pages/service/more.vue

xqd
@@ -493,7 +493,7 @@
 						name: '00:00-08:00'
 					},
 					{
-						name: '00:80-16:00'
+						name: '08:00-16:00'
 					},
 					{
 						name: '16:00-24:00'

+ 2 - 38
pages/service/setservice.vue

xqd xqd xqd xqd
@@ -25,7 +25,7 @@
 			</view>
 			<!-- 控制器 -->
 			<view style="width: 15%;">
-			<u-switch v-model="item.state" :data-index="item.state" active-color="#84bb43" inactive-color="#eee" @change="openSave" :disabled="item.Opening"></u-switch>
+			<u-switch v-model="item.state" active-color="#84bb43" inactive-color="#eee" :disabled="item.Opening"></u-switch>
 			</view>
 			
 		</view>
@@ -38,7 +38,6 @@
 
 		},
 		onLoad() {
-			this.getStatus();
 
 		},
 		mounted() {
@@ -60,7 +59,7 @@
 				}, {
 					zhonglei: '图文咨询',
 					state: false,
-					Opening: 0
+					Opening: 1
 				}, {
 					zhonglei: '门诊预约',
 					state: false,
@@ -69,41 +68,6 @@
 			}
 		},
 		methods: {
-			/**
-			 * @author Liu Yuanhang
-			 * 查询开启状态(未完成暂时没有审核表)
-			 */
-			getStatus:async function(){
-				let res = await this.$request.post('doctor/getSettingList',{'type':1});
-				if(res.status==0){
-					this.serbicelist[0].state = res.data.is_phone;
-					this.serbicelist[1].state = res.data.is_chat;
-					this.serbicelist[2].state = res.data.is_appoint
-				}
-			},
-			
-			/**
-			 * @author Liu Yuanhang
-			 * 修改状态
-			 * @param {Object} e
-			 */
-			openSave:async function(e){
-				let list = this.serbicelist;
-			
-				let data =  {"is_chat":list[1]['state'],"is_phone":list[0]['state'],"is_appoint":list[2]['state']}
-				if(typeof data != 'string'){
-					data = JSON.stringify(data);
-				}
-				let res = await this.$request.post('doctor/saveSettingList',{'type':1,'data':data});
-				console.log(res);
-				if(res.status==0){
-					uni.showToast({
-						title:'操作成功',
-						duration:2000,
-						icon:'none'
-					})
-				}
-			},
 			// 下一页
 			next(){
 				uni.navigateTo({

+ 1 - 1
pages/zixun/xiangqing.vue

xqd
@@ -73,7 +73,7 @@
 				</view>
 				<view class="nr" v-if="zl ==2">
 					<view class="left">图片:</view>
-					<view class="right" v-for="(item,index) in potolList" :key="index">
+					<view class="right" v-for="(item,index) in potolList" :key="index" style="width: auto;">
 						<image style="width: 124rpx;height: 124rpx;margin-right: 10rpx;" :src="item"></image>
 					</view>
 				</view>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio