From dfd5665ca49318ce02040707e1a21ab2e69a4916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Wed, 20 Dec 2023 13:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/homepage/homepage.vue | 6 +++--- pages/login/login.vue | 25 +++++++++++++------------ pages/seekadvicefrom/seekadvicefrom.vue | 6 +++++- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue index d11d29e..268fc3b 100644 --- a/pages/homepage/homepage.vue +++ b/pages/homepage/homepage.vue @@ -142,7 +142,7 @@ uni.connectSocket({ url: that.SOCKETURL }) - }, 3 * 1000) + }, 1000) } }) uni.onSocketClose(err => { @@ -153,7 +153,7 @@ uni.connectSocket({ url: that.SOCKETURL }) - }, 3 * 1000) + }, 1000) } }) } catch (e) { @@ -184,7 +184,7 @@ }) } }) - }, 5000) + }, 1000) }, //前往聊天 goseekadvicefrom(item) { diff --git a/pages/login/login.vue b/pages/login/login.vue index f8f8975..1e1b1dd 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -6,7 +6,7 @@ - + 登录 @@ -14,9 +14,10 @@ - + - + @@ -37,8 +38,8 @@ export default { data() { return { - personAccount: 'wangxiaoyan', - personPassword: 'Ww851108.', + personAccount: '', + personPassword: '', form: { name: '', } @@ -47,7 +48,7 @@ // onReady() { // this.$refs.uForm.setRules(this.rules); // }, - //获取到传值 + //获取到传值 // onLoad(options) { // if (options.phonenumber && options.password) { // this.phonenumber = options.phonenumber @@ -61,13 +62,13 @@ if (res.data.code == 200) { uni.setStorageSync("id", res.data.data.id) uni.setStorageSync("status", res.data.data.status) - if(res.data.data.status==3){ + if (res.data.data.status == 3) { that.$refs.uToast.show({ title: '当前用户无权限', type: 'error', duration: '1500' }) - }else if(res.data.data.status==2||res.data.data.status==1){ + } else if (res.data.data.status == 2 || res.data.data.status == 1) { that.$refs.uToast.show({ title: '登录成功', type: 'success', @@ -82,11 +83,11 @@ }) }, 1500) } - + // uni.setStorageSync("nursePersonName", res.data.nursePersonName) // uni.setStorageSync("nurseStationId", res.data.nurseStationId) - - + + } else { that.$refs.uToast.show({ title: res.data.msg, @@ -228,4 +229,4 @@ } } - + \ No newline at end of file diff --git a/pages/seekadvicefrom/seekadvicefrom.vue b/pages/seekadvicefrom/seekadvicefrom.vue index a96b16e..72f685d 100644 --- a/pages/seekadvicefrom/seekadvicefrom.vue +++ b/pages/seekadvicefrom/seekadvicefrom.vue @@ -543,6 +543,10 @@ content: JSON.parse(res.data).message, messageType: Number(JSON.parse(res.data).messageType) }) + query.select('.input-box').boundingClientRect(data => { + that.inputboxtop = data.height //赋值,待会要用 + that.scrollTop = that.scrollTop + 1; + }).exec(); that.Read() }) } catch (e) { @@ -567,7 +571,7 @@ }) } }) - }, that.timeout) + }, 1000) }, back() { uni.navigateBack({