diff --git a/Pages/index/index.js b/Pages/index/index.js
index 0757550..386f8ea 100644
--- a/Pages/index/index.js
+++ b/Pages/index/index.js
@@ -15,6 +15,7 @@ Page({
}
this.setData({ loading: false });
},
+
goCheck(e){
console.log(e);
let usertype = e.currentTarget.dataset.usertype;
diff --git a/Pages/yaoshi/home/home.js b/Pages/yaoshi/home/home.js
index 0bc357c..6be686b 100644
--- a/Pages/yaoshi/home/home.js
+++ b/Pages/yaoshi/home/home.js
@@ -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;
diff --git a/Pages/yaoshi/home/home.json b/Pages/yaoshi/home/home.json
index a8a0021..1ec3886 100644
--- a/Pages/yaoshi/home/home.json
+++ b/Pages/yaoshi/home/home.json
@@ -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"
}
}
\ No newline at end of file
diff --git a/Pages/yaoshi/home/home.wxml b/Pages/yaoshi/home/home.wxml
index 619ca77..b3e7aec 100644
--- a/Pages/yaoshi/home/home.wxml
+++ b/Pages/yaoshi/home/home.wxml
@@ -13,7 +13,7 @@
-
+
@@ -28,7 +28,7 @@
开方时间:{{item.created_at}}
-
+
查看病例
@@ -40,6 +40,7 @@
+ 到底了~
@@ -65,6 +66,7 @@
+ 到底了~
@@ -89,7 +91,14 @@
+
+ 驳回时间:{{item.pharmacist_verify_time}}
+
+
+ 驳回理由:{{item.pharmacist_fail_reason}}
+
+ 到底了~
@@ -115,6 +124,7 @@
+ 到底了~
diff --git a/Pages/yaoshi/medicalrecord/medicalrecord.js b/Pages/yaoshi/medicalrecord/medicalrecord.js
index 54df78b..94e656e 100644
--- a/Pages/yaoshi/medicalrecord/medicalrecord.js
+++ b/Pages/yaoshi/medicalrecord/medicalrecord.js
@@ -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(){
diff --git a/Pages/yaoshi/medicalrecord/medicalrecord.wxml b/Pages/yaoshi/medicalrecord/medicalrecord.wxml
index 6a8eb72..8829e62 100644
--- a/Pages/yaoshi/medicalrecord/medicalrecord.wxml
+++ b/Pages/yaoshi/medicalrecord/medicalrecord.wxml
@@ -22,7 +22,7 @@
复诊凭证
- 前往审方
+ 前往审方
\ No newline at end of file
diff --git a/Pages/yishi/appraise/index.js b/Pages/yishi/appraise/index.js
index 9a0b2de..47c86e5 100644
--- a/Pages/yishi/appraise/index.js
+++ b/Pages/yishi/appraise/index.js
@@ -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({
diff --git a/Pages/yishi/appraise/index.json b/Pages/yishi/appraise/index.json
index 01214cc..34bf6ab 100644
--- a/Pages/yishi/appraise/index.json
+++ b/Pages/yishi/appraise/index.json
@@ -9,6 +9,5 @@
"t-rate": "tdesign-miniprogram/rate/rate",
"van-divider": "@vant/weapp/divider/index"
},
- "enablePullDownRefresh": true,
"onReachBottomDistance": 100
}
\ No newline at end of file
diff --git a/Pages/yishi/cash/index.js b/Pages/yishi/cash/index.js
index 5a1a320..71740f0 100644
--- a/Pages/yishi/cash/index.js
+++ b/Pages/yishi/cash/index.js
@@ -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);
+ })
}
})
\ No newline at end of file
diff --git a/Pages/yishi/cash/index.wxml b/Pages/yishi/cash/index.wxml
index bd83843..ba14638 100644
--- a/Pages/yishi/cash/index.wxml
+++ b/Pages/yishi/cash/index.wxml
@@ -58,7 +58,7 @@
-->
- 提取
+ 提取
联系客服
diff --git a/Pages/yishi/cashrecord/index.js b/Pages/yishi/cashrecord/index.js
index 0d9255c..ec7de6c 100644
--- a/Pages/yishi/cashrecord/index.js
+++ b/Pages/yishi/cashrecord/index.js
@@ -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);
-
}
})
\ No newline at end of file
diff --git a/Pages/yishi/cashrecord/index.wxml b/Pages/yishi/cashrecord/index.wxml
index 2cf1161..af3320d 100644
--- a/Pages/yishi/cashrecord/index.wxml
+++ b/Pages/yishi/cashrecord/index.wxml
@@ -15,13 +15,13 @@
{{item.account_name}}(尾号{{item.bank_card_code_four}})
- {{item.examine_time}}
+ {{item.created_at}}
¥{{item.applied_withdrawal_amount}}
- {{item.examine_status}}
+ {{item.examine_status==1?'审核中':item.examine_status==2?'审核通过':item.examine_status==3?'审核未通过':'未知'}}
diff --git a/Pages/yishi/chufangsetup/index.wxss b/Pages/yishi/chufangsetup/index.wxss
index 467ac1d..7dd3d59 100644
--- a/Pages/yishi/chufangsetup/index.wxss
+++ b/Pages/yishi/chufangsetup/index.wxss
@@ -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;
diff --git a/Pages/yishi/identity/index.js b/Pages/yishi/identity/index.js
index 4343060..702f372 100644
--- a/Pages/yishi/identity/index.js
+++ b/Pages/yishi/identity/index.js
@@ -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])$)$/;
diff --git a/Pages/yishi/index/index.js b/Pages/yishi/index/index.js
index 565acff..d71614a 100644
--- a/Pages/yishi/index/index.js
+++ b/Pages/yishi/index/index.js
@@ -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;
diff --git a/Pages/yishi/index/index.json b/Pages/yishi/index/index.json
index e4f6673..a2f67d2 100644
--- a/Pages/yishi/index/index.json
+++ b/Pages/yishi/index/index.json
@@ -9,6 +9,6 @@
"van-image": "@vant/weapp/image/index",
"t-skeleton": "tdesign-miniprogram/skeleton/skeleton"
},
- "enablePullDownRefresh": true,
+ "enablePullDownRefresh": false,
"backgroundTextStyle":"dark"
}
\ No newline at end of file
diff --git a/Pages/yishi/index/index.wxml b/Pages/yishi/index/index.wxml
index 30c8bef..f25e1f0 100644
--- a/Pages/yishi/index/index.wxml
+++ b/Pages/yishi/index/index.wxml
@@ -1,3 +1,4 @@
+
@@ -19,7 +20,7 @@
{{info.user_name}}
-
+
{{info.info_shiming_status_txt}}
@@ -93,7 +94,7 @@
-
-
+ -->
+
+
+
+
+
+
+
+
+
diff --git a/Pages/yishi/index/index.wxss b/Pages/yishi/index/index.wxss
index 92efe8c..e3915bd 100644
--- a/Pages/yishi/index/index.wxss
+++ b/Pages/yishi/index/index.wxss
@@ -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;
diff --git a/Pages/yishi/kuaisusetup/index.js b/Pages/yishi/kuaisusetup/index.js
index 71d18fa..62f295c 100644
--- a/Pages/yishi/kuaisusetup/index.js
+++ b/Pages/yishi/kuaisusetup/index.js
@@ -79,7 +79,7 @@ Page({
}).then(()=>{
if(detail){
wx.requestSubscribeMessage({
- tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
+ tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
success (res) {
console.log(res);//同意授权
}
diff --git a/Pages/yishi/my/index.js b/Pages/yishi/my/index.js
index f54969d..76ea0cd 100644
--- a/Pages/yishi/my/index.js
+++ b/Pages/yishi/my/index.js
@@ -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)
diff --git a/Pages/yishi/myaccount/index.wxml b/Pages/yishi/myaccount/index.wxml
index f675229..0d97cea 100644
--- a/Pages/yishi/myaccount/index.wxml
+++ b/Pages/yishi/myaccount/index.wxml
@@ -20,7 +20,7 @@
账单
-
+
diff --git a/Pages/yishi/myaccount/index.wxss b/Pages/yishi/myaccount/index.wxss
index 3b5f6cb..e1a2f53 100644
--- a/Pages/yishi/myaccount/index.wxss
+++ b/Pages/yishi/myaccount/index.wxss
@@ -57,6 +57,7 @@ page{
margin: 20rpx 0;
position: relative;
left: 4vw;
+ width: 20vw;
}
.content{
width: 92vw;
diff --git a/Pages/yishi/mycard/index.wxss b/Pages/yishi/mycard/index.wxss
index 08ff85e..1ed2838 100644
--- a/Pages/yishi/mycard/index.wxss
+++ b/Pages/yishi/mycard/index.wxss
@@ -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%;
}
diff --git a/Pages/yishi/myinfo/index.js b/Pages/yishi/myinfo/index.js
index 8367253..308d71f 100644
--- a/Pages/yishi/myinfo/index.js
+++ b/Pages/yishi/myinfo/index.js
@@ -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('用户点击取消')
diff --git a/Pages/yishi/onlinesetup/index.js b/Pages/yishi/onlinesetup/index.js
index 58c5c32..df3f035 100644
--- a/Pages/yishi/onlinesetup/index.js
+++ b/Pages/yishi/onlinesetup/index.js
@@ -73,7 +73,7 @@ Page({
}).then(()=>{
if(detail){
wx.requestSubscribeMessage({
- tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
+ tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
success (res) {
console.log(res);//同意授权
}
diff --git a/Pages/yishi/onlinesetup/index.wxml b/Pages/yishi/onlinesetup/index.wxml
index a3582c3..617493d 100644
--- a/Pages/yishi/onlinesetup/index.wxml
+++ b/Pages/yishi/onlinesetup/index.wxml
@@ -41,7 +41,7 @@
提示:服务开启后,患者按照所设置的价格向您购买图文问诊服务
1、接诊后,患者可与您在{{config.duration/60}}小时内进行{{config.times_number}}回合沟通
2、若开启公益问诊,图文问诊价格以公益问诊价格为准
- 3、问诊价格每日仅限调整1次,每月仅限调整5次
+ 3、每日接诊数量和问诊价格每日仅限调整1次,每月仅限调整5次
4、价格修改后立即生效,不影响修改之前已生成的问诊订单
diff --git a/Pages/yishi/onlinesetupprice/index.wxml b/Pages/yishi/onlinesetupprice/index.wxml
index 3d4a7c7..9951f9f 100644
--- a/Pages/yishi/onlinesetupprice/index.wxml
+++ b/Pages/yishi/onlinesetupprice/index.wxml
@@ -22,7 +22,7 @@
提示:服务开启后,患者按照所设置的价格向您购买图文问诊服务
1、接诊后,患者可与您在{{config.duration/60}}小时内进行{{config.times_number}}回合沟通
2、若开启公益问诊,图文问诊价格以公益问诊价格为准
- 3、问诊价格每日仅限调整1次,每月仅限调整5次
+ 3、每日接诊数量和问诊价格每日仅限调整1次,每月仅限调整5次
4、价格修改后立即生效,不影响修改之前已生成的问诊订单
diff --git a/Pages/yishi/orderdetail/index.js b/Pages/yishi/orderdetail/index.js
index 9434029..2215c1c 100644
--- a/Pages/yishi/orderdetail/index.js
+++ b/Pages/yishi/orderdetail/index.js
@@ -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);})
}
})
\ No newline at end of file
diff --git a/Pages/yishi/orderdetail/index.json b/Pages/yishi/orderdetail/index.json
index 3b3b8cc..7767c10 100644
--- a/Pages/yishi/orderdetail/index.json
+++ b/Pages/yishi/orderdetail/index.json
@@ -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"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/orderdetail/index.wxml b/Pages/yishi/orderdetail/index.wxml
index 371eafe..07ef182 100644
--- a/Pages/yishi/orderdetail/index.wxml
+++ b/Pages/yishi/orderdetail/index.wxml
@@ -1,37 +1,24 @@
-
+
-
+
- 快速问诊
- 接诊中
+ {{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }}
+ {{ 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?'已取消':'其他' }}
- 订单编号:2131231xxxx
- 就诊患者:张三三(女,25岁)
- 接诊时间:2022-12-30 11:23:23
- 结束时间:2022-12-12 11:23:23
- 订单金额:¥1212.00
- 预计收入:¥112.00
+ 订单编号:{{item.inquiry_no}}
+ 就诊患者:{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁)
+ 接诊时间:{{item.reception_time}}
+ 结束时间:{{item.finish_time}}
+ 订单金额:¥{{item.amount_total}}
+ 预计收入:¥{{item.estimate_income}}
-
-
-
-
- 快速问诊
- 已取消
-
-
- 就诊患者:张三三/18/男
- 订单编号:2131231xxxx
- 订单金额:¥1212.00
- 完成时间:2022.12.30
-
-
-
-
+
+ 到底了~
+
diff --git a/Pages/yishi/orderdetail/index.wxss b/Pages/yishi/orderdetail/index.wxss
index 60ec399..1c81f27 100644
--- a/Pages/yishi/orderdetail/index.wxss
+++ b/Pages/yishi/orderdetail/index.wxss
@@ -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;
}
diff --git a/Pages/yishi/quickreply/index.wxss b/Pages/yishi/quickreply/index.wxss
index 5b2fdbc..c09a494 100644
--- a/Pages/yishi/quickreply/index.wxss
+++ b/Pages/yishi/quickreply/index.wxss
@@ -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;
diff --git a/Pages/yishi/service_notice/index.js b/Pages/yishi/service_notice/index.js
index 81e8224..28da157 100644
--- a/Pages/yishi/service_notice/index.js
+++ b/Pages/yishi/service_notice/index.js
@@ -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;
diff --git a/Pages/yishi/service_notice/index.wxml b/Pages/yishi/service_notice/index.wxml
index f39a07e..4eae707 100644
--- a/Pages/yishi/service_notice/index.wxml
+++ b/Pages/yishi/service_notice/index.wxml
@@ -4,7 +4,7 @@
- 快速问诊
+ 在线问诊
diff --git a/Pages/yishi/wenzhen_v2/substr.wxs b/Pages/yishi/wenzhen_v2/substr.wxs
new file mode 100644
index 0000000..7a50e2c
--- /dev/null
+++ b/Pages/yishi/wenzhen_v2/substr.wxs
@@ -0,0 +1,12 @@
+var filters = {//截取字符串返回
+ substring:function(str,start,end){
+ if(!str){
+ return
+ }
+ //也可做一些判断 //我不需要所以没做其他处理,直接返回的
+ return str.substring(start,end);
+ }
+}
+module.exports = {
+ substring:filters.substring
+}
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.js b/Pages/yishi/wenzhen_v2/wenzhen.js
index dffc2a3..dd2a3dd 100644
--- a/Pages/yishi/wenzhen_v2/wenzhen.js
+++ b/Pages/yishi/wenzhen_v2/wenzhen.js
@@ -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);})
}
})
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.json b/Pages/yishi/wenzhen_v2/wenzhen.json
index d7cc87b..4da761c 100644
--- a/Pages/yishi/wenzhen_v2/wenzhen.json
+++ b/Pages/yishi/wenzhen_v2/wenzhen.json
@@ -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
}
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxml b/Pages/yishi/wenzhen_v2/wenzhen.wxml
index 30ce8eb..0c7bf6b 100644
--- a/Pages/yishi/wenzhen_v2/wenzhen.wxml
+++ b/Pages/yishi/wenzhen_v2/wenzhen.wxml
@@ -1,4 +1,6 @@
+
+
@@ -20,7 +22,7 @@
-
+
未收到任何消息
@@ -141,12 +143,14 @@
-->
-
-
+
{{item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'未知'}}
- 订单编号:{{item.order_inquiry_id }}
+ 订单编号:{{item.inquiry_no }}
就诊患者:{{item.patient_name}}({{item.patient_sex==1?'男':'女'}},{{item.patient_age}}岁)
接诊时间:{{item.reception_time}}
结束时间:{{item.finish_time}}
diff --git a/Pages/yishi/yizhensetup/index.js b/Pages/yishi/yizhensetup/index.js
index 604a3f9..645c334 100644
--- a/Pages/yishi/yizhensetup/index.js
+++ b/Pages/yishi/yizhensetup/index.js
@@ -102,7 +102,7 @@ Page({
}).then(()=>{
if(detail){
wx.requestSubscribeMessage({
- tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
+ tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
success (res) {
console.log(res);//同意授权
}
diff --git a/Pages/yishi/yizhensetupprice/index.js b/Pages/yishi/yizhensetupprice/index.js
index 3854ab6..411201f 100644
--- a/Pages/yishi/yizhensetupprice/index.js
+++ b/Pages/yishi/yizhensetupprice/index.js
@@ -99,7 +99,7 @@ Page({
}).then(()=>{
if(detail){
wx.requestSubscribeMessage({
- tmplIds: ['G1RIs0RYqsTQ2CuPQWalIGVet9sd_d371YtDVhfBsFg'],
+ tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
success (res) {
console.log(res);//同意授权
}
diff --git a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js
index 39da407..18fffe9 100644
--- a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js
+++ b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js
@@ -160,6 +160,18 @@ Component({
}];
return renderDom;
}
+ // 7:处方开具成功
+ if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.PRESCRIBE_VERIFY) {
+ let data = customMessage.data;
+ const renderDom = [{
+ type: 'prescribe',
+ product_name: data.product_name,
+ order_inquiry_id: data.order_inquiry_id,
+ order_prescription_id: data.order_prescription_id,
+ pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10),
+ }];
+ return renderDom;
+ }
} catch (error) {
}
// 客服咨询
diff --git a/TUIKit/components/TUIChat/components/MessageElements/RevokeMessage/index.wxml b/TUIKit/components/TUIChat/components/MessageElements/RevokeMessage/index.wxml
index c4a31f8..5e14218 100644
--- a/TUIKit/components/TUIChat/components/MessageElements/RevokeMessage/index.wxml
+++ b/TUIKit/components/TUIChat/components/MessageElements/RevokeMessage/index.wxml
@@ -1,5 +1,6 @@
-
-
+
+
+
撤回了一条消息
重新编辑
diff --git a/TUIKit/components/TUIChat/components/MessageList/index.js b/TUIKit/components/TUIChat/components/MessageList/index.js
index 3633bcf..c7abe3c 100644
--- a/TUIKit/components/TUIChat/components/MessageList/index.js
+++ b/TUIKit/components/TUIChat/components/MessageList/index.js
@@ -1,6 +1,7 @@
import dayjs from '../../../../utils/dayjs';
import logger from '../../../../utils/logger';
import constant from '../../../../utils/constant';
+import { getTimeAgoChat } from './../../../../../utils/util'
const { GDXZ_CUSTOM_MSEEAGE } = constant;
// eslint-disable-next-line no-undef
const app = getApp();
@@ -86,11 +87,12 @@ Component({
errorMessage: {},
errorMessageID: '',
typingMessage: {},
+ autoToButtom: true
},
lifetimes: {
attached() {
-
+
},
ready() {
if (this.data.unreadCount > 12) {
@@ -128,11 +130,22 @@ Component({
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_REVOKED, this.$onMessageRevoked);
},
},
-
+ pageLifetimes: {
+ show(){
+ console.log("showshowshowshowshowshowshow")
+ },
+ hide(){
+ console.log("hidehidehidehidehidehidehidehidehidehidehide")
+ }
+ },
methods: {
// 刷新消息列表
refresh() {
+ console.log("refresh.......")
+ this.setData({
+ autoToButtom: false
+ })
if (this.data.isCompleted) {
this.setData({
isCompleted: true,
@@ -247,7 +260,12 @@ Component({
// 收到的消息
$onMessageReceived(value) {
+ let autoToButtom = this.data.autoToButtom;
+ console.log("autoToButtom:", autoToButtom)
const message = value.data[0];
+ if(message.flow == 'out'){
+ message.isRead = false;
+ }
if(!this.checkShowAvatar(message)){
message.no_avatar = true;
}
@@ -275,12 +293,14 @@ Component({
} catch (error) {
}
if ((item.type === MESSAGE_TYPE_TEXT.TIM_CUSTOM_ELEM && this.data.typingMessage.businessID !== BUSINESS_ID_TEXT.USER_TYPING) || item.type !== MESSAGE_TYPE_TEXT.TIM_CUSTOM_ELEM) {
- this.data.showNewMessageCount.push(message);
- this.setData({
- showNewMessageCount: this.data.showNewMessageCount,
- showDownJump: true,
- });
+ if(!autoToButtom){
+ this.data.showNewMessageCount.push(message);
+ this.setData({
+ showNewMessageCount: this.data.showNewMessageCount,
+ showDownJump: true,
+ });
+ }
}
} else {
@@ -320,6 +340,13 @@ Component({
});
}
+ let jumpAim = `ID-${this.filterSystemMessageID(this.data.messageList[this.data.messageList.length - 1].ID)}`;
+ console.log("jumpAim:", jumpAim);
+ if(autoToButtom){
+ this.setData({
+ jumpAim: jumpAim
+ })
+ }
//主动跳到 消息跳转到最新
// this.handleJumpNewMessage()
},
@@ -381,8 +408,15 @@ Component({
// 获取消息ID
handleLongPress(e) {
for (let index = 0; index < this.data.messageList.length; index++) {
+
if (this.data.messageList[index].status === 'success') {
const { index } = e.currentTarget.dataset;
+ let message = this.data.messageList[index];
+ console.log(message)
+ if(message.type === 'TIMCustomElem'){
+ return
+ }
+
this.setData({
messageID: e.currentTarget.id,
selectedMessage: this.data.messageList[index],
@@ -519,11 +553,17 @@ Component({
});
}
},
+ //myscroll 自定义滑动事件
+ myscroll(e){
+ console.log(e.detail.deltaY,e.detail.scrollTop)
+ },
// 滑动到最底部置跳转事件为false
scrollHandler() {
+ console.log("触底了")
this.setData({
jumpAim: `ID-${this.filterSystemMessageID(this.data.messageList[this.data.messageList.length - 1].ID)}`,
showDownJump: false,
+ autoToButtom: true
});
},
// 删除处理掉的群通知消息
@@ -532,17 +572,19 @@ Component({
},
// 展示消息时间
messageTimeForShow(messageTime) {
+ console.log("messageTimeForShow")
const interval = 5 * 60 * 1000;
const nowTime = Math.floor(messageTime.time / 10) * 10 * 1000;
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, {
isShowTime: true,
}),
this.data.messageTime = dayjs(nowTime);
this.setData({
- messageTime: dayjs(nowTime).format('YYYY-MM-DD HH:mm:ss'),
+ messageTime: getTimeAgoChat(nowTime/1000),
showMessageTime: true,
});
}
@@ -550,10 +592,12 @@ Component({
},
// 渲染历史消息时间
showHistoryMessageTime(messageList) {
- const cut = 30 * 60 * 1000;
+ const cut = 5 * 60 * 1000;
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分钟的将其值设为初始值
@@ -563,7 +607,7 @@ Component({
}),
this.setData({
firstTime: nowadayTime,
- messageHistoryTime: dayjs(showHistoryTime).format('YYYY-MM-DD HH:mm:ss'),
+ messageHistoryTime: getTimeAgoChat(showHistoryTime/1000),
showMessageHistoryTime: true,
});
return firstTime;
@@ -577,7 +621,7 @@ Component({
Object.assign(messageList[0], {
isShowMoreHistoryTime: true,
});
- this.data.newArr[messageList[0].ID] = dayjs(showHistoryTime).format('YYYY-MM-DD HH:mm:ss');
+ this.data.newArr[messageList[0].ID] = getTimeAgoChat(showHistoryTime/1000);
this.setData({
newArr: this.data.newArr,
});
diff --git a/TUIKit/components/TUIChat/components/MessageList/index.wxml b/TUIKit/components/TUIChat/components/MessageList/index.wxml
index 5b271b1..cda6f83 100644
--- a/TUIKit/components/TUIChat/components/MessageList/index.wxml
+++ b/TUIKit/components/TUIChat/components/MessageList/index.wxml
@@ -4,21 +4,23 @@
没有更多啦
-
+
{{messageTime}}
-
+
{{messageHistoryTime}}
-
+
{{newArr[item.ID]}}
-
+
+
+
diff --git a/TUIKit/components/TUIChat/index.wxml b/TUIKit/components/TUIChat/index.wxml
index 2a8be6e..f20febd 100644
--- a/TUIKit/components/TUIChat/index.wxml
+++ b/TUIKit/components/TUIChat/index.wxml
@@ -5,7 +5,7 @@
{{baseInfo.patient_family_name}}
{{baseInfo.patient_family_sex==1?'男':'女'}}|{{baseInfo.patient_family_age}}岁
- {{baseInfo.inquiry_status==1?'待支付':baseInfo.inquiry_status==2?'待分配':baseInfo.inquiry_status==3?'待接诊':baseInfo.inquiry_status==4?'接诊中':baseInfo.inquiry_status==5?'已完成':baseInfo.inquiry_status==6?'已结束':baseInfo.inquiry_status==7?'已取消':'未知'}}
+ {{baseInfo.inquiry_status==1?'待支付':baseInfo.inquiry_status==2?'待分配':baseInfo.inquiry_status==3?'待接诊':baseInfo.inquiry_status==4?'接诊中':baseInfo.inquiry_status==5?'问诊完成':baseInfo.inquiry_status==6?'已结束':baseInfo.inquiry_status==7?'已取消':'未知'}}
结束问诊
diff --git a/app.js b/app.js
index b221d6d..44aa762 100644
--- a/app.js
+++ b/app.js
@@ -58,6 +58,12 @@ App({
title: '网络类型'+res.networkType,
})
})
+
+ wx.onNetworkWeakChange(function(res){
+ console.log("onNetworkWeakChange: ")
+ console.log(res.isConnected)
+ console.log(res.networkType)
+ })
},
onShow(){
this.imInit();
@@ -126,7 +132,8 @@ App({
wx.$TUIKit.logout();
wx.$TUIKit = undefined;
}
- this.clearAllInterval()
+ this.clearAllInterval();
+ this.globalData.chat_sdk_ready = false;
},
clearAllInterval(){
this.globalData.app_inter.forEach(item => {
@@ -159,6 +166,7 @@ App({
if(!my_info) wx.setStorageSync(userID+'_my_info', "");
this.formatWenZhenInfo();
+ wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onSystemPushReceived);
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onSystemPushReceived, this);
//互踢
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.KICKED_OUT, this.onKickedOut);
@@ -290,8 +298,8 @@ App({
})
//获取医生问诊消息用户属性
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;//如果是管理员消息直接跳过
@@ -324,8 +332,8 @@ App({
new_conversationList.push(item);
})
conversationList = [];
- return new_conversationList;
}
+ return new_conversationList;
}).then(new_conversationList => {
console.log("开始计算问诊角标");
let wenzhen_info = 0;
@@ -343,7 +351,8 @@ App({
console.log("角标的数量:", wenzhen_info);
let usertype = wx.getStorageSync('usertype');
let userID = wx.getStorageSync('user_id_'+usertype);
- this.formatUnReadNum(userID+'_wenzhen_info', wenzhen_info)
+ wx.setStorageSync(userID+'_wenzhen_info', wenzhen_info);
+
}).catch(errors => {console.error(errors);})
}
diff --git a/commpents/te_navbar/index.js b/commpents/te_navbar/index.js
index 0ce5c54..da62db0 100644
--- a/commpents/te_navbar/index.js
+++ b/commpents/te_navbar/index.js
@@ -25,6 +25,7 @@ Component({
*/
methods: {
onBack() {
+ console.log("onBackonBackonBack");
let back_url = this.data.navbarData.back_url;
let back_url_type = this.data.navbarData.back_url_type;
if(back_url){
diff --git a/commpents/te_navbar/index.wxml b/commpents/te_navbar/index.wxml
index 964d314..8203f58 100644
--- a/commpents/te_navbar/index.wxml
+++ b/commpents/te_navbar/index.wxml
@@ -21,7 +21,7 @@
-
+
diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js
index 9672b94..ba1f8a0 100644
--- a/custom-tab-bar/index.js
+++ b/custom-tab-bar/index.js
@@ -1,3 +1,5 @@
+import _console from "../TUIKit/utils/console"
+
// custom-tab-bar/index.js
const app = getApp()
Component({
@@ -56,9 +58,11 @@ Component({
index_info: "",
wenzhen_info: "",
my_info: "",
- next_url: "/Pages/yishi/identity/index"
+ next_url: "/Pages/yishi/identity/index",
+ info_inter: 0
},
- attached() {
+ ready() {
+ console.log("readyreadyreadyreadyreadyready")
const usertype = wx.getStorageSync('usertype')
if (usertype == 2) {
this.setData({
@@ -71,22 +75,37 @@ Component({
items: this.data.listAll.list1
})
}
- let _this = this;
- let userID = wx.getStorageSync('user_id_'+usertype);
- let info_inter = setInterval(() => {
- let index_info = wx.getStorageSync(userID+'_index_info');
- let wenzhen_info = wx.getStorageSync(userID+'_wenzhen_info');
- let my_info = wx.getStorageSync(userID+'_my_info');
- _this.setData({
- index_info: index_info,
- wenzhen_info: wenzhen_info,
- my_info: my_info,
- })
- }, 500);
-
- app.globalData.app_inter.push(info_inter);
+
},
methods: {
+ startInterval(){
+ let _this = this;
+ const usertype = wx.getStorageSync('usertype')
+ let userID = wx.getStorageSync('user_id_'+usertype);
+ let info_inter = setInterval(() => {
+ if(app.globalData.config.userID == userID){
+ let index_info = wx.getStorageSync(userID+'_index_info');
+ let wenzhen_info = wx.getStorageSync(userID+'_wenzhen_info');
+ let my_info = wx.getStorageSync(userID+'_my_info');
+ _this.setData({
+ index_info: this.formatNum(index_info),
+ wenzhen_info: this.formatNum(wenzhen_info),
+ my_info: this.formatNum(my_info),
+ })
+ }
+ }, 500);
+ this.setData({
+ info_inter: info_inter
+ })
+ },
+ stopInterval(){
+ clearInterval(this.data.info_inter)
+ },
+ formatNum(val){
+ if(val > 99) val = '+99';
+ if(val == 0) val = '';
+ return val;
+ },
// swichNav: function (e) {
// console.log(123);
// let that = this;
diff --git a/utils/network/api.js b/utils/network/api.js
index e59e8c9..8dce962 100644
--- a/utils/network/api.js
+++ b/utils/network/api.js
@@ -242,6 +242,16 @@ class API extends HTTP {
...params
}
})
+}
+ //发起提现
+ postDoctorWithdrawal(params) {
+ return this.request({
+ url: `${this.baseUrl}/doctor/withdrawal`,
+ method: 'POST',
+ data: {
+ ...params
+ }
+ })
}
//可提现问诊订单列表
getDoctorWithdrawalOrder(params) {
@@ -649,6 +659,16 @@ class API extends HTTP {
...params
}
})
+}
+ //获取医生消息页通知数据-医生
+ getDoctorMessageNotice(params) {
+ return this.request({
+ url: `${this.baseUrl}/doctor/message/notice`,
+ method: 'GET',
+ data: {
+ ...params
+ }
+ })
}
//获取医生服务消息列表-分页
getDoctorMessageService(params) {
@@ -703,6 +723,16 @@ class API extends HTTP {
...params
}
})
+}
+ //结束问诊会话列表
+ getDoctorInquiryFinishMessage(params) {
+ return this.request({
+ url: `${this.baseUrl}/doctor/inquiry/finish/message`,
+ method: 'GET',
+ data: {
+ ...params
+ }
+ })
}
}
diff --git a/utils/util.js b/utils/util.js
index fa8bd1c..498c265 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -1,3 +1,27 @@
+
+
+// 对Date的扩展,将 Date 转化为指定格式的String
+// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
+// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
+// 例子:
+// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
+// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
+Date.prototype.Format = function (fmt) {
+ var o = {
+ "M+": this.getMonth() + 1, //月份
+ "d+": this.getDate(), //日
+ "h+": this.getHours(), //小时
+ "m+": this.getMinutes(), //分
+ "s+": this.getSeconds(), //秒
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
+ "S": this.getMilliseconds() //毫秒
+ };
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.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;
+}
+
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
@@ -63,6 +87,36 @@ const getTimeAgo = stringTime =>{
}
return result;
}
+
+const getTimeAgoChat = stringTime =>{
+ var minute = 1000 * 60;
+ var hour = minute *60;
+ var day = hour *24;
+ var week = day * 7;
+ var month = day * 30;
+ var time1 = new Date().getTime();//当前的时间戳
+ var time2 = stringTime*1000;//指定时间的时间戳
+ var time = time1 - time2;
+ var result = null;
+ if(time < 0){
+ return '刚刚';
+ }else if(time/month >= 1){
+ result = formatChatTime(new Date(time2));
+ }else if(time/week >= 1){
+ result = formatChatTime(new Date(time2));
+ }else if(time/day >= 1){
+ result = formatChatTime(new Date(time2));
+ }else if(time/day == 1){
+ result = new Date(time2).Format("MM-dd hh:mm");
+ }else if(time/hour >= 1){
+ result = new Date(time2).Format("hh:mm");
+ }else if(time/minute >= 1){
+ result = new Date(time2).Format("hh:mm");
+ }else {
+ result = "刚刚";
+ }
+ return result;
+}
// px 转换为 rpx ,传参类型是数字(Number)
const rpxTopx = px => {
let deviceWidth = wx.getSystemInfoSync().windowWidth; //获取设备屏幕宽度
@@ -75,5 +129,6 @@ module.exports = {
getDateArr,
formatNumber,
getTimeAgo,
- rpxTopx
+ rpxTopx,
+ getTimeAgoChat
}