This commit is contained in:
haomingming 2023-03-14 14:09:21 +08:00
parent 14bcbf1673
commit 959bfc61b1
79 changed files with 1601 additions and 438 deletions

View File

@ -25,7 +25,7 @@ Page({
onShow: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
currentTab: 0 //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
})
}
}

View File

@ -24,7 +24,7 @@ Page({
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
currentTab: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
active: 1, //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
})
}
}

View File

@ -51,7 +51,7 @@ Page({
},
onTabsChange(e){
console.log(e);
let list_name = "appraise_list_" + this.data.evaluation_type;
let list_name = "appraise_list_" + e.detail.value;
this.setData({
evaluation_type: e.detail.value,
current_page: 0,

View File

@ -4,7 +4,8 @@
"te-nav-bar": "/commpents/te_navbar",
"appraise-data": "/commpents/appraise_data/index",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel"
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
"van-empty": "@vant/weapp/empty/index"
},
"enablePullDownRefresh": true,
"onReachBottomDistance": 100

View File

@ -20,8 +20,9 @@
date="{{item.created_at}}"
wx:for="{{appraise_list_1}}"
/>
</view>
<van-empty description="暂无数据" wx:if="{{appraise_list_1.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="好评({{good_quantity}}" value="2">
<view class="item_list">
@ -33,6 +34,7 @@
wx:for="{{appraise_list_2}}"
/>
</view>
<van-empty description="暂无数据" wx:if="{{appraise_list_2.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="中/差评({{bad_quantity}}" value="3">
@ -45,6 +47,7 @@
wx:for="{{appraise_list_3}}"
/>
</view>
<van-empty description="暂无数据" wx:if="{{appraise_list_3.length == 0}}" />
</t-tab-panel>
</t-tabs>
</view>

View File

@ -1,7 +1,8 @@
page{
background-color: #F6F6F6;
}
.container{
width: 100vw;
height: 100vh;
background-color: #F6F6F6;
}
.t-tab-panel,.t-tabs__content {
background-color: #F6F6F6;

View File

@ -5,7 +5,7 @@
<view class="help_title">
<text wx:if="{{ !banklist_empty }}">我的银行卡</text>
</view>
<view class="help_note">
<view class="help_note" data-url="/Pages/yishi/manual/index" bindtap="go">
操作手册-银行卡<t-icon size="26rpx" style="display: inline-block;" name="chevron-right" size="48rpx" data-name="chevron-right" />
</view>
</view>

View File

@ -1,3 +1,5 @@
import { API } from './../../../utils/network/api'
let api = new API()
const app = getApp()
Page({
data: {
@ -6,5 +8,21 @@ Page({
title: '病历信息', //导航栏 中间的标题
},
height: app.globalData.height,
order_inquiry_id: "",
case_detail: {}
},
onLoad(options){
this.setData({
order_inquiry_id: options.order_inquiry_id
})
},
onShow(){
//获取患者问诊病例
api.getDoctorInquiryCase({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
console.log(response);
this.setData({
case_detail: response.data
})
}).catch(errors => {console.error(errors);})
}
})

View File

@ -1,56 +1,58 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="main_title">基础信息</view>
<view class="data_box">
<view class="data_box_top">
<view class="name">张三三</view>
<view class="sex">30岁 </view>
<view class="name">{{case_detail.name}}</view>
<view class="sex">{{case_detail.sex==1?'男':case_detail.sex==2?'女':'未知'}}{{case_detail.age}}岁 </view>
</view>
<view class="info">
<view class="height info_item"><text class="info_title">身高:</text><text class="info_val">182cm</text></view>
<view class="weight info_item"><text class="info_title">体重:</text><text class="info_val">98KG</text></view>
<view class="minzu info_item"><text class="info_title">民族:</text><text class="info_val">汉族</text></view>
<view class="zhiye info_item"><text class="info_title">职业:</text><text class="info_val">学生</text></view>
<view class="hunyin info_item"><text class="info_title">婚姻:</text><text class="info_val">已婚</text></view>
<view class="height info_item"><text class="info_title">身高:</text><text class="info_val">{{case_detail.height}}cm</text></view>
<view class="weight info_item"><text class="info_title">体重:</text><text class="info_val">{{case_detail.weight}}KG</text></view>
<view class="minzu info_item"><text class="info_title">民族:</text><text class="info_val">{{case_detail.nation_name}}</text></view>
<view class="zhiye info_item"><text class="info_title">职业:</text><text class="info_val">{{case_detail.job_name}}</text></view>
<view class="hunyin info_item"><text class="info_title">婚姻:</text><text class="info_val">{{case_detail.nation_name}}</text></view>
</view>
<view class="disease_box">
<view class="disease_box_item">
<view class="title">所患疾病:</view>
<view class="conent">肝炎</view>
<view class="conent">{{case_detail.disease_class_name}}</view>
</view>
<view class="disease_box_item">
<view class="title">确诊日期:</view>
<view class="conent">2022年8月29日 10:23</view>
<view class="conent">{{case_detail.diagnosis_date}}</view>
</view>
<view class="disease_box_item">
<!-- <view class="disease_box_item">
<view class="title">医生诊断:</view>
<view class="conent">过度劳累,失眠不足导致可以多</view>
</view>
<view class="conent">{{case_detail.disease_class_name}}</view>
</view> -->
<view class="disease_box_item">
<view class="title">确诊医院:</view>
<view class="conent">首都医科大学附属北京佑安医院</view>
<view class="conent">{{case_detail.diagnosis_hospital}}</view>
</view>
<view class="disease_box_item">
<view class="title">正在服用的药品信息:</view>
<view class="conent">无/有</view>
<view class="conent">{{case_detail.disease_class_name}}</view>
</view>
<view class="disease_info">
详细描述阿托伐他汀钙片8片 用法用量常用的起始剂量为10mg每日一次
</view>
<view class="disease_box_item">
<view class="title">病情描述:</view>
<view class="conent">过度劳累,失眠不足导致可以多休息几天,没有好转的话可以去医院看看先吧...</view>
<view class="conent">{{case_detail.disease_desc}}</view>
</view>
<view class="disease_box_item">
<view class="title">用药意向:</view>
<view class="conent">阿托伐他汀钙片8片(用法用量:常用的起始剂量为10mg每日一次剂量调整时间为4周或更长。阿托伐他汀每日用量可在一天内的任何时间一次服用并不受进餐影响。)</view>
<view class="title">用药意向:</view>
<view class="conent">
<text wx:for="{{case_detail.product}}">{{item}};</text>
</view>
</view>
<view class="disease_box_item">
<view class="title">问诊本人复诊凭证(病例/处方单/检查报告/住院单可任选其一)</view>
<view class="conent">无</view>
</view>
<view class="img_box">
<t-image id="loading-img" shape="round" src="" width="72" height="72" />
<t-image id="loading-img" shape="round" src="{{item.url}}" width="72" height="72" wx:for="{{case_detail.diagnose_images}}"/>
</view>
</view>
</view>
@ -59,35 +61,38 @@
<view class="disease_box">
<view class="disease_box_item">
<view class="title">过敏史:</view>
<view class="conent">无/有(显示内容)</view>
<view class="conent">{{case_detail.is_allergy_history==0?'否':case_detail.allergy_history}}</view>
</view>
<view class="disease_box_item">
<view class="title">家族史:</view>
<view class="conent">无/有(显示内容)</view>
<view class="conent">{{case_detail.is_family_history==0?'否':case_detail.family_history}}</view>
</view>
<view class="disease_box_item">
<view class="title">是否备孕、妊娠或者哺乳期:</view>
<view class="conent">不是/是(显示内容)</view>
<view class="conent">{{case_detail.is_pregnant==0?'否':case_detail.pregnant}}</view>
</view>
<view class="disease_box_item">
<view class="title">饮酒史:</view>
<view class="conent">从不、偶尔、经常、每天、已解酒</view>
<view class="conent">{{case_detail.drink_wine_status==1?'从不':case_detail.drink_wine_status==2?'偶尔':case_detail.drink_wine_status==3?'经常':case_detail.drink_wine_status==4?'每天':case_detail.drink_wine_status==5?'已戒酒':'其他'}}</view>
</view>
<view class="disease_box_item">
<view class="title">吸烟史:</view>
<view class="conent">从不、偶尔、经常、每天、已解酒</view>
<view class="conent">{{case_detail.smoke_status==1?'从不':case_detail.smoke_status==2?'偶尔':case_detail.smoke_status==3?'经常':case_detail.smoke_status==4?'每天':case_detail.smoke_status==5?'已戒烟':'其他'}}</view>
</view>
<view class="disease_box_item">
<view class="title">手术史:</view>
<view class="conent">无/有(手术名称)</view>
<view class="conent">{{case_detail.is_operation==0?'否':case_detail.operation}}</view>
</view>
<view class="disease_box_item">
<view class="title">接触化学物:</view>
<view class="conent">从不、偶尔、经常、每天</view>
<view class="conent">{{case_detail.chemical_compound_status==1?'从不':case_detail.chemical_compound_status==2?'偶尔':case_detail.chemical_compound_status==3?'经常':case_detail.chemical_compound_status==4?'每天':'其他'}}</view>
</view>
<view class="disease_info">
详细描述:如经常染发、接触油漆或者甲醛等
<view class="disease_info" wx:if="{{case_detail.chemical_compound_status > 1}}">
详细描述:{{case_detail.chemical_compound_describe}}
</view>
</view>
</view>
<view style="height: 50rpx;">
</view>
</view>

View File

@ -1,6 +1,8 @@
page{
background-color: #F6F6F6;
}
.container{
width: 100vw;
background-color: #F6F6F6;
padding: 0 4vw;
}
.main_title{

View File

@ -18,8 +18,6 @@ Page({
income_tax: "12"
},
onLoad(options){
//获取提现数据
api.getDoctorWithdrawal().then(response => {
console.log(response);

View File

@ -1,6 +1,6 @@
<!-- 提现页面 -->
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="top">
<view class="txt_title">结算银行卡</view>
<view class="rule">提现规则</view>

View File

@ -1,12 +1,14 @@
.container{
page{
background-color: #F4F4F4;
}
.container{
margin-top: 20rpx;
width: 100vw;
height: 100vh;
}
.top{
display: flex;
width: 92vw;
margin: 30rpx auto;
margin: 0 auto 20rpx auto;
justify-content: space-between;
}
.txt_title{

View File

@ -1,6 +1,6 @@
<!-- 提现记录 -->
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="top">
<view class="top_txt">
<view class="month">2022年<van-icon name="arrow-down" color="#fff" size="40rpx" /></view>

View File

@ -1,11 +1,12 @@
.container{
page{
background-color: #F4F4F4;
}
.container{
width: 100vw;
height: 100vh;
}
.top{
width: 92vw;
margin: 50rpx auto 0 auto;
margin: 20rpx auto 0 auto;
background-color: #3CC7C0;
height: 150rpx;
border-radius: 20rpx;

View File

@ -1,63 +1,38 @@
// index.js
import TIM from '../../../TUIKit/lib/tim-wx-sdk';
import { genTestUserSig } from '../../../TUIKit/debug/GenerateTestUserSig';
import TIMUploadPlugin from '../../../TUIKit/lib/tim-upload-plugin';
const app = getApp()
Page({
data: {
config: {
userID: "xiaobeibei", //User ID
SDKAPPID: 1400793692, // Your SDKAppID
SECRETKEY: "44d97cf741fc758be98cdad100015582b6ad1dc5a3b6676c1997a57279eecfa9", // Your secretKey
EXPIRETIME: 604800,
},
patient_account: "ayu",
patient_account: "10000",
title: '患者姓名',
height: app.globalData.height,
height: app.globalData.height,
order_inquiry_id: ""
},
onLoad() {
onLoad(option) {
console.log("chat onload");
let sign = genTestUserSig(this.data.config);
console.log("sign: ", sign);
const userSig = sign.userSig;
console.log("userSig: ", userSig);
wx.$TUIKit = TIM.create({
SDKAppID: this.data.config.SDKAPPID
});
wx.$chat_SDKAppID = this.data.config.SDKAPPID;
wx.$chat_userID = this.data.config.userID;
wx.$chat_userSig = userSig;
wx.$TUIKitTIM = TIM;
wx.$TUIKit.registerPlugin({ 'tim-upload-plugin': TIMUploadPlugin });
wx.$TUIKit.login({
userID: this.data.config.userID,
userSig
});
wx.$TUIKit.setLogLevel(3);//设置日志级别
wx.setStorage({
key: 'currentUserID',
data: [],
});
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
let from_account = option.from_account;
let order_inquiry_id = option.order_inquiry_id;
this.setData({
patient_account: from_account,
order_inquiry_id: order_inquiry_id,
})
},
onUnload() {
console.log("chat onUnload");
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
},
onShow(){
let _this = this;
let interval = setInterval(() => {
console.log("chat init ,");
console.log("app.globalData.chat_sdk_ready: ", app.globalData.chat_sdk_ready);
if(app.globalData.chat_sdk_ready){
_this.onSDKReady();
const TUIChat = _this.selectComponent('#TUIChat');
TUIChat.init();
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, _this.$onMessageReceived, _this);
clearInterval(interval);
}
}, 100);
}, 1000);
},
onSDKReady() {
console.error("chat js: onSDKReady")
const TUIChat = this.selectComponent('#TUIChat');
TUIChat.init();
app.globalData.chat_sdk_ready = true
$onMessageReceived(value) {
const message = value.data[0];
console.log("message from chat: ",message)
}
})

View File

@ -1,7 +1,5 @@
<!-- 一对一聊天 -->
<!-- 一对一聊天 不带会话列表 -->
<view>
<TUIChat id="TUIChat" currentConversationID="C2C{{patient_account}}"
unreadCount="9" hasCallKit="{{ true }}" bind:handleCall="handleCall"
></TUIChat>
</view>
<TUIChat id="TUIChat" currentConversationID="C2C{{patient_account}}" order_inquiry_id="{{order_inquiry_id}}"
hasCallKit="{{ true }}" bind:handleCall="handleCall"></TUIChat>
</view>

View File

@ -1,50 +1,24 @@
// index.js
import TIM from '../../../TUIKit/lib/tim-wx-sdk';
import { genTestUserSig } from '../../../TUIKit/debug/GenerateTestUserSig';
import TIMUploadPlugin from '../../../TUIKit/lib/tim-upload-plugin';
const app = getApp()
Page({
data: {
config: {
userID: "xiaobeibei", //User ID
SDKAPPID: 1400793692, // Your SDKAppID
SECRETKEY: "44d97cf741fc758be98cdad100015582b6ad1dc5a3b6676c1997a57279eecfa9", // Your secretKey
EXPIRETIME: 604800,
},
title: '患者姓名',
height: app.globalData.height,
},
onLoad() {
let sign = genTestUserSig(this.data.config);
console.log("sign: ", sign);
const userSig = sign.userSig;
console.log("userSig: ", userSig);
wx.$TUIKit = TIM.create({
SDKAppID: this.data.config.SDKAPPID
});
wx.$chat_SDKAppID = this.data.config.SDKAPPID;
wx.$chat_userID = this.data.config.userID;
wx.$chat_userSig = userSig;
wx.$TUIKitTIM = TIM;
wx.$TUIKit.registerPlugin({ 'tim-upload-plugin': TIMUploadPlugin });
wx.$TUIKit.login({
userID: this.data.config.userID,
userSig
});
wx.$TUIKit.setLogLevel(3);//设置日志级别
wx.setStorage({
key: 'currentUserID',
data: [],
});
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
console.log("onLoad chat_session")
},
onUnload() {
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
},
onSDKReady() {
console.warn("chat js: onSDKReady")
const TUIKit = this.selectComponent('#TUIKit');
TUIKit.init();
onShow(){
let _this = this;
let interval = setInterval(() => {
if(app.globalData.chat_sdk_ready){
const TUIKit = _this.selectComponent('#TUIKit');
TUIKit.init();
clearInterval(interval);
}
}, 100);
}
})

View File

@ -61,7 +61,7 @@ Page({
getList(){
//获取处方列表
let params = {};
params.prescription_status = this.data.prescription_status;//处方审核状态0:审核中 2:审核驳回)
params.pharmacist_audit_status = this.data.prescription_status;//处方审核状态0:审核中 2:审核驳回)
params.page = this.data.current_page + 1;
api.getDoctorPrescription(params).then(response => {
console.log(response);

View File

@ -3,6 +3,7 @@
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel"
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
"van-empty": "@vant/weapp/empty/index"
}
}

View File

@ -1,5 +1,5 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="tabs">
<t-tabs
defaultValue="{{0}}"
@ -52,6 +52,7 @@
</view>
</view>
<van-empty description="暂无数据" wx:if="{{chufang_list_0.length == 0}}" />
</view>
</t-tab-panel>

View File

@ -1,7 +1,8 @@
page{
background-color: #F6F6F6;
}
.container{
width: 100vw;
height: 100vh;
background-color: #F6F6F6;
}
.t-tabs__content{
background-color: #F6F6F6;
@ -14,7 +15,7 @@
}
.item_list{
width: 90vw;
margin: 0 auto;
margin: 20rpx auto;
}
.item{
width: 100%;

View File

@ -1,5 +1,4 @@
// Pages/yishi/identity/index.js
import Toast from '@vant/weapp/toast/toast';
import { API } from './../../../utils/network/api'
import { FileUtil } from './../../../utils/fileutil'
@ -16,70 +15,7 @@ Page({
stickyProps: {
zIndex: 2,
},
realname:"",
idcard:"",
avatar: "https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/default_photo.png",
is_avatar: false,
city_show: false,
keshi_show: false,
yiyuan_show: false,
zhuanchang_show: false,
zhiye_show: false,
zige_show: false,
zhicheng_show: false,
zhicheng_img_show: false,
next_btn_txt: "下一步",
next_btn_disabled: false,
office_phone: "",
keshi_note: "请选择科室",
keshi_columns: [],
select_keshi_id: "",
select_keshi_index: "",
custom_keshi: "",
zhicheng_note: "请选择职称",
zhicheng_columns: [
{
text: "执业医师",
value: 1
},
{
text: "主治医师",
value: 2
},
{
text: "副主任医师",
value: 3
},
{
text: "主任医师",
value: 4
}
],
select_zhicheng_id: "",
select_zhicheng_index: "",
select_yiyuan_index: "",
yiyuan_columns: [],
zhuanchang_columns: [],
zhuanchang_selected_columns: [],
select_province_id: "",
select_city_id: "",
select_county_id: "",
city_note: "请选择城市",
yiyuan_note: "请选择医院",
select_yiyuan_id: "",
area_sub_titles: ["省份","市区","区县"],
areaList: [],
textarea_jianjie: "",
textarea_shanchang: "",
zhiye_file_list:[],
zige_file_list:[],
zhicheng_file_list:[],
doctorauthiden_data_ready: false,
basicdepartment_data_ready: false,
areaprovince_data_ready: false,
iden_auth_status: 0,
iden_auth_disabled: 0,
iden_auth_status_txt: "未认证",
},
onLoad(){
let _this = this;

View File

@ -1,27 +1,7 @@
.required{
color: #e34d59;
}
.photo{
position: relative;
padding: 32rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
font-weight: 400;
align-items: center;
}
.photo::after {
position: absolute;
box-sizing: border-box;
content: ' ';
pointer-events: none;
right: 0;
left: 32rpx;
bottom: 0;
border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));
transform: scaleY(0.5);
left: 32rpx;
}
.title{
font-size: 30rpx;
color: #1C2023;

View File

@ -110,6 +110,17 @@ Page({
},
onLoad(){
},
onShow: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
})
}
this.getMenuButtonBound();
api.yiShiIndex().then(response => {
console.log(response);
let avatar = response.data.info.avatar;
@ -180,15 +191,6 @@ Page({
})
},
onShow: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
currentTab: 0 //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
})
}
this.getMenuButtonBound();
},
onADChange(){
// console.log("onADChange");
},

View File

@ -1,6 +1,6 @@
<!-- 操作手册 -->
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="item_list">
<van-cell url="/Pages/yishi/manual_detail/index?manual_id={{item.manual_id}}" custom-style="border-radius: 20rpx;margin-bottom: 20rpx;" title="{{item.title}}" is-link wx:for="{{list}}" />
</view>

View File

@ -1,9 +1,11 @@
.container{
width: 100vw;
height: 100vh;
page{
background-color: #F6F6F6;
}
.container{
margin-top: 20rpx;
width: 100vw;
}
.item_list{
width: 92vw;
margin: 20rpx auto;
margin: 0 auto;
}

View File

@ -1,6 +1,6 @@
{
"component": true,
"usingComponents": {
"m-nav-bar": "/commpents/mynavbar/index"
"te-nav-bar": "/commpents/te_navbar"
}
}

View File

@ -1,4 +1,5 @@
<!-- 操作手册详情 -->
<m-nav-bar navbarData="{{navbarData}}">
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<rich-text nodes="{{html_content}}" space="nbsp"></rich-text>
</m-nav-bar>
</view>

View File

@ -1 +1,8 @@
/* Pages/yishi/manual_detail/index.wxss */
/* Pages/yishi/manual_detail/index.wxss */
page{
background-color: #F6F6F6;
}
.container{
width: 92vw;
margin: 20rpx auto;
}

View File

@ -9,8 +9,8 @@
<view class="info">
<view class="name">{{user_name}}</view>
<view class="renzheng">
<view class="yishi">已医师认证></view>
<view class="zhiye">未多点执业认证></view>
<view class="yishi">{{iden_auth_status==1?'已医师认证':'未医师认证'}}></view>
<view class="zhiye">{{multi_point_status==1?'已多点执业认证':'未多点执业认证'}}></view>
</view>
</view>
<view class="icon">

View File

@ -7,6 +7,7 @@
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
"van-icon": "@vant/weapp/icon/index",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index"
"van-cell-group": "@vant/weapp/cell-group/index",
"van-empty": "@vant/weapp/empty/index"
}
}

View File

@ -1,5 +1,5 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="top">
<view class="top_txt">
<view style="font-size: 30rpx;">
@ -20,6 +20,7 @@
<view class="txt_title">账单</view>
<view class="content">
<van-cell bindtap="goDetail" data-url="/Pages/yishi/orderdetail/index" data-md="{{item.month}}-{{item.day}}" title-style="font-size: 30rpx;" title="{{item.month}}月{{item.day}}日" value="+{{item.total_amount}}元" is-link wx:for="{{bill}}" />
<van-empty description="暂无账单" wx:if="{{ bill }}" />
</view>
<t-image custom-style="position: fixed; right: 0;bottom: 262rpx;" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/account_rule.png" mode="heightFix" height="84rpx" aria-label="role" />

View File

@ -1,11 +1,12 @@
.container{
page{
background-color: #F4F4F4;
}
.container{
width: 100vw;
height: 100vh;
}
.top{
width: 92vw;
margin: 50rpx auto 0 auto;
margin: 20rpx auto 0 auto;
background-color: #3CC7C0;
height: 150rpx;
border-radius: 20rpx;

View File

@ -14,7 +14,7 @@ Page({
idcard_status: 0,
iden_auth_status: 0,
user_name: "",
brief_introduction: "点击编辑"
brief_introduction: "我的简介"
},
onLoad(){
//获取医生我的账户数据

View File

@ -17,7 +17,8 @@ Page({
list_2: [],
show: false,
add_message: "",
current_words_type: 1
current_words_type: 1,
focus: true
},
onTabChange(e){
this.setData({
@ -68,5 +69,9 @@ Page({
show: false,
});
},
onInput(){
this.setData({
focus: true
})
}
})

View File

@ -1,5 +1,5 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<t-tabs
defaultValue="{{ current_words_type }}"
@ -45,7 +45,11 @@
type="textarea"
placeholder="请输入文字"
autosize
maxlength="500"
custom-style="height: 100%;"
border="{{ false }}"
focus="{{focus}}"
bindtap="onInput"
/>
</view>
</view>

View File

@ -1,7 +1,8 @@
page{
background-color: #F6F6F6;
}
.container{
width: 100vw;
height: 100vh;
background-color: #F6F6F6;
}
.item_list{
width: 92vw;

View File

@ -1,5 +1,5 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="list">
<view class="item">

View File

@ -1,11 +1,13 @@
.container{
page{
background-color: #F4F4F4;
height: 100vh;
}
.container{
width: 100vw;
padding-top: 20rpx;
}
.list{
width: 92vw;
margin: 20rpx auto;
margin: 0 auto;
}
.item{
display: flex;

View File

@ -1,5 +1,5 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="container">
<view class="list">
<view class="item" bindtap="go" data-url="/Pages/yishi/notice_deatil/index">

View File

@ -1,11 +1,13 @@
.container{
page{
background-color: #F4F4F4;
height: 100vh;
}
.container{
width: 100vw;
padding-top: 20rpx;
}
.list{
width: 92vw;
margin: 20rpx auto;
margin: 0 auto;
}
.item{
display: flex;

View File

@ -1,3 +1,7 @@
import { API } from './../../../utils/network/api'
import { getTimeAgo } from './../../../utils/util'
import TIM from '../../../TUIKit/lib/tim-wx-sdk';
const api = new API()
const app = getApp()
Page({
data: {
@ -6,17 +10,46 @@ Page({
title: '问诊消息', //导航栏 中间的标题
},
height: app.globalData.height,
has_data: true
has_data: true,
data_list_1: [],
data_list_2: [],
data_list_3: [],
data_list_4: [],
data_list_5: [],
message_inquiry_type: 2,
},
onLoad() {
console.log("wenzhen onload");
},
onShow: function () {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
active: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
})
}
},
let session_data_list_1 = wx.getStorageSync('session_data_list_1');
let session_data_list_2 = wx.getStorageSync('session_data_list_2');
let session_data_list_3 = wx.getStorageSync('session_data_list_3');
let session_data_list_4 = wx.getStorageSync('session_data_list_4');
if(!session_data_list_1) wx.setStorageSync('session_data_list_1', []);
if(!session_data_list_2) wx.setStorageSync('session_data_list_2', []);
if(!session_data_list_3) wx.setStorageSync('session_data_list_3', []);
if(!session_data_list_4) wx.setStorageSync('session_data_list_4', []);
this.setData({"data_list_1": session_data_list_1});
this.setData({"data_list_2": session_data_list_2});
this.setData({"data_list_3": session_data_list_3});
this.setData({"data_list_4": session_data_list_4});
if(session_data_list_1.length == 0) this.getDoctorInquiryMessage(1);
if(session_data_list_2.length == 0) this.getDoctorInquiryMessage(2);
if(session_data_list_3.length == 0) this.getDoctorInquiryMessage(3);
if(session_data_list_4.length == 0) this.getDoctorInquiryMessage(4);
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
},
go(e){
wx.navigateTo({
url: e.currentTarget.dataset.url,
@ -34,5 +67,129 @@ Page({
res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
}
})
},
$onMessageReceived(value) {
const message = value.data[0];
console.log("message from wenzhen: ",message)
let cloudCustomData = JSON.parse(message.cloudCustomData);
let inquiry_type = cloudCustomData.inquiry_type;
let order_inquiry_id = cloudCustomData.order_inquiry_id;
let type = message.type;
let message_txt = "新消息";
console.log(type)
switch (type) {
case TIM.TYPES.MSG_TEXT:
console.log("文本消息");
message_txt = message.payload.text;
break;
case TIM.TYPES.MSG_IMAGE:
console.log("图片消息");
message_txt = "[图片]";
break;
case TIM.TYPES.MSG_AUDIO:
console.log("音频消息")
message_txt = "[语言]";
break;
case TIM.TYPES.MSG_VIDEO:
console.log("视频消息");
message_txt = "[视频]";
break;
case TIM.TYPES.MSG_FILE:
console.log("文件消息")
message_txt = "[文件]";
break;
case TIM.TYPES.MSG_CUSTOM:
console.log("自定义消息")
break;
case TIM.TYPES.MSG_MERGER:
console.log("合并消息")
break;
case TIM.TYPES.MSG_LOCATION:
console.log("位置消息")
message_txt = "[位置]";
break;
case TIM.TYPES.MSG_FACE:
console.log("表情消息")
message_txt = "[表情]";
break;
default:
break;
}
let list_name = "data_list_" + inquiry_type;
let _index = this.data[list_name].findIndex(item => {
return item.order_inquiry_id == order_inquiry_id;
})
let new_list = [];
//没有当前会话
if(_index > -1){
let target = list_name + "[" + _index + "].last_message_content.Text";
let target_dot = list_name + "[" + _index + "].message_dot";
console.log("target: ",target);
this.setData({
[target]: message_txt,
[target_dot]: true
})
new_list.push(this.data[list_name][_index]);//先放入目标
}else{
let item = {};
item.inquiry_status = message.inquiry_status;
let txt = {};
txt.Text= message_txt;
item.last_message_content = txt;
item.message_send_time = message.message_send_time;
item.message_seq = message.message_seq;
item.message_type = message.message_type;
item.order_inquiry_id = message.order_inquiry_id;
item.patient_age = message.patient_age;
item.patient_name = message.patient_name;
item.patient_sex = message.patient_sex;
item.to_user_id = message.to_user_id;
item.message_dot = true;
new_list.push(item);
}
//置顶
this.data[list_name].forEach((item, index) => {
if(index != _index){
new_list.push(item)
}
})
this.setData({
[list_name]: new_list
})
wx.setStorageSync('session_'+list_name, new_list);
},
getDoctorInquiryMessage(message_inquiry_type){
let list_name = "data_list_" + message_inquiry_type;
this.setData({
[list_name]: []
})
//获取医生问诊消息列表
api.getDoctorInquiryMessage({message_inquiry_type: message_inquiry_type}).then(response => {
console.log(response);
if(response.data){
console.log(list_name);
let data_list = this.data[list_name];
response.data.forEach((item) => {
item.message_send_time = getTimeAgo(item.message_send_time);
data_list.push(item);
})
this.setData({
[list_name]: data_list,
})
wx.setStorageSync('session_'+list_name, data_list);
}
}).catch(errors => {console.error(errors);})
},
onTabsChange(e){
console.log(e);
this.setData({
message_inquiry_type: e.detail.value,
})
this.getDoctorInquiryMessage(e.detail.value)
}
})

View File

@ -6,6 +6,8 @@
"t-image": "tdesign-miniprogram/image/image",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
"van-button": "@vant/weapp/button/index"
"t-badge": "tdesign-miniprogram/badge/badge",
"van-button": "@vant/weapp/button/index",
"van-empty": "@vant/weapp/empty/index"
}
}

View File

@ -3,11 +3,16 @@
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="top">
<view class="top_left" bindtap="go" data-url="/Pages/yishi/service_notice/index">
<t-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice.png" mode="heightFix" height="108rpx" aria-label="notice" />
<t-badge dot offset="{{ [1, 1] }}" class="wrapper">
<t-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice.png" mode="heightFix" height="108rpx" aria-label="notice" />
</t-badge>
服务通知
</view>
<view class="top_right" bindtap="go" data-url="/Pages/yishi/system_notice/index">
<t-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/system_notice.png" mode="heightFix" height="108rpx" aria-label="notice" />
<t-badge count="8" offset="{{ [1, 1] }}" class="wrapper">
<t-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/system_notice.png" mode="heightFix" height="108rpx" aria-label="notice" />
</t-badge>
系统公告
</view>
</view>
@ -20,21 +25,20 @@
<view class="tabs" wx:if="{{ has_data }}" >
<t-tabs
defaultValue="{{0}}"
defaultValue="{{ message_inquiry_type }}"
sticky
bind:change="onTabsChange"
bind:click="onTabsClick"
bind:scroll="onStickyScroll"
t-class="custom-tabs"
theme="line"
custom-style="font-size: 32rpx"
>
<t-tab-panel label="快速问诊" value="0">
<t-tab-panel label="快速问诊" value="1">
<wenzhen-data
name="李四"
sex="女"
age="19"
age="199"
desc="VVVVVVVV"
status="0"
status_text="待接诊"
@ -44,26 +48,48 @@
<wenzhen-data
name="李放四"
sex="女"
age="199"
age="19"
desc="VVVVVVVV"
status="1"
status_text="接诊中"
/>
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_1 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_1.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="问诊购药" value="1">
<t-tab-panel label="问诊购药" value="2">
<!-- 1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消 -->
<wenzhen-data
name="张三"
sex="男"
age="19"
desc="VVVVVVVV"
status="0"
status_text="待接诊"
note="xxx"
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_2 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_2.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="在线问诊" value="2">
<wenzhen-data
<t-tab-panel label="在线问诊" value="3">
<!-- <wenzhen-data
name="王五"
sex="女"
age="19"
@ -71,9 +97,25 @@
status="0"
status_text="待接诊"
note="xxx"
/> -->
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_3 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_3.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="公益问诊" value="3">
<t-tab-panel label="公益问诊" value="4">
<wenzhen-data
name="赵柳"
sex="女"
@ -83,8 +125,23 @@
status_text="待接诊"
note="xxx"
/>
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_4 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_4.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="问诊结束" value="4">
<t-tab-panel label="问诊结束" value="5">
<wenzhen-data
name="谢广坤"
sex="女"
@ -94,6 +151,21 @@
status_class="status_end"
status_text="快速问诊"
/>
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_5 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_5.length == 0}}" />
</t-tab-panel>
</t-tabs>
</view>

View File

@ -1,10 +1,12 @@
.container{
page{
background-color: #F4F4F4;
}
.container{
width: 100vw;
height: 100vh;
padding-top: 20rpx;
}
.top{
margin: 30rpx auto;
margin: 0 auto 30rpx auto;
display: flex;
padding: 20rpx 20rpx;
background-color: rgb(255, 255, 255);

View File

@ -0,0 +1,270 @@
import { API } from './../../../utils/network/api'
import { getTimeAgo } from './../../../utils/util'
// import TIM from '../../../TUIKit/lib/tim-wx-sdk';
const api = new API()
const app = getApp()
Page({
data: {
navbarData: {
showCapsule: 0, //是否显示左上角图标 1表示显示 0表示不显示
title: '问诊消息', //导航栏 中间的标题
},
height: app.globalData.height,
has_data: true,
data_list_1: [],
data_list_2: [],
data_list_3: [],
data_list_4: [],
data_list_5: [],
conversationList: [],
message_inquiry_type: 2,
},
onLoad() {
console.log("wenzhen onload");
},
onShow: function () {
console.log("onShow from wenzhen V2")
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
active: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
})
}
this.getConversationList();
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
},
getConversationList(){
wx.$TUIKit.getConversationList().then((imResponse) => {
console.log("imResponse.data.conversationList from wenzhen_v2: ", imResponse.data.conversationList);
this.setData({
conversationList: imResponse.data.conversationList,
});
}).then(() => {
console.log("开始查询订单状态")
this.formatStatus();
});
},
go(e){
wx.navigateTo({
url: e.currentTarget.dataset.url,
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptDataFromOpenedPage: function(data) {
console.log(data)
},
someEvent: function(data) {
console.log(data)
}
},
success: function(res) {
// 通过 eventChannel 向被打开页面传送数据
res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
}
})
},
$onMessageReceived(value) {
const message = value.data[0];
console.log("message from wenzhen: ",message)
this.getConversationList();
// let cloudCustomData = JSON.parse(message.cloudCustomData);
// let inquiry_type = cloudCustomData.inquiry_type;
// let order_inquiry_id = cloudCustomData.order_inquiry_id;
// let type = message.type;
// let message_txt = "新消息";
// console.log(type)
// switch (type) {
// case TIM.TYPES.MSG_TEXT:
// console.log("文本消息");
// message_txt = message.payload.text;
// break;
// case TIM.TYPES.MSG_IMAGE:
// console.log("图片消息");
// message_txt = "[图片]";
// break;
// case TIM.TYPES.MSG_AUDIO:
// console.log("音频消息")
// message_txt = "[语言]";
// break;
// case TIM.TYPES.MSG_VIDEO:
// console.log("视频消息");
// message_txt = "[视频]";
// break;
// case TIM.TYPES.MSG_FILE:
// console.log("文件消息")
// message_txt = "[文件]";
// break;
// case TIM.TYPES.MSG_CUSTOM:
// console.log("自定义消息")
// break;
// case TIM.TYPES.MSG_MERGER:
// console.log("合并消息")
// break;
// case TIM.TYPES.MSG_LOCATION:
// console.log("位置消息")
// message_txt = "[位置]";
// break;
// case TIM.TYPES.MSG_FACE:
// console.log("表情消息")
// message_txt = "[表情]";
// break;
// default:
// break;
// }
// let list_name = "data_list_" + inquiry_type;
// let _index = this.data[list_name].findIndex(item => {
// return item.order_inquiry_id == order_inquiry_id;
// })
// let new_list = [];
// //没有当前会话
// if(_index > -1){
// let target = list_name + "[" + _index + "].last_message_content.Text";
// let target_dot = list_name + "[" + _index + "].message_dot";
// console.log("target: ",target);
// this.setData({
// [target]: message_txt,
// [target_dot]: true
// })
// new_list.push(this.data[list_name][_index]);//先放入目标
// }else{
// let item = {};
// item.inquiry_status = message.inquiry_status;
// let txt = {};
// txt.Text= message_txt;
// item.last_message_content = txt;
// item.message_send_time = message.message_send_time;
// item.message_seq = message.message_seq;
// item.message_type = message.message_type;
// item.order_inquiry_id = message.order_inquiry_id;
// item.patient_age = message.patient_age;
// item.patient_name = message.patient_name;
// item.patient_sex = message.patient_sex;
// item.to_user_id = message.to_user_id;
// item.message_dot = true;
// new_list.push(item);
// }
// //置顶
// this.data[list_name].forEach((item, index) => {
// if(index != _index){
// new_list.push(item)
// }
// })
// this.setData({
// [list_name]: new_list
// })
},
formatStatus(){
let order_inquiry_id_list = [];
this.data.conversationList.forEach(item => {
let conversationID = item.conversationID;
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
let lastMessage = item.lastMessage;
if(!lastMessage) return;
let cloudCustomData = lastMessage.cloudCustomData;
if(!cloudCustomData) return;
let cloudCustomDataJson = JSON.parse(cloudCustomData);
let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
order_inquiry_id_list.push(order_inquiry_id);//准备去请求后端那订单状态
})
let conversationList = this.data.conversationList;
//获取医生问诊消息用户属性
api.getDoctorInquiryMessageAttr({order_inquiry_ids: order_inquiry_id_list.join(",")}).then(response => {
if(response.data.length > 0){
let new_conversationList = [];
conversationList.forEach(item => {
let conversationID = item.conversationID;
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
let lastMessage = item.lastMessage;
if(!lastMessage) return;
let cloudCustomData = lastMessage.cloudCustomData;
if(!cloudCustomData) return;
let cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData);
let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
let order = response.data.find(attr_item => {
return attr_item.order_inquiry_id == order_inquiry_id;
})
if(!order) return;
item.inquiry_status = order.inquiry_status;
item.patient_age = order.patient_age;
item.patient_name = order.patient_name;
item.patient_sex = order.patient_sex;
new_conversationList.push(item);
})
this.setData({
conversationList: new_conversationList
})
}
}).then(() => {
console.log("开始格式化formatConversationList")
this.formatConversationList();
}).catch(errors => {console.error(errors);})
},
formatConversationList(){
let session_list = [];
let session_data_list_1 = [];
let session_data_list_2 = [];
let session_data_list_3 = [];
let session_data_list_4 = [];
session_list.push(session_data_list_1);
session_list.push(session_data_list_2);
session_list.push(session_data_list_3);
session_list.push(session_data_list_4);
this.data.conversationList.forEach(item => {
let conversationID = item.conversationID;
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
let type = item.type;
let lastMessage = item.lastMessage;
let userProfile = item.userProfile;
if(!lastMessage) return;
let cloudCustomData = lastMessage.cloudCustomData;
if(!cloudCustomData) return;
let cloudCustomDataJson = JSON.parse(cloudCustomData);
let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
if(!order_inquiry_id) return;
let inquiry_type = cloudCustomDataJson.inquiry_type;
let session_item = {};
session_item.inquiry_status = item.inquiry_status;//订单状态暂无
let txt = {};
txt.Text= lastMessage.messageForShow;
session_item.last_message_content = txt;
session_item.message_send_time = getTimeAgo(lastMessage.lastTime);
session_item.message_type = type;
session_item.order_inquiry_id = order_inquiry_id;
session_item.patient_age = item.patient_age;//暂无
session_item.patient_name = userProfile.nick;
session_item.from_account = userProfile.userID;
session_item.patient_sex = item.patient_sex;//暂无
let unreadCount = item.unreadCount;
if(unreadCount > 0){
session_item.message_dot = true;
}else{
session_item.message_dot = false;
}
session_list[inquiry_type - 1].push(session_item);
})
this.setData({
data_list_1: session_data_list_1,
data_list_2: session_data_list_2,
data_list_3: session_data_list_3,
data_list_4: session_data_list_4,
})
},
onTabsChange(e){
console.log(e);
}
})

View File

@ -0,0 +1,13 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar",
"wenzhen-data": "/commpents/wenzhen_data/index",
"t-image": "tdesign-miniprogram/image/image",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
"t-badge": "tdesign-miniprogram/badge/badge",
"van-button": "@vant/weapp/button/index",
"van-empty": "@vant/weapp/empty/index"
}
}

View File

@ -0,0 +1,176 @@
<!-- 问诊页面 -->
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="top">
<view class="top_left" bindtap="go" data-url="/Pages/yishi/service_notice/index">
<t-badge dot offset="{{ [1, 1] }}" class="wrapper">
<t-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice.png" mode="heightFix" height="108rpx" aria-label="notice" />
</t-badge>
服务通知
</view>
<view class="top_right" bindtap="go" data-url="/Pages/yishi/system_notice/index">
<t-badge count="8" offset="{{ [1, 1] }}" class="wrapper">
<t-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/system_notice.png" mode="heightFix" height="108rpx" aria-label="notice" />
</t-badge>
系统公告
</view>
</view>
<view class="empty" wx:if="{{ !has_data }}" >
<t-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/wnzhen_empty.png" mode="heightFix" height="108rpx" aria-label="empty" />
<view class="empty_note">您还未设置在线问诊价格</view>
</view>
<van-button color="#3CC7C0" custom-style="width: 92vw;margin: 0 auto;border-radius: 10rpx;" block wx:if="{{ !has_data }}">开通图文问诊</van-button>
<view class="tabs" wx:if="{{ has_data }}" >
<t-tabs
defaultValue="{{ message_inquiry_type }}"
sticky
bind:change="onTabsChange"
bind:scroll="onStickyScroll"
t-class="custom-tabs"
theme="line"
custom-style="font-size: 32rpx"
>
<t-tab-panel label="快速问诊" value="1">
<wenzhen-data
name="李四"
sex="女"
age="19"
desc="VVVVVVVV"
status="0"
status_text="待接诊"
note="xxx"
/>
<wenzhen-data
name="李放四"
sex="女"
age="199"
desc="VVVVVVVV"
status="1"
status_text="接诊中"
/>
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_1 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_1.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="问诊购药" value="2">
<!-- 1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消 -->
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
order_inquiry_id="{{ item.order_inquiry_id }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
from_account="{{item.from_account}}"
wx:for="{{ data_list_2 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_2.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="在线问诊" value="3">
<!-- <wenzhen-data
name="王五"
sex="女"
age="19"
desc="VVVVVVVV"
status="0"
status_text="待接诊"
note="xxx"
/> -->
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_3 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_3.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="公益问诊" value="4">
<wenzhen-data
name="赵柳"
sex="女"
age="19"
desc="VVVVVVVV"
status="0"
status_text="待接诊"
note="xxx"
/>
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_4 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_4.length == 0}}" />
</t-tab-panel>
<t-tab-panel label="问诊结束" value="5">
<wenzhen-data
name="谢广坤"
sex="女"
age="199"
desc="VVVVVVVV"
status="2"
status_class="status_end"
status_text="快速问诊"
/>
<wenzhen-data
name="{{ item.patient_name }}"
sex="{{ item.patient_sex==1?'男':'女' }}"
age="{{ item.patient_age }}"
date="{{ item.message_send_time }}"
desc="{{ item.last_message_content.Text }}"
status="{{ item.inquiry_status }}"
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'已接诊':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
message_dot="{{item.message_dot}}"
wx:for="{{ data_list_5 }}"
/>
<van-empty description="暂无数据" wx:if="{{data_list_5.length == 0}}" />
</t-tab-panel>
</t-tabs>
</view>
<view style="height: 200rpx;"></view>
</view>

View File

@ -0,0 +1,51 @@
page{
background-color: #F4F4F4;
}
.container{
width: 100vw;
padding-top: 20rpx;
}
.top{
margin: 0 auto 30rpx auto;
display: flex;
padding: 20rpx 20rpx;
background-color: rgb(255, 255, 255);
}
.top_left, .top_right{
flex: 1;
text-align: center;
display: flex;
flex-direction: column;
color: #666666;
font-size: 20rpx;
}
.top_left{
border-right: 1px solid #F4F4F4;
}
.t-tab-panel,.t-tabs__content {
background-color: #F4F4F4 !important;
}
.t-tabs__item--active{
color: #49B9AD !important;
font-size: 32rpx !important;
}
.t-tabs__item-inner--line{
font-size: 28rpx !important;
}
.t-tabs__track{
background-color: var(--td-tab-track-color, var(--td-primary-color, #49B9AD)) !important;
}
.empty{
width: 92vw;
margin: 0 auto;
height: 500rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.empty_note{
font-size: 24rpx;
color: #999999;
margin-top: 30rpx;
}

View File

@ -32,6 +32,7 @@
<van-cell-group border="{{ false }}">
<van-cell
url="/Pages/yishi/manual/index"
title="多点执业认证流程"
border="{{ false }}"
value='查看操作手册'

View File

@ -1,4 +1,4 @@
<view class="text-message {{isMine?'my-text':''}}" >
<view class="text-message {{isMine?'my-text':'your-text'}}" >
<view class="message-body-span" wx:for="{{renderDom}}" wx:key="index">
<span class="message-body-span-text" wx:if="{{item.name === 'span'}}">{{item.text}}</span>
<image wx:if="{{item.name === 'img'}}" class="emoji-icon" src="{{item.src}}" />

View File

@ -29,6 +29,24 @@
border: 1rpx solid #1ACAD3;
border-style: none none solid solid
}
.your-text {
position: relative;
border-radius: 10px 10px 10px 10px;
background: rgb(255, 255, 255);
border: 1rpx solid #D8D8D8;
}
.your-text::after{
content:'';
position: absolute;
top: 45rpx;
left: 0;
transform: translate(-50%,-50%) rotate(45deg);
width: 16rpx;
height: 16rpx;
background: rgb(255, 255, 255);
border: 1rpx solid #D8D8D8;
border-style: none none solid solid
}
.message-body-span {
display: flex;
justify-content: center;

View File

@ -16,6 +16,10 @@ Component({
});
},
},
order_inquiry_id: {
type: String,
value: {},
},
hasCallKit: {
type: Boolean,
value: false,
@ -331,7 +335,7 @@ Component({
});
break;
case '10'://查看完整病历
app.go("/Pages/yishi/case/index")
app.go("/Pages/yishi/case/index?order_inquiry_id="+this.data.order_inquiry_id)
break;
case '11'://在线开方
app.go("/Pages/yishi/onlinechufang/index")
@ -483,16 +487,16 @@ Component({
const text = flag ? msg : this.data.message;
const { FEAT_NATIVE_CODE } = constant;
const message = wx.$TUIKit.createTextMessage({
to,
to,
conversationType: this.data.conversation.type,
payload: {
text,
},
cloudCustomData: JSON.stringify({ messageFeature:
{
needTyping: FEAT_NATIVE_CODE.FEAT_TYPING,
version: FEAT_NATIVE_CODE.NATIVE_VERSION,
},
cloudCustomData: JSON.stringify({
order_inquiry_id: "AA",
inquiry_type: "BB",
message_type: 0,
is_system: 0
}),
});
this.setData({
@ -519,6 +523,7 @@ Component({
// 发送正在输入状态消息
sendTypingStatusMessage() {
const { BUSINESS_ID_TEXT, FEAT_NATIVE_CODE } = constant;
// 创建正在输入状态消息, "typingStatus":1,正在输入中1, 输入结束0, "version": 1 兼容老版本,userAction:0, // 14表示正在输入,actionParam:"EIMAMSG_InputStatus_Ing" //"EIMAMSG_InputStatus_Ing" 表示正在输入, "EIMAMSG_InputStatus_End" 表示输入结束
const typingMessage = wx.$TUIKit.createCustomMessage({
@ -668,9 +673,9 @@ Component({
},
// 发送正在输入消息
$sendTypingMessage(message) {
wx.$TUIKit.sendMessage(message, {
onlineUserOnly: true,
});
// wx.$TUIKit.sendMessage(message, {
// onlineUserOnly: true,
// });
},
$sendTIMMessage(message) {

View File

@ -25,12 +25,12 @@
<view class="TUI-sendMessage-btn" wx:if="{{ has_emoji }}">
<image class="TUI-icon" bindtap="handleEmoji" src="../../../../static/assets/face-emoji.svg" />
</view>
<view wx:if="{{!sendMessageBtn}}" bindtap="handleExtensions" class="TUI-sendMessage-btn">
<image class="TUI-icon" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/chat/tianjia.png" />
</view>
<view wx:else class="TUI-sendMessage-btn" bindtap="sendTextMessage">
发送
</view>
<view wx:if="{{!sendMessageBtn}}" bindtap="handleExtensions" class="TUI-sendMessage-btn">
<image class="TUI-icon" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/chat/tianjia.png" />
</view>
<view wx:else class="TUI-sendMessage-btn TUI-sendMessage-btn-input" bindtap="sendTextMessage">
发送
</view>
</view>
</view>
<view wx:if="{{displayFlag === 'emoji'}}" class="TUI-Emoji-area">

View File

@ -6,9 +6,9 @@
display: flex;
padding-bottom: 16rpx;
background-color: #fff;
width: calc(100vw - 38rpx);
width: 95vw;
overflow: scroll;
padding-left: 38rpx;
margin: 0 auto;
}
.TUI-commom-function {
background-color: blueviolet;
@ -37,25 +37,27 @@
margin-left: 48rpx;
}
.TUI-message-input-functions {
display: flex;
flex: 2;
display: flex;
justify-content: center;
}
.TUI-message-input-main {
height: 30px;
min-height: 78rpx;
background-color: #F1F1F1;
flex: 1;
flex: 9;
margin: 0 10rpx;
padding: 0 5rpx;
border-radius: 5rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
}
.TUI-message-input-main-focus {
height: auto;
min-height: 78rpx;
background-color: #F1F1F1;
flex: 1;
flex: 9;
margin: 0 10rpx;
padding: 0 5rpx;
border-radius: 5rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
}
@ -66,6 +68,7 @@
/* 最多显示10行 */
line-height: 30rpx;
overflow: scroll;
padding: 20rpx 20rpx;
}
.TUI-icon {
width: 56rpx;
@ -96,9 +99,16 @@
}
.TUI-sendMessage-btn {
display: flex;
align-items: center;
margin: 0 10rpx;
display: flex;
align-items: center;
width: 90%;
text-align: center;
justify-content: center;
border-radius: 10rpx;
color: #fff;
}
.TUI-sendMessage-btn-input{
background-color: #3CC7C0;
}
.TUI-Emoji-area {

View File

@ -208,6 +208,8 @@ Component({
wx.$TUIKit.setMessageRead({ conversationID: this.data.conversation.conversationID }).then(() => {
logger.log('| MessageList | setMessageRead | ok');
});
console.log('| MessageList | setMessageRead | ok');
console.log('message cloudCustomData', message.cloudCustomData);
const { BUSINESS_ID_TEXT, MESSAGE_TYPE_TEXT } = constant;
this.messageTimeForShow(message);
this.setData({

View File

@ -31,6 +31,10 @@ Component({
});
},
},
order_inquiry_id: {
type: String,
value: ''
},
unreadCount: {
type: Number,
value: '',

View File

@ -2,7 +2,7 @@
<view class="container">
<view class="tui-navigatorbar">
<image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_white.svg" />
<view class="conversation-title">{{conversationName}}-患者姓名</view>
<view class="conversation-title">{{conversationName}}</view>
</view>
<view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}} ">
<view wx:if="{{showTips}}" class="safetytips-box">
@ -20,7 +20,7 @@
</view>
<view class="input-area">
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
<MessageInput id="MessageInput" conversation="{{conversation}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
<MessageInput id="MessageInput" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
bind:handleCall="handleCall" ></MessageInput>
</view>
</view>

View File

@ -116,6 +116,7 @@ Component({
},
getConversationList() {
wx.$TUIKit.getConversationList().then((imResponse) => {
console.log("imResponse.data.conversationList: ", imResponse.data.conversationList);
this.setData({
conversationList: imResponse.data.conversationList,
});

112
app.js
View File

@ -1,4 +1,7 @@
import Aegis from './TUIKit/lib/aegis';
import TIM from './TUIKit/lib/tim-wx-sdk';
import { genTestUserSig } from './TUIKit/debug/GenerateTestUserSig';
import TIMUploadPlugin from './TUIKit/lib/tim-upload-plugin';
App({
onLaunch: function (options) {
// 判断是否由分享进入小程序
@ -17,29 +20,88 @@ App({
}
})
// console.log("download fonts from oss ");
// let loadStatus = false;
// if (!loadStatus) {
// wx.loadFontFace({
// global: true,
// family: 'AlibabaPuHuiTi',
// source: 'url("https://oss.igandan.com/app/fonts/AlibabaPuHuiTi/STXINGKA.TTF")',
// // source: 'url("https://oss.igandan.com/app/fonts/AlibabaPuHuiTi/AlibabaPuHuiTi-2-65-Medium.ttf")',
// success() {
// loadStatus = true;
// console.log("download fonts from oss success");
// },
// fail(){
// console.log("download fonts from oss error");
// },
// complete(){
// console.log("download fonts from oss complete");
// }
// });
// }
this.aegisInit()
console.log("download fonts from oss ");
let loadStatus = false;
if (!loadStatus) {
wx.loadFontFace({
global: true,
family: 'AlibabaPuHuiTi',
// source: 'url("https://oss.igandan.com/app/fonts/AlibabaPuHuiTi/STXINGKA.TTF")',
source: 'url("https://docwebsite.oss-cn-beijing.aliyuncs.com/app/fonts/AlibabaPuHuiTi/AlibabaPuHuiTi-2-65-Medium/AlibabaPuHuiTi-2-65-Medium.ttf")',
success() {
loadStatus = true;
console.log("download fonts from oss success");
},
fail(){
console.log("download fonts from oss error");
},
complete(){
console.log("download fonts from oss complete");
}
});
}
this.aegisInit()
console.warn("app.js wx.aegis: ", wx.aegis);
//初始化tab-bar角标
let index_info = wx.getStorageSync('index_info');
let wenzhen_info = wx.getStorageSync('wenzhen_info');
let my_info = wx.getStorageSync('my_info');
if(!index_info) wx.setStorageSync('index_info',"");
if(!wenzhen_info) wx.setStorageSync('wenzhen_info', "");
if(!my_info) wx.setStorageSync('my_info', "");
},
onShow(){
this.imInit(this.onSDKReady, this);
},
imInit(onSDKReady, obj){
let sign = genTestUserSig(this.globalData.config);
console.log("sign: ", sign);
const userSig = sign.userSig;
console.log("userSig: ", userSig);
wx.$TUIKit = TIM.create({
SDKAppID: this.globalData.config.SDKAPPID
});
wx.$chat_SDKAppID = this.globalData.config.SDKAPPID;
wx.$chat_userID = this.globalData.config.userID;
wx.$chat_userSig = userSig;
wx.$TUIKitTIM = TIM;
wx.$TUIKit.registerPlugin({ 'tim-upload-plugin': TIMUploadPlugin });
wx.$TUIKit.login({
userID: this.globalData.config.userID,
userSig
});
wx.$TUIKit.setLogLevel(3);//设置日志级别
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, onSDKReady, obj);
},
onSDKReady(){
console.log("onSDKReady from app.js");
this.globalData.chat_sdk_ready = true;
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onSystemPushReceived, this);
},
$onSystemPushReceived(e){
console.log("onSystemPushReceived from app.js");
console.log(e)
let message = e.data[0];
console.log(message)
let type = message.type;
console.log(type);
this.formatTabBarNum("wenzhen_info");
},
formatTabBarNum(name){
let val = wx.getStorageSync(name);
if(val == "") val = 0;
if(val == "+99") val = 100;
val = val + 1;
if(val > 99) val = '+99';
wx.setStorageSync(name, val);
},
aegisInit() {
wx.aegis = new Aegis({
@ -53,7 +115,13 @@ App({
share: false, // 分享默认为false
height: 0,
login_url: "/Pages/login/index",
chat_sdk_ready: false
chat_sdk_ready: false,
config: {
userID: "123456", //User ID
SDKAPPID: 1400796919, // Your SDKAppID
SECRETKEY: "a5bcd8c583181cf004e9d91a47687d719d4b5d2a10ce33fbee95d587889447d8", // Your secretKey
EXPIRETIME: 604800,
},
},
go(url, ...params){
wx.navigateTo({

View File

@ -48,7 +48,8 @@
"Pages/login/index",
"Pages/mobile_login/index",
"Pages/yishi/manual_detail/index",
"Pages/yishi/addzhenduan/index"
"Pages/yishi/addzhenduan/index",
"Pages/yishi/wenzhen_v2/wenzhen"
],
"window": {
"navigationBarBackgroundColor": "#ffffff",
@ -81,8 +82,8 @@
"selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png"
},
{
"pagePath": "Pages/yishi/wenzhen/wenzhen",
"text": "问诊(Y)",
"pagePath": "Pages/yishi/wenzhen_v2/wenzhen",
"text": "问诊(Z)",
"iconPath": "/static/images/yishi/tabbar_icon/wenzhen.png",
"selectedIconPath": "/static/images/yishi/tabbar_icon/wenzhen_select.png"
},

View File

@ -1,6 +1,7 @@
// commpents/myprofile/index.js
import Toast from '@vant/weapp/toast/toast';
import { API } from './../../utils/network/api'
import { FileUtil } from './../../utils/fileutil'
const api = new API()
const app = getApp()
@ -88,6 +89,13 @@ Component({
iden_auth_status: 0,
iden_auth_disabled: 0,
iden_auth_status_txt: "未认证",
avatar_reason: "",
department_custom_mobile_reason: "",
brief_introduction_reason: "",
be_good_at_reason: "",
license_cert_reason: "",
qualification_cert_reason: "",
work_cert_reason: "",
},
options: {
@ -97,6 +105,11 @@ Component({
lifetimes: {
attached(){
let _this = this;
console.log(_this.data.zhicheng_columns);
_this.setData({
"zhicheng_columns[0].text": "AAA"
})
console.log(_this.data.zhicheng_columns);
//获得医师身份认证
api.getDoctorAuthIden().then(response => {
console.log("getDoctorAuthIden: ",response);
@ -115,6 +128,13 @@ Component({
select_yiyuan_id: response.data.hospital.hospital_id,
hospital: response.data.hospital,
iden_auth_status: response.data.iden_auth_status,
avatar_reason: response.data.avatar_reason,
department_custom_mobile_reason: response.data.department_custom_mobile_reason,
brief_introduction_reason: response.data.brief_introduction_reason,
be_good_at_reason: response.data.be_good_at_reason,
license_cert_reason: response.data.license_cert_reason,
qualification_cert_reason: response.data.qualification_cert_reason,
work_cert_reason: response.data.work_cert_reason,
});
let iden_auth_status = response.data.iden_auth_status;
console.log("iden_auth_status: ",iden_auth_status)
@ -200,18 +220,24 @@ Component({
let zhicheng_huixian = false;
let area_huixian = false;
//执行回显
let huixian_try_count = 0;
let data_replay = setInterval(() => {
console.log("执行回显。。。")
try {
console.log("执行回显。。。", huixian_try_count);
//回显科室
if(_this.data.doctorauthiden_data_ready && _this.data.basicdepartment_data_ready){
let index = _this.data.keshi_columns.findIndex(item => {
console.log("value: ",item.value);
console.log("select_keshi_id: ", _this.data.select_keshi_id);
return item.value == _this.data.select_keshi_id
})
_this.setData({
select_keshi_index: index,
keshi_note: _this.data.keshi_columns[index].text
})
if(index){
_this.setData({
select_keshi_index: index,
keshi_note: _this.data.keshi_columns[index].text
})
}
keshi_huixian = true;
}
//回显职称
@ -283,16 +309,19 @@ Component({
area_huixian = true;
}
} catch (error) {
console.error(error)
}
huixian_try_count = huixian_try_count + 1;
//都回显成功后,清除计时器
console.log("keshi_huixian: ", keshi_huixian)
console.log("zhicheng_huixian: ", zhicheng_huixian)
console.log("area_huixian: ", area_huixian)
if(keshi_huixian && zhicheng_huixian && area_huixian){
if((keshi_huixian && zhicheng_huixian && area_huixian) || huixian_try_count > 100){
clearInterval(data_replay);
}
console.log("计时器")
}, 1000);
console.log("计时器");
}, 100);
},
},
@ -558,12 +587,21 @@ Component({
},
select_zhuanchang(e){
console.log(e);
let expertise_name = e.currentTarget.dataset.expertise_name;
let expertise_id = e.currentTarget.dataset.expertise_id;
let is_selected = e.currentTarget.dataset.is_selected;
let index = e.currentTarget.dataset.index;
let data = "zhuanchang_columns["+index+"].is_selected";
this.setData({[data]: is_selected==1?0:1})
let count = 0
this.data.zhuanchang_columns.forEach(item => {
count = count + 1;
})
if(count < 10){
let is_selected = e.currentTarget.dataset.is_selected;
let index = e.currentTarget.dataset.index;
let data = "zhuanchang_columns["+index+"].is_selected";
this.setData({[data]: is_selected==1?0:1})
}else{
wx.showToast({
title: '最多10个专长',
icon: "error"
})
}
},
zhuanchangConfirm(e){
this.setData({ zhuanchang_show: false });
@ -617,6 +655,80 @@ Component({
})
}).catch(errors => {console.error(errors);})
}
},
doUploadFile(event) {
console.log("index douploadFIle: ", event);
const scene = event.currentTarget.dataset.scene;
const field_name = event.currentTarget.dataset.field_name;
const file_multiple = event.currentTarget.dataset.file_multiple;//是否为多张图
console.log("scene: ", scene);
console.log("field_name: ", field_name);
console.log("file_multiple: ", file_multiple);
let _this = this;
api.getOssSign({user_type:2,scene:scene}).then(response => {
console.log(response);
const { file } = event.detail;
console.log("file: ", file);
const filename = FileUtil.getFileName(file);
const host = response.data.host;
const signature = response.data.signature;
const ossAccessKeyId = response.data.accessid;
const policy = response.data.policy;
const key = response.data.dir+filename;
const filePath = file.url; // 待上传文件的文件路径。
wx.uploadFile({
url: host, // 开发者服务器的URL。
filePath: filePath,
name: 'file', // 必须填file。
formData: {
key,
policy,
OSSAccessKeyId: ossAccessKeyId,
signature,
},
success: (res) => {
console.log("upload: ", res);
if (res.statusCode === 204) {
if(scene == 1){
this.setData({
is_avatar: true
})
}
wx.showToast({title: '上传成功'})
if(file_multiple == "true"){//多张图
let img = {}
img.url = host+"/"+key;
img.isImg = true;
let img_list = _this.data[field_name];
console.log("img_list: ", img_list);
img_list.push(img);
console.log("img_list: ", img_list);
this.setData({
[field_name]: img_list
});
}else{
this.setData({[field_name]: host+"/"+key});
}
}
},
fail: err => {
console.log(err);
}
});
}).catch(errors => {
console.error(errors);
})
},
doDeleteFile(event){
console.log(event);
let url = event.detail.file.url;
let file_name = event.currentTarget.dataset.field_name;
let img_list = this.data[file_name].filter(item => item.url != url);
this.setData({
[file_name]: img_list
})
},
}
})

View File

@ -1,4 +1,4 @@
<view class="photo">
<view class="photo" style="border-bottom: {{avatar_reason==''?'1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));':'unset'}}">
<view class="title">头像 <text class="required"> *</text></view>
<van-uploader bind:after-read="doUploadFile" data-scene="1" data-field_name="avatar" data-file_multiple="false">
<view class="right">
@ -11,6 +11,13 @@
</van-uploader>
</view>
<view class="has_error" wx:if="{{ avatar_reason != '' }}" >
<view class="error_box">
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
<text class="error_msg">{{ avatar_reason }}</text>
</view>
</view>
<!-- <t-cell title="头像" hover required arrow note="真人正脸" /> -->
<t-cell title="城市" hover required arrow note="{{ city_note }}" bindtap="onCityShow"/>
@ -127,7 +134,7 @@
</view>
<view class="zhuanchang_box">
<view class="zhuanchang_box_item {{ data.is_selected==1?'zhuanchang_box_item_checked':'' }}" wx:key="expertise_name" bindtap="select_zhuanchang"
<view class="zhuanchang_box_item {{ data.is_selected==1?'zhuanchang_box_item_checked':'' }}" wx:key="expertise_name" bindtap="select_zhuanchang"
data-expertise_name="{{data.expertise_name}}"
data-expertise_id="{{data.expertise_id}}"
data-is_selected="{{data.is_selected}}"
@ -160,9 +167,17 @@
input-align="right"
required
clearable
border="{{ department_custom_mobile_reason == '' }}"
custom-style="font-size:30rpx;"
/>
<view class="has_error" wx:if="{{ department_custom_mobile_reason != '' }}" >
<view class="error_box">
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
<text class="error_msg">{{ department_custom_mobile_reason }}</text>
</view>
</view>
<view class="zhuanchang" bindtap="onZhuanChangShow">
<view class="title">专长 <text class="required"> *</text></view>
<view class="content">
@ -185,6 +200,7 @@
bind:showNote="onshowJianJieNote"
textarea_cell_content_placeholder="您的从业经历职称所获荣誉等信息10~1000字"
textarea_val="{{textarea_jianjie}}"
has_error_content="{{ be_good_at_reason }}"
data-textarea_name="textarea_jianjie" bindTextAreaBlur="getTextAreaVal" />
<m-textarea-cell
@ -192,6 +208,7 @@
t_icon_name="view-module"
bind:showNote="onshowShanChangNote"
textarea_val="{{textarea_shanchang}}"
has_error_content="{{ brief_introduction_reason }}"
textarea_cell_content_placeholder="您的专业领域、擅长疾病、研究方法等信息10~1000字"
textarea_cell_note="查看示例" data-textarea_name="textarea_shanchang" bindTextAreaBlur="getTextAreaVal" />
@ -208,6 +225,7 @@
bindDeleteFile="doDeleteFile"
upload_cell_desc="请提供清晰的职业证书原件照片需包含证书编码、加盖钢印的证书照片、姓名、执业范围、最新执业医院最少上传2张。"
upload_cell_note="查看示例"
has_error_content="{{ license_cert_reason }}"
wx:if="{{indentity}}"
/>
@ -224,6 +242,7 @@
bind:showNote="onshowZiGeNote"
upload_cell_desc="请提供清晰的资格证书原件照片需包含证书编码、加盖钢印的证书照片、姓名、职称等最少上传1张。"
upload_cell_note="查看示例"
has_error_content="{{ qualification_cert_reason }}"
wx:if="{{indentity}}"
/>
@ -240,6 +259,7 @@
bindDeleteFile="doDeleteFile"
upload_cell_desc="请提供清晰的职称证书原件照片需包含证书编码、加盖钢印的证书照片、姓名等最少上传1张。"
upload_cell_note="查看示例"
has_error_content="{{ work_cert_reason }}"
wx:if="{{indentity}}"
/>

View File

@ -3,25 +3,15 @@
}
.photo{
position: relative;
padding: 32rpx;
padding: 32rpx 32rpx 32rpx 0;
margin-left: 32rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
font-weight: 400;
align-items: center;
}
.photo::after {
position: absolute;
box-sizing: border-box;
content: ' ';
pointer-events: none;
right: 0;
left: 32rpx;
bottom: 0;
border-bottom: 1px solid var(--td-cell-border-color, var(--td-gray-color-3, #e7e7e7));
transform: scaleY(0.5);
left: 32rpx;
}
.title{
font-size: 30rpx;
color: #1C2023;
@ -187,4 +177,39 @@
.zhuanchang_btn--confirm {
color: #3cc7c0;
}
.error_box{
position: relative;
display: flex;
background-color: #FEF1F1;
width: calc(95vw - 64rpx);
height: 100rpx;
margin: 30rpx auto 0 auto;
align-items: center;
padding-left: 32rpx;
border-radius: 10rpx;
}
.error_box::after{
border-radius: 5rpx;
position: absolute;
width: 0px;
height: 0px;
border-width: 16rpx;
border-style: solid;
border-color: transparent transparent #FEF1F1 transparent;
content: ' ';
left: 50rpx;
top: -30rpx;
}
.error_msg{
position: relative;
margin-left: 10rpx;
color: #FF0000;
letter-spacing: 3rpx;
font-weight: 600;
}
.has_error{
margin-left: 32rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #e7e7e7;
}

View File

@ -31,7 +31,11 @@ Component({
textarea_val: {
type: String,
value: '',
}
},
has_error_content: {
type: String,
value: "",
},
},
/**

View File

@ -9,4 +9,8 @@
<view class="textarea-cell-content">
<textarea bindblur="bindTextAreaBlur" maxlength="1000" style="margin: 32rpx 32rpx 0 32rpx; width: 100%; height: 90%; background-color: #FAFAFA;" name="" id="" placeholder="{{ textarea_cell_content_placeholder }}" value="{{textarea_val}}"></textarea>
</view>
<view class="error_box" wx:if="{{ has_error_content != '' }}" >
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
<text class="error_msg">{{ has_error_content }}</text>
</view>
</view>

View File

@ -43,4 +43,34 @@
}
.textarea-cell-name{
font-size: 30rpx;
}
.error_box{
position: relative;
display: flex;
background-color: #FEF1F1;
width: calc(95vw - 64rpx);
height: 100rpx;
margin: 30rpx auto 0 auto;
align-items: center;
padding-left: 32rpx;
border-radius: 10rpx;
}
.error_box::after{
border-radius: 5rpx;
position: absolute;
width: 0px;
height: 0px;
border-width: 16rpx;
border-style: solid;
border-color: transparent transparent #FEF1F1 transparent;
content: ' ';
left: 50rpx;
top: -30rpx;
}
.error_msg{
position: relative;
margin-left: 10rpx;
color: #FF0000;
letter-spacing: 3rpx;
font-weight: 600;
}

View File

@ -28,9 +28,9 @@ Component({
type: String,
value: '32rpx',
},
has_error: {
type: Boolean,
value: false,
has_error_content: {
type: String,
value: "",
},
fileList:{
type: Array,

View File

@ -14,8 +14,8 @@
<van-image width="100" height="100" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/upload_button.png" />
</van-uploader>
</view>
<view class="error_box" wx:if="{{ has_error }}" >
<view class="error_box" wx:if="{{ has_error_content != '' }}" >
<t-icon color="red" name="close-circle-filled" size="48rpx" data-name="close-circle-filled" />
<text class="error_msg">拒绝原因照片不清晰</text>
<text class="error_msg">{{ has_error_content }}</text>
</view>
</view>

View File

@ -4,6 +4,10 @@ Component({
* 组件的属性列表
*/
properties: {
from_account: {
type: String,
value: '10000',
},
name: {
type: String,
value: '张三三',
@ -23,6 +27,11 @@ Component({
desc: {
type: String,
value: '这是示例备注desc',
observer(desc) {
this.setData({
desc: desc,
});
},
},
status_text: {
type: String,
@ -35,10 +44,23 @@ Component({
status_class: {
type: String,
},
order_inquiry_id: {
type: String,
value: '',
},
note: {
type: String,
value: '不接诊24小时后自动取消',
},
message_dot:{
type: Boolean,
value: false,
observer(dot) {
this.setData({
message_dot: dot,
});
},
}
},
/**
@ -54,20 +76,14 @@ Component({
methods: {
go(e){
wx.navigateTo({
url: e.currentTarget.dataset.url,
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptDataFromOpenedPage: function(data) {
console.log(data)
},
someEvent: function(data) {
console.log(data)
}
},
success: function(res) {
// 通过 eventChannel 向被打开页面传送数据
res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
}
url: e.currentTarget.dataset.url
})
},
goChat(e){
let from_account = e.currentTarget.dataset.from_account;
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
wx.navigateTo({
url: e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id
})
},
tabShow(){

View File

@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"van-button": "@vant/weapp/button/index",
"van-popup": "@vant/weapp/popup/index"
"van-popup": "@vant/weapp/popup/index",
"t-badge": "tdesign-miniprogram/badge/badge"
}
}

View File

@ -1,20 +1,24 @@
<view class="content">
<view class="content_1">
<view class="name"><text style="font-size: 34rpx;color: #333;">就诊人:</text>{{name}} {{sex}}{{age}}岁</view>
<view class="name">
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
{{name}} {{sex}}{{age}}<t-badge dot="{{message_dot}}" offset="{{ [-4, 4] }}" content="岁" />
</view>
<view class="date"> {{date}}</view>
</view>
<view class="content_2">{{desc}}</view>
<view class="content_3">
<view class="status {{ status_class }}">{{status_text}}</view>
<view class="btn" wx:if="{{ status == 0 }}">
<van-button bind:click="go" data-url="/Pages/yishi/case/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
<van-button type="default" bindtap="tabShow" custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">去接诊</van-button>
<view class="status {{ status_class }}">{{ status_text }}</view>
<view class="btn" wx:if="{{ status == 3 }}">
<van-button bind:click="go" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
<van-button type="default" bindtap="tabShow" custom-style="width:200rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
</view>
<view class="btn" wx:if="{{ status == 1 }}">
<van-button plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
<view class="btn" wx:if="{{ status >= 4 }}">
<van-button bind:click="goChat" data-from_account="{{from_account}}" data-url="/Pages/yishi/chat/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
<!-- <van-button bind:click="go" data-url="/Pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
</view>
</view>
<view class="content_4" wx:if="{{ status == 0 }}">{{note}}</view>
<view class="content_4" wx:if="{{ status == 3 }}">{{note}}</view>
</view>
<van-popup show="{{ show }}" bind:close="onClose" round>
@ -22,8 +26,8 @@
<view class="pop_title">温馨提示</view>
<view class="pop_note">为保障服务质量,请您查看患者病历信息在选择是否接诊。</view>
<view class="pop_btn">
<view class="pop_btn_left" bindtap="go" data-url="/Pages/yishi/case/index" >去查看</view>
<view class="pop_btn_right" bindtap="go" data-url="/Pages/yishi/chat/index" >去接诊</view>
<view class="pop_btn_left" bindtap="go" data-from_account="{{from_account}}" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" >去查看</view>
<view class="pop_btn_right" bindtap="goChat" data-from_account="{{from_account}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
</view>
</view>
</van-popup>

View File

@ -2,7 +2,7 @@
background-color: #fff;
display: flex;
flex-direction: column;
margin-bottom: 20rpx;
margin-top: 20rpx;
}
.content_1,.content_3,.content_2{
display: flex;
@ -39,8 +39,7 @@
.btn{
flex: 2;
display: flex;
justify-content: space-around;
justify-content: flex-end;
}
.content_4{
flex: 5;

View File

@ -1,4 +1,5 @@
// custom-tab-bar/index.js
const app = getApp()
Component({
/**
@ -10,55 +11,77 @@ Component({
"backgroundColor": "#ffffff",
"selectedColor": "#fff",
"listAll": {
"list2":[
"list1":[
{
"pagePath": "/Pages/yaoshi/home/home",
"text": "首页",
"iconPath": "/static/images/yaoshi/tabbar_icon/home.png",
"selectedIconPath": "/static/images/yaoshi/tabbar_icon/home_select.png"
"selectedIconPath": "/static/images/yaoshi/tabbar_icon/home_select.png",
"info": ""
},
{
"pagePath": "/Pages/yaoshi/my/my",
"text": "我的",
"iconPath": "/static/images/yaoshi/tabbar_icon/my.png",
"selectedIconPath": "/static/images/yaoshi/tabbar_icon/my_select.png"
"selectedIconPath": "/static/images/yaoshi/tabbar_icon/my_select.png",
"info": ""
}],
"list1":[
"list2":[
{
"pagePath": "/Pages/yishi/index/index",
"text": "首页(Y)",
"iconPath": "/static/images/yishi/tabbar_icon/index.png",
"selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png"
"selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png",
"info": ""
},
{
"pagePath": "/Pages/yishi/wenzhen/wenzhen",
"text": "问诊(Y)",
"pagePath": "/Pages/yishi/wenzhen_v2/wenzhen",
"text": "问诊(Z)",
"iconPath": "/static/images/yishi/tabbar_icon/wenzhen.png",
"selectedIconPath": "/static/images/yishi/tabbar_icon/wenzhen_select.png"
"selectedIconPath": "/static/images/yishi/tabbar_icon/wenzhen_select.png",
"info": "99"
},
{
"pagePath": "/Pages/yishi/my/index",
"text": "我的(Y)",
"iconPath": "/static/images/yishi/tabbar_icon/my.png",
"selectedIconPath": "/static/images/yishi/tabbar_icon/my_select.png"
"selectedIconPath": "/static/images/yishi/tabbar_icon/my_select.png",
"info": ""
}]
},
items: [ ],
dialog_visible: false,
dialog_content: ""
dialog_content: "",
usertype: "",
index_info: "",
wenzhen_info: "",
my_info: "",
},
attached() {
const usertype = wx.getStorageSync('usertype')
console.log("usertype: " ,usertype);
if (usertype == 2) {
this.setData({
items: this.data.listAll.list1
usertype: usertype,
items: this.data.listAll.list2
})
}else{
this.setData({
items: this.data.listAll.list2
usertype: usertype,
items: this.data.listAll.list1
})
}
let _this = this;
setInterval(() => {
let index_info = wx.getStorageSync('index_info');
let wenzhen_info = wx.getStorageSync('wenzhen_info');
let my_info = wx.getStorageSync('my_info');
_this.setData({
index_info: index_info,
wenzhen_info: wenzhen_info,
my_info: my_info,
})
}, 500);
},
methods: {
// swichNav: function (e) {
@ -83,7 +106,8 @@ Component({
// })
console.log("custom tab bar onChange");
// return;
let url = this.data.items[e.detail].pagePath
let url = this.data.items[e.detail].pagePath;
console.log(url);
wx.switchTab({
url: url,
})

View File

@ -1,26 +1,97 @@
<!-- <view class="nav-tabs" wx:if="{{tabBarShow}}">
<view class="tab-list {{currentTab == idx ? 'active' : 'default' }}" wx:for="{{items}}" wx:key="prototype" wx:for-index="idx" wx:for-item="item" data-current="{{idx}}" data-url="{{item.pagePath}}" bindtap="swichNav">
<text class="tab-text" wx:for-index="idx" data-current="{{idx}}" src="{{currentTab == idx ? item.selectedIconPath : item.iconPath }}">{{item.text}}</text>
<image class="iconPath" wx:for-index="idx" data-current="{{idx}}" src="{{currentTab == idx ? item.selectedIconPath : item.iconPath }}"></image>
</view>
</view> -->
<van-tabbar active="{{ active }}" bind:change="onChange">
<van-tabbar-item info="3" data-url="{{item.pagePath}}" url="{{item.pagePath}}" wx:for="{{items}}">
<van-tabbar active="{{ active }}" bind:change="onChange"
active-color="#3CC7C0" inactive-color="#999999" wx:if="{{usertype == 2}}" >
<van-tabbar-item info="{{index_info}}" data-url="{{listAll.list2[0].pagePath}}" url="{{listAll.list2[0].pagePath}}">
<image
slot="icon"
src="{{ item.iconPath }}"
data-url="{{ item.pagePath }}"
src="{{ listAll.list2[0].iconPath }}"
data-url="{{ listAll.list2[0].pagePath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
/>
<image
slot="icon-active"
src="{{ item.selectedIconPath }}"
src="{{ listAll.list2[0].selectedIconPath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
data-url="{{ item.pagePath }}"
data-url="{{ listAll.list2[0].pagePath }}"
/>
{{item.text}}
{{listAll.list2[0].text}}
</van-tabbar-item>
<van-tabbar-item info="{{wenzhen_info}}" data-url="{{listAll.list2[1].pagePath}}" url="{{listAll.list2[1].pagePath}}">
<image
slot="icon"
src="{{ listAll.list2[1].iconPath }}"
data-url="{{ listAll.list2[1].pagePath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
/>
<image
slot="icon-active"
src="{{ listAll.list2[1].selectedIconPath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
data-url="{{ listAll.list2[1].pagePath }}"
/>
{{listAll.list2[1].text}}
</van-tabbar-item>
<van-tabbar-item info="{{my_info}}" data-url="{{listAll.list2[2].pagePath}}" url="{{listAll.list2[2].pagePath}}">
<image
slot="icon"
src="{{ listAll.list2[2].iconPath }}"
data-url="{{ listAll.list2[2].pagePath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
/>
<image
slot="icon-active"
src="{{ listAll.list2[2].selectedIconPath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
data-url="{{ listAll.list2[2].pagePath }}"
/>
{{listAll.list2[2].text}}
</van-tabbar-item>
</van-tabbar>
<van-tabbar active="{{ active }}" bind:change="onChange"
active-color="#74A2FA" inactive-color="#999999" wx:if="{{usertype == 3}}" >
<van-tabbar-item info="{{my_info}}" data-url="{{listAll.list1[0].pagePath}}" url="{{listAll.list1[0].pagePath}}">
<image
slot="icon"
src="{{ listAll.list1[0].iconPath }}"
data-url="{{ listAll.list1[0].pagePath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
/>
<image
slot="icon-active"
src="{{ listAll.list1[0].selectedIconPath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
data-url="{{ listAll.list1[0].pagePath }}"
/>
{{listAll.list1[0].text}}
</van-tabbar-item>
<van-tabbar-item info="{{my_info}}" data-url="{{listAll.list1[1].pagePath}}" url="{{listAll.list1[1].pagePath}}">
<image
slot="icon"
src="{{ listAll.list1[1].iconPath }}"
data-url="{{ listAll.list1[1].pagePath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
/>
<image
slot="icon-active"
src="{{ listAll.list1[1].selectedIconPath }}"
mode="aspectFit"
style="width: 30px; height: 18px;"
data-url="{{ listAll.list1[1].pagePath }}"
/>
{{listAll.list1[1].text}}
</van-tabbar-item>
</van-tabbar>
<t-dialog

View File

@ -434,6 +434,36 @@ class API extends HTTP {
...params
}
})
}
//获取医生问诊消息列表
getDoctorInquiryMessage(params) {
return this.request({
url: `${this.baseUrl}/doctor/inquiry/message`,
method: 'GET',
data: {
...params
}
})
}
//获取医生问诊消息用户属性
getDoctorInquiryMessageAttr(params) {
return this.request({
url: `${this.baseUrl}/doctor/inquiry/message/attr`,
method: 'POST',
data: {
...params
}
})
}
//获取患者问诊病例
getDoctorInquiryCase(params) {
return this.request({
url: `${this.baseUrl}/doctor/inquiry/case`,
method: 'GET',
data: {
...params
}
})
}
}

View File

@ -47,6 +47,9 @@ class HTTP {
} else {
reject(res.data.message)
this._show_error(res.data.message)
wx.navigateTo({
url: "/Pages/index/index"
})
}
} else {
resolve(res.data)
@ -68,6 +71,7 @@ class HTTP {
icon: 'none',
duration: 2000
})
}
}

View File

@ -9,6 +9,17 @@ const formatTime = date => {
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
}
const formatChatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return `${[year, month, day].map(formatNumber).join('-')} ${[hour, minute].map(formatNumber).join(':')}`
}
const getDateArr = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
@ -25,8 +36,37 @@ const formatNumber = n => {
return n[1] ? n : `0${n}`
}
const getTimeAgo = stringTime =>{
var minute = 1000 * 60;
var hour = minute *60;
var day = hour *24;
var week = day * 7;
var month = day * 30;
var time1 = new Date().getTime();//当前的时间戳
var time2 = stringTime*1000;//指定时间的时间戳
var time = time1 - time2;
var result = null;
if(time < 0){
return '刚刚';
}else if(time/month >= 1){
result = formatChatTime(new Date(time2));
}else if(time/week >= 1){
result = formatChatTime(new Date(time2));
}else if(time/day >= 1){
result = formatChatTime(new Date(time2));
}else if(time/hour >= 1){
result = parseInt(time/hour) + "小时前";
}else if(time/minute >= 1){
result = parseInt(time/minute) + "分钟前";
}else {
result = "刚刚";
}
return result;
}
module.exports = {
formatTime,
getDateArr,
formatNumber,
getTimeAgo,
}