优化
This commit is contained in:
@@ -15,6 +15,7 @@ Page({
|
||||
}
|
||||
this.setData({ loading: false });
|
||||
},
|
||||
|
||||
goCheck(e){
|
||||
console.log(e);
|
||||
let usertype = e.currentTarget.dataset.usertype;
|
||||
|
||||
+50
-14
@@ -20,21 +20,27 @@ Page({
|
||||
data_list_1: [],
|
||||
data_list_2: [],
|
||||
data_list_3: [],
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
console.log(this.data.height)
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
onShow() {
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||
})
|
||||
}
|
||||
|
||||
this.getPharmacistPrescription(this.data.active);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onLoad: function () {
|
||||
|
||||
api.getPharmacistIndex().then(response => {
|
||||
this.setData({
|
||||
pharmacist: response.data.pharmacist,
|
||||
@@ -44,11 +50,11 @@ Page({
|
||||
console.error(errors);
|
||||
})
|
||||
|
||||
this.getPharmacistPrescription();
|
||||
|
||||
},
|
||||
getPharmacistPrescription(){
|
||||
getPharmacistPrescription(active){
|
||||
let params = {};
|
||||
let active = this.data.active;
|
||||
let page = this.data.current_page + 1;
|
||||
let pharmacist_audit_status = 0;
|
||||
let platform_audit_status = 1;
|
||||
|
||||
@@ -70,21 +76,51 @@ Page({
|
||||
}
|
||||
params.pharmacist_audit_status = pharmacist_audit_status;
|
||||
params.platform_audit_status = platform_audit_status;
|
||||
params.page = page;
|
||||
let data_name = "data_list_"+active;
|
||||
let list = this.data[data_name];
|
||||
api.getPharmacistPrescription(params).then(response => {
|
||||
this.setData({
|
||||
[data_name]: response.data.data
|
||||
[data_name]: list.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,
|
||||
})
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
onHide(){
|
||||
this.setData({
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
data_list_0: [],
|
||||
data_list_1: [],
|
||||
data_list_2: [],
|
||||
data_list_3: [],
|
||||
})
|
||||
},
|
||||
onChange(e){
|
||||
console.log(e)
|
||||
let data_name = "data_list_"+e.detail.index;
|
||||
this.setData({
|
||||
active: e.detail.index
|
||||
active: e.detail.index,
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
[data_name]: []
|
||||
})
|
||||
this.getPharmacistPrescription();
|
||||
this.getPharmacistPrescription(e.detail.index);
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log('===触底了!!===');
|
||||
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
|
||||
this.getPharmacistPrescription(this.data.active)
|
||||
}
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-empty": "@vant/weapp/empty/index"
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="main content">
|
||||
<van-tabs active="{{ active }}" color="{{ active_color }}" bind:change="onChange">
|
||||
<van-tabs color="{{ active_color }}" bind:change="onChange">
|
||||
<van-tab title="待审核处方">
|
||||
<view class="item_list" wx:if="{{data_list_0.length>0}}">
|
||||
<view class="item" wx:for="{{data_list_0}}">
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<view class="item_txt">
|
||||
<view class="pre_content">开方时间:{{item.created_at}}</view>
|
||||
<view class="end_content" bindtap="go" data-url="/Pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}">
|
||||
<view class="end_content" bindtap="go" data-url="/Pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}&from=1">
|
||||
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -40,6 +40,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-divider contentPosition="center" wx:if="{{data_list_0.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_0.length == 0}}" />
|
||||
</van-tab>
|
||||
@@ -65,6 +66,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-divider contentPosition="center" wx:if="{{data_list_1.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_1.length == 0}}" />
|
||||
</van-tab>
|
||||
@@ -89,7 +91,14 @@
|
||||
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="item_txt">
|
||||
<view class="pre_content">驳回时间:{{item.pharmacist_verify_time}}</view>
|
||||
</view>
|
||||
<view class="item_txt">
|
||||
<view class="pre_content">驳回理由:{{item.pharmacist_fail_reason}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-divider contentPosition="center" wx:if="{{data_list_2.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_2.length == 0}}" />
|
||||
</van-tab>
|
||||
@@ -115,6 +124,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-divider contentPosition="center" wx:if="{{data_list_3.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_3.length == 0}}" />
|
||||
</van-tab>
|
||||
|
||||
@@ -12,15 +12,18 @@ Page({
|
||||
height: app.globalData.height,
|
||||
order_inquiry_id: "",
|
||||
order_prescription_id: "",
|
||||
case_detail: {}
|
||||
case_detail: {},
|
||||
from: ""
|
||||
},
|
||||
onLoad(options) {
|
||||
let order_inquiry_id = options.order_inquiry_id;
|
||||
let order_prescription_id = options.order_prescription_id;
|
||||
let from = options.from;
|
||||
console.log("order_inquiry_id: ", order_inquiry_id);
|
||||
this.setData({
|
||||
order_inquiry_id: order_inquiry_id,
|
||||
order_prescription_id: order_prescription_id,
|
||||
from: from,
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<view class="item"><text class="item_title">复诊凭证</text></view>
|
||||
</view>
|
||||
<view class="go_check" bindtap="go" data-url="/Pages/yaoshi/prescription/prescription?order_prescription_id={{order_prescription_id}}">
|
||||
<van-button color="linear-gradient(to right, #4CABEA, #64CFE9)" block round type="info">前往审方</van-button>
|
||||
<van-button wx:if="{{from == '1'}}" color="linear-gradient(to right, #4CABEA, #64CFE9)" block round type="info">前往审方</van-button>
|
||||
</view>
|
||||
<view class="bottom"></view>
|
||||
</view>
|
||||
@@ -36,7 +36,7 @@ Page({
|
||||
onReachBottom() {
|
||||
console.log('===触底了!!===');
|
||||
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
|
||||
this.getDoctorEvaluationList()
|
||||
this.getDoctorEvaluationList(this.data.evaluation_type)
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
@@ -48,7 +48,7 @@ Page({
|
||||
},
|
||||
onShow(){
|
||||
console.log("onShow");
|
||||
this.getDoctorEvaluationList();
|
||||
this.getDoctorEvaluationList(1);
|
||||
},
|
||||
onTabsChange(e){
|
||||
console.log(e);
|
||||
@@ -59,18 +59,17 @@ Page({
|
||||
last_page: 0,
|
||||
[list_name]: []
|
||||
})
|
||||
this.getDoctorEvaluationList()
|
||||
this.getDoctorEvaluationList(e.detail.name)
|
||||
},
|
||||
getDoctorEvaluationList(){
|
||||
getDoctorEvaluationList(evaluation_type){
|
||||
//获取评价列表
|
||||
let params = {};
|
||||
params.page = this.data.current_page + 1;
|
||||
params.doctor_id = this.data.doctor_id;
|
||||
params.evaluation_type = this.data.evaluation_type;
|
||||
params.evaluation_type = evaluation_type;
|
||||
api.getDoctorEvaluation(params).then(response => {
|
||||
console.log(response);
|
||||
if(response.data.total > 0){
|
||||
let list_name = "appraise_list_" + this.data.evaluation_type;
|
||||
let list_name = "appraise_list_" + evaluation_type;
|
||||
console.log(list_name);
|
||||
let apprise_list = this.data[list_name];
|
||||
this.setData({
|
||||
|
||||
@@ -9,6 +9,5 @@
|
||||
"t-rate": "tdesign-miniprogram/rate/rate",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
@@ -18,7 +18,7 @@ Page({
|
||||
income_tax: "xx",
|
||||
contactKeFu: false,
|
||||
skeleton_loading: true,
|
||||
order_inquiry_ids: ""
|
||||
order_inquiry_ids: []
|
||||
},
|
||||
onLoad(option){
|
||||
let order_inquiry_ids = option.order_inquiry_ids;
|
||||
@@ -62,6 +62,7 @@ Page({
|
||||
bank_name : response.data.bank.bank_name,
|
||||
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,
|
||||
income_tax: response.data.income_tax,
|
||||
skeleton_loading: false
|
||||
})
|
||||
@@ -69,5 +70,25 @@ Page({
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
postDoctorWithdrawal(){
|
||||
let params = {};
|
||||
params.order_inquiry_id = this.data.order_inquiry_ids.join(",");
|
||||
params.withdrawal_amount_total = this.data.withdrawal_amount;
|
||||
params.bank_card_id = this.data.bank_card_id;
|
||||
//获取提现数据
|
||||
api.postDoctorWithdrawal(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
withdrawal_amount: 0,
|
||||
income_tax: 0
|
||||
})
|
||||
wx.showToast({
|
||||
title: '提现申请成功',
|
||||
icon: "success"
|
||||
})
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -58,7 +58,7 @@
|
||||
</view> -->
|
||||
|
||||
<view class="bottom">
|
||||
<van-button custom-style="border-radius: 10rpx;font-size: 30rpx;" block color="#3CC7C0">提取</van-button>
|
||||
<van-button bind:click="postDoctorWithdrawal" disabled="{{order_inquiry_ids.length == 0}}" custom-style="border-radius: 10rpx;font-size: 30rpx;" block color="#3CC7C0">提取</van-button>
|
||||
<view class="kefu" bindtap="contactKeFu">
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
|
||||
@@ -23,11 +23,16 @@ Page({
|
||||
],
|
||||
},
|
||||
onLoad(){
|
||||
this.getDoctorWithdrawalRecord();
|
||||
let year = this.data.select_date;
|
||||
year = Number(year);
|
||||
this.getDoctorWithdrawalRecord(year);
|
||||
},
|
||||
getDoctorWithdrawalRecord(){
|
||||
getDoctorWithdrawalRecord(year){
|
||||
this.setData({
|
||||
record_list: []
|
||||
})
|
||||
//获取提现数据
|
||||
api.getDoctorWithdrawalRecord({year: this.data.select_date}).then(response => {
|
||||
api.getDoctorWithdrawalRecord({year: year}).then(response => {
|
||||
console.log(response);
|
||||
if(response.data.total > 0){
|
||||
this.setData({
|
||||
@@ -46,28 +51,22 @@ Page({
|
||||
onPickerChange(e) {
|
||||
const { key } = e.currentTarget.dataset;
|
||||
const { value } = e.detail;
|
||||
|
||||
console.log('picker change:', e.detail);
|
||||
|
||||
this.setData({
|
||||
select_date: value
|
||||
})
|
||||
|
||||
this.getDoctorWithdrawalRecord();
|
||||
|
||||
let year = this.data.select_date;
|
||||
year = Number(year);
|
||||
this.getDoctorWithdrawalRecord(year);
|
||||
},
|
||||
onColumnChange(e) {
|
||||
const { key } = e.currentTarget.dataset;
|
||||
const { value } = e.detail;
|
||||
|
||||
console.log('Column change:', e.detail);
|
||||
|
||||
},
|
||||
onPickerCancel(e) {
|
||||
const { key } = e.currentTarget.dataset;
|
||||
const { value } = e.detail;
|
||||
|
||||
console.log('picker Cancel:', e.detail);
|
||||
|
||||
}
|
||||
})
|
||||
@@ -15,13 +15,13 @@
|
||||
</view>
|
||||
<view class="data_item_top_content">
|
||||
<view class="name">{{item.account_name}}<text style="margin-left:20rpx;font-size: 28rpx;color:#999;">(尾号{{item.bank_card_code_four}})</text></view>
|
||||
<view class="date">{{item.examine_time}}</view>
|
||||
<view class="date">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="data_item_top_num">
|
||||
<view class="jine">¥{{item.applied_withdrawal_amount}}</view>
|
||||
<view class="status_box">
|
||||
<!-- 审核状态(1:审核中 2:审核通过 3:审核未通过) -->
|
||||
<view class="status status_ing">{{item.examine_status}}</view>
|
||||
<view class="status status_ing">{{item.examine_status==1?'审核中':item.examine_status==2?'审核通过':item.examine_status==3?'审核未通过':'未知'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -47,12 +47,11 @@ page{
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.item_top_sex{
|
||||
flex: 3;
|
||||
flex: 1;
|
||||
font-size: 34rpx;
|
||||
color: #666;
|
||||
}
|
||||
.item_top_status_box{
|
||||
flex: 1;
|
||||
}
|
||||
.item_top_status{
|
||||
padding: 10rpx;
|
||||
|
||||
@@ -347,12 +347,12 @@ Page({
|
||||
postDoctorAuthReal(){
|
||||
|
||||
let _this = this;
|
||||
const realname = this.data.realname.trim();
|
||||
let realname = this.data.realname.trim();
|
||||
const idcard = this.data.idcard.trim();
|
||||
|
||||
console.log("realname: ",realname);
|
||||
console.log("idcard: ", idcard);
|
||||
|
||||
realname = realname.replace(/•/g,"·");
|
||||
var realname_reg= /^(([a-zA-Z+\.?\·?a-zA-Z+]{2,30}$)|([\u4e00-\u9fa5+\·?\u4e00-\u9fa5+]{2,30}$))/;
|
||||
var idcard_reg=/^(^[1-9]\d{5}[1-9]\d{3}(((0[2])([0|1|2][0-8])|(([0-1][1|4|6|9])([0|1|2][0-9]|[3][0]))|(((0[1|3|5|7|8])|(1[0|2]))(([0|1|2]\d)|3[0-1]))))((\d{4})|\d{3}[Xx])$)$/;
|
||||
|
||||
|
||||
@@ -126,9 +126,9 @@ Page({
|
||||
funbox_height = rpxTopx(funbox_height);
|
||||
// 147 userinfo的高度
|
||||
// 155 认证部分的高度
|
||||
// 150 广告部分的高度
|
||||
// 168 广告部分的高度
|
||||
// 40 自定义适配
|
||||
funbox_height = funbox_height - 147 - 20 - 30 - 20 - 155 - 30 - 150 - 20 - 30 - 30 - 30 - 30 - 40;
|
||||
funbox_height = funbox_height - 147 - 20 - 30 - 20 - 155 - 30 - 168 - 20 - 30 - 30 - 30 - 30 - 40;
|
||||
funbox_height = funbox_height / 3;
|
||||
if(funbox_height > 150) funbox_height = 150
|
||||
this.setData({
|
||||
@@ -173,9 +173,32 @@ Page({
|
||||
console.log("index onHide() onHide() ");
|
||||
this.setData({
|
||||
swiperList: [],
|
||||
contactKeFu: false
|
||||
contactKeFu: false,
|
||||
info:{
|
||||
user_name: "医师姓名",
|
||||
not_accepted_inquiry_num: 0,
|
||||
accepting_inquiry_num: 0,
|
||||
info_shiming_status_txt: "未认证",
|
||||
info_shiming_status: "info_shiming_status_no",
|
||||
show_info_note: false,
|
||||
praise_rate: "100%",
|
||||
avg_response_time: 0,
|
||||
number_of_fans: 0,
|
||||
avatar: "https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/default_photo.png",
|
||||
reject_prescription_number: false,//处方管理小红点
|
||||
},
|
||||
iden_auth_status_txt: "未认证",
|
||||
multi_point_status_txt: "未认证",
|
||||
shiming_status_url: "",
|
||||
iden_auth_status_url: "/Pages/yishi/identity/index",
|
||||
multi_point_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
skeleton_loading: true
|
||||
})
|
||||
wx.offCopyUrl(this.Copylistener) // 需传入与监听时同一个的函数对象
|
||||
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().stopInterval()
|
||||
}
|
||||
},
|
||||
Copylistener(res){
|
||||
setTimeout(()=>{
|
||||
@@ -197,6 +220,8 @@ Page({
|
||||
this.getTabBar().setData({
|
||||
active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||
})
|
||||
|
||||
this.getTabBar().startInterval()
|
||||
}
|
||||
this.getMenuButtonBound();
|
||||
this.getFunboxHeight();
|
||||
@@ -282,9 +307,7 @@ Page({
|
||||
})
|
||||
},
|
||||
onTapAD(e) {
|
||||
const { index } = e.detail;
|
||||
console.log(index);
|
||||
let item = this.data.banner[index];
|
||||
let item = e.currentTarget.dataset.item;
|
||||
console.log(item);
|
||||
let open_with = item.open_with;
|
||||
let banner_link = item.banner_link;
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"t-skeleton": "tdesign-miniprogram/skeleton/skeleton"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"enablePullDownRefresh": false,
|
||||
"backgroundTextStyle":"dark"
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
<page-meta page-style="{{ true ? 'overflow: hidden;' : '' }}" />
|
||||
<view class="container" id="container">
|
||||
<!-- 顶部背景 -->
|
||||
<view class="top_bk"></view>
|
||||
@@ -19,7 +20,7 @@
|
||||
<view class="info_mobile" wx:if="{{!skeleton_loading}}">{{info.user_name}}</view>
|
||||
<t-skeleton theme="text" row-col="{{[1]}}" animation="gradient" loading="{{skeleton_loading}}" />
|
||||
</view>
|
||||
<view class="info_shiming" bindtap="go" data-url="{{shiming_status_url}}">
|
||||
<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}}" />
|
||||
</view>
|
||||
@@ -93,7 +94,7 @@
|
||||
</view>
|
||||
<!-- 广告版块 -->
|
||||
<view class="ad">
|
||||
<t-swiper
|
||||
<!-- <t-swiper
|
||||
height="110rpx"
|
||||
duration="{{duration}}"
|
||||
interval="{{interval}}"
|
||||
@@ -104,7 +105,16 @@
|
||||
data-url="123"
|
||||
wx:if="{{!skeleton_loading}}"
|
||||
>
|
||||
</t-swiper>
|
||||
</t-swiper> -->
|
||||
<swiper class="swiper" indicator-dots="{{true}}" circular="{{true}}" indicator-active-color="#3CC7C0" autoplay="{{true}}" interval="3000">
|
||||
<block wx:for="{{banner}}" wx:key="*this">
|
||||
<swiper-item>
|
||||
<view class="swiper-item">
|
||||
<image class="swiperimg" src="{{item.banner_path}}" data-item="{{item}}" bindtap="onTapAD"></image>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- 功能模块 -->
|
||||
<view class="fun_box">
|
||||
|
||||
@@ -22,7 +22,6 @@ page{
|
||||
font-size: 35rpx;
|
||||
color: #fff;
|
||||
background-color: #3CC7C0;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
}
|
||||
.info_box{
|
||||
@@ -105,6 +104,7 @@ page{
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.info_note_txt{
|
||||
font-size: 28rpx;
|
||||
@@ -160,24 +160,20 @@ page{
|
||||
.renzheng_content_right_img{
|
||||
width: 100%;
|
||||
}
|
||||
.ad{
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
width: calc(90vw - 40rpx);
|
||||
height: 150rpx;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0px 2px 10px 0px rgba(0,0,0,0.1);
|
||||
.ad {
|
||||
width: calc(92vw - 40rpx);
|
||||
border-radius: 10rpx;
|
||||
background-color: rgb(255, 255, 255);
|
||||
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
}
|
||||
.t-swiper-nav--bottom {
|
||||
bottom: -24rpx !important;
|
||||
.swiper{
|
||||
height:168rpx;
|
||||
}
|
||||
.t-swiper-nav__dots-item {
|
||||
background: var(--td-swiper-nav-dot-color, var(--td-font-white-2, rgb(107, 106, 106))) !important;
|
||||
}
|
||||
.t-swiper-nav__dots-item--active {
|
||||
background-color: var(--td-swiper-nav-dot-active-color, var(--td-font-white-1, #3CC7C0)) !important;
|
||||
.swiper-item .swiperimg{
|
||||
width:100%;
|
||||
border-radius: 10rpx;
|
||||
height:110rpx;
|
||||
}
|
||||
.fun_box{
|
||||
width: 90vw;
|
||||
|
||||
@@ -79,7 +79,7 @@ Page({
|
||||
}).then(()=>{
|
||||
if(detail){
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
|
||||
success (res) {
|
||||
console.log(res);//同意授权
|
||||
}
|
||||
|
||||
@@ -47,6 +47,9 @@ Page({
|
||||
this.getTabBar().setData({
|
||||
active: 2 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||
})
|
||||
|
||||
this.getTabBar().startInterval()
|
||||
|
||||
}
|
||||
this.getMenuButtonBound();
|
||||
|
||||
@@ -76,6 +79,11 @@ Page({
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
onHide(){
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().stopInterval()
|
||||
}
|
||||
},
|
||||
go(e){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
app.go(url)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<view class="txt_title">账单</view>
|
||||
<view class="content">
|
||||
<van-cell size="large" bindtap="goDetail" data-url="/Pages/yishi/orderdetail/index" data-md="{{item.month}}-{{item.day}}" title-style="font-size: 30rpx;" title="{{item.month}}月{{item.day}}日" value="+{{item.total_amount}}元" is-link wx:for="{{bill}}" />
|
||||
<van-empty description="暂无账单" wx:if="{{ bill }}" />
|
||||
<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" />
|
||||
|
||||
@@ -57,6 +57,7 @@ page{
|
||||
margin: 20rpx 0;
|
||||
position: relative;
|
||||
left: 4vw;
|
||||
width: 20vw;
|
||||
}
|
||||
.content{
|
||||
width: 92vw;
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 116rpx;
|
||||
padding: 20rpx ;
|
||||
}
|
||||
|
||||
.title {
|
||||
@@ -127,6 +127,6 @@
|
||||
}
|
||||
.t_icon{
|
||||
background-color: #3B83FF;
|
||||
padding: 40rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@@ -54,16 +54,7 @@ Page({
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
if(wx.$TUIKit){
|
||||
let promise = wx.$TUIKit.logout();
|
||||
wx.$TUIKit = undefined;
|
||||
promise.then(function(imResponse) {
|
||||
console.log(imResponse.data); // 登出成功
|
||||
}).catch(function(imError) {
|
||||
console.warn('logout error:', imError);
|
||||
});
|
||||
}
|
||||
app.clearAllInterval()
|
||||
app.imLogout();
|
||||
app.go("/Pages/index/index");
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
|
||||
@@ -73,7 +73,7 @@ Page({
|
||||
}).then(()=>{
|
||||
if(detail){
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
|
||||
success (res) {
|
||||
console.log(res);//同意授权
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
提示:服务开启后,患者按照所设置的价格向您购买图文问诊服务
|
||||
1、接诊后,患者可与您在{{config.duration/60}}小时内进行{{config.times_number}}回合沟通
|
||||
2、若开启公益问诊,图文问诊价格以公益问诊价格为准
|
||||
3、问诊价格每日仅限调整1次,每月仅限调整5次
|
||||
3、每日接诊数量和问诊价格每日仅限调整1次,每月仅限调整5次
|
||||
4、价格修改后立即生效,不影响修改之前已生成的问诊订单
|
||||
</text>
|
||||
</view>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
提示:服务开启后,患者按照所设置的价格向您购买图文问诊服务
|
||||
1、接诊后,患者可与您在{{config.duration/60}}小时内进行{{config.times_number}}回合沟通
|
||||
2、若开启公益问诊,图文问诊价格以公益问诊价格为准
|
||||
3、问诊价格每日仅限调整1次,每月仅限调整5次
|
||||
3、每日接诊数量和问诊价格每日仅限调整1次,每月仅限调整5次
|
||||
4、价格修改后立即生效,不影响修改之前已生成的问诊订单
|
||||
</text>
|
||||
</view>
|
||||
|
||||
@@ -6,23 +6,56 @@ Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '问诊详情 ', //导航栏 中间的标题
|
||||
title: '收益明细 ', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
current_page: 1,
|
||||
list: [],
|
||||
date: "",
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
console.log('===触底了!!===');
|
||||
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
|
||||
this.getDoctorAccountInfo()
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
let date = option.date;
|
||||
console.log(date);
|
||||
|
||||
//获取我的账户日账单明细数据
|
||||
api.getDoctorAccountInfo({date:date}).then(response => {
|
||||
this.setData({
|
||||
date: date
|
||||
})
|
||||
},
|
||||
onHide(){
|
||||
this.setData({
|
||||
list: [],
|
||||
date: "",
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
this.getDoctorAccountInfo();
|
||||
},
|
||||
getDoctorAccountInfo(){
|
||||
let list = this.data.list
|
||||
let params = {};
|
||||
params.page = this.data.current_page + 1;
|
||||
params.date = this.data.date;
|
||||
api.getDoctorAccountInfo(params).then(response => {
|
||||
console.log(response);
|
||||
//暂没数据
|
||||
this.setData({
|
||||
list: list.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,
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}
|
||||
})
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar"
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
}
|
||||
}
|
||||
@@ -1,37 +1,24 @@
|
||||
<!-- 收益明细 -->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
||||
<view class="container">
|
||||
<view class="order_list">
|
||||
<view class="order_item">
|
||||
<view class="order_item" wx:for="{{list}}">
|
||||
<view class="order_item_content">
|
||||
<view class="order_item_content_top ">
|
||||
快速问诊
|
||||
<view class="order_status order_status_ing">接诊中</view>
|
||||
{{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }}
|
||||
<view class="order_status order_status_cancle">{{ 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>
|
||||
<view class="order_item_content_data">
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: #666666;">2131231xxxx</text></view>
|
||||
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: #666666;">张三三(女,25岁)</text></view>
|
||||
<view class="order_id">接诊时间:<text style="font-size: 30rpx;color: #666666;">2022-12-30 11:23:23</text></view>
|
||||
<view class="order_id">结束时间:<text style="font-size: 30rpx;color: #666666;">2022-12-12 11:23:23</text></view>
|
||||
<view class="order_id">订单金额:<text style="font-size: 30rpx;color: #666666;">¥1212.00</text></view>
|
||||
<view class="order_id">预计收入:<text style="font-size: 30rpx;color: #666666;">¥112.00</text></view>
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: #666666;">{{item.inquiry_no}}</text></view>
|
||||
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: #666666;">{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁)</text></view>
|
||||
<view class="order_id">接诊时间:<text style="font-size: 30rpx;color: #666666;">{{item.reception_time}}</text></view>
|
||||
<view class="order_id">结束时间:<text style="font-size: 30rpx;color: #666666;">{{item.finish_time}}</text></view>
|
||||
<view class="order_id">订单金额:<text style="font-size: 30rpx;color: #666666;">¥{{item.amount_total}}</text></view>
|
||||
<view class="order_id">预计收入:<text style="font-size: 30rpx;color: #666666;">¥{{item.estimate_income}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="order_item">
|
||||
<view class="order_item_content">
|
||||
<view class="order_item_content_top">
|
||||
快速问诊
|
||||
<view class="order_status order_status_cancle">已取消</view>
|
||||
</view>
|
||||
<view class="order_item_content_data">
|
||||
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: #666666;">张三三/18/男</text></view>
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: #666666;">2131231xxxx</text></view>
|
||||
<view class="order_id">订单金额:<text style="font-size: 30rpx;color: #666666;">¥1212.00</text></view>
|
||||
<view class="order_id">完成时间:<text style="font-size: 30rpx;color: #666666;">2022.12.30</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{list.length == 0}}" />
|
||||
<van-divider contentPosition="center" wx:if="{{list.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
.container{
|
||||
page{
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
.container{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
.order_list{
|
||||
display: flex;
|
||||
width: 92vw;
|
||||
margin: 0 auto;
|
||||
flex-direction: column;
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
.order_item{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
height: 500rpx;
|
||||
}
|
||||
.order_item_content{
|
||||
flex: 10;
|
||||
flex: 5;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
height: 600rpx;
|
||||
}
|
||||
.order_item_content_top{
|
||||
flex: 1;
|
||||
@@ -45,7 +47,7 @@
|
||||
color: #fff;
|
||||
}
|
||||
.order_item_content_data{
|
||||
flex: 3;
|
||||
flex: 5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@@ -42,21 +42,36 @@ page{
|
||||
.popup_box_title{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
border-bottom: 1px solid #E7E7E7;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.cancle{
|
||||
font-size: 32rpx;
|
||||
color: rgba(0,0,0,0.6);
|
||||
flex: 1;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.title{
|
||||
font-size: 32rpx;
|
||||
color: rgba(0,0,0,0.9);
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
}
|
||||
.confirm{
|
||||
font-size: 32rpx;
|
||||
color: #3CC7C0;
|
||||
flex: 1;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.popup_box_content{
|
||||
flex: 5;
|
||||
|
||||
@@ -22,7 +22,16 @@ Page({
|
||||
},
|
||||
onShow(){
|
||||
this.getList();
|
||||
|
||||
},
|
||||
onHide(){
|
||||
console.log("onHideonHide")
|
||||
this.setData({
|
||||
list: [],
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
let current_page = this.data.current_page;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class="item" wx:for="{{list}}" bindtap="go" data-item="{{item}}">
|
||||
<view class="item_top">
|
||||
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 1}}">
|
||||
<text style="margin-left: 10rpx;">快速问诊</text>
|
||||
<text style="margin-left: 10rpx;">在线问诊</text>
|
||||
<van-image class="van_img" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/service_notice/kuaisu.png" fit="heightFix" height="54rpx" aria-label="qrcode" />
|
||||
</view>
|
||||
<view class="item_img" wx:if="{{item.link_params.inquiry_type == 2}}">
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
var filters = {//截取字符串返回
|
||||
substring:function(str,start,end){
|
||||
if(!str){
|
||||
return
|
||||
}
|
||||
//也可做一些判断 //我不需要所以没做其他处理,直接返回的
|
||||
return str.substring(start,end);
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
substring:filters.substring
|
||||
}
|
||||
@@ -18,6 +18,7 @@ Page({
|
||||
data_list_5: [],
|
||||
conversationList: [],
|
||||
message_inquiry_type: 99999,
|
||||
now_message_inquiry_type: 5,
|
||||
system_notice_unreadnnum: "",
|
||||
service_notice_unreadnnum: "",
|
||||
hasOnShow: false,
|
||||
@@ -25,7 +26,11 @@ Page({
|
||||
show_dialog_from_account: "",
|
||||
show_dialog_order_inquiry_id: "",
|
||||
show_dialog_inquiry_type: "",
|
||||
unreadnnum_inter: 0
|
||||
unreadnnum_inter: 0,
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
},
|
||||
onLoad() {
|
||||
console.log("wenzhen onloadddd");
|
||||
@@ -38,8 +43,20 @@ Page({
|
||||
// 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(() => {
|
||||
@@ -49,7 +66,21 @@ Page({
|
||||
system_notice_unreadnnum: system_notice_unreadnnum,
|
||||
service_notice_unreadnnum: service_notice_unreadnnum,
|
||||
})
|
||||
}, 1000);
|
||||
|
||||
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
|
||||
})
|
||||
@@ -58,13 +89,18 @@ Page({
|
||||
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();
|
||||
@@ -74,6 +110,7 @@ Page({
|
||||
hasOnShow: true
|
||||
})
|
||||
|
||||
|
||||
if(wx.$TUIKit){
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
}else{
|
||||
@@ -82,10 +119,12 @@ Page({
|
||||
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,
|
||||
@@ -95,7 +134,13 @@ Page({
|
||||
data_list_4: [],
|
||||
data_list_5: [],
|
||||
message_inquiry_type: 9999,
|
||||
unreadnnum_inter: 0
|
||||
now_message_inquiry_type: 5,
|
||||
unreadnnum_inter: 0,
|
||||
has_data: false,
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
})
|
||||
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived);
|
||||
},
|
||||
@@ -103,7 +148,8 @@ Page({
|
||||
console.log("onUnload from wenzhen")
|
||||
this.setData({
|
||||
hasOnShow: false,
|
||||
message_inquiry_type: 9999
|
||||
message_inquiry_type: 9999,
|
||||
now_message_inquiry_type: 5,
|
||||
})
|
||||
},
|
||||
getConversationList(){
|
||||
@@ -124,6 +170,9 @@ Page({
|
||||
});
|
||||
},
|
||||
go(e){
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
let url = e.currentTarget.dataset.url;
|
||||
let name = e.currentTarget.dataset.name;
|
||||
wx.setStorageSync(name, 0);
|
||||
@@ -246,8 +295,8 @@ Page({
|
||||
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){
|
||||
let new_conversationList = [];
|
||||
conversationList.forEach(item => {
|
||||
let conversationID = item.conversationID;
|
||||
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
|
||||
@@ -278,11 +327,10 @@ Page({
|
||||
item.patient_sex = order.patient_sex;
|
||||
new_conversationList.push(item);
|
||||
})
|
||||
|
||||
this.setData({
|
||||
conversationList: new_conversationList
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
conversationList: new_conversationList
|
||||
})
|
||||
}).then(() => {
|
||||
console.log("开始格式化formatConversationList")
|
||||
this.formatConversationList();
|
||||
@@ -343,6 +391,13 @@ Page({
|
||||
}
|
||||
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);
|
||||
@@ -368,9 +423,8 @@ Page({
|
||||
session_list[inquiry_type - 1].push(session_item);
|
||||
})
|
||||
|
||||
if(totalUnreadCount == 0){
|
||||
app.formatUnReadNum(userID+"_wenzhen_info", totalUnreadCount);
|
||||
}
|
||||
wx.setStorageSync(userID+'_wenzhen_info', totalUnreadCount);
|
||||
|
||||
|
||||
this.setData({
|
||||
data_list_1: session_data_list_1,
|
||||
@@ -379,13 +433,8 @@ Page({
|
||||
data_list_4: session_data_list_4,
|
||||
message_inquiry_type: message_inquiry_type
|
||||
})
|
||||
|
||||
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: false})
|
||||
}else{
|
||||
this.setData({has_data: true})
|
||||
this.selectComponent('#tabs').resize();
|
||||
}
|
||||
wx.stopPullDownRefresh()
|
||||
// this.selectComponent('#tabs').resize();
|
||||
|
||||
},
|
||||
checkOrderInquiryId(list, order_inquiry_id){
|
||||
@@ -431,7 +480,19 @@ Page({
|
||||
}).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;
|
||||
@@ -450,5 +511,41 @@ Page({
|
||||
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;
|
||||
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();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}
|
||||
})
|
||||
@@ -11,6 +11,9 @@
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
<!-- 问诊页面 -->
|
||||
<wxs module="dateSubstr" src="./substr.wxs"></wxs>
|
||||
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="top">
|
||||
@@ -20,7 +22,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty" wx:if="{{ !has_data }}" >
|
||||
<view class="empty" wx:if="{{ has_data==false }}" >
|
||||
<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>
|
||||
@@ -141,12 +143,14 @@
|
||||
</t-tabs>
|
||||
</view> -->
|
||||
|
||||
<view class="tabs" wx:if="{{ has_data }}" >
|
||||
<van-tabs active="{{ message_inquiry_type }}"
|
||||
<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="在线问诊" name="1" wx:if="{{data_list_1.length > 0}}">
|
||||
<!-- <wenzhen-data
|
||||
@@ -327,6 +331,25 @@
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="问诊结束" name="5" wx:if="{{data_list_5.length > 0}}">
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -78,6 +78,7 @@ page{
|
||||
color: #666666;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
display: flex;
|
||||
}
|
||||
.date{
|
||||
font-size: 30rpx;
|
||||
@@ -135,6 +136,4 @@ page{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
.t-badge__content-text {
|
||||
line-height: 70rpx !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<!-- (1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) -->
|
||||
<view class="order_item_content_top">{{item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'未知'}}</view>
|
||||
<view class="order_item_content_data">
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: #666666;">{{item.order_inquiry_id }}</text></view>
|
||||
<view class="order_id">订单编号:<text style="font-size: 30rpx;color: #666666;">{{item.inquiry_no }}</text></view>
|
||||
<view class="order_id">就诊患者:<text style="font-size: 30rpx;color: #666666;">{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁)</text></view>
|
||||
<view class="order_id">接诊时间:<text style="font-size: 30rpx;color: #666666;">{{item.reception_time}}</text></view>
|
||||
<view class="order_id">结束时间:<text style="font-size: 30rpx;color: #666666;">{{item.finish_time}}</text></view>
|
||||
|
||||
@@ -102,7 +102,7 @@ Page({
|
||||
}).then(()=>{
|
||||
if(detail){
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
|
||||
success (res) {
|
||||
console.log(res);//同意授权
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ Page({
|
||||
}).then(()=>{
|
||||
if(detail){
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
|
||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
|
||||
success (res) {
|
||||
console.log(res);//同意授权
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user