From 589c2cf823b1e0216e840db9fec2a4864120e8a1 Mon Sep 17 00:00:00 2001 From: haomingming Date: Fri, 17 Mar 2023 10:13:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pages/login/index.js | 2 + Pages/login/index.wxss | 4 +- Pages/mobile_login/index.js | 3 + Pages/mobile_login/index.json | 3 +- Pages/mobile_login/index.wxml | 2 +- Pages/webpage/index.js | 18 + Pages/webpage/index.json | 3 + Pages/webpage/index.wxml | 2 + Pages/webpage/index.wxss | 1 + .../yaoshi/authentication/authentication.wxml | 20 +- Pages/yaoshi/info/info.wxml | 18 +- Pages/yaoshi/my/my.wxml | 2 +- Pages/yaoshi/prescription/prescription.wxml | 2 +- Pages/yishi/attestation/index.wxml | 4 +- Pages/yishi/bankcard/index.js | 2 +- Pages/yishi/bankcard/index.json | 2 +- Pages/yishi/bankcard/index.wxml | 8 +- Pages/yishi/bindcard/index.js | 6 +- Pages/yishi/bindcard/index.wxml | 8 +- Pages/yishi/case/index.wxml | 8 +- Pages/yishi/cash/index.js | 21 +- Pages/yishi/cash/index.json | 3 +- Pages/yishi/cash/index.wxml | 14 +- Pages/yishi/cashrecord/index.json | 2 +- Pages/yishi/cashrecord/index.wxml | 4 +- Pages/yishi/chat/index.js | 7 +- Pages/yishi/chat/index.wxml | 2 +- Pages/yishi/identity/index.js | 82 ++-- Pages/yishi/identity/index.wxml | 21 +- Pages/yishi/identity/index.wxss | 10 +- Pages/yishi/index/index.js | 401 +++++++++++------- Pages/yishi/index/index.json | 2 - Pages/yishi/index/index.wxml | 45 +- Pages/yishi/index/index.wxss | 19 +- Pages/yishi/kuaisusetup/index.js | 2 +- Pages/yishi/kuaisusetup/index.wxml | 2 +- Pages/yishi/manual/index.wxml | 2 +- Pages/yishi/my/index.js | 3 +- Pages/yishi/my/index.wxml | 10 +- Pages/yishi/myaccount/index.json | 2 +- Pages/yishi/myaccount/index.wxml | 4 +- Pages/yishi/mycard/index.js | 21 +- Pages/yishi/mycard/index.json | 2 +- Pages/yishi/mycard/index.wxml | 6 +- Pages/yishi/myinfo/index.js | 2 +- Pages/yishi/myinfo/index.wxml | 8 +- Pages/yishi/myprofile/index.wxss | 3 + Pages/yishi/onlinesetup/index.js | 2 +- Pages/yishi/onlinesetup/index.wxml | 2 +- Pages/yishi/quickreply/index.wxml | 4 +- Pages/yishi/quickreply_data/index.wxml | 6 +- Pages/yishi/service_notice/index.json | 2 +- Pages/yishi/service_notice/index.wxml | 8 +- Pages/yishi/signcanvas/index.js | 11 +- Pages/yishi/system_notice/index.json | 2 +- Pages/yishi/system_notice/index.wxml | 10 +- Pages/yishi/wenzhen/wenzhen.json | 2 +- Pages/yishi/wenzhen/wenzhen.wxml | 7 +- Pages/yishi/wenzhen_v2/wenzhen.js | 63 +-- Pages/yishi/wenzhen_v2/wenzhen.json | 4 +- Pages/yishi/wenzhen_v2/wenzhen.wxml | 74 ++-- Pages/yishi/yizhensetup/index.js | 6 +- Pages/yishi/yizhensetup/index.wxml | 4 +- Pages/yishi/zhiye_identity/index.js | 50 ++- Pages/yishi/zhiye_identity/index.wxml | 71 ++-- .../TUIChat/components/MessageInput/index.js | 8 +- .../TUIChat/components/MessageList/index.js | 15 +- TUIKit/components/TUIChat/index.js | 4 + TUIKit/components/TUIChat/index.wxml | 4 +- app.js | 100 +++-- app.json | 3 +- commpents/mynavbar/index.wxss | 4 +- commpents/myprofile/index.js | 24 +- commpents/myprofile/index.json | 3 +- commpents/myprofile/index.wxml | 15 +- commpents/myprofile/index.wxss | 8 + commpents/wenzhen_data/index.js | 10 +- commpents/wenzhen_data/index.wxml | 2 +- custom-tab-bar/index.js | 58 ++- utils/network/api.js | 12 +- utils/util.js | 2 +- 81 files changed, 894 insertions(+), 524 deletions(-) create mode 100644 Pages/webpage/index.js create mode 100644 Pages/webpage/index.json create mode 100644 Pages/webpage/index.wxml create mode 100644 Pages/webpage/index.wxss diff --git a/Pages/login/index.js b/Pages/login/index.js index 97f11c1..1bd4d75 100644 --- a/Pages/login/index.js +++ b/Pages/login/index.js @@ -42,6 +42,8 @@ Page({ wx.setStorageSync('AUTH_TOKEN', response.data.token); wx.setStorageSync('user_id', response.data.user_id); wx.setStorageSync('client_user_id', response.data.client_user_id); + app.globalData.config.userID = response.data.user_id; + app.imInit(); //跳转页面 wx.switchTab({ url: next_url diff --git a/Pages/login/index.wxss b/Pages/login/index.wxss index 01c5e71..c1bbc34 100644 --- a/Pages/login/index.wxss +++ b/Pages/login/index.wxss @@ -7,7 +7,7 @@ top: 0; width: 750rpx; height: 170rpx; - background-color: #bae46b; + background-color: #69d85f; z-index: 99; } .tui-navigatorbar-back{ @@ -23,7 +23,7 @@ height: 88rpx; line-height: 56rpx; font-size: 36rpx; - color: #e68080; + color: #000000; bottom: 0; left: 200rpx; display: flex; diff --git a/Pages/mobile_login/index.js b/Pages/mobile_login/index.js index 8f9d448..c35cb02 100644 --- a/Pages/mobile_login/index.js +++ b/Pages/mobile_login/index.js @@ -1,5 +1,6 @@ import { API } from './../../utils/network/api' const api = new API() +const app = getApp() Page({ data: { navbarData: { @@ -64,6 +65,8 @@ Page({ wx.setStorageSync('AUTH_TOKEN', response.data.token); wx.setStorageSync('user_id', response.data.user_id); wx.setStorageSync('client_user_id', response.data.client_user_id); + app.globalData.config.userID = response.data.user_id; + app.imInit(); wx.switchTab({ url: wx.getStorageSync('next_url') }) diff --git a/Pages/mobile_login/index.json b/Pages/mobile_login/index.json index 57d5f40..aeeb6c8 100644 --- a/Pages/mobile_login/index.json +++ b/Pages/mobile_login/index.json @@ -5,6 +5,7 @@ "van-field": "@vant/weapp/field/index", "van-button": "@vant/weapp/button/index", "van-checkbox": "@vant/weapp/checkbox/index", - "van-checkbox-group": "@vant/weapp/checkbox-group/index" + "van-checkbox-group": "@vant/weapp/checkbox-group/index", + "van-image": "@vant/weapp/image/index" } } \ No newline at end of file diff --git a/Pages/mobile_login/index.wxml b/Pages/mobile_login/index.wxml index 7e1d9d8..3dfcddc 100644 --- a/Pages/mobile_login/index.wxml +++ b/Pages/mobile_login/index.wxml @@ -1,6 +1,6 @@ + diff --git a/Pages/webpage/index.wxss b/Pages/webpage/index.wxss new file mode 100644 index 0000000..12b229e --- /dev/null +++ b/Pages/webpage/index.wxss @@ -0,0 +1 @@ +/* Pages/webpage/index.wxss */ \ No newline at end of file diff --git a/Pages/yaoshi/authentication/authentication.wxml b/Pages/yaoshi/authentication/authentication.wxml index 10e9244..2c4f3db 100644 --- a/Pages/yaoshi/authentication/authentication.wxml +++ b/Pages/yaoshi/authentication/authentication.wxml @@ -1,16 +1,16 @@ - - - - - - - - - - + + + + + + + + + + 下一步 diff --git a/Pages/yaoshi/info/info.wxml b/Pages/yaoshi/info/info.wxml index ab98404..01a1be7 100644 --- a/Pages/yaoshi/info/info.wxml +++ b/Pages/yaoshi/info/info.wxml @@ -1,19 +1,19 @@ - + 李四 - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/Pages/yaoshi/my/my.wxml b/Pages/yaoshi/my/my.wxml index de38384..97df817 100644 --- a/Pages/yaoshi/my/my.wxml +++ b/Pages/yaoshi/my/my.wxml @@ -1,7 +1,7 @@ - + 李四 diff --git a/Pages/yaoshi/prescription/prescription.wxml b/Pages/yaoshi/prescription/prescription.wxml index b1af226..7a75c57 100644 --- a/Pages/yaoshi/prescription/prescription.wxml +++ b/Pages/yaoshi/prescription/prescription.wxml @@ -23,7 +23,7 @@ - + 取消 确认驳回 diff --git a/Pages/yishi/attestation/index.wxml b/Pages/yishi/attestation/index.wxml index 80c7612..5b7f341 100644 --- a/Pages/yishi/attestation/index.wxml +++ b/Pages/yishi/attestation/index.wxml @@ -1,6 +1,6 @@ - - + + \ No newline at end of file diff --git a/Pages/yishi/bankcard/index.js b/Pages/yishi/bankcard/index.js index bc1aca1..85b2f81 100644 --- a/Pages/yishi/bankcard/index.js +++ b/Pages/yishi/bankcard/index.js @@ -17,7 +17,7 @@ Page({ onShow(){ api.getDoctorBank().then(response => { - if(response.data.total > 0){ + if(response.data.bank_card_id){ this.setData({ banklist_empty: false, bank_card_code_mask: response.data.bank_card_code_mask, diff --git a/Pages/yishi/bankcard/index.json b/Pages/yishi/bankcard/index.json index 02f0ecb..e4c1b31 100644 --- a/Pages/yishi/bankcard/index.json +++ b/Pages/yishi/bankcard/index.json @@ -2,7 +2,7 @@ "component": true, "usingComponents": { "te-nav-bar": "/commpents/te_navbar", - "t-image": "tdesign-miniprogram/image/image", + "van-image": "@vant/weapp/image/index", "t-icon": "tdesign-miniprogram/icon/icon", "van-button": "@vant/weapp/button/index" } diff --git a/Pages/yishi/bankcard/index.wxml b/Pages/yishi/bankcard/index.wxml index 8931661..d554abe 100644 --- a/Pages/yishi/bankcard/index.wxml +++ b/Pages/yishi/bankcard/index.wxml @@ -11,24 +11,24 @@ - + 添加结算银行卡 提示:每人只能绑定一张银行卡,银行卡绑定成功后每月只能修改结算银行卡一次,请谨慎绑定。 - + {{bank_name}} {{bank_card_code_mask}} diff --git a/Pages/yishi/bindcard/index.js b/Pages/yishi/bindcard/index.js index 20aa6b1..21828c2 100644 --- a/Pages/yishi/bindcard/index.js +++ b/Pages/yishi/bindcard/index.js @@ -32,8 +32,8 @@ Page({ onLoad(options){ console.log("options: ", options); let bank_card_id = options.bank_card_id; - console.log("options bank_card_id: ", bank_card_id); - if(bank_card_id){ + if(bank_card_id && bank_card_id != "undefined"){ + console.log("options bank_card_id: ", bank_card_id); this.setData({ bank_card_id: bank_card_id }) @@ -218,6 +218,7 @@ Page({ title: '更换成功', icon: "success" }) + wx.navigateBack(); }).catch(errors => {console.error(errors); }) }else{ //绑定医生银行卡 @@ -227,6 +228,7 @@ Page({ title: '绑定成功', icon: "success" }) + wx.navigateBack(); }).catch(errors => {console.error(errors); }) } } diff --git a/Pages/yishi/bindcard/index.wxml b/Pages/yishi/bindcard/index.wxml index c2c3859..a513bca 100644 --- a/Pages/yishi/bindcard/index.wxml +++ b/Pages/yishi/bindcard/index.wxml @@ -6,15 +6,15 @@ - - + + - - + + 体重:{{case_detail.weight}}KG 民族:{{case_detail.nation_name}} 职业:{{case_detail.job_name}} - 婚姻:{{case_detail.nation_name}} + 婚姻:{{case_detail.marital_status==0?'未婚':case_detail.marital_status==1?'已婚':case_detail.marital_status==2?'离异':'未知'}} @@ -32,10 +32,10 @@ 正在服用的药品信息: - {{case_detail.disease_class_name}} + {{case_detail.drugs_name==''?'无':''}} - - 详细描述:阿托伐他汀钙片8片 (用法用量:常用的起始剂量为10mg每日一次 + + 详细描述:{{case_detail.drugs_name}} 病情描述: diff --git a/Pages/yishi/cash/index.js b/Pages/yishi/cash/index.js index 467c097..7b0b7a4 100644 --- a/Pages/yishi/cash/index.js +++ b/Pages/yishi/cash/index.js @@ -15,7 +15,8 @@ Page({ bank_name : "招商银行", bank_card_code_mask: "2233 9988 9989 9900", withdrawal_amount: "987", - income_tax: "12" + income_tax: "12", + contactKeFu: false }, onLoad(options){ //获取提现数据 @@ -34,5 +35,21 @@ Page({ }).catch(errors => { console.error(errors); }) - } + }, + contactKeFu(e){ + let _this = this; + + console.log("concatKeFu"); + wx.requestSubscribeMessage({ + tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'], + success (res) { + console.log(res); + _this.setData({ + contactKeFu: true + }) + + } + }) + + }, }) \ No newline at end of file diff --git a/Pages/yishi/cash/index.json b/Pages/yishi/cash/index.json index 7095cf3..c3b0e34 100644 --- a/Pages/yishi/cash/index.json +++ b/Pages/yishi/cash/index.json @@ -4,6 +4,7 @@ "te-nav-bar": "/commpents/te_navbar", "t-image": "tdesign-miniprogram/image/image", "van-icon": "@vant/weapp/icon/index", - "van-button": "@vant/weapp/button/index" + "van-button": "@vant/weapp/button/index", + "van-dialog": "@vant/weapp/dialog/index" } } \ No newline at end of file diff --git a/Pages/yishi/cash/index.wxml b/Pages/yishi/cash/index.wxml index 5e79139..e626c74 100644 --- a/Pages/yishi/cash/index.wxml +++ b/Pages/yishi/cash/index.wxml @@ -41,18 +41,26 @@ - + 提取 - + 联系客服 + + diff --git a/Pages/yishi/cashrecord/index.json b/Pages/yishi/cashrecord/index.json index acbbb5d..69e4702 100644 --- a/Pages/yishi/cashrecord/index.json +++ b/Pages/yishi/cashrecord/index.json @@ -4,7 +4,7 @@ "te-nav-bar": "/commpents/te_navbar", "van-icon": "@vant/weapp/icon/index", "van-empty": "@vant/weapp/empty/index", - "t-image": "tdesign-miniprogram/image/image", + "van-image": "@vant/weapp/image/index", "t-picker": "tdesign-miniprogram/picker/picker", "t-picker-item": "tdesign-miniprogram/picker-item/picker-item" } diff --git a/Pages/yishi/cashrecord/index.wxml b/Pages/yishi/cashrecord/index.wxml index 71c87ec..6995638 100644 --- a/Pages/yishi/cashrecord/index.wxml +++ b/Pages/yishi/cashrecord/index.wxml @@ -11,7 +11,7 @@ - + {{item.account_name}}(尾号{{item.bank_card_code_four}}) @@ -31,7 +31,7 @@ - + 张三三(尾号9900) diff --git a/Pages/yishi/chat/index.js b/Pages/yishi/chat/index.js index c278fca..cc8a0df 100644 --- a/Pages/yishi/chat/index.js +++ b/Pages/yishi/chat/index.js @@ -4,15 +4,18 @@ Page({ patient_account: "10000", title: '患者姓名', height: app.globalData.height, - order_inquiry_id: "" + order_inquiry_id: "", + inquiry_type: "", }, onLoad(option) { - console.log("chat onload"); + console.log("chat onload", option); let from_account = option.from_account; let order_inquiry_id = option.order_inquiry_id; + let inquiry_type = option.inquiry_type; this.setData({ patient_account: from_account, order_inquiry_id: order_inquiry_id, + inquiry_type: inquiry_type, }) }, onUnload() { diff --git a/Pages/yishi/chat/index.wxml b/Pages/yishi/chat/index.wxml index a441fac..36e8586 100644 --- a/Pages/yishi/chat/index.wxml +++ b/Pages/yishi/chat/index.wxml @@ -1,5 +1,5 @@ - diff --git a/Pages/yishi/identity/index.js b/Pages/yishi/identity/index.js index 751b8c4..59639ab 100644 --- a/Pages/yishi/identity/index.js +++ b/Pages/yishi/identity/index.js @@ -10,26 +10,57 @@ Page({ showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示 title: '医师身份认证', //导航栏 中间的标题 }, + navHeight: 0, + stateHeight: 0, height: app.globalData.height, //选项卡 stickyProps: { - zIndex: 2, + zIndex: 999999, + offsetTop: (app.globalData.height * 2) }, - + selected_tab: 0, + panel_2_disabled: true, + next_btn_disabled: false, + next_btn_txt: "下一步", + realname: "", + idcard: "" + }, + getMenuButtonBound() { + let stateHeight = 0; // 接收状态栏高度 + const navHeight = wx.getMenuButtonBoundingClientRect().height; // 获取胶囊高度 + let top = 0; + wx.getSystemInfo({ + success(res) { + stateHeight = res.statusBarHeight; + }, + }); + top = wx.getMenuButtonBoundingClientRect().top - stateHeight; // 获取top值 + console.log('navHeight', navHeight); + console.log('top', top); + this.setData({ + // navHeight: navHeight + top * 2, // 导航栏高度 + navHeight, // 导航栏高度 + stateHeight: stateHeight + top, // 状态栏高度 + }); + this.setData({ + "stickyProps.offsetTop": this.data.stateHeight + this.data.navHeight + 10 + }) }, onLoad(){ let _this = this; //获取实名认证信息 api.getDoctorAuthReal().then(response => { console.log(response); - if(response.data){ - this.setData({ - realname:response.data.card_name, - idcard:response.data.card_num, - next_btn_txt: "已认证,不可修改", - next_btn_disabled: true, - }); + if(response.data.length == 0){ + return; } + this.setData({ + realname:response.data.card_name, + idcard:response.data.card_num, + next_btn_txt: "已认证,不可修改", + next_btn_disabled: true, + panel_2_disabled: false, + }); }).catch(errors => { console.error(errors); }) @@ -229,7 +260,7 @@ Page({ }, onShow(){ console.log("onshow()...."); - + this.getMenuButtonBound(); }, doUploadFile(event) { console.log("index douploadFIle: ", event); @@ -308,6 +339,7 @@ Page({ //新增实名认证信息 postDoctorAuthReal(){ + let _this = this; const realname = this.data.realname.trim(); const idcard = this.data.idcard.trim(); @@ -335,25 +367,27 @@ Page({ return false; } - wx.requestSubscribeMessage({ - tmplIds: ['kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40'], - success (res) { - console.log(res) - var params = { - card_name: realname, - card_num: idcard, - } - api.postDoctorAuthReal(params).then(response => { - console.log(response); - }).catch(errors => { - console.error(errors); - }) - } + var params = { + card_name: realname, + card_num: idcard, + } + api.postDoctorAuthReal(params).then(response => { + console.log(response); + _this.setData({ + panel_2_disabled: false, + selected_tab: 1 + }) + }).catch(errors => { + console.error(errors); }) }, onTabsChange(event) { console.log(`Change tab, tab-panel value is ${event.detail.value}.`); + this.setData({ + selected_tab: event.detail.value + }) + }, onTabsClick(event) { console.log(`Click tab, tab-panel value is ${event.detail.value}.`); diff --git a/Pages/yishi/identity/index.wxml b/Pages/yishi/identity/index.wxml index f1597b7..0bbe9c7 100644 --- a/Pages/yishi/identity/index.wxml +++ b/Pages/yishi/identity/index.wxml @@ -1,10 +1,11 @@ - + - + @@ -57,10 +57,15 @@ - - - + + + + + + + + diff --git a/Pages/yishi/identity/index.wxss b/Pages/yishi/identity/index.wxss index 1a9fd97..2031194 100644 --- a/Pages/yishi/identity/index.wxss +++ b/Pages/yishi/identity/index.wxss @@ -85,7 +85,7 @@ } .bottom_next{ width: 95vw; - margin: 530rpx auto; + margin: 530rpx auto 0 auto; } .sub_button{ width: 95vw; @@ -167,4 +167,12 @@ .zhuanchang_btn--confirm { color: #3cc7c0; +} +.van-picker__columns { + height: 264px !important; + top: 40px !important; +} +.van-search { + top: -270px !important; + position: relative !important; } \ No newline at end of file diff --git a/Pages/yishi/index/index.js b/Pages/yishi/index/index.js index 4874348..23eb0d3 100644 --- a/Pages/yishi/index/index.js +++ b/Pages/yishi/index/index.js @@ -25,8 +25,6 @@ Page({ shiming_status_url: "", iden_auth_status_url: "/Pages/yishi/identity/index", multi_point_status_url: "/Pages/yishi/zhiye_identity/index", - current: 0, - autoplay: true, duration: 500, interval: 5000, swiperList: [ @@ -34,6 +32,8 @@ Page({ `https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/ad2.jpg`, `https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/ad3.jpg`, ], + banner: [], + default_dialog_show: false,//只弹框一次 dialog_visible: false, dialog_content: "请您先实名认证", /* @@ -114,7 +114,15 @@ Page({ onLoad(){ }, - + onUnload(){ + console.log("index onUnload() onUnload() "); + }, + onHide(){ + console.log("index onHide() onHide() "); + this.setData({ + swiperList: [] + }) + }, onShow: function () { if (typeof this.getTabBar === 'function' && this.getTabBar()) { this.getTabBar().setData({ @@ -182,7 +190,8 @@ Page({ if(reject_prescription_number){ this.setData({"info.reject_prescription_number": reject_prescription_number}); } - + //格式化广告轮播 + this.formatAD(response.data.banner); this.checkStatus(); this.setData({ @@ -192,12 +201,232 @@ Page({ console.error(errors); }) }, - - onADChange(){ - // console.log("onADChange"); + formatAD(banner){ + let swiperList = []; + banner.forEach(item => { + swiperList.push(item.banner_path); + }) + this.setData({ + banner: banner, + swiperList: swiperList + }) + }, + onTapAD(e) { + const { index } = e.detail; + console.log(index); + let item = this.data.banner[index]; + console.log(item); + let open_with = item.open_with; + let banner_link = item.banner_link; + if(open_with == 1){//小程序页面 + app.go(banner_link); + }else if(open_with == 2){//webview 页面 + app.go("/Pages/webpage/index?src="+banner_link); + } + }, + onChangeAD(e) { + // const { current, source } = e.detail; + // console.log(current, source); }, - go(e){ + let checkDialog = this.checkDialog(e); + if(checkDialog){ + let url = e.currentTarget.dataset.url; + console.log(url); + if(url.indexOf("wenzhen") > -1){ + wx.switchTab({ + url: url, + }) + } + app.go(e.currentTarget.dataset.url) + } + }, + confirmDialog(){ + this.setData({ + dialog_visible: false + }) + app.go(this.data.shiming_status_url); + }, + cancelDialog(){ + this.setData({ + dialog_visible: false + }) + }, + checkStatus(){ + //实名认证 + let idcard_status = this.data.info.idcard_status; + //医师身份认证 + let iden_auth_status = this.data.info.iden_auth_status; + //多点执业认证 + let multi_point_status = this.data.info.multi_point_status; + + wx.setStorageSync('idcard_status', idcard_status); + wx.setStorageSync('iden_auth_status', iden_auth_status); + + if(idcard_status == 0){ + if(!this.data.default_dialog_show){ + this.setData({ + dialog_content: "请您先实名认证", + dialog_visible: true, + shiming_status_url: "/Pages/yishi/identity/index", + default_dialog_show: true + }); + } + return false; + } + + if(idcard_status == 2){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "认证失败", + "info.info_shiming_status": "info_shiming_status_yes", + shiming_status_url: "/Pages/yishi/identity/index", + dialog_content: "实名认证失败", + dialog_visible: true, + default_dialog_show: true + }); + } + return false;; + } + + if(iden_auth_status == 0){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "前往医师身份认证", + "info.info_shiming_status": "info_shiming_status_yes", + shiming_status_url: "/Pages/yishi/identity/index", + dialog_content: "请您前往医师身份认证", + dialog_visible: true, + default_dialog_show: true + }); + } + return false; + } + if(iden_auth_status == 2){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "审核中", + "info.info_shiming_status": "info_shiming_status_yes", + shiming_status_url: "/Pages/yishi/identity/index", + dialog_content: "您的医师身份认证正在审核中", + dialog_visible: true, + default_dialog_show: true + }); + } + return false; + } + if(iden_auth_status == 3){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "认证失败", + "info.info_shiming_status": "info_shiming_status_yes", + dialog_content: "您的医师身份认证失败", + dialog_visible: true, + default_dialog_show: true + }); + } + return false; + } + + //多点执业认证 + if(multi_point_status == 0){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "前往多点执业认证", + "info.info_shiming_status": "info_shiming_status_yes", + shiming_status_url: "/Pages/yishi/zhiye_identity/index", + dialog_content: "请您先进行多点执业认证", + dialog_visible: true, + default_dialog_show: true + }); + } + return false; + } + if(multi_point_status == 2){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "审核中", + "info.info_shiming_status": "info_shiming_status_yes", + shiming_status_url: "/Pages/yishi/zhiye_identity/index", + dialog_content: "您的多点执业认证正在审核中", + dialog_visible: true, + default_dialog_show: true + }); + } + return false; + } + if(multi_point_status == 3){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "认证失败", + "info.info_shiming_status": "info_shiming_status_yes", + shiming_status_url: "/Pages/yishi/zhiye_identity/index", + dialog_content: "您的多点执业认证失败", + dialog_visible: true, + default_dialog_show: true + }); + } + return false; + } + + + //绑定结算银行卡 + var is_bind_bank = this.data.info.is_bind_bank; + if(is_bind_bank == 0){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "绑定结算银行卡", + "info.info_shiming_status": "info_shiming_status_yes", + shiming_status_url: "/Pages/yishi/bankcard/index", + dialog_content: "请您先绑定结算银行卡", + dialog_visible: true, + default_dialog_show: true + }); + } + return false; + } + //开启在线问诊 + var is_img_expert_reception = this.data.info.is_img_expert_reception; + if(is_img_expert_reception == 0 ){ + if(!this.data.default_dialog_show){ + this.setData({ + "info.info_shiming_status_txt": "开启在线问诊", + "info.info_shiming_status": "info_shiming_status_yes", + shiming_status_url: "/Pages/yishi/onlinesetup/index", + dialog_content: "请您先前往在线问诊管理中开通在线问诊", + dialog_visible: true, + default_dialog_show: true + }); + } + return false; + } + this.setData({ + "info.info_shiming_status_txt": "去接诊", + shiming_status_url: "/Pages/yishi/wenzhen_v2/wenzhen", + }); + this.setData({"info.info_shiming_status": "info_shiming_status_yes"}); + return true; + }, + contactKeFu(e){ + let _this = this; + + let checkDialog = this.checkDialog(e); + if(checkDialog){ + console.log("concatKeFu"); + wx.requestSubscribeMessage({ + tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'], + success (res) { + console.log(res); + _this.setData({ + contactKeFu: true + }) + + } + }) + + } + }, + checkDialog(e){ //实名认证 let idcard_status = this.data.info.idcard_status; //医师身份认证 @@ -248,164 +477,10 @@ Page({ dialog_content: now_case.case_text, dialog_visible: true }); - return; + return false; } } - let url = e.currentTarget.dataset.url; - console.log(url); - if(url.indexOf("wenzhen") > -1){ - wx.switchTab({ - url: url, - }) - } - app.go(e.currentTarget.dataset.url) - }, - confirmDialog(){ - this.setData({ - dialog_visible: false - }) - }, - cancelDialog(){ - this.setData({ - dialog_visible: false - }) - }, - checkStatus(){ - //实名认证 - let idcard_status = this.data.info.idcard_status; - //医师身份认证 - let iden_auth_status = this.data.info.iden_auth_status; - //多点执业认证 - let multi_point_status = this.data.info.multi_point_status; - - if(idcard_status == 0){ - this.setData({ - dialog_content: "请您先实名认证", - dialog_visible: true - }); - return false; - } - - if(idcard_status == 2){ - this.setData({ - "info.info_shiming_status_txt": "认证失败", - "info.info_shiming_status": "info_shiming_status_yes", - shiming_status_url: "/Pages/yishi/identity/index", - dialog_content: "实名认证失败", - dialog_visible: true - }); - this.setData({ - }); - return false;; - } - - if(iden_auth_status == 0){ - this.setData({ - "info.info_shiming_status_txt": "前往医师身份认证", - "info.info_shiming_status": "info_shiming_status_yes", - shiming_status_url: "/Pages/yishi/identity/index", - dialog_content: "请您前往医师身份认证", - dialog_visible: true - }); - return false; - } - if(iden_auth_status == 2){ - this.setData({ - "info.info_shiming_status_txt": "审核中", - "info.info_shiming_status": "info_shiming_status_yes", - shiming_status_url: "/Pages/yishi/identity/index", - dialog_content: "您的医师身份认证正在审核中", - dialog_visible: true - }); - return false; - } - if(iden_auth_status == 3){ - this.setData({ - "info.info_shiming_status_txt": "认证失败", - "info.info_shiming_status": "info_shiming_status_yes", - dialog_content: "您的医师身份认证失败", - dialog_visible: true - }); - return false; - } - - //多点执业认证 - if(multi_point_status == 0){ - this.setData({ - "info.info_shiming_status_txt": "前往多点执业认证", - "info.info_shiming_status": "info_shiming_status_yes", - shiming_status_url: "/Pages/yishi/zhiye_identity/index", - dialog_content: "请您先进行多点执业认证", - dialog_visible: true - }); - return false; - } - if(multi_point_status == 2){ - this.setData({ - "info.info_shiming_status_txt": "审核中", - "info.info_shiming_status": "info_shiming_status_yes", - shiming_status_url: "/Pages/yishi/zhiye_identity/index", - dialog_content: "您的多点执业认证正在审核中", - dialog_visible: true - }); - return false; - } - if(multi_point_status == 3){ - this.setData({ - "info.info_shiming_status_txt": "认证失败", - "info.info_shiming_status": "info_shiming_status_yes", - shiming_status_url: "/Pages/yishi/zhiye_identity/index", - dialog_content: "您的多点执业认证失败", - dialog_visible: true - }); - return false; - } - - - //绑定结算银行卡 - var is_bind_bank = this.data.info.is_bind_bank; - if(is_bind_bank == 0){ - this.setData({ - "info.info_shiming_status_txt": "绑定结算银行卡", - "info.info_shiming_status": "info_shiming_status_yes", - shiming_status_url: "/Pages/yishi/bankcard/index", - dialog_content: "请您先绑定结算银行卡", - dialog_visible: true - }); - return false; - } - //开启在线问诊 - var is_img_expert_reception = this.data.info.is_img_expert_reception; - if(is_img_expert_reception == 0){ - this.setData({ - "info.info_shiming_status_txt": "开启在线问诊", - "info.info_shiming_status": "info_shiming_status_yes", - shiming_status_url: "/Pages/yishi/onlinesetup/index", - dialog_content: "请您先前往在线问诊管理中开通在线问诊", - dialog_visible: true - }); - return false; - } - this.setData({ - "info.info_shiming_status_txt": "去接诊", - shiming_status_url: "/Pages/yishi/wenzhen_v2/wenzhen", - }); - this.setData({"info.info_shiming_status": "info_shiming_status_yes"}); return true; - }, - contactKeFu(){ - let _this = this; - console.log("concatKeFu"); - wx.requestSubscribeMessage({ - tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'], - success (res) { - console.log(res); - _this.setData({ - contactKeFu: true - }) - - } - }) } }) \ No newline at end of file diff --git a/Pages/yishi/index/index.json b/Pages/yishi/index/index.json index 4f6315d..2408ea5 100644 --- a/Pages/yishi/index/index.json +++ b/Pages/yishi/index/index.json @@ -2,11 +2,9 @@ "component": true, "usingComponents": { "t-avatar": "tdesign-miniprogram/avatar/avatar", - "van-image": "@vant/weapp/image/index", "van-button": "@vant/weapp/button/index", "van-dialog": "@vant/weapp/dialog/index", "t-swiper": "tdesign-miniprogram/swiper/swiper", - "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav", "t-badge": "tdesign-miniprogram/badge/badge", "t-dialog": "tdesign-miniprogram/dialog/dialog" } diff --git a/Pages/yishi/index/index.wxml b/Pages/yishi/index/index.wxml index a74188e..fcfcd55 100644 --- a/Pages/yishi/index/index.wxml +++ b/Pages/yishi/index/index.wxml @@ -9,22 +9,21 @@ - - - - - - - - {{info.user_name}} - - 新问诊:{{info.not_accepted_inquiry_num}} - 接诊中:{{info.accepting_inquiry_num}} + + + + + + + {{info.user_name}} + + + {{info.info_shiming_status_txt}} - - - {{info.info_shiming_status_txt}} + + 新问诊:{{info.not_accepted_inquiry_num}} + 接诊中:{{info.accepting_inquiry_num}} @@ -41,11 +40,11 @@ - + 医师身份认证 - {{ iden_auth_status_txt }}> @@ -58,11 +57,11 @@ - + 多点执业认证 - {{ multi_point_status_txt }}> @@ -79,16 +78,15 @@ - + @@ -152,7 +150,6 @@ 确定 - {{ note }} - + diff --git a/Pages/yishi/manual/index.wxml b/Pages/yishi/manual/index.wxml index a325693..54875a3 100644 --- a/Pages/yishi/manual/index.wxml +++ b/Pages/yishi/manual/index.wxml @@ -2,6 +2,6 @@ - + diff --git a/Pages/yishi/my/index.js b/Pages/yishi/my/index.js index b14c5ef..c683bad 100644 --- a/Pages/yishi/my/index.js +++ b/Pages/yishi/my/index.js @@ -10,7 +10,7 @@ Page({ iden_auth_status: "", idcard_status: "", multi_point_status: "", - avatar: "", + avatar: "https://img.applets.igandanyiyuan.com/applet/doctor/static/images/default_photo.png", balance_account: "", estimate_income: "", doctor_id: "" @@ -46,6 +46,7 @@ Page({ this.getMenuButtonBound(); }, onLoad(){ + console.log("my onLoad"); //获取个人中心数据 api.getDoctorCenter().then(response => { this.setData({ diff --git a/Pages/yishi/my/index.wxml b/Pages/yishi/my/index.wxml index 1b373d3..dc34f43 100644 --- a/Pages/yishi/my/index.wxml +++ b/Pages/yishi/my/index.wxml @@ -48,10 +48,10 @@ - - - - - + + + + + \ No newline at end of file diff --git a/Pages/yishi/myaccount/index.json b/Pages/yishi/myaccount/index.json index dba4393..1ae5130 100644 --- a/Pages/yishi/myaccount/index.json +++ b/Pages/yishi/myaccount/index.json @@ -2,7 +2,7 @@ "component": true, "usingComponents": { "te-nav-bar": "/commpents/te_navbar", - "t-image": "tdesign-miniprogram/image/image", + "van-image": "@vant/weapp/image/index", "t-picker": "tdesign-miniprogram/picker/picker", "t-picker-item": "tdesign-miniprogram/picker-item/picker-item", "van-icon": "@vant/weapp/icon/index", diff --git a/Pages/yishi/myaccount/index.wxml b/Pages/yishi/myaccount/index.wxml index 065be45..002d371 100644 --- a/Pages/yishi/myaccount/index.wxml +++ b/Pages/yishi/myaccount/index.wxml @@ -19,11 +19,11 @@ 账单 - + - + { console.log(response); @@ -167,6 +167,10 @@ Page({ "template.views[8].text" : response.data.department_custom_name, "template.views[9].text" : response.data.hospital_name, }) + }).then(res => { + this.setData({ + painter_ready: true + }) }).catch(errors => {console.error(errors);}) }, onImgOK(e){ @@ -231,10 +235,15 @@ Page({ visible: e.detail.visible, }); }, - showVisible(){ this.setData({ visible: !this.data.visible, }); - } + }, + // onShareAppMessage(e) { + // return { + // title: '自定义转发标题', + // path: '/Pages/yishi/mycard/index', + // } + // } }) \ No newline at end of file diff --git a/Pages/yishi/mycard/index.json b/Pages/yishi/mycard/index.json index 8782e70..203cb1b 100644 --- a/Pages/yishi/mycard/index.json +++ b/Pages/yishi/mycard/index.json @@ -4,7 +4,7 @@ "te-nav-bar": "/commpents/te_navbar", "painter":"/commpents/painter/painter", "t-avatar": "tdesign-miniprogram/avatar/avatar", - "t-image": "tdesign-miniprogram/image/image", + "van-image": "@vant/weapp/image/index", "t-icon": "tdesign-miniprogram/icon/icon", "van-cell": "@vant/weapp/cell/index", "van-cell-group": "@vant/weapp/cell-group/index", diff --git a/Pages/yishi/mycard/index.wxml b/Pages/yishi/mycard/index.wxml index 5c75851..2567aaf 100644 --- a/Pages/yishi/mycard/index.wxml +++ b/Pages/yishi/mycard/index.wxml @@ -14,13 +14,13 @@ - + 微信长按或扫描二维码查看我的更多信息 - + 分享我的名片到 @@ -56,4 +56,4 @@ /> - \ No newline at end of file + \ No newline at end of file diff --git a/Pages/yishi/myinfo/index.js b/Pages/yishi/myinfo/index.js index 438aabc..ec564ba 100644 --- a/Pages/yishi/myinfo/index.js +++ b/Pages/yishi/myinfo/index.js @@ -22,7 +22,7 @@ Page({ console.log(response); this.setData({ doctor_id: response.data.doctor_id, - brief_introduction:response.data.brief_introduction, + brief_introduction: response.data.brief_introduction==null?this.data.brief_introduction:response.data.brief_introduction, idcard_status:response.data.idcard_status, iden_auth_status:response.data.iden_auth_status, card_name:response.data.card_name, diff --git a/Pages/yishi/myinfo/index.wxml b/Pages/yishi/myinfo/index.wxml index 4e7d9a7..7831e02 100644 --- a/Pages/yishi/myinfo/index.wxml +++ b/Pages/yishi/myinfo/index.wxml @@ -1,11 +1,11 @@ - - - + + - diff --git a/Pages/yishi/myprofile/index.wxss b/Pages/yishi/myprofile/index.wxss index 093c13b..68b5268 100644 --- a/Pages/yishi/myprofile/index.wxss +++ b/Pages/yishi/myprofile/index.wxss @@ -44,3 +44,6 @@ justify-content: center; align-items: center; } +.van-cell--required::before { + left: 4.7rem !important; +} \ No newline at end of file diff --git a/Pages/yishi/onlinesetup/index.js b/Pages/yishi/onlinesetup/index.js index a9bcbc5..57a7680 100644 --- a/Pages/yishi/onlinesetup/index.js +++ b/Pages/yishi/onlinesetup/index.js @@ -79,7 +79,7 @@ Page({ console.log(response); Toast.success("修改成功"); wx.switchTab({ - url: "/Pages/yishi/wenzhen/wenzhen" + url: "/Pages/yishi/wenzhen_v2/wenzhen" }) }).catch(errors => {console.error(errors);}) }, diff --git a/Pages/yishi/onlinesetup/index.wxml b/Pages/yishi/onlinesetup/index.wxml index 86b7b3d..a13375b 100644 --- a/Pages/yishi/onlinesetup/index.wxml +++ b/Pages/yishi/onlinesetup/index.wxml @@ -16,7 +16,7 @@ {{ note }} - + diff --git a/Pages/yishi/quickreply/index.wxml b/Pages/yishi/quickreply/index.wxml index 7f39966..5ad237e 100644 --- a/Pages/yishi/quickreply/index.wxml +++ b/Pages/yishi/quickreply/index.wxml @@ -12,7 +12,7 @@ > - + 添加常用语 @@ -23,7 +23,7 @@ - + 添加常用语 diff --git a/Pages/yishi/quickreply_data/index.wxml b/Pages/yishi/quickreply_data/index.wxml index 902aed2..07d3fac 100644 --- a/Pages/yishi/quickreply_data/index.wxml +++ b/Pages/yishi/quickreply_data/index.wxml @@ -1,9 +1,9 @@ - - - + + + 快速问诊 - + 2023-1-02 12:22 @@ -17,7 +17,7 @@ 在线问诊 - + 2023-1-02 12:22 @@ -28,7 +28,7 @@ 义诊 - + 2023-1-02 12:22 @@ -39,7 +39,7 @@ 问诊购药 - + 2023-1-02 12:22 diff --git a/Pages/yishi/signcanvas/index.js b/Pages/yishi/signcanvas/index.js index 0fa1b90..2f7f8dc 100644 --- a/Pages/yishi/signcanvas/index.js +++ b/Pages/yishi/signcanvas/index.js @@ -33,23 +33,30 @@ Page({ canvas: canvas }); + console.log("onReady onReady start") + console.log(ctx) + console.log(canvas) + console.log("onReady onReady end") }) }, ontouchmove(e){ + console.log("ontouchmove ontouchmove ontouchmove"); + console.log(e); this.data.ctx.lineWidth = 5; this.data.ctx.lineCap="round"; this.data.ctx.lineJoin ="round"; - this.data.ctx.lineTo(e.changedTouches[0].pageX,e.changedTouches[0].pageY); + this.data.ctx.lineTo(e.touches[0].x,e.touches[0].y); this.data.ctx.stroke(); }, ontouchstart(e){ + console.log("ontouchstart ontouchstart ontouchstart") this.setData({ txt_show: false }); console.log(this.data.ctx); this.data.ctx.beginPath(); - this.data.ctx.moveTo(e.changedTouches[0].pageX,e.changedTouches[0].pageY); + this.data.ctx.moveTo(e.touches[0].x,e.touches[0].y); }, toClear() { diff --git a/Pages/yishi/system_notice/index.json b/Pages/yishi/system_notice/index.json index ee34b87..f84f19a 100644 --- a/Pages/yishi/system_notice/index.json +++ b/Pages/yishi/system_notice/index.json @@ -2,6 +2,6 @@ "component": true, "usingComponents": { "te-nav-bar": "/commpents/te_navbar", - "t-image": "tdesign-miniprogram/image/image" + "van-image": "@vant/weapp/image/index" } } \ No newline at end of file diff --git a/Pages/yishi/system_notice/index.wxml b/Pages/yishi/system_notice/index.wxml index eabc117..e3723fc 100644 --- a/Pages/yishi/system_notice/index.wxml +++ b/Pages/yishi/system_notice/index.wxml @@ -5,19 +5,19 @@ - + 9月份的服务费结算通知 - + - + 8月份的服务费结算通知 @@ -26,7 +26,7 @@ - + 7月份的服务费结算通知 @@ -35,7 +35,7 @@ - + 6月份的服务费结算通知 diff --git a/Pages/yishi/wenzhen/wenzhen.json b/Pages/yishi/wenzhen/wenzhen.json index b988581..f31787c 100644 --- a/Pages/yishi/wenzhen/wenzhen.json +++ b/Pages/yishi/wenzhen/wenzhen.json @@ -3,7 +3,7 @@ "usingComponents": { "te-nav-bar": "/commpents/te_navbar", "wenzhen-data": "/commpents/wenzhen_data/index", - "t-image": "tdesign-miniprogram/image/image", + "van-image": "@vant/weapp/image/index", "t-tabs": "tdesign-miniprogram/tabs/tabs", "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", "t-badge": "tdesign-miniprogram/badge/badge", diff --git a/Pages/yishi/wenzhen/wenzhen.wxml b/Pages/yishi/wenzhen/wenzhen.wxml index c2f0b92..dfaa341 100644 --- a/Pages/yishi/wenzhen/wenzhen.wxml +++ b/Pages/yishi/wenzhen/wenzhen.wxml @@ -4,21 +4,20 @@ - + - 服务通知 - + 系统公告 - + 您还未设置在线问诊价格 开通图文问诊 diff --git a/Pages/yishi/wenzhen_v2/wenzhen.js b/Pages/yishi/wenzhen_v2/wenzhen.js index 128b573..cb702ac 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.js +++ b/Pages/yishi/wenzhen_v2/wenzhen.js @@ -17,11 +17,21 @@ Page({ data_list_4: [], data_list_5: [], conversationList: [], - message_inquiry_type: 2, + message_inquiry_type: 1, + system_notice_unreadnnum: "", + service_notice_unreadnnum: "" }, onLoad() { console.log("wenzhen onload"); - + let userID = wx.getStorageSync('user_id'); + 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, + }) + }, 500); }, onShow: function () { console.log("onShow from wenzhen V2") @@ -45,22 +55,10 @@ Page({ }); }, go(e){ - wx.navigateTo({ - url: e.currentTarget.dataset.url, - events: { - // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 - acceptDataFromOpenedPage: function(data) { - console.log(data) - }, - someEvent: function(data) { - console.log(data) - } - }, - success: function(res) { - // 通过 eventChannel 向被打开页面传送数据 - res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' }) - } - }) + 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]; @@ -157,10 +155,8 @@ Page({ }, formatStatus(){ - - let order_inquiry_id_list = []; - + order_inquiry_id_list.push("a");//初始化一个,防止失败 this.data.conversationList.forEach(item => { let conversationID = item.conversationID; if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过 @@ -168,11 +164,16 @@ Page({ if(!lastMessage) return; let cloudCustomData = lastMessage.cloudCustomData; if(!cloudCustomData) return; - let cloudCustomDataJson = JSON.parse(cloudCustomData); + 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 => { @@ -185,14 +186,24 @@ Page({ if(!lastMessage) return; let cloudCustomData = lastMessage.cloudCustomData; if(!cloudCustomData) return; - let cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData); + 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; - item.inquiry_status = order.inquiry_status; + 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; @@ -234,6 +245,7 @@ Page({ let order_inquiry_id = cloudCustomDataJson.order_inquiry_id; if(!order_inquiry_id) return; let inquiry_type = cloudCustomDataJson.inquiry_type; + if(!inquiry_type) return; let session_item = {}; session_item.inquiry_status = item.inquiry_status;//订单状态暂无 let txt = {}; @@ -242,6 +254,7 @@ Page({ 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 = item.patient_age;//暂无 session_item.patient_name = userProfile.nick; session_item.from_account = userProfile.userID; diff --git a/Pages/yishi/wenzhen_v2/wenzhen.json b/Pages/yishi/wenzhen_v2/wenzhen.json index b988581..f8632d5 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.json +++ b/Pages/yishi/wenzhen_v2/wenzhen.json @@ -3,11 +3,11 @@ "usingComponents": { "te-nav-bar": "/commpents/te_navbar", "wenzhen-data": "/commpents/wenzhen_data/index", - "t-image": "tdesign-miniprogram/image/image", "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-empty": "@vant/weapp/empty/index", + "van-image": "@vant/weapp/image/index" } } \ No newline at end of file diff --git a/Pages/yishi/wenzhen_v2/wenzhen.wxml b/Pages/yishi/wenzhen_v2/wenzhen.wxml index 38f81c4..c84bc76 100644 --- a/Pages/yishi/wenzhen_v2/wenzhen.wxml +++ b/Pages/yishi/wenzhen_v2/wenzhen.wxml @@ -2,23 +2,26 @@ - - - + + + - 服务通知 - - - + + + + + + + 系统公告 - + 您还未设置在线问诊价格 开通图文问诊 @@ -34,25 +37,7 @@ custom-style="font-size: 32rpx" > - - - - + - + - + - 提交 + {{btn_txt}} diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.js b/TUIKit/components/TUIChat/components/MessageInput/index.js index 6c50b87..b39dd2b 100644 --- a/TUIKit/components/TUIChat/components/MessageInput/index.js +++ b/TUIKit/components/TUIChat/components/MessageInput/index.js @@ -20,6 +20,10 @@ Component({ type: String, value: {}, }, + inquiry_type: { + type: String, + value: {}, + }, hasCallKit: { type: Boolean, value: false, @@ -493,8 +497,8 @@ Component({ text, }, cloudCustomData: JSON.stringify({ - order_inquiry_id: "AA", - inquiry_type: "BB", + order_inquiry_id: this.data.order_inquiry_id, + inquiry_type: this.data.inquiry_type, message_type: 0, is_system: 0 }), diff --git a/TUIKit/components/TUIChat/components/MessageList/index.js b/TUIKit/components/TUIChat/components/MessageList/index.js index 11834d0..ece384b 100644 --- a/TUIKit/components/TUIChat/components/MessageList/index.js +++ b/TUIKit/components/TUIChat/components/MessageList/index.js @@ -147,8 +147,19 @@ Component({ nextReqMessageID: this.data.nextReqMessageID, count: 15, }).then((res) => { - this.showMoreHistoryMessageTime(res.data.messageList); - const { messageList } = res.data; // 消息列表。 + let HMM_data = res.data;//HMM + let HMM_messageList_del = []; + console.log("HMM getMessageList: ", HMM_data); + let HMM_messageList = HMM_data.messageList; + HMM_messageList.forEach(item => { + let HMM_type = item.type; + if(HMM_type == "TIMCustomElem") return; + HMM_messageList_del.push(item); + }) + HMM_data.messageList = HMM_messageList_del; + + this.showMoreHistoryMessageTime(HMM_messageList_del); + const { messageList } = HMM_data; // 消息列表。 this.data.nextReqMessageID = res.data.nextReqMessageID; // 用于续拉,分页续拉时需传入该字段。 this.data.isCompleted = res.data.isCompleted; // 表示是否已经拉完所有消息。 this.data.messageList = [...messageList, ...this.data.messageList]; diff --git a/TUIKit/components/TUIChat/index.js b/TUIKit/components/TUIChat/index.js index aedd762..9bb6b4f 100644 --- a/TUIKit/components/TUIChat/index.js +++ b/TUIKit/components/TUIChat/index.js @@ -35,6 +35,10 @@ Component({ type: String, value: '' }, + inquiry_type: { + type: String, + value: '' + }, unreadCount: { type: Number, value: '', diff --git a/TUIKit/components/TUIChat/index.wxml b/TUIKit/components/TUIChat/index.wxml index f28a852..19aa985 100644 --- a/TUIKit/components/TUIChat/index.wxml +++ b/TUIKit/components/TUIChat/index.wxml @@ -4,7 +4,7 @@ {{conversationName}} - +