优化
This commit is contained in:
parent
edff2d3c05
commit
52742fdbd9
@ -23,7 +23,8 @@ Page({
|
||||
next_btn_disabled: false,
|
||||
next_btn_txt: "下一步",
|
||||
realname: "",
|
||||
idcard: ""
|
||||
idcard: "",
|
||||
page_meta_show: false
|
||||
},
|
||||
getMenuButtonBound() {
|
||||
let stateHeight = 0; // 接收状态栏高度
|
||||
@ -729,4 +730,16 @@ Page({
|
||||
|
||||
// }).catch(errors => {console.error(errors);})
|
||||
// }
|
||||
showPageMeta(){
|
||||
console.log("showPageMeta from indenity");
|
||||
this.setData({
|
||||
page_meta_show: true
|
||||
})
|
||||
},
|
||||
hidePageMeta(){
|
||||
console.log("hidePageMeta from indenity");
|
||||
this.setData({
|
||||
page_meta_show: false
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1,4 +1,6 @@
|
||||
<!-- <nav-bar navbar-data='{{navbarData}}' style="margin-bottom: {{height*2 + 20}}px;"></nav-bar> -->
|
||||
<!-- 设置滚动穿透 -->
|
||||
<page-meta page-style="{{ page_meta_show ? 'overflow: hidden;' : '' }}" />
|
||||
<te-nav-bar navbar-data='{{navbarData}}'></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="tabs">
|
||||
@ -63,12 +65,18 @@
|
||||
|
||||
<!-- 医师身份认证 -->
|
||||
<t-tab-panel label="医师身份认证" value="1" disabled style="{{tabPanelstyle}}" wx:if="{{panel_2_disabled}}">
|
||||
<myprofile wx:if="{{selected_tab == 1}}" />
|
||||
<myprofile wx:if="{{selected_tab == 1}}"
|
||||
bind:showPageMeta="showPageMeta"
|
||||
bind:hidePageMeta="hidePageMeta"
|
||||
/>
|
||||
<view style="height: 50rpx;"></view>
|
||||
</t-tab-panel>
|
||||
|
||||
<t-tab-panel label="医师身份认证" value="1" style="{{tabPanelstyle}}" wx:if="{{!panel_2_disabled}}">
|
||||
<myprofile wx:if="{{selected_tab == 1}}" />
|
||||
<myprofile wx:if="{{selected_tab == 1}}"
|
||||
bind:showPageMeta="showPageMeta"
|
||||
bind:hidePageMeta="hidePageMeta"
|
||||
/>
|
||||
<view style="height: 50rpx;"></view>
|
||||
</t-tab-panel>
|
||||
|
||||
|
||||
@ -94,24 +94,13 @@
|
||||
width: 95vw;
|
||||
margin: 0 auto 30rpx auto;
|
||||
}
|
||||
.zhiye_popup{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 600rpx;
|
||||
}
|
||||
|
||||
.zhiye_popup_title{
|
||||
margin-top: 16px;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: 5rpx;
|
||||
}
|
||||
.zhiye_popup_img{
|
||||
margin-top: 30rpx;
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
background-color: cadetblue;
|
||||
}
|
||||
|
||||
.zhuanchang_box{
|
||||
display: flex;
|
||||
|
||||
@ -155,8 +155,24 @@ Page({
|
||||
this.setData({
|
||||
swiperList: []
|
||||
})
|
||||
wx.offCopyUrl(this.Copylistener) // 需传入与监听时同一个的函数对象
|
||||
},
|
||||
Copylistener(res){
|
||||
setTimeout(()=>{
|
||||
wx.setClipboardData({
|
||||
data: '暂不支持分享',
|
||||
success (res) {
|
||||
|
||||
},
|
||||
complete(){
|
||||
wx.hideToast()
|
||||
}
|
||||
})
|
||||
},1000)
|
||||
return
|
||||
},
|
||||
onShow: function () {
|
||||
wx.onCopyUrl(this.Copylistener);
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||
@ -175,12 +191,11 @@ Page({
|
||||
"info.avg_response_time": response.data.info.avg_response_time,
|
||||
"info.number_of_fans": response.data.info.number_of_fans,
|
||||
})
|
||||
if(avatar && (avatar.indexOf("http") == -1)){
|
||||
avatar = api.getStaticHost() + avatar;
|
||||
if(avatar){
|
||||
this.setData({
|
||||
"info.avatar": avatar
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
"info.avatar": avatar
|
||||
})
|
||||
|
||||
//实名认证
|
||||
let idcard_status = response.data.info.idcard_status;
|
||||
|
||||
@ -54,12 +54,14 @@ Page({
|
||||
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
|
||||
wx.setStorageSync('user_id_'+usertype, "");
|
||||
wx.setStorageSync('client_user_id_'+usertype, "");
|
||||
let promise = wx.$TUIKit.logout();
|
||||
promise.then(function(imResponse) {
|
||||
console.log(imResponse.data); // 登出成功
|
||||
}).catch(function(imError) {
|
||||
console.warn('logout error:', imError);
|
||||
});
|
||||
if(wx.$TUIKit){
|
||||
let promise = wx.$TUIKit.logout();
|
||||
promise.then(function(imResponse) {
|
||||
console.log(imResponse.data); // 登出成功
|
||||
}).catch(function(imError) {
|
||||
console.warn('logout error:', imError);
|
||||
});
|
||||
}
|
||||
app.go("/Pages/index/index");
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
|
||||
@ -5,9 +5,21 @@ Page({
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '我的简介', //导航栏 中间的标题
|
||||
},
|
||||
page_meta_show: false
|
||||
},
|
||||
goBack(){
|
||||
wx.navigateBack();
|
||||
},
|
||||
showPageMeta(){
|
||||
console.log("showPageMeta from indenity");
|
||||
this.setData({
|
||||
page_meta_show: true
|
||||
})
|
||||
},
|
||||
hidePageMeta(){
|
||||
console.log("hidePageMeta from indenity");
|
||||
this.setData({
|
||||
page_meta_show: false
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
@ -1,5 +1,10 @@
|
||||
<!-- 设置滚动穿透 -->
|
||||
<page-meta page-style="{{ page_meta_show ? 'overflow: hidden;' : '' }}" />
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
|
||||
<myprofile indentity="{{false}}" />
|
||||
<myprofile indentity="{{false}}"
|
||||
bind:showPageMeta="showPageMeta"
|
||||
bind:hidePageMeta="hidePageMeta"
|
||||
/>
|
||||
<view style="height: 50rpx;"></view>
|
||||
</view>
|
||||
@ -176,7 +176,8 @@
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.status_complete{
|
||||
color: #C5C5C5;
|
||||
color: #ffffff;
|
||||
background-color: #c5c5c5;
|
||||
}
|
||||
.dialog{
|
||||
width: 50%;
|
||||
|
||||
4
app.js
4
app.js
@ -49,8 +49,12 @@ App({
|
||||
|
||||
//监听网络状态变化事件
|
||||
wx.onNetworkStatusChange(function (res) {
|
||||
console.log("onNetworkStatusChange: ")
|
||||
console.log(res.isConnected)
|
||||
console.log(res.networkType)
|
||||
wx.showToast({
|
||||
title: '网络类型'+res.networkType,
|
||||
})
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
|
||||
@ -361,6 +361,11 @@ Component({
|
||||
onCityShow(e) {
|
||||
console.log("onCityShow");
|
||||
this.setData({ city_show: true });
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onCloseCity(e){
|
||||
console.log("onCloseCity");
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onChangeCity(e) {
|
||||
this.setData({
|
||||
@ -496,20 +501,19 @@ Component({
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onYiYuanClose(e) {
|
||||
console.log("onYiYuanClose");
|
||||
this.setData({ yiyuan_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onYiYuanCancel(event) {
|
||||
console.log("onYiYuanCancel");
|
||||
const { picker, value, index } = event.detail;
|
||||
Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
this.setData({
|
||||
yiyuan_show: false
|
||||
});
|
||||
|
||||
this.setData({yiyuan_show: false});
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onYiYuanConfirm(event) {
|
||||
console.log("onYiYuanConfirm");
|
||||
@ -527,7 +531,7 @@ Component({
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onYiYuanChange(event) {
|
||||
console.log("onYiYuanChange");
|
||||
@ -537,12 +541,14 @@ Component({
|
||||
onKeshiShow(e) {
|
||||
console.log("onKeshiShow");
|
||||
this.setData({ keshi_show: true });
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onKeshiCancel(event) {
|
||||
console.log("onKeshiCancel");
|
||||
const { picker, value, index } = event.detail;
|
||||
Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
this.setData({ keshi_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onKeshiConfirm(event) {
|
||||
console.log("onKeshiConfirm");
|
||||
@ -553,6 +559,7 @@ Component({
|
||||
select_keshi_id: `${value.value}`,
|
||||
keshi_note: `${value.text}`,
|
||||
});
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onKeshiChange(event) {
|
||||
console.log("onKeshiChange");
|
||||
@ -560,16 +567,19 @@ Component({
|
||||
onKeshiClose(e) {
|
||||
console.log("onKeshiClose");
|
||||
this.setData({ keshi_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onZhiChengShow(e) {
|
||||
console.log("onKeshiShow");
|
||||
this.setData({ zhicheng_show: true });
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onZhiChengCancel(event) {
|
||||
console.log("onKeshiCancel");
|
||||
const { picker, value, index } = event.detail;
|
||||
Toast(`当前值:${value}, 当前索引:${index}`);
|
||||
this.setData({ zhicheng_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onZhiChengConfirm(event) {
|
||||
console.log("onZhiChengConfirm");
|
||||
@ -580,6 +590,7 @@ Component({
|
||||
select_zhicheng_id: `${value.value}`,
|
||||
zhicheng_note: `${value.text}`,
|
||||
});
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onZhiChengChange(event) {
|
||||
console.log("onZhiChengChange");
|
||||
@ -587,9 +598,11 @@ Component({
|
||||
onZhiChengClose(e) {
|
||||
console.log("onZhiChengClose");
|
||||
this.setData({ zhicheng_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onZhuanChangShow(){
|
||||
this.setData({ zhuanchang_show: true });
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onZhuanChangVisibleChange(e) {
|
||||
this.setData({
|
||||
@ -599,57 +612,59 @@ Component({
|
||||
onshowJianJieNote(e){
|
||||
e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
console.log("onshowJianJieNote");
|
||||
this.setData({
|
||||
jianjie_show: true,
|
||||
});
|
||||
this.setData({jianjie_show: true});
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onJianjieClose(e){
|
||||
e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
console.log("onshowJianJieNote");
|
||||
this.setData({
|
||||
jianjie_show: false,
|
||||
});
|
||||
this.setData({jianjie_show: false});
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onshowShanChangNote(e){
|
||||
e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
console.log("onshowShanChangNote");
|
||||
this.setData({
|
||||
shanchang_show: true,
|
||||
});
|
||||
this.setData({shanchang_show: true});
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onshowShanChangNoteClose(e){
|
||||
e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
console.log("onshowShanChangNote");
|
||||
this.setData({
|
||||
shanchang_show: false,
|
||||
});
|
||||
this.setData({shanchang_show: false});
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onshowZhiYeNote(e){
|
||||
e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
console.log("onshowZhiYeNote");
|
||||
this.setData({ zhiye_show: true });
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onZhiYeClose(){
|
||||
console.log("onZhiYeClose");
|
||||
this.setData({ zhiye_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onshowZiGeNote(e){
|
||||
e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
console.log("onshowZiGeNote");
|
||||
this.setData({ zige_show: true });
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onZiGeClose(){
|
||||
console.log("onZhiYeClose");
|
||||
this.setData({ zige_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onshowZhiChengImgNote(e){
|
||||
e.detail // 自定义组件触发事件时提供的 detail 对象
|
||||
console.log("onshowZhiChengNote");
|
||||
this.setData({ zhicheng_img_show: true });
|
||||
this.triggerEvent('showPageMeta');
|
||||
},
|
||||
onZhiChengImgClose(){
|
||||
console.log("onZhiChengClose");
|
||||
this.setData({ zhicheng_img_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
onCustomKeshiChange(){
|
||||
this.setData({
|
||||
@ -719,9 +734,11 @@ Component({
|
||||
},
|
||||
zhuanchangConfirm(e){
|
||||
this.setData({ zhuanchang_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
zhuanchangConcle(e){
|
||||
this.setData({ zhuanchang_show: false });
|
||||
this.triggerEvent('hidePageMeta');
|
||||
},
|
||||
addDoctorAuthIden(e){
|
||||
console.log("addDoctorAuthIden addDoctorAuthIden")
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-search": "@vant/weapp/search/index",
|
||||
"van-empty": "@vant/weapp/empty/index"
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-image": "@vant/weapp/image/index"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
<view class="{{avatar_reason!=''?'photo':'photo_reason'}}">
|
||||
<view class="title">头像 <text class="required"> *</text></view>
|
||||
<van-uploader disabled="{{ indentity && iden_auth_disabled }}" bind:after-read="doUploadPhoto" data-scene="1" data-field_name="avatar" data-file_multiple="false">
|
||||
@ -28,7 +29,8 @@
|
||||
options="{{ areaList }}"
|
||||
title="请选择地址"
|
||||
sub-titles="{{area_sub_titles}}"
|
||||
bind:change="onChangeCity"
|
||||
bind:change="onChangeCity"
|
||||
bind:close="onCloseCity"
|
||||
></t-cascader>
|
||||
|
||||
<t-cell title="医院" hover required arrow note="{{ yiyuan_note }}" bindtap="{{(indentity && iden_auth_disabled)?'':'onYiYuanShow'}}"/>
|
||||
@ -114,13 +116,18 @@
|
||||
show="{{ zhiye_show }}"
|
||||
closeable
|
||||
round
|
||||
lock-scroll
|
||||
position="bottom"
|
||||
bind:close="onZhiYeClose"
|
||||
>
|
||||
<view class="zhiye_popup">
|
||||
<view class="zhiye_popup_title">医师执业证示例</view>
|
||||
<view class="zhiye_popup_img"></view>
|
||||
<view class="zhiye_popup_img"></view>
|
||||
<view class="zhiye_popup_img">
|
||||
<van-image lazy-load slot="loading" type="spinner" fit="widthFix" width="420rpx" src="https://img.applets.igandanyiyuan.com/applet/doctor/static/images/yishi/cert/zhiye1.png" />
|
||||
</view>
|
||||
<view class="zhiye_popup_img">
|
||||
<van-image lazy-load slot="loading" type="spinner" fit="widthFix" width="420rpx" src="https://img.applets.igandanyiyuan.com/applet/doctor/static/images/yishi/cert/zhiye2.png" />
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
@ -128,12 +135,18 @@
|
||||
show="{{ zige_show }}"
|
||||
closeable
|
||||
round
|
||||
lock-scroll
|
||||
position="bottom"
|
||||
bind:close="onZiGeClose"
|
||||
>
|
||||
<view class="zhiye_popup">
|
||||
<view class="zhiye_popup_title">医师资格证示例</view>
|
||||
<view class="zhiye_popup_img"></view>
|
||||
<view class="zhiye_popup_img">
|
||||
<van-image lazy-load slot="loading" type="spinner" fit="widthFix" width="420rpx" src="https://img.applets.igandanyiyuan.com/applet/doctor/static/images/yishi/cert/zige1.png" />
|
||||
</view>
|
||||
<view class="zhiye_popup_img">
|
||||
<van-image lazy-load slot="loading" type="spinner" fit="widthFix" width="420rpx" src="https://img.applets.igandanyiyuan.com/applet/doctor/static/images/yishi/cert/zige2.png" />
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
@ -141,12 +154,15 @@
|
||||
show="{{ zhicheng_img_show }}"
|
||||
closeable
|
||||
round
|
||||
lock-scroll
|
||||
position="bottom"
|
||||
bind:close="onZhiChengImgClose"
|
||||
>
|
||||
<view class="zhiye_popup">
|
||||
<view class="zhiye_popup_title">职称证示例</view>
|
||||
<view class="zhiye_popup_img"></view>
|
||||
<view class="zhiye_popup_img">
|
||||
<van-image lazy-load slot="loading" type="spinner" fit="widthFix" width="420rpx" src="https://img.applets.igandanyiyuan.com/applet/doctor/static/images/yishi/cert/zhicheng.png" />
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
|
||||
@ -131,7 +131,8 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 600rpx;
|
||||
padding-bottom: 20rpx;
|
||||
min-height: 550rpx;
|
||||
}
|
||||
.zhiye_popup_title{
|
||||
margin-top: 16px;
|
||||
@ -141,9 +142,6 @@
|
||||
}
|
||||
.zhiye_popup_img{
|
||||
margin-top: 30rpx;
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
background-color: cadetblue;
|
||||
}
|
||||
|
||||
.zhuanchang_box{
|
||||
|
||||
@ -27,6 +27,11 @@
|
||||
color: #999999;
|
||||
min-height: 70rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
.status{
|
||||
font-size: 26rpx;
|
||||
|
||||
@ -119,8 +119,11 @@ let Cascader = class Cascader extends SuperComponent {
|
||||
});
|
||||
}
|
||||
},
|
||||
hide() {
|
||||
hide(e) {
|
||||
this.setData({ visible: false });
|
||||
if(e != false){
|
||||
this.triggerEvent('close');
|
||||
}
|
||||
},
|
||||
onStepClick(e) {
|
||||
const { index } = e.currentTarget.dataset;
|
||||
@ -157,7 +160,7 @@ let Cascader = class Cascader extends SuperComponent {
|
||||
selectedOptions: items.map((item, index) => item[selectedIndexes[index]]),
|
||||
});
|
||||
});
|
||||
this.hide();
|
||||
this.hide(false);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
const env = require('./config').dev
|
||||
const app = getApp()
|
||||
class HTTP {
|
||||
constructor() {
|
||||
this.baseUrl = env.baseUrl,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user