优化
This commit is contained in:
parent
7b9b80be8d
commit
807698b89f
18
Pages/agreement_page/index.js
Normal file
18
Pages/agreement_page/index.js
Normal file
@ -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
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
})
|
||||||
3
Pages/agreement_page/index.json
Normal file
3
Pages/agreement_page/index.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
2
Pages/agreement_page/index.wxml
Normal file
2
Pages/agreement_page/index.wxml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<!--Pages/webpage/index.wxml-->
|
||||||
|
<web-view src="{{src}}"/>
|
||||||
1
Pages/agreement_page/index.wxss
Normal file
1
Pages/agreement_page/index.wxss
Normal file
@ -0,0 +1 @@
|
|||||||
|
/* Pages/webpage/index.wxss */
|
||||||
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<view style="display: flex;">
|
<view style="display: flex;">
|
||||||
<van-checkbox value="{{ checked }}" bind:change="onChange">我已阅读并同意协议</van-checkbox>
|
<van-checkbox value="{{ checked }}" bind:change="onChange">我已阅读并同意协议</van-checkbox>
|
||||||
<view style="color: #4384FE;flex: 1;" bindtap="go" data-url="/Pages/yishi/agreement_detail/index?agreement_id=10">《肝胆相照用户服务协议》</view>
|
<view style="color: #4384FE;flex: 1;" bindtap="go" data-url="/Pages/agreement_page/index?agreement_id=10">《肝胆相照用户服务协议》</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
|
import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
|
||||||
|
|
||||||
const api = new API()
|
const api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
@ -17,8 +18,10 @@ Page({
|
|||||||
withdrawal_amount: "xxxx",
|
withdrawal_amount: "xxxx",
|
||||||
income_tax: "xx",
|
income_tax: "xx",
|
||||||
contactKeFu: false,
|
contactKeFu: false,
|
||||||
|
sub_visible: false,
|
||||||
skeleton_loading: true,
|
skeleton_loading: true,
|
||||||
order_inquiry_ids: []
|
order_inquiry_ids: [],
|
||||||
|
sub_btn_disabled: false
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
let order_inquiry_ids = option.order_inquiry_ids;
|
let order_inquiry_ids = option.order_inquiry_ids;
|
||||||
@ -33,29 +36,50 @@ Page({
|
|||||||
this.postDoctorWithdrawalInfo(params);
|
this.postDoctorWithdrawalInfo(params);
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
|
this.setData({
|
||||||
|
sub_btn_disabled: false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
go(e){
|
go(e){
|
||||||
let url = e.currentTarget.dataset.url;
|
let url = e.currentTarget.dataset.url;
|
||||||
app.go(url);
|
app.go(url);
|
||||||
},
|
},
|
||||||
contactKeFu(e){
|
contactKeFu(e){
|
||||||
let _this = this;
|
|
||||||
|
|
||||||
console.log("concatKeFu");
|
console.log("concatKeFu");
|
||||||
wx.requestSubscribeMessage({
|
let tmplIds = ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc']
|
||||||
tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'],
|
let sub_promise = requestSubscribeMessage(tmplIds)
|
||||||
success (res) {
|
sub_promise.then(res => {
|
||||||
console.log(res);
|
console.log("订阅成功")
|
||||||
_this.setData({
|
this.setData({
|
||||||
contactKeFu: true
|
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){
|
postDoctorWithdrawalInfo(params){
|
||||||
|
|
||||||
//获取提现数据
|
//获取提现数据
|
||||||
api.postDoctorWithdrawalInfo(params).then(response => {
|
api.postDoctorWithdrawalInfo(params).then(response => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
@ -74,9 +98,13 @@ Page({
|
|||||||
}
|
}
|
||||||
}).catch(errors => {
|
}).catch(errors => {
|
||||||
console.error(errors);
|
console.error(errors);
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
postDoctorWithdrawal(){
|
postDoctorWithdrawal(){
|
||||||
|
this.setData({
|
||||||
|
sub_btn_disabled: true
|
||||||
|
})
|
||||||
let params = {};
|
let params = {};
|
||||||
params.order_inquiry_id = this.data.order_inquiry_ids.join(",");
|
params.order_inquiry_id = this.data.order_inquiry_ids.join(",");
|
||||||
params.withdrawal_amount_total = this.data.withdrawal_amount;
|
params.withdrawal_amount_total = this.data.withdrawal_amount;
|
||||||
@ -94,6 +122,9 @@ Page({
|
|||||||
})
|
})
|
||||||
}).catch(errors => {
|
}).catch(errors => {
|
||||||
console.error(errors);
|
console.error(errors);
|
||||||
|
this.setData({
|
||||||
|
sub_btn_disabled: false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -6,6 +6,7 @@
|
|||||||
"van-icon": "@vant/weapp/icon/index",
|
"van-icon": "@vant/weapp/icon/index",
|
||||||
"van-button": "@vant/weapp/button/index",
|
"van-button": "@vant/weapp/button/index",
|
||||||
"van-dialog": "@vant/weapp/dialog/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="txt_title">结算银行卡</view>
|
<view class="txt_title">结算银行卡</view>
|
||||||
<view class="rule" bindtap="go" data-url="/Pages/yishi/agreement_detail/index?agreement_id=12">提现规则<van-icon name="warning-o" color="#FF9800" /></view>
|
<view class="rule" bindtap="go" data-url="/Pages/agreement_page/index?agreement_id=12">提现规则<van-icon name="warning-o" color="#FF9800" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bankcard" wx:if="{{!skeleton_loading}}">
|
<view class="bankcard" wx:if="{{!skeleton_loading}}">
|
||||||
<view class="bankcard_icon">
|
<view class="bankcard_icon">
|
||||||
@ -58,7 +58,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<van-button bind:click="postDoctorWithdrawal" disabled="{{order_inquiry_ids.length == 0}}" custom-style="border-radius: 10rpx;font-size: 30rpx;" block color="#3CC7C0">提取</van-button>
|
<van-button bind:click="postDoctorWithdrawal" disabled="{{order_inquiry_ids.length == 0 || sub_btn_disabled}}" custom-style="border-radius: 10rpx;font-size: 30rpx;" block color="#3CC7C0">提取</van-button>
|
||||||
<view class="kefu" bindtap="contactKeFu">
|
<view class="kefu" bindtap="contactKeFu">
|
||||||
<text>联系客服</text>
|
<text>联系客服</text>
|
||||||
</view>
|
</view>
|
||||||
@ -71,4 +71,18 @@
|
|||||||
confirm-button-color="#3CC7C0"
|
confirm-button-color="#3CC7C0"
|
||||||
confirm-button-open-type="contact"
|
confirm-button-open-type="contact"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<t-dialog
|
||||||
|
visible="{{ sub_visible }}"
|
||||||
|
title="温馨提示"
|
||||||
|
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||||
|
>
|
||||||
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</t-dialog>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -139,5 +139,18 @@ page{
|
|||||||
color: #3CC7C0;
|
color: #3CC7C0;
|
||||||
margin: 30rpx;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
// Pages/yishi/index/index.js
|
// Pages/yishi/index/index.js
|
||||||
import { API } from './../../../utils/network/api'
|
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 api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
@ -92,6 +94,7 @@ Page({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
contactKeFu: false,
|
contactKeFu: false,
|
||||||
|
sub_visible: false,
|
||||||
jiesuan_dialog_show: false,
|
jiesuan_dialog_show: false,
|
||||||
jiesuan_dialog_visible: false,
|
jiesuan_dialog_visible: false,
|
||||||
funbox_height: 100,
|
funbox_height: 100,
|
||||||
@ -125,7 +128,7 @@ Page({
|
|||||||
const { statusBarHeight } = wx.getSystemInfoSync();
|
const { statusBarHeight } = wx.getSystemInfoSync();
|
||||||
// console.log("statusBarHeight: ", rpxTopx(statusBarHeight));
|
// console.log("statusBarHeight: ", rpxTopx(statusBarHeight));
|
||||||
let funbox_height = wx.getSystemInfoSync().windowHeight - (this.data.stateHeight + this.data.navHeight + 10) - 55;//减去底部空白
|
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的高度
|
// 147 userinfo的高度
|
||||||
// 80 info_note
|
// 80 info_note
|
||||||
// 155 认证部分的高度
|
// 155 认证部分的高度
|
||||||
@ -424,6 +427,8 @@ Page({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
|
"info.info_shiming_status_txt": "未认证",
|
||||||
|
"info.info_shiming_status": "info_shiming_status_no",
|
||||||
dialog_content: "请您先完成实名认证",
|
dialog_content: "请您先完成实名认证",
|
||||||
shiming_status_url: "/Pages/yishi/identity/index",
|
shiming_status_url: "/Pages/yishi/identity/index",
|
||||||
dialog_url: "/Pages/yishi/identity/index",
|
dialog_url: "/Pages/yishi/identity/index",
|
||||||
@ -637,20 +642,41 @@ Page({
|
|||||||
|
|
||||||
let checkDialog = this.checkDialog(e);
|
let checkDialog = this.checkDialog(e);
|
||||||
if(checkDialog){
|
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){
|
checkDialog(e){
|
||||||
//实名认证
|
//实名认证
|
||||||
let idcard_status = this.data.info.idcard_status;
|
let idcard_status = this.data.info.idcard_status;
|
||||||
|
|||||||
@ -233,6 +233,19 @@
|
|||||||
<van-button color="rgba(0, 0, 0, .1)" style="position: fixed;bottom: 50rpx;left: 50%;transform: translateX(-50%);width: 90vw;border: 1px solid #fff;border-radius: 50px;" block round bind:click="onClickHideOverlay">我知道了</van-button>
|
<van-button color="rgba(0, 0, 0, .1)" style="position: fixed;bottom: 50rpx;left: 50%;transform: translateX(-50%);width: 90vw;border: 1px solid #fff;border-radius: 50px;" block round bind:click="onClickHideOverlay">我知道了</van-button>
|
||||||
</van-overlay>
|
</van-overlay>
|
||||||
|
|
||||||
|
<t-dialog
|
||||||
|
visible="{{ sub_visible }}"
|
||||||
|
title="温馨提示"
|
||||||
|
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||||
|
>
|
||||||
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</t-dialog>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -167,6 +167,7 @@ page{
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 20rpx 20rpx 0 20rpx;
|
padding: 20rpx 20rpx 0 20rpx;
|
||||||
|
box-shadow: 0px 2px 10px 0px rgba(0,0,0,0.1);
|
||||||
}
|
}
|
||||||
.swiper{
|
.swiper{
|
||||||
height:168rpx;
|
height:168rpx;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
import Toast from '@vant/weapp/toast/toast';
|
import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
|
||||||
|
|
||||||
let api = new API()
|
let api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
@ -32,7 +33,8 @@ Page({
|
|||||||
"5",
|
"5",
|
||||||
"10"
|
"10"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
sub_visible: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(){
|
onLoad(){
|
||||||
@ -78,16 +80,41 @@ Page({
|
|||||||
console.log(response);
|
console.log(response);
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
if(detail){
|
if(detail){
|
||||||
wx.requestSubscribeMessage({
|
|
||||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
|
let tmplIds = ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc']
|
||||||
success (res) {
|
let sub_promise = requestSubscribeMessage(tmplIds)
|
||||||
console.log(res);//同意授权
|
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);})
|
}).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(){
|
putDoctorInquiryConfig(){
|
||||||
wx.switchTab({
|
wx.switchTab({
|
||||||
url: "/Pages/yishi/wenzhen_v2/wenzhen"
|
url: "/Pages/yishi/wenzhen_v2/wenzhen"
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
"van-stepper": "@vant/weapp/stepper/index",
|
"van-stepper": "@vant/weapp/stepper/index",
|
||||||
"van-switch": "@vant/weapp/switch/index",
|
"van-switch": "@vant/weapp/switch/index",
|
||||||
"van-button": "@vant/weapp/button/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -46,4 +46,17 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<van-toast id="van-toast" />
|
<van-toast id="van-toast" />
|
||||||
|
|
||||||
|
<t-dialog
|
||||||
|
visible="{{ sub_visible }}"
|
||||||
|
title="温馨提示"
|
||||||
|
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||||
|
>
|
||||||
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</t-dialog>
|
||||||
</view>
|
</view>
|
||||||
@ -124,3 +124,17 @@ page{
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
flex: 1;
|
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;
|
||||||
|
}
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<van-empty description="暂无账单" wx:if="{{ bill.length == 0 }}" />
|
<van-empty description="暂无账单" wx:if="{{ bill.length == 0 }}" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<van-image bind:click="go" data-url="/Pages/yishi/agreement_detail/index?agreement_id=13" style="position: fixed; right: 0;bottom: 262rpx;" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/account_rule.png" fit="heightFix" height="84rpx" aria-label="role" />
|
<van-image bind:click="go" data-url="/Pages/agreement_page/index?agreement_id=13" style="position: fixed; right: 0;bottom: 262rpx;" src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/account_rule.png" fit="heightFix" height="84rpx" aria-label="role" />
|
||||||
|
|
||||||
<t-picker
|
<t-picker
|
||||||
visible="{{dateVisible}}"
|
visible="{{dateVisible}}"
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import Toast from '@vant/weapp/toast/toast';
|
import Toast from '@vant/weapp/toast/toast';
|
||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
|
import Dialog from '@vant/weapp/dialog/dialog';
|
||||||
|
|
||||||
const api = new API()
|
const api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
@ -138,11 +140,24 @@ Page({
|
|||||||
|
|
||||||
let product_id = this.data.save_durg_product_id;
|
let product_id = this.data.save_durg_product_id;
|
||||||
this.delDrugBox(product_id);
|
this.delDrugBox(product_id);
|
||||||
|
let save_durg_prescription_product_num = this.data.save_durg_prescription_product_num;
|
||||||
|
|
||||||
|
if(!save_durg_prescription_product_num || save_durg_prescription_product_num <0){
|
||||||
|
Dialog.alert({
|
||||||
|
message: '请输入药品数量',
|
||||||
|
}).then(() => {
|
||||||
|
this.setData({
|
||||||
|
save_durg_prescription_product_num: ""
|
||||||
|
})
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let save_durg = {};
|
let save_durg = {};
|
||||||
save_durg.product_name = this.data.product_name;
|
save_durg.product_name = this.data.product_name;
|
||||||
save_durg.product_id = this.data.save_durg_product_id;
|
save_durg.product_id = this.data.save_durg_product_id;
|
||||||
save_durg.prescription_product_num = this.data.save_durg_prescription_product_num;
|
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_unit = this.data.save_durg_single_unit;
|
||||||
save_durg.single_use = this.data.save_durg_single_use;
|
save_durg.single_use = this.data.save_durg_single_use;
|
||||||
save_durg.packaging_unit = this.data.save_durg_packaging_unit;
|
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(){//修改处方
|
putDoctorPrescription(){//修改处方
|
||||||
let sub_disabled = this.data.sub_disabled;
|
let sub_disabled = this.data.sub_disabled;
|
||||||
if(sub_disabled) return
|
if(sub_disabled) return
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
"van-search": "@vant/weapp/search/index",
|
"van-search": "@vant/weapp/search/index",
|
||||||
"van-image": "@vant/weapp/image/index",
|
"van-image": "@vant/weapp/image/index",
|
||||||
"van-toast": "@vant/weapp/toast/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,7 +187,8 @@
|
|||||||
<van-field
|
<van-field
|
||||||
label="药品数量"
|
label="药品数量"
|
||||||
type="number"
|
type="number"
|
||||||
model:value="{{save_durg_prescription_product_num}}"
|
bind:input="get_save_durg_prescription_product_num"
|
||||||
|
value="{{save_durg_prescription_product_num}}"
|
||||||
input-align="left"
|
input-align="left"
|
||||||
placeholder="请输入数量"
|
placeholder="请输入数量"
|
||||||
custom-style="font-size: 30rpx;"
|
custom-style="font-size: 30rpx;"
|
||||||
@ -257,3 +258,4 @@
|
|||||||
<view style="height: 50rpx;">
|
<view style="height: 50rpx;">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0"/>
|
||||||
@ -1,5 +1,7 @@
|
|||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
import Toast from 'tdesign-miniprogram/toast/index';
|
import Toast from 'tdesign-miniprogram/toast/index';
|
||||||
|
import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
|
||||||
|
|
||||||
let api = new API()
|
let api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
@ -32,7 +34,8 @@ Page({
|
|||||||
"5",
|
"5",
|
||||||
"10"
|
"10"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
sub_visible: false,
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
|
|
||||||
@ -72,16 +75,41 @@ Page({
|
|||||||
console.log(response);
|
console.log(response);
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
if(detail){
|
if(detail){
|
||||||
wx.requestSubscribeMessage({
|
|
||||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
|
let tmplIds = ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc']
|
||||||
success (res) {
|
let sub_promise = requestSubscribeMessage(tmplIds)
|
||||||
console.log(res);//同意授权
|
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);})
|
}).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(){
|
putDoctorInquiryConfig(){
|
||||||
//修改医生问诊配置
|
//修改医生问诊配置
|
||||||
// let params = {};
|
// let params = {};
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
"van-stepper": "@vant/weapp/stepper/index",
|
"van-stepper": "@vant/weapp/stepper/index",
|
||||||
"van-switch": "@vant/weapp/switch/index",
|
"van-switch": "@vant/weapp/switch/index",
|
||||||
"van-button": "@vant/weapp/button/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,4 +51,17 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<t-toast id="t-toast" />
|
<t-toast id="t-toast" />
|
||||||
|
|
||||||
|
<t-dialog
|
||||||
|
visible="{{ sub_visible }}"
|
||||||
|
title="温馨提示"
|
||||||
|
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||||
|
>
|
||||||
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</t-dialog>
|
||||||
</view>
|
</view>
|
||||||
@ -138,3 +138,17 @@ page{
|
|||||||
.cell_value{
|
.cell_value{
|
||||||
color: #000;
|
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;
|
||||||
|
}
|
||||||
@ -118,6 +118,8 @@ Page({
|
|||||||
|
|
||||||
if(wx.$TUIKit){
|
if(wx.$TUIKit){
|
||||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
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{
|
}else{
|
||||||
app.imInit().then(res => {
|
app.imInit().then(res => {
|
||||||
// console.log("wenzhen onload imInit");
|
// console.log("wenzhen onload imInit");
|
||||||
@ -152,6 +154,7 @@ Page({
|
|||||||
dot_4: false,
|
dot_4: false,
|
||||||
})
|
})
|
||||||
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived);
|
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived);
|
||||||
|
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady);
|
||||||
},
|
},
|
||||||
onUnload(){
|
onUnload(){
|
||||||
// console.log("onUnload from wenzhen")
|
// console.log("onUnload from wenzhen")
|
||||||
@ -161,6 +164,9 @@ Page({
|
|||||||
now_message_inquiry_type: 5,
|
now_message_inquiry_type: 5,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onSDKReady(){
|
||||||
|
console.log("onSDKReady from wenzhen")
|
||||||
|
},
|
||||||
getConversationList(){
|
getConversationList(){
|
||||||
// console.log("getConversationListgetConversationListgetConversationList");
|
// console.log("getConversationListgetConversationListgetConversationList");
|
||||||
app.imInit().then(res => {
|
app.imInit().then(res => {
|
||||||
@ -294,6 +300,9 @@ Page({
|
|||||||
if(!cloudCustomData) return;
|
if(!cloudCustomData) return;
|
||||||
let cloudCustomDataJson;
|
let cloudCustomDataJson;
|
||||||
try {
|
try {
|
||||||
|
if(!cloudCustomData){
|
||||||
|
return
|
||||||
|
}
|
||||||
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// console.log(error);
|
// console.log(error);
|
||||||
@ -316,6 +325,9 @@ Page({
|
|||||||
if(!cloudCustomData) return;
|
if(!cloudCustomData) return;
|
||||||
let cloudCustomDataJson;
|
let cloudCustomDataJson;
|
||||||
try {
|
try {
|
||||||
|
if(!item.lastMessage.cloudCustomData){
|
||||||
|
return
|
||||||
|
}
|
||||||
cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData);
|
cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return;
|
return;
|
||||||
@ -394,7 +406,7 @@ Page({
|
|||||||
if(lastMessage.messageForShow == "[自定义消息]"){
|
if(lastMessage.messageForShow == "[自定义消息]"){
|
||||||
let text = "自定义消息";
|
let text = "自定义消息";
|
||||||
let payload = lastMessage.payload;
|
let payload = lastMessage.payload;
|
||||||
if(payload) {
|
if(payload && payload.data) {
|
||||||
// console.log("payload: ",payload.data);
|
// console.log("payload: ",payload.data);
|
||||||
let payloadJson = JSON.parse(payload.data);
|
let payloadJson = JSON.parse(payload.data);
|
||||||
text = payloadJson.title.replaceAll(/—/g, "");
|
text = payloadJson.title.replaceAll(/—/g, "");
|
||||||
|
|||||||
@ -13,7 +13,8 @@
|
|||||||
"van-tabs": "@vant/weapp/tabs/index",
|
"van-tabs": "@vant/weapp/tabs/index",
|
||||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||||
"van-divider": "@vant/weapp/divider/index",
|
"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,
|
"enablePullDownRefresh": true,
|
||||||
"onReachBottomDistance": 100
|
"onReachBottomDistance": 100
|
||||||
|
|||||||
@ -469,18 +469,18 @@ Page({
|
|||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log("开始订阅消息");
|
// console.log("开始订阅消息");
|
||||||
wx.requestSubscribeMessage({
|
// wx.requestSubscribeMessage({
|
||||||
tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
// tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
||||||
success (res) {
|
// success (res) {
|
||||||
console.log(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 from_account = e.currentTarget.dataset.from_account;
|
||||||
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||||
app.go(url);
|
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){
|
postDoctorInquiry(e){
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
import Toast from '@vant/weapp/toast/toast';
|
import Toast from '@vant/weapp/toast/toast';
|
||||||
|
import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
|
||||||
let api = new API()
|
let api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
@ -35,7 +36,8 @@ Page({
|
|||||||
"5",
|
"5",
|
||||||
"10"
|
"10"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
sub_visible: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(){
|
onLoad(){
|
||||||
@ -96,10 +98,19 @@ Page({
|
|||||||
console.log(response);
|
console.log(response);
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
if(detail){
|
if(detail){
|
||||||
wx.requestSubscribeMessage({
|
|
||||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
|
let tmplIds = ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc']
|
||||||
success (res) {
|
let sub_promise = requestSubscribeMessage(tmplIds)
|
||||||
console.log(res);//同意授权
|
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 });
|
this.setData({ "info.is_open": detail });
|
||||||
}).catch(errors => {console.error(errors);})
|
}).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(){
|
putDoctorInquiryConfig(){
|
||||||
//修改医生问诊配置
|
//修改医生问诊配置
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
"van-stepper": "@vant/weapp/stepper/index",
|
"van-stepper": "@vant/weapp/stepper/index",
|
||||||
"van-switch": "@vant/weapp/switch/index",
|
"van-switch": "@vant/weapp/switch/index",
|
||||||
"van-button": "@vant/weapp/button/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,4 +73,17 @@
|
|||||||
</t-picker>
|
</t-picker>
|
||||||
|
|
||||||
<van-toast id="van-toast" />
|
<van-toast id="van-toast" />
|
||||||
|
|
||||||
|
<t-dialog
|
||||||
|
visible="{{ sub_visible }}"
|
||||||
|
title="温馨提示"
|
||||||
|
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||||
|
>
|
||||||
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</t-dialog>
|
||||||
</view>
|
</view>
|
||||||
@ -122,3 +122,17 @@ page{
|
|||||||
.price{
|
.price{
|
||||||
color: red;
|
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;
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
import Toast from '@vant/weapp/toast/toast';
|
import Toast from '@vant/weapp/toast/toast';
|
||||||
|
import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
|
||||||
let api = new API()
|
let api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
@ -35,7 +36,8 @@ Page({
|
|||||||
"5",
|
"5",
|
||||||
"10"
|
"10"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
sub_visible: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow(){
|
onShow(){
|
||||||
@ -98,16 +100,39 @@ Page({
|
|||||||
console.log(response);
|
console.log(response);
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
if(detail){
|
if(detail){
|
||||||
wx.requestSubscribeMessage({
|
|
||||||
tmplIds: ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc'],
|
let tmplIds = ['G1RIs0RYqsTQ2CuPQWalIMyb6_deuEEbJfajfhGvNzc']
|
||||||
success (res) {
|
let sub_promise = requestSubscribeMessage(tmplIds)
|
||||||
console.log(res);//同意授权
|
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);})
|
}).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(){
|
putDoctorInquiryConfig(){
|
||||||
//修改医生问诊配置
|
//修改医生问诊配置
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||||
"van-stepper": "@vant/weapp/stepper/index",
|
"van-stepper": "@vant/weapp/stepper/index",
|
||||||
"van-button": "@vant/weapp/button/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -46,4 +46,17 @@
|
|||||||
</t-picker>
|
</t-picker>
|
||||||
|
|
||||||
<van-toast id="van-toast" />
|
<van-toast id="van-toast" />
|
||||||
|
|
||||||
|
<t-dialog
|
||||||
|
visible="{{ sub_visible }}"
|
||||||
|
title="温馨提示"
|
||||||
|
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||||
|
>
|
||||||
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</t-dialog>
|
||||||
</view>
|
</view>
|
||||||
@ -121,3 +121,17 @@ page{
|
|||||||
font-size: 32rpx !important;
|
font-size: 32rpx !important;
|
||||||
color: red !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;
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
import { FileUtil } from './../../../utils/fileutil'
|
import { FileUtil } from './../../../utils/fileutil'
|
||||||
|
import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
|
||||||
const api = new API()
|
const api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
@ -15,7 +16,8 @@ Page({
|
|||||||
btn_txt: "提交",
|
btn_txt: "提交",
|
||||||
multi_point_status: "",
|
multi_point_status: "",
|
||||||
btn_disabled: true,
|
btn_disabled: true,
|
||||||
sfz_show: false
|
sfz_show: false,
|
||||||
|
sub_visible: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(){
|
onLoad(){
|
||||||
@ -99,66 +101,88 @@ Page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
add(){
|
subcancelDialog(){
|
||||||
let _this = this;
|
this.setData({
|
||||||
wx.requestSubscribeMessage({
|
sub_visible: false
|
||||||
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) },
|
|
||||||
})
|
})
|
||||||
|
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) {
|
doUploadFile(event) {
|
||||||
console.log("index douploadFIle: ", event);
|
console.log("index douploadFIle: ", event);
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
"van-divider": "@vant/weapp/divider/index",
|
"van-divider": "@vant/weapp/divider/index",
|
||||||
"van-button": "@vant/weapp/button/index",
|
"van-button": "@vant/weapp/button/index",
|
||||||
"van-popup": "@vant/weapp/popup/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,4 +97,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
|
||||||
|
<t-dialog
|
||||||
|
visible="{{ sub_visible }}"
|
||||||
|
title="温馨提示"
|
||||||
|
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||||
|
>
|
||||||
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</t-dialog>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -55,3 +55,17 @@
|
|||||||
.zhiye_popup_img{
|
.zhiye_popup_img{
|
||||||
margin-top: 30rpx;
|
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;
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
import logger from '../../../../utils/logger';
|
import logger from '../../../../utils/logger';
|
||||||
import constant from '../../../../utils/constant';
|
import constant from '../../../../utils/constant';
|
||||||
import { API } from '../../../../../utils/network/api';
|
import { API } from '../../../../../utils/network/api';
|
||||||
|
import { requestSubscribeMessage } from '../../../../../utils/requestSubscribeUtil';
|
||||||
|
|
||||||
const api = new API()
|
const api = new API()
|
||||||
let app = getApp()
|
let app = getApp()
|
||||||
@ -79,7 +80,7 @@ Component({
|
|||||||
notShow: false,
|
notShow: false,
|
||||||
isShow: true,
|
isShow: true,
|
||||||
commonFunction: [
|
commonFunction: [
|
||||||
{ name: '查看完整病例', key: '10' },
|
{ name: '查看完整病历', key: '10' },
|
||||||
{ name: '在线开处方', key: '11' },
|
{ name: '在线开处方', key: '11' },
|
||||||
],
|
],
|
||||||
displayServiceEvaluation: false,
|
displayServiceEvaluation: false,
|
||||||
@ -95,6 +96,7 @@ Component({
|
|||||||
showChangYongYu: false,
|
showChangYongYu: false,
|
||||||
ChangYongYu: [],
|
ChangYongYu: [],
|
||||||
dialog_visible: false,
|
dialog_visible: false,
|
||||||
|
sub_visible: false,
|
||||||
dialog_message: "在线开处方需先进行多点执业认证",
|
dialog_message: "在线开处方需先进行多点执业认证",
|
||||||
message_rounds: 0,
|
message_rounds: 0,
|
||||||
networkstatus: "wifi"
|
networkstatus: "wifi"
|
||||||
@ -456,7 +458,7 @@ Component({
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleCommonFunctions(e) {
|
handleCommonFunctions(e) {
|
||||||
// console.log("handleCommonFunctions: ", e)
|
console.log("handleCommonFunctions: ", e)
|
||||||
switch (e.target.dataset.key) {
|
switch (e.target.dataset.key) {
|
||||||
case '0':
|
case '0':
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -478,26 +480,19 @@ Component({
|
|||||||
break;
|
break;
|
||||||
case '11'://在线开方
|
case '11'://在线开方
|
||||||
let _this = this;
|
let _this = this;
|
||||||
// console.log("开始订阅消息");
|
console.log("开始订阅消息");
|
||||||
wx.requestSubscribeMessage({
|
let tmplIds = ['kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40']
|
||||||
tmplIds: ['kUy70xHlr7ADo4aIHiictM4Te7MSec3E5kHsYvFQu40'],
|
let sub_promise = requestSubscribeMessage(tmplIds)
|
||||||
success (res) {
|
sub_promise.then(res => {
|
||||||
// console.log(res);
|
console.log("订阅成功")
|
||||||
let order_inquiry_id = _this.data.order_inquiry_id
|
this.goCase()
|
||||||
api.getDoctorPrescriptionCheck({order_inquiry_id: order_inquiry_id}).then(response => {
|
}).catch(err => {
|
||||||
let status = response.data.status
|
console.log(err)
|
||||||
if(status == 1){
|
let errCode = err.errCode
|
||||||
app.go("/Pages/yishi/onlinechufang/index?order_inquiry_id="+order_inquiry_id)
|
if(errCode == 20004){
|
||||||
}else{
|
_this.setData({
|
||||||
_this.setData({
|
sub_visible: true,
|
||||||
dialog_visible: true,
|
|
||||||
dialog_message: response.data.message
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}).catch(errors => {
|
|
||||||
console.error(errors);
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
@ -505,6 +500,23 @@ Component({
|
|||||||
break;
|
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(){
|
cancelDialog(){
|
||||||
this.setData({
|
this.setData({
|
||||||
dialog_visible: false
|
dialog_visible: false
|
||||||
@ -516,6 +528,22 @@ Component({
|
|||||||
dialog_visible: false
|
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() {
|
handleSendOrder() {
|
||||||
this.setData({
|
this.setData({
|
||||||
displayOrderList: true,
|
displayOrderList: true,
|
||||||
@ -849,7 +877,11 @@ Component({
|
|||||||
event,
|
event,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
inputBindLinechange(event){
|
||||||
|
this.triggerEvent('inputBindLinechange', {
|
||||||
|
event,
|
||||||
|
});
|
||||||
|
},
|
||||||
$handleSendTextMessage(event) {
|
$handleSendTextMessage(event) {
|
||||||
this.sendTextMessage(event.detail.message, true);
|
this.sendTextMessage(event.detail.message, true);
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@ -1,18 +1,20 @@
|
|||||||
<view class="TUI-message-input-container">
|
<view class="TUI-message-input-container">
|
||||||
<view class="TUI-commom-function">
|
<view class="TUI-commom-function">
|
||||||
<view class="TUI-commom-function-item" data-key="10" bindtap="handleCommonFunctions">查看完整病例</view>
|
<view class="TUI-commom-function-item" data-key="10" bindtap="handleCommonFunctions">查看完整病历</view>
|
||||||
<view class="TUI-commom-function-item" data-key="11" bindtap="handleCommonFunctions" wx:if="{{baseInfo.multi_point_status == 1}}">在线开处方</view>
|
<view class="TUI-commom-function-item" data-key="11" bindtap="handleCommonFunctions" wx:if="{{baseInfo.multi_point_status == 1}}">在线开处方</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="TUI-message-input">
|
<view class="TUI-message-input">
|
||||||
<image class="TUI-icon" bindtap="switchAudio" wx:if="{{has_audio}}"
|
<image class="TUI-icon" bindtap="switchAudio" wx:if="{{has_audio}}"
|
||||||
src="{{isAudio ? '../../../../static/assets/keyboard.svg' : '../../../../static/assets/audio.svg'}}" />
|
src="{{isAudio ? '../../../../static/assets/keyboard.svg' : '../../../../static/assets/audio.svg'}}" />
|
||||||
<view wx:if="{{!isAudio || isEmoji}}" class="TUI-message-input-main {{ focus && 'TUI-message-input-main-focus'}}" >
|
<view wx:if="{{!isAudio || isEmoji}}" class="TUI-message-input-main {{ focus && 'TUI-message-input-main-focus'}}" >
|
||||||
<textarea hold-keyboard id="mytextarea" class="TUI-message-input-area" adjust-position="{{false}}" cursor-spacing="0"
|
<textarea focus="{{false}}" hold-keyboard id="mytextarea" class="TUI-message-input-area" adjust-position="{{false}}" cursor-spacing="0"
|
||||||
value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}"
|
value="{{message}}" bindinput="onInputValueChange" maxlength="-1" type="text" auto-height="{{true}}"
|
||||||
placeholder="请输入文字" placeholder-class="input-placeholder" confirm-type="return" show-confirm-bar="{{false}}"
|
placeholder="请输入文字" placeholder-class="input-placeholder" confirm-type="return" show-confirm-bar="{{false}}"
|
||||||
bindfocus="inputBindFocus"
|
bindfocus="inputBindFocus"
|
||||||
bindblur="inputBindBlur"
|
bindblur="inputBindBlur"
|
||||||
bindconfirm="sendTextMessage"/>
|
bindconfirm="sendTextMessage"
|
||||||
|
bindlinechange="inputBindLinechange"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{isAudio}}" class="TUI-message-input-main"
|
<view wx:if="{{isAudio}}" class="TUI-message-input-main"
|
||||||
bind:longpress="handleLongPress"
|
bind:longpress="handleLongPress"
|
||||||
@ -114,3 +116,16 @@
|
|||||||
确定
|
确定
|
||||||
</view>
|
</view>
|
||||||
</t-dialog>
|
</t-dialog>
|
||||||
|
|
||||||
|
<t-dialog
|
||||||
|
visible="{{ sub_visible }}"
|
||||||
|
title="温馨提示"
|
||||||
|
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||||
|
>
|
||||||
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||||
|
取消
|
||||||
|
</view>
|
||||||
|
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</t-dialog>
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
.TUI-message-input-area {
|
.TUI-message-input-area {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: 300rpx;
|
max-height: 100px;
|
||||||
/* 最多显示10行 */
|
/* 最多显示10行 */
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
|||||||
@ -162,6 +162,7 @@ Component({
|
|||||||
this.setData({
|
this.setData({
|
||||||
isCompleted: true,
|
isCompleted: true,
|
||||||
triggered: false,
|
triggered: false,
|
||||||
|
list_first_loading: false
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -293,8 +294,10 @@ Component({
|
|||||||
if(Number(customMessage.message_type) == GDXZ_CUSTOM_MSEEAGE.TRABECULA && refreshBaseInfo){
|
if(Number(customMessage.message_type) == GDXZ_CUSTOM_MSEEAGE.TRABECULA && refreshBaseInfo){
|
||||||
const title = customMessage.title
|
const title = customMessage.title
|
||||||
if(title.indexOf("问诊已结束") > -1){
|
if(title.indexOf("问诊已结束") > -1){
|
||||||
//收到横条消息去触发父组件getbase方法
|
setTimeout(() => {
|
||||||
this.triggerEvent('getInquiryMessageBasic');
|
//收到横条消息去触发父组件getbase方法,演示1秒
|
||||||
|
this.triggerEvent('getInquiryMessageBasic');
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
import logger from '../../utils/logger';
|
import logger from '../../utils/logger';
|
||||||
import constant from '../../utils/constant';
|
import constant from '../../utils/constant';
|
||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
|
import { rpxTopx } from './../../../utils/util'
|
||||||
const api = new API()
|
const api = new API()
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
@ -79,14 +80,19 @@ Component({
|
|||||||
message_rounds: 0
|
message_rounds: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//console.log("000")
|
||||||
this.getNavbarHeight()
|
this.getNavbarHeight()
|
||||||
wx.onKeyboardHeightChange(res => {
|
|
||||||
// console.log("键盘高度:", res.height)
|
// let _this = this
|
||||||
this.setData({
|
// wx.onKeyboardHeightChange(res => {
|
||||||
keysboards_height: res.height
|
// let kb_height = res.height
|
||||||
})
|
// console.log("键盘高度:", kb_height)
|
||||||
this.getNavbarHeight();
|
// _this.setData({
|
||||||
})
|
// kb_height: kb_height
|
||||||
|
// })
|
||||||
|
// console.log("111")
|
||||||
|
// _this.getNavbarHeight();
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
|
|
||||||
ready() {
|
ready() {
|
||||||
@ -103,6 +109,12 @@ Component({
|
|||||||
"navbarData.showCapsule": 3
|
"navbarData.showCapsule": 3
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this.setData({
|
||||||
|
finsh_btn: false
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -137,11 +149,14 @@ Component({
|
|||||||
showCapsule: 2, //是否显示左上角图标 1表示显示 0表示不显示
|
showCapsule: 2, //是否显示左上角图标 1表示显示 0表示不显示
|
||||||
title: '', //导航栏 中间的标题
|
title: '', //导航栏 中间的标题
|
||||||
},
|
},
|
||||||
navbar_height: 0,
|
navbar_height: 120,
|
||||||
dialog_visible: false,
|
dialog_visible: false,
|
||||||
|
finsh_btn: false,
|
||||||
KeysBoardsStatus: "down",
|
KeysBoardsStatus: "down",
|
||||||
message_rounds: 0,
|
message_rounds: 0,
|
||||||
keysboards_height: 0
|
keysboards_height: 0,
|
||||||
|
kb_height: 0,
|
||||||
|
change_kb: false
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -157,6 +172,9 @@ Component({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getNavbarHeight(addHeight){
|
getNavbarHeight(addHeight){
|
||||||
|
|
||||||
|
try {
|
||||||
|
//console.log("getNavbarHeight: ", new Date().getTime())
|
||||||
let rect = null;
|
let rect = null;
|
||||||
if (wx.getMenuButtonBoundingClientRect) {
|
if (wx.getMenuButtonBoundingClientRect) {
|
||||||
rect = wx.getMenuButtonBoundingClientRect();
|
rect = wx.getMenuButtonBoundingClientRect();
|
||||||
@ -164,32 +182,55 @@ Component({
|
|||||||
// console.log("rect: ", rect)
|
// console.log("rect: ", rect)
|
||||||
wx.getSystemInfo({
|
wx.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
const { statusBarHeight } = wx.getSystemInfoSync();
|
// const { statusBarHeight } = wx.getSystemInfoSync();
|
||||||
// console.log("statusBarHeight: ", statusBarHeight);
|
// console.log("statusBarHeight: ", statusBarHeight);
|
||||||
// console.log("${rect.height}px: ", `${rect.height}`);
|
// console.log("${rect.height}px: ", `${rect.height}`);
|
||||||
let height = Number.parseInt(statusBarHeight) + Number.parseInt(`${rect.height}`) + 50;
|
let height = Number.parseInt(res.statusBarHeight) + Number.parseInt(`${rect.height}`);
|
||||||
if(addHeight){
|
|
||||||
|
let KeysBoardsStatus = this.data.KeysBoardsStatus
|
||||||
|
if(KeysBoardsStatus == 'pull'){
|
||||||
|
height = height + rpxTopx(35)
|
||||||
|
}else{
|
||||||
|
height = height + rpxTopx(70)
|
||||||
|
}
|
||||||
|
if(addHeight > 0){
|
||||||
height = height + addHeight
|
height = height + addHeight
|
||||||
}
|
}
|
||||||
let keysboards_height = this.data.keysboards_height
|
let kb_height = Number.parseInt(this.data.kb_height)
|
||||||
// console.log("getNavbarHeight 键盘高度:", keysboards_height)
|
let textarea_height = Number.parseInt(this.data.textarea_height)
|
||||||
if(keysboards_height){
|
//console.log("getNavbarHeight 键盘高度:", kb_height)
|
||||||
height = height + keysboards_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({
|
this.setData({
|
||||||
navbar_height: height
|
navbar_height: height
|
||||||
})
|
})
|
||||||
|
//console.log(444)
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('navbar 获取系统信息失败', err);
|
console.error('navbar 获取系统信息失败', err);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//结束问诊
|
//结束问诊
|
||||||
putDoctorInquiryFinish() {
|
putDoctorInquiryFinish() {
|
||||||
this.setData({
|
this.setData({
|
||||||
dialog_visible: true
|
dialog_visible: true
|
||||||
})
|
})
|
||||||
|
wx.hideKeyboard()
|
||||||
},
|
},
|
||||||
cancelDialog(){
|
cancelDialog(){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -197,12 +238,25 @@ Component({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirmDialog(){
|
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 => {
|
api.putDoctorInquiryFinish({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
this.getInquiryMessageBasic();
|
// this.getInquiryMessageBasic();
|
||||||
//调用子组件中的跳到最新消息
|
//调用子组件中的跳到最新消息
|
||||||
|
this.getNavbarHeight()
|
||||||
this.selectComponent('#MessageList').handleJumpNewMessage();
|
this.selectComponent('#MessageList').handleJumpNewMessage();
|
||||||
}).catch(errors => {console.error(errors);})
|
}).catch(errors => {
|
||||||
|
console.error(errors);
|
||||||
|
this.setData({
|
||||||
|
finsh_btn: false
|
||||||
|
})
|
||||||
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
dialog_visible: false
|
dialog_visible: false
|
||||||
})
|
})
|
||||||
@ -215,6 +269,10 @@ Component({
|
|||||||
this.setData({
|
this.setData({
|
||||||
baseInfo: response.data,
|
baseInfo: response.data,
|
||||||
})
|
})
|
||||||
|
if(response.data.inquiry_status > 4){
|
||||||
|
wx.hideKeyboard()
|
||||||
|
this.getNavbarHeight()
|
||||||
|
}
|
||||||
}).catch(errors => {console.error(errors);})
|
}).catch(errors => {console.error(errors);})
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
@ -261,14 +319,14 @@ Component({
|
|||||||
this.getNavbarHeight();
|
this.getNavbarHeight();
|
||||||
},
|
},
|
||||||
refreshMessageStatus(message) {
|
refreshMessageStatus(message) {
|
||||||
console.log("TUIchat refreshMessageStatus", message)
|
//console.log("TUIchat refreshMessageStatus", message)
|
||||||
this.selectComponent('#MessageList').refreshMessageStatus(message);
|
this.selectComponent('#MessageList').refreshMessageStatus(message);
|
||||||
},
|
},
|
||||||
showMessageErrorImage(event) {
|
showMessageErrorImage(event) {
|
||||||
this.selectComponent('#MessageList').sendMessageError(event);
|
this.selectComponent('#MessageList').sendMessageError(event);
|
||||||
},
|
},
|
||||||
triggerClose() {
|
triggerClose() {
|
||||||
// console.log("message-list triggerClose")
|
//console.log("message-list triggerClose")
|
||||||
if(this.data.baseInfo.inquiry_status == 4){
|
if(this.data.baseInfo.inquiry_status == 4){
|
||||||
this.selectComponent('#MessageInput').handleClose();
|
this.selectComponent('#MessageInput').handleClose();
|
||||||
}
|
}
|
||||||
@ -305,13 +363,13 @@ Component({
|
|||||||
this.selectComponent('#MessageInput').onInputValueChange(event);
|
this.selectComponent('#MessageInput').onInputValueChange(event);
|
||||||
},
|
},
|
||||||
myhandleExtensions(e){
|
myhandleExtensions(e){
|
||||||
// console.log("myhandleExtensionsmyhandleExtensions: ", e);
|
//console.log("myhandleExtensionsmyhandleExtensions: ", e);
|
||||||
wx.hideKeyboard()
|
wx.hideKeyboard()
|
||||||
let displayFlag = e.detail.displayFlag;
|
let displayFlag = e.detail.displayFlag;
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
if(displayFlag){
|
if(displayFlag){
|
||||||
this.setData({
|
this.setData({
|
||||||
input_area_style: "position: absolute; bottom: 30px;"
|
input_area_style: "position: absolute; bottom: 20px;"
|
||||||
})
|
})
|
||||||
this.getNavbarHeight(100);
|
this.getNavbarHeight(100);
|
||||||
this.selectComponent('#MessageList').handleJumpNewMessage();
|
this.selectComponent('#MessageList').handleJumpNewMessage();
|
||||||
@ -321,39 +379,66 @@ Component({
|
|||||||
})
|
})
|
||||||
this.getNavbarHeight();
|
this.getNavbarHeight();
|
||||||
}
|
}
|
||||||
}, 100);
|
// }, 100);
|
||||||
},
|
},
|
||||||
// 监听键盘,获取焦点时将输入框推到键盘上方
|
// 监听键盘,获取焦点时将输入框推到键盘上方
|
||||||
pullKeysBoards(event) {
|
pullKeysBoards(event) {
|
||||||
// console.log("pullKeysBoardspullKeysBoards")
|
//console.log("pullKeysBoardspullKeysBoards")
|
||||||
setNewInputStyle(event.detail.event.detail.height);
|
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({
|
this.setData({
|
||||||
'viewData.style': newInputStyle,
|
'viewData.style': newInputStyle,
|
||||||
input_area_style: "position: absolute; bottom: 52rpx;",
|
// input_area_style: "position: absolute; bottom: 52rpx;",
|
||||||
KeysBoardsStatus: "pull"
|
KeysBoardsStatus: "pull"
|
||||||
});
|
});
|
||||||
|
this.getNavbarHeight();
|
||||||
this.selectComponent('#MessageList').handleJumpNewMessage();
|
this.selectComponent('#MessageList').handleJumpNewMessage();
|
||||||
|
|
||||||
},
|
},
|
||||||
// 监听键盘,失去焦点时收起键盘
|
// 监听键盘,失去焦点时收起键盘
|
||||||
downKeysBoards(event) {
|
downKeysBoards(event) {
|
||||||
// console.log("downKeysBoardsdownKeysBoards")
|
//console.log("downKeysBoardsdownKeysBoards")
|
||||||
// console.log(event)
|
// //console.log(event)
|
||||||
let value = event.detail.event.detail.value;
|
let value = event.detail.event.detail.value;
|
||||||
this.getNavbarHeight();
|
//console.log("downKeysBoards value: ", value)
|
||||||
if(value){
|
if(value){
|
||||||
this.setData({
|
this.setData({
|
||||||
'viewData.style': inputStyle,
|
'viewData.style': inputStyle,
|
||||||
KeysBoardsStatus: "down"
|
KeysBoardsStatus: "down",
|
||||||
|
kb_height: 0
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
this.setData({
|
this.setData({
|
||||||
'viewData.style': inputStyle,
|
'viewData.style': inputStyle,
|
||||||
input_area_style: "",
|
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) {
|
typing(event) {
|
||||||
const { STRING_TEXT, FEAT_NATIVE_CODE } = constant;
|
const { STRING_TEXT, FEAT_NATIVE_CODE } = constant;
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
<!--TUIKit-WChat/Chat/index.wxml-->
|
<!--TUIKit-WChat/Chat/index.wxml-->
|
||||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="info" wx:if="{{ true }}">
|
<view class="info" wx:if="{{ baseInfo.inquiry_status > 0 }}">
|
||||||
<view class="left">
|
<view class="left" >
|
||||||
<view class="name">{{baseInfo.patient_family_name}}</view>
|
<view class="name">{{baseInfo.patient_family_name}}</view>
|
||||||
<view class="age">{{baseInfo.patient_family_sex==1?'男':'女'}}|{{baseInfo.patient_family_age}}岁</view>
|
<view class="age">{{baseInfo.patient_family_sex==1?'男':'女'}}|{{baseInfo.patient_family_age}}岁</view>
|
||||||
<view class="status {{baseInfo.inquiry_status==5?'status_complete':''}}">{{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?'已取消':'未知'}}</view>
|
<view class="status {{baseInfo.inquiry_status==5?'status_complete':''}}">{{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?'已取消':'未知'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<text class="right_txt" bindtap="putDoctorInquiryFinish" wx:if="{{baseInfo.inquiry_status==4}}">结束问诊</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
|
||||||
<text class="right_txt" bindtap="putDoctorInquiryFinish" wx:if="{{baseInfo.inquiry_status==4}}">结束问诊</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- <view class="tui-navigatorbar">
|
<!-- <view class="tui-navigatorbar">
|
||||||
<image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_black.svg" />
|
<image class="tui-navigatorbar-back" bindtap="goBack" src="../../static/assets/ic_back_black.svg" />
|
||||||
@ -37,6 +37,7 @@
|
|||||||
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
|
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
|
||||||
<MessageInput bind:myhandleExtensions="myhandleExtensions" id="MessageInput" inquiry_type="{{inquiry_type}}" baseInfo="{{baseInfo}}" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
|
<MessageInput bind:myhandleExtensions="myhandleExtensions" id="MessageInput" inquiry_type="{{inquiry_type}}" baseInfo="{{baseInfo}}" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
|
||||||
bind:refreshMessageStatus="refreshMessageStatus"
|
bind:refreshMessageStatus="refreshMessageStatus"
|
||||||
|
bind:inputBindLinechange="inputBindLinechange"
|
||||||
bind:handleCall="handleCall" message_rounds="{{message_rounds}}"></MessageInput>
|
bind:handleCall="handleCall" message_rounds="{{message_rounds}}"></MessageInput>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
10
app.js
10
app.js
@ -1,6 +1,5 @@
|
|||||||
import Aegis from './TUIKit/lib/aegis';
|
import Aegis from './TUIKit/lib/aegis';
|
||||||
import TIM from './TUIKit/lib/tim-wx-sdk';
|
import TIM from './TUIKit/lib/tim-wx-sdk';
|
||||||
import { genTestUserSig } from './TUIKit/debug/GenerateTestUserSig';
|
|
||||||
import TIMUploadPlugin from './TUIKit/lib/tim-upload-plugin';
|
import TIMUploadPlugin from './TUIKit/lib/tim-upload-plugin';
|
||||||
import { API } from './utils/network/api'
|
import { API } from './utils/network/api'
|
||||||
import constant from './TUIKit/utils/constant';
|
import constant from './TUIKit/utils/constant';
|
||||||
@ -69,7 +68,7 @@ App({
|
|||||||
// this.imInit();
|
// this.imInit();
|
||||||
},
|
},
|
||||||
imInit(){
|
imInit(){
|
||||||
|
console.log("imInit")
|
||||||
let usertype = wx.getStorageSync('usertype');
|
let usertype = wx.getStorageSync('usertype');
|
||||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||||
if(usertype != 2){//只登录医师端
|
if(usertype != 2){//只登录医师端
|
||||||
@ -80,7 +79,7 @@ App({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.globalData.config.userID = userID;
|
this.globalData.config.userID = userID;
|
||||||
let sign = genTestUserSig(this.globalData.config);
|
// let sign = genTestUserSig(this.globalData.config);
|
||||||
// console.log("sign: ", sign);
|
// console.log("sign: ", sign);
|
||||||
// const userSig = sign.userSig;
|
// const userSig = sign.userSig;
|
||||||
|
|
||||||
@ -194,6 +193,11 @@ App({
|
|||||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||||
wx.setStorageSync('user_id_'+usertype, "");
|
wx.setStorageSync('user_id_'+usertype, "");
|
||||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||||
|
if(wx.$TUIKit){
|
||||||
|
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onSystemPushReceived);
|
||||||
|
wx.$TUIKit = undefined
|
||||||
|
}
|
||||||
|
this.globalData.chat_sdk_ready = false
|
||||||
this.go("/Pages/kickedout/index");
|
this.go("/Pages/kickedout/index");
|
||||||
},
|
},
|
||||||
$onSystemPushReceived(e){
|
$onSystemPushReceived(e){
|
||||||
|
|||||||
3
app.json
3
app.json
@ -56,7 +56,8 @@
|
|||||||
"Pages/yishi/onlinesetupprice/index",
|
"Pages/yishi/onlinesetupprice/index",
|
||||||
"Pages/yishi/yizhensetupprice/index",
|
"Pages/yishi/yizhensetupprice/index",
|
||||||
"Pages/yishi/wenzhenorderV2/index",
|
"Pages/yishi/wenzhenorderV2/index",
|
||||||
"Pages/yishi/wenzhen_v3/wenzhen"
|
"Pages/yishi/wenzhen_v3/wenzhen",
|
||||||
|
"Pages/agreement_page/index"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"navigationBarBackgroundColor": "#ffffff",
|
"navigationBarBackgroundColor": "#ffffff",
|
||||||
|
|||||||
@ -238,12 +238,14 @@ Component({
|
|||||||
return item.value == _this.data.select_keshi_id
|
return item.value == _this.data.select_keshi_id
|
||||||
})
|
})
|
||||||
console.log("科室:", index)
|
console.log("科室:", index)
|
||||||
let keshi_note = _this.data.keshi_columns[index].text;
|
if(index == -1){
|
||||||
console.log("科室 keshi_note:", keshi_note);
|
clearInterval(data_replay);
|
||||||
if(index != undefined){
|
return
|
||||||
|
}
|
||||||
|
if(index > -1){
|
||||||
_this.setData({
|
_this.setData({
|
||||||
select_keshi_index: index,
|
select_keshi_index: index,
|
||||||
keshi_note: keshi_note
|
keshi_note: _this.data.keshi_columns[index].text
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
keshi_huixian = true;
|
keshi_huixian = true;
|
||||||
@ -254,6 +256,10 @@ Component({
|
|||||||
let index = _this.data.zhicheng_columns.findIndex(item => {
|
let index = _this.data.zhicheng_columns.findIndex(item => {
|
||||||
return item.value == _this.data.select_zhicheng_id
|
return item.value == _this.data.select_zhicheng_id
|
||||||
})
|
})
|
||||||
|
if(index == -1){
|
||||||
|
clearInterval(data_replay);
|
||||||
|
return
|
||||||
|
}
|
||||||
if(index > -1){
|
if(index > -1){
|
||||||
_this.setData({
|
_this.setData({
|
||||||
select_zhicheng_index: index,
|
select_zhicheng_index: index,
|
||||||
@ -299,6 +305,7 @@ Component({
|
|||||||
}
|
}
|
||||||
api.getBasicHospital(params).then(response => {// 请求医院列表
|
api.getBasicHospital(params).then(response => {// 请求医院列表
|
||||||
_this.setData({
|
_this.setData({
|
||||||
|
hospital_search_val: "",
|
||||||
yiyuan_columns: _this.formatYiYuan(response),
|
yiyuan_columns: _this.formatYiYuan(response),
|
||||||
city_note: _this.data.hospital.province + "/" + _this.data.hospital.city + "/" + _this.data.hospital.county
|
city_note: _this.data.hospital.province + "/" + _this.data.hospital.city + "/" + _this.data.hospital.county
|
||||||
})
|
})
|
||||||
@ -423,6 +430,7 @@ Component({
|
|||||||
}
|
}
|
||||||
api.getBasicHospital(params).then(response => {// 请求医院列表】
|
api.getBasicHospital(params).then(response => {// 请求医院列表】
|
||||||
this.setData({
|
this.setData({
|
||||||
|
hospital_search_val: "",
|
||||||
yiyuan_columns: this.formatYiYuan(response),
|
yiyuan_columns: this.formatYiYuan(response),
|
||||||
city_show: false,
|
city_show: false,
|
||||||
city_note: this.getCityNote(selectedOptions),
|
city_note: this.getCityNote(selectedOptions),
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
import _console from "../TUIKit/utils/console"
|
|
||||||
|
|
||||||
// custom-tab-bar/index.js
|
// custom-tab-bar/index.js
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Component({
|
Component({
|
||||||
@ -62,17 +60,16 @@ Component({
|
|||||||
info_inter: 0
|
info_inter: 0
|
||||||
},
|
},
|
||||||
ready() {
|
ready() {
|
||||||
console.log("readyreadyreadyreadyreadyready")
|
|
||||||
const usertype = wx.getStorageSync('usertype')
|
const usertype = wx.getStorageSync('usertype')
|
||||||
if (usertype == 2) {
|
if (usertype == 3) {
|
||||||
this.setData({
|
this.setData({
|
||||||
usertype: usertype,
|
usertype: usertype,
|
||||||
items: this.data.listAll.list2
|
items: this.data.listAll.list1
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.setData({
|
this.setData({
|
||||||
usertype: usertype,
|
usertype: usertype,
|
||||||
items: this.data.listAll.list1
|
items: this.data.listAll.list2
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,5 +18,5 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"libVersion": "2.30.2"
|
"libVersion": "2.31.0"
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ class HTTP {
|
|||||||
'Authorization': "Bearer " + wx.getStorageSync('AUTH_TOKEN_'+usertype)
|
'Authorization': "Bearer " + wx.getStorageSync('AUTH_TOKEN_'+usertype)
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log("header Authorization: ", res.header.Authorization);
|
// console.log("header Authorization: ", res.header.Authorization);
|
||||||
var Authorization_token = res.header.Authorization;
|
var Authorization_token = res.header.Authorization;
|
||||||
if(Authorization_token){
|
if(Authorization_token){
|
||||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, Authorization_token);//当token快过期时,服务器会返回新token,本地刷新
|
wx.setStorageSync('AUTH_TOKEN_'+usertype, Authorization_token);//当token快过期时,服务器会返回新token,本地刷新
|
||||||
@ -58,7 +58,7 @@ class HTTP {
|
|||||||
this._show_error(showLoading, err.data.message)
|
this._show_error(showLoading, err.data.message)
|
||||||
},
|
},
|
||||||
complete: (res) => {
|
complete: (res) => {
|
||||||
console.log("res from cmplete: ",res)
|
// console.log("res from cmplete: ",res)
|
||||||
const code = res.data.code;
|
const code = res.data.code;
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
if(showLoading) wx.hideLoading();
|
if(showLoading) wx.hideLoading();
|
||||||
|
|||||||
68
utils/requestSubscribeUtil.js
Normal file
68
utils/requestSubscribeUtil.js
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
function requestSubscribeMessage(tmplIds){
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
wx.requestSubscribeMessage({
|
||||||
|
tmplIds: tmplIds,
|
||||||
|
success (res) {
|
||||||
|
console.log("succ:", res)
|
||||||
|
resolve(res)
|
||||||
|
},
|
||||||
|
fail(err){
|
||||||
|
console.log("error:", err)
|
||||||
|
let code = err.errCode
|
||||||
|
let title = "未知错误";
|
||||||
|
switch (code) {
|
||||||
|
case 10001:
|
||||||
|
title = "参数传空了"
|
||||||
|
break;
|
||||||
|
case 10002:
|
||||||
|
title = "请检查您的网络"
|
||||||
|
break;
|
||||||
|
case 10003:
|
||||||
|
title = "请检查您的网络"
|
||||||
|
break;
|
||||||
|
case 10004:
|
||||||
|
title = "参数类型错误"
|
||||||
|
break;
|
||||||
|
case 10005:
|
||||||
|
title = "无法展示 UI"
|
||||||
|
break;
|
||||||
|
case 20001:
|
||||||
|
title = "没有模板数据"
|
||||||
|
break;
|
||||||
|
case 20002:
|
||||||
|
title = "模板消息类型错误"
|
||||||
|
break;
|
||||||
|
case 20003:
|
||||||
|
title = "模板消息数量超过上限"
|
||||||
|
break;
|
||||||
|
case 20004:
|
||||||
|
title = "用户关闭了主开关,无法进行订阅"
|
||||||
|
break;
|
||||||
|
case 20005:
|
||||||
|
title = "小程序被禁封"
|
||||||
|
break;
|
||||||
|
case 20013:
|
||||||
|
title = "不允许通过该接口订阅设备消息"
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// wx.showToast({
|
||||||
|
// title: title,
|
||||||
|
// icon: 'error'
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
requestSubscribeMessage
|
||||||
|
}
|
||||||
@ -148,11 +148,16 @@ const likeWeChatTimeAgoChat = stringTime =>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// px 转换为 rpx ,传参类型是数字(Number)
|
// px 转换为 rpx ,传参类型是数字(Number)
|
||||||
const rpxTopx = px => {
|
const pxTorpx = px => {
|
||||||
let deviceWidth = wx.getSystemInfoSync().windowWidth; //获取设备屏幕宽度
|
let deviceWidth = wx.getSystemInfoSync().windowWidth; //获取设备屏幕宽度
|
||||||
let rpx = (750 / deviceWidth) * Number(px)
|
let rpx = (750 / deviceWidth) * Number(px)
|
||||||
return Math.floor(rpx);
|
return Math.floor(rpx);
|
||||||
}
|
}
|
||||||
|
// px 转换为 rpx ,传参类型是数字(Number)
|
||||||
|
const rpxTopx = rpx => {
|
||||||
|
let px = rpx / 750 * wx.getSystemInfoSync().windowWidth;
|
||||||
|
return Math.floor(px);
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
formatTime,
|
formatTime,
|
||||||
@ -160,6 +165,7 @@ module.exports = {
|
|||||||
formatNumber,
|
formatNumber,
|
||||||
getTimeAgo,
|
getTimeAgo,
|
||||||
rpxTopx,
|
rpxTopx,
|
||||||
|
pxTorpx,
|
||||||
getTimeAgoChat,
|
getTimeAgoChat,
|
||||||
likeWeChatTimeAgoChat
|
likeWeChatTimeAgoChat
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user