add file
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Pages/my/my.js
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '个人中心', //导航栏 中间的标题
|
||||
},
|
||||
|
||||
// 此页面 页面内容距最顶部的距离
|
||||
height: app.globalData.height,
|
||||
},
|
||||
onLoad() {
|
||||
console.log(this.data.height)
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
currentTab: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
||||
"van-icon": "@vant/weapp/icon/index"
|
||||
},
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"backgroundColor": "#eeeeee",
|
||||
"backgroundTextStyle": "light"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="top">
|
||||
<t-avatar class="avatar" size="large" image="/static/images/default_photo.png" />
|
||||
<text class="name">李四</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<navigator url="/Pages/yaoshi/info/info" open-type="navigate" hover-class="other-navigator-hover">
|
||||
<view class="my">个人中心</view>
|
||||
</navigator>
|
||||
<view class="item_list">
|
||||
<view class="item">
|
||||
<navigator url="/Pages/yaoshi/authentication/authentication" open-type="navigate" hover-class="other-navigator-hover">
|
||||
<van-icon name="user-o" size="50rpx" color="#55B0E5"/>
|
||||
<text class="item_name">实名认证</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,39 @@
|
||||
.top{
|
||||
width: 100vw;
|
||||
background-color: cornflowerblue;
|
||||
height: 370rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.name{
|
||||
color: white;
|
||||
margin-top: 30rpx;
|
||||
text-align: justify;
|
||||
text-justify:distribute-all-lines;
|
||||
text-align-last: justify;
|
||||
width: 60rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.my{
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
/* background-color: teal; */
|
||||
align-items: center;
|
||||
padding-left: 30rpx;
|
||||
color: black;
|
||||
border-bottom: 1px solid rgb(209, 206, 206);
|
||||
}
|
||||
.item{
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
/* background-color: teal; */
|
||||
align-items: center;
|
||||
padding-left: 30rpx;
|
||||
color: black;
|
||||
}
|
||||
.item_name{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user