diff --git a/App.vue b/App.vue
index 3cbbe5d..336db1f 100644
--- a/App.vue
+++ b/App.vue
@@ -447,7 +447,10 @@ export default {
page {
background-color: #f5f5f5;
}
-
+ .uni-navbar__header-btns-right{
+ min-width: 120rpx;
+ width:auto!important;
+ }
/* #endif */
.uni-nav-bar-text{
font-weight: bold;
diff --git a/api/api.js b/api/api.js
index ad4a680..a79529f 100644
--- a/api/api.js
+++ b/api/api.js
@@ -458,10 +458,10 @@ const api = {
return request('/expertAPI/InterrogationPatientInfo', data, 'post', false);
},
updateInterrogationAnswer(data){
- return request('/expertAPI/updateInterrogationAnswer', data, 'post', false);
+ return request('/expertAPI/updateInterrogationAnswerU', data, 'post', false);
},
addInterrogationAnswer(data){
- return request('/expertAPI/addInterrogationAnswer', data, 'post', false);
+ return request('/expertAPI/addInterrogationAnswerU', data, 'post', false);
},
videoDetail(data){
return request('/expertAPI/videoDetail', data, 'post', false);
@@ -571,6 +571,21 @@ const api = {
deleteConditionRecord(data){
return request('/expertAPI/delConditionRecord', data, 'post', false);
},
+ consultDetail(data){
+ return request('/expertAPI/consultDetail', data, 'post', false);
+ },
+ isConsultIng(data){
+ return request('/expertAPI/isConsultIng', data, 'post', false);
+ },
+ resConsult(data){
+ return request('/expertAPI/resConsult', data, 'post', false);
+ },
+ countConsult(data){
+ return request('/expertAPI/countConsult', data, 'post', false);
+ },
+ closeConsult(data){
+ return request('/expertAPI/closeConsult', data, 'post', false);
+ },
}
export default api
\ No newline at end of file
diff --git a/pages.json b/pages.json
index b8f469b..ad92fae 100644
--- a/pages.json
+++ b/pages.json
@@ -616,6 +616,16 @@
}
}
},
+ {
+ "path": "freeDetail/freeDetail",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTitleText": "uni-app分页",
+ "app": {
+ "bounce": "none"
+ }
+ }
+ },
{
"path": "searchPatient/searchPatient",
"style": {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 042dab4..6bd1246 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,1681 +1,1921 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{expertDetail.realName}}专家工作室
- {{expertDetail.hospitalName}}
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
- {{ item.text }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ formatToMonthDay(item.date || item.time) }}
-
-
-
-
- {{ item.content }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ expertDetail.realName }}专家工作室
+ {{ expertDetail.hospitalName }}
+
+
+
+
+
+
+
-
-
-
- 专题E站
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatToMonthDay(item.date || item.time) }}
+
+
+
+
+ {{ item.content }}
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- {{ item.title }}
- 已完结
- 已更新{{item.upload_num}}课时
-
-
-
-
-
-
-
+
+
+
+ 专题E站
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- {{ item.content }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+ 已完结
+ 已更新{{ item.upload_num }}课时
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- {{ tab.name }}
-
-
-
- 更多
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+ {{ item.content }}
+
+
+
+
+
-
-
-
- {{ item.title }}
-
-
-
- 查看
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ tab.name }}
+
+
+
+ 更多
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 今天是我们相识的第{{signInfo.gdxzday}}天
- 本周共签到{{signInfo.totalDay}}次
- 已经连续签到{{signInfo.continuous_day}}天
- 连续签到获取更多积分
-
- {{signInfo.news.summary}}
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.title }}
+
+
+ 查看
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 今天是我们相识的第{{ signInfo.gdxzday }}天
+ 本周共签到{{ signInfo.totalDay }}次
+ 已经连续签到{{ signInfo.continuous_day }}天
+ 连续签到获取更多积分
+
+ {{ signInfo.news.summary }}
+
+
+
+
+
-
-
diff --git a/pages_app/caseRecord/caseRecord.vue b/pages_app/caseRecord/caseRecord.vue
index 9efc496..c0b0215 100644
--- a/pages_app/caseRecord/caseRecord.vue
+++ b/pages_app/caseRecord/caseRecord.vue
@@ -100,7 +100,7 @@ import { onShow, onLoad } from "@dcloudio/uni-app";
import api from "@/api/api.js";
import docUrl from "@/utils/docUrl.js";
import dayjs from "dayjs";
-import { pathToBase64, base64ToPath } from "image-tools";
+import { pathToBase64} from "image-tools";
// 响应式数据
const des = ref("");
@@ -146,18 +146,14 @@ const chooseImage = () => {
// 这里应该上传图片到服务器
// imageList.value = [...imageList.value, ...res.tempFilePaths]
tempImageList.value = [...tempImageList.value, ...res.tempFilePaths];
- const fileManager = uni.getFileSystemManager();
for (let i = 0; i < res.tempFilePaths.length; i++) {
- fileManager.readFile({
- filePath: res.tempFilePaths[i],
- encoding: "base64",
- success: (res) => {
- imageList.value.push(res.data);
- },
- fail: (error) => {
- console.log("chooseImage", error);
- },
- });
+ pathToBase64(res.tempFilePaths[i])
+ .then((base64) => {
+ imageList.value.push(base64.split(',')[1]);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
}
},
});
@@ -246,7 +242,7 @@ const updateRecord = async () => {
title: "修改成功",
icon: "none",
});
- uni.setStorageSync("caseRecord",null);
+ uni.setStorageSync("caseRecord", null);
goBack();
}
};
@@ -291,19 +287,18 @@ onLoad((options) => {
for (let i = 0; i < record.photo.length; i++) {
console.log("url", docUrl + record.photo[i]);
uni.request({
- url: docUrl + record.photo[i],
- method: 'GET',
- responseType: 'arraybuffer',
- success: (res) => {
- const base64 = `${uni.arrayBufferToBase64(res.data)}`
- console.log(base64);
- imageList.value.push(base64);
- },
- fail: (err) => {
- reject(err);
- },
- })
-
+ url: docUrl + record.photo[i],
+ method: "GET",
+ responseType: "arraybuffer",
+ success: (res) => {
+ const base64 = `${uni.arrayBufferToBase64(res.data)}`;
+ console.log(base64);
+ imageList.value.push(base64);
+ },
+ fail: (err) => {
+ reject(err);
+ },
+ });
}
}
});
diff --git a/pages_app/consult/consult.vue b/pages_app/consult/consult.vue
index a88288a..5c51b94 100644
--- a/pages_app/consult/consult.vue
+++ b/pages_app/consult/consult.vue
@@ -18,7 +18,7 @@
@scrolltolower="onReachBottom"
lower-threshold="80"
>
-
+
{{ item.maskName }}
{{ item.date }}
@@ -65,14 +65,21 @@ const pageSize=ref(10)
const hasMore = ref(true)
const isLoading = ref(false)
const isRefreshing = ref(false)
-const goDetail=async(uuid)=>{
+const goDetail=async(uuid,patientUuid)=>{
if(bottomActive.value==='quick'){
- let userId=uni.getStorageSync('userInfo').uuid.toLowerCase();
- let conversationId=userId+'|1|'+uuid.toLowerCase();
+ if(activeTab.value==='new'){
+ navTo({
+ url:'/pages_app/freeDetail/freeDetail?uuid='+uuid
+ })
+ }else{
+ let userId=uni.getStorageSync('userInfo').uuid.toLowerCase();
+ let conversationId=userId+'|1|'+patientUuid.toLowerCase();
await uni.$UIKitStore.uiStore.selectConversation(conversationId)
navTo({
- url:'/pages_chat/chat/index?from=consult'
+ url:'/pages_chat/chat/index?from=consult&&patientUuid='+patientUuid+'&&uuid='+uuid
})
+ }
+
}else{
let status=0;
if(activeTab.value==='new'){
@@ -111,7 +118,8 @@ const newConsultList=async(isRefresh=false)=>{
content: item.content || '',
replyCount: 0,
tag: item.diseaseName || '',
- id:item.patientUuid || ''
+ id:item.uuid || '',
+ patientUuid:item.patientUuid || ''
}))
if(isRefresh){
listNew.value = mapped
@@ -147,7 +155,8 @@ const consultListHis=async(isRefresh=false)=>{
content: item.content || '',
replyCount: 0,
tag: item.diseaseName || '',
- id:item.patientUuid || ''
+ id:item.uuid || '',
+ patientUuid:item.patientUuid || ''
}))
if(isRefresh){
listMine.value = mapped
diff --git a/pages_app/consultDetail/consultDetail.vue b/pages_app/consultDetail/consultDetail.vue
index 0187cac..537f736 100644
--- a/pages_app/consultDetail/consultDetail.vue
+++ b/pages_app/consultDetail/consultDetail.vue
@@ -101,7 +101,7 @@
-
+
{{status==1?'我要编辑':'我要回答'}}
@@ -121,7 +121,7 @@ const step1_uuid = ref('');
const answer_uuid = ref('');
const status = ref(0)
onLoad((options) => {
- uuid.value = options.uuid || '125891f8c12145a99de01e29729978fb'
+ uuid.value = options.uuid
status.value = options.status || 0
console.log(uuid.value)
})
@@ -163,6 +163,7 @@ const getInterrogation=()=>{
return user.uuid == item.expert_uuid
})
if(arr.length>0){
+ status.value = 1;
answer_uuid.value = arr[0].answer_uuid;
}
}
@@ -254,10 +255,16 @@ function previewReplyImages(item, index){
// 编辑问题
function editQuestion() {
- // 编辑逻辑
- navTo({
- url:'/pages_app/myAnswer/myAnswer?answer_uuid='+answer_uuid.value+'&uuid='+uuid.value
- })
+ if(status.value == 1){
+ navTo({
+ url:'/pages_app/myAnswer/myAnswer?answer_uuid='+answer_uuid.value+'&uuid='+uuid.value
+ })
+ }else{
+ navTo({
+ url:'/pages_app/myAnswer/myAnswer?uuid='+uuid.value
+ })
+ }
+
}
diff --git a/pages_app/freeDetail/freeDetail.vue b/pages_app/freeDetail/freeDetail.vue
new file mode 100644
index 0000000..0ded830
--- /dev/null
+++ b/pages_app/freeDetail/freeDetail.vue
@@ -0,0 +1,509 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userInfo.name }}
+ ({{ userInfo.gender }} {{ userInfo.age }}岁)
+
+
+
+
+
+
+
+
+ {{ questionInfo.diseaseTag }}
+
+ {{ questionInfo.date }}
+
+
+
+
+ {{ questionInfo.diseaseDescribe }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 我要回答
+
+
+
+
+
+
+
+
diff --git a/pages_app/myAnswer/myAnswer.vue b/pages_app/myAnswer/myAnswer.vue
index 8fd0ad2..bfb7578 100644
--- a/pages_app/myAnswer/myAnswer.vue
+++ b/pages_app/myAnswer/myAnswer.vue
@@ -8,7 +8,7 @@
我的意见 *
-
+
×
-
+
+
@@ -54,15 +54,17 @@ import navBar from '@/components/navBar/navBar.vue'
import api from '@/api/api'
import docUrl from '@/utils/docUrl'
import { onLoad,onShow } from '@dcloudio/uni-app'
+import { pathToBase64} from "image-tools";
const uuid=ref('');
+const answer_uuid=ref('');
const maxImages = 6;
const imgList = ref([]);
-const form = ref({
- note: '',
- images: []
-})
+const tempImageList = ref([]);
+const note = ref('');
onLoad((options) => {
uuid.value = options.uuid || ''
+ answer_uuid.value = options.answer_uuid || ''
+ getInterrogation()
})
const getInterrogation=()=>{
api.getInterrogation({
@@ -74,23 +76,44 @@ const getInterrogation=()=>{
let arr=res.data.AnswerList.filter(item=>{
return user.uuid == item.expert_uuid
})
-
- form.value= arr[0];
- imgList.value= form.value.imgs?form.value.imgs.split(','):[];
+ imgList.value=[];
+ if(arr && arr.length>0){
+ note.value= arr[0].note || '';
+ let imgs= arr[0].imgs?arr[0].imgs.split(','):[];
+ tempImageList.value= imgs.map(item=>docUrl+item);
+ for (let i = 0; i < imgs.length; i++) {
+ uni.request({
+ url: docUrl + imgs[i],
+ method: "GET",
+ responseType: "arraybuffer",
+ success: (res) => {
+ const base64 = `${uni.arrayBufferToBase64(res.data)}`;
+ imgList.value.push(base64);
+ },
+ fail: (err) => {
+ reject(err);
+ },
+ });
+ }
+ }
}
})
}
const updateInterrogationAnswer=()=>{
+ if(note.value.trim().length<5){
+ uni.showToast({title: '输入意见至少5个字', icon: 'none'})
+ return
+ }
let imgobj={};
if(imgList.value.length>0){
let count=0;
- imgList.value.forEach(item=>{
- imgobj['img'+count]=docUrl+item;
+ imgList.value.forEach((item,index)=>{
+ imgobj['img'+(index+1)]=item;
})
}
api.updateInterrogationAnswer({
- answer_uuid: answer_uuid.value,
- note: form.value.note,
+ uuid: answer_uuid.value,
+ note:note.value,
imgsBean: imgobj
}).then(res=>{
if(res.code == 200){
@@ -100,8 +123,19 @@ const updateInterrogationAnswer=()=>{
})
}
const addInterrogationAnswer=()=>{
+ if(note.value.trim().length<5){
+ uni.showToast({title: '输入意见至少5个字', icon: 'none'})
+ return
+ }
+ let imgobj={};
+ if(imgList.value.length>0){
+ imgList.value.forEach((item,index)=>{
+ imgobj['img'+(index+1)]=item;
+ })
+ }
api.addInterrogationAnswer({
- note: form.value.note,
+ step1_uuid:uuid.value,
+ note: note.value,
imgsBean: imgobj
}).then(res=>{
if(res.code == 200){
@@ -110,11 +144,9 @@ const addInterrogationAnswer=()=>{
}
})
}
-onShow(()=>{
- getInterrogation()
-})
+
function addImages(){
- const remain = maxImages - form.value.images.length
+ const remain = maxImages - imgList.value.length
if(remain <= 0){
uni.showToast({title: '最多6张', icon: 'none'})
return
@@ -124,28 +156,36 @@ function addImages(){
sizeType: ['compressed'],
sourceType: ['album','camera'],
success: (res)=>{
- const paths = (res.tempFilePaths || res.tempFiles?.map(f=>f.path) || [])
- imgList.value = imgList.value.concat(paths).slice(0, maxImages)
+ console.log(res.tempFilePaths)
+ tempImageList.value = [...tempImageList.value, ...res.tempFilePaths];
+ for (let i = 0; i < res.tempFilePaths.length; i++) {
+ pathToBase64(res.tempFilePaths[i])
+ .then((base64) => {
+ imgList.value.push(base64.split(',')[1]);
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ }
+ console.log(tempImageList.value)
+ console.log(imgList.value)
}
})
}
function preview(index){
uni.previewImage({
- urls:imgList.map(path=> docUrl + path),
+ urls:tempImageList.value,
current: index
})
}
function remove(index){
- imgList.valuesplice(index, 1)
+ imgList.value.splice(index, 1)
+ tempImageList.value.splice(index, 1)
}
function submit(){
- if(!form.value.note.trim()){
- uni.showToast({title:'请输入意见', icon:'none'})
- return
- }
if(answer_uuid.value){
updateInterrogationAnswer()
}else{
diff --git a/pages_app/patientMsg/conversation-list/index.vue b/pages_app/patientMsg/conversation-list/index.vue
index bbe901f..42c66e3 100644
--- a/pages_app/patientMsg/conversation-list/index.vue
+++ b/pages_app/patientMsg/conversation-list/index.vue
@@ -48,7 +48,7 @@
-
+
{
+ const res = await api.patientListByGBK();
+ if(res.code == 1){
+ patientList.value = res.data;
+ hasQeqPatient.value = true;
+ comparePatient();
+ }
+
+};
+const handleReadMsg = () => {
+ if(!hasQeqPatient.value){
+ patientListByGBK();
+ }else{
+ comparePatient();
+ }
+}
+const newConversationList = ref([]);
+const comparePatient = () => {
+ let arr = [];
+ for(let i = 0; i < patientList.value.length; i++){
+ for(let j = 0; j < conversationList.value.length; j++){
+ if(conversationList.value[j].conversationId.indexOf(patientList.value[i].uuid.toLowerCase()) > -1){
+ arr.push(conversationList.value[j]);
+
+ }
+ }
+ }
+ newConversationList.value = arr;
+}
/**是否是云端会话 */
const enableV2CloudConversation =
@@ -349,7 +380,8 @@ const conversationListWatch = autorun(() => {
const _conversationList = enableV2CloudConversation
? uni.$UIKitStore?.uiStore?.conversations
: uni.$UIKitStore?.uiStore?.localConversations
-
+ console.log('conversationListWatch');
+ console.log(_conversationList);
conversationList.value = _conversationList
?.map(
(conversation: V2NIMConversationForUI | V2NIMLocalConversationForUI) => {
@@ -368,7 +400,8 @@ const conversationListWatch = autorun(() => {
) => b.sortOrder - a.sortOrder
)
- setTabUnread()
+ //setTabUnread();
+ handleReadMsg();
})
/** 连接状态监听 断网重连后重新订阅 */
@@ -387,7 +420,7 @@ const connectWatch = autorun(() => {
const getTotalUnreadMsgsCountWatch = autorun(() => {
// 为了监听会触发
uni.$UIKitStore?.sysMsgStore?.getTotalUnreadMsgsCount()
- setContactTabUnread()
+ //setContactTabUnread()
})
// 监听数组长度变化
diff --git a/pages_app/patientMsg/patientMsg.vue b/pages_app/patientMsg/patientMsg.vue
index 6868b47..91c3e2e 100644
--- a/pages_app/patientMsg/patientMsg.vue
+++ b/pages_app/patientMsg/patientMsg.vue
@@ -336,10 +336,7 @@
rebuildIndexList();
};
- // 返回上一页
- const goBack = () => {
- uni.navigateBack();
- };
+
// 申请列表数据
const applyList = ref([]);
@@ -415,6 +412,17 @@
});
}
};
+ const goBack = () => {
+ uni.navigateBack({
+ delta: 1,
+ fail() {
+ uni.reLaunch({
+ url: "/pages/index/index",
+ });
+ },
+ });
+
+};
const patientListByGBK = async () => {
diff --git a/pages_chat/chat/index.vue b/pages_chat/chat/index.vue
index cc64e8a..a630147 100644
--- a/pages_chat/chat/index.vue
+++ b/pages_chat/chat/index.vue
@@ -4,7 +4,23 @@
:page-style="'overflow:' + (moveThrough ? 'hidden' : 'visible')"
>
-
+
+
+
+
+ 关闭会话
+
+
+