Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions moment/moment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
// pages/test2/test2.js
Page({

/**
* 页面的初始数据
*/
data: {


moment: [
{
id: 0,
pride: 2,
username: "小明",
userurl: 'https://p1.music.126.net/zF9HHBntAoqM_DJsEJkeDA==/109951164027525982.jpg',
intro: "小可分享了《春歌》",
content:"每一次看这歌词,就会让我想起自己的故事",
},
{
id: 1,
pride: 2,
username: "小hong",
userurl: 'https://p1.music.126.net/I1YJ0IxMFA2T4axSB8x_ww==/109951164026094675.jpg',
intro: "小可分享了《春歌》",
content: "这种淡淡的旋律直击心灵,难以忘怀",
},
{
id: 2,
pride: 2,
username: "小明",
userurl: 'https://p1.music.126.net/HKas-jZi5vtiRA5zHdREzw==/109951163989475693.jpg',
intro: "小可分享了《春歌》",
content: "每一次看这歌词,就会让我想起自己的故事",
},
{
id: 3,
pride: 2,
username: "小明",
userurl: 'https://p1.music.126.net/HKas-jZi5vtiRA5zHdREzw==/109951163989475693.jpg',
intro: "小可分享了《春歌》",
content: "每一次看这歌词,就会让我想起自己的故事",
}, {
id: 4,
pride: 2,
username: "小明",
userurl: 'https://p1.music.126.net/HKas-jZi5vtiRA5zHdREzw==/109951163989475693.jpg',
intro: "小可分享了《春歌》",
content: "每一次看这歌词,就会让我想起自己的故事",
}, {
id: 5,
pride: 2,
username: "小明",
userurl: 'https://p1.music.126.net/HKas-jZi5vtiRA5zHdREzw==/109951163989475693.jpg',
intro: "小可分享了《春歌》",
content: "每一次看这歌词,就会让我想起自己的故事",
}, {
id: 5,
pride: 2,
username: "小明",
userurl: 'https://p1.music.126.net/HKas-jZi5vtiRA5zHdREzw==/109951163989475693.jpg',
intro: "小可分享了《春歌》",
content: "每一次看这歌词,就会让我想起自己的故事",
}, {
id: 6,
pride: 2,
username: "小明",
userurl: 'https://p1.music.126.net/HKas-jZi5vtiRA5zHdREzw==/109951163989475693.jpg',
intro: "小可分享了《春歌》",
content: "每一次看这歌词,就会让我想起自己的故事",
}, {
id: 7,
pride: 2,
username: "小明",
userurl: 'https://p1.music.126.net/HKas-jZi5vtiRA5zHdREzw==/109951163989475693.jpg',
intro: "小可分享了《春歌》",
content: "每一次看这歌词,就会让我想起自己的故事",
},
]

},

/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {

}
})
3 changes: 3 additions & 0 deletions moment/moment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"usingComponents": {}
}
21 changes: 21 additions & 0 deletions moment/moment.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--pages/test2/test2.wxml-->
<view class='red'>社区动态</view>
<view class='container'>
<view class='f'>
<text class="text">分享歌曲</text>
<text class='text'>我的分享</text>
<text class='text'>我的收藏</text>
</view>


<scroll-view scroll-y class='view'>
<view class='blo' wx:for="{{moment}}">
<image class="pic" src="{{item.userurl}}" ></image>
<view class='little'>
<text class='intro'>{{item.intro}}</text>
<text class='content'>{{item.content}}</text>
</view>

</view>
</scroll-view>
</view>
79 changes: 79 additions & 0 deletions moment/moment.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/* pages/test2/test2.wxss */
@import '../../colorui/main.wxss';
@import '../../colorui/icon.wxss';


.red{
background:var(--red);
display: block;
height: 50px;
text-align: center;
padding:15px;
font-size: medium;
}
.container{
margin: 0;
padding: 0;
display: flex;
flex-direction: row;
align-items: unset;
width: 100vw;
height: 100vh;

}

.f{
display:flex;
width: 10vw;
flex-direction: column;
justify-content: center;
align-items: center;
padding-left: 20rpx;

}

.text{
width: 10px;
color:var(--cyan);
margin-bottom:50px;

}




.view{
width: 90vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-around;
justify-items: center;
padding: 25px;
}

.blo{
/*每个横着的整体块儿*/
margin: 15rpx;
display: flex;
flex-direction: row;
align-items: center;
}


.pic{
height: 20vw;
width: 40vw;
}

.blo .little{
display: flex;
flex-direction: column;
}
.intro{
padding: 15rpx;
}
.content{
width: 35vw;
padding: 15rpx;
}
1 change: 1 addition & 0 deletions 新建文本文档.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
welefjlajw