This commit is contained in:
haomingming
2023-04-11 18:41:46 +08:00
parent 3f40c4c237
commit 4f14aad6f3
53 changed files with 657 additions and 205 deletions
+30
View File
@@ -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
}
})
}
}
+56 -1
View File
@@ -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
}