优化页面
This commit is contained in:
+238
-163
@@ -25,8 +25,6 @@ Page({
|
||||
shiming_status_url: "",
|
||||
iden_auth_status_url: "/Pages/yishi/identity/index",
|
||||
multi_point_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
current: 0,
|
||||
autoplay: true,
|
||||
duration: 500,
|
||||
interval: 5000,
|
||||
swiperList: [
|
||||
@@ -34,6 +32,8 @@ Page({
|
||||
`https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/ad2.jpg`,
|
||||
`https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/yishi/ad3.jpg`,
|
||||
],
|
||||
banner: [],
|
||||
default_dialog_show: false,//只弹框一次
|
||||
dialog_visible: false,
|
||||
dialog_content: "请您先实名认证",
|
||||
/*
|
||||
@@ -114,7 +114,15 @@ Page({
|
||||
onLoad(){
|
||||
|
||||
},
|
||||
|
||||
onUnload(){
|
||||
console.log("index onUnload() onUnload() ");
|
||||
},
|
||||
onHide(){
|
||||
console.log("index onHide() onHide() ");
|
||||
this.setData({
|
||||
swiperList: []
|
||||
})
|
||||
},
|
||||
onShow: function () {
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
@@ -182,7 +190,8 @@ Page({
|
||||
if(reject_prescription_number){
|
||||
this.setData({"info.reject_prescription_number": reject_prescription_number});
|
||||
}
|
||||
|
||||
//格式化广告轮播
|
||||
this.formatAD(response.data.banner);
|
||||
this.checkStatus();
|
||||
|
||||
this.setData({
|
||||
@@ -192,12 +201,232 @@ Page({
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
|
||||
onADChange(){
|
||||
// console.log("onADChange");
|
||||
formatAD(banner){
|
||||
let swiperList = [];
|
||||
banner.forEach(item => {
|
||||
swiperList.push(item.banner_path);
|
||||
})
|
||||
this.setData({
|
||||
banner: banner,
|
||||
swiperList: swiperList
|
||||
})
|
||||
},
|
||||
onTapAD(e) {
|
||||
const { index } = e.detail;
|
||||
console.log(index);
|
||||
let item = this.data.banner[index];
|
||||
console.log(item);
|
||||
let open_with = item.open_with;
|
||||
let banner_link = item.banner_link;
|
||||
if(open_with == 1){//小程序页面
|
||||
app.go(banner_link);
|
||||
}else if(open_with == 2){//webview 页面
|
||||
app.go("/Pages/webpage/index?src="+banner_link);
|
||||
}
|
||||
},
|
||||
onChangeAD(e) {
|
||||
// const { current, source } = e.detail;
|
||||
// console.log(current, source);
|
||||
},
|
||||
|
||||
go(e){
|
||||
let checkDialog = this.checkDialog(e);
|
||||
if(checkDialog){
|
||||
let url = e.currentTarget.dataset.url;
|
||||
console.log(url);
|
||||
if(url.indexOf("wenzhen") > -1){
|
||||
wx.switchTab({
|
||||
url: url,
|
||||
})
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
confirmDialog(){
|
||||
this.setData({
|
||||
dialog_visible: false
|
||||
})
|
||||
app.go(this.data.shiming_status_url);
|
||||
},
|
||||
cancelDialog(){
|
||||
this.setData({
|
||||
dialog_visible: false
|
||||
})
|
||||
},
|
||||
checkStatus(){
|
||||
//实名认证
|
||||
let idcard_status = this.data.info.idcard_status;
|
||||
//医师身份认证
|
||||
let iden_auth_status = this.data.info.iden_auth_status;
|
||||
//多点执业认证
|
||||
let multi_point_status = this.data.info.multi_point_status;
|
||||
|
||||
wx.setStorageSync('idcard_status', idcard_status);
|
||||
wx.setStorageSync('iden_auth_status', iden_auth_status);
|
||||
|
||||
if(idcard_status == 0){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
dialog_content: "请您先实名认证",
|
||||
dialog_visible: true,
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if(idcard_status == 2){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "认证失败",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_content: "实名认证失败",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;;
|
||||
}
|
||||
|
||||
if(iden_auth_status == 0){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "前往医师身份认证",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_content: "请您前往医师身份认证",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if(iden_auth_status == 2){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "审核中",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_content: "您的医师身份认证正在审核中",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if(iden_auth_status == 3){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "认证失败",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
dialog_content: "您的医师身份认证失败",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//多点执业认证
|
||||
if(multi_point_status == 0){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "前往多点执业认证",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "请您先进行多点执业认证",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if(multi_point_status == 2){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "审核中",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "您的多点执业认证正在审核中",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if(multi_point_status == 3){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "认证失败",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "您的多点执业认证失败",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//绑定结算银行卡
|
||||
var is_bind_bank = this.data.info.is_bind_bank;
|
||||
if(is_bind_bank == 0){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "绑定结算银行卡",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/bankcard/index",
|
||||
dialog_content: "请您先绑定结算银行卡",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//开启在线问诊
|
||||
var is_img_expert_reception = this.data.info.is_img_expert_reception;
|
||||
if(is_img_expert_reception == 0 ){
|
||||
if(!this.data.default_dialog_show){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "开启在线问诊",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/onlinesetup/index",
|
||||
dialog_content: "请您先前往在线问诊管理中开通在线问诊",
|
||||
dialog_visible: true,
|
||||
default_dialog_show: true
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "去接诊",
|
||||
shiming_status_url: "/Pages/yishi/wenzhen_v2/wenzhen",
|
||||
});
|
||||
this.setData({"info.info_shiming_status": "info_shiming_status_yes"});
|
||||
return true;
|
||||
},
|
||||
contactKeFu(e){
|
||||
let _this = this;
|
||||
|
||||
let checkDialog = this.checkDialog(e);
|
||||
if(checkDialog){
|
||||
console.log("concatKeFu");
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'],
|
||||
success (res) {
|
||||
console.log(res);
|
||||
_this.setData({
|
||||
contactKeFu: true
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
checkDialog(e){
|
||||
//实名认证
|
||||
let idcard_status = this.data.info.idcard_status;
|
||||
//医师身份认证
|
||||
@@ -248,164 +477,10 @@ Page({
|
||||
dialog_content: now_case.case_text,
|
||||
dialog_visible: true
|
||||
});
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
let url = e.currentTarget.dataset.url;
|
||||
console.log(url);
|
||||
if(url.indexOf("wenzhen") > -1){
|
||||
wx.switchTab({
|
||||
url: url,
|
||||
})
|
||||
}
|
||||
app.go(e.currentTarget.dataset.url)
|
||||
|
||||
},
|
||||
confirmDialog(){
|
||||
this.setData({
|
||||
dialog_visible: false
|
||||
})
|
||||
},
|
||||
cancelDialog(){
|
||||
this.setData({
|
||||
dialog_visible: false
|
||||
})
|
||||
},
|
||||
checkStatus(){
|
||||
//实名认证
|
||||
let idcard_status = this.data.info.idcard_status;
|
||||
//医师身份认证
|
||||
let iden_auth_status = this.data.info.iden_auth_status;
|
||||
//多点执业认证
|
||||
let multi_point_status = this.data.info.multi_point_status;
|
||||
|
||||
if(idcard_status == 0){
|
||||
this.setData({
|
||||
dialog_content: "请您先实名认证",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if(idcard_status == 2){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "认证失败",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_content: "实名认证失败",
|
||||
dialog_visible: true
|
||||
});
|
||||
this.setData({
|
||||
});
|
||||
return false;;
|
||||
}
|
||||
|
||||
if(iden_auth_status == 0){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "前往医师身份认证",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_content: "请您前往医师身份认证",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(iden_auth_status == 2){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "审核中",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_content: "您的医师身份认证正在审核中",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(iden_auth_status == 3){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "认证失败",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
dialog_content: "您的医师身份认证失败",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
//多点执业认证
|
||||
if(multi_point_status == 0){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "前往多点执业认证",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "请您先进行多点执业认证",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(multi_point_status == 2){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "审核中",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "您的多点执业认证正在审核中",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(multi_point_status == 3){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "认证失败",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/zhiye_identity/index",
|
||||
dialog_content: "您的多点执业认证失败",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//绑定结算银行卡
|
||||
var is_bind_bank = this.data.info.is_bind_bank;
|
||||
if(is_bind_bank == 0){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "绑定结算银行卡",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/bankcard/index",
|
||||
dialog_content: "请您先绑定结算银行卡",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
//开启在线问诊
|
||||
var is_img_expert_reception = this.data.info.is_img_expert_reception;
|
||||
if(is_img_expert_reception == 0){
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "开启在线问诊",
|
||||
"info.info_shiming_status": "info_shiming_status_yes",
|
||||
shiming_status_url: "/Pages/yishi/onlinesetup/index",
|
||||
dialog_content: "请您先前往在线问诊管理中开通在线问诊",
|
||||
dialog_visible: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "去接诊",
|
||||
shiming_status_url: "/Pages/yishi/wenzhen_v2/wenzhen",
|
||||
});
|
||||
this.setData({"info.info_shiming_status": "info_shiming_status_yes"});
|
||||
return true;
|
||||
},
|
||||
contactKeFu(){
|
||||
let _this = this;
|
||||
console.log("concatKeFu");
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'],
|
||||
success (res) {
|
||||
console.log(res);
|
||||
_this.setData({
|
||||
contactKeFu: true
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -2,11 +2,9 @@
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"t-swiper": "tdesign-miniprogram/swiper/swiper",
|
||||
"t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav",
|
||||
"t-badge": "tdesign-miniprogram/badge/badge",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog"
|
||||
}
|
||||
|
||||
@@ -9,22 +9,21 @@
|
||||
<!-- 用户信息 -->
|
||||
<view class="info_box" style="margin-top: {{stateHeight+navHeight+10}}px;">
|
||||
<view class="info">
|
||||
<view class="info_photo">
|
||||
<!-- 跳转我的信息 -->
|
||||
<navigator url="/Pages/yishi/myinfo/index" open-type="navigate" hover-class="other-navigator-hover">
|
||||
<t-avatar alt="头像" class="avatar" size="large" image="{{info.avatar}}" />
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="info_content">
|
||||
<view class="info_mobile">{{info.user_name}}</view>
|
||||
<view class="info_wenzhen">
|
||||
<view bindtap="go" data-moudle="0">新问诊:{{info.not_accepted_inquiry_num}}</view>
|
||||
<view bindtap="go" data-moudle="1">接诊中:{{info.accepting_inquiry_num}}</view>
|
||||
<view class="info_top">
|
||||
<view class="info_photo" bindtap="go" data-url="/Pages/yishi/myinfo/index">
|
||||
<!-- 跳转我的信息 -->
|
||||
<t-avatar alt="头像" class="avatar" size="large" image="{{info.avatar}}" />
|
||||
</view>
|
||||
<view class="info_content">
|
||||
<view class="info_mobile">{{info.user_name}}</view>
|
||||
</view>
|
||||
<view class="info_shiming" bindtap="go" data-url="{{shiming_status_url}}">
|
||||
<view class="info_shiming_status {{info.info_shiming_status}}">{{info.info_shiming_status_txt}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="info_shiming" bindtap="go" data-url="{{shiming_status_url}}">
|
||||
<view class="info_shiming_status {{info.info_shiming_status}}">{{info.info_shiming_status_txt}}</view>
|
||||
<view class="info_wenzhen">
|
||||
<view class="info_wenzhen_new" bindtap="go" data-moudle="0">新问诊:{{info.not_accepted_inquiry_num}}</view>
|
||||
<view class="info_wenzhen_ing" bindtap="go" data-moudle="1">接诊中:{{info.accepting_inquiry_num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info_note" wx:if="{{info.show_info_note}}">
|
||||
@@ -41,11 +40,11 @@
|
||||
</view>
|
||||
<!-- 认证信息 -->
|
||||
<view class="renzhen">
|
||||
<view class="renzheng_left">
|
||||
<view class="renzheng_left" bindtap="go" data-url="/Pages/yishi/identity/index">
|
||||
<view class="renzheng_content_left">
|
||||
<view class="renzheng_content_name">医师身份认证</view>
|
||||
<view class="renzheng_content_status">
|
||||
<van-button round plain bind:click="go" data-url="/Pages/yishi/identity/index"
|
||||
<van-button round plain
|
||||
custom-style="background-color: #E0FFFE; height: 45rpx; letter-spacing: 3rpx; font-size: 26rpx;"
|
||||
color="#3CC7C0" type="info" size="small">{{ iden_auth_status_txt }}></van-button>
|
||||
</view>
|
||||
@@ -58,11 +57,11 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="renzheng_right">
|
||||
<view class="renzheng_right" bindtap="go" data-url="/Pages/yishi/zhiye_identity/index">
|
||||
<view class="renzheng_content_left">
|
||||
<view class="renzheng_content_name">多点执业认证</view>
|
||||
<view class="renzheng_content_status">
|
||||
<van-button round plain bind:click="go" data-moudle="2" data-url="/Pages/yishi/zhiye_identity/index"
|
||||
<van-button round plain data-moudle="2"
|
||||
custom-style="background-color: #FFF5E0; height: 45rpx; letter-spacing: 3rpx; font-size: 26rpx;"
|
||||
color="#FC7E00" type="info" size="small">{{ multi_point_status_txt }}></van-button>
|
||||
</view>
|
||||
@@ -79,16 +78,15 @@
|
||||
<view class="ad">
|
||||
<t-swiper
|
||||
height="110rpx"
|
||||
current="{{current}}"
|
||||
autoplay="{{autoplay}}"
|
||||
duration="{{duration}}"
|
||||
interval="{{interval}}"
|
||||
navigation="{{ { type: 'dots' } }}"
|
||||
list="{{swiperList}}"
|
||||
bind:click="onTap"
|
||||
bind:change="onADChange"
|
||||
bind:click="onTapAD"
|
||||
bind:change="onChangeAD"
|
||||
data-url="123"
|
||||
>
|
||||
</t-swiper>
|
||||
</t-swiper>
|
||||
</view>
|
||||
<!-- 功能模块 -->
|
||||
<view class="fun_box">
|
||||
@@ -152,7 +150,6 @@
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
|
||||
<van-dialog
|
||||
title="立即联系客服"
|
||||
show="{{ contactKeFu }}"
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.06);
|
||||
}
|
||||
.info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.info_top{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
@@ -43,7 +47,7 @@
|
||||
}
|
||||
.info_content{
|
||||
color: #000;
|
||||
flex: 4;
|
||||
flex: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
@@ -54,15 +58,22 @@
|
||||
letter-spacing: 3rpx;
|
||||
}
|
||||
.info_wenzhen{
|
||||
margin-top: 10rpx;
|
||||
margin: 20rpx 0 0 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
}
|
||||
.info_wenzhen_new{
|
||||
flex: 1;
|
||||
}
|
||||
.info_wenzhen_ing{
|
||||
flex: 3;
|
||||
}
|
||||
.info_shiming{
|
||||
flex: 2;
|
||||
flex: 3;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: flex-end;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.info_shiming_status{
|
||||
padding: 15rpx 20rpx 15rpx 20rpx;
|
||||
|
||||
Reference in New Issue
Block a user