|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
- <view class="container login">
|
|
|
+ <view class="container login" :style="{paddingTop:CustomBar+'px'}">
|
|
|
+ <cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
|
|
|
<view class="login-main">
|
|
|
<image class="logo" src="../../static/login-logo@3x.png" mode=""></image>
|
|
|
<text class="logo-text">生美/医美采购服务平台</text>
|
|
@@ -22,11 +23,18 @@
|
|
|
export default{
|
|
|
data() {
|
|
|
return{
|
|
|
+ nvabarData: { //顶部自定义导航
|
|
|
+ showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
|
|
|
+ showSearch: 0,
|
|
|
+ title: '微信授权', // 导航栏 中间的标题
|
|
|
+ },
|
|
|
+ CustomBar:this.CustomBar,// 顶部导航栏高度
|
|
|
authorizeType:''
|
|
|
}
|
|
|
},
|
|
|
onLoad(e) {
|
|
|
this.authorizeType = e.type
|
|
|
+ console.log(e)
|
|
|
},
|
|
|
methods:{
|
|
|
//授权登录
|
|
@@ -38,12 +46,18 @@
|
|
|
}
|
|
|
},
|
|
|
undGetuserinfo(){
|
|
|
+ this.hanldBackFn()
|
|
|
+ },
|
|
|
+ hanldNavigateBack(){
|
|
|
+ this.hanldBackFn()
|
|
|
+ },
|
|
|
+ hanldBackFn(){
|
|
|
switch(this.authorizeType){
|
|
|
case '0':
|
|
|
this.$api.switchTabTo('/pages/tabBar/home/home')
|
|
|
break;
|
|
|
- default :
|
|
|
- uni.navigateBack({delta: 1});
|
|
|
+ default:
|
|
|
+ uni.navigateBack({delta: 1})
|
|
|
}
|
|
|
},
|
|
|
wxGetUserInfo(){
|
|
@@ -58,6 +72,9 @@
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
+ },
|
|
|
+ onHide(){
|
|
|
+ this.$api.switchTabTo('/pages/tabBar/home/home')
|
|
|
}
|
|
|
}
|
|
|
</script>
|