Browse Source

个人中心界面

master
lqq 6 years ago
parent
commit
5eee642237
  1. 11
      app.json
  2. 23
      pages/user/common/header/index.js
  3. 4
      pages/user/common/header/index.json
  4. 2
      pages/user/common/header/index.wxml
  5. 1
      pages/user/common/header/index.wxss
  6. 3
      pages/user/common/myActivity/index.json
  7. 3
      pages/user/common/myFavorite/index.json
  8. 3
      pages/user/common/myIdea/index.json
  9. 3
      pages/user/common/myMessage/index.json
  10. 3
      pages/user/common/myTopics/index.json
  11. 12
      pages/user/index.js
  12. 7
      pages/user/index.json
  13. 55
      pages/user/index.wxml
  14. 57
      pages/user/index.wxss
  15. 0
      pages/user/myActivity/index.js
  16. 4
      pages/user/myActivity/index.json
  17. 0
      pages/user/myActivity/index.wxml
  18. 0
      pages/user/myActivity/index.wxss
  19. 0
      pages/user/myFavorite/index.js
  20. 4
      pages/user/myFavorite/index.json
  21. 0
      pages/user/myFavorite/index.wxml
  22. 0
      pages/user/myFavorite/index.wxss
  23. 0
      pages/user/myIdea/index.js
  24. 4
      pages/user/myIdea/index.json
  25. 0
      pages/user/myIdea/index.wxml
  26. 0
      pages/user/myIdea/index.wxss
  27. 66
      pages/user/myInfo/index.js
  28. 4
      pages/user/myInfo/index.json
  29. 2
      pages/user/myInfo/index.wxml
  30. 1
      pages/user/myInfo/index.wxss
  31. 0
      pages/user/myMessage/index.js
  32. 4
      pages/user/myMessage/index.json
  33. 0
      pages/user/myMessage/index.wxml
  34. 0
      pages/user/myMessage/index.wxss
  35. 0
      pages/user/myTopics/index.js
  36. 4
      pages/user/myTopics/index.json
  37. 0
      pages/user/myTopics/index.wxml
  38. 0
      pages/user/myTopics/index.wxss
  39. 9
      project.config.json

11
app.json

@ -13,11 +13,12 @@
"pages/topics/common/goodIdea/index",
"pages/article/index",
"pages/register/index",
"pages/user/common/myActivity/index",
"pages/user/common/myFavorite/index",
"pages/user/common/myIdea/index",
"pages/user/common/myMessage/index",
"pages/user/common/myTopics/index"
"pages/user/myActivity/index",
"pages/user/myFavorite/index",
"pages/user/myIdea/index",
"pages/user/myMessage/index",
"pages/user/myTopics/index",
"pages/user/myInfo/index"
],
"window": {
"backgroundTextStyle": "light",

23
pages/user/common/header/index.js

@ -1,23 +0,0 @@
// pages/user/common/header/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

4
pages/user/common/header/index.json

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

2
pages/user/common/header/index.wxml

@ -1,2 +0,0 @@
<!--pages/user/common/header/index.wxml-->
<text>pages/user/common/header/index.wxml</text>

1
pages/user/common/header/index.wxss

@ -1 +0,0 @@
/* pages/user/common/header/index.wxss */

3
pages/user/common/myActivity/index.json

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

3
pages/user/common/myFavorite/index.json

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

3
pages/user/common/myIdea/index.json

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

3
pages/user/common/myMessage/index.json

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

3
pages/user/common/myTopics/index.json

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

12
pages/user/index.js

@ -4,8 +4,8 @@ Page({
/**
* 页面的初始数据
*/
data: {
list: ['我的消息', '我的议题', '我的收藏', '我的金点子', '我的活动']
data: {
},
/**
@ -14,7 +14,13 @@ Page({
onLoad: function (options) {
},
onTapItem (e) {
const {type} = e.currentTarget.dataset
console.log(type)
wx.navigateTo({
url: `/pages/user/${type}/index`,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

7
pages/user/index.json

@ -1,11 +1,6 @@
{
"navigationBarTitleText": "个人中心",
"usingComponents": {
"Header": "./common/header/index",
"MyMessage": "./common/myMessage/index",
"MyTopics": "./common/myTopics/index",
"MyFavorite": "./common/myFavorite/index",
"MyIdea": "./common/myIdea/index",
"MyActivity": "./common/myActivity/index",
"mp-cells":"/components/weui/cells/cells",
"mp-cell":"/components/weui/cell/cell"
}

55
pages/user/index.wxml

@ -1,13 +1,50 @@
<!--pages/user/index.wxml-->
<view class="content-wrapper">
<Header />
<mp-cells ext-class="my-cells">
<mp-cell link="true" hover="true" ext-class="my-cell" footer="说明文字">
<view class="cell-icon" Slot="icon">
<image style="width:15px;height:12px;" src="/images/user/msg.png"></image>
</view>
<view class="cell-title" Slot="title">我的消息</view>
<!-- <view class="cell-subTitle" Slot="footer">说明文字</view> -->
<view class="container">
<mp-cells ext-class="page_hd">
<mp-cell bindtap="onTapItem" data-type="myInfo">
<view class="user_hd">
<image slot="icon" class="user_logo" src=""/>
<view slot="title" class="user_name">啦啦啦拉两岸啦啦啦啦啦靓阿拉啦啦啦</view>
</view>
</mp-cell>
</mp-cells>
<mp-cells ext-class="page_bd">
<mp-cell
bindtap="onTapItem" data-type="myMessage"
icon="/images/user/msg.png"
title="我的消息"
link="true"
ext-class="cell-item">
<view slot="footer" class="msg_footer">你有5条消息</view>
</mp-cell>
<mp-cell
bindtap="onTapItem" data-type="myTopics"
icon="/images/user/topic.png"
title="我的议题"
link="true"
ext-class="cell-item">
</mp-cell>
<mp-cell
bindtap="onTapItem" data-type="myFavorite"
icon="/images/user/collect.png"
title="我的收藏"
link="true"
ext-class="cell-item">
</mp-cell>
<mp-cell
bindtap="onTapItem" data-type="myIdea"
icon="/images/user/pins.png"
title="我的金点子"
link="true"
ext-class="cell-item">
</mp-cell>
<mp-cell
bindtap="onTapItem" data-type="myActivity"
icon="/images/user/activity.png"
title="我的活动"
link="true"
ext-class="cell-item">
</mp-cell>
</mp-cells>
</view>

57
pages/user/index.wxss

@ -1,17 +1,54 @@
/* pages/user/index.wxss */
.my-cell{
.container {
background-color: #FAFAFA;
height: 100vh;
}
.page_hd {
border-bottom: 7px solid #f7f7f7;
}
.page_hd .weui-cells:before {
border-top: 0px solid white;
}
.page_hd .weui-cells:after {
border-bottom: 0px solid white;
}
.user_hd {
display: flex;
flex-direction: row;
align-items: center;
overflow: hidden;
}
.cell-icon{
width: 15px;
height: 15px;
.user_logo {
width: 80px;
height: 80px;
border-radius: 40px;
background-color: red;
}
.user_name {
width: 400rpx;
color: #292E3E;
padding-left: 10px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
/* 页面body */
.page_bd .weui-cell__hd {
display: flex;
align-items: center;
}
.cell-title{
color: #3B3B3B;
font-size: 14px;
.page_bd .weui-cell__icon {
width: 19px;
height: 16px;
padding: 0 10px 0 0;
}
.cell-subTitle{
color: #AAAAAA;
font-size: 12px;
.msg_footer:after {
content: "";
top: calc(50% - 5px);
left: -20px;
width: 8px;
height: 8px;
border-radius: 4px;
position: absolute;
background-color: red;
}

0
pages/user/common/myActivity/index.js → pages/user/myActivity/index.js

4
pages/user/myActivity/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "我的活动",
"usingComponents": {}
}

0
pages/user/common/myActivity/index.wxml → pages/user/myActivity/index.wxml

0
pages/user/common/myActivity/index.wxss → pages/user/myActivity/index.wxss

0
pages/user/common/myFavorite/index.js → pages/user/myFavorite/index.js

4
pages/user/myFavorite/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "我的收藏",
"usingComponents": {}
}

0
pages/user/common/myFavorite/index.wxml → pages/user/myFavorite/index.wxml

0
pages/user/common/myFavorite/index.wxss → pages/user/myFavorite/index.wxss

0
pages/user/common/myIdea/index.js → pages/user/myIdea/index.js

4
pages/user/myIdea/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "我的金点子",
"usingComponents": {}
}

0
pages/user/common/myIdea/index.wxml → pages/user/myIdea/index.wxml

0
pages/user/common/myIdea/index.wxss → pages/user/myIdea/index.wxss

66
pages/user/myInfo/index.js

@ -0,0 +1,66 @@
// pages/user/myInfo/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

4
pages/user/myInfo/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "个人资料",
"usingComponents": {}
}

2
pages/user/myInfo/index.wxml

@ -0,0 +1,2 @@
<!--pages/user/myInfo/index.wxml-->
<text>pages/user/myInfo/index.wxml</text>

1
pages/user/myInfo/index.wxss

@ -0,0 +1 @@
/* pages/user/myInfo/index.wxss */

0
pages/user/common/myMessage/index.js → pages/user/myMessage/index.js

4
pages/user/myMessage/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "我的消息",
"usingComponents": {}
}

0
pages/user/common/myMessage/index.wxml → pages/user/myMessage/index.wxml

0
pages/user/common/myMessage/index.wxss → pages/user/myMessage/index.wxss

0
pages/user/common/myTopics/index.js → pages/user/myTopics/index.js

4
pages/user/myTopics/index.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "我的议题",
"usingComponents": {}
}

0
pages/user/common/myTopics/index.wxml → pages/user/myTopics/index.wxml

0
pages/user/common/myTopics/index.wxss → pages/user/myTopics/index.wxss

9
project.config.json

@ -50,7 +50,7 @@
"list": []
},
"miniprogram": {
"current": 5,
"current": 6,
"list": [
{
"id": -1,
@ -91,6 +91,13 @@
"id": -1,
"name": "Register",
"pathName": "pages/register/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "User",
"pathName": "pages/user/index",
"scene": null
}
]

Loading…
Cancel
Save