diff --git a/Pages/agreement_page/index.js b/Pages/agreement_page/index.js
new file mode 100644
index 0000000..aa5596d
--- /dev/null
+++ b/Pages/agreement_page/index.js
@@ -0,0 +1,18 @@
+// Pages/webpage/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ src: ""
+ },
+
+ onLoad(options) {
+ console.log(options.agreement_id)
+ this.setData({
+ src: "https://img.applets.igandanyiyuan.com/basic/file/agreement.htm?id="+options.agreement_id
+ })
+ },
+
+})
\ No newline at end of file
diff --git a/Pages/agreement_page/index.json b/Pages/agreement_page/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/Pages/agreement_page/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/Pages/agreement_page/index.wxml b/Pages/agreement_page/index.wxml
new file mode 100644
index 0000000..22a9b46
--- /dev/null
+++ b/Pages/agreement_page/index.wxml
@@ -0,0 +1,2 @@
+
+
diff --git a/Pages/agreement_page/index.wxss b/Pages/agreement_page/index.wxss
new file mode 100644
index 0000000..12b229e
--- /dev/null
+++ b/Pages/agreement_page/index.wxss
@@ -0,0 +1 @@
+/* Pages/webpage/index.wxss */
\ No newline at end of file
diff --git a/Pages/login/index.wxml b/Pages/login/index.wxml
index 5f9724f..c577cf5 100644
--- a/Pages/login/index.wxml
+++ b/Pages/login/index.wxml
@@ -26,7 +26,7 @@
我已阅读并同意协议
- 《肝胆相照用户服务协议》
+ 《肝胆相照用户服务协议》
diff --git a/Pages/yishi/cash/index.js b/Pages/yishi/cash/index.js
index b3e9c2a..1b33f6c 100644
--- a/Pages/yishi/cash/index.js
+++ b/Pages/yishi/cash/index.js
@@ -1,4 +1,5 @@
import { API } from './../../../utils/network/api'
+import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
const api = new API()
const app = getApp()
@@ -17,8 +18,10 @@ Page({
withdrawal_amount: "xxxx",
income_tax: "xx",
contactKeFu: false,
+ sub_visible: false,
skeleton_loading: true,
- order_inquiry_ids: []
+ order_inquiry_ids: [],
+ sub_btn_disabled: false
},
onLoad(option){
let order_inquiry_ids = option.order_inquiry_ids;
@@ -33,29 +36,50 @@ Page({
this.postDoctorWithdrawalInfo(params);
},
onShow(){
-
+ this.setData({
+ sub_btn_disabled: false
+ })
},
go(e){
let url = e.currentTarget.dataset.url;
app.go(url);
},
contactKeFu(e){
- let _this = this;
-
console.log("concatKeFu");
- wx.requestSubscribeMessage({
- tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'],
- success (res) {
- console.log(res);
- _this.setData({
- contactKeFu: true
+ let tmplIds = ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc']
+ let sub_promise = requestSubscribeMessage(tmplIds)
+ sub_promise.then(res => {
+ console.log("订阅成功")
+ this.setData({
+ contactKeFu: true
+ })
+ }).catch(err => {
+ console.log(err)
+ let errCode = err.errCode
+ if(errCode == 20004){
+ this.setData({
+ sub_visible: true,
})
-
}
})
-
+ },
+ subcancelDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ },
+ subconfirmDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ wx.openSetting({
+ success (res) {
+ console.log(res.authSetting)
+ }
+ })
},
postDoctorWithdrawalInfo(params){
+
//获取提现数据
api.postDoctorWithdrawalInfo(params).then(response => {
console.log(response);
@@ -74,9 +98,13 @@ Page({
}
}).catch(errors => {
console.error(errors);
+
})
},
postDoctorWithdrawal(){
+ this.setData({
+ sub_btn_disabled: true
+ })
let params = {};
params.order_inquiry_id = this.data.order_inquiry_ids.join(",");
params.withdrawal_amount_total = this.data.withdrawal_amount;
@@ -94,6 +122,9 @@ Page({
})
}).catch(errors => {
console.error(errors);
+ this.setData({
+ sub_btn_disabled: false
+ })
})
}
})
\ No newline at end of file
diff --git a/Pages/yishi/cash/index.json b/Pages/yishi/cash/index.json
index ae3c221..de018e6 100644
--- a/Pages/yishi/cash/index.json
+++ b/Pages/yishi/cash/index.json
@@ -6,6 +6,7 @@
"van-icon": "@vant/weapp/icon/index",
"van-button": "@vant/weapp/button/index",
"van-dialog": "@vant/weapp/dialog/index",
- "t-skeleton": "tdesign-miniprogram/skeleton/skeleton"
+ "t-skeleton": "tdesign-miniprogram/skeleton/skeleton",
+ "t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/cash/index.wxml b/Pages/yishi/cash/index.wxml
index 35d59b6..315ab96 100644
--- a/Pages/yishi/cash/index.wxml
+++ b/Pages/yishi/cash/index.wxml
@@ -3,7 +3,7 @@
结算银行卡
- 提现规则
+ 提现规则
@@ -58,7 +58,7 @@
-->
- 提取
+ 提取
联系客服
@@ -71,4 +71,18 @@
confirm-button-color="#3CC7C0"
confirm-button-open-type="contact"
/>
+
+
+
+ 取消
+
+
+ 确定
+
+
+
diff --git a/Pages/yishi/cash/index.wxss b/Pages/yishi/cash/index.wxss
index 8f6696b..fb7a38c 100644
--- a/Pages/yishi/cash/index.wxss
+++ b/Pages/yishi/cash/index.wxss
@@ -139,5 +139,18 @@ page{
color: #3CC7C0;
margin: 30rpx;
}
-
+.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/index/index.js b/Pages/yishi/index/index.js
index fdf9afa..feffe85 100644
--- a/Pages/yishi/index/index.js
+++ b/Pages/yishi/index/index.js
@@ -1,6 +1,8 @@
// Pages/yishi/index/index.js
import { API } from './../../../utils/network/api'
-import { rpxTopx } from './../../../utils/util'
+import { pxTorpx } from './../../../utils/util'
+import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
+
const api = new API()
const app = getApp()
Page({
@@ -92,6 +94,7 @@ Page({
},
],
contactKeFu: false,
+ sub_visible: false,
jiesuan_dialog_show: false,
jiesuan_dialog_visible: false,
funbox_height: 100,
@@ -125,7 +128,7 @@ Page({
const { statusBarHeight } = wx.getSystemInfoSync();
// console.log("statusBarHeight: ", rpxTopx(statusBarHeight));
let funbox_height = wx.getSystemInfoSync().windowHeight - (this.data.stateHeight + this.data.navHeight + 10) - 55;//减去底部空白
- funbox_height = rpxTopx(funbox_height);
+ funbox_height = pxTorpx(funbox_height);
// 147 userinfo的高度
// 80 info_note
// 155 认证部分的高度
@@ -424,6 +427,8 @@ Page({
});
}
this.setData({
+ "info.info_shiming_status_txt": "未认证",
+ "info.info_shiming_status": "info_shiming_status_no",
dialog_content: "请您先完成实名认证",
shiming_status_url: "/Pages/yishi/identity/index",
dialog_url: "/Pages/yishi/identity/index",
@@ -637,20 +642,41 @@ Page({
let checkDialog = this.checkDialog(e);
if(checkDialog){
- // console.log("concatKeFu");
- wx.requestSubscribeMessage({
- tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'],
- success (res) {
- // console.log(res);
- _this.setData({
- contactKeFu: true
+
+ let tmplIds = ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc']
+ let sub_promise = requestSubscribeMessage(tmplIds)
+ sub_promise.then(res => {
+ console.log("订阅成功")
+ this.setData({
+ contactKeFu: true
+ })
+ }).catch(err => {
+ console.log(err)
+ let errCode = err.errCode
+ if(errCode == 20004){
+ this.setData({
+ sub_visible: true,
})
-
}
})
-
}
},
+ subcancelDialog(){
+ this.setData({
+ sub_visible: false,
+ contactKeFu: true
+ })
+ },
+ subconfirmDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ wx.openSetting({
+ success (res) {
+ console.log(res.authSetting)
+ }
+ })
+ },
checkDialog(e){
//实名认证
let idcard_status = this.data.info.idcard_status;
diff --git a/Pages/yishi/index/index.wxml b/Pages/yishi/index/index.wxml
index 2bda114..60e6f93 100644
--- a/Pages/yishi/index/index.wxml
+++ b/Pages/yishi/index/index.wxml
@@ -233,6 +233,19 @@
我知道了
+
+
+ 取消
+
+
+ 确定
+
+
+
diff --git a/Pages/yishi/index/index.wxss b/Pages/yishi/index/index.wxss
index 441b6e1..5fe6670 100644
--- a/Pages/yishi/index/index.wxss
+++ b/Pages/yishi/index/index.wxss
@@ -167,6 +167,7 @@ page{
margin: 0 auto;
background-color: #fff;
padding: 20rpx 20rpx 0 20rpx;
+ box-shadow: 0px 2px 10px 0px rgba(0,0,0,0.1);
}
.swiper{
height:168rpx;
diff --git a/Pages/yishi/kuaisusetup/index.js b/Pages/yishi/kuaisusetup/index.js
index 62f295c..787faa7 100644
--- a/Pages/yishi/kuaisusetup/index.js
+++ b/Pages/yishi/kuaisusetup/index.js
@@ -1,5 +1,6 @@
import { API } from './../../../utils/network/api'
-import Toast from '@vant/weapp/toast/toast';
+import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
+
let api = new API()
const app = getApp()
Page({
@@ -32,7 +33,8 @@ Page({
"5",
"10"
]
- }
+ },
+ sub_visible: false,
},
onLoad(){
@@ -78,16 +80,41 @@ Page({
console.log(response);
}).then(()=>{
if(detail){
- wx.requestSubscribeMessage({
- tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
- success (res) {
- console.log(res);//同意授权
+
+ let tmplIds = ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc']
+ let sub_promise = requestSubscribeMessage(tmplIds)
+ sub_promise.then(res => {
+ console.log("订阅成功")
+
+ }).catch(err => {
+ console.log(err)
+ let errCode = err.errCode
+ if(errCode == 20004){
+ this.setData({
+ sub_visible: true,
+ })
}
})
+
}
}).catch(errors => {console.error(errors);})
},
+ subcancelDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ },
+ subconfirmDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ wx.openSetting({
+ success (res) {
+ console.log(res.authSetting)
+ }
+ })
+ },
putDoctorInquiryConfig(){
wx.switchTab({
url: "/Pages/yishi/wenzhen_v2/wenzhen"
diff --git a/Pages/yishi/kuaisusetup/index.json b/Pages/yishi/kuaisusetup/index.json
index 71178ef..cc9281e 100644
--- a/Pages/yishi/kuaisusetup/index.json
+++ b/Pages/yishi/kuaisusetup/index.json
@@ -7,6 +7,7 @@
"van-stepper": "@vant/weapp/stepper/index",
"van-switch": "@vant/weapp/switch/index",
"van-button": "@vant/weapp/button/index",
- "van-toast": "@vant/weapp/toast/index"
+ "van-toast": "@vant/weapp/toast/index",
+ "t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/kuaisusetup/index.wxml b/Pages/yishi/kuaisusetup/index.wxml
index 1563a9f..960c705 100644
--- a/Pages/yishi/kuaisusetup/index.wxml
+++ b/Pages/yishi/kuaisusetup/index.wxml
@@ -46,4 +46,17 @@
+
+
+
+ 取消
+
+
+ 确定
+
+
\ No newline at end of file
diff --git a/Pages/yishi/kuaisusetup/index.wxss b/Pages/yishi/kuaisusetup/index.wxss
index d556c43..83437f4 100644
--- a/Pages/yishi/kuaisusetup/index.wxss
+++ b/Pages/yishi/kuaisusetup/index.wxss
@@ -123,4 +123,18 @@ page{
.price{
text-align: center;
flex: 1;
+}
+.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;
}
\ No newline at end of file
diff --git a/Pages/yishi/myaccount/index.wxml b/Pages/yishi/myaccount/index.wxml
index 541a1e6..43ffae7 100644
--- a/Pages/yishi/myaccount/index.wxml
+++ b/Pages/yishi/myaccount/index.wxml
@@ -23,7 +23,7 @@
-
+
{
+ this.setData({
+ save_durg_prescription_product_num: ""
+ })
+ });
+ return
+ }
let save_durg = {};
save_durg.product_name = this.data.product_name;
save_durg.product_id = this.data.save_durg_product_id;
save_durg.prescription_product_num = this.data.save_durg_prescription_product_num;
+
save_durg.single_unit = this.data.save_durg_single_unit;
save_durg.single_use = this.data.save_durg_single_use;
save_durg.packaging_unit = this.data.save_durg_packaging_unit;
@@ -394,6 +409,37 @@ Page({
})
})
},
+ get_save_durg_prescription_product_num(e){
+ console.log("get_save_durg_prescription_product_num")
+ let save_durg_prescription_product_num = e.detail
+ console.log(typeof save_durg_prescription_product_num)
+ save_durg_prescription_product_num = Number.parseInt(save_durg_prescription_product_num)
+ console.log(save_durg_prescription_product_num)
+ if(isNaN(save_durg_prescription_product_num)){
+ Dialog.alert({
+ message: '请输入正确数字',
+ }).then(() => {
+ this.setData({
+ save_durg_prescription_product_num: ""
+ })
+ });
+ return
+ }
+
+ if(save_durg_prescription_product_num > 5){
+ Dialog.alert({
+ message: '每个药品数量不允许添加超过5个',
+ }).then(() => {
+ this.setData({
+ save_durg_prescription_product_num: ""
+ })
+ });
+ return
+ }
+ this.setData({
+ save_durg_prescription_product_num: save_durg_prescription_product_num
+ })
+ },
putDoctorPrescription(){//修改处方
let sub_disabled = this.data.sub_disabled;
if(sub_disabled) return
diff --git a/Pages/yishi/onlinechufang/index.json b/Pages/yishi/onlinechufang/index.json
index 705f3c9..03447a9 100644
--- a/Pages/yishi/onlinechufang/index.json
+++ b/Pages/yishi/onlinechufang/index.json
@@ -11,6 +11,7 @@
"van-search": "@vant/weapp/search/index",
"van-image": "@vant/weapp/image/index",
"van-toast": "@vant/weapp/toast/index",
- "van-icon": "@vant/weapp/icon/index"
+ "van-icon": "@vant/weapp/icon/index",
+ "van-dialog": "@vant/weapp/dialog/index"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/onlinechufang/index.wxml b/Pages/yishi/onlinechufang/index.wxml
index 0a9c015..1d809fe 100644
--- a/Pages/yishi/onlinechufang/index.wxml
+++ b/Pages/yishi/onlinechufang/index.wxml
@@ -187,7 +187,8 @@
-
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/Pages/yishi/onlinesetup/index.js b/Pages/yishi/onlinesetup/index.js
index df3f035..d8a1200 100644
--- a/Pages/yishi/onlinesetup/index.js
+++ b/Pages/yishi/onlinesetup/index.js
@@ -1,5 +1,7 @@
import { API } from './../../../utils/network/api'
import Toast from 'tdesign-miniprogram/toast/index';
+import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
+
let api = new API()
const app = getApp()
Page({
@@ -32,7 +34,8 @@ Page({
"5",
"10"
]
- }
+ },
+ sub_visible: false,
},
onLoad(){
@@ -72,16 +75,41 @@ Page({
console.log(response);
}).then(()=>{
if(detail){
- wx.requestSubscribeMessage({
- tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
- success (res) {
- console.log(res);//同意授权
+
+ let tmplIds = ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc']
+ let sub_promise = requestSubscribeMessage(tmplIds)
+ sub_promise.then(res => {
+ console.log("订阅成功")
+
+ }).catch(err => {
+ console.log(err)
+ let errCode = err.errCode
+ if(errCode == 20004){
+ this.setData({
+ sub_visible: true,
+ })
}
})
+
}
}).catch(errors => {console.error(errors);})
},
+ subcancelDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ },
+ subconfirmDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ wx.openSetting({
+ success (res) {
+ console.log(res.authSetting)
+ }
+ })
+ },
putDoctorInquiryConfig(){
//修改医生问诊配置
// let params = {};
diff --git a/Pages/yishi/onlinesetup/index.json b/Pages/yishi/onlinesetup/index.json
index fb84336..932d65d 100644
--- a/Pages/yishi/onlinesetup/index.json
+++ b/Pages/yishi/onlinesetup/index.json
@@ -7,6 +7,7 @@
"van-stepper": "@vant/weapp/stepper/index",
"van-switch": "@vant/weapp/switch/index",
"van-button": "@vant/weapp/button/index",
- "t-toast": "tdesign-miniprogram/toast/toast"
+ "t-toast": "tdesign-miniprogram/toast/toast",
+ "t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/onlinesetup/index.wxml b/Pages/yishi/onlinesetup/index.wxml
index 617493d..5d257f7 100644
--- a/Pages/yishi/onlinesetup/index.wxml
+++ b/Pages/yishi/onlinesetup/index.wxml
@@ -51,4 +51,17 @@
+
+
+
+ 取消
+
+
+ 确定
+
+
\ No newline at end of file
diff --git a/Pages/yishi/onlinesetup/index.wxss b/Pages/yishi/onlinesetup/index.wxss
index 17d1bd2..bb62421 100644
--- a/Pages/yishi/onlinesetup/index.wxss
+++ b/Pages/yishi/onlinesetup/index.wxss
@@ -137,4 +137,18 @@ page{
}
.cell_value{
color: #000;
+}
+.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;
}
\ No newline at end of file
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.js b/Pages/yishi/wenzhen_v2/wenzhen.js
index 55e19b1..b3cb159 100644
--- a/Pages/yishi/wenzhen_v2/wenzhen.js
+++ b/Pages/yishi/wenzhen_v2/wenzhen.js
@@ -118,6 +118,8 @@ Page({
if(wx.$TUIKit){
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
+ wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady);
+ wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady, this);
}else{
app.imInit().then(res => {
// console.log("wenzhen onload imInit");
@@ -152,6 +154,7 @@ Page({
dot_4: false,
})
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived);
+ wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady);
},
onUnload(){
// console.log("onUnload from wenzhen")
@@ -161,6 +164,9 @@ Page({
now_message_inquiry_type: 5,
})
},
+ onSDKReady(){
+ console.log("onSDKReady from wenzhen")
+ },
getConversationList(){
// console.log("getConversationListgetConversationListgetConversationList");
app.imInit().then(res => {
@@ -294,6 +300,9 @@ Page({
if(!cloudCustomData) return;
let cloudCustomDataJson;
try {
+ if(!cloudCustomData){
+ return
+ }
cloudCustomDataJson = JSON.parse(cloudCustomData);
} catch (error) {
// console.log(error);
@@ -316,6 +325,9 @@ Page({
if(!cloudCustomData) return;
let cloudCustomDataJson;
try {
+ if(!item.lastMessage.cloudCustomData){
+ return
+ }
cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData);
} catch (error) {
return;
@@ -394,7 +406,7 @@ Page({
if(lastMessage.messageForShow == "[自定义消息]"){
let text = "自定义消息";
let payload = lastMessage.payload;
- if(payload) {
+ if(payload && payload.data) {
// console.log("payload: ",payload.data);
let payloadJson = JSON.parse(payload.data);
text = payloadJson.title.replaceAll(/—/g, "");
diff --git a/Pages/yishi/wenzhen_v2/wenzhen.json b/Pages/yishi/wenzhen_v2/wenzhen.json
index e566533..f52e3e5 100644
--- a/Pages/yishi/wenzhen_v2/wenzhen.json
+++ b/Pages/yishi/wenzhen_v2/wenzhen.json
@@ -13,7 +13,8 @@
"van-tabs": "@vant/weapp/tabs/index",
"t-dialog": "tdesign-miniprogram/dialog/dialog",
"van-divider": "@vant/weapp/divider/index",
- "van-loading": "@vant/weapp/loading/index"
+ "van-loading": "@vant/weapp/loading/index",
+ "van-dialog": "@vant/weapp/dialog/index"
},
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
diff --git a/Pages/yishi/wenzhen_v3/wenzhen.js b/Pages/yishi/wenzhen_v3/wenzhen.js
index 90abf7e..f66f287 100644
--- a/Pages/yishi/wenzhen_v3/wenzhen.js
+++ b/Pages/yishi/wenzhen_v3/wenzhen.js
@@ -469,18 +469,18 @@ 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({
diff --git a/Pages/yishi/yizhensetup/index.js b/Pages/yishi/yizhensetup/index.js
index 6102dfe..900c5dd 100644
--- a/Pages/yishi/yizhensetup/index.js
+++ b/Pages/yishi/yizhensetup/index.js
@@ -1,5 +1,6 @@
import { API } from './../../../utils/network/api'
import Toast from '@vant/weapp/toast/toast';
+import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
let api = new API()
const app = getApp()
Page({
@@ -35,7 +36,8 @@ Page({
"5",
"10"
]
- }
+ },
+ sub_visible: false,
},
onLoad(){
@@ -96,10 +98,19 @@ Page({
console.log(response);
}).then(()=>{
if(detail){
- wx.requestSubscribeMessage({
- tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
- success (res) {
- console.log(res);//同意授权
+
+ let tmplIds = ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc']
+ let sub_promise = requestSubscribeMessage(tmplIds)
+ sub_promise.then(res => {
+ console.log("订阅成功")
+
+ }).catch(err => {
+ console.log(err)
+ let errCode = err.errCode
+ if(errCode == 20004){
+ this.setData({
+ sub_visible: true,
+ })
}
})
}
@@ -112,7 +123,21 @@ Page({
this.setData({ "info.is_open": detail });
}).catch(errors => {console.error(errors);})
},
-
+ subcancelDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ },
+ subconfirmDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ wx.openSetting({
+ success (res) {
+ console.log(res.authSetting)
+ }
+ })
+ },
putDoctorInquiryConfig(){
//修改医生问诊配置
let params = {};
diff --git a/Pages/yishi/yizhensetup/index.json b/Pages/yishi/yizhensetup/index.json
index 24c14a6..8291c87 100644
--- a/Pages/yishi/yizhensetup/index.json
+++ b/Pages/yishi/yizhensetup/index.json
@@ -9,6 +9,7 @@
"van-stepper": "@vant/weapp/stepper/index",
"van-switch": "@vant/weapp/switch/index",
"van-button": "@vant/weapp/button/index",
- "van-toast": "@vant/weapp/toast/index"
+ "van-toast": "@vant/weapp/toast/index",
+ "t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/yizhensetup/index.wxml b/Pages/yishi/yizhensetup/index.wxml
index 2767d8f..00a86fd 100644
--- a/Pages/yishi/yizhensetup/index.wxml
+++ b/Pages/yishi/yizhensetup/index.wxml
@@ -73,4 +73,17 @@
+
+
+
+ 取消
+
+
+ 确定
+
+
\ No newline at end of file
diff --git a/Pages/yishi/yizhensetup/index.wxss b/Pages/yishi/yizhensetup/index.wxss
index 592ac88..8bfbb3a 100644
--- a/Pages/yishi/yizhensetup/index.wxss
+++ b/Pages/yishi/yizhensetup/index.wxss
@@ -121,4 +121,18 @@ page{
}
.price{
color: red;
+}
+.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;
}
\ No newline at end of file
diff --git a/Pages/yishi/yizhensetupprice/index.js b/Pages/yishi/yizhensetupprice/index.js
index 411201f..d928480 100644
--- a/Pages/yishi/yizhensetupprice/index.js
+++ b/Pages/yishi/yizhensetupprice/index.js
@@ -1,5 +1,6 @@
import { API } from './../../../utils/network/api'
import Toast from '@vant/weapp/toast/toast';
+import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
let api = new API()
const app = getApp()
Page({
@@ -35,7 +36,8 @@ Page({
"5",
"10"
]
- }
+ },
+ sub_visible: false,
},
onShow(){
@@ -98,16 +100,39 @@ Page({
console.log(response);
}).then(()=>{
if(detail){
- wx.requestSubscribeMessage({
- tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
- success (res) {
- console.log(res);//同意授权
+
+ let tmplIds = ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc']
+ let sub_promise = requestSubscribeMessage(tmplIds)
+ sub_promise.then(res => {
+ console.log("订阅成功")
+
+ }).catch(err => {
+ console.log(err)
+ let errCode = err.errCode
+ if(errCode == 20004){
+ this.setData({
+ sub_visible: true,
+ })
}
})
}
}).catch(errors => {console.error(errors);})
},
-
+ subcancelDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ },
+ subconfirmDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ wx.openSetting({
+ success (res) {
+ console.log(res.authSetting)
+ }
+ })
+ },
putDoctorInquiryConfig(){
//修改医生问诊配置
let params = {};
diff --git a/Pages/yishi/yizhensetupprice/index.json b/Pages/yishi/yizhensetupprice/index.json
index 7ebfd9b..e57194f 100644
--- a/Pages/yishi/yizhensetupprice/index.json
+++ b/Pages/yishi/yizhensetupprice/index.json
@@ -8,6 +8,7 @@
"van-cell-group": "@vant/weapp/cell-group/index",
"van-stepper": "@vant/weapp/stepper/index",
"van-button": "@vant/weapp/button/index",
- "van-toast": "@vant/weapp/toast/index"
+ "van-toast": "@vant/weapp/toast/index",
+ "t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/yizhensetupprice/index.wxml b/Pages/yishi/yizhensetupprice/index.wxml
index 4259805..df87a1c 100644
--- a/Pages/yishi/yizhensetupprice/index.wxml
+++ b/Pages/yishi/yizhensetupprice/index.wxml
@@ -46,4 +46,17 @@
+
+
+
+ 取消
+
+
+ 确定
+
+
\ No newline at end of file
diff --git a/Pages/yishi/yizhensetupprice/index.wxss b/Pages/yishi/yizhensetupprice/index.wxss
index 8d256c4..d41f1c7 100644
--- a/Pages/yishi/yizhensetupprice/index.wxss
+++ b/Pages/yishi/yizhensetupprice/index.wxss
@@ -120,4 +120,18 @@ page{
.van-cell__value{
font-size: 32rpx !important;
color: red !important;
+}
+.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;
}
\ No newline at end of file
diff --git a/Pages/yishi/zhiye_identity/index.js b/Pages/yishi/zhiye_identity/index.js
index 75b3009..49b2a2d 100644
--- a/Pages/yishi/zhiye_identity/index.js
+++ b/Pages/yishi/zhiye_identity/index.js
@@ -1,5 +1,6 @@
import { API } from './../../../utils/network/api'
import { FileUtil } from './../../../utils/fileutil'
+import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
const api = new API()
const app = getApp()
Page({
@@ -15,7 +16,8 @@ Page({
btn_txt: "提交",
multi_point_status: "",
btn_disabled: true,
- sfz_show: false
+ sfz_show: false,
+ sub_visible: false,
},
onLoad(){
@@ -99,66 +101,88 @@ Page({
})
}
},
- add(){
- let _this = this;
- wx.requestSubscribeMessage({
- tmplIds: ['XWfEQYtb8_ubz8pCs3GoCG6TFxpDz9jn52895yvDm3s','bGGoKtDZC23GZtrrxuy6i5V7OhHgRgwXWx4yoDO1tlA'],
- success (res) {
- console.log(res);
- console.log(_this.data.id_card_front);
- console.log(_this.data.id_card_back);
-
- if(_this.data.id_card_front.length == 0){
- wx.showToast({
- title: '身份证正面为空',
- icon: "error"
- })
- return;
- }
-
- if(_this.data.id_card_back.length == 0){
- wx.showToast({
- title: '身份证反面为空',
- icon: "error"
- })
- return;
- }
- let id_card_front = _this.data.id_card_front[0].url;
- let id_card_back = _this.data.id_card_back[0].url;
- let sign_image = _this.data.sign_image[0].url;
- console.log("id_card_front: ", id_card_front);
- console.log("id_card_back: ", id_card_back);
- console.log("sign_image: ", sign_image);
- if(sign_image == ""){
- wx.showToast({
- title: '手写签名为空',
- icon: "error"
- })
- return;
- }
- let params = {};
- params.id_card_front = id_card_front;
- params.id_card_back = id_card_back;
- params.sign_image = sign_image;
- api.postDoctorAuthMulti(params).then(response => {
- console.log("postDoctorAuthMulti: ",response);
- wx.showToast({
- title: '提交成功',
- icon: "success"
- })
- _this.setData({
- btn_txt: "审核中",
- btn_disabled: true
- })
- }).catch(errors => {
- console.error(errors);
- })
- },
- fail (res) { console.log(res) },
- complete (res) { console.log(res) },
+ subcancelDialog(){
+ this.setData({
+ sub_visible: false
})
-
+ this.goadd()
+ },
+ subconfirmDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ wx.openSetting({
+ success (res) {
+ console.log(res.authSetting)
+ }
+ })
+ },
+ add(){
+ let tmplIds = ['XWfEQYtb8_ubz8pCs3GoCG6TFxpDz9jn52895yvDm3s','bGGoKtDZC23GZtrrxuy6i5V7OhHgRgwXWx4yoDO1tlA']
+ let sub_promise = requestSubscribeMessage(tmplIds)
+ sub_promise.then(res => {
+ console.log("订阅成功")
+ this.goadd()
+ }).catch(err => {
+ console.log(err)
+ let errCode = err.errCode
+ if(errCode == 20004){
+ this.setData({
+ sub_visible: true,
+ })
+ }
+ })
+ },
+ goadd(){
+ let _this = this;
+ console.log(_this.data.id_card_front);
+ console.log(_this.data.id_card_back);
+ if(_this.data.id_card_front.length == 0){
+ wx.showToast({
+ title: '身份证正面为空',
+ icon: "error"
+ })
+ return;
+ }
+
+ if(_this.data.id_card_back.length == 0){
+ wx.showToast({
+ title: '身份证反面为空',
+ icon: "error"
+ })
+ return;
+ }
+ let id_card_front = _this.data.id_card_front[0].url;
+ let id_card_back = _this.data.id_card_back[0].url;
+ let sign_image = _this.data.sign_image[0].url;
+ console.log("id_card_front: ", id_card_front);
+ console.log("id_card_back: ", id_card_back);
+ console.log("sign_image: ", sign_image);
+ if(sign_image == ""){
+ wx.showToast({
+ title: '手写签名为空',
+ icon: "error"
+ })
+ return;
+ }
+ let params = {};
+ params.id_card_front = id_card_front;
+ params.id_card_back = id_card_back;
+ params.sign_image = sign_image;
+ api.postDoctorAuthMulti(params).then(response => {
+ console.log("postDoctorAuthMulti: ",response);
+ wx.showToast({
+ title: '提交成功',
+ icon: "success"
+ })
+ _this.setData({
+ btn_txt: "审核中",
+ btn_disabled: true
+ })
+ }).catch(errors => {
+ console.error(errors);
+ })
},
doUploadFile(event) {
console.log("index douploadFIle: ", event);
diff --git a/Pages/yishi/zhiye_identity/index.json b/Pages/yishi/zhiye_identity/index.json
index 42ec431..0e9bd46 100644
--- a/Pages/yishi/zhiye_identity/index.json
+++ b/Pages/yishi/zhiye_identity/index.json
@@ -9,6 +9,7 @@
"van-divider": "@vant/weapp/divider/index",
"van-button": "@vant/weapp/button/index",
"van-popup": "@vant/weapp/popup/index",
- "van-image": "@vant/weapp/image/index"
+ "van-image": "@vant/weapp/image/index",
+ "t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}
\ No newline at end of file
diff --git a/Pages/yishi/zhiye_identity/index.wxml b/Pages/yishi/zhiye_identity/index.wxml
index 60d18ee..a062790 100644
--- a/Pages/yishi/zhiye_identity/index.wxml
+++ b/Pages/yishi/zhiye_identity/index.wxml
@@ -97,4 +97,17 @@
+
+
+ 取消
+
+
+ 确定
+
+
+
\ No newline at end of file
diff --git a/Pages/yishi/zhiye_identity/index.wxss b/Pages/yishi/zhiye_identity/index.wxss
index eb1d61d..a433484 100644
--- a/Pages/yishi/zhiye_identity/index.wxss
+++ b/Pages/yishi/zhiye_identity/index.wxss
@@ -54,4 +54,18 @@
}
.zhiye_popup_img{
margin-top: 30rpx;
+}
+.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;
}
\ No newline at end of file
diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.js b/TUIKit/components/TUIChat/components/MessageInput/index.js
index 2146c7e..c6e7118 100644
--- a/TUIKit/components/TUIChat/components/MessageInput/index.js
+++ b/TUIKit/components/TUIChat/components/MessageInput/index.js
@@ -1,6 +1,7 @@
import logger from '../../../../utils/logger';
import constant from '../../../../utils/constant';
import { API } from '../../../../../utils/network/api';
+import { requestSubscribeMessage } from '../../../../../utils/requestSubscribeUtil';
const api = new API()
let app = getApp()
@@ -79,7 +80,7 @@ Component({
notShow: false,
isShow: true,
commonFunction: [
- { name: '查看完整病例', key: '10' },
+ { name: '查看完整病历', key: '10' },
{ name: '在线开处方', key: '11' },
],
displayServiceEvaluation: false,
@@ -95,6 +96,7 @@ Component({
showChangYongYu: false,
ChangYongYu: [],
dialog_visible: false,
+ sub_visible: false,
dialog_message: "在线开处方需先进行多点执业认证",
message_rounds: 0,
networkstatus: "wifi"
@@ -456,7 +458,7 @@ Component({
},
handleCommonFunctions(e) {
- // console.log("handleCommonFunctions: ", e)
+ console.log("handleCommonFunctions: ", e)
switch (e.target.dataset.key) {
case '0':
this.setData({
@@ -478,26 +480,19 @@ Component({
break;
case '11'://在线开方
let _this = this;
- // console.log("开始订阅消息");
- wx.requestSubscribeMessage({
- tmplIds: ['kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40'],
- success (res) {
- // console.log(res);
- 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);
+ console.log("开始订阅消息");
+ let tmplIds = ['kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40']
+ let sub_promise = requestSubscribeMessage(tmplIds)
+ sub_promise.then(res => {
+ console.log("订阅成功")
+ this.goCase()
+ }).catch(err => {
+ console.log(err)
+ let errCode = err.errCode
+ if(errCode == 20004){
+ _this.setData({
+ sub_visible: true,
})
-
}
})
break;
@@ -505,6 +500,23 @@ Component({
break;
}
},
+ goCase(){
+
+ 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);
+ })
+ },
cancelDialog(){
this.setData({
dialog_visible: false
@@ -516,6 +528,22 @@ Component({
dialog_visible: false
})
},
+ subcancelDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ this.goCase()
+ },
+ subconfirmDialog(){
+ this.setData({
+ sub_visible: false
+ })
+ wx.openSetting({
+ success (res) {
+ console.log(res.authSetting)
+ }
+ })
+ },
handleSendOrder() {
this.setData({
displayOrderList: true,
@@ -849,7 +877,11 @@ Component({
event,
});
},
-
+ inputBindLinechange(event){
+ this.triggerEvent('inputBindLinechange', {
+ event,
+ });
+ },
$handleSendTextMessage(event) {
this.sendTextMessage(event.detail.message, true);
this.setData({
diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.wxml b/TUIKit/components/TUIChat/components/MessageInput/index.wxml
index 3511119..784a9a5 100644
--- a/TUIKit/components/TUIChat/components/MessageInput/index.wxml
+++ b/TUIKit/components/TUIChat/components/MessageInput/index.wxml
@@ -1,18 +1,20 @@
- 查看完整病例
+ 查看完整病历
在线开处方
-
+ bindconfirm="sendTextMessage"
+ bindlinechange="inputBindLinechange"
+ />
+
+
+
+ 取消
+
+
+ 确定
+
+
diff --git a/TUIKit/components/TUIChat/components/MessageInput/index.wxss b/TUIKit/components/TUIChat/components/MessageInput/index.wxss
index 57f482d..832039d 100644
--- a/TUIKit/components/TUIChat/components/MessageInput/index.wxss
+++ b/TUIKit/components/TUIChat/components/MessageInput/index.wxss
@@ -67,7 +67,7 @@
}
.TUI-message-input-area {
width: 100%;
- max-height: 300rpx;
+ max-height: 100px;
/* 最多显示10行 */
line-height: 30rpx;
overflow: scroll;
diff --git a/TUIKit/components/TUIChat/components/MessageList/index.js b/TUIKit/components/TUIChat/components/MessageList/index.js
index 80ad454..76fab5a 100644
--- a/TUIKit/components/TUIChat/components/MessageList/index.js
+++ b/TUIKit/components/TUIChat/components/MessageList/index.js
@@ -162,6 +162,7 @@ Component({
this.setData({
isCompleted: true,
triggered: false,
+ list_first_loading: false
});
return;
}
@@ -293,8 +294,10 @@ Component({
if(Number(customMessage.message_type) == GDXZ_CUSTOM_MSEEAGE.TRABECULA && refreshBaseInfo){
const title = customMessage.title
if(title.indexOf("问诊已结束") > -1){
- //收到横条消息去触发父组件getbase方法
- this.triggerEvent('getInquiryMessageBasic');
+ setTimeout(() => {
+ //收到横条消息去触发父组件getbase方法,演示1秒
+ this.triggerEvent('getInquiryMessageBasic');
+ }, 1000);
}
}
}
diff --git a/TUIKit/components/TUIChat/index.js b/TUIKit/components/TUIChat/index.js
index 814f595..7229435 100644
--- a/TUIKit/components/TUIChat/index.js
+++ b/TUIKit/components/TUIChat/index.js
@@ -2,6 +2,7 @@
import logger from '../../utils/logger';
import constant from '../../utils/constant';
import { API } from './../../../utils/network/api'
+import { rpxTopx } from './../../../utils/util'
const api = new API()
// eslint-disable-next-line no-undef
const app = getApp();
@@ -79,14 +80,19 @@ Component({
message_rounds: 0
});
}
+ //console.log("000")
this.getNavbarHeight()
- wx.onKeyboardHeightChange(res => {
- // console.log("键盘高度:", res.height)
- this.setData({
- keysboards_height: res.height
- })
- this.getNavbarHeight();
- })
+
+ // let _this = this
+ // wx.onKeyboardHeightChange(res => {
+ // let kb_height = res.height
+ // console.log("键盘高度:", kb_height)
+ // _this.setData({
+ // kb_height: kb_height
+ // })
+ // console.log("111")
+ // _this.getNavbarHeight();
+ // })
},
ready() {
@@ -103,6 +109,12 @@ Component({
"navbarData.showCapsule": 3
})
}
+ this.setData({
+ finsh_btn: false
+ })
+
+
+
}
},
/**
@@ -137,11 +149,14 @@ Component({
showCapsule: 2, //是否显示左上角图标 1表示显示 0表示不显示
title: '', //导航栏 中间的标题
},
- navbar_height: 0,
+ navbar_height: 120,
dialog_visible: false,
+ finsh_btn: false,
KeysBoardsStatus: "down",
message_rounds: 0,
- keysboards_height: 0
+ keysboards_height: 0,
+ kb_height: 0,
+ change_kb: false
},
/**
@@ -157,6 +172,9 @@ Component({
})
},
getNavbarHeight(addHeight){
+
+ try {
+ //console.log("getNavbarHeight: ", new Date().getTime())
let rect = null;
if (wx.getMenuButtonBoundingClientRect) {
rect = wx.getMenuButtonBoundingClientRect();
@@ -164,32 +182,55 @@ Component({
// console.log("rect: ", rect)
wx.getSystemInfo({
success: (res) => {
- const { statusBarHeight } = wx.getSystemInfoSync();
+ // const { statusBarHeight } = wx.getSystemInfoSync();
// console.log("statusBarHeight: ", statusBarHeight);
// console.log("${rect.height}px: ", `${rect.height}`);
- let height = Number.parseInt(statusBarHeight) + Number.parseInt(`${rect.height}`) + 50;
- if(addHeight){
+ let height = Number.parseInt(res.statusBarHeight) + Number.parseInt(`${rect.height}`);
+
+ let KeysBoardsStatus = this.data.KeysBoardsStatus
+ if(KeysBoardsStatus == 'pull'){
+ height = height + rpxTopx(35)
+ }else{
+ height = height + rpxTopx(70)
+ }
+ if(addHeight > 0){
height = height + addHeight
}
- let keysboards_height = this.data.keysboards_height
- // console.log("getNavbarHeight 键盘高度:", keysboards_height)
- if(keysboards_height){
- height = height + keysboards_height
+ let kb_height = Number.parseInt(this.data.kb_height)
+ let textarea_height = Number.parseInt(this.data.textarea_height)
+ //console.log("getNavbarHeight 键盘高度:", kb_height)
+ if(kb_height > 0){
+ //console.log("height 1: ", height)
+ height = height + kb_height
+ //console.log("height 2: ", height)
}
+ if(textarea_height > 0){
+ //console.log("height 1: ", height)
+ height = height + textarea_height
+ //console.log("height 2: ", height)
+ }
+
this.setData({
navbar_height: height
})
+ //console.log(444)
},
fail: (err) => {
console.error('navbar 获取系统信息失败', err);
},
});
+ } catch (error) {
+ console.error(error)
+ }
+
+
},
//结束问诊
putDoctorInquiryFinish() {
this.setData({
dialog_visible: true
})
+ wx.hideKeyboard()
},
cancelDialog(){
this.setData({
@@ -197,12 +238,25 @@ Component({
})
},
confirmDialog(){
+ let finsh_btn = this.data.finsh_btn
+ if(finsh_btn){
+ return
+ }
+ this.setData({
+ finsh_btn: true
+ })
api.putDoctorInquiryFinish({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
// console.log(response);
- this.getInquiryMessageBasic();
+ // this.getInquiryMessageBasic();
//调用子组件中的跳到最新消息
+ this.getNavbarHeight()
this.selectComponent('#MessageList').handleJumpNewMessage();
- }).catch(errors => {console.error(errors);})
+ }).catch(errors => {
+ console.error(errors);
+ this.setData({
+ finsh_btn: false
+ })
+ })
this.setData({
dialog_visible: false
})
@@ -215,6 +269,10 @@ Component({
this.setData({
baseInfo: response.data,
})
+ if(response.data.inquiry_status > 4){
+ wx.hideKeyboard()
+ this.getNavbarHeight()
+ }
}).catch(errors => {console.error(errors);})
},
init() {
@@ -261,14 +319,14 @@ Component({
this.getNavbarHeight();
},
refreshMessageStatus(message) {
- console.log("TUIchat refreshMessageStatus", message)
+ //console.log("TUIchat refreshMessageStatus", message)
this.selectComponent('#MessageList').refreshMessageStatus(message);
},
showMessageErrorImage(event) {
this.selectComponent('#MessageList').sendMessageError(event);
},
triggerClose() {
- // console.log("message-list triggerClose")
+ //console.log("message-list triggerClose")
if(this.data.baseInfo.inquiry_status == 4){
this.selectComponent('#MessageInput').handleClose();
}
@@ -305,13 +363,13 @@ Component({
this.selectComponent('#MessageInput').onInputValueChange(event);
},
myhandleExtensions(e){
- // console.log("myhandleExtensionsmyhandleExtensions: ", e);
+ //console.log("myhandleExtensionsmyhandleExtensions: ", e);
wx.hideKeyboard()
let displayFlag = e.detail.displayFlag;
- setTimeout(() => {
+ // setTimeout(() => {
if(displayFlag){
this.setData({
- input_area_style: "position: absolute; bottom: 30px;"
+ input_area_style: "position: absolute; bottom: 20px;"
})
this.getNavbarHeight(100);
this.selectComponent('#MessageList').handleJumpNewMessage();
@@ -321,39 +379,66 @@ Component({
})
this.getNavbarHeight();
}
- }, 100);
+ // }, 100);
},
// 监听键盘,获取焦点时将输入框推到键盘上方
pullKeysBoards(event) {
- // console.log("pullKeysBoardspullKeysBoards")
- setNewInputStyle(event.detail.event.detail.height);
+ //console.log("pullKeysBoardspullKeysBoards")
+ let value = event.detail.event.detail.value;
+ let height = event.detail.event.detail.height;
- this.getNavbarHeight();
+ //console.log("pullKeysBoards value: ", height)
+ setNewInputStyle(height);
+ if(height){
+ this.setData({
+ kb_height: height
+ })
+ }
+ //console.log("333")
this.setData({
'viewData.style': newInputStyle,
- input_area_style: "position: absolute; bottom: 52rpx;",
+ // input_area_style: "position: absolute; bottom: 52rpx;",
KeysBoardsStatus: "pull"
});
+ this.getNavbarHeight();
this.selectComponent('#MessageList').handleJumpNewMessage();
+
},
// 监听键盘,失去焦点时收起键盘
downKeysBoards(event) {
- // console.log("downKeysBoardsdownKeysBoards")
- // console.log(event)
+ //console.log("downKeysBoardsdownKeysBoards")
+ // //console.log(event)
let value = event.detail.event.detail.value;
- this.getNavbarHeight();
+ //console.log("downKeysBoards value: ", value)
if(value){
this.setData({
'viewData.style': inputStyle,
- KeysBoardsStatus: "down"
+ KeysBoardsStatus: "down",
+ kb_height: 0
});
}else{
this.setData({
'viewData.style': inputStyle,
input_area_style: "",
- KeysBoardsStatus: "down"
+ KeysBoardsStatus: "down",
+ kb_height: 0
});
}
+ //console.log("444")
+ this.getNavbarHeight();
+ },
+ inputBindLinechange(event){
+ console.log(event)
+ let lineCount = event.detail.event.detail.lineCount;
+ let height = event.detail.event.detail.height;
+ if(height > 100){
+ return
+ }
+ let lineHeight = height / lineCount;
+ this.setData({
+ textarea_height: lineHeight * (lineCount - 1)
+ })
+ this.getNavbarHeight();
},
typing(event) {
const { STRING_TEXT, FEAT_NATIVE_CODE } = constant;
diff --git a/TUIKit/components/TUIChat/index.wxml b/TUIKit/components/TUIChat/index.wxml
index 23064a1..6a4072c 100644
--- a/TUIKit/components/TUIChat/index.wxml
+++ b/TUIKit/components/TUIChat/index.wxml
@@ -1,16 +1,16 @@
-
-
- {{baseInfo.patient_family_name}}
- {{baseInfo.patient_family_sex==1?'男':'女'}}|{{baseInfo.patient_family_age}}岁
- {{baseInfo.inquiry_status==1?'待支付':baseInfo.inquiry_status==2?'待分配':baseInfo.inquiry_status==3?'待接诊':baseInfo.inquiry_status==4?'接诊中':baseInfo.inquiry_status==5?'问诊完成':baseInfo.inquiry_status==6?'已结束':baseInfo.inquiry_status==7?'已取消':'未知'}}
+
+
+ {{baseInfo.patient_family_name}}
+ {{baseInfo.patient_family_sex==1?'男':'女'}}|{{baseInfo.patient_family_age}}岁
+ {{baseInfo.inquiry_status==1?'待支付':baseInfo.inquiry_status==2?'待分配':baseInfo.inquiry_status==3?'待接诊':baseInfo.inquiry_status==4?'接诊中':baseInfo.inquiry_status==5?'问诊完成':baseInfo.inquiry_status==6?'已结束':baseInfo.inquiry_status==7?'已取消':'未知'}}
+
+
+ 结束问诊
+
-
- 结束问诊
-
-