优化
This commit is contained in:
parent
14bcbf1673
commit
959bfc61b1
@ -25,7 +25,7 @@ Page({
|
|||||||
onShow: function () {
|
onShow: function () {
|
||||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||||
this.getTabBar().setData({
|
this.getTabBar().setData({
|
||||||
currentTab: 0 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ Page({
|
|||||||
onShow() {
|
onShow() {
|
||||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||||
this.getTabBar().setData({
|
this.getTabBar().setData({
|
||||||
currentTab: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
active: 1, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Page({
|
|||||||
},
|
},
|
||||||
onTabsChange(e){
|
onTabsChange(e){
|
||||||
console.log(e);
|
console.log(e);
|
||||||
let list_name = "appraise_list_" + this.data.evaluation_type;
|
let list_name = "appraise_list_" + e.detail.value;
|
||||||
this.setData({
|
this.setData({
|
||||||
evaluation_type: e.detail.value,
|
evaluation_type: e.detail.value,
|
||||||
current_page: 0,
|
current_page: 0,
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
"te-nav-bar": "/commpents/te_navbar",
|
"te-nav-bar": "/commpents/te_navbar",
|
||||||
"appraise-data": "/commpents/appraise_data/index",
|
"appraise-data": "/commpents/appraise_data/index",
|
||||||
"t-tabs": "tdesign-miniprogram/tabs/tabs",
|
"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,
|
"enablePullDownRefresh": true,
|
||||||
"onReachBottomDistance": 100
|
"onReachBottomDistance": 100
|
||||||
|
|||||||
@ -20,8 +20,9 @@
|
|||||||
date="{{item.created_at}}"
|
date="{{item.created_at}}"
|
||||||
wx:for="{{appraise_list_1}}"
|
wx:for="{{appraise_list_1}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<van-empty description="暂无数据" wx:if="{{appraise_list_1.length == 0}}" />
|
||||||
|
|
||||||
</t-tab-panel>
|
</t-tab-panel>
|
||||||
<t-tab-panel label="好评({{good_quantity}})" value="2">
|
<t-tab-panel label="好评({{good_quantity}})" value="2">
|
||||||
<view class="item_list">
|
<view class="item_list">
|
||||||
@ -33,6 +34,7 @@
|
|||||||
wx:for="{{appraise_list_2}}"
|
wx:for="{{appraise_list_2}}"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<van-empty description="暂无数据" wx:if="{{appraise_list_2.length == 0}}" />
|
||||||
</t-tab-panel>
|
</t-tab-panel>
|
||||||
|
|
||||||
<t-tab-panel label="中/差评({{bad_quantity}})" value="3">
|
<t-tab-panel label="中/差评({{bad_quantity}})" value="3">
|
||||||
@ -45,6 +47,7 @@
|
|||||||
wx:for="{{appraise_list_3}}"
|
wx:for="{{appraise_list_3}}"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<van-empty description="暂无数据" wx:if="{{appraise_list_3.length == 0}}" />
|
||||||
</t-tab-panel>
|
</t-tab-panel>
|
||||||
</t-tabs>
|
</t-tabs>
|
||||||
</view>
|
</view>
|
||||||
@ -1,7 +1,8 @@
|
|||||||
|
page{
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
}
|
||||||
.container{
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
|
||||||
background-color: #F6F6F6;
|
|
||||||
}
|
}
|
||||||
.t-tab-panel,.t-tabs__content {
|
.t-tab-panel,.t-tabs__content {
|
||||||
background-color: #F6F6F6;
|
background-color: #F6F6F6;
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<view class="help_title">
|
<view class="help_title">
|
||||||
<text wx:if="{{ !banklist_empty }}">我的银行卡</text>
|
<text wx:if="{{ !banklist_empty }}">我的银行卡</text>
|
||||||
</view>
|
</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" />
|
操作手册-银行卡<t-icon size="26rpx" style="display: inline-block;" name="chevron-right" size="48rpx" data-name="chevron-right" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
import { API } from './../../../utils/network/api'
|
||||||
|
let api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
@ -6,5 +8,21 @@ Page({
|
|||||||
title: '病历信息', //导航栏 中间的标题
|
title: '病历信息', //导航栏 中间的标题
|
||||||
},
|
},
|
||||||
height: app.globalData.height,
|
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);})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1,56 +1,58 @@
|
|||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<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="main_title">基础信息</view>
|
||||||
<view class="data_box">
|
<view class="data_box">
|
||||||
<view class="data_box_top">
|
<view class="data_box_top">
|
||||||
<view class="name">张三三</view>
|
<view class="name">{{case_detail.name}}</view>
|
||||||
<view class="sex">男|30岁 </view>
|
<view class="sex">{{case_detail.sex==1?'男':case_detail.sex==2?'女':'未知'}}|{{case_detail.age}}岁 </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="height info_item"><text class="info_title">身高:</text><text class="info_val">182cm</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">98KG</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">汉族</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">学生</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">已婚</text></view>
|
<view class="hunyin info_item"><text class="info_title">婚姻:</text><text class="info_val">{{case_detail.nation_name}}</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box">
|
<view class="disease_box">
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">所患疾病:</view>
|
<view class="title">所患疾病:</view>
|
||||||
<view class="conent">肝炎</view>
|
<view class="conent">{{case_detail.disease_class_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">确诊日期:</view>
|
<view class="title">确诊日期:</view>
|
||||||
<view class="conent">2022年8月29日 10:23</view>
|
<view class="conent">{{case_detail.diagnosis_date}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<!-- <view class="disease_box_item">
|
||||||
<view class="title">医生诊断:</view>
|
<view class="title">医生诊断:</view>
|
||||||
<view class="conent">过度劳累,失眠不足导致可以多</view>
|
<view class="conent">{{case_detail.disease_class_name}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">确诊医院:</view>
|
<view class="title">确诊医院:</view>
|
||||||
<view class="conent">首都医科大学附属北京佑安医院</view>
|
<view class="conent">{{case_detail.diagnosis_hospital}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">正在服用的药品信息:</view>
|
<view class="title">正在服用的药品信息:</view>
|
||||||
<view class="conent">无/有</view>
|
<view class="conent">{{case_detail.disease_class_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_info">
|
<view class="disease_info">
|
||||||
详细描述:阿托伐他汀钙片8片 (用法用量:常用的起始剂量为10mg每日一次
|
详细描述:阿托伐他汀钙片8片 (用法用量:常用的起始剂量为10mg每日一次
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">病情描述:</view>
|
<view class="title">病情描述:</view>
|
||||||
<view class="conent">过度劳累,失眠不足导致可以多休息几天,没有好转的话可以去医院看看先吧...</view>
|
<view class="conent">{{case_detail.disease_desc}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">用药意向::</view>
|
<view class="title">用药意向:</view>
|
||||||
<view class="conent">阿托伐他汀钙片8片(用法用量:常用的起始剂量为10mg每日一次剂量调整时间为4周或更长。阿托伐他汀每日用量可在一天内的任何时间一次服用,并不受进餐影响。)</view>
|
<view class="conent">
|
||||||
|
<text wx:for="{{case_detail.product}}">{{item}};</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">问诊本人复诊凭证(病例/处方单/检查报告/住院单可任选其一):</view>
|
<view class="title">问诊本人复诊凭证(病例/处方单/检查报告/住院单可任选其一):</view>
|
||||||
<view class="conent">无</view>
|
<view class="conent">无</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="img_box">
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -59,35 +61,38 @@
|
|||||||
<view class="disease_box">
|
<view class="disease_box">
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">过敏史:</view>
|
<view class="title">过敏史:</view>
|
||||||
<view class="conent">无/有(显示内容)</view>
|
<view class="conent">{{case_detail.is_allergy_history==0?'否':case_detail.allergy_history}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">家族史:</view>
|
<view class="title">家族史:</view>
|
||||||
<view class="conent">无/有(显示内容)</view>
|
<view class="conent">{{case_detail.is_family_history==0?'否':case_detail.family_history}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">是否备孕、妊娠或者哺乳期:</view>
|
<view class="title">是否备孕、妊娠或者哺乳期:</view>
|
||||||
<view class="conent">不是/是(显示内容)</view>
|
<view class="conent">{{case_detail.is_pregnant==0?'否':case_detail.pregnant}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">饮酒史:</view>
|
<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>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">吸烟史:</view>
|
<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>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">手术史:</view>
|
<view class="title">手术史:</view>
|
||||||
<view class="conent">无/有(手术名称)</view>
|
<view class="conent">{{case_detail.is_operation==0?'否':case_detail.operation}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disease_box_item">
|
<view class="disease_box_item">
|
||||||
<view class="title">接触化学物:</view>
|
<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>
|
||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
|
<view style="height: 50rpx;">
|
||||||
|
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -1,6 +1,8 @@
|
|||||||
|
page{
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
}
|
||||||
.container{
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
background-color: #F6F6F6;
|
|
||||||
padding: 0 4vw;
|
padding: 0 4vw;
|
||||||
}
|
}
|
||||||
.main_title{
|
.main_title{
|
||||||
|
|||||||
@ -18,8 +18,6 @@ Page({
|
|||||||
income_tax: "12"
|
income_tax: "12"
|
||||||
},
|
},
|
||||||
onLoad(options){
|
onLoad(options){
|
||||||
|
|
||||||
|
|
||||||
//获取提现数据
|
//获取提现数据
|
||||||
api.getDoctorWithdrawal().then(response => {
|
api.getDoctorWithdrawal().then(response => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<!-- 提现页面 -->
|
<!-- 提现页面 -->
|
||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<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">
|
||||||
<view class="txt_title">结算银行卡</view>
|
<view class="txt_title">结算银行卡</view>
|
||||||
<view class="rule">提现规则</view>
|
<view class="rule">提现规则</view>
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
.container{
|
page{
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
|
}
|
||||||
|
.container{
|
||||||
|
margin-top: 20rpx;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
|
||||||
}
|
}
|
||||||
.top{
|
.top{
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 92vw;
|
width: 92vw;
|
||||||
margin: 30rpx auto;
|
margin: 0 auto 20rpx auto;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.txt_title{
|
.txt_title{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<!-- 提现记录 -->
|
<!-- 提现记录 -->
|
||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<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">
|
||||||
<view class="top_txt">
|
<view class="top_txt">
|
||||||
<view class="month">2022年<van-icon name="arrow-down" color="#fff" size="40rpx" /></view>
|
<view class="month">2022年<van-icon name="arrow-down" color="#fff" size="40rpx" /></view>
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
.container{
|
page{
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
|
}
|
||||||
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
|
||||||
}
|
}
|
||||||
.top{
|
.top{
|
||||||
width: 92vw;
|
width: 92vw;
|
||||||
margin: 50rpx auto 0 auto;
|
margin: 20rpx auto 0 auto;
|
||||||
background-color: #3CC7C0;
|
background-color: #3CC7C0;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|||||||
@ -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()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
config: {
|
patient_account: "10000",
|
||||||
userID: "xiaobeibei", //User ID
|
|
||||||
SDKAPPID: 1400793692, // Your SDKAppID
|
|
||||||
SECRETKEY: "44d97cf741fc758be98cdad100015582b6ad1dc5a3b6676c1997a57279eecfa9", // Your secretKey
|
|
||||||
EXPIRETIME: 604800,
|
|
||||||
},
|
|
||||||
patient_account: "ayu",
|
|
||||||
title: '患者姓名',
|
title: '患者姓名',
|
||||||
height: app.globalData.height,
|
height: app.globalData.height,
|
||||||
|
order_inquiry_id: ""
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(option) {
|
||||||
console.log("chat onload");
|
console.log("chat onload");
|
||||||
let sign = genTestUserSig(this.data.config);
|
let from_account = option.from_account;
|
||||||
console.log("sign: ", sign);
|
let order_inquiry_id = option.order_inquiry_id;
|
||||||
const userSig = sign.userSig;
|
this.setData({
|
||||||
console.log("userSig: ", userSig);
|
patient_account: from_account,
|
||||||
wx.$TUIKit = TIM.create({
|
order_inquiry_id: order_inquiry_id,
|
||||||
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);
|
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
console.log("chat onUnload");
|
console.log("chat onUnload");
|
||||||
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
|
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let interval = setInterval(() => {
|
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){
|
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);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 1000);
|
||||||
},
|
},
|
||||||
onSDKReady() {
|
$onMessageReceived(value) {
|
||||||
console.error("chat js: onSDKReady")
|
const message = value.data[0];
|
||||||
const TUIChat = this.selectComponent('#TUIChat');
|
console.log("message from chat: ",message)
|
||||||
TUIChat.init();
|
|
||||||
app.globalData.chat_sdk_ready = true
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<!-- 一对一聊天 -->
|
<!-- 一对一聊天 不带会话列表 -->
|
||||||
<view>
|
<view>
|
||||||
<TUIChat id="TUIChat" currentConversationID="C2C{{patient_account}}"
|
<TUIChat id="TUIChat" currentConversationID="C2C{{patient_account}}" order_inquiry_id="{{order_inquiry_id}}"
|
||||||
unreadCount="9" hasCallKit="{{ true }}" bind:handleCall="handleCall"
|
hasCallKit="{{ true }}" bind:handleCall="handleCall"></TUIChat>
|
||||||
|
|
||||||
></TUIChat>
|
|
||||||
</view>
|
</view>
|
||||||
@ -1,50 +1,24 @@
|
|||||||
// index.js
|
// 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()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
config: {
|
|
||||||
userID: "xiaobeibei", //User ID
|
|
||||||
SDKAPPID: 1400793692, // Your SDKAppID
|
|
||||||
SECRETKEY: "44d97cf741fc758be98cdad100015582b6ad1dc5a3b6676c1997a57279eecfa9", // Your secretKey
|
|
||||||
EXPIRETIME: 604800,
|
|
||||||
},
|
|
||||||
title: '患者姓名',
|
title: '患者姓名',
|
||||||
height: app.globalData.height,
|
height: app.globalData.height,
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
let sign = genTestUserSig(this.data.config);
|
console.log("onLoad chat_session")
|
||||||
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);
|
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady,this);
|
|
||||||
},
|
},
|
||||||
onSDKReady() {
|
onShow(){
|
||||||
console.warn("chat js: onSDKReady")
|
let _this = this;
|
||||||
const TUIKit = this.selectComponent('#TUIKit');
|
let interval = setInterval(() => {
|
||||||
TUIKit.init();
|
if(app.globalData.chat_sdk_ready){
|
||||||
|
const TUIKit = _this.selectComponent('#TUIKit');
|
||||||
|
TUIKit.init();
|
||||||
|
clearInterval(interval);
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -61,7 +61,7 @@ Page({
|
|||||||
getList(){
|
getList(){
|
||||||
//获取处方列表
|
//获取处方列表
|
||||||
let params = {};
|
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;
|
params.page = this.data.current_page + 1;
|
||||||
api.getDoctorPrescription(params).then(response => {
|
api.getDoctorPrescription(params).then(response => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"te-nav-bar": "/commpents/te_navbar",
|
"te-nav-bar": "/commpents/te_navbar",
|
||||||
"t-tabs": "tdesign-miniprogram/tabs/tabs",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<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">
|
<view class="tabs">
|
||||||
<t-tabs
|
<t-tabs
|
||||||
defaultValue="{{0}}"
|
defaultValue="{{0}}"
|
||||||
@ -52,6 +52,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<van-empty description="暂无数据" wx:if="{{chufang_list_0.length == 0}}" />
|
||||||
</view>
|
</view>
|
||||||
</t-tab-panel>
|
</t-tab-panel>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
|
page{
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
}
|
||||||
.container{
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
|
||||||
background-color: #F6F6F6;
|
|
||||||
}
|
}
|
||||||
.t-tabs__content{
|
.t-tabs__content{
|
||||||
background-color: #F6F6F6;
|
background-color: #F6F6F6;
|
||||||
@ -14,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
.item_list{
|
.item_list{
|
||||||
width: 90vw;
|
width: 90vw;
|
||||||
margin: 0 auto;
|
margin: 20rpx auto;
|
||||||
}
|
}
|
||||||
.item{
|
.item{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
// Pages/yishi/identity/index.js
|
// Pages/yishi/identity/index.js
|
||||||
import Toast from '@vant/weapp/toast/toast';
|
|
||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
import { FileUtil } from './../../../utils/fileutil'
|
import { FileUtil } from './../../../utils/fileutil'
|
||||||
|
|
||||||
@ -16,70 +15,7 @@ Page({
|
|||||||
stickyProps: {
|
stickyProps: {
|
||||||
zIndex: 2,
|
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(){
|
onLoad(){
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|||||||
@ -1,27 +1,7 @@
|
|||||||
.required{
|
.required{
|
||||||
color: #e34d59;
|
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{
|
.title{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #1C2023;
|
color: #1C2023;
|
||||||
|
|||||||
@ -110,6 +110,17 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLoad(){
|
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 => {
|
api.yiShiIndex().then(response => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
let avatar = response.data.info.avatar;
|
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(){
|
onADChange(){
|
||||||
// console.log("onADChange");
|
// console.log("onADChange");
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<!-- 操作手册 -->
|
<!-- 操作手册 -->
|
||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<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">
|
<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}}" />
|
<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>
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
.container{
|
page{
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
background-color: #F6F6F6;
|
background-color: #F6F6F6;
|
||||||
}
|
}
|
||||||
|
.container{
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
.item_list{
|
.item_list{
|
||||||
width: 92vw;
|
width: 92vw;
|
||||||
margin: 20rpx auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"component": true,
|
"component": true,
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"m-nav-bar": "/commpents/mynavbar/index"
|
"te-nav-bar": "/commpents/te_navbar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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>
|
<rich-text nodes="{{html_content}}" space="nbsp"></rich-text>
|
||||||
</m-nav-bar>
|
</view>
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
@ -9,8 +9,8 @@
|
|||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name">{{user_name}}</view>
|
<view class="name">{{user_name}}</view>
|
||||||
<view class="renzheng">
|
<view class="renzheng">
|
||||||
<view class="yishi">已医师认证></view>
|
<view class="yishi">{{iden_auth_status==1?'已医师认证':'未医师认证'}}></view>
|
||||||
<view class="zhiye">未多点执业认证></view>
|
<view class="zhiye">{{multi_point_status==1?'已多点执业认证':'未多点执业认证'}}></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="icon">
|
<view class="icon">
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
|
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
|
||||||
"van-icon": "@vant/weapp/icon/index",
|
"van-icon": "@vant/weapp/icon/index",
|
||||||
"van-cell": "@vant/weapp/cell/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<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">
|
||||||
<view class="top_txt">
|
<view class="top_txt">
|
||||||
<view style="font-size: 30rpx;">
|
<view style="font-size: 30rpx;">
|
||||||
@ -20,6 +20,7 @@
|
|||||||
<view class="txt_title">账单</view>
|
<view class="txt_title">账单</view>
|
||||||
<view class="content">
|
<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-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>
|
</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" />
|
<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" />
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
.container{
|
page{
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
|
}
|
||||||
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
|
||||||
}
|
}
|
||||||
.top{
|
.top{
|
||||||
width: 92vw;
|
width: 92vw;
|
||||||
margin: 50rpx auto 0 auto;
|
margin: 20rpx auto 0 auto;
|
||||||
background-color: #3CC7C0;
|
background-color: #3CC7C0;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|||||||
@ -14,7 +14,7 @@ Page({
|
|||||||
idcard_status: 0,
|
idcard_status: 0,
|
||||||
iden_auth_status: 0,
|
iden_auth_status: 0,
|
||||||
user_name: "",
|
user_name: "",
|
||||||
brief_introduction: "点击编辑"
|
brief_introduction: "我的简介"
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
//获取医生我的账户数据
|
//获取医生我的账户数据
|
||||||
|
|||||||
@ -17,7 +17,8 @@ Page({
|
|||||||
list_2: [],
|
list_2: [],
|
||||||
show: false,
|
show: false,
|
||||||
add_message: "",
|
add_message: "",
|
||||||
current_words_type: 1
|
current_words_type: 1,
|
||||||
|
focus: true
|
||||||
},
|
},
|
||||||
onTabChange(e){
|
onTabChange(e){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -68,5 +69,9 @@ Page({
|
|||||||
show: false,
|
show: false,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
onInput(){
|
||||||
|
this.setData({
|
||||||
|
focus: true
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||||
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
<view class="container">
|
||||||
|
|
||||||
<t-tabs
|
<t-tabs
|
||||||
defaultValue="{{ current_words_type }}"
|
defaultValue="{{ current_words_type }}"
|
||||||
@ -45,7 +45,11 @@
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
placeholder="请输入文字"
|
placeholder="请输入文字"
|
||||||
autosize
|
autosize
|
||||||
|
maxlength="500"
|
||||||
|
custom-style="height: 100%;"
|
||||||
border="{{ false }}"
|
border="{{ false }}"
|
||||||
|
focus="{{focus}}"
|
||||||
|
bindtap="onInput"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
|
page{
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
}
|
||||||
.container{
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
|
||||||
background-color: #F6F6F6;
|
|
||||||
}
|
}
|
||||||
.item_list{
|
.item_list{
|
||||||
width: 92vw;
|
width: 92vw;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<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="list">
|
||||||
|
|
||||||
<view class="item">
|
<view class="item">
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
.container{
|
page{
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
height: 100vh;
|
}
|
||||||
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
padding-top: 20rpx;
|
||||||
}
|
}
|
||||||
.list{
|
.list{
|
||||||
width: 92vw;
|
width: 92vw;
|
||||||
margin: 20rpx auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.item{
|
.item{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<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="list">
|
||||||
|
|
||||||
<view class="item" bindtap="go" data-url="/Pages/yishi/notice_deatil/index">
|
<view class="item" bindtap="go" data-url="/Pages/yishi/notice_deatil/index">
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
.container{
|
page{
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
height: 100vh;
|
}
|
||||||
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
padding-top: 20rpx;
|
||||||
}
|
}
|
||||||
.list{
|
.list{
|
||||||
width: 92vw;
|
width: 92vw;
|
||||||
margin: 20rpx auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.item{
|
.item{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -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()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
@ -6,17 +10,46 @@ Page({
|
|||||||
title: '问诊消息', //导航栏 中间的标题
|
title: '问诊消息', //导航栏 中间的标题
|
||||||
},
|
},
|
||||||
height: app.globalData.height,
|
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 () {
|
onShow: function () {
|
||||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||||
this.getTabBar().setData({
|
this.getTabBar().setData({
|
||||||
active: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
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){
|
go(e){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: e.currentTarget.dataset.url,
|
url: e.currentTarget.dataset.url,
|
||||||
@ -34,5 +67,129 @@ Page({
|
|||||||
res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
|
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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -6,6 +6,8 @@
|
|||||||
"t-image": "tdesign-miniprogram/image/image",
|
"t-image": "tdesign-miniprogram/image/image",
|
||||||
"t-tabs": "tdesign-miniprogram/tabs/tabs",
|
"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-button": "@vant/weapp/button/index"
|
"t-badge": "tdesign-miniprogram/badge/badge",
|
||||||
|
"van-button": "@vant/weapp/button/index",
|
||||||
|
"van-empty": "@vant/weapp/empty/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3,11 +3,16 @@
|
|||||||
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="top_left" bindtap="go" data-url="/Pages/yishi/service_notice/index">
|
<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>
|
||||||
<view class="top_right" bindtap="go" data-url="/Pages/yishi/system_notice/index">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
@ -20,21 +25,20 @@
|
|||||||
|
|
||||||
<view class="tabs" wx:if="{{ has_data }}" >
|
<view class="tabs" wx:if="{{ has_data }}" >
|
||||||
<t-tabs
|
<t-tabs
|
||||||
defaultValue="{{0}}"
|
defaultValue="{{ message_inquiry_type }}"
|
||||||
sticky
|
sticky
|
||||||
bind:change="onTabsChange"
|
bind:change="onTabsChange"
|
||||||
bind:click="onTabsClick"
|
|
||||||
bind:scroll="onStickyScroll"
|
bind:scroll="onStickyScroll"
|
||||||
t-class="custom-tabs"
|
t-class="custom-tabs"
|
||||||
theme="line"
|
theme="line"
|
||||||
custom-style="font-size: 32rpx"
|
custom-style="font-size: 32rpx"
|
||||||
|
|
||||||
>
|
>
|
||||||
<t-tab-panel label="快速问诊" value="0">
|
<t-tab-panel label="快速问诊" value="1">
|
||||||
<wenzhen-data
|
<wenzhen-data
|
||||||
name="李四"
|
name="李四"
|
||||||
sex="女"
|
sex="女"
|
||||||
age="19"
|
age="199"
|
||||||
desc="VVVVVVVV"
|
desc="VVVVVVVV"
|
||||||
status="0"
|
status="0"
|
||||||
status_text="待接诊"
|
status_text="待接诊"
|
||||||
@ -44,26 +48,48 @@
|
|||||||
<wenzhen-data
|
<wenzhen-data
|
||||||
name="李放四"
|
name="李放四"
|
||||||
sex="女"
|
sex="女"
|
||||||
age="199"
|
age="19"
|
||||||
desc="VVVVVVVV"
|
desc="VVVVVVVV"
|
||||||
status="1"
|
status="1"
|
||||||
status_text="接诊中"
|
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>
|
||||||
|
|
||||||
<t-tab-panel label="问诊购药" value="1">
|
<t-tab-panel label="问诊购药" value="2">
|
||||||
|
<!-- 1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消 -->
|
||||||
<wenzhen-data
|
<wenzhen-data
|
||||||
name="张三"
|
name="{{ item.patient_name }}"
|
||||||
sex="男"
|
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||||
age="19"
|
age="{{ item.patient_age }}"
|
||||||
desc="VVVVVVVV"
|
date="{{ item.message_send_time }}"
|
||||||
status="0"
|
desc="{{ item.last_message_content.Text }}"
|
||||||
status_text="待接诊"
|
status="{{ item.inquiry_status }}"
|
||||||
note="xxx"
|
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>
|
||||||
<t-tab-panel label="在线问诊" value="2">
|
<t-tab-panel label="在线问诊" value="3">
|
||||||
<wenzhen-data
|
<!-- <wenzhen-data
|
||||||
name="王五"
|
name="王五"
|
||||||
sex="女"
|
sex="女"
|
||||||
age="19"
|
age="19"
|
||||||
@ -71,9 +97,25 @@
|
|||||||
status="0"
|
status="0"
|
||||||
status_text="待接诊"
|
status_text="待接诊"
|
||||||
note="xxx"
|
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>
|
||||||
<t-tab-panel label="公益问诊" value="3">
|
<t-tab-panel label="公益问诊" value="4">
|
||||||
<wenzhen-data
|
<wenzhen-data
|
||||||
name="赵柳"
|
name="赵柳"
|
||||||
sex="女"
|
sex="女"
|
||||||
@ -83,8 +125,23 @@
|
|||||||
status_text="待接诊"
|
status_text="待接诊"
|
||||||
note="xxx"
|
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>
|
||||||
<t-tab-panel label="问诊结束" value="4">
|
<t-tab-panel label="问诊结束" value="5">
|
||||||
<wenzhen-data
|
<wenzhen-data
|
||||||
name="谢广坤"
|
name="谢广坤"
|
||||||
sex="女"
|
sex="女"
|
||||||
@ -94,6 +151,21 @@
|
|||||||
status_class="status_end"
|
status_class="status_end"
|
||||||
status_text="快速问诊"
|
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-tab-panel>
|
||||||
</t-tabs>
|
</t-tabs>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
.container{
|
page{
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
|
}
|
||||||
|
.container{
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
padding-top: 20rpx;
|
||||||
}
|
}
|
||||||
.top{
|
.top{
|
||||||
margin: 30rpx auto;
|
margin: 0 auto 30rpx auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20rpx 20rpx;
|
padding: 20rpx 20rpx;
|
||||||
background-color: rgb(255, 255, 255);
|
background-color: rgb(255, 255, 255);
|
||||||
|
|||||||
270
Pages/yishi/wenzhen_v2/wenzhen.js
Normal file
270
Pages/yishi/wenzhen_v2/wenzhen.js
Normal 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);
|
||||||
|
}
|
||||||
|
})
|
||||||
13
Pages/yishi/wenzhen_v2/wenzhen.json
Normal file
13
Pages/yishi/wenzhen_v2/wenzhen.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
176
Pages/yishi/wenzhen_v2/wenzhen.wxml
Normal file
176
Pages/yishi/wenzhen_v2/wenzhen.wxml
Normal 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>
|
||||||
51
Pages/yishi/wenzhen_v2/wenzhen.wxss
Normal file
51
Pages/yishi/wenzhen_v2/wenzhen.wxss
Normal 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;
|
||||||
|
}
|
||||||
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
<van-cell-group border="{{ false }}">
|
<van-cell-group border="{{ false }}">
|
||||||
<van-cell
|
<van-cell
|
||||||
|
url="/Pages/yishi/manual/index"
|
||||||
title="多点执业认证流程"
|
title="多点执业认证流程"
|
||||||
border="{{ false }}"
|
border="{{ false }}"
|
||||||
value='查看操作手册'
|
value='查看操作手册'
|
||||||
|
|||||||
@ -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">
|
<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>
|
<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}}" />
|
<image wx:if="{{item.name === 'img'}}" class="emoji-icon" src="{{item.src}}" />
|
||||||
|
|||||||
@ -29,6 +29,24 @@
|
|||||||
border: 1rpx solid #1ACAD3;
|
border: 1rpx solid #1ACAD3;
|
||||||
border-style: none none solid solid
|
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 {
|
.message-body-span {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@ -16,6 +16,10 @@ Component({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
order_inquiry_id: {
|
||||||
|
type: String,
|
||||||
|
value: {},
|
||||||
|
},
|
||||||
hasCallKit: {
|
hasCallKit: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
value: false,
|
value: false,
|
||||||
@ -331,7 +335,7 @@ Component({
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case '10'://查看完整病历
|
case '10'://查看完整病历
|
||||||
app.go("/Pages/yishi/case/index")
|
app.go("/Pages/yishi/case/index?order_inquiry_id="+this.data.order_inquiry_id)
|
||||||
break;
|
break;
|
||||||
case '11'://在线开方
|
case '11'://在线开方
|
||||||
app.go("/Pages/yishi/onlinechufang/index")
|
app.go("/Pages/yishi/onlinechufang/index")
|
||||||
@ -488,11 +492,11 @@ Component({
|
|||||||
payload: {
|
payload: {
|
||||||
text,
|
text,
|
||||||
},
|
},
|
||||||
cloudCustomData: JSON.stringify({ messageFeature:
|
cloudCustomData: JSON.stringify({
|
||||||
{
|
order_inquiry_id: "AA",
|
||||||
needTyping: FEAT_NATIVE_CODE.FEAT_TYPING,
|
inquiry_type: "BB",
|
||||||
version: FEAT_NATIVE_CODE.NATIVE_VERSION,
|
message_type: 0,
|
||||||
},
|
is_system: 0
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -519,6 +523,7 @@ Component({
|
|||||||
|
|
||||||
// 发送正在输入状态消息
|
// 发送正在输入状态消息
|
||||||
sendTypingStatusMessage() {
|
sendTypingStatusMessage() {
|
||||||
|
|
||||||
const { BUSINESS_ID_TEXT, FEAT_NATIVE_CODE } = constant;
|
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" 表示输入结束
|
// 创建正在输入状态消息, "typingStatus":1,正在输入中1, 输入结束0, "version": 1 兼容老版本,userAction:0, // 14表示正在输入,actionParam:"EIMAMSG_InputStatus_Ing" //"EIMAMSG_InputStatus_Ing" 表示正在输入, "EIMAMSG_InputStatus_End" 表示输入结束
|
||||||
const typingMessage = wx.$TUIKit.createCustomMessage({
|
const typingMessage = wx.$TUIKit.createCustomMessage({
|
||||||
@ -668,9 +673,9 @@ Component({
|
|||||||
},
|
},
|
||||||
// 发送正在输入消息
|
// 发送正在输入消息
|
||||||
$sendTypingMessage(message) {
|
$sendTypingMessage(message) {
|
||||||
wx.$TUIKit.sendMessage(message, {
|
// wx.$TUIKit.sendMessage(message, {
|
||||||
onlineUserOnly: true,
|
// onlineUserOnly: true,
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
|
|
||||||
$sendTIMMessage(message) {
|
$sendTIMMessage(message) {
|
||||||
|
|||||||
@ -25,12 +25,12 @@
|
|||||||
<view class="TUI-sendMessage-btn" wx:if="{{ has_emoji }}">
|
<view class="TUI-sendMessage-btn" wx:if="{{ has_emoji }}">
|
||||||
<image class="TUI-icon" bindtap="handleEmoji" src="../../../../static/assets/face-emoji.svg" />
|
<image class="TUI-icon" bindtap="handleEmoji" src="../../../../static/assets/face-emoji.svg" />
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{!sendMessageBtn}}" bindtap="handleExtensions" class="TUI-sendMessage-btn">
|
<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" />
|
<image class="TUI-icon" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/chat/tianjia.png" />
|
||||||
</view>
|
</view>
|
||||||
<view wx:else class="TUI-sendMessage-btn" bindtap="sendTextMessage">
|
<view wx:else class="TUI-sendMessage-btn TUI-sendMessage-btn-input" bindtap="sendTextMessage">
|
||||||
发送
|
发送
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{displayFlag === 'emoji'}}" class="TUI-Emoji-area">
|
<view wx:if="{{displayFlag === 'emoji'}}" class="TUI-Emoji-area">
|
||||||
|
|||||||
@ -6,9 +6,9 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
padding-bottom: 16rpx;
|
padding-bottom: 16rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
width: calc(100vw - 38rpx);
|
width: 95vw;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
padding-left: 38rpx;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.TUI-commom-function {
|
.TUI-commom-function {
|
||||||
background-color: blueviolet;
|
background-color: blueviolet;
|
||||||
@ -37,25 +37,27 @@
|
|||||||
margin-left: 48rpx;
|
margin-left: 48rpx;
|
||||||
}
|
}
|
||||||
.TUI-message-input-functions {
|
.TUI-message-input-functions {
|
||||||
display: flex;
|
flex: 2;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.TUI-message-input-main {
|
.TUI-message-input-main {
|
||||||
height: 30px;
|
min-height: 78rpx;
|
||||||
background-color: #F1F1F1;
|
background-color: #F1F1F1;
|
||||||
flex: 1;
|
flex: 9;
|
||||||
margin: 0 10rpx;
|
margin: 0 10rpx;
|
||||||
padding: 0 5rpx;
|
padding: 0 5rpx;
|
||||||
border-radius: 5rpx;
|
border-radius: 10rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.TUI-message-input-main-focus {
|
.TUI-message-input-main-focus {
|
||||||
height: auto;
|
min-height: 78rpx;
|
||||||
background-color: #F1F1F1;
|
background-color: #F1F1F1;
|
||||||
flex: 1;
|
flex: 9;
|
||||||
margin: 0 10rpx;
|
margin: 0 10rpx;
|
||||||
padding: 0 5rpx;
|
padding: 0 5rpx;
|
||||||
border-radius: 5rpx;
|
border-radius: 10rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@ -66,6 +68,7 @@
|
|||||||
/* 最多显示10行 */
|
/* 最多显示10行 */
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
padding: 20rpx 20rpx;
|
||||||
}
|
}
|
||||||
.TUI-icon {
|
.TUI-icon {
|
||||||
width: 56rpx;
|
width: 56rpx;
|
||||||
@ -96,9 +99,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.TUI-sendMessage-btn {
|
.TUI-sendMessage-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0 10rpx;
|
width: 90%;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.TUI-sendMessage-btn-input{
|
||||||
|
background-color: #3CC7C0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.TUI-Emoji-area {
|
.TUI-Emoji-area {
|
||||||
|
|||||||
@ -208,6 +208,8 @@ Component({
|
|||||||
wx.$TUIKit.setMessageRead({ conversationID: this.data.conversation.conversationID }).then(() => {
|
wx.$TUIKit.setMessageRead({ conversationID: this.data.conversation.conversationID }).then(() => {
|
||||||
logger.log('| MessageList | setMessageRead | ok');
|
logger.log('| MessageList | setMessageRead | ok');
|
||||||
});
|
});
|
||||||
|
console.log('| MessageList | setMessageRead | ok');
|
||||||
|
console.log('message cloudCustomData:', message.cloudCustomData);
|
||||||
const { BUSINESS_ID_TEXT, MESSAGE_TYPE_TEXT } = constant;
|
const { BUSINESS_ID_TEXT, MESSAGE_TYPE_TEXT } = constant;
|
||||||
this.messageTimeForShow(message);
|
this.messageTimeForShow(message);
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@ -31,6 +31,10 @@ Component({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
order_inquiry_id: {
|
||||||
|
type: String,
|
||||||
|
value: ''
|
||||||
|
},
|
||||||
unreadCount: {
|
unreadCount: {
|
||||||
type: Number,
|
type: Number,
|
||||||
value: '',
|
value: '',
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="tui-navigatorbar">
|
<view class="tui-navigatorbar">
|
||||||
<image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_white.svg" />
|
<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>
|
||||||
<view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}} ">
|
<view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}} ">
|
||||||
<view wx:if="{{showTips}}" class="safetytips-box">
|
<view wx:if="{{showTips}}" class="safetytips-box">
|
||||||
@ -20,7 +20,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="input-area">
|
<view class="input-area">
|
||||||
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
|
<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>
|
bind:handleCall="handleCall" ></MessageInput>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -116,6 +116,7 @@ Component({
|
|||||||
},
|
},
|
||||||
getConversationList() {
|
getConversationList() {
|
||||||
wx.$TUIKit.getConversationList().then((imResponse) => {
|
wx.$TUIKit.getConversationList().then((imResponse) => {
|
||||||
|
console.log("imResponse.data.conversationList: ", imResponse.data.conversationList);
|
||||||
this.setData({
|
this.setData({
|
||||||
conversationList: imResponse.data.conversationList,
|
conversationList: imResponse.data.conversationList,
|
||||||
});
|
});
|
||||||
|
|||||||
112
app.js
112
app.js
@ -1,4 +1,7 @@
|
|||||||
import Aegis from './TUIKit/lib/aegis';
|
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({
|
App({
|
||||||
onLaunch: function (options) {
|
onLaunch: function (options) {
|
||||||
// 判断是否由分享进入小程序
|
// 判断是否由分享进入小程序
|
||||||
@ -17,29 +20,88 @@ App({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// console.log("download fonts from oss ");
|
console.log("download fonts from oss ");
|
||||||
// let loadStatus = false;
|
let loadStatus = false;
|
||||||
// if (!loadStatus) {
|
if (!loadStatus) {
|
||||||
// wx.loadFontFace({
|
wx.loadFontFace({
|
||||||
// global: true,
|
global: true,
|
||||||
// family: 'AlibabaPuHuiTi',
|
family: 'AlibabaPuHuiTi',
|
||||||
// source: 'url("https://oss.igandan.com/app/fonts/AlibabaPuHuiTi/STXINGKA.TTF")',
|
// 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")',
|
source: 'url("https://docwebsite.oss-cn-beijing.aliyuncs.com/app/fonts/AlibabaPuHuiTi/AlibabaPuHuiTi-2-65-Medium/AlibabaPuHuiTi-2-65-Medium.ttf")',
|
||||||
// success() {
|
success() {
|
||||||
// loadStatus = true;
|
loadStatus = true;
|
||||||
// console.log("download fonts from oss success");
|
console.log("download fonts from oss success");
|
||||||
// },
|
},
|
||||||
// fail(){
|
fail(){
|
||||||
// console.log("download fonts from oss error");
|
console.log("download fonts from oss error");
|
||||||
// },
|
},
|
||||||
// complete(){
|
complete(){
|
||||||
// console.log("download fonts from oss complete");
|
console.log("download fonts from oss complete");
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
this.aegisInit()
|
|
||||||
|
|
||||||
|
this.aegisInit()
|
||||||
console.warn("app.js wx.aegis: ", wx.aegis);
|
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() {
|
aegisInit() {
|
||||||
wx.aegis = new Aegis({
|
wx.aegis = new Aegis({
|
||||||
@ -53,7 +115,13 @@ App({
|
|||||||
share: false, // 分享默认为false
|
share: false, // 分享默认为false
|
||||||
height: 0,
|
height: 0,
|
||||||
login_url: "/Pages/login/index",
|
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){
|
go(url, ...params){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
|
|||||||
7
app.json
7
app.json
@ -48,7 +48,8 @@
|
|||||||
"Pages/login/index",
|
"Pages/login/index",
|
||||||
"Pages/mobile_login/index",
|
"Pages/mobile_login/index",
|
||||||
"Pages/yishi/manual_detail/index",
|
"Pages/yishi/manual_detail/index",
|
||||||
"Pages/yishi/addzhenduan/index"
|
"Pages/yishi/addzhenduan/index",
|
||||||
|
"Pages/yishi/wenzhen_v2/wenzhen"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
"navigationBarBackgroundColor": "#ffffff",
|
||||||
@ -81,8 +82,8 @@
|
|||||||
"selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png"
|
"selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "Pages/yishi/wenzhen/wenzhen",
|
"pagePath": "Pages/yishi/wenzhen_v2/wenzhen",
|
||||||
"text": "问诊(Y)",
|
"text": "问诊(Z)",
|
||||||
"iconPath": "/static/images/yishi/tabbar_icon/wenzhen.png",
|
"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"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// commpents/myprofile/index.js
|
// commpents/myprofile/index.js
|
||||||
import Toast from '@vant/weapp/toast/toast';
|
import Toast from '@vant/weapp/toast/toast';
|
||||||
import { API } from './../../utils/network/api'
|
import { API } from './../../utils/network/api'
|
||||||
|
import { FileUtil } from './../../utils/fileutil'
|
||||||
|
|
||||||
const api = new API()
|
const api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
@ -88,6 +89,13 @@ Component({
|
|||||||
iden_auth_status: 0,
|
iden_auth_status: 0,
|
||||||
iden_auth_disabled: 0,
|
iden_auth_disabled: 0,
|
||||||
iden_auth_status_txt: "未认证",
|
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: {
|
options: {
|
||||||
@ -97,6 +105,11 @@ Component({
|
|||||||
lifetimes: {
|
lifetimes: {
|
||||||
attached(){
|
attached(){
|
||||||
let _this = this;
|
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 => {
|
api.getDoctorAuthIden().then(response => {
|
||||||
console.log("getDoctorAuthIden: ",response);
|
console.log("getDoctorAuthIden: ",response);
|
||||||
@ -115,6 +128,13 @@ Component({
|
|||||||
select_yiyuan_id: response.data.hospital.hospital_id,
|
select_yiyuan_id: response.data.hospital.hospital_id,
|
||||||
hospital: response.data.hospital,
|
hospital: response.data.hospital,
|
||||||
iden_auth_status: response.data.iden_auth_status,
|
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;
|
let iden_auth_status = response.data.iden_auth_status;
|
||||||
console.log("iden_auth_status: ",iden_auth_status)
|
console.log("iden_auth_status: ",iden_auth_status)
|
||||||
@ -200,18 +220,24 @@ Component({
|
|||||||
let zhicheng_huixian = false;
|
let zhicheng_huixian = false;
|
||||||
let area_huixian = false;
|
let area_huixian = false;
|
||||||
//执行回显
|
//执行回显
|
||||||
|
let huixian_try_count = 0;
|
||||||
let data_replay = setInterval(() => {
|
let data_replay = setInterval(() => {
|
||||||
console.log("执行回显。。。")
|
try {
|
||||||
|
console.log("执行回显。。。", huixian_try_count);
|
||||||
|
|
||||||
//回显科室
|
//回显科室
|
||||||
if(_this.data.doctorauthiden_data_ready && _this.data.basicdepartment_data_ready){
|
if(_this.data.doctorauthiden_data_ready && _this.data.basicdepartment_data_ready){
|
||||||
let index = _this.data.keshi_columns.findIndex(item => {
|
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
|
return item.value == _this.data.select_keshi_id
|
||||||
})
|
})
|
||||||
_this.setData({
|
if(index){
|
||||||
select_keshi_index: index,
|
_this.setData({
|
||||||
keshi_note: _this.data.keshi_columns[index].text
|
select_keshi_index: index,
|
||||||
})
|
keshi_note: _this.data.keshi_columns[index].text
|
||||||
|
})
|
||||||
|
}
|
||||||
keshi_huixian = true;
|
keshi_huixian = true;
|
||||||
}
|
}
|
||||||
//回显职称
|
//回显职称
|
||||||
@ -283,16 +309,19 @@ Component({
|
|||||||
|
|
||||||
area_huixian = true;
|
area_huixian = true;
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
huixian_try_count = huixian_try_count + 1;
|
||||||
//都回显成功后,清除计时器
|
//都回显成功后,清除计时器
|
||||||
console.log("keshi_huixian: ", keshi_huixian)
|
console.log("keshi_huixian: ", keshi_huixian)
|
||||||
console.log("zhicheng_huixian: ", zhicheng_huixian)
|
console.log("zhicheng_huixian: ", zhicheng_huixian)
|
||||||
console.log("area_huixian: ", area_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);
|
clearInterval(data_replay);
|
||||||
}
|
}
|
||||||
console.log("计时器")
|
console.log("计时器");
|
||||||
}, 1000);
|
}, 100);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -558,12 +587,21 @@ Component({
|
|||||||
},
|
},
|
||||||
select_zhuanchang(e){
|
select_zhuanchang(e){
|
||||||
console.log(e);
|
console.log(e);
|
||||||
let expertise_name = e.currentTarget.dataset.expertise_name;
|
let count = 0
|
||||||
let expertise_id = e.currentTarget.dataset.expertise_id;
|
this.data.zhuanchang_columns.forEach(item => {
|
||||||
let is_selected = e.currentTarget.dataset.is_selected;
|
count = count + 1;
|
||||||
let index = e.currentTarget.dataset.index;
|
})
|
||||||
let data = "zhuanchang_columns["+index+"].is_selected";
|
if(count < 10){
|
||||||
this.setData({[data]: is_selected==1?0:1})
|
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){
|
zhuanchangConfirm(e){
|
||||||
this.setData({ zhuanchang_show: false });
|
this.setData({ zhuanchang_show: false });
|
||||||
@ -617,6 +655,80 @@ Component({
|
|||||||
})
|
})
|
||||||
|
|
||||||
}).catch(errors => {console.error(errors);})
|
}).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
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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>
|
<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">
|
<van-uploader bind:after-read="doUploadFile" data-scene="1" data-field_name="avatar" data-file_multiple="false">
|
||||||
<view class="right">
|
<view class="right">
|
||||||
@ -11,6 +11,13 @@
|
|||||||
</van-uploader>
|
</van-uploader>
|
||||||
</view>
|
</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="真人正脸" /> -->
|
||||||
<t-cell title="城市" hover required arrow note="{{ city_note }}" bindtap="onCityShow"/>
|
<t-cell title="城市" hover required arrow note="{{ city_note }}" bindtap="onCityShow"/>
|
||||||
|
|
||||||
@ -127,7 +134,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zhuanchang_box">
|
<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_name="{{data.expertise_name}}"
|
||||||
data-expertise_id="{{data.expertise_id}}"
|
data-expertise_id="{{data.expertise_id}}"
|
||||||
data-is_selected="{{data.is_selected}}"
|
data-is_selected="{{data.is_selected}}"
|
||||||
@ -160,9 +167,17 @@
|
|||||||
input-align="right"
|
input-align="right"
|
||||||
required
|
required
|
||||||
clearable
|
clearable
|
||||||
|
border="{{ department_custom_mobile_reason == '' }}"
|
||||||
custom-style="font-size:30rpx;"
|
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="zhuanchang" bindtap="onZhuanChangShow">
|
||||||
<view class="title">专长 <text class="required"> *</text></view>
|
<view class="title">专长 <text class="required"> *</text></view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@ -185,6 +200,7 @@
|
|||||||
bind:showNote="onshowJianJieNote"
|
bind:showNote="onshowJianJieNote"
|
||||||
textarea_cell_content_placeholder="您的从业经历,职称,所获荣誉等信息(10~1000字)"
|
textarea_cell_content_placeholder="您的从业经历,职称,所获荣誉等信息(10~1000字)"
|
||||||
textarea_val="{{textarea_jianjie}}"
|
textarea_val="{{textarea_jianjie}}"
|
||||||
|
has_error_content="{{ be_good_at_reason }}"
|
||||||
data-textarea_name="textarea_jianjie" bindTextAreaBlur="getTextAreaVal" />
|
data-textarea_name="textarea_jianjie" bindTextAreaBlur="getTextAreaVal" />
|
||||||
|
|
||||||
<m-textarea-cell
|
<m-textarea-cell
|
||||||
@ -192,6 +208,7 @@
|
|||||||
t_icon_name="view-module"
|
t_icon_name="view-module"
|
||||||
bind:showNote="onshowShanChangNote"
|
bind:showNote="onshowShanChangNote"
|
||||||
textarea_val="{{textarea_shanchang}}"
|
textarea_val="{{textarea_shanchang}}"
|
||||||
|
has_error_content="{{ brief_introduction_reason }}"
|
||||||
textarea_cell_content_placeholder="您的专业领域、擅长疾病、研究方法等信息(10~1000字)"
|
textarea_cell_content_placeholder="您的专业领域、擅长疾病、研究方法等信息(10~1000字)"
|
||||||
textarea_cell_note="查看示例" data-textarea_name="textarea_shanchang" bindTextAreaBlur="getTextAreaVal" />
|
textarea_cell_note="查看示例" data-textarea_name="textarea_shanchang" bindTextAreaBlur="getTextAreaVal" />
|
||||||
|
|
||||||
@ -208,6 +225,7 @@
|
|||||||
bindDeleteFile="doDeleteFile"
|
bindDeleteFile="doDeleteFile"
|
||||||
upload_cell_desc="请提供清晰的职业证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名、执业范围、最新执业医院,最少上传2张。"
|
upload_cell_desc="请提供清晰的职业证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名、执业范围、最新执业医院,最少上传2张。"
|
||||||
upload_cell_note="查看示例"
|
upload_cell_note="查看示例"
|
||||||
|
has_error_content="{{ license_cert_reason }}"
|
||||||
wx:if="{{indentity}}"
|
wx:if="{{indentity}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -224,6 +242,7 @@
|
|||||||
bind:showNote="onshowZiGeNote"
|
bind:showNote="onshowZiGeNote"
|
||||||
upload_cell_desc="请提供清晰的资格证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名、职称等,最少上传1张。"
|
upload_cell_desc="请提供清晰的资格证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名、职称等,最少上传1张。"
|
||||||
upload_cell_note="查看示例"
|
upload_cell_note="查看示例"
|
||||||
|
has_error_content="{{ qualification_cert_reason }}"
|
||||||
wx:if="{{indentity}}"
|
wx:if="{{indentity}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -240,6 +259,7 @@
|
|||||||
bindDeleteFile="doDeleteFile"
|
bindDeleteFile="doDeleteFile"
|
||||||
upload_cell_desc="请提供清晰的职称证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名等,最少上传1张。"
|
upload_cell_desc="请提供清晰的职称证书原件照片,需包含证书编码、加盖钢印的证书照片、姓名等,最少上传1张。"
|
||||||
upload_cell_note="查看示例"
|
upload_cell_note="查看示例"
|
||||||
|
has_error_content="{{ work_cert_reason }}"
|
||||||
wx:if="{{indentity}}"
|
wx:if="{{indentity}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@ -3,25 +3,15 @@
|
|||||||
}
|
}
|
||||||
.photo{
|
.photo{
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 32rpx;
|
padding: 32rpx 32rpx 32rpx 0;
|
||||||
|
margin-left: 32rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
align-items: center;
|
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{
|
.title{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #1C2023;
|
color: #1C2023;
|
||||||
@ -188,3 +178,38 @@
|
|||||||
.zhuanchang_btn--confirm {
|
.zhuanchang_btn--confirm {
|
||||||
color: #3cc7c0;
|
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;
|
||||||
|
}
|
||||||
@ -31,7 +31,11 @@ Component({
|
|||||||
textarea_val: {
|
textarea_val: {
|
||||||
type: String,
|
type: String,
|
||||||
value: '',
|
value: '',
|
||||||
}
|
},
|
||||||
|
has_error_content: {
|
||||||
|
type: String,
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -9,4 +9,8 @@
|
|||||||
<view class="textarea-cell-content">
|
<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>
|
<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>
|
||||||
|
<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>
|
||||||
@ -44,3 +44,33 @@
|
|||||||
.textarea-cell-name{
|
.textarea-cell-name{
|
||||||
font-size: 30rpx;
|
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;
|
||||||
|
}
|
||||||
@ -28,9 +28,9 @@ Component({
|
|||||||
type: String,
|
type: String,
|
||||||
value: '32rpx',
|
value: '32rpx',
|
||||||
},
|
},
|
||||||
has_error: {
|
has_error_content: {
|
||||||
type: Boolean,
|
type: String,
|
||||||
value: false,
|
value: "",
|
||||||
},
|
},
|
||||||
fileList:{
|
fileList:{
|
||||||
type: Array,
|
type: Array,
|
||||||
|
|||||||
@ -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-image width="100" height="100" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/upload_button.png" />
|
||||||
</van-uploader>
|
</van-uploader>
|
||||||
</view>
|
</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" />
|
<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>
|
</view>
|
||||||
@ -4,6 +4,10 @@ Component({
|
|||||||
* 组件的属性列表
|
* 组件的属性列表
|
||||||
*/
|
*/
|
||||||
properties: {
|
properties: {
|
||||||
|
from_account: {
|
||||||
|
type: String,
|
||||||
|
value: '10000',
|
||||||
|
},
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
value: '张三三',
|
value: '张三三',
|
||||||
@ -23,6 +27,11 @@ Component({
|
|||||||
desc: {
|
desc: {
|
||||||
type: String,
|
type: String,
|
||||||
value: '这是示例备注desc',
|
value: '这是示例备注desc',
|
||||||
|
observer(desc) {
|
||||||
|
this.setData({
|
||||||
|
desc: desc,
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
status_text: {
|
status_text: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -35,10 +44,23 @@ Component({
|
|||||||
status_class: {
|
status_class: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
order_inquiry_id: {
|
||||||
|
type: String,
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
note: {
|
note: {
|
||||||
type: String,
|
type: String,
|
||||||
value: '不接诊24小时后自动取消',
|
value: '不接诊24小时后自动取消',
|
||||||
},
|
},
|
||||||
|
message_dot:{
|
||||||
|
type: Boolean,
|
||||||
|
value: false,
|
||||||
|
observer(dot) {
|
||||||
|
this.setData({
|
||||||
|
message_dot: dot,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -54,20 +76,14 @@ Component({
|
|||||||
methods: {
|
methods: {
|
||||||
go(e){
|
go(e){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: e.currentTarget.dataset.url,
|
url: e.currentTarget.dataset.url
|
||||||
events: {
|
})
|
||||||
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
|
},
|
||||||
acceptDataFromOpenedPage: function(data) {
|
goChat(e){
|
||||||
console.log(data)
|
let from_account = e.currentTarget.dataset.from_account;
|
||||||
},
|
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||||
someEvent: function(data) {
|
wx.navigateTo({
|
||||||
console.log(data)
|
url: e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id
|
||||||
}
|
|
||||||
},
|
|
||||||
success: function(res) {
|
|
||||||
// 通过 eventChannel 向被打开页面传送数据
|
|
||||||
res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tabShow(){
|
tabShow(){
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
"component": true,
|
"component": true,
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"van-button": "@vant/weapp/button/index",
|
"van-button": "@vant/weapp/button/index",
|
||||||
"van-popup": "@vant/weapp/popup/index"
|
"van-popup": "@vant/weapp/popup/index",
|
||||||
|
"t-badge": "tdesign-miniprogram/badge/badge"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,20 +1,24 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="content_1">
|
<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 class="date"> {{date}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content_2">{{desc}}</view>
|
<view class="content_2">{{desc}}</view>
|
||||||
<view class="content_3">
|
<view class="content_3">
|
||||||
<view class="status {{ status_class }}">{{status_text}}</view>
|
<view class="status {{ status_class }}">{{ status_text }}</view>
|
||||||
<view class="btn" wx:if="{{ status == 0 }}">
|
<view class="btn" wx:if="{{ status == 3 }}">
|
||||||
<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 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;" 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>
|
||||||
<view class="btn" wx:if="{{ status == 1 }}">
|
<view class="btn" wx:if="{{ status >= 4 }}">
|
||||||
<van-button plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
<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>
|
</view>
|
||||||
<view class="content_4" wx:if="{{ status == 0 }}">{{note}}</view>
|
<view class="content_4" wx:if="{{ status == 3 }}">{{note}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<van-popup show="{{ show }}" bind:close="onClose" round>
|
<van-popup show="{{ show }}" bind:close="onClose" round>
|
||||||
@ -22,8 +26,8 @@
|
|||||||
<view class="pop_title">温馨提示</view>
|
<view class="pop_title">温馨提示</view>
|
||||||
<view class="pop_note">为保障服务质量,请您查看患者病历信息在选择是否接诊。</view>
|
<view class="pop_note">为保障服务质量,请您查看患者病历信息在选择是否接诊。</view>
|
||||||
<view class="pop_btn">
|
<view class="pop_btn">
|
||||||
<view class="pop_btn_left" bindtap="go" data-url="/Pages/yishi/case/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="go" data-url="/Pages/yishi/chat/index" >去接诊</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>
|
||||||
</view>
|
</view>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
.content_1,.content_3,.content_2{
|
.content_1,.content_3,.content_2{
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -39,8 +39,7 @@
|
|||||||
.btn{
|
.btn{
|
||||||
flex: 2;
|
flex: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: flex-end;
|
||||||
|
|
||||||
}
|
}
|
||||||
.content_4{
|
.content_4{
|
||||||
flex: 5;
|
flex: 5;
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
// custom-tab-bar/index.js
|
// custom-tab-bar/index.js
|
||||||
|
const app = getApp()
|
||||||
Component({
|
Component({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,55 +11,77 @@ Component({
|
|||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#ffffff",
|
||||||
"selectedColor": "#fff",
|
"selectedColor": "#fff",
|
||||||
"listAll": {
|
"listAll": {
|
||||||
"list2":[
|
"list1":[
|
||||||
{
|
{
|
||||||
"pagePath": "/Pages/yaoshi/home/home",
|
"pagePath": "/Pages/yaoshi/home/home",
|
||||||
"text": "首页",
|
"text": "首页",
|
||||||
"iconPath": "/static/images/yaoshi/tabbar_icon/home.png",
|
"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",
|
"pagePath": "/Pages/yaoshi/my/my",
|
||||||
"text": "我的",
|
"text": "我的",
|
||||||
"iconPath": "/static/images/yaoshi/tabbar_icon/my.png",
|
"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",
|
"pagePath": "/Pages/yishi/index/index",
|
||||||
"text": "首页(Y)",
|
"text": "首页(Y)",
|
||||||
"iconPath": "/static/images/yishi/tabbar_icon/index.png",
|
"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",
|
"pagePath": "/Pages/yishi/wenzhen_v2/wenzhen",
|
||||||
"text": "问诊(Y)",
|
"text": "问诊(Z)",
|
||||||
"iconPath": "/static/images/yishi/tabbar_icon/wenzhen.png",
|
"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",
|
"pagePath": "/Pages/yishi/my/index",
|
||||||
"text": "我的(Y)",
|
"text": "我的(Y)",
|
||||||
"iconPath": "/static/images/yishi/tabbar_icon/my.png",
|
"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: [ ],
|
items: [ ],
|
||||||
dialog_visible: false,
|
dialog_visible: false,
|
||||||
dialog_content: ""
|
dialog_content: "",
|
||||||
|
usertype: "",
|
||||||
|
index_info: "",
|
||||||
|
wenzhen_info: "",
|
||||||
|
my_info: "",
|
||||||
},
|
},
|
||||||
attached() {
|
attached() {
|
||||||
const usertype = wx.getStorageSync('usertype')
|
const usertype = wx.getStorageSync('usertype')
|
||||||
console.log("usertype: " ,usertype);
|
console.log("usertype: " ,usertype);
|
||||||
if (usertype == 2) {
|
if (usertype == 2) {
|
||||||
this.setData({
|
this.setData({
|
||||||
items: this.data.listAll.list1
|
usertype: usertype,
|
||||||
|
items: this.data.listAll.list2
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.setData({
|
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: {
|
methods: {
|
||||||
// swichNav: function (e) {
|
// swichNav: function (e) {
|
||||||
@ -83,7 +106,8 @@ Component({
|
|||||||
// })
|
// })
|
||||||
console.log("custom tab bar onChange");
|
console.log("custom tab bar onChange");
|
||||||
// return;
|
// return;
|
||||||
let url = this.data.items[e.detail].pagePath
|
let url = this.data.items[e.detail].pagePath;
|
||||||
|
console.log(url);
|
||||||
wx.switchTab({
|
wx.switchTab({
|
||||||
url: url,
|
url: url,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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">
|
<van-tabbar active="{{ active }}" bind:change="onChange"
|
||||||
<text class="tab-text" wx:for-index="idx" data-current="{{idx}}" src="{{currentTab == idx ? item.selectedIconPath : item.iconPath }}">{{item.text}}</text>
|
active-color="#3CC7C0" inactive-color="#999999" wx:if="{{usertype == 2}}" >
|
||||||
<image class="iconPath" wx:for-index="idx" data-current="{{idx}}" src="{{currentTab == idx ? item.selectedIconPath : item.iconPath }}"></image>
|
|
||||||
</view>
|
<van-tabbar-item info="{{index_info}}" data-url="{{listAll.list2[0].pagePath}}" url="{{listAll.list2[0].pagePath}}">
|
||||||
</view> -->
|
|
||||||
<van-tabbar active="{{ active }}" bind:change="onChange">
|
|
||||||
<van-tabbar-item info="3" data-url="{{item.pagePath}}" url="{{item.pagePath}}" wx:for="{{items}}">
|
|
||||||
<image
|
<image
|
||||||
slot="icon"
|
slot="icon"
|
||||||
src="{{ item.iconPath }}"
|
src="{{ listAll.list2[0].iconPath }}"
|
||||||
data-url="{{ item.pagePath }}"
|
data-url="{{ listAll.list2[0].pagePath }}"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
style="width: 30px; height: 18px;"
|
style="width: 30px; height: 18px;"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
slot="icon-active"
|
slot="icon-active"
|
||||||
src="{{ item.selectedIconPath }}"
|
src="{{ listAll.list2[0].selectedIconPath }}"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
style="width: 30px; height: 18px;"
|
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-item>
|
||||||
</van-tabbar>
|
</van-tabbar>
|
||||||
<t-dialog
|
<t-dialog
|
||||||
|
|||||||
@ -434,6 +434,36 @@ class API extends HTTP {
|
|||||||
...params
|
...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
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,6 +47,9 @@ class HTTP {
|
|||||||
} else {
|
} else {
|
||||||
reject(res.data.message)
|
reject(res.data.message)
|
||||||
this._show_error(res.data.message)
|
this._show_error(res.data.message)
|
||||||
|
wx.navigateTo({
|
||||||
|
url: "/Pages/index/index"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
@ -68,6 +71,7 @@ class HTTP {
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,17 @@ const formatTime = date => {
|
|||||||
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
|
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 getDateArr = date => {
|
||||||
const year = date.getFullYear()
|
const year = date.getFullYear()
|
||||||
const month = date.getMonth() + 1
|
const month = date.getMonth() + 1
|
||||||
@ -25,8 +36,37 @@ const formatNumber = n => {
|
|||||||
return n[1] ? n : `0${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 = {
|
module.exports = {
|
||||||
formatTime,
|
formatTime,
|
||||||
getDateArr,
|
getDateArr,
|
||||||
formatNumber,
|
formatNumber,
|
||||||
|
getTimeAgo,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user