|
@@ -2,14 +2,14 @@
|
|
|
<view class="mine-page">
|
|
|
<view class="topContent"></view>
|
|
|
<view class="avatar-box">
|
|
|
- <u-avatar :src="require('@/static/head.png')" size="80"></u-avatar>
|
|
|
+ <u-avatar :src="userInfo.avatar?httpsImg + userInfo.avatar:require('@/static/head.png')" size="80"></u-avatar>
|
|
|
</view>
|
|
|
<view class="info-box">
|
|
|
<view class="info-item">姓名:<view class="text">{{userInfo.userName}}</view>
|
|
|
</view>
|
|
|
- <view class="info-item">手机号:<view class="text">{{userInfo.userPhone}}</view>
|
|
|
+ <view class="info-item">手机号:<view class="text">{{userInfo.phonenumber}}</view>
|
|
|
</view>
|
|
|
- <view class="info-item">邮箱:<view class="text">{{userInfo.userEmail}}</view>
|
|
|
+ <view class="info-item">邮箱:<view class="text">{{userInfo.email}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="btn-box">
|
|
@@ -23,15 +23,28 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import https from '@/https/index.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
msgType: 'warn',
|
|
|
- userInfo: uni.getStorageSync('userInfo')
|
|
|
+ userInfo: {},
|
|
|
+ httpsImg:'',
|
|
|
}
|
|
|
},
|
|
|
- onShow() {},
|
|
|
+ onLoad() {
|
|
|
+ this.httpsImg = https.url
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.userProfilefun()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ // 获取个人信息
|
|
|
+ userProfilefun(){
|
|
|
+ this.$api.userProfile().then(res=>{
|
|
|
+ this.userInfo = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
logout() {
|
|
|
this.$refs.alertDialog.open()
|
|
|
},
|