diff --git a/Pages/index/index.js b/Pages/index/index.js index 1d3a895..739c841 100644 --- a/Pages/index/index.js +++ b/Pages/index/index.js @@ -39,7 +39,9 @@ Page({ guideTo(usertype){ let url; if(usertype == 2){ - app.imInit(); + if(!wx.$TUIKit){ + app.imInit(); + } url = "/Pages/yishi/index/index"; }else{ app.imLogout(); diff --git a/Pages/login/index.wxml b/Pages/login/index.wxml index 71911e1..5f9724f 100644 --- a/Pages/login/index.wxml +++ b/Pages/login/index.wxml @@ -23,7 +23,11 @@ wx:else bindtap="getPhoneNumber" color="#09BB07" custom-style="font-size: 36rpx;" type="primary" round block>微信授权手机号登录 - 我已阅读并同意协议《肝胆相照用户服务协议》 + + + 我已阅读并同意协议 + 《肝胆相照用户服务协议》 + diff --git a/Pages/yishi/agreement_detail/index.js b/Pages/yishi/agreement_detail/index.js new file mode 100644 index 0000000..9593e2d --- /dev/null +++ b/Pages/yishi/agreement_detail/index.js @@ -0,0 +1,30 @@ +import { API } from './../../../utils/network/api' +let api = new API() +Page({ + + data: { + navbarData: { + showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示 + title: '协议详情', //导航栏 中间的标题 + }, + agreement_id: "", + agreement_content: "" + }, + + onLoad(option){ + this.setData({ + agreement_id: option.agreement_id + }) + }, + + onShow(){ + //获取医生我的账户数据 + api.getBasicAgreement({agreement_id: this.data.agreement_id}).then(response => { + console.log(response); + this.setData({ + agreement_content: response.data.agreement_content, + "navbarData.title": response.data.agreement_name, + }) + }).catch(errors => {console.error(errors);}) + } +}) \ No newline at end of file diff --git a/Pages/yishi/agreement_detail/index.json b/Pages/yishi/agreement_detail/index.json new file mode 100644 index 0000000..3b3b8cc --- /dev/null +++ b/Pages/yishi/agreement_detail/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "te-nav-bar": "/commpents/te_navbar" + } +} \ No newline at end of file diff --git a/Pages/yishi/agreement_detail/index.wxml b/Pages/yishi/agreement_detail/index.wxml new file mode 100644 index 0000000..8e9cd5f --- /dev/null +++ b/Pages/yishi/agreement_detail/index.wxml @@ -0,0 +1,5 @@ + + + + + diff --git a/Pages/yishi/agreement_detail/index.wxss b/Pages/yishi/agreement_detail/index.wxss new file mode 100644 index 0000000..893b247 --- /dev/null +++ b/Pages/yishi/agreement_detail/index.wxss @@ -0,0 +1,8 @@ +/* Pages/yishi/manual_detail/index.wxss */ +page{ + background-color: #F6F6F6; +} +.container{ + width: 92vw; + margin: 20rpx auto; +} \ No newline at end of file diff --git a/Pages/yishi/appraise/index.wxml b/Pages/yishi/appraise/index.wxml index 26609cf..39259e5 100644 --- a/Pages/yishi/appraise/index.wxml +++ b/Pages/yishi/appraise/index.wxml @@ -1,3 +1,4 @@ + @@ -17,7 +18,7 @@ {{item.content}} - {{item.created_at}} + {{dateSubstr.substring(item.created_at,0,16)}} @@ -33,7 +34,7 @@ {{item.content}} - {{item.created_at}} + {{dateSubstr.substring(item.created_at,0,16)}} @@ -49,7 +50,7 @@ {{item.content}} - {{item.created_at}} + {{dateSubstr.substring(item.created_at,0,16)}} diff --git a/Pages/yishi/cash/index.js b/Pages/yishi/cash/index.js index 71740f0..b3e9c2a 100644 --- a/Pages/yishi/cash/index.js +++ b/Pages/yishi/cash/index.js @@ -11,7 +11,7 @@ Page({ height: app.globalData.height, bank_card_id: "", bank_icon_path: "https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/bankcard/js_icon.png", - realname: "默认姓名", + bank_card_name: "默认姓名", bank_name : "xx银行", bank_card_code_mask: "888 xxxx xxxx 888", withdrawal_amount: "xxxx", @@ -34,6 +34,10 @@ Page({ }, onShow(){ + }, + go(e){ + let url = e.currentTarget.dataset.url; + app.go(url); }, contactKeFu(e){ let _this = this; @@ -63,6 +67,7 @@ Page({ bank_card_code_mask: response.data.bank.bank_card_code_mask, withdrawal_amount: response.data.withdrawal_amount, order_inquiry_ids: response.data.order_inquiry_ids, + bank_card_name: response.data.bank.bank_card_name_mask, income_tax: response.data.income_tax, skeleton_loading: false }) diff --git a/Pages/yishi/cash/index.wxml b/Pages/yishi/cash/index.wxml index ba14638..35d59b6 100644 --- a/Pages/yishi/cash/index.wxml +++ b/Pages/yishi/cash/index.wxml @@ -3,14 +3,14 @@ 结算银行卡 - 提现规则 + 提现规则 - {{realname}}{{bank_name}} + {{bank_card_name}}{{bank_name}} {{bank_card_code_mask}} diff --git a/Pages/yishi/cashrecord/index.js b/Pages/yishi/cashrecord/index.js index ec7de6c..10460e8 100644 --- a/Pages/yishi/cashrecord/index.js +++ b/Pages/yishi/cashrecord/index.js @@ -15,14 +15,22 @@ Page({ per_page: 0, last_page: 0, dateVisible: false, - select_date: '2023', - years: [ - { label: '2022年', value: '2022' }, - { label: '2023年', value: '2023' }, - { label: '2024年', value: '2024' }, - ], + select_date: '', + years: [], }, onLoad(){ + let now_year = (new Date()).Format("yyyy"); + let begin_year = 2022; + let years = []; + for(let i=begin_year;i<=now_year;i++){ + years.push({label: i+"年", value: i+""}) + } + this.setData({ + years: years, + select_date: now_year+"" + }) + }, + onShow(){ let year = this.data.select_date; year = Number(year); this.getDoctorWithdrawalRecord(year); diff --git a/Pages/yishi/index/index.js b/Pages/yishi/index/index.js index 0fcb001..9795a64 100644 --- a/Pages/yishi/index/index.js +++ b/Pages/yishi/index/index.js @@ -33,6 +33,7 @@ Page({ default_dialog_show: false,//只弹框一次 dialog_visible: false, dialog_content: "请您先完成实名认证", + dialog_url: "", /* case_module取值 新问诊 0 @@ -57,27 +58,32 @@ Page({ { case_status: 0, case_module: [0,1,2,3,4,5,6,7,8], - case_text: "请您先完成实名认证" + case_text: "请您先完成实名认证", + case_url: "/Pages/yishi/identity/index" }, { case_status: 1, case_module: [0,1,2,3,4,5,6,7,8], - case_text: "请您先医师身份认证" + case_text: "请您先医师身份认证", + case_url: "/Pages/yishi/identity/index?selected_tab=1" }, { case_status: 2, case_module: [0,1,2,3,4,5,6,7,8], - case_text: "请您先绑定结算银行卡" + case_text: "请您先绑定结算银行卡", + case_url: "/Pages/yishi/bankcard/index" }, { case_status: 3, case_module: [7], - case_text: "请您先进行多点执业认证" + case_text: "请您先进行多点执业认证", + case_url: "/Pages/yishi/zhiye_identity/index" }, { case_status: 4, case_module: [7], - case_text: "请您先进行多点执业认证" + case_text: "请您先进行多点执业认证", + case_url: "/Pages/yishi/zhiye_identity/index" }, { case_status: 5, @@ -147,6 +153,8 @@ Page({ }) wx.setStorageSync('overlay_show', "1") } + + app.go("/Pages/yishi/manual_detail/index?manual_id=1") }, cancelJieSuanDialog(){ this.setData({ @@ -208,6 +216,12 @@ Page({ return }, onShow: function () { + + //初始化默认值 + this.setData({ + skeleton_loading: true, + }); + wx.onCopyUrl(this.Copylistener); if (typeof this.getTabBar === 'function' && this.getTabBar()) { this.getTabBar().setData({ @@ -366,11 +380,14 @@ Page({ } app.go(e.currentTarget.dataset.url); }, - confirmDialog(){ + confirmDialog(e){ + console.log(e) + let url = e.currentTarget.dataset.url; + console.log("confirmDialog: ", url) this.setData({ dialog_visible: false }) - app.go(this.data.shiming_status_url); + app.go(url); }, cancelDialog(){ this.setData({ @@ -409,6 +426,7 @@ Page({ this.setData({ dialog_content: "请您先完成实名认证", shiming_status_url: "/Pages/yishi/identity/index", + dialog_url: "/Pages/yishi/identity/index", default_dialog_show: true }); return false; @@ -424,6 +442,7 @@ Page({ "info.info_shiming_status_txt": "认证失败", "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/identity/index", + dialog_url: "/Pages/yishi/identity/index", dialog_content: "实名认证失败", default_dialog_show: true }); @@ -440,6 +459,7 @@ Page({ "info.info_shiming_status_txt": "前往医师身份认证", "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/identity/index?selected_tab=1", + dialog_url: "/Pages/yishi/identity/index?selected_tab=1", dialog_content: "请您先医师身份认证", default_dialog_show: true }); @@ -455,6 +475,7 @@ Page({ "info.info_shiming_status_txt": "审核中", "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/identity/index?selected_tab=1", + dialog_url: "/Pages/yishi/identity/index?selected_tab=1", // dialog_content: "您的医师身份认证正在审核中", // default_dialog_show: true }); @@ -470,6 +491,7 @@ Page({ "info.info_shiming_status_txt": "认证失败", "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/identity/index?selected_tab=1", + dialog_url: "/Pages/yishi/identity/index?selected_tab=1", dialog_content: "您的医师身份认证失败", // default_dialog_show: true }); @@ -487,6 +509,7 @@ Page({ "info.info_shiming_status_txt": "绑定结算银行卡", "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/bankcard/index", + dialog_url: "/Pages/yishi/bankcard/index", dialog_content: "请您先绑定结算银行卡", default_dialog_show: true }); @@ -505,7 +528,7 @@ Page({ "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/zhiye_identity/index", dialog_content: "请您先进行多点执业认证", - default_dialog_show: true + // default_dialog_show: true }); // return false; } @@ -521,7 +544,7 @@ Page({ "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/zhiye_identity/index", dialog_content: "您的多点执业认证正在审核中", - default_dialog_show: true + // default_dialog_show: true }); // return false; } @@ -537,11 +560,19 @@ Page({ "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/zhiye_identity/index", dialog_content: "您的多点执业认证失败", - default_dialog_show: true + // default_dialog_show: true }); // return false; } + const jiesuan_dialog_show = wx.getStorageSync('jiesuan_dialog_show'); + if(!jiesuan_dialog_show){ + this.setData({ + jiesuan_dialog_visible: true, + }); + wx.setStorageSync('jiesuan_dialog_show', true); + } + if((is_img_expert_reception + is_img_quick_reception + is_img_welfare_reception) == 0){ if(!this.data.default_dialog_show){ this.setData({ @@ -552,7 +583,6 @@ Page({ "info.info_shiming_status_txt": "开启在线问诊", "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/onlinesetup/index", - dialog_content: "您的多点执业认证失败", // default_dialog_show: true }); return false; @@ -568,7 +598,6 @@ Page({ "info.info_shiming_status_txt": "去接诊", "info.info_shiming_status": "info_shiming_status_yes", shiming_status_url: "/Pages/yishi/wenzhen_v2/wenzhen", - dialog_content: "您的多点执业认证失败", // default_dialog_show: true }); return false; @@ -594,12 +623,7 @@ Page({ // return false; // } - if(!app.globalData.jiesuan_dialog_show){ - this.setData({ - jiesuan_dialog_visible: true, - }); - app.globalData.jiesuan_dialog_show = true - } + this.setData({ "info.info_shiming_status_txt": "去接诊", @@ -688,7 +712,8 @@ Page({ if(now_moudle != undefined){ this.setData({ dialog_content: now_case.case_text, - dialog_visible: true + dialog_visible: true, + dialog_url: now_case.case_url }); retult = false; return; diff --git a/Pages/yishi/index/index.wxml b/Pages/yishi/index/index.wxml index c27acfe..2bda114 100644 --- a/Pages/yishi/index/index.wxml +++ b/Pages/yishi/index/index.wxml @@ -22,7 +22,7 @@ {{info.info_shiming_status_txt}} - + @@ -181,7 +181,7 @@ 取消 - + 确定 @@ -189,7 +189,7 @@ 已了解 diff --git a/Pages/yishi/manual_detail/index.js b/Pages/yishi/manual_detail/index.js index 75fe20d..b6a984f 100644 --- a/Pages/yishi/manual_detail/index.js +++ b/Pages/yishi/manual_detail/index.js @@ -18,7 +18,7 @@ Page({ }, onShow(){ - //获取医生我的账户数据 + //获取操作手册详情 api.getBasicOperationManualID({manual_id: this.data.manual_id}).then(response => { console.log(response); this.setData({ diff --git a/Pages/yishi/myaccount/index.js b/Pages/yishi/myaccount/index.js index d4c810a..1503f29 100644 --- a/Pages/yishi/myaccount/index.js +++ b/Pages/yishi/myaccount/index.js @@ -17,10 +17,7 @@ Page({ amount_total_month: "", withdrawal_amount_month: "", bill: [], - years: [ - { label: '2023年', value: '2023' }, - { label: '2024年', value: '2024' }, - ], + years: [], seasons: [ { label: '1月', value: '1' }, { label: '2月', value: '2' }, @@ -36,6 +33,17 @@ Page({ { label: '12月', value: '12' }, ] }, + onLoad(){ + let now_year = (new Date()).Format("yyyy"); + let begin_year = 2022; + let years = []; + for(let i=begin_year;i<=now_year;i++){ + years.push({label: i+"年", value: i+""}) + } + this.setData({ + years: years + }) + }, onShow(){ let now_date = new Date(); let now_datearr = util.getDateArr(now_date); @@ -108,5 +116,9 @@ Page({ let date = this.data.dateValue[0]+"-"+md; console.log(date); app.go(url+"?date="+date); - } + }, + go(e){ + let url = e.currentTarget.dataset.url; + app.go(url); + }, }) \ No newline at end of file diff --git a/Pages/yishi/myaccount/index.wxml b/Pages/yishi/myaccount/index.wxml index 0d97cea..541a1e6 100644 --- a/Pages/yishi/myaccount/index.wxml +++ b/Pages/yishi/myaccount/index.wxml @@ -23,7 +23,7 @@ - + - 微信长按或扫描二维码查看我的更多信息 + 让您的患者微信扫码,线上复诊更便捷 - 分享我的名片到 + - 保存至相册 + 保存到相册,分享到朋友圈 diff --git a/Pages/yishi/onlinesetupprice/index.wxml b/Pages/yishi/onlinesetupprice/index.wxml index 13e237f..9d6f26c 100644 --- a/Pages/yishi/onlinesetupprice/index.wxml +++ b/Pages/yishi/onlinesetupprice/index.wxml @@ -4,7 +4,7 @@ 每日接诊数量 - + diff --git a/Pages/yishi/wenzhen_v2/wenzhen.js b/Pages/yishi/wenzhen_v2/wenzhen.js index b6e4b76..bdbf521 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.js +++ b/Pages/yishi/wenzhen_v2/wenzhen.js @@ -16,6 +16,7 @@ Page({ data_list_3: [], data_list_4: [], data_list_5: [], + data_list_5_loading: false, conversationList: [], message_inquiry_type: 99999, now_message_inquiry_type: 5, @@ -395,7 +396,7 @@ Page({ if(payload) { console.log("payload: ",payload.data); let payloadJson = JSON.parse(payload.data); - text = payloadJson.title.replaceAll(/-/g, "").replaceAll(/—/g, ""); + text = payloadJson.title.replaceAll(/—/g, ""); } lastMessage.messageForShow = text; } @@ -468,18 +469,19 @@ Page({ show: false }) - console.log("开始订阅消息"); - wx.requestSubscribeMessage({ - tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'], - success (res) { - console.log(res); - let from_account = e.currentTarget.dataset.from_account; - let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id; - let inquiry_type = e.currentTarget.dataset.inquiry_type; - let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type; - app.go(url); - } - }) + // console.log("开始订阅消息"); + // wx.requestSubscribeMessage({ + // tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'], + // success (res) { + // console.log(res); + // } + // }) + + let from_account = e.currentTarget.dataset.from_account; + let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id; + let inquiry_type = e.currentTarget.dataset.inquiry_type; + let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type; + app.go(url); }, postDoctorInquiry(e){ this.setData({ @@ -553,6 +555,7 @@ Page({ let data_list_5 = this.data.data_list_5; let params = {}; params.page = this.data.current_page + 1; + this.setData({data_list_5_loading: true}) api.getDoctorInquiryFinishMessage(params).then(response => { console.log(response); this.setData({ @@ -563,6 +566,11 @@ Page({ last_page: response.data.last_page }) // this.selectComponent('#tabs').resize(); - }).catch(errors => {console.error(errors);}) + }).then(res =>{ + this.setData({ data_list_5_loading: false}) + }).catch(errors => { + this.setData({ data_list_5_loading: false}) + console.error(errors); + }) } }) \ No newline at end of file diff --git a/Pages/yishi/wenzhen_v2/wenzhen.json b/Pages/yishi/wenzhen_v2/wenzhen.json index 4da761c..e566533 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.json +++ b/Pages/yishi/wenzhen_v2/wenzhen.json @@ -12,7 +12,8 @@ "van-tab": "@vant/weapp/tab/index", "van-tabs": "@vant/weapp/tabs/index", "t-dialog": "tdesign-miniprogram/dialog/dialog", - "van-divider": "@vant/weapp/divider/index" + "van-divider": "@vant/weapp/divider/index", + "van-loading": "@vant/weapp/loading/index" }, "enablePullDownRefresh": true, "onReachBottomDistance": 100 diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxml b/Pages/yishi/wenzhen_v2/wenzhen.wxml index b954de4..932823c 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.wxml +++ b/Pages/yishi/wenzhen_v2/wenzhen.wxml @@ -22,9 +22,12 @@ - - - 未收到任何消息 + + + + 未收到任何消息 + + 加载中... @@ -347,6 +350,9 @@ 不接诊24小时后自动取消 + + 加载中... + 到底了~ diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxss b/Pages/yishi/wenzhen_v2/wenzhen.wxss index 0be5bc4..ddfbe73 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.wxss +++ b/Pages/yishi/wenzhen_v2/wenzhen.wxss @@ -136,4 +136,9 @@ page{ border-top: 1px solid #E9E9E9; color: #3CC7C0; } - +.empty_box{ + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} diff --git a/Pages/yishi/wenzhen_v3/substr.wxs b/Pages/yishi/wenzhen_v3/substr.wxs new file mode 100644 index 0000000..7a50e2c --- /dev/null +++ b/Pages/yishi/wenzhen_v3/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_v3/wenzhen.js b/Pages/yishi/wenzhen_v3/wenzhen.js new file mode 100644 index 0000000..90abf7e --- /dev/null +++ b/Pages/yishi/wenzhen_v3/wenzhen.js @@ -0,0 +1,575 @@ +import { API } from './../../../utils/network/api' +import { getTimeAgo } from './../../../utils/util' +// import TIM from '../../../TUIKit/lib/tim-wx-sdk'; +const api = new API() +const app = getApp() +Page({ + data: { + navbarData: { + showCapsule: 0, //是否显示左上角图标 1表示显示 0表示不显示 + title: '问诊消息', //导航栏 中间的标题 + }, + height: app.globalData.height, + has_data: false, + data_list_1: [], + data_list_2: [], + data_list_3: [], + data_list_4: [], + data_list_5: [], + data_list_5_loading: false, + conversationList: [], + message_inquiry_type: 99999, + now_message_inquiry_type: 5, + system_notice_unreadnnum: "", + service_notice_unreadnnum: "", + hasOnShow: false, + show: false, + show_dialog_from_account: "", + show_dialog_order_inquiry_id: "", + show_dialog_inquiry_type: "", + unreadnnum_inter: 0, + current_page: 0, + total: 0, + per_page: 0, + last_page: 0, + dot_1: false, + dot_2: false, + dot_3: false, + dot_4: false, + }, + onLoad() { + console.log("wenzhen onloadddd"); + + // if(wx.$TUIKit){ + // wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this); + // }else{ + // app.imInit().then(res => { + // console.log("wenzhen onload imInit"); + // wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this); + // }); + // } + + //监听网络状态变化事件 + wx.onNetworkStatusChange(function (res) { + console.log("onNetworkStatusChange from wenzhen: ") + console.log(res.isConnected) + console.log(res.networkType) + wx.showToast({ + title: '网络类型'+res.networkType, + }) + }) + + }, + initInterval(){ + let _this = this; + let usertype = wx.getStorageSync('usertype'); + let userID = wx.getStorageSync('user_id_'+usertype); + let unreadnnum_inter = setInterval(() => { + let system_notice_unreadnnum = wx.getStorageSync(userID+"_system_notice_unreadnnum"); + let service_notice_unreadnnum = wx.getStorageSync(userID+"_service_notice_unreadnnum"); + this.setData({ + system_notice_unreadnnum: system_notice_unreadnnum, + service_notice_unreadnnum: service_notice_unreadnnum, + }) + + if(_this.data.data_list_1.length > 0 || _this.data.data_list_2.length > 0 || _this.data.data_list_3.length > 0 || _this.data.data_list_4.length > 0 || _this.data.data_list_5.length > 0){ + _this.setData({ + has_data: true + }) + _this.selectComponent('#tabs').resize(); + let getCurrentName = _this.selectComponent('#tabs').getCurrentName(); + let now_message_inquiry_type = _this.data.now_message_inquiry_type; + if(getCurrentName != now_message_inquiry_type){ + _this.setData({ + now_message_inquiry_type: getCurrentName + }) + } + } + }, 100); + this.setData({ + unreadnnum_inter: unreadnnum_inter + }) + console.log("app.globalData.unreadnnum_inter: ", app.globalData.unreadnnum_inter); + }, + onShow: function () { + console.log("onShow from wenzhen V2") + if(this.data.hasOnShow){ + wx.stopPullDownRefresh() + return; + } + if (typeof this.getTabBar === 'function' && this.getTabBar()) { + this.getTabBar().setData({ + active: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1 + }) + + this.getTabBar().startInterval() + } + this.getDoctorInquiryFinishMessage(); + this.getDoctorMessageNotice(); + this.getConversationList(); + if(this.data.unreadnnum_inter == 0){ + this.initInterval(); + } + //避免onshow加载多次 + this.setData({ + hasOnShow: true + }) + + + if(wx.$TUIKit){ + wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this); + }else{ + app.imInit().then(res => { + console.log("wenzhen onload imInit"); + wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this); + }); + } + }, + onHide(){ + console.log("onHideonHide from wenzhen") + if (typeof this.getTabBar === 'function' && this.getTabBar()) { + this.getTabBar().stopInterval() + } + clearInterval(this.data.unreadnnum_inter) + this.setData({ + hasOnShow: false, + data_list_1: [], + data_list_2: [], + data_list_3: [], + data_list_4: [], + data_list_5: [], + message_inquiry_type: 9999, + now_message_inquiry_type: 5, + unreadnnum_inter: 0, + has_data: false, + current_page: 0, + total: 0, + per_page: 0, + last_page: 0, + dot_1: false, + dot_2: false, + dot_3: false, + dot_4: false, + }) + wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived); + }, + onUnload(){ + console.log("onUnload from wenzhen") + this.setData({ + hasOnShow: false, + message_inquiry_type: 9999, + now_message_inquiry_type: 5, + }) + }, + getConversationList(){ + console.log("getConversationListgetConversationListgetConversationList"); + app.imInit().then(res => { + console.log("wenzhen onload imInit: ", res); + wx.$TUIKit.getConversationList().then((imResponse) => { + console.log("imResponse.data.conversationList from wenzhen_v2: ", imResponse.data.conversationList); + this.setData({ + conversationList: imResponse.data.conversationList, + }); + }).then(() => { + console.log("开始查询订单状态") + this.formatStatus(); + }).catch(error => { + console.log(error) + }); + }); + }, + go(e){ + this.setData({ + show: false + }) + let url = e.currentTarget.dataset.url; + let name = e.currentTarget.dataset.name; + wx.setStorageSync(name, 0); + app.go(url); + }, + $onMessageReceived(value) { + const message = value.data[0]; + console.log("message from wenzhen: ",message) + this.getConversationList(); + // let cloudCustomData = JSON.parse(message.cloudCustomData); + // let inquiry_type = cloudCustomData.inquiry_type; + // let order_inquiry_id = cloudCustomData.order_inquiry_id; + // let type = message.type; + // let message_txt = "新消息"; + // console.log(type) + // switch (type) { + // case TIM.TYPES.MSG_TEXT: + // console.log("文本消息"); + // message_txt = message.payload.text; + // break; + // case TIM.TYPES.MSG_IMAGE: + // console.log("图片消息"); + // message_txt = "[图片]"; + // break; + // case TIM.TYPES.MSG_AUDIO: + // console.log("音频消息") + // message_txt = "[语言]"; + // break; + // case TIM.TYPES.MSG_VIDEO: + // console.log("视频消息"); + // message_txt = "[视频]"; + // break; + // case TIM.TYPES.MSG_FILE: + // console.log("文件消息") + // message_txt = "[文件]"; + // break; + // case TIM.TYPES.MSG_CUSTOM: + // console.log("自定义消息") + // break; + // case TIM.TYPES.MSG_MERGER: + // console.log("合并消息") + // break; + // case TIM.TYPES.MSG_LOCATION: + // console.log("位置消息") + // message_txt = "[位置]"; + // break; + // case TIM.TYPES.MSG_FACE: + // console.log("表情消息") + // message_txt = "[表情]"; + // break; + // default: + // break; + // } + // let list_name = "data_list_" + inquiry_type; + // let _index = this.data[list_name].findIndex(item => { + // return item.order_inquiry_id == order_inquiry_id; + // }) + + // let new_list = []; + // //没有当前会话 + // if(_index > -1){ + // let target = list_name + "[" + _index + "].last_message_content.Text"; + // let target_dot = list_name + "[" + _index + "].message_dot"; + // console.log("target: ",target); + // this.setData({ + // [target]: message_txt, + // [target_dot]: true + // }) + // new_list.push(this.data[list_name][_index]);//先放入目标 + // }else{ + // let item = {}; + // item.inquiry_status = message.inquiry_status; + // let txt = {}; + // txt.Text= message_txt; + // item.last_message_content = txt; + // item.message_send_time = message.message_send_time; + // item.message_seq = message.message_seq; + // item.message_type = message.message_type; + // item.order_inquiry_id = message.order_inquiry_id; + // item.patient_age = message.patient_age; + // item.patient_name = message.patient_name; + // item.patient_sex = message.patient_sex; + // item.to_user_id = message.to_user_id; + // item.message_dot = true; + // new_list.push(item); + // } + + // //置顶 + // this.data[list_name].forEach((item, index) => { + // if(index != _index){ + // new_list.push(item) + // } + // }) + + // this.setData({ + // [list_name]: new_list + // }) + + }, + formatStatus(){ + let order_inquiry_id_list = []; + order_inquiry_id_list.push("");//初始化一个,防止失败 + this.data.conversationList.forEach(item => { + let conversationID = item.conversationID; + if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过 + let lastMessage = item.lastMessage; + if(!lastMessage) return; + let cloudCustomData = lastMessage.cloudCustomData; + if(!cloudCustomData) return; + let cloudCustomDataJson; + try { + cloudCustomDataJson = JSON.parse(cloudCustomData); + } catch (error) { + console.log(error); + return; + } + let order_inquiry_id = cloudCustomDataJson.order_inquiry_id; + order_inquiry_id_list.push(order_inquiry_id);//准备去请求后端那订单状态 + }) + let conversationList = this.data.conversationList; + //获取医生问诊消息用户属性 + api.getDoctorInquiryMessageAttr({order_inquiry_ids: order_inquiry_id_list.join(",")}).then(response => { + let new_conversationList = []; + if(response.data.length > 0){ + conversationList.forEach(item => { + let conversationID = item.conversationID; + if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过 + let lastMessage = item.lastMessage; + if(!lastMessage) return; + let cloudCustomData = lastMessage.cloudCustomData; + if(!cloudCustomData) return; + let cloudCustomDataJson; + try { + cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData); + } catch (error) { + return; + } + let order_inquiry_id = cloudCustomDataJson.order_inquiry_id; + let order = response.data.find(attr_item => { + return attr_item.order_inquiry_id == order_inquiry_id; + }) + if(!order) return; + + let inquiry_status = order.inquiry_status; + //inquiry_status 状态 + if(inquiry_status !=3 && inquiry_status != 4){ + return; + } + item.inquiry_status = inquiry_status; + item.patient_age = order.patient_age; + item.patient_name = order.patient_name; + item.patient_sex = order.patient_sex; + new_conversationList.push(item); + }) + } + this.setData({ + conversationList: new_conversationList + }) + }).then(() => { + console.log("开始格式化formatConversationList") + this.formatConversationList(); + }).catch(errors => {console.error(errors);}) + }, + formatConversationList(){ + let session_list = []; + let session_data_list_1 = []; + let session_data_list_2 = []; + let session_data_list_3 = []; + let session_data_list_4 = []; + let session_data_list_5 = []; + session_list.push(session_data_list_1); + session_list.push(session_data_list_2); + session_list.push(session_data_list_3); + session_list.push(session_data_list_4); + session_list.push(session_data_list_5); + + let usertype = wx.getStorageSync('usertype'); + let userID = wx.getStorageSync('user_id_'+usertype); + let totalUnreadCount = 0; + let message_inquiry_type = this.data.message_inquiry_type; + + this.data.conversationList.forEach(item => { + let conversationID = item.conversationID; + if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过 + let lastMessage = item.lastMessage; + let type = lastMessage.type; + let userProfile = item.userProfile; + if(!lastMessage) return; + let cloudCustomData = lastMessage.cloudCustomData; + if(!cloudCustomData) return; + let cloudCustomDataJson = JSON.parse(cloudCustomData); + let order_inquiry_id = cloudCustomDataJson.order_inquiry_id; + if(!order_inquiry_id) return; + let inquiry_type = cloudCustomDataJson.inquiry_type; + if(!inquiry_type) return; + if(inquiry_type > 4) return; + if(inquiry_type < message_inquiry_type){ + message_inquiry_type = inquiry_type; + } + //去重order_inquiry_id + let index = this.checkOrderInquiryId(session_list[inquiry_type - 1], order_inquiry_id); + if(index > -1) return; + let patient_family_data = cloudCustomDataJson.patient_family_data; + if(patient_family_data == undefined) return; + console.log("patient_family_data: ", patient_family_data); + let session_item = {}; + session_item.inquiry_status = item.inquiry_status;//订单状态暂无 + let txt = {}; + if(lastMessage.messageForShow == "[自定义消息]"){ + let text = "自定义消息"; + let payload = lastMessage.payload; + if(payload) { + console.log("payload: ",payload.data); + let payloadJson = JSON.parse(payload.data); + text = payloadJson.title.replaceAll(/—/g, ""); + } + lastMessage.messageForShow = text; + } + if(lastMessage.isRevoked){ + if(lastMessage.fromAccount == app.globalData.config.userID){ + lastMessage.messageForShow = "你撤回了一条消息"; + }else{ + lastMessage.messageForShow = "对方撤回了一条消息"; + } + } + txt.Text= lastMessage.messageForShow; + session_item.last_message_content = txt; + session_item.message_send_time = getTimeAgo(lastMessage.lastTime); + session_item.message_type = type; + session_item.order_inquiry_id = order_inquiry_id; + session_item.inquiry_type = inquiry_type; + session_item.patient_age = patient_family_data.patient_age; + session_item.patient_name = patient_family_data.patient_name; + session_item.patient_sex = patient_family_data.patient_sex; + session_item.from_account = userProfile.userID; + let unreadCount = item.unreadCount; + if(unreadCount > 0){ + totalUnreadCount = totalUnreadCount + unreadCount; + session_item.message_dot = true; + let dot_name = "dot_"+inquiry_type + this.setData({ + [dot_name]: true + }) + }else{ + if(item.inquiry_status == 3){ + totalUnreadCount = totalUnreadCount + 1; + session_item.message_dot = true; + let dot_name = "dot_"+inquiry_type + this.setData({ + [dot_name]: true + }) + }else{ + session_item.message_dot = false; + } + } + session_list[inquiry_type - 1].push(session_item); + }) + + + wx.setStorageSync(userID+'_wenzhen_info', totalUnreadCount); + + + this.setData({ + data_list_1: session_data_list_1, + data_list_2: session_data_list_2, + data_list_3: session_data_list_3, + data_list_4: session_data_list_4, + message_inquiry_type: message_inquiry_type + }) + wx.stopPullDownRefresh() + // this.selectComponent('#tabs').resize(); + + }, + checkOrderInquiryId(list, order_inquiry_id){ + let index = list.findIndex(item => { + return item.order_inquiry_id == order_inquiry_id; + }) + return index; + }, + onTabsChange(e){ + console.log(e); + }, + goChat(e){ + this.setData({ + show: false + }) + + console.log("开始订阅消息"); + wx.requestSubscribeMessage({ + tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'], + success (res) { + console.log(res); + let from_account = e.currentTarget.dataset.from_account; + let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id; + let inquiry_type = e.currentTarget.dataset.inquiry_type; + let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type; + app.go(url); + } + }) + }, + postDoctorInquiry(e){ + this.setData({ + show: false + }) + console.log("order_inquiry_id: ", e.currentTarget.dataset.order_inquiry_id); + let params = {}; + params.order_inquiry_id = e.currentTarget.dataset.order_inquiry_id; + console.log("params: ",params) + api.postDoctorInquiry(params).then(response => { + console.log("开始接诊"); + console.log(response); + }).then(() => { + this.goChat(e); + }).catch(errors => { + console.error(errors); + }) + }, + //获取上方角标 + getDoctorMessageNotice(e){ + let usertype = wx.getStorageSync('usertype'); + let userID = wx.getStorageSync('user_id_'+usertype); + api.getDoctorMessageNotice().then(response => { + let service_message_notice = response.data.service_message_notice; + let system_message_notice = response.data.system_message_notice; + wx.setStorageSync(userID+"_service_notice_unreadnnum", service_message_notice==true?1:"");//3、医生端系统通知 + wx.setStorageSync(userID+"_system_notice_unreadnnum", system_message_notice);//4、医生端服务通知 + }).catch(errors => { + console.error(errors); + }) + }, + tabShow(e){ + let show_dialog_from_account = e.currentTarget.dataset.show_dialog_from_account; + let show_dialog_order_inquiry_id = e.currentTarget.dataset.show_dialog_order_inquiry_id; + let show_dialog_inquiry_type = e.currentTarget.dataset.show_dialog_inquiry_type; + console.log("tabShowtabShowtabShowtabShow"); + this.setData({ + show_dialog_from_account: show_dialog_from_account, + show_dialog_order_inquiry_id: show_dialog_order_inquiry_id, + show_dialog_inquiry_type: show_dialog_inquiry_type, + show: true + }) + }, + onClose(){ + console.log("onCloseonCloseonCloseonClose") + this.setData({ + show: false + }) + }, + vanTabsChange(e){ + console.log(e) + this.setData({ + now_message_inquiry_type: e.detail.name + }) + }, + onPullDownRefresh(){ + console.log("用户下拉动作") + this.onHide(); + this.onShow(); + }, + onReachBottom() { + console.log('===触底了!!==='); + let now_message_inquiry_type = this.data.now_message_inquiry_type; + if(now_message_inquiry_type == 5){ + if(this.data.current_page < this.data.last_page){//最后一页时停止分页 + this.getDoctorInquiryFinishMessage() + } + } + }, + getDoctorInquiryFinishMessage(){ + let data_list_5 = this.data.data_list_5; + let params = {}; + params.page = this.data.current_page + 1; + this.setData({data_list_5_loading: true}) + api.getDoctorInquiryFinishMessage(params).then(response => { + console.log(response); + this.setData({ + "data_list_5": data_list_5.concat(response.data.data), + current_page: response.data.current_page, + total: response.data.total, + per_page: response.data.per_page, + last_page: response.data.last_page + }) + // this.selectComponent('#tabs').resize(); + }).then(res =>{ + this.setData({ data_list_5_loading: false}) + }).catch(errors => { + this.setData({ data_list_5_loading: false}) + console.error(errors); + }) + } +}) \ No newline at end of file diff --git a/Pages/yishi/wenzhen_v3/wenzhen.json b/Pages/yishi/wenzhen_v3/wenzhen.json new file mode 100644 index 0000000..e566533 --- /dev/null +++ b/Pages/yishi/wenzhen_v3/wenzhen.json @@ -0,0 +1,20 @@ +{ + "component": true, + "usingComponents": { + "te-nav-bar": "/commpents/te_navbar", + "wenzhen-data": "/commpents/wenzhen_data/index", + "t-tabs": "tdesign-miniprogram/tabs/tabs", + "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", + "t-badge": "tdesign-miniprogram/badge/badge", + "van-button": "@vant/weapp/button/index", + "van-empty": "@vant/weapp/empty/index", + "van-image": "@vant/weapp/image/index", + "van-tab": "@vant/weapp/tab/index", + "van-tabs": "@vant/weapp/tabs/index", + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "van-divider": "@vant/weapp/divider/index", + "van-loading": "@vant/weapp/loading/index" + }, + "enablePullDownRefresh": true, + "onReachBottomDistance": 100 +} \ No newline at end of file diff --git a/Pages/yishi/wenzhen_v3/wenzhen.wxml b/Pages/yishi/wenzhen_v3/wenzhen.wxml new file mode 100644 index 0000000..1a15d4e --- /dev/null +++ b/Pages/yishi/wenzhen_v3/wenzhen.wxml @@ -0,0 +1,378 @@ + + + + + + + + + + + 服务通知 + + + + + + + + + + 系统公告 + + + + + + + 未收到任何消息 + + 加载中... + + + + + + + + + + + + + + + 就诊人: + {{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}} + + {{item.message_send_time}} + + {{item.last_message_content.Text}} + + {{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }} + + 查看病历 + 去接诊 + + + 问诊详情 + + + + 不接诊24小时后自动取消 + + + + + + + + + + + 就诊人: + {{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}} + + {{item.message_send_time}} + + {{item.last_message_content.Text}} + + {{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }} + + 查看病历 + 去接诊 + + + 问诊详情 + + + + 不接诊24小时后自动取消 + + + + + + + + + + 就诊人: + {{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}} + + {{item.message_send_time}} + + {{item.last_message_content.Text}} + + {{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }} + + 查看病历 + 去接诊 + + + 问诊详情 + + + + 不接诊24小时后自动取消 + + + + + + + + + + 就诊人: + {{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}} + + {{item.message_send_time}} + + {{item.last_message_content.Text}} + + {{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }} + + 查看病历 + 去接诊 + + + 问诊详情 + + + + 不接诊24小时后自动取消 + + + + + + + + 就诊人: + {{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}} + + {{dateSubstr.substring(item.complete_time,0,10)}} + + 问诊已结束 + + {{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }} + + 不接诊24小时后自动取消 + + + + 加载中... + + + 到底了~ + + + + + + + + 去查看 + 去接诊 + + \ No newline at end of file diff --git a/Pages/yishi/wenzhen_v3/wenzhen.wxss b/Pages/yishi/wenzhen_v3/wenzhen.wxss new file mode 100644 index 0000000..0be5bc4 --- /dev/null +++ b/Pages/yishi/wenzhen_v3/wenzhen.wxss @@ -0,0 +1,139 @@ +page{ + background-color: #F4F4F4; +} +.container{ + width: 100vw; + padding-top: 20rpx; +} +.top{ + margin: 0 auto 30rpx auto; + display: flex; + padding: 20rpx 20rpx; + background-color: rgb(255, 255, 255); +} +.top_left, .top_right{ + flex: 1; + text-align: center; + display: flex; + flex-direction: column; + color: #666666; + font-size: 28rpx; +} +.top_left{ + border-right: 1px solid #F4F4F4; +} +.t-tab-panel,.t-tabs__content { + background-color: #F4F4F4 !important; +} +.t-tabs__item--active{ + color: #49B9AD !important; + font-size: 32rpx !important; +} +.t-tabs__item-inner--line{ + font-size: 28rpx !important; +} +.t-tabs__track{ + background-color: var(--td-tab-track-color, var(--td-primary-color, #49B9AD)) !important; +} +.empty{ + width: 92vw; + margin: 0 auto; + height: 500rpx; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} +.empty_note{ + font-size: 24rpx; + color: #999999; + margin-top: 30rpx; +} +.badge--t-badge { + vertical-align: baseline !important; +} + + + + + + +.content{ + background-color: #fff; + display: flex; + flex-direction: column; + margin-bottom: 20rpx; +} +.content_1,.content_3,.content_2{ + display: flex; + justify-content: space-between; + margin: 20rpx 30rpx; + align-items: center; +} +.content_1,.content_3{ + flex: 5; +} +.name{ + font-size: 30rpx; + color: #666666; + height: 50rpx; + line-height: 50rpx; + display: flex; +} +.date{ + font-size: 30rpx; + color: #999; +} +.content_2{ + background-color: #FAFAFA; + font-size: 26rpx; + color: #999999; + min-height: 70rpx; + padding: 10rpx 20rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: block; + line-height: 70rpx; +} +.status{ + font-size: 26rpx; + color: #FA541C; + flex: 1; +} +.status_end{ + color: #666666; +} +.btn{ + flex: 2; + display: flex; + justify-content: flex-end; +} +.content_4{ + flex: 5; + font-size: 24rpx; + color: #E34D59; + justify-self:flex-end; + text-align:right; + display: flex; + justify-content: flex-end; + border-top: 1px solid #E3E4E5; + align-items: center; + margin: 0 30rpx; + min-height: 70rpx; +} +.dialog{ + width: 50%; + text-align: center; + height: 100rpx; + line-height: 100rpx; +} +.dialog_cancel_btn{ + border-top: 1px solid #E9E9E9; + border-right: 1px solid #E9E9E9; +} +.dialog_confirm_btn{ + border-top: 1px solid #E9E9E9; + color: #3CC7C0; +} + diff --git a/Pages/yishi/yizhensetup/index.js b/Pages/yishi/yizhensetup/index.js index 645c334..6102dfe 100644 --- a/Pages/yishi/yizhensetup/index.js +++ b/Pages/yishi/yizhensetup/index.js @@ -85,12 +85,7 @@ Page({ }, onChange({ detail }) { console.log("onChange: ", detail); - if(detail){ - this.setData({ note: this.data.open_note }); - }else{ - this.setData({ note: this.data.close_note }); - } - this.setData({ "info.is_open": detail }); + //修改开关 let params = {}; @@ -108,6 +103,13 @@ Page({ } }) } + }).then(()=>{ + if(detail){ + this.setData({ note: this.data.open_note }); + }else{ + this.setData({ note: this.data.close_note }); + } + this.setData({ "info.is_open": detail }); }).catch(errors => {console.error(errors);}) }, diff --git a/Pages/yishi/yizhensetupprice/index.wxml b/Pages/yishi/yizhensetupprice/index.wxml index 5888e92..4259805 100644 --- a/Pages/yishi/yizhensetupprice/index.wxml +++ b/Pages/yishi/yizhensetupprice/index.wxml @@ -5,7 +5,7 @@ 每日接诊数量 - + diff --git a/Pages/yishi/zhiye_identity/index.js b/Pages/yishi/zhiye_identity/index.js index 84941a4..75b3009 100644 --- a/Pages/yishi/zhiye_identity/index.js +++ b/Pages/yishi/zhiye_identity/index.js @@ -33,9 +33,11 @@ Page({ break; case 1: btn_txt = "审核通过"; + btn_disabled = true; break; case 2: btn_txt = "审核中"; + btn_disabled = true; break; case 3: btn_txt = "认证失败,再次提交"; diff --git a/Pages/yishi/zhiye_identity/index.wxml b/Pages/yishi/zhiye_identity/index.wxml index 17c2db5..60d18ee 100644 --- a/Pages/yishi/zhiye_identity/index.wxml +++ b/Pages/yishi/zhiye_identity/index.wxml @@ -7,6 +7,7 @@ upload_cell_desc="" upload_cell_note="查看示例" fileList="{{ id_card_front }}" + deletable="{{!btn_disabled}}" max_count="1" data-scene="2" data-field_name="id_card_front" @@ -22,6 +23,7 @@ upload_cell_desc="" upload_cell_note="查看示例" fileList="{{ id_card_back }}" + deletable="{{!btn_disabled}}" max_count="1" data-scene="2" data-field_name="id_card_back" @@ -60,6 +62,7 @@ upload_cell_note="" required="{{false}}" disabled="{{btn_disabled}}" + upload_cell_note_show="{{false}}" max_count="1" data-scene="2" data-field_name="sign_image" diff --git a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js index 9a25a60..3e2fe0f 100644 --- a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js +++ b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.js @@ -154,6 +154,7 @@ Component({ const renderDom = [{ type: 'prescribe', product_name: data.product_name, + title: customMessage.title, order_inquiry_id: data.order_inquiry_id, order_prescription_id: data.order_prescription_id, pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10), @@ -166,6 +167,7 @@ Component({ const renderDom = [{ type: 'prescribe_verify', product_name: data.product_name, + title: customMessage.title, order_inquiry_id: data.order_inquiry_id, order_prescription_id: data.order_prescription_id, pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10), diff --git a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxml b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxml index a579a30..901f8cf 100644 --- a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxml +++ b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxml @@ -49,21 +49,32 @@ {{renderDom[0].title}} {{renderDom[0].desc}} --> - - - 请您对本次问诊服务进行评价 - - - - 点击评价 - + + - 处方已开具 + {{renderDom[0].title}} + + + + RP:{{renderDom[0].product_name}} + 开方日期: {{renderDom[0].pharmacist_verify_time}} + + + 去查看 + + + + + + {{renderDom[0].title}} diff --git a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxss b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxss index 55f9fbb..dda23ff 100644 --- a/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxss +++ b/TUIKit/components/TUIChat/components/MessageElements/CustomMessage/index.wxss @@ -133,7 +133,7 @@ line-height: 42rpx; .gdxz_custom_message_title{ flex: 1; display: flex; - max-width: 92vw; + max-width: 95vw; justify-content: center; background-color: #E1E1E1; padding: 5rpx 40rpx; @@ -143,7 +143,7 @@ line-height: 42rpx; .gdxz_custom_message_desc{ margin-top: 30rpx; display: flex; - max-width: 92vw; + max-width: 95vw; letter-spacing: 2rpx; justify-content: center; color: #666666; diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.js b/TUIKit/components/TUIChat/components/MessageInput/index.js index dc78a2e..559bcd1 100644 --- a/TUIKit/components/TUIChat/components/MessageInput/index.js +++ b/TUIKit/components/TUIChat/components/MessageInput/index.js @@ -1,5 +1,8 @@ import logger from '../../../../utils/logger'; import constant from '../../../../utils/constant'; +import { API } from '../../../../../utils/network/api'; + +const api = new API() let app = getApp() // eslint-disable-next-line no-undef Component({ @@ -44,6 +47,15 @@ Component({ baseInfo: { type: Object, value: {} + }, + message_rounds:{ + type: Number, + value: 0, + observer(newVal) { + this.setData({ + message_rounds: newVal, + }); + }, } }, @@ -76,11 +88,15 @@ Component({ isFirstSendTyping: true, time: 0, focus: false, + my_focus: false, isEmoji: false, fileList: [], hasCallKit: false, showChangYongYu: false, - ChangYongYu: [] + ChangYongYu: [], + dialog_visible: false, + dialog_message: "在线开处方需先进行多点执业认证", + message_rounds: 0 }, lifetimes: { @@ -240,6 +256,7 @@ Component({ // 选自定义消息 handleExtensions() { + console.warn("wx.aegis: ", wx.aegis); wx.aegis.reportEvent({ name: 'chooseExtensions', @@ -346,7 +363,7 @@ Component({ inquiry_type: this.data.inquiry_type, message_type: 0, is_system: 0, - message_rounds: message_rounds, + message_rounds: this.data.message_rounds, patient_family_data: patient_family_data }); @@ -395,7 +412,8 @@ Component({ }, handleCommonFunctions(e) { - switch (e.target.dataset.function.key) { + console.log("handleCommonFunctions: ", e) + switch (e.target.dataset.key) { case '0': this.setData({ displayCommonWords: true, @@ -418,19 +436,24 @@ Component({ let _this = this; console.log("开始订阅消息"); wx.requestSubscribeMessage({ - tmplIds: ['5Tl-xmaWXrKP5BB8E6b3oTdPHbHa7WYWbmvZiuz4TLs'], + tmplIds: ['kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40'], success (res) { console.log(res); - let usertype = wx.getStorageSync('usertype'); - let userID = wx.getStorageSync('user_id_'+usertype); - let multi_point_status = wx.getStorageSync(userID+'_multi_point_status'); - if(multi_point_status == 1){ - app.go("/Pages/yishi/onlinechufang/index?order_inquiry_id="+_this.data.order_inquiry_id) - }else{ - _this.setData({ - dialog_visible: true - }) - } + let order_inquiry_id = _this.data.order_inquiry_id + api.getDoctorPrescriptionCheck({order_inquiry_id: order_inquiry_id}).then(response => { + let status = response.data.status + if(status == 1){ + app.go("/Pages/yishi/onlinechufang/index?order_inquiry_id="+order_inquiry_id) + }else{ + _this.setData({ + dialog_visible: true, + dialog_message: response.data.message + }) + } + }).catch(errors => { + console.error(errors); + }) + } }) break; @@ -444,7 +467,7 @@ Component({ }) }, confirmDialog(){ - app.go("/Pages/yishi/zhiye_identity/index") + // app.go("/Pages/yishi/zhiye_identity/index") this.setData({ dialog_visible: false }) @@ -632,7 +655,7 @@ Component({ inquiry_type: this.data.inquiry_type, message_type: 0, is_system: 0, - message_rounds: message_rounds, + message_rounds: this.data.message_rounds, patient_family_data: patient_family_data }); @@ -666,7 +689,7 @@ Component({ sendMessageBtn: false, }); } - event.detail.value && this.sendTypingStatusMessage(); + // event.detail.value && this.sendTypingStatusMessage(); }, // 发送正在输入状态消息 @@ -730,7 +753,7 @@ Component({ this.setData({ focus: true, }); - this.getMessageList(this.data.conversation); + // this.getMessageList(this.data.conversation); this.triggerEvent('pullKeysBoards', { event, }); @@ -844,8 +867,7 @@ Component({ ext3: wx.$chat_SDKAppID, }); } - }) - .catch((error) => { + }).catch((error) => { logger.log(`| TUI-chat | message-input | sendMessageError: ${error.code} `); wx.aegis.reportEvent({ name: 'sendMessage', @@ -866,6 +888,7 @@ Component({ handleClose() { this.setData({ displayFlag: '', + my_focus: false }); }, diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.wxml b/TUIKit/components/TUIChat/components/MessageInput/index.wxml index d6685d7..3511119 100644 --- a/TUIKit/components/TUIChat/components/MessageInput/index.wxml +++ b/TUIKit/components/TUIChat/components/MessageInput/index.wxml @@ -1,14 +1,15 @@ - {{item.name}} + 查看完整病例 + 在线开处方 -