第一次 #6

Closed
pnfwtvqce wants to merge 0 commits from master into zhouweikang_branch

@ -1,14 +1,39 @@
{
"pages": [
"pages/index/index",
"pages/logs/logs"
"pages/logs/logs",
"pages/commemorate/commemorate",
"pages/recommend/recommend"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "Weixin",
"navigationBarBackgroundColor": "#ddd",
"navigationBarTitleText": "银幕之旅",
"navigationBarTextStyle": "black"
},
"tabBar": {
"selectedColor": "#CD5C5C",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home_selected.png"
},
{
"pagePath": "pages/recommend/recommend",
"text": "推荐",
"iconPath": "static/tabbar/recommend.png",
"selectedIconPath": "static/tabbar/recommend_selected.png"
},
{
"pagePath": "pages/commemorate/commemorate",
"text": "纪念",
"iconPath": "static/tabbar/commemorate.png",
"selectedIconPath": "static/tabbar/commemorate_selected.png"
}
]
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}

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

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

@ -0,0 +1 @@
<text>纪念哦</text>

@ -0,0 +1 @@
/* pages/commemorate/commemorate.wxss */

@ -1,48 +1,66 @@
// index.js
// 获取应用实例
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
motto: 'Hello World',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo'),
canIUseGetUserProfile: false,
canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName') // 如需尝试获取用户信息可改为false
},
// 事件处理函数
bindViewTap() {
wx.navigateTo({
url: '../logs/logs'
})
},
onLoad() {
if (wx.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
})
}
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
getUserProfile(e) {
// 推荐使用wx.getUserProfile获取用户信息开发者每次通过该接口获取用户个人信息均需用户确认开发者妥善保管用户快速填写的头像昵称避免重复弹窗
wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res)
this.setData({
userInfo: res.userInfo,
hasUserInfo: true
})
}
})
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
getUserInfo(e) {
// 不推荐使用getUserInfo获取用户信息预计自2021年4月13日起getUserInfo将不再弹出弹窗并直接返回匿名的用户个人信息
console.log(e)
this.setData({
userInfo: e.detail.userInfo,
hasUserInfo: true
})
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -1,23 +1,40 @@
<!--index.wxml-->
<view class="container">
<view class="userinfo">
<block wx:if="{{canIUseOpenData}}">
<view class="userinfo-avatar" bindtap="bindViewTap">
<open-data type="userAvatarUrl"></open-data>
</view>
<open-data type="userNickName"></open-data>
</block>
<block wx:elif="{{!hasUserInfo}}">
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
<button wx:elif="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
<view wx:else> 请使用1.4.4及以上版本基础库 </view>
</block>
<block wx:else>
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
</block>
</view>
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
<text>当季热映🔥</text>
<view class="menu">
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
</view>

@ -1,19 +1,25 @@
/**index.wxss**/
.userinfo {
image{
width: 100rpx;
height: 100rpx;
border-radius: 50rpx;
}
/**容器**/
.menu{
height: 2000rpx;
border: 1rpx solid #ddd;
/**flex布局**/
display:flex;
/**主轴方向布局行排列row或者列排列column**/
flex-direction: column;
/**控制孩子布局flex-start,center,space-around,space-between**/
justify-content: space-around;
/**副轴方向布局**/
align-items: center;
color: #aaa;
}
.userinfo-avatar {
overflow: hidden;
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.usermotto {
margin-top: 200px;
.menu .item{
display:flex;
flex-direction: column;
/**控制了文本的**/
align-items: center;
}

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

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

@ -0,0 +1,39 @@
<text>可能喜欢(๑•̀ㅂ•́)و✧</text>
<view class="menu">
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
<view class="item">
<image src="/static/tabbar/movie.png"></image>
<text>阿斌</text>
</view>
</view>

@ -0,0 +1 @@
/* pages/recommend/recommend.wxss */

@ -37,7 +37,8 @@
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.19.4",

@ -1,6 +1,6 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "%E8%BD%AF%E5%B7%A5",
"projectname": "%E9%93%B6%E5%B9%95%E4%B9%8B%E6%97%85",
"setting": {
"compileHotReLoad": true
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Loading…
Cancel
Save