优化
This commit is contained in:
parent
df9a526b7b
commit
a1d691367e
9
Pages/kickedout/index.js
Normal file
9
Pages/kickedout/index.js
Normal file
@ -0,0 +1,9 @@
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
|
||||
},
|
||||
confirmJieSuanDialog(){
|
||||
app.go("/Pages/index/index");
|
||||
}
|
||||
})
|
||||
5
Pages/kickedout/index.json
Normal file
5
Pages/kickedout/index.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
}
|
||||
9
Pages/kickedout/index.wxml
Normal file
9
Pages/kickedout/index.wxml
Normal file
@ -0,0 +1,9 @@
|
||||
<t-dialog
|
||||
visible="{{ true }}"
|
||||
title="温馨提示"
|
||||
content="您已被踢下线"
|
||||
>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmJieSuanDialog">
|
||||
好的
|
||||
</view>
|
||||
</t-dialog>
|
||||
11
Pages/kickedout/index.wxss
Normal file
11
Pages/kickedout/index.wxss
Normal file
@ -0,0 +1,11 @@
|
||||
.dialog{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
width: 100%;
|
||||
}
|
||||
@ -12,10 +12,11 @@ Page({
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '处方详情', //导航栏 中间的标题
|
||||
},
|
||||
|
||||
// 此页面 页面内容距最顶部的距离
|
||||
height: app.globalData.height,
|
||||
order_prescription_id: ""
|
||||
order_prescription_id: "",
|
||||
prescription_img: "",
|
||||
doctor_sign_image: ""
|
||||
},
|
||||
onLoad(options) {
|
||||
let order_prescription_id = options.order_prescription_id;
|
||||
@ -70,6 +71,10 @@ Page({
|
||||
onShow(){
|
||||
api.getPharmacistPrescriptioninfo({order_prescription_id: this.data.order_prescription_id}).then(response => {
|
||||
console.log(response.data);
|
||||
this.setData({
|
||||
prescription_img: response.data.prescription_img,
|
||||
doctor_sign_image: response.data.doctor_sign_image
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
putPharmacistPrescriptionVerify(e){
|
||||
|
||||
@ -3,8 +3,12 @@
|
||||
<view class="img_box">
|
||||
<view class="img_content">
|
||||
<image class="case_img"
|
||||
src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/prescription_demo.png"
|
||||
mode="widthFix"
|
||||
src="{{prescription_img}}"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image class="doctor_sign_image"
|
||||
src="{{doctor_sign_image}}"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -38,7 +38,7 @@ page{
|
||||
}
|
||||
.info_item{
|
||||
text-align: center;
|
||||
/* width: 180rpx; */
|
||||
width: 190rpx;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
page{
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
.container{
|
||||
width: 100vw;
|
||||
}
|
||||
@ -31,19 +34,23 @@
|
||||
background-color: rgb(255, 255, 255);
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.06);
|
||||
z-index: 999;
|
||||
}
|
||||
.info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 999;
|
||||
}
|
||||
.info_top{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
z-index: 999;
|
||||
}
|
||||
.info_photo{
|
||||
margin-left: 20rpx;
|
||||
flex: 1;
|
||||
z-index: 999;
|
||||
}
|
||||
.info_content{
|
||||
color: #000;
|
||||
@ -52,16 +59,19 @@
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding-left: 20rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
.info_mobile{
|
||||
font-size: 36rpx;
|
||||
letter-spacing: 3rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
.info_wenzhen{
|
||||
margin: 20rpx 0 0 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
z-index: 999;
|
||||
}
|
||||
.info_wenzhen_new{
|
||||
flex: 1;
|
||||
@ -178,6 +188,7 @@
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.fun_box_item{
|
||||
width: 40vw;
|
||||
|
||||
@ -44,13 +44,13 @@ Page({
|
||||
},
|
||||
logOut(){
|
||||
console.log("退出登录");
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
wx.showModal({
|
||||
title: '确认退出登录',
|
||||
content: '退出登录后您需要重新登录',
|
||||
success (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定')
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
|
||||
@ -36,7 +36,8 @@ Page({
|
||||
case_detail: {},
|
||||
sub_disabled: false,
|
||||
from: "",
|
||||
now_filed_focus: 'save_durg_prescription_product_num'
|
||||
now_filed_focus: 'save_durg_prescription_product_num',
|
||||
page_meta_show: true
|
||||
},
|
||||
changeFocus(e){
|
||||
let next_filed_focus = e.currentTarget.dataset.next_filed_focus;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<!-- <page-meta page-style="{{ page_meta_show ? 'overflow: hidden;' : '' }}" /> -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="item">
|
||||
|
||||
@ -2,8 +2,6 @@ page{
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
.container{
|
||||
width: 100vw;
|
||||
background-color: #F6F6F6;
|
||||
letter-spacing: 3rpx;
|
||||
}
|
||||
.item{
|
||||
@ -71,6 +69,7 @@ page{
|
||||
margin: 20rpx 0;
|
||||
position: relative;
|
||||
left: 4vw;
|
||||
width: 50vw;
|
||||
}
|
||||
.drugs_box{
|
||||
width: 92vw;
|
||||
|
||||
@ -110,8 +110,8 @@ Page({
|
||||
this.setData({
|
||||
"info.work_num_day": event.detail
|
||||
});
|
||||
|
||||
this.updateConfig();
|
||||
let price = this.data.info.inquiry_price;
|
||||
this.updateConfig(price);
|
||||
|
||||
},
|
||||
onPriceChange(e){
|
||||
|
||||
@ -11,7 +11,7 @@ Page({
|
||||
},
|
||||
height: app.globalData.height,
|
||||
stickyProps: {
|
||||
offsetTop: app.globalData.height*2 + 20,
|
||||
offsetTop: (app.globalData.height * 2),
|
||||
zIndex: 99
|
||||
},
|
||||
list_1: [],
|
||||
@ -19,7 +19,7 @@ Page({
|
||||
show: false,
|
||||
add_message: "",
|
||||
current_words_type: 1,
|
||||
focus: true,
|
||||
focus: false,
|
||||
words_css: "border-radius: 20rpx;margin-bottom: 20rpx;",
|
||||
from: ""
|
||||
},
|
||||
|
||||
@ -3,16 +3,14 @@
|
||||
|
||||
<t-tabs
|
||||
defaultValue="{{ current_words_type }}"
|
||||
sticky
|
||||
swipeable="{{false}}"
|
||||
stickyProps="{{stickyProps}}"
|
||||
t-class="custom-tabs"
|
||||
bind:change="onTabChange"
|
||||
theme="line"
|
||||
custom-style="font-size: 32rpx"
|
||||
>
|
||||
<t-tab-panel label="问诊" value="1">
|
||||
<view class="item_list">
|
||||
<view class="item_list1">
|
||||
<van-swipe-cell right-width="{{ 65 }}"
|
||||
bind:close="wordsClose"
|
||||
bind:open="wordsOpen"
|
||||
@ -30,7 +28,7 @@
|
||||
</view>
|
||||
</t-tab-panel>
|
||||
<t-tab-panel label="处方" value="2">
|
||||
<view class="item_list">
|
||||
<view class="item_list2">
|
||||
<van-swipe-cell right-width="{{ 65 }}"
|
||||
bind:close="wordsClose"
|
||||
bind:open="wordsOpen"
|
||||
|
||||
@ -4,7 +4,11 @@ page{
|
||||
.container{
|
||||
width: 100vw;
|
||||
}
|
||||
.item_list{
|
||||
.item_list1{
|
||||
width: 92vw;
|
||||
margin: 40rpx auto 180rpx auto;
|
||||
}
|
||||
.item_list2{
|
||||
width: 92vw;
|
||||
margin: 40rpx auto;
|
||||
}
|
||||
@ -25,8 +29,9 @@ page{
|
||||
height: 130rpx;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
bottom: 50rpx;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
.popup_box{
|
||||
height: 500rpx;
|
||||
@ -69,4 +74,7 @@ page{
|
||||
padding: 32rpx !important;
|
||||
font-size: 34rpx !important;
|
||||
color: #333 !important;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
word-break:break-all;
|
||||
}
|
||||
@ -29,8 +29,10 @@ Page({
|
||||
if(wx.$TUIKit){
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
}else{
|
||||
app.imInit();
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
app.imInit().then(res => {
|
||||
console.log("wenzhen onload imInit");
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
});
|
||||
}
|
||||
setInterval(() => {
|
||||
let system_notice_unreadnnum = wx.getStorageSync(userID+"_system_notice_unreadnnum");
|
||||
@ -78,8 +80,12 @@ Page({
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
// 补偿登录操作
|
||||
app.imInit();
|
||||
this.getConversationList();
|
||||
app.imInit().then(res => {
|
||||
this.getConversationList();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
this.getConversationList();
|
||||
});
|
||||
});
|
||||
},
|
||||
go(e){
|
||||
@ -264,14 +270,14 @@ Page({
|
||||
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
let wenzhen_info = 0;
|
||||
let totalUnreadCount = 0;
|
||||
let message_inquiry_type = this.data.message_inquiry_type;
|
||||
|
||||
this.data.conversationList.forEach(item => {
|
||||
let conversationID = item.conversationID;
|
||||
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
|
||||
let type = item.type;
|
||||
let lastMessage = item.lastMessage;
|
||||
let type = lastMessage.type;
|
||||
let userProfile = item.userProfile;
|
||||
if(!lastMessage) return;
|
||||
let cloudCustomData = lastMessage.cloudCustomData;
|
||||
@ -303,7 +309,7 @@ Page({
|
||||
session_item.from_account = userProfile.userID;
|
||||
let unreadCount = item.unreadCount;
|
||||
if(unreadCount > 0){
|
||||
wenzhen_info = wenzhen_info + unreadCount;
|
||||
totalUnreadCount = totalUnreadCount + unreadCount;
|
||||
session_item.message_dot = true;
|
||||
}else{
|
||||
session_item.message_dot = false;
|
||||
@ -311,9 +317,9 @@ Page({
|
||||
session_list[inquiry_type - 1].push(session_item);
|
||||
})
|
||||
|
||||
if(wenzhen_info == 0) wenzhen_info = "";
|
||||
if(wenzhen_info > 99) wenzhen_info = "99+";
|
||||
wx.setStorageSync(userID+'_wenzhen_info', wenzhen_info);
|
||||
if(totalUnreadCount == 0){
|
||||
app.formatUnReadNum(userID+"_wenzhen_info", totalUnreadCount);
|
||||
}
|
||||
|
||||
this.setData({
|
||||
data_list_1: session_data_list_1,
|
||||
|
||||
@ -151,4 +151,7 @@
|
||||
</view>
|
||||
|
||||
<view style="height: 200rpx;"></view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
@ -49,7 +49,7 @@
|
||||
</view>
|
||||
|
||||
<view class="go">
|
||||
<van-button disabled="{{!info.is_open}}" color="#3CC7C0" bind:click="go" data-url="/Pages/yishi/wenzhen_v2/wenzhen" custom-style="border-radius: 20rpx;font-size:30rpx;" type="primary" block>去接诊</van-button>
|
||||
<van-button disabled="{{!info.is_open || info.is_open==0}}" color="#3CC7C0" bind:click="go" data-url="/Pages/yishi/wenzhen_v2/wenzhen" custom-style="border-radius: 20rpx;font-size:30rpx;" type="primary" block>去接诊</van-button>
|
||||
</view>
|
||||
|
||||
<t-picker
|
||||
|
||||
@ -120,7 +120,7 @@ Component({
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 1:消息内页横条
|
||||
// 1:消息内页横条(医生->患者)
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.TRABECULA) {
|
||||
const renderDom = [{
|
||||
type: 'trabecula',
|
||||
@ -129,6 +129,15 @@ Component({
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
//8:消息内页横条(患者->医生)
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.TRABECULA_PATIENT) {
|
||||
const renderDom = [{
|
||||
type: 'trabecula_patient',
|
||||
title: customMessage.title,
|
||||
desc: customMessage.desc,
|
||||
}];
|
||||
return renderDom;
|
||||
}
|
||||
// 2:订单结束评价弹出
|
||||
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.ORDER_EVALUATION) {
|
||||
let data = customMessage.data;
|
||||
|
||||
@ -37,14 +37,18 @@
|
||||
<view wx:if="{{renderDom[0].type ==='c2cCalling' || renderDom[0].type ==='groupCalling'}}" class="custom-message {{isMine?'my-custom':''}}" >
|
||||
<view class="custom-content-text">{{renderDom[0].text}}</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='notSupport'}}" class="message-body-span text-message" >
|
||||
<!-- <view wx:if="{{renderDom[0].type ==='notSupport'}}" class="message-body-span text-message" >
|
||||
<view class="message-body-span-text">{{renderDom[0].text}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 自定义横条样式 -->
|
||||
<view wx:if="{{renderDom[0].type==='trabecula'}}" class="gdxz_custom_trabecula_message">
|
||||
<view class="gdxz_custom_message_title">{{renderDom[0].title}}</view>
|
||||
<view class="gdxz_custom_message_desc">{{renderDom[0].desc}}</view>
|
||||
</view>
|
||||
<!-- <view wx:if="{{renderDom[0].type==='trabecula_patient'}}" class="gdxz_custom_trabecula_message">
|
||||
<view class="gdxz_custom_message_title">{{renderDom[0].title}}</view>
|
||||
<view class="gdxz_custom_message_desc">{{renderDom[0].desc}}</view>
|
||||
</view> -->
|
||||
<!-- 自定义评价样式 -->
|
||||
<view wx:if="{{renderDom[0].type==='order_evaluation'}}" class="gdxz_custom_order_evaluation_message" bindtap="showPop">
|
||||
<view class="evaluation_title">请您对本次问诊服务进行评价</view>
|
||||
|
||||
@ -121,7 +121,7 @@ line-height: 42rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
/* 自定义评价样式 */
|
||||
/* 自定义样式 */
|
||||
/* 横条样式 */
|
||||
.gdxz_custom_trabecula_message{
|
||||
display: flex;
|
||||
|
||||
@ -9,6 +9,8 @@ Component({
|
||||
type: Object,
|
||||
value: {},
|
||||
observer(newVal) {
|
||||
console.log("observerobserverobserverobserver")
|
||||
// console.log(newVal)
|
||||
this.setData({
|
||||
renderDom: parseText(newVal),
|
||||
});
|
||||
|
||||
@ -150,7 +150,7 @@ Component({
|
||||
// 获取消息列表
|
||||
getMessageList(conversation) {
|
||||
|
||||
|
||||
console.log("getMessageListgetMessageListgetMessageList")
|
||||
if (!this.data.isCompleted) {
|
||||
wx.$TUIKit.getMessageList({
|
||||
conversationID: conversation.conversationID,
|
||||
@ -186,9 +186,9 @@ Component({
|
||||
}
|
||||
},
|
||||
checkShowAvatar(message){
|
||||
// console.log("checkShowAvatar ");
|
||||
console.log("checkShowAvatar ");
|
||||
let type = message.type;
|
||||
// console.log("message type: ", type);
|
||||
console.log("message type: ", type);
|
||||
let show_avatar = true;
|
||||
if(type === "TIMCustomElem"){
|
||||
const customMessage = JSON.parse(message.payload.data);
|
||||
@ -200,6 +200,7 @@ Component({
|
||||
},
|
||||
// 历史消息渲染
|
||||
$handleMessageRender(messageList, currentMessageList) {
|
||||
console.log("handleMessageRenderhandleMessageRenderhandleMessageRender");
|
||||
this.showHistoryMessageTime(currentMessageList);
|
||||
if (messageList.length > 0) {
|
||||
if (this.data.conversation.type === '@TIM#SYSTEM') {
|
||||
@ -216,6 +217,7 @@ Component({
|
||||
},
|
||||
// 系统消息去重
|
||||
filterRepateSystemMessage(messageList) {
|
||||
console.log("filterRepateSystemMessage")
|
||||
const noRepateMessage = [];
|
||||
for (let index = 0; index < messageList.length; index++) {
|
||||
if (!noRepateMessage.some(item => item && item.ID === messageList[index].ID)) {
|
||||
@ -231,15 +233,16 @@ Component({
|
||||
this.updateReadByPeer(event);
|
||||
},
|
||||
// 更新已读更新
|
||||
updateReadByPeer(event) {
|
||||
event.data.forEach((item) => {
|
||||
const index = this.data.messageList.findIndex(element => element.ID === item.ID);
|
||||
this.data.messageList[index] = item;
|
||||
this.setData({
|
||||
messageList: this.data.messageList,
|
||||
});
|
||||
});
|
||||
},
|
||||
// updateReadByPeer(event) {
|
||||
// console.log("updateReadByPeerupdateReadByPeer")
|
||||
// event.data.forEach((item) => {
|
||||
// const index = this.data.messageList.findIndex(element => element.ID === item.ID);
|
||||
// this.data.messageList[index] = item;
|
||||
// this.setData({
|
||||
// messageList: this.data.messageList,
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
|
||||
// 收到的消息
|
||||
$onMessageReceived(value) {
|
||||
@ -320,8 +323,11 @@ Component({
|
||||
// 自己的消息上屏
|
||||
updateMessageList(message) {
|
||||
console.log("自己的消息上屏 updateMessageList: ", message);
|
||||
console.log(message);
|
||||
//自己的消息有头像
|
||||
message.show_avatar = this.checkShowAvatar(message);
|
||||
console.log(message.show_avatar)
|
||||
console.log(message.flow)
|
||||
if (message.conversationID !== this.data.conversation.conversationID) return;
|
||||
wx.$TUIKit.setMessageRead({ conversationID: this.data.conversation.conversationID }).then(() => {
|
||||
logger.log('| MessageList | setMessageRead | ok');
|
||||
@ -332,20 +338,26 @@ Component({
|
||||
if (message.type === MESSAGE_TYPE_TEXT.TIM_CUSTOM_ELEM) {
|
||||
const typingMessage = JSON.parse(message.payload.data);
|
||||
if (typingMessage.businessID === BUSINESS_ID_TEXT.USER_TYPING) {
|
||||
console.log(1111111)
|
||||
this.setData({
|
||||
messageList: this.data.messageList,
|
||||
});
|
||||
} else {
|
||||
console.log(44444)
|
||||
this.data.messageList.push(message);
|
||||
}
|
||||
} else {
|
||||
console.log(55555)
|
||||
console.log(message)
|
||||
this.data.messageList.push(message);
|
||||
}
|
||||
console.log(222222)
|
||||
this.setData({
|
||||
lastMessageSequence: this.data.messageList.slice(-1)[0].sequence,
|
||||
messageList: this.data.messageList,
|
||||
jumpAim: `ID-${this.filterSystemMessageID(this.data.messageList[this.data.messageList.length - 1].ID)}`,
|
||||
}, () => {
|
||||
console.log(333333)
|
||||
this.setData({
|
||||
messageList: this.data.messageList,
|
||||
});
|
||||
@ -378,6 +390,7 @@ Component({
|
||||
},
|
||||
// 更新 messagelist
|
||||
updateMessageByID(deleteMessageID) {
|
||||
console.log("updateMessageByIDupdateMessageByIDupdateMessageByID")
|
||||
const { messageList } = this.data;
|
||||
const deleteMessageArr = messageList.filter(item => item.ID === deleteMessageID);
|
||||
this.setData({
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
<FileMessage wx:if="{{item.type === 'TIMFileElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
<MergerMessage wx:if="{{item.type === 'TIMRelayElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
|
||||
</view>
|
||||
|
||||
<image class="t-message-avatar" wx:if="{{item.flow === 'out' && item.show_avatar }}" src="{{item.avatar || 'https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/default_photo.png'}}" data-value="{{item}}" bindtap="getMemberProfile"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -41,12 +41,14 @@ const constant = {
|
||||
},
|
||||
//自定义消息
|
||||
GDXZ_CUSTOM_MSEEAGE: {
|
||||
TRABECULA: 1,//1:消息内页横条
|
||||
TRABECULA: 1,//1:消息内页横条(医生->患者)
|
||||
ORDER_EVALUATION: 2,//2:订单结束评价弹出
|
||||
DOCTOR_SYSTEM_NOTIFICATION: 3,//3:医生端系统通知
|
||||
DOCTOR_SERVICE_NOTIFICATION: 4,//4:医生端服务通知
|
||||
PATIENT_SYSTEM_MESSAGES: 5,//5:患者端系统消息
|
||||
PRESCRIBE: 6,//6:处方开具成功
|
||||
PRESCRIBE: 6,//6:处方开具成功(医生端)
|
||||
PRESCRIBE_VERIFY: 7,//7:处方审核通过(患者端)
|
||||
TRABECULA_PATIENT: 8,//8:消息内页横条(患者->医生)
|
||||
},
|
||||
|
||||
OPERATING_ENVIRONMENT: 'imWxTuikit'
|
||||
|
||||
55
app.js
55
app.js
@ -3,6 +3,8 @@ import TIM from './TUIKit/lib/tim-wx-sdk';
|
||||
import { genTestUserSig } from './TUIKit/debug/GenerateTestUserSig';
|
||||
import TIMUploadPlugin from './TUIKit/lib/tim-upload-plugin';
|
||||
import { API } from './utils/network/api'
|
||||
import constant from './TUIKit/utils/constant';
|
||||
const { GDXZ_CUSTOM_MSEEAGE } = constant;
|
||||
const api = new API()
|
||||
App({
|
||||
onLaunch: function (options) {
|
||||
@ -77,7 +79,7 @@ App({
|
||||
// const userSig = sign.userSig;
|
||||
|
||||
//获取im签名数据
|
||||
api.getSignIM().then(response => {
|
||||
return api.getSignIM().then(response => {
|
||||
return response.data;
|
||||
}).then((userSig) => {
|
||||
console.log("userSig: ", userSig);
|
||||
@ -121,7 +123,26 @@ App({
|
||||
console.log("onSDKReady from app.js");
|
||||
this.globalData.chat_sdk_ready = true;
|
||||
|
||||
|
||||
// let promise = wx.$TUIKit.deleteConversation('C2C500318318078251008');
|
||||
// promise.then(function(imResponse) {
|
||||
// // 删除会话成功
|
||||
// const { conversationID } = imResponse.data; // 被删除的会话 ID
|
||||
// }).catch(function(imError) {
|
||||
// console.warn('deleteConversation error:', imError); // 删除会话失败的相关信息
|
||||
// });
|
||||
|
||||
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onSystemPushReceived, this);
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.KICKED_OUT, this.onKickedOut);
|
||||
},
|
||||
onKickedOut(){
|
||||
console.log("onKickedOutonKickedOutonKickedOutonKickedOut");
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
this.go("/Pages/kickedout/index");
|
||||
},
|
||||
$onSystemPushReceived(e){
|
||||
console.log("onSystemPushReceived from app.js");
|
||||
@ -139,19 +160,43 @@ App({
|
||||
let payloadData = payload.data;
|
||||
let payloadDataJson = JSON.parse(payloadData);
|
||||
let message_type = payloadDataJson.message_type;
|
||||
if(message_type == 3) unread_name = userID+"_system_notice_unreadnnum"; //医生端系统通知
|
||||
if(message_type == 4) unread_name = userID+"_service_notice_unreadnnum"; //医生端服务通知
|
||||
console.log("message_type: ", message_type);
|
||||
switch (message_type) {
|
||||
case GDXZ_CUSTOM_MSEEAGE.TRABECULA:
|
||||
unread_name = userID+"_wenzhen_info"; //1、消息内页横条
|
||||
break;
|
||||
case GDXZ_CUSTOM_MSEEAGE.ORDER_EVALUATION:
|
||||
unread_name = userID+"_wenzhen_info"; //2、订单结束评价弹出
|
||||
break;
|
||||
case GDXZ_CUSTOM_MSEEAGE.DOCTOR_SYSTEM_NOTIFICATION:
|
||||
unread_name = userID+"_system_notice_unreadnnum"; //3、医生端系统通知
|
||||
break;
|
||||
case GDXZ_CUSTOM_MSEEAGE.DOCTOR_SERVICE_NOTIFICATION:
|
||||
unread_name = userID+"_service_notice_unreadnnum"; //4、医生端服务通知
|
||||
break;
|
||||
case GDXZ_CUSTOM_MSEEAGE.PRESCRIBE:
|
||||
unread_name = userID+"_wenzhen_info"; //6、处方开具成功
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}else{
|
||||
unread_name = userID+"_wenzhen_info";//tabbar 问诊角标
|
||||
}
|
||||
this.formatUnReadNum(unread_name);
|
||||
},
|
||||
formatUnReadNum(name){
|
||||
formatUnReadNum(name, increment=1){
|
||||
let val = wx.getStorageSync(name);
|
||||
if(val == "") val = 0;
|
||||
if(increment > 0){
|
||||
val = val + increment;
|
||||
}else{
|
||||
val = increment;
|
||||
}
|
||||
if(val == "+99") val = 100;
|
||||
val = val + 1;
|
||||
if(val > 99) val = '+99';
|
||||
if(val == 0) val = '';
|
||||
wx.setStorageSync(name, val);
|
||||
},
|
||||
aegisInit() {
|
||||
|
||||
3
app.json
3
app.json
@ -50,7 +50,8 @@
|
||||
"Pages/yishi/manual_detail/index",
|
||||
"Pages/yishi/addzhenduan/index",
|
||||
"Pages/yishi/wenzhen_v2/wenzhen",
|
||||
"Pages/webpage/index"
|
||||
"Pages/webpage/index",
|
||||
"Pages/kickedout/index"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"t-badge": "tdesign-miniprogram/badge/badge"
|
||||
"t-badge": "tdesign-miniprogram/badge/badge",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@
|
||||
<view class="content_4" wx:if="{{ status == 3 }}">{{note}}</view>
|
||||
</view>
|
||||
|
||||
<van-popup show="{{ show }}" bind:close="onClose" round>
|
||||
<!-- <van-popup show="{{ show }}" bind:close="onClose" round>
|
||||
<view class="pop_content">
|
||||
<view class="pop_title">温馨提示</view>
|
||||
<view class="pop_note">为保障服务质量,请您查看患者病历信息再选择是否接诊。</view>
|
||||
@ -30,4 +30,15 @@
|
||||
<view class="pop_btn_right" bindtap="postDoctorInquiry" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
</van-popup> -->
|
||||
|
||||
<t-dialog
|
||||
visible="{{ show }}"
|
||||
title="温馨提示"
|
||||
close-on-overlay-click
|
||||
bind:close="onClose"
|
||||
content="为保障服务质量,请您查看患者病历信息再选择是否接诊。"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="go" data-from_account="{{from_account}}" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" >去查看</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="postDoctorInquiry" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
|
||||
</t-dialog>
|
||||
@ -59,34 +59,17 @@
|
||||
margin: 0 30rpx;
|
||||
min-height: 70rpx;
|
||||
}
|
||||
.pop_content{
|
||||
.dialog{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 80vw;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.pop_title{
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
padding: 30rpx 20rpx;
|
||||
}
|
||||
.pop_note{
|
||||
font-size: 32rpx;
|
||||
color: #999999;
|
||||
padding: 0rpx 20rpx 30rpx 20rpx;
|
||||
}
|
||||
.pop_btn{
|
||||
display: flex;
|
||||
border-top: 1px solid #E3E4E5;
|
||||
}
|
||||
.pop_btn_left{
|
||||
flex: 1;
|
||||
border-right: 1px solid #E3E4E5;
|
||||
padding: 30rpx 0rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.pop_btn_right{
|
||||
flex: 1;
|
||||
color: #49B9AD;
|
||||
padding: 30rpx 0rpx;
|
||||
.dialog_cancel_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
border-right: 1px solid #E9E9E9;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
@ -10,7 +10,7 @@
|
||||
"list": [
|
||||
{
|
||||
"name": "",
|
||||
"pathName": "Pages/index/index",
|
||||
"pathName": "Pages/kickedout/index",
|
||||
"query": "",
|
||||
"launchMode": "default",
|
||||
"scene": null
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user