Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	pages/homepage/homepage.vue
This commit is contained in:
shidongli 2023-10-10 13:22:38 +08:00
commit dc3378ef9a
12 changed files with 470 additions and 154 deletions

View File

@ -0,0 +1,10 @@
import request from "@/api/request.js"
// 新增问诊
export function consultationInfo(data) {
return request({
url: `/nurseApplet/consultationInfo`,
method: 'post',
data: data
})
}

View File

@ -0,0 +1,10 @@
import request from "@/api/request.js"
// 聊天记录
export function consultationInfolist(data) {
return request({
url: `/nurseApplet/consultationInfo/list`,
method: 'get',
data: data
})
}

View File

@ -0,0 +1,29 @@
import request from "@/api/request.js"
// 发送即使消息
export function sendMessage(data) {
return request({
url: `/nurseApplet/chatRecord/sendMessage`,
method: 'post',
data: data
})
}
// 查询聊天记录
export function getChatRecord(data) {
return request({
url: `/nurseApplet/chatRecord/getChatRecord`,
method: 'get',
data: data
})
}
// 标记为已读
export function markRead(data) {
return request({
url: `/nurseApplet/chatRecord/updateReadStatus`,
method: 'PUT',
data: data
})
}

View File

@ -98,6 +98,19 @@
"navigationBarTitleText": "院内陪护",
"enablePullDownRefresh": false
}
}, {
"path": "imagetextConsultation/imagetextConsultation",
"style": {
"navigationBarTitleText": "图文问诊",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
}, {
"path": "createnewconsultation/createnewconsultation",
"style": {
"navigationBarTitleText": "新建图文问诊",
"enablePullDownRefresh": false
}
}, {
"path": "appointmenttime/appointmenttime",
"style": {
@ -474,17 +487,15 @@
"navigationBarTitleText": "体征检测",
"enablePullDownRefresh": false
}
}
,{
"path" : "seekadvicefrom/seekadvicefrom",
"style" :
{
"navigationBarTitleText": "咨询医生",
"enablePullDownRefresh": false
}
}, {
"path": "seekadvicefrom/seekadvicefrom",
"style": {
"navigationBarTitleText": "咨询医生",
"enablePullDownRefresh": false
}
}
]
}
]
}],
"globalStyle": {
"navigationBarTextStyle": "white",
@ -533,4 +544,4 @@
// }
]
}
}
}

View File

@ -69,7 +69,7 @@
getOpenId,
getCurrentUser,
detail
} from '@/api/pages/homepage/homepage.js'
export default {
data() {
@ -88,7 +88,7 @@
onShow() {
var that = this
this.userinfo= uni.getStorageSync('userinfo');
this.cityCode = this.userinfo.cityCode;
var openid = this.userinfo.openid;
that.identity = this.userinfo.cardNo;
@ -99,14 +99,14 @@
type: 'error',
duration: '1000',
})
} else {
}
if(openid&&that.cityCode){
// isWxBing(openid, cityCode) {
getCurrentUser(openid,that.cityCode).then(res => {
this.patientName=res.data.patientName
console.log(res);
@ -115,15 +115,15 @@
// }
})
// }
}
},
methods: {
//
login(){
this.gologin();
},
gologin() {
this.$refs.uToast.show({
@ -154,11 +154,11 @@
// duration: '1000',
// // url: '/pages/login/login'
// })
// }
// })
// },
//
goonline() {
@ -174,9 +174,9 @@
title: '未签约,请先签约',
type: 'error',
duration: '1000',
})
}else{
uni.navigateTo({
url: '/pagesB/mysigning/mysigning'
@ -184,12 +184,12 @@
}
})
}else{
}
}
},
//
count(){
@ -205,9 +205,9 @@
title: '未签约,请先签约',
type: 'error',
duration: '1000',
})
}else{
uni.navigateTo({
url: ''
@ -215,13 +215,13 @@
}
})
}else{
}
}
},
//
goHealthrecords() {
@ -231,9 +231,9 @@
uni.navigateTo({
url: '/pagesC/Healthrecords/Healthrecords'
})
}
},
//
gorecords() {
@ -243,9 +243,9 @@
uni.navigateTo({
url: '/pagesC/Screeningrecords/Screeningrecords'
})
}
},
//
healthtest() {
@ -255,10 +255,10 @@
uni.navigateTo({
url: '/pagesC/healthtest/healthtest'
})
}
},
//
sign() {
@ -268,9 +268,9 @@
uni.navigateTo({
url: '/pagesC/Physicalexamination/Physicalexamination'
})
}
},
//
@ -287,9 +287,9 @@
title: '未签约,请先签约',
type: 'error',
duration: '1000',
})
}else{
uni.navigateTo({
url: '/pagesC/ServiceAppointment/ServiceAppointment'
@ -297,12 +297,12 @@
}
})
}else{
}
}
},
//
servicerecord() {
@ -312,9 +312,9 @@
uni.navigateTo({
url: '/pagesC/servicerecord/servicerecord'
})
}
},
//
myappointment() {
@ -324,9 +324,9 @@
uni.navigateTo({
url: '/pagesC/Myappointment/Myappointment'
})
}
},
// login() {
// const _this = this
@ -340,7 +340,7 @@
// }
// })
// },
}
}
</script>

View File

@ -90,7 +90,7 @@
常用功能
</view>
<view class="orderStatus">
<view class="item">
<view class="item" @tap='goHealthrecords'>
<image src="../../static/pages/jiankangdangan.png" mode=""></image>
<view class="text">
健康档案
@ -305,6 +305,12 @@
this.gologin();
}
},
//
goHealthrecords() {
uni.navigateTo({
url: '/pagesC/Healthrecords/Healthrecords'
})
},
//
goorder(index, item) {
console.log(index, item)
@ -380,9 +386,9 @@
}
},
//
expertOrder(){
expertOrder() {
uni.navigateTo({
url:"/pagesB/ExpertlookOrder/ExpertlookOrder"
url: "/pagesB/ExpertlookOrder/ExpertlookOrder"
})
}
}

View File

@ -11,27 +11,33 @@
<view class="text">
现住址所在区
</view>
<view class="input">
<input class="uinput" placeholder="请选择所属地区" type="text" placeholder-class="phsy" />
<view class="input" @tap='showPicker'>
<view class="inputtext"
:style="address=='请选择所属地区'?'font-size:22rpx;font-weight: 400;color: #8E8E8E !important;':''">
{{address}}
</view>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="text">
患者姓名
</view>
<view class="input">
<input class="uinput noimageuinput" placeholder="请输入患者姓名" type="text" placeholder-class="phsy" />
<input v-model="formdata.patientName" class="uinput noimageuinput" placeholder="请输入患者姓名" type="text"
placeholder-class="phsy" />
</view>
<view class="text">
患者身份证号
</view>
<view class="input">
<input class="uinput noimageuinput" placeholder="请输入患者身份证号" type="text" placeholder-class="phsy" />
<input v-model="formdata.cardNo" class="uinput noimageuinput" placeholder="请输入患者身份证号" type="text"
placeholder-class="phsy" />
</view>
<view class="text">
患者联系电话
</view>
<view class="input">
<input class="uinput noimageuinput" placeholder="请输入患者联系电话" type="text" placeholder-class="phsy" />
<input v-model="formdata.phone" class="uinput noimageuinput" placeholder="请输入患者联系电话" type="text"
placeholder-class="phsy" />
</view>
</view>
<view class="title">
@ -46,25 +52,29 @@
问题简述
</view>
<view class="input">
<input class="uinput noimageuinput" placeholder="不多于五个字" type="text" placeholder-class="phsy" />
<input v-model="formdata.problemDescription" class="uinput noimageuinput" placeholder="不多于五个字"
type="text" placeholder-class="phsy" />
</view>
<view class="text">
患者个体情况说明
</view>
<view class="input" style="height: 200rpx;overflow-Y: scroll;">
<u-input class="uinput noimageuinput" placeholder=" " type="textarea" :maxlength="100" />
<u-input v-model="formdata.situationDescription" class="uinput noimageuinput" placeholder=" "
type="textarea" :maxlength="100" />
</view>
<view class="text">
问题描述
</view>
<view class="input" style="height: 200rpx;overflow-Y: scroll;">
<u-input class="uinput noimageuinput" placeholder=" " type="textarea" :maxlength="500" />
<u-input v-model="formdata.problemStatement" class="uinput noimageuinput" placeholder=" "
type="textarea" :maxlength="500" />
</view>
<view class="text">
既往疾病史
</view>
<view class="input" style="height: 200rpx;overflow-Y: scroll;">
<u-input class="uinput noimageuinput" placeholder=" " type="textarea" :maxlength="100" />
<u-input v-model="formdata.medicalRecord" class="uinput noimageuinput" placeholder=" " type="textarea"
:maxlength="100" />
</view>
</view>
<view class="title">
@ -78,24 +88,140 @@
<view class="text">
附件材料上传
</view>
<u-upload ref="uUpload" :max-count='9' :action="uoloadaction" :auto-upload="false" upload-text=' '
@on-choose-complete='onchoosecomplete' @on-success='onsuccess' @on-uploaded='onuploaded'></u-upload>
<view class="textarea">
<view class="">
最多支持9个文件
</view>
<view class="">
单个文件大小不允许超过10MB
</view>
<view class="">
只支持上传照片图片视频文件后缀类型为JPG.PNG.MP4
</view>
</view>
</view>
<view class="btns">
<view class="btnleft">
返回
</view>
<view class="btnright">
<view class="btnright" @tap='updata'>
保存
</view>
</view>
<view class="">
<m-city style='z-index: 10076;' :provinceData="list" headTitle="请选择所属地区" ref="cityPicker"
@funcValue="getpickerParentValue" pickerSize="4">
</m-city>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
getSubordinateRegions,
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
import gkcity from "../../components/m-city/m-city.vue";
import baseurl from '@/api/baseurl.js'
import {
consultationInfo
} from '@/api/pagesB/createnewconsultation/createnewconsultation.js'
export default {
components: {
"m-city": gkcity
},
data() {
return {
//
uoloadaction: '',
list: [],
addresslength: null,
imglistlength: null,
address: '请选择所属地区', //
formdata: {
address: '请选择所属地区', //
patientId: 1,
patientName: '李广君',
cardNo: '370882199909092123',
phone: '17615455437',
address: '',
doctorId: 1,
doctorName: '李医生',
consultationType: 'IMAGE_TEXT_CONSULTATION',
problemDescription: '',
situationDescription: '',
problemStatement: '',
medicalRecord: '',
fileUrls: []
}
};
},
onLoad(options) {
this.uoloadaction = baseurl + '/nurseApplet/consultationInfo/uploadConsultationFile'
},
onShow() {
this.areaInfo();
},
methods: {
updata() {
if (this.imglistlength > 0) {
this.$refs.uUpload.upload()
} else {
this.info();
}
},
onchoosecomplete(lists, name) {
this.imglistlength = lists.length
},
onsuccess(data, index, lists, name) {
if (data.code == 200) {
this.formdata.fileUrls.push(data.fileUrl)
}
},
onuploaded() {
this.info();
},
info() {
consultationInfo(this.formdata).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '新建图文问诊成功',
type: 'success',
duration: '1500',
back: 1
})
}
})
},
//
showPicker() {
this.$refs.cityPicker.show();
},
//
areaInfo() {
getSubordinateRegions().then(res => {
this.list = res.data;
})
},
//
getpickerParentValue(e) {
e = e.filter(ele => ele.localName != '暂不选择')
e = e.filter(ele => ele.localName != '暂无需选择')
this.addresslength = e
this.formdata.address = ''
this.address = ''
if (e && e.length >= 1) {
e.forEach(el => {
this.formdata.address = this.formdata.address + el.localName
this.address = this.address + el.localName
})
} else {
this.formdata.address = ''
this.address = '请选择所属地区'
}
},
}
}
</script>
@ -147,6 +273,14 @@
border-radius: 5rpx;
padding-bottom: 50rpx;
.textarea {
font-size: 18rpx;
font-weight: 400;
color: #8E8E8E;
line-height: 42rpx;
padding: 30rpx 0 0 40rpx;
}
.text {
font-size: 30rpx;
font-weight: 400;
@ -154,6 +288,10 @@
padding: 30rpx 0 0 40rpx;
}
::v-deep .u-upload {
padding: 30rpx 30rpx 0 30rpx;
}
.input {
width: 90%;
height: 80rpx;
@ -186,6 +324,15 @@
color: #8E8E8E !important;
}
.inputtext {
padding-left: 12rpx;
color: black;
font-size: 26rpx;
width: 90%;
height: 80rpx;
line-height: 80rpx;
}
.uinput {
color: black;
font-size: 26rpx;

View File

@ -3,21 +3,29 @@
<image src="../../static/pagesB/xinjianwenzhen.png" mode="" @tap='gocreatenewconsultation'></image>
<view class="title">
<view class="text" v-for='(item,index) in titlelist' :key='index'
:class="titletext==item.text?'Selectedtext':''" @tap='selecttitltext(item)'>
{{item.text}}
:class="formdata.status==item.status?'Selectedtext':''" @tap='selecttitltext(item)'>
<!-- <view class="topright" v-if="index==0">
{{listinfo?listinfo.length:''}}
</view> -->
<view class="">
{{item.text}}
</view>
</view>
</view>
<view class="list">
<view class="item">
<view class="item" v-for='item in listinfo' :key="item.id" @tap='goseekadvicefrom(item)'>
<view class="time">
2023-12-12 12:12
{{item.createTime?item.createTime:''}}
</view>
<image src="../../static/pagesB/Behave.png" mode=""></image>
<view class="name">
张三
{{item.doctorName?item.doctorName:''}}
</view>
<view class="text">
你好请问今天下午方便吗
{{item.problemDescription?item.problemDescription:''}}
</view>
<view class="messageCount" v-if="item.messageCount>0">
{{item.messageCount}}
</view>
</view>
</view>
@ -25,26 +33,50 @@
</template>
<script>
import {
consultationInfolist
} from '@/api/pagesB/imagetextConsultation/imagetextConsultation.js'
export default {
data() {
return {
titletext: '本周全部',
titlelist: [{
text: '本周全部',
status: ''
},
{
text: '已解答',
status: 2
},
{
text: '未解答',
status: 1
},
],
formdata: {
pageNum: 1,
pageSize: 10,
patientId: 1,
consultationType: 'IMAGE_TEXT_CONSULTATION',
status: '',
},
listtotal: 0,
listinfo: [],
};
},
onShow() {
this.info();
},
methods: {
//
selecttitltext(item) {
this.titletext = item.text
this.formdata.status = item.status
this.info();
},
info() {
consultationInfolist(this.formdata).then(res => {
this.listinfo = res.rows
this.listtotal = res.rows
})
},
//
gocreatenewconsultation() {
@ -52,7 +84,32 @@
url: "/pagesB/createnewconsultation/createnewconsultation"
})
},
}
//
goseekadvicefrom(item) {
uni.navigateTo({
url: `/pagesC/seekadvicefrom/seekadvicefrom?item=${JSON.stringify(item)}`
})
},
},
onReachBottom() { //
if (this.listinfo.length >= this.listtotal) {} else {
this.formdata.pageNum++;
consultationInfolist(this.formdata).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.listinfo.push(e)
})
}
})
}
},
onPullDownRefresh() { //
this.formdata.pageNum = 1;
this.info();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
@ -80,6 +137,21 @@
background: #F6F6F6;
border-radius: 5rpx;
.messageCount {
position: absolute;
top: 50%;
right: 5%;
width: 33rpx;
height: 33rpx;
background: #F44B2F;
border-radius: 50%;
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 33rpx;
text-align: center;
}
.text {
position: absolute;
left: 190rpx;
@ -144,6 +216,23 @@
border-radius: 5rpx;
width: 25%;
color: #26A888;
position: relative;
.topright {
width: 33rpx;
height: 33rpx;
background: #FFA115;
border-radius: 50%;
text-align: center;
line-height: 33rpx;
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
position: absolute;
right: 0;
top: 0;
transform: translate(50%, -50%);
}
}
.Selectedtext {

View File

@ -397,4 +397,4 @@
</script>
<style lang="scss">
@import './information.scss';
</style>
</style>

View File

@ -3,7 +3,7 @@
<view class="userinfo">
<view class="itemimgs">
<image class="picture" :src="img" mode="" v-if="img" @tap='uploadImag'></image>
<image class="picture" src="../../static/pagesB/userl.png" mode="" v-else @tap='uploadImag'></image>
<image class="picture" src="../../static/headsculpture.png" mode="" v-else @tap='uploadImag'></image>
<view class="text" @tap='uploadImag'>
点击编辑头像
</view>

View File

@ -5,25 +5,28 @@
{{currentItem.senderName}}
</view> -->
<!-- 聊天渲染列表 -->
<!-- scroll-y scroll-into-view="placeholder" scroll-top="500" scroll-with-animation -->
<view style="height: 85vh; padding-top: 200rpx;" @tap='touchend'>
<view class="snedItem" v-for="(item, index) in newsList" :key="index">
<view class="ifSend" v-if="item.senderName == userName">
<view class="sendBox" v-if="item.content">{{item.content}}</view>
<image class="head" src="../../static//myHead.png"></image>
</view>
<view class="doctorSend" v-else>
<image class="head" src="../../static/docHead.png"></image>
<view class="">
<text>{{item.senderName}}</text>
<!-- scroll-y scroll-into-view="placeholder" scroll-top="500" scroll-with-animation -->
<scroll-view scroll-y="true" :scroll-top='scrollTop'>
<view style="height: 85vh; padding-top: 200rpx;" @tap='touchend'>
<view class="snedItem" v-for="(item, index) in newsList" :key="index">
<view class="ifSend" v-if="item.senderName == userName">
<view class="sendBox" v-if="item.content">{{item.content}}</view>
<image class="head" src="@/static/headsculpture.png"></image>
</view>
</view>
<!-- <image v-if="item.img" :src="item.img" mode="scaleToFill" class="touch-active" />
<view class="doctorSend" v-else>
<image class="head" src="@/static/docHead.png"></image>
<view class="">
<text>{{item.senderName}}</text>
<view class="sendBox" v-if="item.content">{{item.content}}</view>
</view>
</view>
<!-- <image v-if="item.img" :src="item.img" mode="scaleToFill" class="touch-active" />
<video v-if="item.video" :src="item.video"></video> -->
</view>
<view class="placeholder" id="placeholder" v-if="showFunBtn"></view>
</view>
<view class="placeholder" id="placeholder"></view>
</view>
</scroll-view>
<!-- 底部输入 -->
<view class="input-box" :class="{ 'input-box-mpInputMargin': mpInputMargin }">
<view class="input-box-flex">
@ -34,7 +37,7 @@
v-model="formData.content" :hold-keyboard="true" :confirm-type="'send'" :confirm-hold="true"
placeholder-style="color:#DDDDDD;" :cursor-spacing="10" /> </view>
<!-- 选择表情包 -->
<image class=" icon_btn_add" :src="require('@/static/ico/emoji.png')" @tap="exprec"></image>
<!-- <image class=" icon_btn_add" :src="require('@/static/ico/emoji.png')" @tap="exprec"></image> -->
<!-- 发送消息按钮 -->
<image class=" icon_btn_add" :src="require('@/static/ico/send.png')" @tap="sendout"
v-if="formData.content!==''" mode=""></image>
@ -72,25 +75,22 @@
</template>
<script>
// import {
// sendMessage,
// getChatHistory,
// markRead
// } from '@/service/api/api.js';
import {
sendMessage,
getChatRecord,
markRead
} from '@/api/pagesC/seekadvicefrom/seekadvicefrom.js';
export default {
data() {
return {
title: '',
SOCKETURL: 'wss://fdmp.xinelu.cn/fm/webSocket/' + uni.getStorageSync('userInfo').bindingNo,
// SOCKETURL: 'wss://fdmp.xinelu.cn/fm/webSocket/' + uni.getStorageSync('userInfo').bindingNo,
SOCKETURL: 'ws://192.168.16.212:8088/webSocket/1',
socketOpen: false,
sendInfo: {},
currentItem: '',
userName: uni.getStorageSync('userInfo').residentName,
imgUrl22: this.$imgUrl22,
userName: '',
mpInputMargin: true, //
//
text: '',
formData: {
content: "",
limit: 15,
@ -138,6 +138,7 @@
title: "在吗",
},
],
scrollTop: 999999,
};
},
onReady() { //
@ -146,41 +147,41 @@
});
},
onLoad(options) {
if (options.title) {
this.title = options.title //
}
this.currentItem = JSON.parse(options.currentItem)
// uni.closeSocket()
this.currentItem = JSON.parse(options.item)
this.title = this.currentItem.doctorName //
this.userName = this.currentItem.patientName
this.getPageHistory()
this.scoket()
},
mounted() {
wx.pageScrollTo({
scrollTop: 9999999
})
// wx.pageScrollTo({
// scrollTop: 9999999
// })
},
methods: {
getPageHistory() {
let obj = {
bindingNo: this.currentItem.recipientNo,
messageCategory: this.currentItem.messageCategory,
recipientNo: this.currentItem.senderNo,
senderNo: this.currentItem.recipientNo
consultationId: this.currentItem.id,
senderId: this.currentItem.patientId,
recipientId: this.currentItem.doctorId,
}
getChatHistory(obj).then(res => {
if (res.data.code == '1') {
this.newsList = res.data.data
if (this.currentItem.unreadCount == 0) {
return
getChatRecord(obj).then(res => {
res.data.forEach(e => {
if (e.readStatus == 0) {
this.Read()
}
this.Read()
}
})
this.newsList = res.data
setTimeout(() => {
this.scrollTop = this.scrollTop + 1;
}, 100)
})
},
Read() {
let markReadData = {
bindingNo: this.currentItem.recipientNo,
messageCategory: this.currentItem.messageCategory,
senderNo: this.currentItem.senderNo
consultationId: this.currentItem.id,
recipientId: this.currentItem.doctorId,
}
markRead(markReadData)
},
@ -188,9 +189,14 @@
this.showFunBtn = false; //
this.showExpre = false; //
this.showOften = false; //
uni.hideKeyboard();
},
goshowFunBtn() {
this.showFunBtn = true; //
uni.hideKeyboard();
setTimeout(() => {
this.scrollTop = this.scrollTop + 1;
}, 100)
},
sendout() {
if (this.socketOpen == false) {
@ -202,26 +208,33 @@
})
let message = this.formData.content
try {
const _this = this
const that = this
uni.sendSocketMessage({
data: message,
success(res) {
console.log(that.currentItem)
let obj = {
content: message,
recipientName: _this.currentItem.senderName,
recipientNo: _this.currentItem.senderNo,
senderName: _this.currentItem.recipientName,
senderNo: _this.currentItem.recipientNo,
messageType: '1'
consultationId: that.currentItem.id,
senderId: that.currentItem.patientId,
senderName: that.currentItem.patientName,
recipientId: that.currentItem.doctorId,
recipientName: that.currentItem.doctorName,
messageType: 1,
sendTime: new Date(),
// messageType: (0 1 2 3 4 5 6 )
content: message
}
sendMessage(obj).then(res => {
console.log(res);
setTimeout(() => {
that.scrollTop = that.scrollTop + 1;
}, 100)
})
}
})
} catch (e) {
console.log(e, '断线了')
uni.closeSocket();
// uni.closeSocket();
}
this.formData.content = '' //
@ -299,28 +312,26 @@
touchstart() {
uni.hideKeyboard();
},
scoket() {
const _this = this
uni.closeSocket()
const that = this
this.socketOpen = false
try {
uni.connectSocket({
url: _this.SOCKETURL
url: that.SOCKETURL
})
uni.onSocketOpen(res => {
console.log('webScoket连接已打开', res);
_this.socketOpen = true
_this.reset()
that.socketOpen = true
that.reset()
})
uni.onSocketError(err => {
console.log('webScoket连接打开失败', err);
if (err && err.code != 1000) {
setTimeout(() => {
_this.socketOpen = true
that.socketOpen = true
uni.connectSocket({
url: _this.SOCKETURL
url: that.SOCKETURL
})
}, 3 * 1000)
}
@ -330,9 +341,9 @@
console.log('webScoket连接关闭', err);
if (err && err.code !== 1000) {
setTimeout(() => {
_this.socketOpen = true
that.socketOpen = true
uni.connectSocket({
url: _this.SOCKETURL
url: that.SOCKETURL
})
}, 3 * 1000)
}
@ -340,11 +351,11 @@
uni.onSocketMessage(res => {
console.log("webScoket监听收到的信息", res);
_this.newsList.push({
senderName: _this.currentItem.senderName,
that.newsList.push({
senderName: that.currentItem.patientName,
content: JSON.parse(res.data).message
})
_this.Read()
that.Read()
})
} catch (e) {
console.log(e);
@ -352,9 +363,9 @@
},
//
reset() {
let _this = this
clearInterval(_this.timeoutObj);
_this.timeoutObj = setInterval(() => {
let that = this
clearInterval(that.timeoutObj);
that.timeoutObj = setInterval(() => {
uni.sendSocketMessage({
data: 'ping',
success(res) {
@ -368,7 +379,7 @@
})
}
})
}, _this.timeout)
}, that.timeout)
},
back() {
uni.navigateBack({
@ -458,8 +469,9 @@
.fun-box {
opacity: 0;
transition: all 0.1s ease-in-out;
height: 0;
transition: all 0.3s ease;
transform: translateY(100%);
.grid-text {
padding-top: 10rpx;
@ -532,6 +544,8 @@
.show-fun-box {
opacity: 1;
height: 300rpx;
transition: all 0.3s ease;
transform: translateY(0%) !important;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB