正在显示
17 个修改的文件
包含
298 行增加
和
108 行删除
@@ -6,11 +6,13 @@ | @@ -6,11 +6,13 @@ | ||
6 | <view class="flexA"> | 6 | <view class="flexA"> |
7 | <image :src="proxy.$h.downFile(detailData?.doctor?.avatar)" @click="proxy.$h.previewImage(proxy.$h.downFile(detailData?.doctor?.avatar))" class="imtopinfo-avatar" mode="aspectFill" /> | 7 | <image :src="proxy.$h.downFile(detailData?.doctor?.avatar)" @click="proxy.$h.previewImage(proxy.$h.downFile(detailData?.doctor?.avatar))" class="imtopinfo-avatar" mode="aspectFill" /> |
8 | <view class="imtopinfo-username">{{ detailData?.doctor?.nickname }}</view> | 8 | <view class="imtopinfo-username">{{ detailData?.doctor?.nickname }}</view> |
9 | - <u-count-down :time="countdownTime * 1000" format="HH:mm:ss" @finish="finishCountDownHandler"></u-count-down> | ||
10 | - <view class="graytext">后结束问诊</view> | 9 | + <template v-if="history === 'err'"> |
10 | + <u-count-down :time="countdownTime * 1000" format="HH:mm:ss" @finish="finishCountDownHandler"></u-count-down> | ||
11 | + <view class="graytext">后结束问诊</view> | ||
12 | + </template> | ||
11 | </view> | 13 | </view> |
12 | <!-- <view class="righttext">已结束</view> --> | 14 | <!-- <view class="righttext">已结束</view> --> |
13 | - <up-button type="info" shape="circle" text="结束问诊" throttleTime="1500" @click="getEndInformationHandler" :customStyle="{ width: '146rpx', height: '66rpx', marginRight: '0rpx' }"></up-button> | 15 | + <up-button v-if="history === 'err'" type="info" shape="circle" text="结束问诊" throttleTime="1500" @click="getEndInformationHandler" :customStyle="{ width: '146rpx', height: '66rpx', marginRight: '0rpx' }"></up-button> |
14 | </view> | 16 | </view> |
15 | <view class="infocard" style="padding: 0; width: 100%"> | 17 | <view class="infocard" style="padding: 0; width: 100%"> |
16 | <view class="flexJ"> | 18 | <view class="flexJ"> |
@@ -35,51 +37,70 @@ | @@ -35,51 +37,70 @@ | ||
35 | 37 | ||
36 | <view class="TUIChat" v-if="conversationType === 'chat'"> | 38 | <view class="TUIChat" v-if="conversationType === 'chat'"> |
37 | <view class="more-btn" v-if="conversation?.type === 'GROUP'" @click="handleGetProfile">更多</view> | 39 | <view class="more-btn" v-if="conversation?.type === 'GROUP'" @click="handleGetProfile">更多</view> |
40 | + <!-- <view class="more-btn" style="margin-top: 180rpx" @click="handleGetProfile">更多</view> --> | ||
38 | <view class="TUIChat-container"> | 41 | <view class="TUIChat-container"> |
39 | <scroll-view class="TUIChat-main" scroll-y="true" :scroll-with-animation="true" :refresher-triggered="triggered" :refresher-enabled="true" @refresherrefresh="handleRefresher" :scroll-top="scrollTop"> | 42 | <scroll-view class="TUIChat-main" scroll-y="true" :scroll-with-animation="true" :refresher-triggered="triggered" :refresher-enabled="true" @refresherrefresh="handleRefresher" :scroll-top="scrollTop"> |
40 | <view class="TUI-message-list" @touchstart="handleTouchStart" @click="dialogID = ''"> | 43 | <view class="TUI-message-list" @touchstart="handleTouchStart" @click="dialogID = ''"> |
41 | <!-- 用户信息卡片 --> | 44 | <!-- 用户信息卡片 --> |
42 | <!-- <UserInfoCard :detailData="detailData" /> --> | 45 | <!-- <UserInfoCard :detailData="detailData" /> --> |
43 | <view style="height: 280rpx"></view> | 46 | <view style="height: 280rpx"></view> |
44 | - <view class="loading-text" v-if="isCompleted">没有更多</view> | ||
45 | - <view v-for="(item, index) in messages" :key="item.ID" :id="'view' + item.ID"> | ||
46 | - <view class="time-container" v-if="item.showTime">{{ caculateTimeago(item.time * 1000) }}</view> | ||
47 | - <MessageTip v-if="!item.isRevoked && item.type === types.MSG_GRP_TIP" :data="handleTipMessageShowContext(item)" /> | ||
48 | - <!-- <MessageTip v-if="item.type === types.MSG_GRP_SYS_NOTICE" /> --> | ||
49 | - <MessageBubble v-if="!item.isRevoked && item.type !== types.MSG_GRP_TIP" :data="item"> | ||
50 | - <Message-Operate | ||
51 | - v-if="dialogID === item.ID" | ||
52 | - :data="item" | ||
53 | - class="dialog dialog-item" | ||
54 | - :style="{ | ||
55 | - top: dialogPosition.top + 'px', | ||
56 | - right: dialogPosition.right + 'px', | ||
57 | - left: dialogPosition.left + 'px' | ||
58 | - }" | ||
59 | - ></Message-Operate> | ||
60 | - <MessageText :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_TEXT" :data="handleTextMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)"></MessageText> | ||
61 | - <MessageImage :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_IMAGE" :data="handleImageMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)"></MessageImage> | ||
62 | - <MessageVideo :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_VIDEO" :data="handleVideoMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)" /> | ||
63 | - <MessageAudio :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_AUDIO" :data="handleAudioMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)" /> | ||
64 | - <MessageFace :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_FACE" :data="handleFaceMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)" /> | ||
65 | - <MessageCustom :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_CUSTOM" :data="handleCustomMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)" /> | ||
66 | - </MessageBubble> | ||
67 | - <MessageRevoked v-if="item.isRevoked" :data="item" @edit="handleEdit(item)" /> | ||
68 | - </view> | 47 | + <template v-if="history === 'err'"> |
48 | + <view class="loading-text" v-if="isCompleted">没有更多</view> | ||
49 | + <view v-for="(item, index) in messages" :key="item.ID" :id="'view' + item.ID"> | ||
50 | + <view class="time-container" v-if="item.showTime">{{ caculateTimeago(item.time * 1000) }}</view> | ||
51 | + <MessageTip v-if="!item.isRevoked && item.type === types.MSG_GRP_TIP" :data="handleTipMessageShowContext(item)" /> | ||
52 | + <!-- <MessageTip v-if="item.type === types.MSG_GRP_SYS_NOTICE" /> --> | ||
53 | + <MessageBubble v-if="!item.isRevoked && item.type !== types.MSG_GRP_TIP" :data="item"> | ||
54 | + <Message-Operate | ||
55 | + v-if="dialogID === item.ID" | ||
56 | + :data="item" | ||
57 | + class="dialog dialog-item" | ||
58 | + :style="{ | ||
59 | + top: dialogPosition.top + 'px', | ||
60 | + right: dialogPosition.right + 'px', | ||
61 | + left: dialogPosition.left + 'px' | ||
62 | + }" | ||
63 | + ></Message-Operate> | ||
64 | + <MessageText :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_TEXT" :data="handleTextMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)"></MessageText> | ||
65 | + <MessageImage :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_IMAGE" :data="handleImageMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)"></MessageImage> | ||
66 | + <MessageVideo :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_VIDEO" :data="handleVideoMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)" /> | ||
67 | + <MessageAudio :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_AUDIO" :data="handleAudioMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)" /> | ||
68 | + <MessageFace :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_FACE" :data="handleFaceMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)" /> | ||
69 | + <MessageCustom :id="item.flow + '-' + item.ID" v-if="item.type === types.MSG_CUSTOM" :data="handleCustomMessageShowContext(item)" :messageData="item" @longpress="handleItem($event, item)" /> | ||
70 | + </MessageBubble> | ||
71 | + <MessageRevoked v-if="item.isRevoked" :data="item" @edit="handleEdit(item)" /> | ||
72 | + </view> | ||
73 | + </template> | ||
74 | + <template v-else> | ||
75 | + <view v-for="(item, index) in historyList" :key="item.ID" :id="'view' + item.ID"> | ||
76 | + <!-- <view class="time-container" v-if="item.showTime">{{ caculateTimeago(item.time * 1000) }}</view> --> | ||
77 | + <!-- <MessageTip v-if="!item.isRevoked && item.type === types.MSG_GRP_TIP" :data="handleTipMessageShowContext(item)" /> --> | ||
78 | + <!-- <MessageTip v-if="item.type === types.MSG_GRP_SYS_NOTICE" /> --> | ||
79 | + <MessageBubble :data="item"> | ||
80 | + <MessageText :id="item.flow + '-' + item.ID" v-if="item.chatType === 1" :data="item" :messageData="item" @longpress="handleItem($event, item)"></MessageText> | ||
81 | + <MessageImage :id="item.flow + '-' + item.ID" v-if="item.chatType === 2" :data="item.payload" :messageData="item" @longpress="handleItem($event, item)"></MessageImage> | ||
82 | + <MessageVideo :id="item.flow + '-' + item.ID" v-if="item.chatType === 3" :data="item.payload" :messageData="item" @longpress="handleItem($event, item)" /> | ||
83 | + </MessageBubble> | ||
84 | + <MessageRevoked v-if="item.isRevoked" :data="item" @edit="handleEdit(item)" /> | ||
85 | + </view> | ||
86 | + </template> | ||
87 | + | ||
69 | <!-- 对话结束显示 --> | 88 | <!-- 对话结束显示 --> |
70 | - <ConversationEnd v-if="end" /> | 89 | + <ConversationEnd v-if="history === 'success'" /> |
71 | </view> | 90 | </view> |
72 | </scroll-view> | 91 | </scroll-view> |
73 | </view> | 92 | </view> |
74 | - <view class="flexA imBtn"> | ||
75 | - <view @click="sendPrescriptionState = true" v-if="[null, undefined, ''].includes(detailData?.drugId)">发送处方单</view> | ||
76 | - <view @click="showPrescriptionDetailState = true">查看处方单</view> | ||
77 | - </view> | ||
78 | - <TUIChatInput :text="text" :conversationData="conversation" :detailData="detailData"></TUIChatInput> | 93 | + <template v-if="history === 'err'"> |
94 | + <view class="flexA imBtn"> | ||
95 | + <view @click="sendPrescriptionState = true" v-if="[null, undefined, ''].includes(detailData?.drugId)">发送处方单</view> | ||
96 | + <view @click="showPrescriptionDetailState = true">查看处方单</view> | ||
97 | + </view> | ||
98 | + <TUIChatInput :text="text" :conversationData="conversation" :detailData="detailData"></TUIChatInput> | ||
99 | + </template> | ||
79 | </view> | 100 | </view> |
80 | - <view class="TUIChat" v-if="conversationType === 'system'"> | 101 | + <!-- <view class="TUIChat" v-if="conversationType === 'system'"> |
81 | <MessageSystem :data="messages" :types="types" /> | 102 | <MessageSystem :data="messages" :types="types" /> |
82 | - </view> | 103 | + </view> --> |
83 | <u-popup :show="sendPrescriptionState" @close="sendPrescriptionState = false" mode="bottom" closeIconPos="top-right" closeable round="20"> | 104 | <u-popup :show="sendPrescriptionState" @close="sendPrescriptionState = false" mode="bottom" closeIconPos="top-right" closeable round="20"> |
84 | <SendPrescription | 105 | <SendPrescription |
85 | :orderId="Event.orderId" | 106 | :orderId="Event.orderId" |
@@ -127,7 +148,7 @@ | @@ -127,7 +148,7 @@ | ||
127 | <script lang="ts"> | 148 | <script lang="ts"> |
128 | import { defineComponent, reactive, toRefs, computed, nextTick, watch, onMounted, shallowRef, getCurrentInstance, ComponentPublicInstance, ref, onUnmounted, onBeforeUnmount } from 'vue' | 149 | import { defineComponent, reactive, toRefs, computed, nextTick, watch, onMounted, shallowRef, getCurrentInstance, ComponentPublicInstance, ref, onUnmounted, onBeforeUnmount } from 'vue' |
129 | import { onReady, onLoad, onNavigationBarButtonTap, onUnload } from '@dcloudio/uni-app' | 150 | import { onReady, onLoad, onNavigationBarButtonTap, onUnload } from '@dcloudio/uni-app' |
130 | -import { updateSend_prescription_form, getConsultation_information_detail, getEndInformation, getReceive_diagnosis } from '@/api' | 151 | +import { updateSend_prescription_form, getConsultation_information_detail, getEndInformation, getReceive_diagnosis, getOrder_chat } from '@/api' |
131 | // 消息元素组件 | 152 | // 消息元素组件 |
132 | import MessageBubble from './components/message-elements/message-bubble.vue' | 153 | import MessageBubble from './components/message-elements/message-bubble.vue' |
133 | import MessageText from './components/message-elements/message-text.vue' | 154 | import MessageText from './components/message-elements/message-text.vue' |
@@ -148,6 +169,7 @@ import SendPrescription from '@/components/SendPrescription' | @@ -148,6 +169,7 @@ import SendPrescription from '@/components/SendPrescription' | ||
148 | import ViewPrescription from '@/components/ViewPrescription' | 169 | import ViewPrescription from '@/components/ViewPrescription' |
149 | import store from '../../TUICore/store' | 170 | import store from '../../TUICore/store' |
150 | import type { DiaLogEventType, Consultation_information_detailType } from '../../../types' | 171 | import type { DiaLogEventType, Consultation_information_detailType } from '../../../types' |
172 | +import { emojiMap } from '../../utils/emojiMap' | ||
151 | import { | 173 | import { |
152 | handleAvatar, | 174 | handleAvatar, |
153 | handleTextMessageShowContext, | 175 | handleTextMessageShowContext, |
@@ -203,7 +225,14 @@ export default defineComponent({ | @@ -203,7 +225,14 @@ export default defineComponent({ | ||
203 | detailData: {} as Consultation_information_detailType, | 225 | detailData: {} as Consultation_information_detailType, |
204 | countdownTime: 300, | 226 | countdownTime: 300, |
205 | end: false, | 227 | end: false, |
206 | - showUserCardDetailState: false | 228 | + showUserCardDetailState: false, |
229 | + history: 'err', | ||
230 | + page: { | ||
231 | + pageNo: 1, | ||
232 | + pageSize: 15 | ||
233 | + }, | ||
234 | + imUserId: '', | ||
235 | + historyList: [] as any | ||
207 | }) | 236 | }) |
208 | 237 | ||
209 | // 判断当前会话类型:无/系统会话/正常C2C、群聊 | 238 | // 判断当前会话类型:无/系统会话/正常C2C、群聊 |
@@ -229,10 +258,14 @@ export default defineComponent({ | @@ -229,10 +258,14 @@ export default defineComponent({ | ||
229 | }) | 258 | }) |
230 | 259 | ||
231 | // 获取页面参数 | 260 | // 获取页面参数 |
232 | - onLoad((options: DiaLogEventType) => { | 261 | + onLoad(async (options: DiaLogEventType) => { |
262 | + data.history = uni.getStorageSync('history') | ||
263 | + data.imUserId = uni.getStorageSync('ImUserId') | ||
264 | + console.log(uni.getStorageSync('history'), '聊天界面onload获取是否为历史记录') | ||
233 | console.log(options, '聊天界面onload参数') | 265 | console.log(options, '聊天界面onload参数') |
234 | data.Event = options | 266 | data.Event = options |
235 | getDetailHandler() | 267 | getDetailHandler() |
268 | + | ||
236 | // uni.setNavigationBarTitle({ | 269 | // uni.setNavigationBarTitle({ |
237 | // // title: options && options.conversationName | 270 | // // title: options && options.conversationName |
238 | // title: '自定义用户名' | 271 | // title: '自定义用户名' |
@@ -312,19 +345,93 @@ export default defineComponent({ | @@ -312,19 +345,93 @@ export default defineComponent({ | ||
312 | }) | 345 | }) |
313 | } | 346 | } |
314 | }) | 347 | }) |
315 | - | 348 | + const imageFormatMap = new Map([ |
349 | + ['jpg', 1], | ||
350 | + ['gif', 2], | ||
351 | + ['png', 3], | ||
352 | + ['bmp', 4] | ||
353 | + ]) | ||
316 | let stateInterval = setInterval(async () => { | 354 | let stateInterval = setInterval(async () => { |
317 | - const { result }: { result: Consultation_information_detailType } = await getConsultation_information_detail({ id: data.Event.orderId }) | ||
318 | - | ||
319 | - if (result?.orderState !== 30) proxy.$h.timeCallBack('对方已结束问诊即将返回', 2000) | 355 | + // const { result }: { result: Consultation_information_detailType } = await getConsultation_information_detail({ id: data.Event.orderId }) |
356 | + // if (result?.orderState !== 30) proxy.$h.timeCallBack('对方已结束问诊即将返回', 2000) | ||
320 | }, 3000) | 357 | }, 3000) |
321 | 358 | ||
322 | const getDetailHandler = async () => { | 359 | const getDetailHandler = async () => { |
323 | const { result: timeData }: { result: { countdownTime: number } } = await getReceive_diagnosis({ id: data.Event.orderId }) | 360 | const { result: timeData }: { result: { countdownTime: number } } = await getReceive_diagnosis({ id: data.Event.orderId }) |
361 | + | ||
324 | data.countdownTime = timeData.countdownTime | 362 | data.countdownTime = timeData.countdownTime |
363 | + | ||
325 | const { result }: { result: Consultation_information_detailType } = await getConsultation_information_detail({ id: data.Event.orderId }) | 364 | const { result }: { result: Consultation_information_detailType } = await getConsultation_information_detail({ id: data.Event.orderId }) |
326 | 365 | ||
327 | data.detailData = result | 366 | data.detailData = result |
367 | + | ||
368 | + if (data.history === 'success') getOrder_chatHandler(true) | ||
369 | + } | ||
370 | + | ||
371 | + const getOrder_chatHandler = async refresh => { | ||
372 | + refresh ? ((data.page.pageNo = 1), data.historyList.splice(0)) : data.page.pageNo++ | ||
373 | + | ||
374 | + const { result } = await getOrder_chat({ ...data.page, id: data.detailData.userId }) | ||
375 | + | ||
376 | + const regex = /(\[[^\[\]]+\])|([^\[\]]+)/g | ||
377 | + result.records = result.records | ||
378 | + .map(item => ({ | ||
379 | + ...item, | ||
380 | + imContent: JSON.parse(item.imContent) | ||
381 | + })) | ||
382 | + .map(item => { | ||
383 | + let msgContent = item.imContent?.msgBody?.[0]?.msgContent | ||
384 | + const text = msgContent?.text?.match(regex).map(item => ({ | ||
385 | + text: item, | ||
386 | + name: /^\[.+?\]$/.test(item) ? '' : 'text', | ||
387 | + src: `https://web.sdk.qcloud.com/im/assets/emoji/${emojiMap[item]}` | ||
388 | + })) | ||
389 | + let url = '' | ||
390 | + let snapshotUrl = '' | ||
391 | + let src = '' | ||
392 | + let imageFormat: string | number = '' | ||
393 | + let flow = '' | ||
394 | + { | ||
395 | + if (item.chatType == 1) { | ||
396 | + flow = item.imContent.from_Account == data.imUserId ? 'out' : 'in' | ||
397 | + } else if (item.chatType == 2) { | ||
398 | + url = msgContent?.imageInfoArray?.[0]?.uRL | ||
399 | + const match = url.match(/\.(\w+)(\?.*)?$/) | ||
400 | + imageFormat = match ? imageFormatMap.get(match[1])! : '' | ||
401 | + } else if (item.chatType == 3) { | ||
402 | + url = msgContent?.videoUrl | ||
403 | + snapshotUrl = msgContent?.thumbUrl | ||
404 | + } | ||
405 | + } | ||
406 | + return { | ||
407 | + ...item, | ||
408 | + flow, | ||
409 | + url, | ||
410 | + text, | ||
411 | + snapshotUrl, | ||
412 | + src, | ||
413 | + payload: { | ||
414 | + info: msgContent?.imageInfoArray?.map(item => ({ | ||
415 | + ...item, | ||
416 | + url: item.uRL | ||
417 | + })), | ||
418 | + imageFormat | ||
419 | + }, | ||
420 | + ID: item.id | ||
421 | + } | ||
422 | + }) | ||
423 | + .reverse() | ||
424 | + | ||
425 | + if (result.records.length) { | ||
426 | + result.records.map((_: any) => data.historyList.push(_)) | ||
427 | + | ||
428 | + data.historyList = result.records | ||
429 | + | ||
430 | + console.log(data.historyList, '历史记录') | ||
431 | + | ||
432 | + return | ||
433 | + } | ||
434 | + uni.$u.toast('没有更多数据了') | ||
328 | } | 435 | } |
329 | 436 | ||
330 | const finishCountDownHandler = async () => { | 437 | const finishCountDownHandler = async () => { |
@@ -404,11 +511,16 @@ export default defineComponent({ | @@ -404,11 +511,16 @@ export default defineComponent({ | ||
404 | 511 | ||
405 | const handleRefresher = () => { | 512 | const handleRefresher = () => { |
406 | data.triggered = true | 513 | data.triggered = true |
407 | - if (!data.isCompleted) { | ||
408 | - TUIServer.getHistoryMessageList().then(res => { | ||
409 | - data.triggered = false | ||
410 | - data.isCompleted = res.isCompleted | ||
411 | - }) | 514 | + if (data.history === 'err') { |
515 | + if (!data.isCompleted) { | ||
516 | + TUIServer.getHistoryMessageList().then(res => { | ||
517 | + data.triggered = false | ||
518 | + data.isCompleted = res.isCompleted | ||
519 | + }) | ||
520 | + } | ||
521 | + } else if (data.history === 'success') { | ||
522 | + console.log('下拉刷洗执行了') | ||
523 | + getOrder_chatHandler(false) | ||
412 | } | 524 | } |
413 | setTimeout(() => { | 525 | setTimeout(() => { |
414 | data.triggered = false | 526 | data.triggered = false |
@@ -507,7 +619,8 @@ export default defineComponent({ | @@ -507,7 +619,8 @@ export default defineComponent({ | ||
507 | getDetailHandler, | 619 | getDetailHandler, |
508 | getEndInformationHandler, | 620 | getEndInformationHandler, |
509 | computedTotalHandler, | 621 | computedTotalHandler, |
510 | - finishCountDownHandler | 622 | + finishCountDownHandler, |
623 | + getOrder_chatHandler | ||
511 | } | 624 | } |
512 | } | 625 | } |
513 | }) | 626 | }) |
@@ -352,9 +352,9 @@ | @@ -352,9 +352,9 @@ | ||
352 | .fileimage:nth-child(3n) { | 352 | .fileimage:nth-child(3n) { |
353 | margin-right: 0 !important; | 353 | margin-right: 0 !important; |
354 | } | 354 | } |
355 | - .close { | 355 | + .closeimg { |
356 | position: absolute; | 356 | position: absolute; |
357 | - top: 12rpx; | 357 | + top: 0rpx; |
358 | right: 12rpx; | 358 | right: 12rpx; |
359 | width: 40rpx; | 359 | width: 40rpx; |
360 | height: 40rpx; | 360 | height: 40rpx; |
1 | { | 1 | { |
2 | - "version" : "1", | ||
3 | - "prompt" : "none", | ||
4 | - "title" : "服务协议和隐私政策", | ||
5 | - "message" : " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", | ||
6 | - "buttonAccept" : "同意并接受", | ||
7 | - "buttonRefuse" : "暂不同意", | ||
8 | - "hrefLoader" : "system|default", | ||
9 | - "backToExit" : "false", | ||
10 | - "second" : { | ||
11 | - "title" : "确认提示", | ||
12 | - "message" : " 进入应用前,你需先同意<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>,否则将退出应用。", | ||
13 | - "buttonAccept" : "同意并继续", | ||
14 | - "buttonRefuse" : "退出应用" | 2 | + "version": "1", |
3 | + "prompt": "template", | ||
4 | + "title": "服务协议和隐私政策", | ||
5 | + "message": " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", | ||
6 | + "buttonAccept": "同意并接受", | ||
7 | + "buttonRefuse": "暂不同意", | ||
8 | + "hrefLoader": "system|default", | ||
9 | + "backToExit": "false", | ||
10 | + "second": { | ||
11 | + "title": "确认提示", | ||
12 | + "message": " 进入应用前,你需先同意<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>,否则将退出应用。", | ||
13 | + "buttonAccept": "同意并继续", | ||
14 | + "buttonRefuse": "退出应用" | ||
15 | }, | 15 | }, |
16 | - "disagreeMode" : { | ||
17 | - "support" : false, | ||
18 | - "loadNativePlugins" : false, | ||
19 | - "visitorEntry" : true, | ||
20 | - "showAlways" : false | 16 | + "disagreeMode": { |
17 | + "support": false, | ||
18 | + "loadNativePlugins": false, | ||
19 | + "visitorEntry": true, | ||
20 | + "showAlways": false | ||
21 | }, | 21 | }, |
22 | - "styles" : { | ||
23 | - "backgroundColor" : "#00FF00", | ||
24 | - "borderRadius" : "5px", | ||
25 | - "title" : { | ||
26 | - "color" : "#ff00ff" | 22 | + "styles": { |
23 | + "backgroundColor": "#ffffff", | ||
24 | + "borderRadius": "5px", | ||
25 | + "title": { | ||
26 | + "color": "#333" | ||
27 | }, | 27 | }, |
28 | - "buttonAccept" : { | ||
29 | - "color" : "#ffff00" | 28 | + "buttonAccept": { |
29 | + "color": "#000" | ||
30 | }, | 30 | }, |
31 | - "buttonRefuse" : { | ||
32 | - "color" : "#00ffff" | 31 | + "buttonRefuse": { |
32 | + "color": "##c6cdd4" | ||
33 | }, | 33 | }, |
34 | - "buttonVisitor" : { | ||
35 | - "color" : "#00ffff" | 34 | + "buttonVisitor": { |
35 | + "color": "##c6cdd4" | ||
36 | } | 36 | } |
37 | } | 37 | } |
38 | -} | 38 | +} |
@@ -13,6 +13,7 @@ export const getRandomImage = (data: number | string) => request({ url: `/sys/ra | @@ -13,6 +13,7 @@ export const getRandomImage = (data: number | string) => request({ url: `/sys/ra | ||
13 | export const doctorLoginWithPwd = (data: doctorLoginWithPwdType) => request({ url: '/pet/login/doctorLoginWithPwd', method: 'POST', data }) // 兽医端账号密码登录 | 13 | export const doctorLoginWithPwd = (data: doctorLoginWithPwdType) => request({ url: '/pet/login/doctorLoginWithPwd', method: 'POST', data }) // 兽医端账号密码登录 |
14 | export const doctorPhoneEasyLogin = (data: doctorPhoneEasyLoginType) => request({ url: '/pet/login/doctorPhoneEasyLogin', method: 'POST', data }) // 兽医端一键登录 | 14 | export const doctorPhoneEasyLogin = (data: doctorPhoneEasyLoginType) => request({ url: '/pet/login/doctorPhoneEasyLogin', method: 'POST', data }) // 兽医端一键登录 |
15 | export const outLogin = () => request({ url: '/doctor/outLogin', method: 'GET' }) // 退出登录 | 15 | export const outLogin = () => request({ url: '/doctor/outLogin', method: 'GET' }) // 退出登录 |
16 | +export const getOrder_chat = (data: { id: string | number }) => request({ url: '/consultation/order_chat', method: 'GET', data }) // im聊天记录 | ||
16 | 17 | ||
17 | // 首页 | 18 | // 首页 |
18 | export const getStart = () => request({ url: '/veterinary/start', method: 'GET' }) // 开屏页 | 19 | export const getStart = () => request({ url: '/veterinary/start', method: 'GET' }) // 开屏页 |
@@ -9,8 +9,18 @@ | @@ -9,8 +9,18 @@ | ||
9 | </template> | 9 | </template> |
10 | <template #right> | 10 | <template #right> |
11 | <view v-if="props.isShowRight" class="flexA"> | 11 | <view v-if="props.isShowRight" class="flexA"> |
12 | - <image src="/static/images/xin.png" class="navbar-icon" mode="aspectFill" @click="proxy.$h.jumpUrl(`/pages2/message/index`)" /> | ||
13 | - <image v-if="props.isShowQrCode" src="/static/images/mineqr.png" class="navbar-icon" mode="aspectFill" style="margin-right: 0" @click="[20,'20'].includes(props.examineState) ? proxy.$h.jumpUrl(`/pages2/mineinfo/qrcode`) : $u.toast('请先完成认证')" /> | 12 | + <view class="pobox"> |
13 | + <image src="/static/images/xin.png" class="navbar-icon" mode="aspectFill" @click="proxy.$h.jumpUrl(`/pages2/message/index`)" /> | ||
14 | + <view class="dot" v-if="props.showDot"></view> | ||
15 | + </view> | ||
16 | + <image | ||
17 | + v-if="props.isShowQrCode" | ||
18 | + src="/static/images/mineqr.png" | ||
19 | + class="navbar-icon" | ||
20 | + mode="aspectFill" | ||
21 | + style="margin-right: 0" | ||
22 | + @click=";[20, '20'].includes(props.examineState) ? proxy.$h.jumpUrl(`/pages2/mineinfo/qrcode`) : $u.toast('请先完成认证')" | ||
23 | + /> | ||
14 | </view> | 24 | </view> |
15 | <view v-else></view> | 25 | <view v-else></view> |
16 | </template> | 26 | </template> |
@@ -31,6 +41,7 @@ interface IProps { | @@ -31,6 +41,7 @@ interface IProps { | ||
31 | isShowBgColor: boolean | 41 | isShowBgColor: boolean |
32 | isplaceholder: boolean | 42 | isplaceholder: boolean |
33 | examineState?: string | number | 43 | examineState?: string | number |
44 | + showDot?: boolean | ||
34 | } | 45 | } |
35 | 46 | ||
36 | const props = withDefaults(defineProps<IProps>(), { | 47 | const props = withDefaults(defineProps<IProps>(), { |
@@ -39,7 +50,8 @@ const props = withDefaults(defineProps<IProps>(), { | @@ -39,7 +50,8 @@ const props = withDefaults(defineProps<IProps>(), { | ||
39 | isShowRight: false, | 50 | isShowRight: false, |
40 | title: '', | 51 | title: '', |
41 | isShowBgColor: true, | 52 | isShowBgColor: true, |
42 | - isplaceholder: true | 53 | + isplaceholder: true, |
54 | + showDot: false | ||
43 | }) | 55 | }) |
44 | </script> | 56 | </script> |
45 | 57 | ||
@@ -51,4 +63,16 @@ const props = withDefaults(defineProps<IProps>(), { | @@ -51,4 +63,16 @@ const props = withDefaults(defineProps<IProps>(), { | ||
51 | margin-right: 32rpx; | 63 | margin-right: 32rpx; |
52 | } | 64 | } |
53 | } | 65 | } |
66 | +.pobox { | ||
67 | + position: relative; | ||
68 | + .dot { | ||
69 | + position: absolute; | ||
70 | + top: 6rpx; | ||
71 | + right: 32rpx; | ||
72 | + width: 12rpx; | ||
73 | + height: 12rpx; | ||
74 | + background-color: red; | ||
75 | + border-radius: 50%; | ||
76 | + } | ||
77 | +} | ||
54 | </style> | 78 | </style> |
@@ -60,7 +60,7 @@ | @@ -60,7 +60,7 @@ | ||
60 | <view class="flexA"> | 60 | <view class="flexA"> |
61 | <view class="flexA fileImg" v-for="(_, index) in form.file"> | 61 | <view class="flexA fileImg" v-for="(_, index) in form.file"> |
62 | <image :src="proxy.$h.downFile(_)" class="fileimage" mode="aspectFill" /> | 62 | <image :src="proxy.$h.downFile(_)" class="fileimage" mode="aspectFill" /> |
63 | - <image src="/static/images/close.png" class="close" mode="aspectFill" @click="form.file.splice(index, 1)" /> | 63 | + <image src="/static/images/close.png" class="closeimg" mode="scaleToFill" @click="form.file.splice(index, 1)" /> |
64 | </view> | 64 | </view> |
65 | <view v-if="form.file.length < 3" class="uploadImg"> | 65 | <view v-if="form.file.length < 3" class="uploadImg"> |
66 | <view class="flexCCol" @click="uploadFormImgHandler"> | 66 | <view class="flexCCol" @click="uploadFormImgHandler"> |
1 | <template> | 1 | <template> |
2 | <u-sticky zIndex="99999999999999999"> | 2 | <u-sticky zIndex="99999999999999999"> |
3 | - <NavBar :isShowQrCode="false" :isShowBgColor="navbarColor" :isShowLeft="false" :isShowRight="true" :isplaceholder="false" /> | 3 | + <NavBar :isShowQrCode="false" :isShowBgColor="navbarColor" :isShowLeft="false" :isShowRight="true" :isplaceholder="false" :showDot="[0, '0', null, undefined].includes(messageNumber) ? false : true" /> |
4 | </u-sticky> | 4 | </u-sticky> |
5 | 5 | ||
6 | <view class="index"> | 6 | <view class="index"> |
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | </up-col> | 46 | </up-col> |
47 | <up-col span="6"> | 47 | <up-col span="6"> |
48 | <view class="flexCCol"> | 48 | <view class="flexCCol"> |
49 | - <view class="flexACol wzNum bluetext" @click="proxy.$h.jumpUrl(`/pages2/order/index?orderState=0&subOrderState=2`)"> | 49 | + <view class="flexACol wzNum bluetext" @click="proxy.$h.jumpUrl(`/pages2/order/index?orderState=0&subOrderState=2&isJump=success`)"> |
50 | <view>{{ IndexData?.consultationNum || 0 }}</view> | 50 | <view>{{ IndexData?.consultationNum || 0 }}</view> |
51 | <view>问诊中</view> | 51 | <view>问诊中</view> |
52 | </view> | 52 | </view> |
@@ -277,7 +277,7 @@ const getMessageDataHandler = async () => { | @@ -277,7 +277,7 @@ const getMessageDataHandler = async () => { | ||
277 | 277 | ||
278 | messageNumber.value = result.sysCount + result.userCount + result.xufangCount | 278 | messageNumber.value = result.sysCount + result.userCount + result.xufangCount |
279 | 279 | ||
280 | - if (messageNumber.value === 0) return | 280 | + if (messageNumber.value === 0 || ![20].includes(authState.value)) return |
281 | 281 | ||
282 | showMessageState.value = true | 282 | showMessageState.value = true |
283 | } | 283 | } |
@@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
14 | <up-input placeholder="请输入验证码" border="bottom" placeholderClass="placeholderClass" v-model="params.code"></up-input> | 14 | <up-input placeholder="请输入验证码" border="bottom" placeholderClass="placeholderClass" v-model="params.code"></up-input> |
15 | </view> | 15 | </view> |
16 | <view class="bluetext" style="margin-top: 28rpx" @click="emit('editLoginStateHandler', 3)">账号密码登录</view> | 16 | <view class="bluetext" style="margin-top: 28rpx" @click="emit('editLoginStateHandler', 3)">账号密码登录</view> |
17 | + <view style="font-size: 18rpx; color: red">*未注册用户在登录后自动注册</view> | ||
17 | </view> | 18 | </view> |
18 | </template> | 19 | </template> |
19 | 20 |
@@ -6,8 +6,9 @@ | @@ -6,8 +6,9 @@ | ||
6 | <u-icon name="close" size="22" color="#000"></u-icon> | 6 | <u-icon name="close" size="22" color="#000"></u-icon> |
7 | </view> | 7 | </view> |
8 | <image class="login-avatar flexC" src="/static/images/bg.png" mode="aspectFill"></image> | 8 | <image class="login-avatar flexC" src="/static/images/bg.png" mode="aspectFill"></image> |
9 | - <view class="login-phone flexC">187****5857</view> | ||
10 | - <view class="login-remark flexC">认证服务由中国联通服务</view> | 9 | + <image class="login-logo flexC" src="/static/images/logo.png" mode="aspectFill"></image> |
10 | + <!-- <view class="login-phone flexC">187****5857</view> | ||
11 | + <view class="login-remark flexC">认证服务由中国联通服务</view> --> | ||
11 | </template> | 12 | </template> |
12 | <template v-if="loginState === 2"> | 13 | <template v-if="loginState === 2"> |
13 | <PhoneLogin @editLoginStateHandler="(state: number) => loginState = state" ref="phoneLoginRef" /> | 14 | <PhoneLogin @editLoginStateHandler="(state: number) => loginState = state" ref="phoneLoginRef" /> |
@@ -78,6 +79,11 @@ const loginHandler = (state: number) => { | @@ -78,6 +79,11 @@ const loginHandler = (state: number) => { | ||
78 | border-radius: 32rpx; | 79 | border-radius: 32rpx; |
79 | margin: 236rpx auto 0; | 80 | margin: 236rpx auto 0; |
80 | } | 81 | } |
82 | + &-logo { | ||
83 | + margin: 0 auto; | ||
84 | + width: 320rpx; | ||
85 | + height: 320rpx; | ||
86 | + } | ||
81 | &-phone { | 87 | &-phone { |
82 | color: #323233; | 88 | color: #323233; |
83 | font-size: 60rpx; | 89 | font-size: 60rpx; |
1 | <template> | 1 | <template> |
2 | <view class="mine"> | 2 | <view class="mine"> |
3 | - <NavBar :isShowQrCode="true" :isShowBgColor="navbarColor" :isShowLeft="true" :isShowRight="true" :isplaceholder="false" :examineState="IndexData?.examineState" /> | 3 | + <NavBar :isShowQrCode="true" :isShowBgColor="navbarColor" :isShowLeft="true" :isShowRight="true" :isplaceholder="false" :examineState="IndexData?.examineState" :showDot="[0, '0', null, undefined].includes(messageNumber) ? false : true" /> |
4 | <view class="mine-topBg"></view> | 4 | <view class="mine-topBg"></view> |
5 | <image src="/static/images/mineTopIcon.png" class="mine-topicon" mode="aspectFill" /> | 5 | <image src="/static/images/mineTopIcon.png" class="mine-topicon" mode="aspectFill" /> |
6 | <view class="mine-infobox flexA" @click="token ? proxy.$h.jumpUrl(`/pages2/mineinfo/info`) : proxy.$h.relaunchUrl('/pages/login/login')"> | 6 | <view class="mine-infobox flexA" @click="token ? proxy.$h.jumpUrl(`/pages2/mineinfo/info`) : proxy.$h.relaunchUrl('/pages/login/login')"> |
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | <view class="flexA" style="margin-right: 68rpx"> | 32 | <view class="flexA" style="margin-right: 68rpx"> |
33 | <u-icon name="thumb-up" color="#484848" size="22"></u-icon> | 33 | <u-icon name="thumb-up" color="#484848" size="22"></u-icon> |
34 | <view class="graytext mine-centertext">用户评价</view> | 34 | <view class="graytext mine-centertext">用户评价</view> |
35 | - <view class="mine-righttext">{{ UserInfo?.star || 0 }}</view> | 35 | + <view class="mine-righttext">{{ UserInfo?.star || 0 }}{{ ![0, '0', '', null, undefined].includes(UserInfo?.star) && '.0' }}</view> |
36 | </view> | 36 | </view> |
37 | <view class="flexA"> | 37 | <view class="flexA"> |
38 | <u-icon name="clock" color="#484848" size="18"></u-icon> | 38 | <u-icon name="clock" color="#484848" size="18"></u-icon> |
@@ -93,8 +93,8 @@ import { onLoad, onShow, onPageScroll } from '@dcloudio/uni-app' | @@ -93,8 +93,8 @@ import { onLoad, onShow, onPageScroll } from '@dcloudio/uni-app' | ||
93 | import Tabbar from '@/components/Tabbar' | 93 | import Tabbar from '@/components/Tabbar' |
94 | import NavBar from '@/components/NavBar' | 94 | import NavBar from '@/components/NavBar' |
95 | import TurnDown from '@/components/TurnDown' | 95 | import TurnDown from '@/components/TurnDown' |
96 | -import { getMy, getCareer, getDepartment, getIndex } from '@/api' | ||
97 | -import type { Result, UserInfoType, IndexListType, IndexType, MineJumpListType } from '../../types' | 96 | +import { getMy, getCareer, getDepartment, getIndex, getMsg_count } from '@/api' |
97 | +import type { Result, UserInfoType, IndexListType, IndexType, MineJumpListType, MessageCountType } from '../../types' | ||
98 | 98 | ||
99 | const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance } | 99 | const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance } |
100 | 100 | ||
@@ -104,6 +104,8 @@ const isShowMoney = ref<boolean>(false) | @@ -104,6 +104,8 @@ const isShowMoney = ref<boolean>(false) | ||
104 | 104 | ||
105 | const navbarColor = ref<boolean>(false) | 105 | const navbarColor = ref<boolean>(false) |
106 | 106 | ||
107 | +const messageNumber = ref<number>(0) | ||
108 | + | ||
107 | const toOrderList = [ | 109 | const toOrderList = [ |
108 | { title: '问诊订单', text: '查看订单', bgurl: '/static/images/mineorbg1.png', url: '/pages2/order/index', orderState: 0 }, | 110 | { title: '问诊订单', text: '查看订单', bgurl: '/static/images/mineorbg1.png', url: '/pages2/order/index', orderState: 0 }, |
109 | { title: '处方订单', text: '查看订单', bgurl: '/static/images/mineorbg2.png', url: '/pages2/order/index', orderState: 1 } | 111 | { title: '处方订单', text: '查看订单', bgurl: '/static/images/mineorbg2.png', url: '/pages2/order/index', orderState: 1 } |
@@ -145,8 +147,17 @@ const jumpHandler = (_: MineJumpListType) => { | @@ -145,8 +147,17 @@ const jumpHandler = (_: MineJumpListType) => { | ||
145 | proxy.$h.jumpUrl(_.url) | 147 | proxy.$h.jumpUrl(_.url) |
146 | } | 148 | } |
147 | 149 | ||
150 | +const getMessageDataHandler = async () => { | ||
151 | + const { result }: { result: MessageCountType } = await getMsg_count() | ||
152 | + | ||
153 | + messageNumber.value = result.sysCount + result.userCount + result.xufangCount | ||
154 | +} | ||
155 | + | ||
148 | onShow(async () => { | 156 | onShow(async () => { |
149 | if (!token) return | 157 | if (!token) return |
158 | + | ||
159 | + getMessageDataHandler() | ||
160 | + | ||
150 | const { result }: { result: UserInfoType } = await getMy() | 161 | const { result }: { result: UserInfoType } = await getMy() |
151 | 162 | ||
152 | const { result: departmentList }: { result: { records: IndexListType[] } } = await getDepartment({ keyword: '' }) | 163 | const { result: departmentList }: { result: { records: IndexListType[] } } = await getDepartment({ keyword: '' }) |
@@ -34,6 +34,15 @@ | @@ -34,6 +34,15 @@ | ||
34 | </template> | 34 | </template> |
35 | </u-form-item> | 35 | </u-form-item> |
36 | <view class="grayLine"></view> | 36 | <view class="grayLine"></view> |
37 | + <u-form-item labelWidth="160rpx" label="选择种类" prop="category" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=KESHI`)" ref="selectDepartment"> | ||
38 | + <view class="flexD" style="width: 100%"> | ||
39 | + <u-checkbox-group v-model="form.category" placement="row" shape="circle"> | ||
40 | + <u-checkbox activeColor="#05b8d2" name="1" label="猫猫"></u-checkbox> | ||
41 | + <u-checkbox activeColor="#05b8d2" name="2" label="狗狗"></u-checkbox> | ||
42 | + <u-checkbox activeColor="#05b8d2" name="3" label="异宠"></u-checkbox> | ||
43 | + </u-checkbox-group> | ||
44 | + </view> | ||
45 | + </u-form-item> | ||
37 | <u-form-item labelWidth="160rpx" label="选择科室" prop="selectDepartment" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=KESHI`)" ref="selectDepartment"> | 46 | <u-form-item labelWidth="160rpx" label="选择科室" prop="selectDepartment" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=KESHI`)" ref="selectDepartment"> |
38 | <u-input v-model="form.selectDepartment" disabled disabledColor="#ffffff" placeholder="请选择科室" border="none" inputAlign="right"></u-input> | 47 | <u-input v-model="form.selectDepartment" disabled disabledColor="#ffffff" placeholder="请选择科室" border="none" inputAlign="right"></u-input> |
39 | <template #right> | 48 | <template #right> |
@@ -48,7 +57,7 @@ | @@ -48,7 +57,7 @@ | ||
48 | </template> | 57 | </template> |
49 | </u-form-item> | 58 | </u-form-item> |
50 | <u-form-item labelWidth="160rpx" label="坐诊医院" prop="selectHospital" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=ZUOZHENYIYUAN`)" ref="career"> | 59 | <u-form-item labelWidth="160rpx" label="坐诊医院" prop="selectHospital" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=ZUOZHENYIYUAN`)" ref="career"> |
51 | - <u-input v-model="form.selectHospital" disabled disabledColor="#ffffff" placeholder="请选择职称" border="none" inputAlign="right"></u-input> | 60 | + <u-input v-model="form.selectHospital" disabled disabledColor="#ffffff" placeholder="请选择医院" border="none" inputAlign="right"></u-input> |
52 | <template #right> | 61 | <template #right> |
53 | <u-icon name="arrow-right"></u-icon> | 62 | <u-icon name="arrow-right"></u-icon> |
54 | </template> | 63 | </template> |
@@ -140,6 +149,8 @@ interface EventType { | @@ -140,6 +149,8 @@ interface EventType { | ||
140 | reapply?: string | 149 | reapply?: string |
141 | } | 150 | } |
142 | 151 | ||
152 | +const category = ref(['1', '2']) | ||
153 | + | ||
143 | const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance } | 154 | const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance } |
144 | 155 | ||
145 | const Event = ref<EventType>() | 156 | const Event = ref<EventType>() |
@@ -169,7 +180,8 @@ const form = ref<ApplyAuthType>({ | @@ -169,7 +180,8 @@ const form = ref<ApplyAuthType>({ | ||
169 | file: [], | 180 | file: [], |
170 | selectDepartment: '', | 181 | selectDepartment: '', |
171 | selectCareer: '', | 182 | selectCareer: '', |
172 | - selectHospital: '' | 183 | + selectHospital: '', |
184 | + category: [] | ||
173 | }) | 185 | }) |
174 | 186 | ||
175 | const actions = ref() | 187 | const actions = ref() |
@@ -185,7 +197,8 @@ const rules = ref({ | @@ -185,7 +197,8 @@ const rules = ref({ | ||
185 | sex: { type: 'number', required: true, message: '请选择男或女', trigger: ['blur', 'change'] }, | 197 | sex: { type: 'number', required: true, message: '请选择男或女', trigger: ['blur', 'change'] }, |
186 | selectDepartment: { type: 'string', required: true, message: '请选择科室', trigger: ['blur', 'change'] }, | 198 | selectDepartment: { type: 'string', required: true, message: '请选择科室', trigger: ['blur', 'change'] }, |
187 | selectCareer: { type: 'string', required: true, message: '请选择职称', trigger: ['blur', 'change'] }, | 199 | selectCareer: { type: 'string', required: true, message: '请选择职称', trigger: ['blur', 'change'] }, |
188 | - selectHospital: { type: 'string', required: true, message: '请选坐诊医院', trigger: ['blur', 'change'] } | 200 | + selectHospital: { type: 'string', required: true, message: '请选坐诊医院', trigger: ['blur', 'change'] }, |
201 | + category: { type: 'array', min: 1, required: true, message: '请选择种类', trigger: ['blur', 'change'] } | ||
189 | }) | 202 | }) |
190 | 203 | ||
191 | const formDisabled = ref<boolean>(false) // true 禁用代表回显数据 false 可以填写可以提交 | 204 | const formDisabled = ref<boolean>(false) // true 禁用代表回显数据 false 可以填写可以提交 |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | </view> | 22 | </view> |
23 | 23 | ||
24 | <view class="income-moneylist Zindex"> | 24 | <view class="income-moneylist Zindex"> |
25 | - <view class="graytitle">{{ ['withdraw'].includes(Event?.flag as string) ? '提现明细':'收入明细' }}</view> | 25 | + <view class="graytitle">{{ ['withdraw'].includes(Event?.flag as string) ? '提现明细' : '收入明细' }}</view> |
26 | <scroll-view scroll-y="true" class="moneyscroll" @scrolltolower="getListHandler(false)"> | 26 | <scroll-view scroll-y="true" class="moneyscroll" @scrolltolower="getListHandler(false)"> |
27 | <view v-for="_ in incomeList?.records" :key="_.id" style="margin-bottom: 44rpx"> | 27 | <view v-for="_ in incomeList?.records" :key="_.id" style="margin-bottom: 44rpx"> |
28 | <view class="flexJ"> | 28 | <view class="flexJ"> |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | <view class="itemtitle">{{ proxy.$h.optObjectValue('incomeTypeList', _.incomeType) }}</view> | 30 | <view class="itemtitle">{{ proxy.$h.optObjectValue('incomeTypeList', _.incomeType) }}</view> |
31 | <view class="timetext">{{ _.createTime }}</view> | 31 | <view class="timetext">{{ _.createTime }}</view> |
32 | </view> | 32 | </view> |
33 | - <view class="moneytext" :class="{ incomemoney: _.incomeType === 1 }">{{ [1, 3, undefined].includes(_.incomeType) ? '+' : '-' }}{{ _.amount }}</view> | 33 | + <view class="moneytext" :class="{ incomemoney: [1, 3, undefined].includes(_.incomeType) }">{{ [1, 3, undefined].includes(_.incomeType) ? '+' : '-' }}{{ _.amount }}</view> |
34 | </view> | 34 | </view> |
35 | </view> | 35 | </view> |
36 | </scroll-view> | 36 | </scroll-view> |
@@ -42,7 +42,8 @@ | @@ -42,7 +42,8 @@ | ||
42 | <view class="flexW" v-if="!props.isPrescriptionDrug"> | 42 | <view class="flexW" v-if="!props.isPrescriptionDrug"> |
43 | <up-button type="info" v-if="props.item?.orderId !== null" shape="circle" text="处方单" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }" @click="showPrescriptionDetailState = true"></up-button> | 43 | <up-button type="info" v-if="props.item?.orderId !== null" shape="circle" text="处方单" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }" @click="showPrescriptionDetailState = true"></up-button> |
44 | <up-button type="info" @click="clickOrderItemHandler" shape="circle" text="查看症状" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }"></up-button> | 44 | <up-button type="info" @click="clickOrderItemHandler" shape="circle" text="查看症状" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }"></up-button> |
45 | - <up-button color="#05B8D2" v-if="[20, '20'].includes(props.item?.orderState)" @click="AcceptHandler" shape="circle" text="接诊" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }"></up-button> | 45 | + <up-button type="info" v-if="props.isRecords === 'success'" @click="AcceptHandler('success')" shape="circle" text="问诊记录" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }"></up-button> |
46 | + <up-button color="#05B8D2" v-if="[20, '20'].includes(props.item?.orderState)" @click="AcceptHandler('err')" shape="circle" text="接诊" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }"></up-button> | ||
46 | <up-button | 47 | <up-button |
47 | color="#05B8D2" | 48 | color="#05B8D2" |
48 | v-if="[30, '30'].includes(props.item?.orderState) && [null, undefined, ''].includes(props.item?.orderId)" | 49 | v-if="[30, '30'].includes(props.item?.orderState) && [null, undefined, ''].includes(props.item?.orderId)" |
@@ -50,6 +51,7 @@ | @@ -50,6 +51,7 @@ | ||
50 | () => { | 51 | () => { |
51 | sendPrescriptionState = true | 52 | sendPrescriptionState = true |
52 | isOneP = 1 | 53 | isOneP = 1 |
54 | + emit('editIsJumpHandler', 'err') | ||
53 | } | 55 | } |
54 | " | 56 | " |
55 | shape="circle" | 57 | shape="circle" |
@@ -110,7 +112,7 @@ | @@ -110,7 +112,7 @@ | ||
110 | import { ref, getCurrentInstance, ComponentPublicInstance, onMounted } from 'vue' | 112 | import { ref, getCurrentInstance, ComponentPublicInstance, onMounted } from 'vue' |
111 | import { storeToRefs } from 'pinia' | 113 | import { storeToRefs } from 'pinia' |
112 | import { useOrderStore } from '@/store/order' | 114 | import { useOrderStore } from '@/store/order' |
113 | -import { getPrescription_detail_information, getEndInformation, getReceive_diagnosis, getPrescription_detail, getPrescription_detail_information_renew } from '../../../api' | 115 | +import { getPrescription_detail_information, getEndInformation, getReceive_diagnosis, getPrescription_detail, getPrescription_detail_information_renew, getOrder_chat } from '../../../api' |
114 | import { PrescriptionDetailType } from '../../../types' | 116 | import { PrescriptionDetailType } from '../../../types' |
115 | import SendPrescription from '@/components/SendPrescription' | 117 | import SendPrescription from '@/components/SendPrescription' |
116 | import ViewPrescription from '@/components/ViewPrescription' | 118 | import ViewPrescription from '@/components/ViewPrescription' |
@@ -119,7 +121,7 @@ import { imlogin } from '../../../hooks/imLogin' | @@ -119,7 +121,7 @@ import { imlogin } from '../../../hooks/imLogin' | ||
119 | 121 | ||
120 | const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance } | 122 | const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance } |
121 | 123 | ||
122 | -const emit = defineEmits(['showPrescription', 'fetchOrderListHandler']) | 124 | +const emit = defineEmits(['showPrescription', 'fetchOrderListHandler', 'editIsJumpHandler']) |
123 | 125 | ||
124 | const orderStore = useOrderStore() | 126 | const orderStore = useOrderStore() |
125 | 127 | ||
@@ -132,13 +134,15 @@ interface IProps { | @@ -132,13 +134,15 @@ interface IProps { | ||
132 | isRecord: boolean | 134 | isRecord: boolean |
133 | bg: string | 135 | bg: string |
134 | item: any | 136 | item: any |
137 | + isRecords?: string | ||
135 | } | 138 | } |
136 | 139 | ||
137 | const props = withDefaults(defineProps<IProps>(), { | 140 | const props = withDefaults(defineProps<IProps>(), { |
138 | isPrescriptionDrug: false, | 141 | isPrescriptionDrug: false, |
139 | isRecord: false, | 142 | isRecord: false, |
140 | bg: '#fff', | 143 | bg: '#fff', |
141 | - item: {} | 144 | + item: {}, |
145 | + isRecords: 'err' | ||
142 | }) | 146 | }) |
143 | 147 | ||
144 | const isOneP = ref<number>(0) | 148 | const isOneP = ref<number>(0) |
@@ -157,6 +161,12 @@ onMounted(() => { | @@ -157,6 +161,12 @@ onMounted(() => { | ||
157 | uapDiv.style.zIndex = (currentZIndex + 99999999).toString() | 161 | uapDiv.style.zIndex = (currentZIndex + 99999999).toString() |
158 | }) | 162 | }) |
159 | 163 | ||
164 | +const getOrder_chatHandler = async () => { | ||
165 | + // const { result } = await getOrder_chat({ id: props.item.userId }) | ||
166 | + // const data = result.records.map(item => ({ ...item, imContent: JSON.parse(item.imContent) })) | ||
167 | + // console.log(data) | ||
168 | +} | ||
169 | + | ||
160 | const showPrescriptionDetailHandler = async () => { | 170 | const showPrescriptionDetailHandler = async () => { |
161 | if (props.item?.isAgain == 1) { | 171 | if (props.item?.isAgain == 1) { |
162 | getRenewDetailHandler() | 172 | getRenewDetailHandler() |
@@ -173,7 +183,9 @@ const closeSendPrescriptionHandler = () => { | @@ -173,7 +183,9 @@ const closeSendPrescriptionHandler = () => { | ||
173 | emit('fetchOrderListHandler') | 183 | emit('fetchOrderListHandler') |
174 | } | 184 | } |
175 | 185 | ||
176 | -const AcceptHandler = async () => { | 186 | +const AcceptHandler = async (historyFlag: string) => { |
187 | + uni.setStorageSync('history', historyFlag) | ||
188 | + | ||
177 | await getReceive_diagnosis({ id: props.item.id }) | 189 | await getReceive_diagnosis({ id: props.item.id }) |
178 | 190 | ||
179 | uni.setStorageSync('inUserInfo', props.item?.user) | 191 | uni.setStorageSync('inUserInfo', props.item?.user) |
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | <view class="text mb24">{{ PrescriptionDetail?.supplement || '病情描述' }}</view> | 10 | <view class="text mb24">{{ PrescriptionDetail?.supplement || '病情描述' }}</view> |
11 | </template> | 11 | </template> |
12 | <template v-if="![null, undefined, ''].includes(PrescriptionDetail?.renewRemark) && ['success'].includes(props.isRenew)"> | 12 | <template v-if="![null, undefined, ''].includes(PrescriptionDetail?.renewRemark) && ['success'].includes(props.isRenew)"> |
13 | - <view class="text mb24">问诊病情</view> | 13 | + <view class="text mb24">续方原因</view> |
14 | <view class="text mb24">{{ PrescriptionDetail?.renewRemark }}</view> | 14 | <view class="text mb24">{{ PrescriptionDetail?.renewRemark }}</view> |
15 | </template> | 15 | </template> |
16 | <view class="text mb24">处方药:</view> | 16 | <view class="text mb24">处方药:</view> |
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | <view class="text">运费</view> | 45 | <view class="text">运费</view> |
46 | <view class="blacktext">¥0</view> | 46 | <view class="blacktext">¥0</view> |
47 | </view> --> | 47 | </view> --> |
48 | - <view class="flexJ mb24"> | 48 | + <view class="flexJ mb24" v-if="![null, undefined, '0', ''].includes(PrescriptionDetail?.pid)"> |
49 | <view class="text">复诊时间</view> | 49 | <view class="text">复诊时间</view> |
50 | <view class="graytext">{{ PrescriptionDetail?.createTime }}</view> | 50 | <view class="graytext">{{ PrescriptionDetail?.createTime }}</view> |
51 | </view> | 51 | </view> |
@@ -20,9 +20,11 @@ | @@ -20,9 +20,11 @@ | ||
20 | <template v-for="_ in orderList"> | 20 | <template v-for="_ in orderList"> |
21 | <OrderCard | 21 | <OrderCard |
22 | :isPrescriptionDrug="Boolean(orderState)" | 22 | :isPrescriptionDrug="Boolean(orderState)" |
23 | + :isRecords="Event?.isRecords" | ||
23 | :bg="Event?.isRecords === 'success' ? 'linear-gradient(188deg, #E0FFF4 5.54%, #FFF 24.89%)' : '#fff'" | 24 | :bg="Event?.isRecords === 'success' ? 'linear-gradient(188deg, #E0FFF4 5.54%, #FFF 24.89%)' : '#fff'" |
24 | :isRecord="false" | 25 | :isRecord="false" |
25 | :item="_" | 26 | :item="_" |
27 | + @editIsJumpHandler="e => (isJump = e)" | ||
26 | @fetchOrderListHandler="orderStore.getOrderListHandler(true, orderState, subOrderState)" | 28 | @fetchOrderListHandler="orderStore.getOrderListHandler(true, orderState, subOrderState)" |
27 | /> | 29 | /> |
28 | </template> | 30 | </template> |
@@ -42,6 +44,7 @@ interface EventType { | @@ -42,6 +44,7 @@ interface EventType { | ||
42 | orderState: string | 44 | orderState: string |
43 | subOrderState?: string | 45 | subOrderState?: string |
44 | isRecords?: string | 46 | isRecords?: string |
47 | + isJump?: string | ||
45 | } | 48 | } |
46 | 49 | ||
47 | const Event = ref<EventType>() | 50 | const Event = ref<EventType>() |
@@ -52,6 +55,8 @@ const orderStore = useOrderStore() | @@ -52,6 +55,8 @@ const orderStore = useOrderStore() | ||
52 | 55 | ||
53 | const { orderStateList, orderState, subOrderState, page, orderList } = storeToRefs(orderStore) | 56 | const { orderStateList, orderState, subOrderState, page, orderList } = storeToRefs(orderStore) |
54 | 57 | ||
58 | +const isJump = ref<string | undefined>('err') | ||
59 | + | ||
55 | const toggleOrderHandler = (item: any, index: number) => { | 60 | const toggleOrderHandler = (item: any, index: number) => { |
56 | console.log(item, index) | 61 | console.log(item, index) |
57 | 62 | ||
@@ -74,6 +79,8 @@ onLoad((e: EventType) => { | @@ -74,6 +79,8 @@ onLoad((e: EventType) => { | ||
74 | console.log(e) | 79 | console.log(e) |
75 | Event.value = e | 80 | Event.value = e |
76 | 81 | ||
82 | + isJump.value = e.isJump | ||
83 | + | ||
77 | orderState.value = Number(e.orderState) | 84 | orderState.value = Number(e.orderState) |
78 | 85 | ||
79 | subOrderState.value = Number(e.subOrderState) || 0 | 86 | subOrderState.value = Number(e.subOrderState) || 0 |
@@ -86,7 +93,7 @@ onShow(() => { | @@ -86,7 +93,7 @@ onShow(() => { | ||
86 | uni.$TUIKit.getUserStatus({ userIDList: [uni.getStorageSync('ImUserId')] }).catch(err => imlogin()) | 93 | uni.$TUIKit.getUserStatus({ userIDList: [uni.getStorageSync('ImUserId')] }).catch(err => imlogin()) |
87 | }, 800) | 94 | }, 800) |
88 | 95 | ||
89 | - if (subOrderState.value == 2 && orderState.value == 0) return | 96 | + if (subOrderState.value == 2 && orderState.value == 0 && isJump.value === 'err') return |
90 | 97 | ||
91 | orderStore.getOrderListHandler(true, orderState.value, subOrderState.value) | 98 | orderStore.getOrderListHandler(true, orderState.value, subOrderState.value) |
92 | }) | 99 | }) |
@@ -91,6 +91,8 @@ const form = ref({ | @@ -91,6 +91,8 @@ const form = ref({ | ||
91 | }) | 91 | }) |
92 | 92 | ||
93 | const AcceptHandler = async () => { | 93 | const AcceptHandler = async () => { |
94 | + uni.setStorageSync('history', 'err') | ||
95 | + | ||
94 | await getReceive_diagnosis({ id: detailData.value?.id as string }) | 96 | await getReceive_diagnosis({ id: detailData.value?.id as string }) |
95 | 97 | ||
96 | uni.setStorageSync('inUserInfo', detailData.value?.user) | 98 | uni.setStorageSync('inUserInfo', detailData.value?.user) |
-
请 注册 或 登录 后发表评论