Browse Source

修复bug

master
前端-胡立永 1 week ago
parent
commit
5ded04998e
3 changed files with 24 additions and 13 deletions
  1. +2
    -3
      pages/index/center.vue
  2. +5
    -2
      pages_login/wxLogin.vue
  3. +17
    -8
      pages_login/wxUserInfo.vue

+ 2
- 3
pages/index/center.vue View File

@ -138,13 +138,12 @@
} }
}, },
onShow() { onShow() {
},
onLoad() {
if(this.isLogin) { if(this.isLogin) {
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
} }
}, },
onLoad() {
},
onPageScroll(e) { onPageScroll(e) {
if(e.scrollTop > 50) { if(e.scrollTop > 50) {
this.bgColor = '#49070c' this.bgColor = '#49070c'


+ 5
- 2
pages_login/wxLogin.vue View File

@ -110,9 +110,9 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 70%; width: 70%;
background: #05C160;
background: $uni--bg-color-btn;
height: 90rpx; height: 90rpx;
border-radius: 45rpx;
border-radius: 15rpx;
color: white; color: white;
margin-top: 200rpx; margin-top: 200rpx;
@ -128,6 +128,9 @@
width: 70%; width: 70%;
height: 90rpx; height: 90rpx;
padding: 0; padding: 0;
background: rgba($uni--bg-color-btn, 0.2);
color: $uni--bg-color-btn;
border-radius: 15rpx;
} }
// //


+ 17
- 8
pages_login/wxUserInfo.vue View File

@ -92,12 +92,23 @@
}, },
onShow() {}, onShow() {},
onLoad() { onLoad() {
this.userInfoForm.phone = this.userInfo.phone || ''
this.userInfoForm.nickName = this.userInfo.nickName || ''
this.userInfoForm.headImage = this.userInfo.headImage || ''
// this.userInfoForm.phone = this.userInfo.phone || ''
// this.userInfoForm.nickName = this.userInfo.nickName || ''
// this.userInfoForm.headImage = this.userInfo.headImage || ''
this.getUserInfo()
}, },
computed: {}, computed: {},
methods: { methods: {
getUserInfo(){
this.$api('getInfo', res => {
if(res.code == 200){
this.userInfoForm.phone = res.result.phone || ''
this.userInfoForm.nickName = res.result.nickName || ''
this.userInfoForm.headImage = res.result.headImage || ''
this.userInfoForm.sex = res.result.sex || ''
}
})
},
onChooseAvatar(res) { onChooseAvatar(res) {
let self = this let self = this
self.$Oss.ossUpload(res.target.avatarUrl) self.$Oss.ossUpload(res.target.avatarUrl)
@ -212,21 +223,19 @@
} }
.btn { .btn {
// background: $uni--bg-color-btn;
background: #05C160;
background: $uni--bg-color-btn;
color: #fff; color: #fff;
width: 80%; width: 80%;
padding: 20rpx 0; padding: 20rpx 0;
text-align: center; text-align: center;
border-radius: 45rpx;
border-radius: 15rpx;
margin-top: 10vh; margin-top: 10vh;
} }
.getPhoneNumber{ .getPhoneNumber{
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
// background: $uni--bg-color-btn;
background: #05C160;
background: $uni--bg-color-btn;
color: #fff; color: #fff;
width: 220rpx; width: 220rpx;
height: 60rpx; height: 60rpx;


Loading…
Cancel
Save