|
@@ -225,23 +225,9 @@
|
|
|
current: 4
|
|
|
}
|
|
|
},
|
|
|
- onShow() {
|
|
|
- uni.showTabBar()
|
|
|
- this.loadData()
|
|
|
- },
|
|
|
+
|
|
|
onLoad() {
|
|
|
- if(this.userInfo.avatarUrl == "" || this.userInfo.avatarUrl == null){
|
|
|
- this.headUrl = "../../static/img/myimg/YongHu@3x.png"
|
|
|
- }else if(this.userInfo.avatarUrl != "" || this.userInfo.avatarUrl != null){
|
|
|
- this.headUrl = this.userInfo.avatarUrl
|
|
|
- }
|
|
|
- this.username = this.userInfo.userName
|
|
|
- if( this.username == null || this.username == ""){
|
|
|
- this.username = "请更改昵称"
|
|
|
- }
|
|
|
- if(this.userInfo.phone != null || this.userInfo.phone != ""){
|
|
|
- this.userphone = this.userInfo.phone
|
|
|
- }
|
|
|
+
|
|
|
},
|
|
|
// #ifndef MP
|
|
|
onNavigationBarButtonTap(e) {
|
|
@@ -266,6 +252,22 @@
|
|
|
computed: {
|
|
|
...mapState(['hasLogin', 'userInfo'])
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ uni.showTabBar()
|
|
|
+ this.loadData()
|
|
|
+ if(this.userInfo.avatarUrl == "" || this.userInfo.avatarUrl == null){
|
|
|
+ this.headUrl = "../../static/img/myimg/YongHu@3x.png"
|
|
|
+ }else if(this.userInfo.avatarUrl != "" || this.userInfo.avatarUrl != null){
|
|
|
+ this.headUrl = this.userInfo.avatarUrl
|
|
|
+ }
|
|
|
+ this.username = this.userInfo.userName
|
|
|
+ if( this.username == null || this.username == ""){
|
|
|
+ this.username = "请更改昵称"
|
|
|
+ }
|
|
|
+ if(this.userInfo.phone != null || this.userInfo.phone != ""){
|
|
|
+ this.userphone = this.userInfo.phone
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
zhibo() {
|
|
|
uni.navigateTo({
|
|
@@ -354,10 +356,28 @@
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
- if (item.url) {
|
|
|
- uni.navigateTo({
|
|
|
- url: item.url + `?companyId=${that.companyId}`
|
|
|
+ if (!this.hasLogin) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '登录提示',
|
|
|
+ content: '您尚未登录,是否立即登录?',
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '登录',
|
|
|
+ success: (e) => {
|
|
|
+ if (e.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/public/login'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
})
|
|
|
+ }else {
|
|
|
+ if (item.url) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: item.url + `?companyId=${that.companyId}`
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
toLogin() {
|
|
@@ -682,7 +702,7 @@
|
|
|
|
|
|
background-color: #F5F6FA;
|
|
|
/* border-radius: 20px; */
|
|
|
- margin-top: 60px;
|
|
|
+ margin-top: 60upx;
|
|
|
|
|
|
.arc {
|
|
|
position: absolute;
|