pages页面
"navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom", "mp-alipay": { "transparentTitle": "always", "titlePenetrate": "YES" },
自定义标题页面
/* #ifdef MP-ALIPAY */
.alipay_title{
position:fixed;
width: 100vw;
padding-left: 34rpx;
.bttitle{
text-align: center;
line-height: 48px;
}
}
/* #endif */
onLoad(e) {
this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
this.iTitleBarHeight = uni.getSystemInfoSync().titleBarHeight;
// #ifdef MP-ALIPAY
my.hideBackHome();
// #endif
},
data(){
return{
iStatusBarHeight:0,
iTitleBarHeight:48,
}
}
<!-- #ifdef MP-ALIPAY -->
<view :style="{ height: iStatusBarHeight + 'px'}">
</view>
<view :style="{ height: iTitleBarHeight + 'px'}" class="alipay_title">
<view class="bttitle" >充电预检</view>
</view>
<!-- #endif -->
如果不想要自带的返回上一页的箭头按钮跳转到该页面的时候就用
my.reLaunch
跳转
参考了https://www.csdn.net/tags/OtDagg3sNjI4OTYtYmxvZwO0O0OO0O0O.html