「小程序JAVA实战」小程序我的个人信息页面开发(41)
转自:https://idig8.com/2018/09/05/xiaochengxujavashizhanxiaochengxuwodegerenxinxiyemiankaifa40/
已经完成了登录和注册页面已经开发完毕,当用户注册和登录完毕后,让用户登录到我们的个人信息页面,就是我的页面。源码:https://github.com/limingios/wxProgram.git 中No.15
我的页面的功能
- 当其他人查看我的信息,可以看到关注我,粉丝数量,关注数量,获赞数量。
- 当用户自己点击我的信息,可以看到上传视频,注销登录,粉丝数量,关注数量,获赞数量。
- 页面的设计

- mine文件内加入基本的小程序需要的元素

- mine.wxml
<view>
<view class='container'>
<image src="{{faceUrl}}" class="face"></image>
<label class='nickname'>{{nickname}}</label>
<button size='mini' class='primary' bindtap='uploadVideo'> 上传作品</button>
<button size='mini' type='' class='logout' bindtap='logout'>注销</button>
<button size='mini' type='' class='follow' data-followType='0' bindtap='followMe'>已关注</button>
<button size='mini' type='primary' class='follow' data-followType='1' bindtap='followMe'>关注我</button>
<view class='container-row'>
<label class='info-items'>{{fansCounts}} 粉丝</label>
<label class='info-items'>{{followCounts}} 关注</label>
<label class='info-items'>{{receiveLikeCounts}} 获赞</label>
</view>
</view>
</view>
<view class="line"></view>

- mine.js
// pages/mine/mine.js
Page({
/**
* 页面的初始数据
*/
data: {
faceUrl: "../../resource/images/noneface.png",
nickname: "昵称",
fansCounts: 0,
followCounts: 0,
receiveLikeCounts: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

- mine.wxss
page {
font-size: 14px;
}
.container {
background-color: whitesmoke;
display: flex;
flex-direction: column;
align-items: center;
}
.container-row {
display: flex;
flex-direction: row;
margin-bottom: 10px;
margin-top: 10px;
}
.info-items {
margin-left: 30px;
}
.face {
width: 180rpx;
height: 180rpx;
border-radius: 50%;
margin-top: 20px;
}
.nickname {
margin-top: 5px;
font-weight: bold;
font-size: 18px;
}
.logout {
margin-top: 3px;
float: right;
}
.follow {
margin-top: 3px;
}
.line {
width: 100%;
height: 1px;
background-color: gainsboro;
margin-top: 1px;
}
.container-video {
display: flex;
flex-direction: row;
margin-top: 20px;
text-align: center;
border: solid 1px;
line-height: 30px;
}
.video-info {
width: 100%;
}
.video-info-selected {
background-color: gainsboro;
}
.container-video-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.videoImage {
width: 250rpx;
height: 180px;
}

PS:下次针对页面的基本的功能增加一些后台的功能,
1. 注销(注销的接口)
2. 上传视频(比较大的功能)
3. 上传头像 (用户的头像的更改)
4. 用户的信息查询(用的粉丝数,点赞数,关注数)
「小程序JAVA实战」小程序我的个人信息页面开发(41)的更多相关文章
- 「小程序JAVA实战」小程序的个人信息作品,收藏,关注(66)
转自:https://idig8.com/2018/09/24/xiaochengxujavashizhanxiaochengxudegerenxinxizuopinshoucangguanzhu65 ...
- 「小程序JAVA实战」小程序首页视频(49)
转自:https://idig8.com/2018/09/21/xiaochengxujavashizhanxiaochengxushouyeshipin48/ 视频显示的内容是视频的截图,用户的头像 ...
- 「小程序JAVA实战」小程序头像图片上传(下)(45)
转自:https://idig8.com/2018/09/09/xiaochengxujavashizhanxiaochengxutouxiangtupianshangchuan44/ 接下来,我们应 ...
- 「小程序JAVA实战」小程序的横向视频和页面拦截(59)
转自:https://idig8.com/2018/09/24/xiaochengxujavashizhanxiaochengxudehengxiangshipinheyemianlanjie58/ ...
- 「小程序JAVA实战」小程序的flex布局(22)
转自:https://idig8.com/2018/08/09/xiaochengxu-chuji-22/ 之前已经把小程序的框架说完了,接下来说说小程序的组件,在说组件之前,先说说布局吧.源码:ht ...
- 「小程序JAVA实战」 小程序私有页面的生命周期以及导航(10)
转自:https://idig8.com/2018/08/09/xiaochengxu-chuji-10/ 之前讲了小程序全局的生命周期,今天咱们说说单个页面的生命周期!源码:https://gith ...
- 「小程序JAVA实战」小程序我的个人信息-注销功能(42)
转自:https://idig8.com/2018/09/06/xiaochengxujavashizhanxiaochengxuwodegerenxinxi-zhuxiaogongneng40/ 注 ...
- 「小程序JAVA实战」小程序的留言和评价功能(70)
转自:https://idig8.com/2018/10/28/xiaochengxujavashizhanxiaochengxudeliuyanhepingjiagongneng69/ 目前小程序这 ...
- 「小程序JAVA实战」小程序的举报功能开发(68)
转自:https://idig8.com/2018/09/25/xiaochengxujavashizhanxiaochengxudeweixinapicaidancaozuo66-2/ 通过点击举报 ...
随机推荐
- [pandas] SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame
转载自https://blog.csdn.net/blackyuanc/article/details/77892784 问题场景: 在读取CSV文件后,在新增一个特征列并根据已有特征修改 ...
- .net core web 中使用app.UseRouter的几种使用方式
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory ...
- 用python验证蒙提霍尔问题
最初看到这个问题是初中的时候买了一本有关数学谜题的书里面概率论的一张的课后拓展就是说到三门问题,当时作为一个扩展阅读看了一下,里面说到了一个世界智商最高的女人秒杀了美国一大群的数学高材生的精彩故事(比 ...
- You're Given a String...
You're given a string of lower-case Latin letters. Your task is to find the length of its longest su ...
- PDF去除签名
1.创建一个只有一页的PDF,用Acrobat打开.2.使用“文档->插入页面”,把有数字签名的文档插入到那一页后面.3.使用“文档->删除页面”,删除第一页,然后保存文档.
- cocos2dx 云彩特效
cocos2dx 云彩特效,就是一张云彩Png 图片从屏幕左边移动到右边,再从左边移动到右边 yuncai = static_cast<ImageView*>(Helper::seekWi ...
- How to install cacti on centos 6
Cacti – Network and performance monitoring tool Cacti is one of best monitoring tool used to monit ...
- Ipython notebook 一些技巧
在模块后面输入:?,运行可以显示说明: 输入:??,运行可以显示源代码. 输入%matplotlib inline将matplotlib库导入,要显示的图片就可以嵌入到网页中了 %prun用于代码的执 ...
- 轻量级封装DbUtils&Mybatis之四MyBatis主键
MyBatis主键 不支持对象列表存储时对自增id字段的赋值(至少包括3.2.6和3.3.0版本),如果id不是采用底层DB自增主键赋值,不必考虑此问题 温馨提示:分布式DB环境下,DB主键一般会采用 ...
- mqtt 异步消息 长连接 解析
mqtt 是轻量级基于代理的发布/订阅的消息传输协议,设计思想是开放,简单,轻量级,且易于实现,这些优点使得他受用于任何环境 该协议的特点有: 使用发布/订阅消息的模式,提供一对多的消息发布,解除应用 ...