You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
2.1 KiB
108 lines
2.1 KiB
<template>
|
|
<view class="userInfo">
|
|
<view class="my-message">
|
|
<view class="left">
|
|
<image :src="userInfo.img" mode=""></image>
|
|
</view>
|
|
<view class="right">
|
|
{{userInfo.username}}
|
|
</view>
|
|
</view>
|
|
<uni-list>
|
|
<uni-list-item title="我的收藏" link to="/pages/userInfo/myCollection/myCollection"></uni-list-item>
|
|
<uni-list-item title="常见问题" link to="/pages/userInfo/question/question"></uni-list-item>
|
|
<uni-list-item title="联系我们" link to="/pages/userInfo/contactUs/contactUs"></uni-list-item>
|
|
<uni-list-item title="设置" link to="/pages/userInfo/setting/setting"></uni-list-item>
|
|
<view class="share-box">
|
|
<button title="分享" open-type="share">分享</button>
|
|
</view>
|
|
</uni-list>
|
|
<view class="bottom-btn">
|
|
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">绑定手机号</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
userInfo: {}
|
|
}
|
|
},
|
|
created() {
|
|
this.userInfo = uni.getStorageSync('userInfo')
|
|
},
|
|
onShareAppMessage(res) {
|
|
if (res.from === 'button') { // 来自页面内分享按钮
|
|
console.log(res)
|
|
}
|
|
return {
|
|
title: '自定义分享标题',
|
|
path: `/pages/index/index?id=${this.userInfo.id}`
|
|
}
|
|
},
|
|
methods: {
|
|
share() {
|
|
|
|
},
|
|
getPhoneNumber(e) {
|
|
console.log(e.detail.errMsg);
|
|
console.log(e.detail.iv);
|
|
console.log(e.detail.encryptedData);
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less">
|
|
.userInfo {
|
|
height: 100%;
|
|
background-color: white;
|
|
|
|
.my-message {
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
padding: 20rpx;
|
|
|
|
.left {
|
|
width: 100rpx;
|
|
height: 100rpx;
|
|
margin-right: 20rpx;
|
|
|
|
>image {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
|
|
.right {
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
.share-box {
|
|
width: 100vw;
|
|
|
|
>button {
|
|
background: none;
|
|
outline: none;
|
|
font-size: 14px;
|
|
text-align: left;
|
|
line-height: 14px;
|
|
padding: 12px 15px;
|
|
}
|
|
|
|
}
|
|
|
|
.bottom-btn {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
z-index: 1000;
|
|
}
|
|
}
|
|
</style>
|
|
|