diff --git a/api/pagesC/integration/index.js b/api/pagesC/integration/index.js
new file mode 100644
index 0000000..8a97d15
--- /dev/null
+++ b/api/pagesC/integration/index.js
@@ -0,0 +1,9 @@
+import request from "../../request.js"
+
+// 获取一体化照护方案记录
+export function getIntegrationList(data) {
+ return request({
+ url: `/nurseApp/chronic/careplan/schema/list?year=${data.year}&identity=${data.identity}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+ method: 'get',
+ })
+}
\ No newline at end of file
diff --git a/api/pagesC/nurseRecord/index.js b/api/pagesC/nurseRecord/index.js
new file mode 100644
index 0000000..7172f26
--- /dev/null
+++ b/api/pagesC/nurseRecord/index.js
@@ -0,0 +1,16 @@
+import request from "@/api/request.js"
+// 获取照护记录
+export function getNurseList(data) {
+ return request({
+ url: `/nurseApp/chronic/careplan/per/list?year=${data.year}&identity=${data.identity}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+ method: 'get',
+ })
+}
+
+// 获取照护记录详情
+export function getNurseListDetail(perRecordId) {
+ return request({
+ url: `/nurseApp/chronic/careplan/per/detail/${perRecordId}`,
+ method: 'get',
+ })
+}
\ No newline at end of file
diff --git a/components/lauwen-select/lauwenSelect.vue b/components/lauwen-select/lauwenSelect.vue
new file mode 100644
index 0000000..f52bd93
--- /dev/null
+++ b/components/lauwen-select/lauwenSelect.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+ {{ options[selected_index] || "全部" }}
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index 8d51ba4..031bab1 100644
--- a/pages.json
+++ b/pages.json
@@ -452,6 +452,26 @@
"enablePullDownRefresh": false
}
},
+ {
+ "path": "nurseRecord/nurseRecord",
+ "style": {
+ "navigationBarTitleText": "照护记录",
+ "enablePullDownRefresh": false
+ }
+ }, {
+ "path": "nurseRecordDetail/nurseRecordDetail",
+ "style": {
+ "navigationBarTitleText": "照护详情",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "integration/integration",
+ "style": {
+ "navigationBarTitleText": "一体化照护方案",
+ "enablePullDownRefresh": false
+ }
+ },
{
"path": "Filinginformation/Filinginformation",
"style": {
diff --git a/pages/homepage/homepage.scss b/pages/homepage/homepage.scss
index 2cc48db..0713aa5 100644
--- a/pages/homepage/homepage.scss
+++ b/pages/homepage/homepage.scss
@@ -53,7 +53,7 @@
.contentcenter {
width: 96%;
- height: 446rpx;
+ height: 630rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 5rpx;
@@ -62,15 +62,18 @@
display: flex;
flex-wrap: wrap;
justify-content: space-around;
- padding: 38rpx 2% 8rpx 88rpx;
-
+ padding-top: 40rpx;
+
.home {
width: 32%;
.name{
- margin: 10rpx 0 0 0;
+ text-align: center;
+ margin: 14rpx 0 0 0;
}
image {
+ display: block;
+ margin: 0 auto;
width: 102rpx;
height: 102rpx;
}
diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue
index a1e2cb3..b384699 100644
--- a/pages/homepage/homepage.vue
+++ b/pages/homepage/homepage.vue
@@ -17,8 +17,8 @@
家医签约
-
+ 一体化照护方案
+
+
+
+
+
+ 照护记录
+
+
+
+
+
@@ -121,6 +131,26 @@
url: "/pages/login/login"
})
},
+ //照护方案
+ gointegration() {
+ if (!this.userinfo) {
+ this.gologin();
+ } else {
+ uni.navigateTo({
+ url: '/pagesC/integration/integration'
+ })
+ }
+ },
+ // 照护记录
+ gonurseRecord() {
+ if (!this.userinfo) {
+ this.gologin();
+ } else {
+ uni.navigateTo({
+ url: '/pagesC/nurseRecord/nurseRecord'
+ })
+ }
+ },
gologin() {
this.$refs.uToast.show({
title: '您未登录,请先登录',
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 6e807a2..afd2bf3 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -20,6 +20,9 @@
import {
createMobileToken
} from '@/api/pages/login/index.js'
+ import {
+ mapMutations
+ } from "vuex";
export default {
data() {
return {
@@ -27,6 +30,7 @@
logincode: undefined,
timer: undefined,
cityCode: null,
+ SOCKETURL: '',
// scenenurseStationId: undefined,
};
},
@@ -46,6 +50,7 @@
// this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
},
methods: {
+ ...mapMutations(['scoket']),
//获取当前位置
getAddress() {
let that = this;
@@ -92,7 +97,6 @@
getPhoneNumberp(val) {
let that = this;
if (val.detail.code) {
-
that.phonecode = val.detail.code
that.login();
}
@@ -127,7 +131,7 @@
}, 1500)
} else if (resp.data.code == '2') {
that.$refs.uToast.show({
- title: '已被其他人注册, 不能再登录',
+ title: '已被其他人注册',
type: 'error',
duration: '1500',
})
@@ -137,6 +141,7 @@
if (res.data) {
uni.setStorageSync('patientId', res.data.id);
uni.setStorageSync('userinfo', res.data);
+ that.scoket();
}
that.$refs.uToast.show({
title: '登录成功',
@@ -188,4 +193,4 @@
+
\ No newline at end of file
diff --git a/pages/message/message.vue b/pages/message/message.vue
index 702cbc3..ecf4e16 100644
--- a/pages/message/message.vue
+++ b/pages/message/message.vue
@@ -73,6 +73,9 @@
import {
getMegVoList
} from '@/api/pages/message/index.js'
+ import {
+ mapMutations
+ } from "vuex";
export default {
data() {
return {
@@ -83,9 +86,27 @@
};
},
onShow() {
+ if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) {
+ this.scoket();
+ }
this.info();
+ if (uni.getStorageSync('patientId')) {
+ this.messagescoket();
+ }
},
methods: {
+ ...mapMutations(['scoket']),
+ messagescoket() {
+ const that = this
+ try {
+ uni.onSocketMessage(res => {
+ that.info();
+ console.log("webScoket监听收到的信息", res);
+ })
+ } catch (e) {
+ console.log(e);
+ }
+ },
//gonotice
gonotice(item, title) {
uni.navigateTo({
diff --git a/pages/myinformation/myinformation.vue b/pages/myinformation/myinformation.vue
index 8192f38..980e93c 100644
--- a/pages/myinformation/myinformation.vue
+++ b/pages/myinformation/myinformation.vue
@@ -265,13 +265,15 @@
content: '确认要退出此账号吗',
success: function(res) {
if (res.confirm) {
- // uni.clearStorageSync();、
- that.removes()
that.$refs.uToast.show({
title: '退出账号成功',
type: 'success',
- duration: '1000'
+ duration: '2000'
})
+ // uni.clearStorageSync();、
+ that.removes()
+ uni.closeSocket();
+ clearInterval(that.$store.state.timeoutObj);
}
}
});
@@ -307,6 +309,8 @@
duration: '1000',
})
this.myInfo()
+ clearInterval(this.$store.state.timeoutObj);
+ uni.closeSocket();
} else {
this.$refs.uToast.show({
title: res.msg,
@@ -381,7 +385,6 @@
uni.navigateTo({
url: '/pagesB/Serviceevaluation/Serviceevaluation'
})
-
},
// 签约信息
// Signing() {
@@ -405,7 +408,6 @@
duration: '3000',
})
},
-
// 签约信息
Signing() {
if (!this.appPersonallist) {
diff --git a/pages/register/register.vue b/pages/register/register.vue
index cf6c308..e4cd5c4 100644
--- a/pages/register/register.vue
+++ b/pages/register/register.vue
@@ -54,7 +54,8 @@
所属区域
请选择所属区域
- {{address}}
+ {{address}}
@@ -73,7 +74,8 @@
所在位置
请选择所在位置
- {{query.locationName}}
+ {{query.locationName}}
@@ -152,6 +154,9 @@
import {
registerdata
} from '@/api/pages/register/register.js'
+ import {
+ mapMutations
+ } from "vuex";
export default {
components: {
contenttext,
@@ -164,6 +169,7 @@
},
data() {
return {
+ SOCKETURL: '',
showNation: false, //户主关系
actions: [{
value: '1',
@@ -330,13 +336,13 @@
}
},
// onload(){
-
// },
// onUnload() {
// // 移除监听事件
// uni.$off('code');
// },
methods: {
+ ...mapMutations(['scoket']),
// 与户主关系
nationSelect(e) {
console.log(e)
@@ -402,8 +408,10 @@
if (res.code == 200) {
getCurrentUser(that.query.openid).then(res => {
uni.setStorageSync('patientId', res.data.id);
- uni.setStorageSync('patientName', res.data.patientName);
+ uni.setStorageSync('patientName', res.data
+ .patientName);
uni.setStorageSync("userinfo", res.data)
+ that.scoket();
that.$refs.uToast.show({
title: '注册成功',
type: 'success',
@@ -417,24 +425,17 @@
})
}
})
- }
- else {
+ } else {
that.$refs.uToast.show({
title: '所属区域应选择所在的区或街道,请重新选择!',
type: 'error'
})
}
-
-
}
-
}
});
},
//切换
- // changeRadio() {
- // this.selected == 1 ? this.selected = 2 : this.selected = 1
- // },
changeRadio() {
if (this.selected == 1) {
this.selected = 2;
@@ -456,7 +457,6 @@
url: '/pages/facecollection/facecollection'
})
},
-
//性别
sexchange(e) {
if (e == '男') {
@@ -805,6 +805,7 @@
transform: translateY(-50%);
}
}
+
.selectdata {
width: 636rpx;
height: 63rpx;
@@ -954,4 +955,4 @@
/deep/ .u-form-item__message {
padding-left: 0 !important;
}
-
+
\ No newline at end of file
diff --git a/pages/startup/startup.vue b/pages/startup/startup.vue
index 29dd0b6..2421e28 100644
--- a/pages/startup/startup.vue
+++ b/pages/startup/startup.vue
@@ -44,7 +44,7 @@
var that = this
if (!uni.getStorageSync('location') && !uni.getStorageSync('region')) {
this.getAddress()
- }
+ }
// this.getAddress();
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
diff --git a/pagesB/imagetextConsultation/imagetextConsultation.vue b/pagesB/imagetextConsultation/imagetextConsultation.vue
index 8cae4c4..1f43392 100644
--- a/pagesB/imagetextConsultation/imagetextConsultation.vue
+++ b/pagesB/imagetextConsultation/imagetextConsultation.vue
@@ -38,6 +38,9 @@
import {
consultationInfolist
} from '@/api/pagesB/imagetextConsultation/imagetextConsultation.js'
+ import {
+ mapMutations
+ } from "vuex";
export default {
data() {
return {
@@ -66,10 +69,29 @@
};
},
onShow() {
+ if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) {
+ this.scoket();
+ }
+ this.formdata.pageNum = 1
this.formdata.patientId = uni.getStorageSync('patientId')
+ if (uni.getStorageSync('patientId')) {
+ this.messagescoket();
+ }
this.info();
},
methods: {
+ ...mapMutations(['scoket']),
+ messagescoket() {
+ const that = this
+ try {
+ uni.onSocketMessage(res => {
+ that.info();
+ console.log("webScoket监听收到的信息", res);
+ })
+ } catch (e) {
+ console.log(e);
+ }
+ },
//选择
selecttitltext(item) {
this.formdata.status = item.status
diff --git a/pagesC/integration/integration.vue b/pagesC/integration/integration.vue
new file mode 100644
index 0000000..6b51a90
--- /dev/null
+++ b/pagesC/integration/integration.vue
@@ -0,0 +1,202 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.projectName }}
+
+ 未完成
+
+
+ 已完成
+
+
+
+
+ 计划时间:{{ item.scheduleTime }}
+
+
+ 有效时段:{{ item.minValidTime }} 至 {{ item.maxValidTime }}
+
+
+ 完成医生:{{ item.doctorName }}
+
+
+ 完成机构:{{ item.orgName }}
+
+
+ 实际完成时间:{{ item.actualTime }}
+
+
+
+
+
+
+
+ 暂无记录
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesC/nurseRecord/nurseRecord.vue b/pagesC/nurseRecord/nurseRecord.vue
new file mode 100644
index 0000000..708bede
--- /dev/null
+++ b/pagesC/nurseRecord/nurseRecord.vue
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.schemaName ? item.schemaName : '计划外照护' }}
+
+
+
+
+ 完成时间:{{ item.performanceDate }}
+
+
+ 完成医生:{{ item.doctorName }}
+
+
+
+
+ 查看详情
+
+
+
+
+ 暂无记录
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesC/nurseRecordDetail/nurseRecordDetail.vue b/pagesC/nurseRecordDetail/nurseRecordDetail.vue
new file mode 100644
index 0000000..4ecad5d
--- /dev/null
+++ b/pagesC/nurseRecordDetail/nurseRecordDetail.vue
@@ -0,0 +1,344 @@
+
+
+
+
+ 干预目标
+
+
+
+
+ 健康指标
+ 本次测量值
+
+ 干预目标
+
+
+
+ 血糖
+
+ 空腹血糖
+
+ HbA1c(%)
+
+
+
+
+ {{ nurseDetailData.performanceRecord.fbg ? nurseDetailData.performanceRecord.fbg : '-'}}
+
+
+ {{ nurseDetailData.performanceRecord.randomGlycoprotein ? nurseDetailData.performanceRecord.randomGlycoprotein : '-' }}
+
+
+
+ {{ domData }}
+ {{ domData1 }}
+
+
+
+
+
+ 血压
+
+
+ 舒张压
+
+ 收缩压
+
+
+
+
+ {{ nurseDetailData.performanceRecord.dbp ? nurseDetailData.performanceRecord.dbp : '-' }}
+
+
+ {{ nurseDetailData.performanceRecord.sbp ? nurseDetailData.performanceRecord.sbp : '-' }}
+
+
+
+ {{ domData2 }}
+ {{ domData3 }}
+
+
+
+
+
+ 血脂
+
+
+ TC
+
+
+ TG
+
+ HDL-C
+
+
+
+
+ {{ nurseDetailData.performanceRecord.tc ? nurseDetailData.performanceRecord.tc : '-' }}
+
+
+ {{ nurseDetailData.performanceRecord.tg ? nurseDetailData.performanceRecord.tg : '-' }}
+
+
+ {{ nurseDetailData.performanceRecord.hdl ? nurseDetailData.performanceRecord.hdl : '-' }}
+
+
+
+ {{ domData4 }}
+ {{ domData5 }}
+ {{ domData6 }}
+
+
+
+
+
+ 体质指数
+
+
+
+ {{ nurseDetailData.performanceRecord.bmi ? nurseDetailData.performanceRecord.bmi : '-' }}
+
+ {{ domData7 }}
+
+
+
+
+
+ 用药指导
+
+
+
+
+ 用药名称
+ 用药类型
+ 用药单位
+ 次剂量
+ 用药频次
+
+
+ {{ item.medicineName }}
+ {{ item.medicineTypeName }}
+ {{ item.usage }}
+ {{ item.dosage }}
+ {{ item.frequency }}
+
+
+
+
+
+ 既往用药
+
+
+
+
+ 用药名称
+ 用药单位
+ 用药次剂量
+ 用药频次
+
+
+ {{ item.medicineName }}
+ {{ item.usage }}
+ {{ item.dosage }}
+ {{ item.frequency }}
+
+
+
+
+
+
+ 处方
+
+
+ 健康教育处方:
+
+
+
+ 运动治疗处方:
+
+
+
+ 营养治疗处方:
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesC/seekadvicefrom/seekadvicefrom.vue b/pagesC/seekadvicefrom/seekadvicefrom.vue
index d6944eb..b0577f5 100644
--- a/pagesC/seekadvicefrom/seekadvicefrom.vue
+++ b/pagesC/seekadvicefrom/seekadvicefrom.vue
@@ -168,14 +168,19 @@
// });
},
onLoad(options) {
+ if (uni.getStorageSync('patientId') && !this.$store.state.socketOpen) {
+ this.scoket();
+ }
this.baseurl = baseurl;
// uni.closeSocket()
this.currentItem = JSON.parse(options.item)
+ // this.scoket()
this.title = this.currentItem.doctorName //导航栏标题
this.userName = this.currentItem.patientName
- this.SOCKETURL = socketurl + this.currentItem.patientId
+ if (uni.getStorageSync('patientId')) {
+ this.messagescoket();
+ }
this.getPageHistory()
- this.scoket()
},
mounted() {
// wx.pageScrollTo({
@@ -183,6 +188,69 @@
// })
},
methods: {
+ messagescoket() {
+ const that = this
+ // this.SOCKETURL = socketurl + this.currentItem.patientId
+ // this.socketOpen = false
+ try {
+ // uni.connectSocket({
+ // url: that.SOCKETURL
+ // })
+ // uni.onSocketOpen(res => {
+ // console.log('webScoket连接已打开', res);
+ // that.socketOpen = true
+ // that.reset()
+ // })
+ // uni.onSocketError(err => {
+ // console.log('webScoket连接打开失败', err);
+ // if (err && err.code != 1000) {
+ // setTimeout(() => {
+ // that.socketOpen = true
+ // uni.connectSocket({
+ // url: that.SOCKETURL
+ // })
+ // }, 1000)
+ // }
+ // })
+ // uni.onSocketClose(err => {
+ // console.log('webScoket连接关闭', err);
+ // if (err && err.code !== 1000) {
+ // setTimeout(() => {
+ // that.socketOpen = true
+ // uni.connectSocket({
+ // url: that.SOCKETURL
+ // })
+ // }, 1000)
+ // }
+ // })
+ uni.onSocketMessage(res => {
+ console.log("webScoket监听收到的信息", res);
+ that.getPageHistory()
+ })
+ } catch (e) {
+ console.log(e);
+ }
+ },
+ // 心跳响应
+ reset() {
+ let that = this
+ clearInterval(that.timeoutObj);
+ that.timeoutObj = setInterval(() => {
+ uni.sendSocketMessage({
+ data: 'ping',
+ success(res) {
+ console.log('正在发送心跳');
+ },
+ fail(err) {
+ console.log('心跳发送失败,重新连接...');
+ that.socketOpen = true
+ uni.connectSocket({
+ url: that.SOCKETURL
+ })
+ }
+ })
+ }, 1000)
+ },
lookimage(item) {
uni.previewImage({
urls: [item], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
@@ -310,7 +378,11 @@
sendout() {
const that = this
var content = JSON.parse(JSON.stringify(that.formData.content))
- if (this.socketOpen == false) {
+ if (this.$store.state.socketOpen == false) {
+ this.$refs.uToast.show({
+ title: '聊天连接异常',
+ type: 'warning',
+ })
return
}
let obj = {
@@ -443,7 +515,11 @@
//发送图片
chooseImage(sourceType) {
var that = this
- if (this.socketOpen == false) {
+ if (this.$store.state.socketOpen == false) {
+ this.$refs.uToast.show({
+ title: '聊天连接异常',
+ type: 'warning',
+ })
return
}
uni.chooseImage({
@@ -519,95 +595,12 @@
}).exec();
}, 200)
},
- scoket() {
- const that = this
- this.socketOpen = false
- try {
- uni.connectSocket({
- url: that.SOCKETURL
- })
- uni.onSocketOpen(res => {
- console.log('webScoket连接已打开', res);
- that.socketOpen = true
- that.reset()
- })
- uni.onSocketError(err => {
- console.log('webScoket连接打开失败', err);
- if (err && err.code != 1000) {
- setTimeout(() => {
- that.socketOpen = true
- uni.connectSocket({
- url: that.SOCKETURL
- })
- }, 3 * 1000)
- }
- })
- uni.onSocketClose(err => {
- console.log('webScoket连接关闭', err);
- if (err && err.code !== 1000) {
- setTimeout(() => {
- that.socketOpen = true
- uni.connectSocket({
- url: that.SOCKETURL
- })
- }, 3 * 1000)
- }
- })
- uni.onSocketMessage(res => {
- console.log("webScoket监听收到的信息", res);
- that.newsList.push({
- senderName: that.currentItem.doctorName,
- content: JSON.parse(res.data).message,
- messageType: Number(JSON.parse(res.data).messageType)
- })
- setTimeout(() => {
- let query = uni.createSelectorQuery().in(this);
- //需要给黄色区域设置一个id标识,在这里是demo
- query.select('.input-box').boundingClientRect(data => {
- this.inputboxtop = data.height //赋值,待会要用
- setTimeout(e => {
- this.scrollTop = this.scrollTop + 1;
- }, 300)
- }).exec();
- }, 100)
- that.Read()
- })
- } catch (e) {
- console.log(e);
- }
- },
- // 心跳响应
- reset() {
- let that = this
- clearInterval(that.timeoutObj);
- that.timeoutObj = setInterval(() => {
- uni.sendSocketMessage({
- data: 'ping',
- success(res) {
- console.log('正在发送心跳');
- },
- fail(err) {
- console.log('心跳发送失败,重新连接...');
- that.socketOpen = true
- uni.connectSocket({
- url: that.SOCKETURL
- })
- }
- })
- }, 5000)
- },
back() {
uni.navigateBack({
delta: 1
})
}
},
- onUnload() {
- clearInterval(this.timeoutObj);
- if (this.socketOpen == true) {
- uni.closeSocket();
- }
- }
};
diff --git a/static/pagesC/health.png b/static/health.png
similarity index 100%
rename from static/pagesC/health.png
rename to static/health.png
diff --git a/static/pagesC/BindDevice.png b/static/pagesC/BindDevice.png
deleted file mode 100644
index ded4a96..0000000
Binary files a/static/pagesC/BindDevice.png and /dev/null differ
diff --git a/static/pagesC/SERVERECOD.png b/static/pagesC/SERVERECOD.png
deleted file mode 100644
index 5755df9..0000000
Binary files a/static/pagesC/SERVERECOD.png and /dev/null differ
diff --git a/static/pagesC/TAB.png b/static/pagesC/TAB.png
deleted file mode 100644
index 27c00b8..0000000
Binary files a/static/pagesC/TAB.png and /dev/null differ
diff --git a/static/pagesC/appointmen.png b/static/pagesC/appointmen.png
deleted file mode 100644
index 99da2cf..0000000
Binary files a/static/pagesC/appointmen.png and /dev/null differ
diff --git a/static/pagesC/exchange.png b/static/pagesC/exchange.png
deleted file mode 100644
index baa89d4..0000000
Binary files a/static/pagesC/exchange.png and /dev/null differ
diff --git a/static/pagesC/healthmyself.png b/static/pagesC/healthmyself.png
deleted file mode 100644
index 54b9def..0000000
Binary files a/static/pagesC/healthmyself.png and /dev/null differ
diff --git a/static/pagesC/personnel.png b/static/pagesC/personnel.png
deleted file mode 100644
index f1e7cfb..0000000
Binary files a/static/pagesC/personnel.png and /dev/null differ
diff --git a/static/pagesC/qianyue.png b/static/pagesC/qianyue.png
deleted file mode 100644
index 0f3b4da..0000000
Binary files a/static/pagesC/qianyue.png and /dev/null differ
diff --git a/static/pagesC/records.png b/static/pagesC/records.png
deleted file mode 100644
index 8b967d5..0000000
Binary files a/static/pagesC/records.png and /dev/null differ
diff --git a/static/pagesC/serveappoint.png b/static/pagesC/serveappoint.png
deleted file mode 100644
index bd456dd..0000000
Binary files a/static/pagesC/serveappoint.png and /dev/null differ
diff --git a/static/pagesC/time.png b/static/pagesC/time.png
deleted file mode 100644
index e86b72d..0000000
Binary files a/static/pagesC/time.png and /dev/null differ
diff --git a/static/pagesC/tizheng.png b/static/pagesC/tizheng.png
deleted file mode 100644
index 5285cd3..0000000
Binary files a/static/pagesC/tizheng.png and /dev/null differ
diff --git a/static/zhaohufangan.png b/static/zhaohufangan.png
new file mode 100644
index 0000000..2308c8d
Binary files /dev/null and b/static/zhaohufangan.png differ
diff --git a/static/zhaohujilu.png b/static/zhaohujilu.png
new file mode 100644
index 0000000..fc7f453
Binary files /dev/null and b/static/zhaohujilu.png differ
diff --git a/store/index.js b/store/index.js
index 9838337..dee4444 100644
--- a/store/index.js
+++ b/store/index.js
@@ -1,11 +1,70 @@
import Vue from 'vue'
import Vuex from 'vuex'
+import {
+ socketurl
+} from '@/api/socketurl.js'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
+ timeoutObj: null,
+ socketOpen: false,
+ SOCKETURL: '',
},
mutations: {
+ scoket(state) {
+ state.SOCKETURL = socketurl + uni.getStorageSync('patientId')
+ state.socketOpen = false
+ try {
+ uni.connectSocket({
+ url: state.SOCKETURL
+ })
+ uni.onSocketOpen(res => {
+ console.log('webScoket连接已打开', res);
+ state.socketOpen = true
+ clearInterval(state.timeoutObj);
+ state.timeoutObj = setInterval(() => {
+ uni.sendSocketMessage({
+ data: 'ping',
+ success(res) {
+ console.log('正在发送心跳');
+ },
+ fail(err) {
+ console.log('心跳发送失败,重新连接...');
+ state.socketOpen = true
+ uni.connectSocket({
+ url: state.SOCKETURL
+ })
+ }
+ })
+ }, 1000)
+ })
+ uni.onSocketError(err => {
+ console.log('webScoket连接打开失败', err);
+ if (err && err.code != 1000) {
+ setTimeout(() => {
+ state.socketOpen = true
+ uni.connectSocket({
+ url: state.SOCKETURL
+ })
+ }, 1000)
+ }
+ })
+ uni.onSocketClose(err => {
+ console.log('webScoket连接关闭', err);
+ if (err && err.code !== 1000) {
+ setTimeout(() => {
+ state.socketOpen = true
+ uni.connectSocket({
+ url: state.SOCKETURL
+ })
+ }, 1000)
+ }
+ })
+ } catch (e) {
+ console.log(e);
+ }
+ },
//相当于同步的操作
//点击确认
integralsubscribesuccess(state) {