优化
This commit is contained in:
parent
e7be139b04
commit
97a504c6d2
@ -39,7 +39,9 @@ Page({
|
||||
guideTo(usertype){
|
||||
let url;
|
||||
if(usertype == 2){
|
||||
if(!wx.$TUIKit){
|
||||
app.imInit();
|
||||
}
|
||||
url = "/Pages/yishi/index/index";
|
||||
}else{
|
||||
app.imLogout();
|
||||
|
||||
@ -23,7 +23,11 @@
|
||||
wx:else
|
||||
bindtap="getPhoneNumber"
|
||||
color="#09BB07" custom-style="font-size: 36rpx;" type="primary" round block>微信授权手机号登录</van-button>
|
||||
<van-checkbox value="{{ checked }}" bind:change="onChange">我已阅读并同意协议<text style="color: #4384FE;">《肝胆相照用户服务协议》</text></van-checkbox>
|
||||
|
||||
<view style="display: flex;">
|
||||
<van-checkbox value="{{ checked }}" bind:change="onChange">我已阅读并同意协议</van-checkbox>
|
||||
<view style="color: #4384FE;flex: 1;" bindtap="go" data-url="/Pages/yishi/agreement_detail/index?agreement_id=10">《肝胆相照用户服务协议》</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom">
|
||||
|
||||
30
Pages/yishi/agreement_detail/index.js
Normal file
30
Pages/yishi/agreement_detail/index.js
Normal file
@ -0,0 +1,30 @@
|
||||
import { API } from './../../../utils/network/api'
|
||||
let api = new API()
|
||||
Page({
|
||||
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '协议详情', //导航栏 中间的标题
|
||||
},
|
||||
agreement_id: "",
|
||||
agreement_content: ""
|
||||
},
|
||||
|
||||
onLoad(option){
|
||||
this.setData({
|
||||
agreement_id: option.agreement_id
|
||||
})
|
||||
},
|
||||
|
||||
onShow(){
|
||||
//获取医生我的账户数据
|
||||
api.getBasicAgreement({agreement_id: this.data.agreement_id}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
agreement_content: response.data.agreement_content,
|
||||
"navbarData.title": response.data.agreement_name,
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}
|
||||
})
|
||||
6
Pages/yishi/agreement_detail/index.json
Normal file
6
Pages/yishi/agreement_detail/index.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar"
|
||||
}
|
||||
}
|
||||
5
Pages/yishi/agreement_detail/index.wxml
Normal file
5
Pages/yishi/agreement_detail/index.wxml
Normal file
@ -0,0 +1,5 @@
|
||||
<!-- 协议详情 -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<rich-text nodes="{{agreement_content}}" space="nbsp"></rich-text>
|
||||
</view>
|
||||
8
Pages/yishi/agreement_detail/index.wxss
Normal file
8
Pages/yishi/agreement_detail/index.wxss
Normal file
@ -0,0 +1,8 @@
|
||||
/* Pages/yishi/manual_detail/index.wxss */
|
||||
page{
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
.container{
|
||||
width: 92vw;
|
||||
margin: 20rpx auto;
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
<wxs module="dateSubstr" src="/utils/substr.wxs"></wxs>
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
|
||||
@ -17,7 +18,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">{{item.content}}</view>
|
||||
<view class="date">{{item.created_at}}</view>
|
||||
<view class="date">{{dateSubstr.substring(item.created_at,0,16)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{appraise_list_1.length == 0}}" />
|
||||
@ -33,7 +34,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">{{item.content}}</view>
|
||||
<view class="date">{{item.created_at}}</view>
|
||||
<view class="date">{{dateSubstr.substring(item.created_at,0,16)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{appraise_list_2.length == 0}}" />
|
||||
@ -49,7 +50,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">{{item.content}}</view>
|
||||
<view class="date">{{item.created_at}}</view>
|
||||
<view class="date">{{dateSubstr.substring(item.created_at,0,16)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{appraise_list_3.length == 0}}" />
|
||||
|
||||
@ -11,7 +11,7 @@ Page({
|
||||
height: app.globalData.height,
|
||||
bank_card_id: "",
|
||||
bank_icon_path: "https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/bankcard/js_icon.png",
|
||||
realname: "默认姓名",
|
||||
bank_card_name: "默认姓名",
|
||||
bank_name : "xx银行",
|
||||
bank_card_code_mask: "888 xxxx xxxx 888",
|
||||
withdrawal_amount: "xxxx",
|
||||
@ -34,6 +34,10 @@ Page({
|
||||
},
|
||||
onShow(){
|
||||
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
app.go(url);
|
||||
},
|
||||
contactKeFu(e){
|
||||
let _this = this;
|
||||
@ -63,6 +67,7 @@ Page({
|
||||
bank_card_code_mask: response.data.bank.bank_card_code_mask,
|
||||
withdrawal_amount: response.data.withdrawal_amount,
|
||||
order_inquiry_ids: response.data.order_inquiry_ids,
|
||||
bank_card_name: response.data.bank.bank_card_name_mask,
|
||||
income_tax: response.data.income_tax,
|
||||
skeleton_loading: false
|
||||
})
|
||||
|
||||
@ -3,14 +3,14 @@
|
||||
<view class="container">
|
||||
<view class="top">
|
||||
<view class="txt_title">结算银行卡</view>
|
||||
<view class="rule">提现规则<van-icon name="warning-o" color="#FF9800" /></view>
|
||||
<view class="rule" bindtap="go" data-url="/Pages/yishi/agreement_detail/index?agreement_id=12">提现规则<van-icon name="warning-o" color="#FF9800" /></view>
|
||||
</view>
|
||||
<view class="bankcard" wx:if="{{!skeleton_loading}}">
|
||||
<view class="bankcard_icon">
|
||||
<van-image custom-style="" src="{{bank_icon_path}}" fit="heightFix" height="50rpx" aria-label="role" />
|
||||
</view>
|
||||
<view class="bankcard_info">
|
||||
<view class="bankcard_info_top">{{realname}}<text style="margin-left: 20rpx; font-size: 28rpx;color: #999999;">{{bank_name}}</text></view>
|
||||
<view class="bankcard_info_top">{{bank_card_name}}<text style="margin-left: 20rpx; font-size: 28rpx;color: #999999;">{{bank_name}}</text></view>
|
||||
<view class="bankcard_info_bottom">{{bank_card_code_mask}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -15,14 +15,22 @@ Page({
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
dateVisible: false,
|
||||
select_date: '2023',
|
||||
years: [
|
||||
{ label: '2022年', value: '2022' },
|
||||
{ label: '2023年', value: '2023' },
|
||||
{ label: '2024年', value: '2024' },
|
||||
],
|
||||
select_date: '',
|
||||
years: [],
|
||||
},
|
||||
onLoad(){
|
||||
let now_year = (new Date()).Format("yyyy");
|
||||
let begin_year = 2022;
|
||||
let years = [];
|
||||
for(let i=begin_year;i<=now_year;i++){
|
||||
years.push({label: i+"年", value: i+""})
|
||||
}
|
||||
this.setData({
|
||||
years: years,
|
||||
select_date: now_year+""
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
let year = this.data.select_date;
|
||||
year = Number(year);
|
||||
this.getDoctorWithdrawalRecord(year);
|
||||
|
||||
@ -33,6 +33,7 @@ Page({
|
||||
default_dialog_show: false,//只弹框一次
|
||||
dialog_visible: false,
|
||||
dialog_content: "请您先完成实名认证",
|
||||
dialog_url: "",
|
||||
/*
|
||||
case_module取值
|
||||
新问诊 0
|
||||
@ -57,27 +58,32 @@ Page({
|
||||
{
|
||||
case_status: 0,
|
||||
case_module: [0,1,2,3,4,5,6,7,8],
|
||||
case_text: "请您先完成实名认证"
|
||||
case_text: "请您先完成实名认证",
|
||||
case_url: "/Pages/yishi/identity/index"
|
||||
},
|
||||
{
|
||||
case_status: 1,
|
||||
case_module: [0,1,2,3,4,5,6,7,8],
|
||||
case_text: "请您先医师身份认证"
|
||||
case_text: "请您先医师身份认证",
|
||||
case_url: "/Pages/yishi/identity/index?selected_tab=1"
|
||||
},
|
||||
{
|
||||
case_status: 2,
|
||||
case_module: [0,1,2,3,4,5,6,7,8],
|
||||
case_text: "请您先绑定结算银行卡"
|
||||
case_text: "请您先绑定结算银行卡",
|
||||
case_url: "/Pages/yishi/bankcard/index"
|
||||
},
|
||||
{
|
||||
case_status: 3,
|
||||
case_module: [7],
|
||||
case_text: "请您先进行多点执业认证"
|
||||
case_text: "请您先进行多点执业认证",
|
||||
case_url: "/Pages/yishi/zhiye_identity/index"
|
||||
},
|
||||
{
|
||||
case_status: 4,
|
||||
case_module: [7],
|
||||
case_text: "请您先进行多点执业认证"
|
||||
case_text: "请您先进行多点执业认证",
|
||||
case_url: "/Pages/yishi/zhiye_identity/index"
|
||||
},
|
||||
{
|
||||
case_status: 5,
|
||||
@ -147,6 +153,8 @@ Page({
|
||||
})
|
||||
wx.setStorageSync('overlay_show', "1")
|
||||
}
|
||||
|
||||
app.go("/Pages/yishi/manual_detail/index?manual_id=1")
|
||||
},
|
||||
cancelJieSuanDialog(){
|
||||
this.setData({
|
||||
@ -208,6 +216,12 @@ Page({
|
||||
return
|
||||
},
|
||||
onShow: function () {
|
||||
|
||||
//初始化默认值
|
||||
this.setData({
|
||||
skeleton_loading: true,
|
||||
});
|
||||
|
||||
wx.onCopyUrl(this.Copylistener);
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
@ -366,11 +380,14 @@ Page({
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url);
|
||||
},
|
||||
confirmDialog(){
|
||||
confirmDialog(e){
|
||||
console.log(e)
|
||||
let url = e.currentTarget.dataset.url;
|
||||
console.log("confirmDialog: ", url)
|
||||
this.setData({
|
||||
dialog_visible: false
|
||||
})
|
||||
app.go(this.data.shiming_status_url);
|
||||
app.go(url);
|
||||
},
|
||||
cancelDialog(){
|
||||
this.setData({
|
||||
@ -409,6 +426,7 @@ Page({
|
||||
this.setData({
|
||||
dialog_content: "请您先完成实名认证",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_url: "/Pages/yishi/identity/index",
|
||||
default_dialog_show: true
|
||||
});
|
||||
return false;
|
||||
@ -424,6 +442,7 @@ Page({
|
||||
"info.info_shiming_status_txt": "认证失败",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_url: "/Pages/yishi/identity/index",
|
||||
dialog_content: "实名认证失败",
|
||||
default_dialog_show: true
|
||||
});
|
||||
@ -440,6 +459,7 @@ Page({
|
||||
"info.info_shiming_status_txt": "前往医师身份认证",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index?selected_tab=1",
|
||||
dialog_url: "/Pages/yishi/identity/index?selected_tab=1",
|
||||
dialog_content: "请您先医师身份认证",
|
||||
default_dialog_show: true
|
||||
});
|
||||
@ -455,6 +475,7 @@ Page({
|
||||
"info.info_shiming_status_txt": "审核中",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index?selected_tab=1",
|
||||
dialog_url: "/Pages/yishi/identity/index?selected_tab=1",
|
||||
// dialog_content: "您的医师身份认证正在审核中",
|
||||
// default_dialog_show: true
|
||||
});
|
||||
@ -470,6 +491,7 @@ Page({
|
||||
"info.info_shiming_status_txt": "认证失败",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index?selected_tab=1",
|
||||
dialog_url: "/Pages/yishi/identity/index?selected_tab=1",
|
||||
dialog_content: "您的医师身份认证失败",
|
||||
// default_dialog_show: true
|
||||
});
|
||||
@ -487,6 +509,7 @@ Page({
|
||||
"info.info_shiming_status_txt": "绑定结算银行卡",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/bankcard/index",
|
||||
dialog_url: "/Pages/yishi/bankcard/index",
|
||||
dialog_content: "请您先绑定结算银行卡",
|
||||
default_dialog_show: true
|
||||
});
|
||||
@ -505,7 +528,7 @@ Page({
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "请您先进行多点执业认证",
|
||||
default_dialog_show: true
|
||||
// default_dialog_show: true
|
||||
});
|
||||
// return false;
|
||||
}
|
||||
@ -521,7 +544,7 @@ Page({
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "您的多点执业认证正在审核中",
|
||||
default_dialog_show: true
|
||||
// default_dialog_show: true
|
||||
});
|
||||
// return false;
|
||||
}
|
||||
@ -537,11 +560,19 @@ Page({
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "您的多点执业认证失败",
|
||||
default_dialog_show: true
|
||||
// default_dialog_show: true
|
||||
});
|
||||
// return false;
|
||||
}
|
||||
|
||||
const jiesuan_dialog_show = wx.getStorageSync('jiesuan_dialog_show');
|
||||
if(!jiesuan_dialog_show){
|
||||
this.setData({
|
||||
jiesuan_dialog_visible: true,
|
||||
});
|
||||
wx.setStorageSync('jiesuan_dialog_show', true);
|
||||
}
|
||||
|
||||
if((is_img_expert_reception + is_img_quick_reception + is_img_welfare_reception) == 0){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
@ -552,7 +583,6 @@ Page({
|
||||
"info.info_shiming_status_txt": "开启在线问诊",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/onlinesetup/index",
|
||||
dialog_content: "您的多点执业认证失败",
|
||||
// default_dialog_show: true
|
||||
});
|
||||
return false;
|
||||
@ -568,7 +598,6 @@ Page({
|
||||
"info.info_shiming_status_txt": "去接诊",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/wenzhen_v2/wenzhen",
|
||||
dialog_content: "您的多点执业认证失败",
|
||||
// default_dialog_show: true
|
||||
});
|
||||
return false;
|
||||
@ -594,12 +623,7 @@ Page({
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if(!app.globalData.jiesuan_dialog_show){
|
||||
this.setData({
|
||||
jiesuan_dialog_visible: true,
|
||||
});
|
||||
app.globalData.jiesuan_dialog_show = true
|
||||
}
|
||||
|
||||
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "去接诊",
|
||||
@ -688,7 +712,8 @@ Page({
|
||||
if(now_moudle != undefined){
|
||||
this.setData({
|
||||
dialog_content: now_case.case_text,
|
||||
dialog_visible: true
|
||||
dialog_visible: true,
|
||||
dialog_url: now_case.case_url
|
||||
});
|
||||
retult = false;
|
||||
return;
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
</view>
|
||||
<view class="info_shiming" bindtap="go" data-url="{{shiming_status_url}}" wx:if="{{!skeleton_loading}}">
|
||||
<view class="info_shiming_status {{info.info_shiming_status}}" wx:if="{{!skeleton_loading}}">{{info.info_shiming_status_txt}}</view>
|
||||
<t-skeleton theme="text" row-col="{{[1]}}" animation="gradient" loading="{{skeleton_loading}}" />
|
||||
<t-skeleton theme="text" row-col="{{[{ width: '50rpx' }]}}" animation="gradient" loading="{{skeleton_loading}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="info_wenzhen">
|
||||
@ -181,7 +181,7 @@
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelDialog">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmDialog">
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="confirmDialog" data-url="{{dialog_url}}">
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
@ -189,7 +189,7 @@
|
||||
<t-dialog
|
||||
visible="{{ jiesuan_dialog_visible }}"
|
||||
title="温馨提示"
|
||||
content="您是否了解费用结算规则?"
|
||||
content="快速了解在线问诊、公益问诊和快速问诊"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelJieSuanDialog">
|
||||
已了解
|
||||
|
||||
@ -18,7 +18,7 @@ Page({
|
||||
},
|
||||
|
||||
onShow(){
|
||||
//获取医生我的账户数据
|
||||
//获取操作手册详情
|
||||
api.getBasicOperationManualID({manual_id: this.data.manual_id}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
|
||||
@ -17,10 +17,7 @@ Page({
|
||||
amount_total_month: "",
|
||||
withdrawal_amount_month: "",
|
||||
bill: [],
|
||||
years: [
|
||||
{ label: '2023年', value: '2023' },
|
||||
{ label: '2024年', value: '2024' },
|
||||
],
|
||||
years: [],
|
||||
seasons: [
|
||||
{ label: '1月', value: '1' },
|
||||
{ label: '2月', value: '2' },
|
||||
@ -36,6 +33,17 @@ Page({
|
||||
{ label: '12月', value: '12' },
|
||||
]
|
||||
},
|
||||
onLoad(){
|
||||
let now_year = (new Date()).Format("yyyy");
|
||||
let begin_year = 2022;
|
||||
let years = [];
|
||||
for(let i=begin_year;i<=now_year;i++){
|
||||
years.push({label: i+"年", value: i+""})
|
||||
}
|
||||
this.setData({
|
||||
years: years
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
let now_date = new Date();
|
||||
let now_datearr = util.getDateArr(now_date);
|
||||
@ -108,5 +116,9 @@ Page({
|
||||
let date = this.data.dateValue[0]+"-"+md;
|
||||
console.log(date);
|
||||
app.go(url+"?date="+date);
|
||||
}
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
app.go(url);
|
||||
},
|
||||
})
|
||||
@ -23,7 +23,7 @@
|
||||
<van-empty description="暂无账单" wx:if="{{ bill.length == 0 }}" />
|
||||
</view>
|
||||
|
||||
<van-image style="position: fixed; right: 0;bottom: 262rpx;" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/account_rule.png" fit="heightFix" height="84rpx" aria-label="role" />
|
||||
<van-image bind:click="go" data-url="/Pages/yishi/agreement_detail/index?agreement_id=13" style="position: fixed; right: 0;bottom: 262rpx;" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/account_rule.png" fit="heightFix" height="84rpx" aria-label="role" />
|
||||
|
||||
<t-picker
|
||||
visible="{{dateVisible}}"
|
||||
|
||||
@ -15,14 +15,14 @@
|
||||
</view>
|
||||
<view class="qrcode">
|
||||
<van-image bindtap="showVisible" src="{{info.qr_code_url}}" fit="heightFix" width="150" height="150" aria-label="qrcode" />
|
||||
<text>微信长按或扫描二维码查看我的更多信息</text>
|
||||
<text>让您的患者微信扫码,线上复诊更便捷</text>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="block" wx:if="{{painter_ready}}">
|
||||
<view class="header">
|
||||
<view class="title">分享我的名片到</view>
|
||||
<!-- <view class="title">分享我的名片到</view> -->
|
||||
</view>
|
||||
<view class="imgbox">
|
||||
<!-- <view class="imgbox_item">
|
||||
@ -41,7 +41,7 @@
|
||||
<!-- <t-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/wx.png" mode="heightFix" width="90rpx" height="90rpx" aria-label="qrcode" /> -->
|
||||
<t-icon color="#fff" name="download" size="24" data-name="download" class="t_icon" />
|
||||
<text class="imgbox_item_txt">
|
||||
保存至相册
|
||||
保存到相册,分享到朋友圈
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<view class="price_steup_box_top">
|
||||
<view class="price_steup_box_top_title">每日接诊数量</view>
|
||||
<view class="price_steup_box_top_stepper">
|
||||
<van-stepper value="{{ info.work_num_day }}" min="0" max="{{config.max_work_num_day}}" integer bind:change="onStepperChange" />
|
||||
<van-stepper value="{{ info.work_num_day }}" min="0" max="{{info.work_num_day > config.max_work_num_day?info.work_num_day:config.max_work_num_day}}" integer bind:change="onStepperChange" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="price_steup_box_bottom">
|
||||
|
||||
@ -16,6 +16,7 @@ Page({
|
||||
data_list_3: [],
|
||||
data_list_4: [],
|
||||
data_list_5: [],
|
||||
data_list_5_loading: false,
|
||||
conversationList: [],
|
||||
message_inquiry_type: 99999,
|
||||
now_message_inquiry_type: 5,
|
||||
@ -395,7 +396,7 @@ Page({
|
||||
if(payload) {
|
||||
console.log("payload: ",payload.data);
|
||||
let payloadJson = JSON.parse(payload.data);
|
||||
text = payloadJson.title.replaceAll(/-/g, "").replaceAll(/—/g, "");
|
||||
text = payloadJson.title.replaceAll(/—/g, "");
|
||||
}
|
||||
lastMessage.messageForShow = text;
|
||||
}
|
||||
@ -468,18 +469,19 @@ Page({
|
||||
show: false
|
||||
})
|
||||
|
||||
console.log("开始订阅消息");
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
||||
success (res) {
|
||||
console.log(res);
|
||||
// console.log("开始订阅消息");
|
||||
// wx.requestSubscribeMessage({
|
||||
// tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
||||
// success (res) {
|
||||
// console.log(res);
|
||||
// }
|
||||
// })
|
||||
|
||||
let from_account = e.currentTarget.dataset.from_account;
|
||||
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
let inquiry_type = e.currentTarget.dataset.inquiry_type;
|
||||
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
||||
app.go(url);
|
||||
}
|
||||
})
|
||||
},
|
||||
postDoctorInquiry(e){
|
||||
this.setData({
|
||||
@ -553,6 +555,7 @@ Page({
|
||||
let data_list_5 = this.data.data_list_5;
|
||||
let params = {};
|
||||
params.page = this.data.current_page + 1;
|
||||
this.setData({data_list_5_loading: true})
|
||||
api.getDoctorInquiryFinishMessage(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
@ -563,6 +566,11 @@ Page({
|
||||
last_page: response.data.last_page
|
||||
})
|
||||
// this.selectComponent('#tabs').resize();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}).then(res =>{
|
||||
this.setData({ data_list_5_loading: false})
|
||||
}).catch(errors => {
|
||||
this.setData({ data_list_5_loading: false})
|
||||
console.error(errors);
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -12,7 +12,8 @@
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-loading": "@vant/weapp/loading/index"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 100
|
||||
|
||||
@ -23,9 +23,12 @@
|
||||
</view>
|
||||
|
||||
<view class="empty" wx:if="{{ has_data==false }}" >
|
||||
<view wx:if="{{!data_list_5_loading}}" class="empty_box">
|
||||
<van-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/wnzhen_empty.png" fit="heightFix" height="108rpx" aria-label="empty" />
|
||||
<view class="empty_note">未收到任何消息</view>
|
||||
</view>
|
||||
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
|
||||
</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 }}" >
|
||||
@ -347,6 +350,9 @@
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%;text-align: center;">
|
||||
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_5.length == 0}}" />
|
||||
<van-divider contentPosition="center" wx:if="{{data_list_5.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</van-tab>
|
||||
|
||||
@ -136,4 +136,9 @@ page{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
|
||||
.empty_box{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
12
Pages/yishi/wenzhen_v3/substr.wxs
Normal file
12
Pages/yishi/wenzhen_v3/substr.wxs
Normal file
@ -0,0 +1,12 @@
|
||||
var filters = {//截取字符串返回
|
||||
substring:function(str,start,end){
|
||||
if(!str){
|
||||
return
|
||||
}
|
||||
//也可做一些判断 //我不需要所以没做其他处理,直接返回的
|
||||
return str.substring(start,end);
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
substring:filters.substring
|
||||
}
|
||||
575
Pages/yishi/wenzhen_v3/wenzhen.js
Normal file
575
Pages/yishi/wenzhen_v3/wenzhen.js
Normal file
@ -0,0 +1,575 @@
|
||||
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: false,
|
||||
data_list_1: [],
|
||||
data_list_2: [],
|
||||
data_list_3: [],
|
||||
data_list_4: [],
|
||||
data_list_5: [],
|
||||
data_list_5_loading: false,
|
||||
conversationList: [],
|
||||
message_inquiry_type: 99999,
|
||||
now_message_inquiry_type: 5,
|
||||
system_notice_unreadnnum: "",
|
||||
service_notice_unreadnnum: "",
|
||||
hasOnShow: false,
|
||||
show: false,
|
||||
show_dialog_from_account: "",
|
||||
show_dialog_order_inquiry_id: "",
|
||||
show_dialog_inquiry_type: "",
|
||||
unreadnnum_inter: 0,
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
dot_1: false,
|
||||
dot_2: false,
|
||||
dot_3: false,
|
||||
dot_4: false,
|
||||
},
|
||||
onLoad() {
|
||||
console.log("wenzhen onloadddd");
|
||||
|
||||
// if(wx.$TUIKit){
|
||||
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
// }else{
|
||||
// app.imInit().then(res => {
|
||||
// console.log("wenzhen onload imInit");
|
||||
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
// });
|
||||
// }
|
||||
|
||||
//监听网络状态变化事件
|
||||
wx.onNetworkStatusChange(function (res) {
|
||||
console.log("onNetworkStatusChange from wenzhen: ")
|
||||
console.log(res.isConnected)
|
||||
console.log(res.networkType)
|
||||
wx.showToast({
|
||||
title: '网络类型'+res.networkType,
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
initInterval(){
|
||||
let _this = this;
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
let unreadnnum_inter = setInterval(() => {
|
||||
let system_notice_unreadnnum = wx.getStorageSync(userID+"_system_notice_unreadnnum");
|
||||
let service_notice_unreadnnum = wx.getStorageSync(userID+"_service_notice_unreadnnum");
|
||||
this.setData({
|
||||
system_notice_unreadnnum: system_notice_unreadnnum,
|
||||
service_notice_unreadnnum: service_notice_unreadnnum,
|
||||
})
|
||||
|
||||
if(_this.data.data_list_1.length > 0 || _this.data.data_list_2.length > 0 || _this.data.data_list_3.length > 0 || _this.data.data_list_4.length > 0 || _this.data.data_list_5.length > 0){
|
||||
_this.setData({
|
||||
has_data: true
|
||||
})
|
||||
_this.selectComponent('#tabs').resize();
|
||||
let getCurrentName = _this.selectComponent('#tabs').getCurrentName();
|
||||
let now_message_inquiry_type = _this.data.now_message_inquiry_type;
|
||||
if(getCurrentName != now_message_inquiry_type){
|
||||
_this.setData({
|
||||
now_message_inquiry_type: getCurrentName
|
||||
})
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
this.setData({
|
||||
unreadnnum_inter: unreadnnum_inter
|
||||
})
|
||||
console.log("app.globalData.unreadnnum_inter: ", app.globalData.unreadnnum_inter);
|
||||
},
|
||||
onShow: function () {
|
||||
console.log("onShow from wenzhen V2")
|
||||
if(this.data.hasOnShow){
|
||||
wx.stopPullDownRefresh()
|
||||
return;
|
||||
}
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
active: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||
})
|
||||
|
||||
this.getTabBar().startInterval()
|
||||
}
|
||||
this.getDoctorInquiryFinishMessage();
|
||||
this.getDoctorMessageNotice();
|
||||
this.getConversationList();
|
||||
if(this.data.unreadnnum_inter == 0){
|
||||
this.initInterval();
|
||||
}
|
||||
//避免onshow加载多次
|
||||
this.setData({
|
||||
hasOnShow: true
|
||||
})
|
||||
|
||||
|
||||
if(wx.$TUIKit){
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
}else{
|
||||
app.imInit().then(res => {
|
||||
console.log("wenzhen onload imInit");
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
});
|
||||
}
|
||||
},
|
||||
onHide(){
|
||||
console.log("onHideonHide from wenzhen")
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().stopInterval()
|
||||
}
|
||||
clearInterval(this.data.unreadnnum_inter)
|
||||
this.setData({
|
||||
hasOnShow: false,
|
||||
data_list_1: [],
|
||||
data_list_2: [],
|
||||
data_list_3: [],
|
||||
data_list_4: [],
|
||||
data_list_5: [],
|
||||
message_inquiry_type: 9999,
|
||||
now_message_inquiry_type: 5,
|
||||
unreadnnum_inter: 0,
|
||||
has_data: false,
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
dot_1: false,
|
||||
dot_2: false,
|
||||
dot_3: false,
|
||||
dot_4: false,
|
||||
})
|
||||
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived);
|
||||
},
|
||||
onUnload(){
|
||||
console.log("onUnload from wenzhen")
|
||||
this.setData({
|
||||
hasOnShow: false,
|
||||
message_inquiry_type: 9999,
|
||||
now_message_inquiry_type: 5,
|
||||
})
|
||||
},
|
||||
getConversationList(){
|
||||
console.log("getConversationListgetConversationListgetConversationList");
|
||||
app.imInit().then(res => {
|
||||
console.log("wenzhen onload imInit: ", res);
|
||||
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();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
});
|
||||
});
|
||||
},
|
||||
go(e){
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
let url = e.currentTarget.dataset.url;
|
||||
let name = e.currentTarget.dataset.name;
|
||||
wx.setStorageSync(name, 0);
|
||||
app.go(url);
|
||||
},
|
||||
$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 = [];
|
||||
order_inquiry_id_list.push("");//初始化一个,防止失败
|
||||
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;
|
||||
try {
|
||||
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return;
|
||||
}
|
||||
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 => {
|
||||
let new_conversationList = [];
|
||||
if(response.data.length > 0){
|
||||
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;
|
||||
try {
|
||||
cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData);
|
||||
} catch (error) {
|
||||
return;
|
||||
}
|
||||
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;
|
||||
|
||||
let inquiry_status = order.inquiry_status;
|
||||
//inquiry_status 状态
|
||||
if(inquiry_status !=3 && inquiry_status != 4){
|
||||
return;
|
||||
}
|
||||
item.inquiry_status = 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 = [];
|
||||
let session_data_list_5 = [];
|
||||
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);
|
||||
session_list.push(session_data_list_5);
|
||||
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
let totalUnreadCount = 0;
|
||||
let message_inquiry_type = this.data.message_inquiry_type;
|
||||
|
||||
this.data.conversationList.forEach(item => {
|
||||
let conversationID = item.conversationID;
|
||||
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
|
||||
let lastMessage = item.lastMessage;
|
||||
let type = lastMessage.type;
|
||||
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;
|
||||
if(!inquiry_type) return;
|
||||
if(inquiry_type > 4) return;
|
||||
if(inquiry_type < message_inquiry_type){
|
||||
message_inquiry_type = inquiry_type;
|
||||
}
|
||||
//去重order_inquiry_id
|
||||
let index = this.checkOrderInquiryId(session_list[inquiry_type - 1], order_inquiry_id);
|
||||
if(index > -1) return;
|
||||
let patient_family_data = cloudCustomDataJson.patient_family_data;
|
||||
if(patient_family_data == undefined) return;
|
||||
console.log("patient_family_data: ", patient_family_data);
|
||||
let session_item = {};
|
||||
session_item.inquiry_status = item.inquiry_status;//订单状态暂无
|
||||
let txt = {};
|
||||
if(lastMessage.messageForShow == "[自定义消息]"){
|
||||
let text = "自定义消息";
|
||||
let payload = lastMessage.payload;
|
||||
if(payload) {
|
||||
console.log("payload: ",payload.data);
|
||||
let payloadJson = JSON.parse(payload.data);
|
||||
text = payloadJson.title.replaceAll(/—/g, "");
|
||||
}
|
||||
lastMessage.messageForShow = text;
|
||||
}
|
||||
if(lastMessage.isRevoked){
|
||||
if(lastMessage.fromAccount == app.globalData.config.userID){
|
||||
lastMessage.messageForShow = "你撤回了一条消息";
|
||||
}else{
|
||||
lastMessage.messageForShow = "对方撤回了一条消息";
|
||||
}
|
||||
}
|
||||
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.inquiry_type = inquiry_type;
|
||||
session_item.patient_age = patient_family_data.patient_age;
|
||||
session_item.patient_name = patient_family_data.patient_name;
|
||||
session_item.patient_sex = patient_family_data.patient_sex;
|
||||
session_item.from_account = userProfile.userID;
|
||||
let unreadCount = item.unreadCount;
|
||||
if(unreadCount > 0){
|
||||
totalUnreadCount = totalUnreadCount + unreadCount;
|
||||
session_item.message_dot = true;
|
||||
let dot_name = "dot_"+inquiry_type
|
||||
this.setData({
|
||||
[dot_name]: true
|
||||
})
|
||||
}else{
|
||||
if(item.inquiry_status == 3){
|
||||
totalUnreadCount = totalUnreadCount + 1;
|
||||
session_item.message_dot = true;
|
||||
let dot_name = "dot_"+inquiry_type
|
||||
this.setData({
|
||||
[dot_name]: true
|
||||
})
|
||||
}else{
|
||||
session_item.message_dot = false;
|
||||
}
|
||||
}
|
||||
session_list[inquiry_type - 1].push(session_item);
|
||||
})
|
||||
|
||||
|
||||
wx.setStorageSync(userID+'_wenzhen_info', totalUnreadCount);
|
||||
|
||||
|
||||
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,
|
||||
message_inquiry_type: message_inquiry_type
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
// this.selectComponent('#tabs').resize();
|
||||
|
||||
},
|
||||
checkOrderInquiryId(list, order_inquiry_id){
|
||||
let index = list.findIndex(item => {
|
||||
return item.order_inquiry_id == order_inquiry_id;
|
||||
})
|
||||
return index;
|
||||
},
|
||||
onTabsChange(e){
|
||||
console.log(e);
|
||||
},
|
||||
goChat(e){
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
|
||||
console.log("开始订阅消息");
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
||||
success (res) {
|
||||
console.log(res);
|
||||
let from_account = e.currentTarget.dataset.from_account;
|
||||
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
let inquiry_type = e.currentTarget.dataset.inquiry_type;
|
||||
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
||||
app.go(url);
|
||||
}
|
||||
})
|
||||
},
|
||||
postDoctorInquiry(e){
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
console.log("order_inquiry_id: ", e.currentTarget.dataset.order_inquiry_id);
|
||||
let params = {};
|
||||
params.order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
console.log("params: ",params)
|
||||
api.postDoctorInquiry(params).then(response => {
|
||||
console.log("开始接诊");
|
||||
console.log(response);
|
||||
}).then(() => {
|
||||
this.goChat(e);
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
//获取上方角标
|
||||
getDoctorMessageNotice(e){
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
api.getDoctorMessageNotice().then(response => {
|
||||
let service_message_notice = response.data.service_message_notice;
|
||||
let system_message_notice = response.data.system_message_notice;
|
||||
wx.setStorageSync(userID+"_service_notice_unreadnnum", service_message_notice==true?1:"");//3、医生端系统通知
|
||||
wx.setStorageSync(userID+"_system_notice_unreadnnum", system_message_notice);//4、医生端服务通知
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
tabShow(e){
|
||||
let show_dialog_from_account = e.currentTarget.dataset.show_dialog_from_account;
|
||||
let show_dialog_order_inquiry_id = e.currentTarget.dataset.show_dialog_order_inquiry_id;
|
||||
let show_dialog_inquiry_type = e.currentTarget.dataset.show_dialog_inquiry_type;
|
||||
console.log("tabShowtabShowtabShowtabShow");
|
||||
this.setData({
|
||||
show_dialog_from_account: show_dialog_from_account,
|
||||
show_dialog_order_inquiry_id: show_dialog_order_inquiry_id,
|
||||
show_dialog_inquiry_type: show_dialog_inquiry_type,
|
||||
show: true
|
||||
})
|
||||
},
|
||||
onClose(){
|
||||
console.log("onCloseonCloseonCloseonClose")
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
},
|
||||
vanTabsChange(e){
|
||||
console.log(e)
|
||||
this.setData({
|
||||
now_message_inquiry_type: e.detail.name
|
||||
})
|
||||
},
|
||||
onPullDownRefresh(){
|
||||
console.log("用户下拉动作")
|
||||
this.onHide();
|
||||
this.onShow();
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log('===触底了!!===');
|
||||
let now_message_inquiry_type = this.data.now_message_inquiry_type;
|
||||
if(now_message_inquiry_type == 5){
|
||||
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
|
||||
this.getDoctorInquiryFinishMessage()
|
||||
}
|
||||
}
|
||||
},
|
||||
getDoctorInquiryFinishMessage(){
|
||||
let data_list_5 = this.data.data_list_5;
|
||||
let params = {};
|
||||
params.page = this.data.current_page + 1;
|
||||
this.setData({data_list_5_loading: true})
|
||||
api.getDoctorInquiryFinishMessage(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
"data_list_5": data_list_5.concat(response.data.data),
|
||||
current_page: response.data.current_page,
|
||||
total: response.data.total,
|
||||
per_page: response.data.per_page,
|
||||
last_page: response.data.last_page
|
||||
})
|
||||
// this.selectComponent('#tabs').resize();
|
||||
}).then(res =>{
|
||||
this.setData({ data_list_5_loading: false})
|
||||
}).catch(errors => {
|
||||
this.setData({ data_list_5_loading: false})
|
||||
console.error(errors);
|
||||
})
|
||||
}
|
||||
})
|
||||
20
Pages/yishi/wenzhen_v3/wenzhen.json
Normal file
20
Pages/yishi/wenzhen_v3/wenzhen.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"wenzhen-data": "/commpents/wenzhen_data/index",
|
||||
"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",
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-loading": "@vant/weapp/loading/index"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
378
Pages/yishi/wenzhen_v3/wenzhen.wxml
Normal file
378
Pages/yishi/wenzhen_v3/wenzhen.wxml
Normal file
@ -0,0 +1,378 @@
|
||||
<!-- 问诊页面 -->
|
||||
<wxs module="dateSubstr" src="./substr.wxs"></wxs>
|
||||
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="top">
|
||||
<view class="top_left" bindtap="go" data-name="service_notice_unreadnnum" data-url="/Pages/yishi/service_notice/index">
|
||||
<t-badge dot="{{service_notice_unreadnnum > 0}}" offset="{{ [1, 1] }}" class="wrapper">
|
||||
<van-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice.png" fit="heightFix" height="108rpx" aria-label="notice" />
|
||||
</t-badge>
|
||||
服务通知
|
||||
</view>
|
||||
<view class="top_right" bindtap="go" data-name="system_notice_unreadnnum" data-url="/Pages/yishi/system_notice/index">
|
||||
<t-badge offset="{{ [1, 1] }}" class="wrapper" wx:if="{{system_notice_unreadnnum == ''}}">
|
||||
<van-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/system_notice.png" fit="heightFix" height="108rpx" aria-label="notice" />
|
||||
</t-badge>
|
||||
|
||||
<t-badge count="{{system_notice_unreadnnum}}" offset="{{ [1, 1] }}" class="wrapper" wx:else>
|
||||
<van-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/system_notice.png" fit="heightFix" height="108rpx" aria-label="notice" />
|
||||
</t-badge>
|
||||
系统公告
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty" wx:if="{{ has_data==false }}" >
|
||||
<view wx:if="{{!data_list_5_loading}}">
|
||||
<van-image src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/wnzhen_empty.png" fit="heightFix" height="108rpx" aria-label="empty" />
|
||||
<view class="empty_note">未收到任何消息</view>
|
||||
</view>
|
||||
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
|
||||
</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
|
||||
default-value="{{ message_inquiry_type }}"
|
||||
sticky
|
||||
bind:change="onTabsChange"
|
||||
bind:scroll="onStickyScroll"
|
||||
t-class="custom-tabs"
|
||||
theme="line"
|
||||
swipeable="{{false}}"
|
||||
custom-style="font-size: 32rpx"
|
||||
>
|
||||
<t-tab-panel label="在线问诊" value="1" wx:if="{{data_list_1.length > 0}}">
|
||||
|
||||
<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 }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
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" wx:if="{{data_list_2.length > 0}}">
|
||||
|
||||
<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 }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
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" wx:if="{{data_list_3.length > 0}}">
|
||||
|
||||
<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 }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
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" wx:if="{{data_list_4.length > 0}}">
|
||||
|
||||
<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 }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
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" wx:if="{{data_list_5.length > 0}}">
|
||||
|
||||
<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 class="tabs" wx:if="{{ has_data==true }}">
|
||||
<van-tabs
|
||||
color="#3CC7C0"
|
||||
title-active-color="#3CC7C0"
|
||||
border="{{true}}"
|
||||
id="tabs"
|
||||
bind:change="vanTabsChange"
|
||||
wx:if="{{ has_data }}"
|
||||
>
|
||||
<van-tab title="在线问诊" dot="{{dot_1}}" name="1">
|
||||
<!-- <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 }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
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 }}"
|
||||
/> -->
|
||||
|
||||
<!-- aa -->
|
||||
<view class="content" wx:for="{{ data_list_1 }}">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
</view>
|
||||
<view class="content_2">{{item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ 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?'已取消':'其他' }}</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/Pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default"
|
||||
bindtap="tabShow"
|
||||
data-show_dialog_from_account="{{item.from_account}}"
|
||||
data-show_dialog_order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-show_dialog_inquiry_type="{{item.inquiry_type}}"
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/Pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_1.length == 0}}" />
|
||||
<!-- aa -->
|
||||
</van-tab>
|
||||
<van-tab title="快速问诊" dot="{{dot_2}}" name="2">
|
||||
<!-- <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 }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
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 }}"
|
||||
/> -->
|
||||
|
||||
<view class="content" wx:for="{{ data_list_2 }}">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
</view>
|
||||
<view class="content_2">{{item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ 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?'已取消':'其他' }}</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/Pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default" bindtap="tabShow"
|
||||
data-show_dialog_from_account="{{item.from_account}}"
|
||||
data-show_dialog_order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-show_dialog_inquiry_type="{{item.inquiry_type}}"
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/Pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_2.length == 0}}" />
|
||||
</van-tab>
|
||||
<van-tab title="公益问诊" dot="{{dot_3}}" name="3">
|
||||
<!-- <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 }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
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 }}"
|
||||
/> -->
|
||||
|
||||
<view class="content" wx:for="{{ data_list_3 }}">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
</view>
|
||||
<view class="content_2">{{item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ 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?'已取消':'其他' }}</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/Pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default" bindtap="tabShow"
|
||||
data-show_dialog_from_account="{{item.from_account}}"
|
||||
data-show_dialog_order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-show_dialog_inquiry_type="{{item.inquiry_type}}"
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/Pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_3.length == 0}}" />
|
||||
</van-tab>
|
||||
<van-tab title="问诊购药" dot="{{dot_4}}" name="4">
|
||||
<!-- <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 }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
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 }}"
|
||||
/> -->
|
||||
|
||||
<view class="content" wx:for="{{ data_list_4 }}">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
</view>
|
||||
<view class="content_2">{{item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ 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?'已取消':'其他' }}</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/Pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default" bindtap="tabShow"
|
||||
data-show_dialog_from_account="{{item.from_account}}"
|
||||
data-show_dialog_order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-show_dialog_inquiry_type="{{item.inquiry_type}}"
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/Pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_4.length == 0}}" />
|
||||
</van-tab>
|
||||
<van-tab title="问诊结束" name="5">
|
||||
<view class="content" wx:for="{{ data_list_5 }}" bindtap="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index">
|
||||
<view class="content_1" >
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{false}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{dateSubstr.substring(item.complete_time,0,10)}}</view>
|
||||
</view>
|
||||
<view class="content_2">问诊已结束</view>
|
||||
<view class="content_3">
|
||||
<view class="status status_end">{{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }}</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%;text-align: center;">
|
||||
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_5.length == 0}}" />
|
||||
<van-divider contentPosition="center" wx:if="{{data_list_5.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</view>
|
||||
<view style="height: 200rpx;"></view>
|
||||
|
||||
|
||||
<t-dialog
|
||||
visible="{{ show }}"
|
||||
title="温馨提示"
|
||||
close-on-overlay-click
|
||||
bind:close="onClose"
|
||||
content="为保障服务质量,请您查看患者病历后再去接诊"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="go" data-from_account="{{show_dialog_from_account}}" data-url="/Pages/yishi/case/index?order_inquiry_id={{show_dialog_order_inquiry_id}}" >去查看</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="postDoctorInquiry" data-from_account="{{show_dialog_from_account}}" data-inquiry_type="{{show_dialog_inquiry_type}}" data-order_inquiry_id="{{show_dialog_order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
|
||||
</t-dialog>
|
||||
</view>
|
||||
139
Pages/yishi/wenzhen_v3/wenzhen.wxss
Normal file
139
Pages/yishi/wenzhen_v3/wenzhen.wxss
Normal file
@ -0,0 +1,139 @@
|
||||
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: 28rpx;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.badge--t-badge {
|
||||
vertical-align: baseline !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.content{
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.content_1,.content_3,.content_2{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 20rpx 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.content_1,.content_3{
|
||||
flex: 5;
|
||||
}
|
||||
.name{
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
display: flex;
|
||||
}
|
||||
.date{
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
.content_2{
|
||||
background-color: #FAFAFA;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
min-height: 70rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
.status{
|
||||
font-size: 26rpx;
|
||||
color: #FA541C;
|
||||
flex: 1;
|
||||
}
|
||||
.status_end{
|
||||
color: #666666;
|
||||
}
|
||||
.btn{
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.content_4{
|
||||
flex: 5;
|
||||
font-size: 24rpx;
|
||||
color: #E34D59;
|
||||
justify-self:flex-end;
|
||||
text-align:right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #E3E4E5;
|
||||
align-items: center;
|
||||
margin: 0 30rpx;
|
||||
min-height: 70rpx;
|
||||
}
|
||||
.dialog{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.dialog_cancel_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
border-right: 1px solid #E9E9E9;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
|
||||
@ -85,12 +85,7 @@ Page({
|
||||
},
|
||||
onChange({ detail }) {
|
||||
console.log("onChange: ", detail);
|
||||
if(detail){
|
||||
this.setData({ note: this.data.open_note });
|
||||
}else{
|
||||
this.setData({ note: this.data.close_note });
|
||||
}
|
||||
this.setData({ "info.is_open": detail });
|
||||
|
||||
|
||||
//修改开关
|
||||
let params = {};
|
||||
@ -108,6 +103,13 @@ Page({
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(()=>{
|
||||
if(detail){
|
||||
this.setData({ note: this.data.open_note });
|
||||
}else{
|
||||
this.setData({ note: this.data.close_note });
|
||||
}
|
||||
this.setData({ "info.is_open": detail });
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<view class="price_steup_box_top">
|
||||
<view class="price_steup_box_top_title">每日接诊数量</view>
|
||||
<view class="price_steup_box_top_stepper">
|
||||
<van-stepper value="{{ info.work_num_day }}" max="{{config.max_work_num_day}}" integer bind:change="onStepperChange" />
|
||||
<van-stepper value="{{ info.work_num_day }}" min="0" max="{{info.work_num_day > config.max_work_num_day?info.work_num_day:config.max_work_num_day}}" integer bind:change="onStepperChange" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="price_steup_box_bottom">
|
||||
|
||||
@ -33,9 +33,11 @@ Page({
|
||||
break;
|
||||
case 1:
|
||||
btn_txt = "审核通过";
|
||||
btn_disabled = true;
|
||||
break;
|
||||
case 2:
|
||||
btn_txt = "审核中";
|
||||
btn_disabled = true;
|
||||
break;
|
||||
case 3:
|
||||
btn_txt = "认证失败,再次提交";
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
upload_cell_desc=""
|
||||
upload_cell_note="查看示例"
|
||||
fileList="{{ id_card_front }}"
|
||||
deletable="{{!btn_disabled}}"
|
||||
max_count="1"
|
||||
data-scene="2"
|
||||
data-field_name="id_card_front"
|
||||
@ -22,6 +23,7 @@
|
||||
upload_cell_desc=""
|
||||
upload_cell_note="查看示例"
|
||||
fileList="{{ id_card_back }}"
|
||||
deletable="{{!btn_disabled}}"
|
||||
max_count="1"
|
||||
data-scene="2"
|
||||
data-field_name="id_card_back"
|
||||
@ -60,6 +62,7 @@
|
||||
upload_cell_note=""
|
||||
required="{{false}}"
|
||||
disabled="{{btn_disabled}}"
|
||||
upload_cell_note_show="{{false}}"
|
||||
max_count="1"
|
||||
data-scene="2"
|
||||
data-field_name="sign_image"
|
||||
|
||||
@ -154,6 +154,7 @@ Component({
|
||||
const renderDom = [{
|
||||
type: 'prescribe',
|
||||
product_name: data.product_name,
|
||||
title: customMessage.title,
|
||||
order_inquiry_id: data.order_inquiry_id,
|
||||
order_prescription_id: data.order_prescription_id,
|
||||
pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10),
|
||||
@ -166,6 +167,7 @@ Component({
|
||||
const renderDom = [{
|
||||
type: 'prescribe_verify',
|
||||
product_name: data.product_name,
|
||||
title: customMessage.title,
|
||||
order_inquiry_id: data.order_inquiry_id,
|
||||
order_prescription_id: data.order_prescription_id,
|
||||
pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10),
|
||||
|
||||
@ -49,21 +49,32 @@
|
||||
<view class="gdxz_custom_message_title">{{renderDom[0].title}}</view>
|
||||
<view class="gdxz_custom_message_desc">{{renderDom[0].desc}}</view>
|
||||
</view> -->
|
||||
<!-- 自定义评价样式 -->
|
||||
<view wx:if="{{renderDom[0].type==='order_evaluation' && false}}" class="gdxz_custom_order_evaluation_message" bindtap="showPop">
|
||||
<view class="evaluation_title">请您对本次问诊服务进行评价</view>
|
||||
<view class="evaluation_ratebox">
|
||||
<van-rate disabled value="{{0}}" size="40rpx" gutter="46rpx" color="#ffd21e" void-icon="star" void-color="#e7e7e7" readonlygutter="20"/>
|
||||
</view>
|
||||
<view class="evaluation_button">点击评价</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 自定义开处方样式 -->
|
||||
<view wx:if="{{renderDom[0].type==='prescribe'}}"
|
||||
class="gdxz_custom_order_prescribe_message"
|
||||
data-url="/Pages/yishi/onlinechufang/index?order_inquiry_id={{renderDom[0].order_inquiry_id}}&order_prescription_id={{renderDom[0].order_prescription_id}}&from=chat"
|
||||
bindtap="go">
|
||||
<view class="prescribe_title">
|
||||
处方已开具
|
||||
{{renderDom[0].title}}
|
||||
</view>
|
||||
<view class="prescribe_box">
|
||||
<view class="prescribe_box_top">
|
||||
<view class="prescribe_box_top_product_name"><text style="color: #999;"> RP:</text>{{renderDom[0].product_name}}</view>
|
||||
<view class="prescribe_box_top_pharmacist_verify_time"><text style="color: #999;">开方日期:</text> {{renderDom[0].pharmacist_verify_time}}</view>
|
||||
</view>
|
||||
<view class="prescribe_box_bottom" data-order_prescription_id="{{renderDom[0].order_prescription_id}}">
|
||||
<view class="prescribe_box_buy">去查看</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type==='prescribe_verify'}}"
|
||||
class="gdxz_custom_order_prescribe_message"
|
||||
data-url="/Pages/yishi/onlinechufang/index?order_inquiry_id={{renderDom[0].order_inquiry_id}}&order_prescription_id={{renderDom[0].order_prescription_id}}&from=chat"
|
||||
bindtap="go">
|
||||
<view class="prescribe_title">
|
||||
{{renderDom[0].title}}
|
||||
</view>
|
||||
<view class="prescribe_box">
|
||||
<view class="prescribe_box_top">
|
||||
|
||||
@ -133,7 +133,7 @@ line-height: 42rpx;
|
||||
.gdxz_custom_message_title{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
max-width: 92vw;
|
||||
max-width: 95vw;
|
||||
justify-content: center;
|
||||
background-color: #E1E1E1;
|
||||
padding: 5rpx 40rpx;
|
||||
@ -143,7 +143,7 @@ line-height: 42rpx;
|
||||
.gdxz_custom_message_desc{
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
max-width: 92vw;
|
||||
max-width: 95vw;
|
||||
letter-spacing: 2rpx;
|
||||
justify-content: center;
|
||||
color: #666666;
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
import logger from '../../../../utils/logger';
|
||||
import constant from '../../../../utils/constant';
|
||||
import { API } from '../../../../../utils/network/api';
|
||||
|
||||
const api = new API()
|
||||
let app = getApp()
|
||||
// eslint-disable-next-line no-undef
|
||||
Component({
|
||||
@ -44,6 +47,15 @@ Component({
|
||||
baseInfo: {
|
||||
type: Object,
|
||||
value: {}
|
||||
},
|
||||
message_rounds:{
|
||||
type: Number,
|
||||
value: 0,
|
||||
observer(newVal) {
|
||||
this.setData({
|
||||
message_rounds: newVal,
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@ -76,11 +88,15 @@ Component({
|
||||
isFirstSendTyping: true,
|
||||
time: 0,
|
||||
focus: false,
|
||||
my_focus: false,
|
||||
isEmoji: false,
|
||||
fileList: [],
|
||||
hasCallKit: false,
|
||||
showChangYongYu: false,
|
||||
ChangYongYu: []
|
||||
ChangYongYu: [],
|
||||
dialog_visible: false,
|
||||
dialog_message: "在线开处方需先进行多点执业认证",
|
||||
message_rounds: 0
|
||||
},
|
||||
|
||||
lifetimes: {
|
||||
@ -240,6 +256,7 @@ Component({
|
||||
|
||||
// 选自定义消息
|
||||
handleExtensions() {
|
||||
|
||||
console.warn("wx.aegis: ", wx.aegis);
|
||||
wx.aegis.reportEvent({
|
||||
name: 'chooseExtensions',
|
||||
@ -346,7 +363,7 @@ Component({
|
||||
inquiry_type: this.data.inquiry_type,
|
||||
message_type: 0,
|
||||
is_system: 0,
|
||||
message_rounds: message_rounds,
|
||||
message_rounds: this.data.message_rounds,
|
||||
patient_family_data: patient_family_data
|
||||
});
|
||||
|
||||
@ -395,7 +412,8 @@ Component({
|
||||
},
|
||||
|
||||
handleCommonFunctions(e) {
|
||||
switch (e.target.dataset.function.key) {
|
||||
console.log("handleCommonFunctions: ", e)
|
||||
switch (e.target.dataset.key) {
|
||||
case '0':
|
||||
this.setData({
|
||||
displayCommonWords: true,
|
||||
@ -418,19 +436,24 @@ Component({
|
||||
let _this = this;
|
||||
console.log("开始订阅消息");
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['5Tl-xmaWXrKP5BB8E6b3oTdPHbHa7WYWbmvZiuz4TLs'],
|
||||
tmplIds: ['kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40'],
|
||||
success (res) {
|
||||
console.log(res);
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
let multi_point_status = wx.getStorageSync(userID+'_multi_point_status');
|
||||
if(multi_point_status == 1){
|
||||
app.go("/Pages/yishi/onlinechufang/index?order_inquiry_id="+_this.data.order_inquiry_id)
|
||||
let order_inquiry_id = _this.data.order_inquiry_id
|
||||
api.getDoctorPrescriptionCheck({order_inquiry_id: order_inquiry_id}).then(response => {
|
||||
let status = response.data.status
|
||||
if(status == 1){
|
||||
app.go("/Pages/yishi/onlinechufang/index?order_inquiry_id="+order_inquiry_id)
|
||||
}else{
|
||||
_this.setData({
|
||||
dialog_visible: true
|
||||
dialog_visible: true,
|
||||
dialog_message: response.data.message
|
||||
})
|
||||
}
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
break;
|
||||
@ -444,7 +467,7 @@ Component({
|
||||
})
|
||||
},
|
||||
confirmDialog(){
|
||||
app.go("/Pages/yishi/zhiye_identity/index")
|
||||
// app.go("/Pages/yishi/zhiye_identity/index")
|
||||
this.setData({
|
||||
dialog_visible: false
|
||||
})
|
||||
@ -632,7 +655,7 @@ Component({
|
||||
inquiry_type: this.data.inquiry_type,
|
||||
message_type: 0,
|
||||
is_system: 0,
|
||||
message_rounds: message_rounds,
|
||||
message_rounds: this.data.message_rounds,
|
||||
patient_family_data: patient_family_data
|
||||
});
|
||||
|
||||
@ -666,7 +689,7 @@ Component({
|
||||
sendMessageBtn: false,
|
||||
});
|
||||
}
|
||||
event.detail.value && this.sendTypingStatusMessage();
|
||||
// event.detail.value && this.sendTypingStatusMessage();
|
||||
},
|
||||
|
||||
// 发送正在输入状态消息
|
||||
@ -730,7 +753,7 @@ Component({
|
||||
this.setData({
|
||||
focus: true,
|
||||
});
|
||||
this.getMessageList(this.data.conversation);
|
||||
// this.getMessageList(this.data.conversation);
|
||||
this.triggerEvent('pullKeysBoards', {
|
||||
event,
|
||||
});
|
||||
@ -844,8 +867,7 @@ Component({
|
||||
ext3: wx.$chat_SDKAppID,
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
}).catch((error) => {
|
||||
logger.log(`| TUI-chat | message-input | sendMessageError: ${error.code} `);
|
||||
wx.aegis.reportEvent({
|
||||
name: 'sendMessage',
|
||||
@ -866,6 +888,7 @@ Component({
|
||||
handleClose() {
|
||||
this.setData({
|
||||
displayFlag: '',
|
||||
my_focus: false
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
<view class="TUI-message-input-container">
|
||||
<view class="TUI-commom-function">
|
||||
<view class="TUI-commom-function-item" wx:for="{{commonFunction}}" wx:key="index" data-function="{{item}}" bindtap="handleCommonFunctions">{{item.name}}</view>
|
||||
<view class="TUI-commom-function-item" data-key="10" bindtap="handleCommonFunctions">查看完整病例</view>
|
||||
<view class="TUI-commom-function-item" data-key="11" bindtap="handleCommonFunctions" wx:if="{{baseInfo.multi_point_status == 1}}">在线开处方</view>
|
||||
</view>
|
||||
<view class="TUI-message-input">
|
||||
<image class="TUI-icon" bindtap="switchAudio" wx:if="{{has_audio}}"
|
||||
src="{{isAudio ? '../../../../static/assets/keyboard.svg' : '../../../../static/assets/audio.svg'}}" />
|
||||
<view wx:if="{{!isAudio || isEmoji}}" class="TUI-message-input-main {{ focus && 'TUI-message-input-main-focus'}}" >
|
||||
<textarea id="mytextarea" class="TUI-message-input-area" adjust-position="{{false}}" cursor-spacing="20"
|
||||
<textarea hold-keyboard id="mytextarea" class="TUI-message-input-area" adjust-position="{{false}}" cursor-spacing="0"
|
||||
value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}"
|
||||
placeholder="请输入文字" placeholder-class="input-placeholder" confirm-type="send" show-confirm-bar="{{false}}"
|
||||
placeholder="请输入文字" placeholder-class="input-placeholder" confirm-type="return" show-confirm-bar="{{false}}"
|
||||
bindfocus="inputBindFocus"
|
||||
bindblur="inputBindBlur"
|
||||
bindconfirm="sendTextMessage"/>
|
||||
@ -104,7 +105,7 @@
|
||||
<t-dialog
|
||||
visible="{{ dialog_visible }}"
|
||||
title="温馨提示"
|
||||
content="在线开处方需先进行多点执业认证"
|
||||
content="{{dialog_message}}"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelDialog">
|
||||
取消
|
||||
|
||||
@ -74,8 +74,8 @@
|
||||
padding: 20rpx 20rpx;
|
||||
}
|
||||
.TUI-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin: 0 16rpx;
|
||||
}
|
||||
.TUI-Extensions {
|
||||
@ -111,6 +111,7 @@
|
||||
color: #fff;
|
||||
max-height: 200rpx;
|
||||
padding: 20rpx 0;
|
||||
height: 50rpx;
|
||||
}
|
||||
.TUI-sendMessage-btn-input{
|
||||
background-color: #3CC7C0;
|
||||
|
||||
@ -2,6 +2,8 @@ import dayjs from '../../../../utils/dayjs';
|
||||
import logger from '../../../../utils/logger';
|
||||
import constant from '../../../../utils/constant';
|
||||
import { getTimeAgoChat } from './../../../../../utils/util'
|
||||
import { wechatTimeFormat } from './../../../../../utils/wechatTime'
|
||||
|
||||
const { GDXZ_CUSTOM_MSEEAGE } = constant;
|
||||
// eslint-disable-next-line no-undef
|
||||
const app = getApp();
|
||||
@ -87,7 +89,10 @@ Component({
|
||||
errorMessage: {},
|
||||
errorMessageID: '',
|
||||
typingMessage: {},
|
||||
autoToButtom: true
|
||||
autoToButtom: true,
|
||||
cachTime: "",
|
||||
list_first_loading: false,
|
||||
message_rounds: 0
|
||||
},
|
||||
|
||||
lifetimes: {
|
||||
@ -132,9 +137,15 @@ Component({
|
||||
},
|
||||
pageLifetimes: {
|
||||
show(){
|
||||
this.setData({
|
||||
list_first_loading: true
|
||||
})
|
||||
console.log("showshowshowshowshowshowshow")
|
||||
},
|
||||
hide(){
|
||||
this.setData({
|
||||
list_first_loading: false
|
||||
})
|
||||
console.log("hidehidehidehidehidehidehidehidehidehidehide")
|
||||
}
|
||||
},
|
||||
@ -178,15 +189,24 @@ Component({
|
||||
// console.log(item)
|
||||
//去除自定义消息
|
||||
// if(HMM_type == "TIMCustomElem") return;
|
||||
if(!this.checkShowAvatar(item)){
|
||||
this.refreshMessageRounds(item)
|
||||
let checkShowAvatar = this.checkShowAvatar(item, false)
|
||||
if(!checkShowAvatar){
|
||||
item.no_avatar = true;
|
||||
}else{
|
||||
item.no_avatar = false;
|
||||
}
|
||||
|
||||
let cath_time = this.cachMessageTime(item.time * 1000);
|
||||
item.messageTime = cath_time[0]
|
||||
item.isShowTime = cath_time[1]
|
||||
item.showMessageTime = cath_time[1]
|
||||
HMM_messageList_del.push(item);
|
||||
})
|
||||
HMM_data.messageList = HMM_messageList_del;
|
||||
|
||||
this.showMoreHistoryMessageTime(HMM_messageList_del);
|
||||
// this.showMoreHistoryMessageTime(HMM_messageList_del);
|
||||
// this.showHistoryMessageTime(HMM_messageList_del);
|
||||
const { messageList } = HMM_data; // 消息列表。
|
||||
this.data.nextReqMessageID = res.data.nextReqMessageID; // 用于续拉,分页续拉时需传入该字段。
|
||||
this.data.isCompleted = res.data.isCompleted; // 表示是否已经拉完所有消息。
|
||||
@ -196,32 +216,86 @@ Component({
|
||||
}
|
||||
this.$handleMessageRender(this.data.messageList, messageList);
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
list_first_loading: false
|
||||
})
|
||||
}).catch(error => {
|
||||
this.setData({
|
||||
list_first_loading: false
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
checkShowAvatar(message){
|
||||
console.log("checkShowAvatar ");
|
||||
refreshMessageRounds(message){
|
||||
console.log("messageList refreshMessageRounds message: ", message);
|
||||
let cloudCustomData = "";
|
||||
let cloudCustomDataJson = "";
|
||||
if(message.cloudCustomData){
|
||||
cloudCustomData = message.cloudCustomData;
|
||||
}
|
||||
if(cloudCustomData){
|
||||
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
||||
}
|
||||
|
||||
let payload = message.payload.data;
|
||||
if(payload){
|
||||
const payloadData = JSON.parse(message.payload.data);
|
||||
if(payloadData){
|
||||
let title = payloadData.title
|
||||
//问诊已开始,重置message_rounds = 0
|
||||
if(title.indexOf("问诊已开始") > -1){
|
||||
this.setData({
|
||||
message_rounds: 0
|
||||
})
|
||||
var myEventOption = {}
|
||||
myEventOption.message_rounds = 0
|
||||
this.triggerEvent('refreshMessageRounds', myEventOption)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let now_message_rounds = this.data.message_rounds
|
||||
console.log("now_message_rounds: ", now_message_rounds)
|
||||
if(cloudCustomDataJson){
|
||||
let message_rounds = cloudCustomDataJson.message_rounds;
|
||||
console.log("message_rounds: ", message_rounds)
|
||||
if(message_rounds > now_message_rounds){
|
||||
this.setData({
|
||||
message_rounds: message_rounds
|
||||
})
|
||||
var myEventOption = {}
|
||||
myEventOption.message_rounds = message_rounds
|
||||
this.triggerEvent('refreshMessageRounds', myEventOption)
|
||||
}
|
||||
}
|
||||
},
|
||||
checkShowAvatar(message, refreshBaseInfo){
|
||||
// console.log("checkShowAvatar ");
|
||||
let type = message.type;
|
||||
console.log("message type: ", type);
|
||||
// console.log("message type: ", type);
|
||||
let show_avatar = true;
|
||||
if(type === "TIMCustomElem"){
|
||||
const customMessage = JSON.parse(message.payload.data);
|
||||
if(customMessage.message_type != GDXZ_CUSTOM_MSEEAGE.PRESCRIBE){
|
||||
if(Number(customMessage.message_type) != GDXZ_CUSTOM_MSEEAGE.PRESCRIBE && Number(customMessage.message_type) != GDXZ_CUSTOM_MSEEAGE.PRESCRIBE_VERIFY){
|
||||
show_avatar = false;
|
||||
}
|
||||
|
||||
if(customMessage.message_type != GDXZ_CUSTOM_MSEEAGE.TRABECULA){
|
||||
|
||||
if(Number(customMessage.message_type) == GDXZ_CUSTOM_MSEEAGE.TRABECULA && refreshBaseInfo){
|
||||
const title = customMessage.title
|
||||
if(title.indexOf("问诊已结束") > -1){
|
||||
//收到横条消息去触发父组件getbase方法
|
||||
this.triggerEvent('getInquiryMessageBasic');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return show_avatar;
|
||||
},
|
||||
// 历史消息渲染
|
||||
$handleMessageRender(messageList, currentMessageList) {
|
||||
console.log("handleMessageRenderhandleMessageRenderhandleMessageRender");
|
||||
this.showHistoryMessageTime(currentMessageList);
|
||||
// this.showHistoryMessageTime(currentMessageList);
|
||||
if (messageList.length > 0) {
|
||||
if (this.data.conversation.type === '@TIM#SYSTEM') {
|
||||
this.filterRepateSystemMessage(messageList);
|
||||
@ -270,11 +344,12 @@ Component({
|
||||
let autoToButtom = this.data.autoToButtom;
|
||||
console.log("autoToButtom:", autoToButtom)
|
||||
const message = value.data[0];
|
||||
|
||||
//更新会话数
|
||||
this.refreshMessageRounds(message)
|
||||
if(message.flow == 'out'){
|
||||
message.isRead = false;
|
||||
}
|
||||
if(!this.checkShowAvatar(message)){
|
||||
if(!this.checkShowAvatar(message, true)){
|
||||
message.no_avatar = true;
|
||||
}
|
||||
wx.$TUIKit.setMessageRead({ conversationID: this.data.conversation.conversationID }).then(() => {
|
||||
@ -283,7 +358,13 @@ Component({
|
||||
console.log('| MessageList | setMessageRead | ok');
|
||||
console.log('message cloudCustomData:', message.cloudCustomData);
|
||||
const { BUSINESS_ID_TEXT, MESSAGE_TYPE_TEXT } = constant;
|
||||
this.messageTimeForShow(message);
|
||||
// this.messageTimeForShow(message);
|
||||
|
||||
let cath_time = this.cachMessageTime(message.time * 1000);
|
||||
message.messageTime = cath_time[0]
|
||||
message.isShowTime = cath_time[1]
|
||||
message.showMessageTime = cath_time[1]
|
||||
|
||||
this.setData({
|
||||
UseData: value,
|
||||
});
|
||||
@ -367,7 +448,7 @@ Component({
|
||||
console.log("自己的消息上屏 updateMessageList: ", message);
|
||||
console.log(message);
|
||||
//自己的消息有头像
|
||||
if(!this.checkShowAvatar(message)){
|
||||
if(!this.checkShowAvatar(message, false)){
|
||||
message.no_avatar = true;
|
||||
}
|
||||
if (message.conversationID !== this.data.conversation.conversationID) return;
|
||||
@ -376,30 +457,31 @@ Component({
|
||||
});
|
||||
const { BUSINESS_ID_TEXT, MESSAGE_TYPE_TEXT } = constant;
|
||||
// this.$onMessageReadByPeer();
|
||||
this.messageTimeForShow(message);
|
||||
// this.messageTimeForShow(message);
|
||||
|
||||
let cath_time = this.cachMessageTime(message.time * 1000);
|
||||
message.messageTime = cath_time[0]
|
||||
message.isShowTime = cath_time[1]
|
||||
message.showMessageTime = cath_time[1]
|
||||
|
||||
if (message.type === MESSAGE_TYPE_TEXT.TIM_CUSTOM_ELEM) {
|
||||
const typingMessage = JSON.parse(message.payload.data);
|
||||
if (typingMessage.businessID === BUSINESS_ID_TEXT.USER_TYPING) {
|
||||
console.log(1111111)
|
||||
this.setData({
|
||||
messageList: this.data.messageList,
|
||||
});
|
||||
} else {
|
||||
console.log(44444)
|
||||
this.data.messageList.push(message);
|
||||
}
|
||||
} else {
|
||||
console.log(55555)
|
||||
console.log(message)
|
||||
this.data.messageList.push(message);
|
||||
}
|
||||
console.log(222222)
|
||||
this.setData({
|
||||
lastMessageSequence: this.data.messageList.slice(-1)[0].sequence,
|
||||
messageList: this.data.messageList,
|
||||
jumpAim: `ID-${this.filterSystemMessageID(this.data.messageList[this.data.messageList.length - 1].ID)}`,
|
||||
}, () => {
|
||||
console.log(333333)
|
||||
this.setData({
|
||||
messageList: this.data.messageList,
|
||||
});
|
||||
@ -584,20 +666,26 @@ Component({
|
||||
this.updateMessageByID(event.detail.message.ID);
|
||||
},
|
||||
// 展示消息时间
|
||||
messageTimeForShow(messageTime) {
|
||||
messageTimeForShow(message) {
|
||||
console.log("messageTimeForShow")
|
||||
const interval = 5 * 60 * 1000;
|
||||
const nowTime = Math.floor(messageTime.time / 10) * 10 * 1000;
|
||||
// const interval = 5 * 60 * 1000;
|
||||
const interval = 5 * 60;
|
||||
const nowTime = Math.floor(message.time / 10) * 10 * 1000;
|
||||
console.log("nowTime: ", nowTime)
|
||||
if (this.data.messageList.length > 0) {
|
||||
const lastTime = this.data.messageList.slice(-1)[0].time * 1000;
|
||||
console.log("nowTime - lastTime=", (nowTime - lastTime))
|
||||
if (nowTime - lastTime > interval) {
|
||||
Object.assign(messageTime, {
|
||||
Object.assign(message, {
|
||||
isShowTime: true,
|
||||
}),
|
||||
this.data.messageTime = dayjs(nowTime);
|
||||
this.data.messageTime = this.cachMessageTime(nowTime)[0];
|
||||
let messageTime = this.cachMessageTime(nowTime);
|
||||
message.messageTime = messageTime[0];
|
||||
message.showMessageTime = messageTime[1];
|
||||
console.log("dayjs(nowTime): ", dayjs(nowTime))
|
||||
this.setData({
|
||||
messageTime: getTimeAgoChat(nowTime/1000),
|
||||
messageTime: this.cachMessageTime(nowTime)[0],
|
||||
showMessageTime: true,
|
||||
});
|
||||
}
|
||||
@ -605,26 +693,17 @@ Component({
|
||||
},
|
||||
// 渲染历史消息时间
|
||||
showHistoryMessageTime(messageList) {
|
||||
const cut = 5 * 60 * 1000;
|
||||
const cut = 5 * 60;
|
||||
for (let index = 0; index < messageList.length; index++) {
|
||||
const nowadayTime = Math.floor(messageList[index].time / 10) * 10 * 1000;
|
||||
const firstTime = messageList[0].time * 1000;
|
||||
console.log("nowadayTime - firstTime=",(nowadayTime - firstTime))
|
||||
console.log("cut",cut)
|
||||
if (nowadayTime - firstTime > cut) {
|
||||
const indexbutton = messageList.map(item => item).indexOf(messageList[index]); // 获取第一个时间大于30分钟的消息所在位置的下标
|
||||
const firstTime = nowadayTime; // 找到第一个数组时间戳大于30分钟的将其值设为初始值
|
||||
const showHistoryTime = Math.floor(messageList[indexbutton].time / 10) * 10 * 1000;
|
||||
Object.assign(messageList[indexbutton], {
|
||||
isShowHistoryTime: true,
|
||||
}),
|
||||
const thismessagetime = Math.floor(messageList[index].time / 10) * 10 * 1000;
|
||||
let messageTime = this.cachMessageTime(thismessagetime);
|
||||
messageList[index].messageTime = messageTime[0]
|
||||
messageList[index].showMessageHistoryTime = messageTime[1]
|
||||
this.setData({
|
||||
firstTime: nowadayTime,
|
||||
messageHistoryTime: getTimeAgoChat(showHistoryTime/1000),
|
||||
showMessageHistoryTime: true,
|
||||
messageHistoryTime: messageTime[0],
|
||||
showMessageHistoryTime: messageTime[1]
|
||||
});
|
||||
return firstTime;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
// 拉取更多历史消息渲染时间
|
||||
@ -633,13 +712,34 @@ Component({
|
||||
const showHistoryTime = messageList[0].time * 1000;
|
||||
Object.assign(messageList[0], {
|
||||
isShowMoreHistoryTime: true,
|
||||
});
|
||||
this.data.newArr[messageList[0].ID] = getTimeAgoChat(showHistoryTime/1000);
|
||||
}),
|
||||
this.data.newArr[messageList[0].ID] = this.cachMessageTime(showHistoryTime)[0];
|
||||
this.setData({
|
||||
newArr: this.data.newArr,
|
||||
});
|
||||
}
|
||||
},
|
||||
cachMessageTime(messageTime){
|
||||
// console.log("cachMessageTime messageTime 参数:", messageTime)
|
||||
let time = wechatTimeFormat(messageTime)
|
||||
// console.log("cachMessageTime: ", time)
|
||||
if(time){
|
||||
// let nowCachTime = time.split(":")[0] //小时级别
|
||||
let nowCachTime = time
|
||||
let cachTime = this.data.cachTime
|
||||
// console.log("nowCachTime: ", nowCachTime)
|
||||
// console.log("cachTime: ", cachTime)
|
||||
if(nowCachTime == cachTime){
|
||||
return [time, false]
|
||||
}else{
|
||||
this.setData({
|
||||
cachTime: nowCachTime
|
||||
})
|
||||
return [time, true]
|
||||
}
|
||||
}
|
||||
return [time, false]
|
||||
},
|
||||
// 消息发送失败
|
||||
sendMessageError(event) {
|
||||
this.setData({
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
"FaceMessage": "../MessageElements/FaceMessage/index",
|
||||
"FileMessage": "../MessageElements/FileMessage/index",
|
||||
"MergerMessage": "../MessageElements/MergerMessage/index",
|
||||
"RevokeMessage": "../MessageElements/RevokeMessage/index"
|
||||
"RevokeMessage": "../MessageElements/RevokeMessage/index",
|
||||
"van-loading": "@vant/weapp/loading/index"
|
||||
}
|
||||
}
|
||||
@ -1,16 +1,19 @@
|
||||
<view class="container">
|
||||
|
||||
<scroll-view class="message-list-container" scroll-y="true" scroll-into-view="{{jumpAim}}" refresher-enabled="{{true}}" bindrefresherrefresh="refresh" refresher-triggered="{{triggered}}" lower-threshold="200" bindscrolltolower="scrollHandler">
|
||||
<scroll-view class="message-list-container" scroll-y="true" scroll-into-view="{{jumpAim}}" refresher-enabled="{{true}}" bindrefresherrefresh="refresh" refresher-triggered="{{triggered}}" lower-threshold="200" bindscrolltolower="scrollHandler" bindscrolltoupper="refresh" upper-threshold="100">
|
||||
<view class="no-message" wx:if="{{isCompleted}}">没有更多啦</view>
|
||||
<view style="width: 100%;text-align: center;position: absolute;top: 50%;">
|
||||
<van-loading size="24px" wx:if="{{list_first_loading}}">加载中...</van-loading>
|
||||
</view>
|
||||
<view class="t-message" wx:if="{{conversation.type !== '@TIM#SYSTEM'}}" wx:for="{{messageList}}" wx:key="index" data-index ='{{index}}'>
|
||||
<view class="time-pop-mask" data-value="{{item.time}}" wx:if="{{showMessageTime}}">
|
||||
<view class="time-pop-mask" data-value="{{item.time}}" wx:if="{{item.showMessageTime}}">
|
||||
<view class="showmessagetime 1" wx:if="{{item.isShowTime}}">
|
||||
<text class="time" wx:if="{{!item.isDeleted && !item.isRevoked}}">{{messageTime}} </text>
|
||||
<text class="time" wx:if="{{!item.isDeleted && !item.isRevoked}}">{{item.messageTime}} </text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time-pop-mask" data-value="{{item.time}}" wx:if="{{showMessageHistoryTime}}">
|
||||
<view class="time-pop-mask" data-value="{{item.time}}" wx:if="{{item.showMessageHistoryTime}}">
|
||||
<view class="showmessagetime 2" wx:if="{{item.isShowHistoryTime && !item.isShowTime && !item.isShowMoreHistoryTime}}">
|
||||
<text class="time" wx:if="{{!item.isDeleted && !item.isRevoked}}">{{messageHistoryTime}} </text>
|
||||
<text class="time" wx:if="{{!item.isDeleted && !item.isRevoked}}">{{item.messageTime}} </text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time-pop-mask" wx:if="{{item.isShowMoreHistoryTime}}">
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
.t-message-avatar {
|
||||
margin-left: 20rpx;
|
||||
margin-right: 12rpx;
|
||||
border-radius: 10rpx;
|
||||
border-radius: 50%;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
@ -76,9 +76,17 @@ Component({
|
||||
if (app?.globalData?.reportType === constant.OPERATING_ENVIRONMENT) {
|
||||
this.setData({
|
||||
showTips: true,
|
||||
message_rounds: 0
|
||||
});
|
||||
}
|
||||
this.getNavbarHeight()
|
||||
wx.onKeyboardHeightChange(res => {
|
||||
console.log("键盘高度:", res.height)
|
||||
this.setData({
|
||||
keysboards_height: res.height
|
||||
})
|
||||
this.getNavbarHeight();
|
||||
})
|
||||
},
|
||||
|
||||
ready() {
|
||||
@ -131,13 +139,23 @@ Component({
|
||||
},
|
||||
navbar_height: 0,
|
||||
dialog_visible: false,
|
||||
KeysBoardsStatus: "down"
|
||||
KeysBoardsStatus: "down",
|
||||
message_rounds: 0,
|
||||
keysboards_height: 0
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
refreshMessageRounds(e){
|
||||
console.log("TUIchat refreshMessageRounds", e)
|
||||
let message_rounds = e.detail.message_rounds
|
||||
console.log("TUIchat refreshMessageRounds message_rounds:", message_rounds)
|
||||
this.setData({
|
||||
message_rounds: message_rounds
|
||||
})
|
||||
},
|
||||
getNavbarHeight(addHeight){
|
||||
let rect = null;
|
||||
if (wx.getMenuButtonBoundingClientRect) {
|
||||
@ -153,6 +171,11 @@ Component({
|
||||
if(addHeight){
|
||||
height = height + addHeight
|
||||
}
|
||||
let keysboards_height = this.data.keysboards_height
|
||||
console.log("getNavbarHeight 键盘高度:", keysboards_height)
|
||||
if(keysboards_height){
|
||||
height = height + keysboards_height
|
||||
}
|
||||
this.setData({
|
||||
navbar_height: height
|
||||
})
|
||||
@ -241,7 +264,12 @@ Component({
|
||||
this.selectComponent('#MessageList').sendMessageError(event);
|
||||
},
|
||||
triggerClose() {
|
||||
console.log("message-list triggerClose")
|
||||
if(this.data.baseInfo.inquiry_status == 4){
|
||||
this.selectComponent('#MessageInput').handleClose();
|
||||
}
|
||||
wx.hideKeyboard()
|
||||
this.getNavbarHeight()
|
||||
},
|
||||
handleCall(event) {
|
||||
if (event.detail.conversationType === wx.$TUIKitTIM.TYPES.CONV_GROUP) {
|
||||
@ -274,6 +302,7 @@ Component({
|
||||
},
|
||||
myhandleExtensions(e){
|
||||
console.log("myhandleExtensionsmyhandleExtensions: ", e);
|
||||
wx.hideKeyboard()
|
||||
let displayFlag = e.detail.displayFlag;
|
||||
setTimeout(() => {
|
||||
if(displayFlag){
|
||||
@ -288,25 +317,27 @@ Component({
|
||||
})
|
||||
this.getNavbarHeight();
|
||||
}
|
||||
|
||||
}, 10);
|
||||
}, 100);
|
||||
},
|
||||
// 监听键盘,获取焦点时将输入框推到键盘上方
|
||||
pullKeysBoards(event) {
|
||||
console.log("pullKeysBoardspullKeysBoards")
|
||||
setNewInputStyle(event.detail.event.detail.height);
|
||||
|
||||
this.getNavbarHeight();
|
||||
this.setData({
|
||||
'viewData.style': newInputStyle,
|
||||
input_area_style: "position: absolute; bottom: 45rpx;",
|
||||
input_area_style: "position: absolute; bottom: 52rpx;",
|
||||
KeysBoardsStatus: "pull"
|
||||
});
|
||||
this.selectComponent('#MessageList').handleJumpNewMessage();
|
||||
},
|
||||
// 监听键盘,失去焦点时收起键盘
|
||||
downKeysBoards(event) {
|
||||
console.log("downKeysBoardsdownKeysBoards")
|
||||
console.log(event)
|
||||
let value = event.detail.event.detail.value;
|
||||
this.getNavbarHeight();
|
||||
if(value){
|
||||
this.setData({
|
||||
'viewData.style': inputStyle,
|
||||
|
||||
@ -16,27 +16,30 @@
|
||||
<image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_black.svg" />
|
||||
<view class="conversation-title">{{conversationName}}</view>
|
||||
</view> -->
|
||||
<view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}}" style="height: calc(100vh - 197rpx - 100rpx - {{navbar_height}}px);"><!-- 100vh -input-area高度 - info高度 -navbar高度 -->
|
||||
<view class="list-box {{ showTips && 'list-box-notips'}} || {{ showGroupTips && 'list-box-group'}} || {{ showAll && 'list-box-group-notips'}}" style="height: calc(100vh {{baseInfo.inquiry_status==4?'- 197rpx':'+ 20px'}} - 100rpx - {{navbar_height}}px);"><!-- 100vh -input-area高度 - info高度 -navbar高度 -->
|
||||
<!-- <view wx:if="{{showTips}}" class="safetytips-box"> -->
|
||||
<!-- <view class="safetytips">
|
||||
<text>【安全提示】本 APP 仅用于体验腾讯云即时通信 IM 产品功能,不可用于业务洽谈与拓展。请勿轻信汇款、中奖等涉及钱款等信息,勿轻易拨打陌生电话,谨防上当受骗。</text>
|
||||
<span class="report" bindtap="handleReport">点此投诉</span>
|
||||
</view> -->
|
||||
<!-- </view> -->
|
||||
<!-- <scroll-view class="message-list" bindtap="triggerClose"> -->
|
||||
<MessageList bind:getInquiryMessageBasic="getInquiryMessageBasic" id="MessageList" conversation="{{conversation}}" unreadCount="{{unreadCount}}" bind:changeMemberCount="changeMemberCount" bind:resendMessage="resendMessage" bind:typing="typing" order_inquiry_id="{{order_inquiry_id}}"></MessageList>
|
||||
<!-- </scroll-view> -->
|
||||
<scroll-view class="message-list" bindtap="triggerClose">
|
||||
<MessageList
|
||||
bind:getInquiryMessageBasic="getInquiryMessageBasic"
|
||||
bind:refreshMessageRounds="refreshMessageRounds"
|
||||
id="MessageList" conversation="{{conversation}}" unreadCount="{{unreadCount}}" bind:changeMemberCount="changeMemberCount" bind:resendMessage="resendMessage" bind:typing="typing" order_inquiry_id="{{order_inquiry_id}}"></MessageList>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="group-profile">
|
||||
<TUIGroup id="TUIGroup" wx:if="{{isShow}}" conversation="{{conversation}}" bind:groupCall="groupCall" bind:showConversationList="showConversationList"></TUIGroup>
|
||||
</view>
|
||||
<view class="input-area" style="{{input_area_style}}">
|
||||
<view class="input-area" style="{{input_area_style}}" wx:if="{{baseInfo.inquiry_status==4}}">
|
||||
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
|
||||
<MessageInput bind:myhandleExtensions="myhandleExtensions" id="MessageInput" inquiry_type="{{inquiry_type}}" baseInfo="{{baseInfo}}" 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" message_rounds="{{message_rounds}}"></MessageInput>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 40px;position: fixed;bottom: 0;width: 100%;background-color: #fff;z-index: 1;">
|
||||
<view style="height: 40px;position: fixed;bottom: 0;width: 100%;background-color: #fff;z-index: 1;" wx:if="{{baseInfo.inquiry_status==4}}">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
12
app.js
12
app.js
@ -66,7 +66,7 @@ App({
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
this.imInit();
|
||||
// this.imInit();
|
||||
},
|
||||
imInit(){
|
||||
|
||||
@ -87,6 +87,10 @@ App({
|
||||
if(!wx.$TUIKit){
|
||||
//获取im签名数据
|
||||
return api.getSignIM().then(response => {
|
||||
let from = response.from
|
||||
if(from != "cache"){
|
||||
wx.setStorageSync(userID + '_imsign', {"sign":response.data,"date":new Date().getTime()})
|
||||
}
|
||||
return response.data;
|
||||
}).then((userSig) => {
|
||||
console.log("userSig: ", userSig);
|
||||
@ -237,9 +241,9 @@ App({
|
||||
aegisInit() {
|
||||
wx.aegis = new Aegis({
|
||||
id: 'iHWefAYquFxvklBblC', // 项目key
|
||||
reportApiSpeed: true, // 接口测速
|
||||
reportAssetSpeed: true, // 静态资源测速
|
||||
pagePerformance: true, // 开启页面测速
|
||||
reportApiSpeed: false, // 接口测速
|
||||
reportAssetSpeed: false, // 静态资源测速
|
||||
pagePerformance: false, // 开启页面测速
|
||||
});
|
||||
},
|
||||
globalData: {
|
||||
|
||||
10
app.json
10
app.json
@ -48,13 +48,15 @@
|
||||
"Pages/login/index",
|
||||
"Pages/mobile_login/index",
|
||||
"Pages/yishi/manual_detail/index",
|
||||
"Pages/yishi/agreement_detail/index",
|
||||
"Pages/yishi/addzhenduan/index",
|
||||
"Pages/yishi/wenzhen_v2/wenzhen",
|
||||
"Pages/webpage/index",
|
||||
"Pages/kickedout/index",
|
||||
"Pages/yishi/onlinesetupprice/index",
|
||||
"Pages/yishi/yizhensetupprice/index",
|
||||
"Pages/yishi/wenzhenorderV2/index"
|
||||
"Pages/yishi/wenzhenorderV2/index",
|
||||
"Pages/yishi/wenzhen_v3/wenzhen"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
@ -82,19 +84,19 @@
|
||||
},
|
||||
{
|
||||
"pagePath": "Pages/yishi/index/index",
|
||||
"text": "首页(Y)",
|
||||
"text": "首页",
|
||||
"iconPath": "/static/images/yishi/tabbar_icon/index.png",
|
||||
"selectedIconPath": "/static/images/yishi/tabbar_icon/index_select.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "Pages/yishi/wenzhen_v2/wenzhen",
|
||||
"text": "问诊(Z)",
|
||||
"text": "问诊",
|
||||
"iconPath": "/static/images/yishi/tabbar_icon/wenzhen.png",
|
||||
"selectedIconPath": "/static/images/yishi/tabbar_icon/wenzhen_select.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "Pages/yishi/my/index",
|
||||
"text": "我的(Y)",
|
||||
"text": "我的",
|
||||
"iconPath": "/static/images/yishi/tabbar_icon/my.png",
|
||||
"selectedIconPath": "/static/images/yishi/tabbar_icon/my_select.png"
|
||||
}
|
||||
|
||||
@ -46,24 +46,7 @@ Component({
|
||||
select_keshi_index: "",
|
||||
custom_keshi: "",
|
||||
zhicheng_note: "请选择职称",
|
||||
zhicheng_columns: [
|
||||
{
|
||||
text: "执业医师",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: "主治医师",
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
text: "副主任医师",
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
text: "主任医师",
|
||||
value: 4
|
||||
}
|
||||
],
|
||||
zhicheng_columns: [],
|
||||
select_zhicheng_id: "",
|
||||
select_zhicheng_index: "",
|
||||
select_yiyuan_index: "",
|
||||
@ -86,6 +69,7 @@ Component({
|
||||
doctorauthiden_data_ready: false,
|
||||
basicdepartment_data_ready: false,
|
||||
areaprovince_data_ready: false,
|
||||
basicdoctortitle_data_ready: false,
|
||||
iden_auth_status: 0,
|
||||
iden_auth_disabled: 0,
|
||||
iden_auth_status_txt: "未认证",
|
||||
@ -140,7 +124,7 @@ Component({
|
||||
});
|
||||
let iden_auth_status = response.data.iden_auth_status;
|
||||
console.log("iden_auth_status: ",iden_auth_status)
|
||||
let iden_auth_status_txt = iden_auth_status == 0?'请完善资料后提交':iden_auth_status == 1?'认证通过': iden_auth_status==2?'资料已提交,审核中':iden_auth_status==3?'认证失败':'未认证';
|
||||
let iden_auth_status_txt = iden_auth_status == 0?'请完善资料后提交':iden_auth_status == 1?'认证通过': iden_auth_status==2?'资料已提交,审核中':iden_auth_status==3?'认证失败,修改后重新提交':'未认证';
|
||||
|
||||
let iden_auth_disabled = iden_auth_status == 0?false:iden_auth_status == 1?true: iden_auth_status==2?true:iden_auth_status==3?false:true;
|
||||
console.log("iden_auth_disabled: ",iden_auth_disabled)
|
||||
@ -210,6 +194,16 @@ Component({
|
||||
})
|
||||
}).catch(errors => {console.error(errors); })
|
||||
|
||||
//加载职称列表
|
||||
api.getBasicDoctorTitle().then(response => {
|
||||
console.log(response);
|
||||
const list = _this.formatZhiCheng(response);
|
||||
_this.setData({
|
||||
basicdoctortitle_data_ready: true,
|
||||
zhicheng_columns: list
|
||||
})
|
||||
}).catch(errors => {console.error(errors); })
|
||||
|
||||
//加载专长列表
|
||||
api.getDoctorExpertise().then(response => {
|
||||
console.log(response);
|
||||
@ -254,15 +248,18 @@ Component({
|
||||
}
|
||||
keshi_huixian = true;
|
||||
}
|
||||
|
||||
//回显职称
|
||||
if(_this.data.doctorauthiden_data_ready){
|
||||
if(_this.data.doctorauthiden_data_ready && _this.data.basicdoctortitle_data_ready){
|
||||
let index = _this.data.zhicheng_columns.findIndex(item => {
|
||||
return item.value == _this.data.select_zhicheng_id
|
||||
})
|
||||
if(index > -1){
|
||||
_this.setData({
|
||||
select_zhicheng_index: index,
|
||||
zhicheng_note: _this.data.zhicheng_columns[index].text
|
||||
})
|
||||
}
|
||||
zhicheng_huixian = true;
|
||||
}
|
||||
|
||||
@ -485,6 +482,16 @@ Component({
|
||||
});
|
||||
return list;
|
||||
},
|
||||
formatZhiCheng(response){
|
||||
let list = [];
|
||||
response.data.forEach(item => {
|
||||
let data = {};
|
||||
data.text = item.doctor_title_name;
|
||||
data.value = item.doctor_title_id;
|
||||
list.push(data)
|
||||
});
|
||||
return list;
|
||||
},
|
||||
formatZhuanChang(response){
|
||||
let list = [];
|
||||
response.data.forEach(item => {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<view class="right">
|
||||
<view class="note">真人正脸</view>
|
||||
<t-avatar image="{{ avatar }}" />
|
||||
<view class="icon">
|
||||
<view class="icon" wx:if="{{ !(indentity && iden_auth_disabled) }}">
|
||||
<t-icon name="chevron-right" size="48rpx" data-name="chevron-right" />
|
||||
</view>
|
||||
</view>
|
||||
@ -20,7 +20,7 @@
|
||||
</view>
|
||||
|
||||
<!-- <t-cell title="头像" hover required arrow note="真人正脸" /> -->
|
||||
<t-cell title="城市" hover required arrow note="{{ city_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onCityShow'}}"/>
|
||||
<t-cell title="城市" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{ city_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onCityShow'}}"/>
|
||||
|
||||
<t-cascader
|
||||
visible="{{ city_show }}"
|
||||
@ -33,7 +33,7 @@
|
||||
bind:close="onCloseCity"
|
||||
></t-cascader>
|
||||
|
||||
<t-cell title="医院" hover required arrow note="{{ yiyuan_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onYiYuanShow'}}"/>
|
||||
<t-cell title="医院" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{ yiyuan_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onYiYuanShow'}}"/>
|
||||
<van-popup
|
||||
show="{{ yiyuan_show }}"
|
||||
position="bottom"
|
||||
@ -63,7 +63,7 @@
|
||||
<van-empty description="暂无医院" wx:if="{{yiyuan_columns.length == 0}}"/>
|
||||
|
||||
</van-popup>
|
||||
<t-cell title="科室" hover required arrow note="{{keshi_note}}"
|
||||
<t-cell title="科室" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{keshi_note}}"
|
||||
bindtap="{{(indentity && iden_auth_disabled)?'':'onKeshiShow'}}" bordered="{{ select_keshi_id == '' }}"/>
|
||||
|
||||
<view class="custom_keshi" wx:if="{{ select_keshi_id != ''}}">
|
||||
@ -219,7 +219,7 @@
|
||||
</view>
|
||||
</t-popup>
|
||||
|
||||
<t-cell title="职称" hover required arrow note="{{zhicheng_note}}"
|
||||
<t-cell title="职称" hover required arrow="{{ !(indentity && iden_auth_disabled) }}" note="{{zhicheng_note}}"
|
||||
bindtap="{{(indentity && iden_auth_disabled)?'':'onZhiChengShow'}}" />
|
||||
<!-- <t-input
|
||||
label="科室电话"
|
||||
@ -262,7 +262,7 @@
|
||||
|
||||
<view class="right">
|
||||
<view class="note">{{zhuanchang_note}}</view>
|
||||
<view class="icon">
|
||||
<view class="icon" wx:if="{{ !(indentity && iden_auth_disabled) }}">
|
||||
<t-icon name="chevron-right" size="48rpx" data-name="chevron-right" />
|
||||
</view>
|
||||
</view>
|
||||
@ -272,16 +272,19 @@
|
||||
textarea_cell_name="个人简介"
|
||||
t_icon_name="view-module"
|
||||
bind:showNote="onshowJianJieNote"
|
||||
textarea_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
textarea_cell_content_placeholder="您目前就职医院与科室、社会兼职、所获荣誉、参与科研课题及发表论文等信息(10~1000字)"
|
||||
textarea_val="{{textarea_jianjie}}"
|
||||
disabled="{{(indentity && iden_auth_disabled)}}"
|
||||
has_error_content="{{ brief_introduction_reason }}"
|
||||
data-textarea_name="textarea_jianjie" bindTextAreaBlur="getTextAreaVal" />
|
||||
data-textarea_name="textarea_jianjie"
|
||||
bindTextAreaBlur="getTextAreaVal" />
|
||||
|
||||
<m-textarea-cell
|
||||
textarea_cell_name="擅长领域"
|
||||
t_icon_name="view-module"
|
||||
bind:showNote="onshowShanChangNote"
|
||||
textarea_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
disabled="{{(indentity && iden_auth_disabled)}}"
|
||||
textarea_val="{{textarea_shanchang}}"
|
||||
has_error_content="{{ be_good_at_reason }}"
|
||||
@ -297,6 +300,8 @@
|
||||
data-field_name="zhiye_file_list"
|
||||
data-file_multiple="true"
|
||||
bind:showNote="onshowZhiYeNote"
|
||||
upload_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
deletable="{{!(indentity && iden_auth_disabled)}}"
|
||||
bindUploadFile="doUploadFile"
|
||||
bindDeleteFile="doDeleteFile"
|
||||
upload_cell_desc="请提供清晰的执业证书原件照片,照片需包含证书编号、加盖钢印的证书照片及姓名、执业范围、执业医院等信息,最少上传2张。"
|
||||
@ -320,6 +325,8 @@
|
||||
bind:showNote="onshowZiGeNote"
|
||||
upload_cell_desc="请提供清晰的资格证书原件照片,照片需包含证书编号、加盖钢印的证书照片、姓名等信息,最少上传1张。"
|
||||
upload_cell_note="查看示例"
|
||||
upload_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
deletable="{{!(indentity && iden_auth_disabled)}}"
|
||||
has_error_content="{{ qualification_cert_reason }}"
|
||||
wx:if="{{indentity}}"
|
||||
disabled="{{(indentity && iden_auth_disabled)}}"
|
||||
@ -339,6 +346,8 @@
|
||||
bindDeleteFile="doDeleteFile"
|
||||
upload_cell_desc="请提供清晰的职称证书原件照片,照片需包含编号、加盖钢印的证书照片、姓名及职称等信息,最少上传1张。"
|
||||
upload_cell_note="查看示例"
|
||||
upload_cell_note_show="{{!(indentity && iden_auth_disabled)}}"
|
||||
deletable="{{!(indentity && iden_auth_disabled)}}"
|
||||
has_error_content="{{ work_cert_reason }}"
|
||||
wx:if="{{indentity}}"
|
||||
disabled="{{(indentity && iden_auth_disabled)}}"
|
||||
|
||||
@ -229,3 +229,38 @@
|
||||
.jianjie_popup{
|
||||
margin: 100rpx 20rpx;
|
||||
}
|
||||
.has_error{
|
||||
margin-left: 32rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #e7e7e7;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
@ -20,6 +20,10 @@ Component({
|
||||
type: String,
|
||||
value: '查看示例',
|
||||
},
|
||||
textarea_cell_note_show:{
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
textarea_cell_content_placeholder: {
|
||||
type: String,
|
||||
value: '请输入文字',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<view class="textarea-cell">
|
||||
<view class="textarea-cell-top">
|
||||
<view class="textarea-cell-name">{{ textarea_cell_name }}<text wx:if="{{ required }}" class="required"> *</text></view>
|
||||
<view class="textarea-cell-note t-cell__note" bindtap="onshowNote">
|
||||
<view class="textarea-cell-note t-cell__note" bindtap="onshowNote" wx:if="{{textarea_cell_note_show}}">
|
||||
<view><t-icon name="{{ t_icon_name }}" size="{{ t_icon_size}}" data-name="{{ t_icon_name }}" /></view>
|
||||
<text style="font-size: 28rpx;">{{ textarea_cell_note }}</text>
|
||||
</view>
|
||||
|
||||
@ -20,6 +20,14 @@ Component({
|
||||
type: String,
|
||||
value: '示例备注',
|
||||
},
|
||||
upload_cell_note_show:{
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
deletable:{
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
upload_cell_desc: {
|
||||
type: String,
|
||||
value: '示例描述',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<view class="upload-cell">
|
||||
<view class="upload-cell-top">
|
||||
<view class="upload-cell-name">{{ upload_cell_name }}<text wx:if="{{ required }}" class="required"> *</text></view>
|
||||
<view class="upload-cell-note t-cell__note" bindtap="onshowNote" wx:if="{{upload_cell_note != ''}}">
|
||||
<view class="upload-cell-note t-cell__note" bindtap="onshowNote" wx:if="{{upload_cell_note_show}}">
|
||||
<view><t-icon name="{{ t_icon_name }}" size="{{ t_icon_size}}" data-name="{{ t_icon_name }}" /></view>
|
||||
<text style="font-size: 28rpx;">{{ upload_cell_note }}</text>
|
||||
</view>
|
||||
@ -10,7 +10,7 @@
|
||||
<text>{{ upload_cell_desc }}</text>
|
||||
</view>
|
||||
<view class="upload-cell-input">
|
||||
<van-uploader disabled="{{disabled}}" multiple="{{is_multiple}}" preview-full-image="{{false}}" file-list="{{ fileList }}" max-count="{{max_count}}" deletable="{{ true }}" bind:after-read="afterRead" bind:delete="delete" >
|
||||
<van-uploader disabled="{{disabled}}" multiple="{{is_multiple}}" preview-full-image="{{true}}" file-list="{{ fileList }}" max-count="{{max_count}}" deletable="{{ deletable }}" bind:after-read="afterRead" bind:delete="delete" >
|
||||
<van-image width="100" height="100" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/upload_button.png" />
|
||||
</van-uploader>
|
||||
</view>
|
||||
|
||||
@ -80,7 +80,7 @@ var relation_1 = require("../common/relation");
|
||||
},
|
||||
swipeThreshold: {
|
||||
type: Number,
|
||||
value: 5,
|
||||
value: 4,
|
||||
observer: function (value) {
|
||||
this.setData({
|
||||
scrollable: this.children.length > value || !this.data.ellipsis,
|
||||
|
||||
@ -21,8 +21,7 @@ class API extends HTTP {
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
},
|
||||
showLoading: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取城市信息
|
||||
@ -32,8 +31,7 @@ class API extends HTTP {
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
},
|
||||
showLoading: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取区县信息
|
||||
@ -43,8 +41,7 @@ class API extends HTTP {
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
},
|
||||
showLoading: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取医院数据
|
||||
@ -54,8 +51,7 @@ class API extends HTTP {
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
},
|
||||
showLoading: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取自定义科室数据
|
||||
@ -65,8 +61,7 @@ class API extends HTTP {
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
},
|
||||
showLoading: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取医生专长列表
|
||||
@ -76,8 +71,7 @@ class API extends HTTP {
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
},
|
||||
showLoading: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//使用微信手机号登陆
|
||||
@ -542,6 +536,24 @@ class API extends HTTP {
|
||||
}
|
||||
//获取im签名数据
|
||||
getSignIM(params) {
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
let imsign = wx.getStorageSync(userID + '_imsign');
|
||||
console.log("缓存中的imsign:", imsign)
|
||||
|
||||
if(imsign){
|
||||
const date = imsign.date;
|
||||
var minute = 1000 * 60;
|
||||
var hour = minute *60;
|
||||
var day = hour *24;
|
||||
if(new Date().getTime() - date < day){
|
||||
console.log("小于一天从缓存中获取imsign")
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve({"data": imsign.sign,"from":"cache"})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/sign/im`,
|
||||
method: 'GET',
|
||||
@ -550,6 +562,7 @@ class API extends HTTP {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//药师基本资料
|
||||
getPharmacistInfo(params) {
|
||||
return this.request({
|
||||
@ -729,6 +742,51 @@ class API extends HTTP {
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/doctor/inquiry/finish/message`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
},
|
||||
showLoading: false
|
||||
})
|
||||
}
|
||||
//获取协议内容
|
||||
getBasicAgreement(params) {
|
||||
let agreement_id = params.agreement_id;
|
||||
params = {}
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/basic/agreement/`+agreement_id,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取弹窗
|
||||
getPopup(params) {
|
||||
let agreement_id = params.agreement_id;
|
||||
params = {}
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/popup`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
//检测是否可以开具处方
|
||||
getDoctorPrescriptionCheck(params) {
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/doctor/prescription/check`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取医生职称数据
|
||||
getBasicDoctorTitle(params) {
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/basic/doctor/title`,
|
||||
method: 'GET',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
|
||||
@ -73,11 +73,11 @@ const getTimeAgo = stringTime =>{
|
||||
if(time < 0){
|
||||
return '刚刚';
|
||||
}else if(time/month >= 1){
|
||||
result = formatChatTime(new Date(time2));
|
||||
result = (new Date(time2)).Format("yyyy-MM-dd hh:mm:ss");
|
||||
}else if(time/week >= 1){
|
||||
result = formatChatTime(new Date(time2));
|
||||
result = (new Date(time2)).Format("MM-dd hh:mm:ss");
|
||||
}else if(time/day >= 1){
|
||||
result = formatChatTime(new Date(time2));
|
||||
result = (new Date(time2)).Format("MM-dd hh:mm");
|
||||
}else if(time/hour >= 1){
|
||||
result = parseInt(time/hour) + "小时前";
|
||||
}else if(time/minute >= 1){
|
||||
@ -89,34 +89,64 @@ const getTimeAgo = stringTime =>{
|
||||
}
|
||||
|
||||
const getTimeAgoChat = stringTime =>{
|
||||
console.log("stringTime: ", 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 time2 = stringTime;//指定时间的时间戳
|
||||
var time = time1 - time2;
|
||||
var result = null;
|
||||
if(time < 0){
|
||||
return '刚刚';
|
||||
}else if(time/month >= 1){
|
||||
result = formatChatTime(new Date(time2));
|
||||
result = (new Date(time2)).Format("yyyy-MM-dd hh:mm:ss");
|
||||
}else if(time/week >= 1){
|
||||
result = formatChatTime(new Date(time2));
|
||||
result = (new Date(time2)).Format("MM-dd hh:mm:ss");
|
||||
}else if(time/day >= 1){
|
||||
result = formatChatTime(new Date(time2));
|
||||
}else if(time/day == 1){
|
||||
result = new Date(time2).Format("MM-dd hh:mm");
|
||||
result = (new Date(time2)).Format("MM-dd hh:mm");
|
||||
}else if(time/hour >= 1){
|
||||
result = new Date(time2).Format("hh:mm");
|
||||
result = parseInt(time/hour) + "小时前";
|
||||
}else if(time/minute >= 1){
|
||||
result = new Date(time2).Format("hh:mm");
|
||||
result = parseInt(time/minute) + "分钟前";
|
||||
}else {
|
||||
result = "刚刚";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//仿微信时间显示
|
||||
const likeWeChatTimeAgoChat = stringTime =>{
|
||||
console.log("stringTime: ", 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;//指定时间的时间戳
|
||||
var time = time1 - time2;
|
||||
var result = null;
|
||||
if(time < 0){
|
||||
return '刚刚';
|
||||
}else if(time/month >= 1){
|
||||
result = (new Date(time2)).Format("yyyy-MM-dd hh:mm:ss");
|
||||
}else if(time/week >= 1){
|
||||
result = (new Date(time2)).Format("MM-dd hh:mm:ss");
|
||||
}else if(time/day >= 1){
|
||||
result = (new Date(time2)).Format("MM-dd hh:mm");
|
||||
}else if(time/hour >= 1){
|
||||
result = parseInt(time/hour) + "小时前";
|
||||
}else if(time/minute >= 1){
|
||||
result = parseInt(time/minute) + "分钟前";
|
||||
}else {
|
||||
result = "刚刚";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// px 转换为 rpx ,传参类型是数字(Number)
|
||||
const rpxTopx = px => {
|
||||
let deviceWidth = wx.getSystemInfoSync().windowWidth; //获取设备屏幕宽度
|
||||
@ -130,5 +160,6 @@ module.exports = {
|
||||
formatNumber,
|
||||
getTimeAgo,
|
||||
rpxTopx,
|
||||
getTimeAgoChat
|
||||
getTimeAgoChat,
|
||||
likeWeChatTimeAgoChat
|
||||
}
|
||||
|
||||
121
utils/wechatTime.js
Normal file
121
utils/wechatTime.js
Normal file
@ -0,0 +1,121 @@
|
||||
// 星期格式转换 0-6:周日到周六
|
||||
function weekFormat(e, prefix = "周") {
|
||||
switch (e) {
|
||||
case 0:
|
||||
return prefix + "日"
|
||||
break;
|
||||
case 1:
|
||||
return prefix + "一"
|
||||
break;
|
||||
case 2:
|
||||
return prefix + "二"
|
||||
break;
|
||||
case 3:
|
||||
return prefix + "三"
|
||||
break;
|
||||
case 4:
|
||||
return prefix + "四"
|
||||
break;
|
||||
case 5:
|
||||
return prefix + "五"
|
||||
break;
|
||||
case 6:
|
||||
return prefix + "六"
|
||||
break;
|
||||
default:
|
||||
return ""
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 转换今日的时辰格式
|
||||
function todayTimeFormat(e) {
|
||||
if (e >= 0 && e < 7) {
|
||||
return "凌晨"
|
||||
} else if (e >= 7 && e < 11) {
|
||||
return "上午"
|
||||
} else if (e >= 11 && e < 13) {
|
||||
return "中午"
|
||||
} else if (e >= 13 && e < 18) {
|
||||
return "下午"
|
||||
} else if (e >= 18 && e < 24) {
|
||||
return "晚上"
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
// 是否显示周几
|
||||
function isShowWeekDay(sub, weekDay) {
|
||||
const currentWeekDay = new Date().getDay()
|
||||
const dayTime = 1000 * 60 * 60 * 24
|
||||
// 1.当前时间与消息时间相差必须大于2天小于7天
|
||||
// 2.当前时间距离本周一相差必须大于2天且小于当前距离周一的天数
|
||||
// 3.消息时间不可能是0-周日,因为周日没有给后面时间留空间,不会走这里的逻辑,而是走今天的逻辑
|
||||
if (sub >= dayTime * 2 && weekDay !== 0 && sub <= dayTime * currentWeekDay) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 仿微信时间显示格式转换 @time 时间戳毫秒
|
||||
function wechatTimeFormat(time) {
|
||||
const today = new Date().getTime()
|
||||
// 当前时间减去获取到的时间
|
||||
const sub = today - time
|
||||
const day = 1000 * 60 * 60 * 24
|
||||
const timeDate = new Date(time)
|
||||
const currentYear = new Date().getFullYear()
|
||||
const getYear = new Date(time).getFullYear()
|
||||
const HHmm = `${formatTime2("hh", timeDate)}:${formatTime2("mm", timeDate)}`
|
||||
const showWeekDay = isShowWeekDay(sub, timeDate.getDay())
|
||||
const currentDay = new Date().getDate()
|
||||
const getDay = new Date(time).getDate()
|
||||
const subDay = currentDay - getDay
|
||||
if (currentYear > getYear) {
|
||||
return `${formatTime2("yyyy-MM-dd", timeDate)} ${formatTime2("hh:mm", timeDate)}`
|
||||
// 上午下午
|
||||
return `${formatTime2("yyyy年MM月dd日", timeDate)} ${todayTimeFormat(timeDate.getHours())} ${formatTime2("hh:mm", timeDate)}`
|
||||
} else if (showWeekDay) {
|
||||
return `${weekFormat(timeDate.getDay())} ${HHmm}`
|
||||
//} else if (sub > day && sub < day * 2) {
|
||||
} else if (subDay === 1) {
|
||||
return `昨天 ${HHmm}`
|
||||
} else if (sub <= day) {
|
||||
return HHmm
|
||||
} else {
|
||||
return `${formatTime2("MM-dd", timeDate)} ${formatTime2("hh:mm", timeDate)}`
|
||||
// 上午下午
|
||||
return `${formatTime2("MM月dd日", timeDate)} ${todayTimeFormat(timeDate.getHours())} ${formatTime2("hh:mm", timeDate)}`
|
||||
}
|
||||
}
|
||||
|
||||
function formatTime2(fmt, timestamp) {
|
||||
var date = new Date(timestamp) // 兼容safari
|
||||
var o = {
|
||||
'M+': date.getMonth() + 1,
|
||||
'd+': date.getDate(),
|
||||
'h+': date.getHours(),
|
||||
'm+': date.getMinutes(),
|
||||
's+': date.getSeconds(),
|
||||
'q+': Math.floor((date.getMonth() + 3) / 3),
|
||||
'S': date.getMilliseconds()
|
||||
}
|
||||
if (/(y+)/.test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
|
||||
}
|
||||
for (var k in o) {
|
||||
if (new RegExp('(' + k + ')').test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
||||
}
|
||||
}
|
||||
return fmt
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
weekFormat,
|
||||
todayTimeFormat,
|
||||
isShowWeekDay,
|
||||
wechatTimeFormat
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user