添加控制功能和页面逻辑

This commit is contained in:
qianlile
2021-07-29 11:11:14 +08:00
parent 2096a6e755
commit 7c061bbb9b
14 changed files with 265 additions and 49 deletions

View File

@@ -0,0 +1,19 @@
var app = getApp();
Page({
data: {
userInfo: {},
mode: ['信息反馈', '联系客服', '关于我们']
},
onLoad: function () {
},
getOut(){
wx.clearStorage({
success: (res) => {
wx.reLaunch({
url: '/pages/login/index',
})
},
})
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,16 @@
<!--miniprogram/pages/my/index.wxml-->
<view class="personal_info">
<view class="photo_wrap">
<open-data type="userAvatarUrl"></open-data>
</view>
<view class="nickname">
<open-data type="userNickName"></open-data>
</view>
</view>
<view class="wode_item_wrap">
<view class="wode_item" wx:for="{{mode}}">
{{item}}
<span class="arrow_wrap"></span>
</view>
</view>
<view class="wode_out" bindtap="getOut">退出</view>

View File

@@ -0,0 +1,54 @@
.personal_info {
padding: 20px 0;
background-color: #FFF;
}
.photo_wrap {
overflow:hidden;
display: block;
width: 160rpx;
height: 160rpx;
margin: auto;
margin-top: 50rpx;
border-radius: 50%;
border: 2px solid #fff;
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
}
.photo {
width: 90px;
height: 90px;
border-radius: 90px;
}
.nickname {
margin-top: 15px;
text-align: center;
color: #696969;
}
.wode_item_wrap {
background-color: #FFF;
font-size: 14px;
margin-top: 10px;
border-top: 1px solid #E5E5E5;
}
.wode_item {
height: 45px;
border-bottom: 1px solid #E5E5E5;
padding: 0 10px;
line-height: 45px;
position: relative;
}
.arrow_wrap {
position: absolute;
width: 50px;
height: 45px;
right: 0;
top: 0;
}
.wode_out {
height: 45px;
line-height: 45px;
text-align: center;
background-color: #FFF;
margin-top: 10px;
border-bottom: 1px solid #E5E5E5;
border-top: 1px solid #E5E5E5;
}