Merge pull request '梁鸿斌做的主页面,导航栏,推荐页面' (#5) from developer into master

pull/6/head
pnfwtvqce 1 year ago
commit 4de295346b

@ -0,0 +1,31 @@
/*
* Eslint config file
* Documentation: https://eslint.org/docs/user-guide/configuring/
* Install the Eslint extension before using this feature.
*/
module.exports = {
env: {
es6: true,
browser: true,
node: true,
},
ecmaFeatures: {
modules: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
// extends: 'eslint:recommended',
rules: {},
}

14
.gitignore vendored

@ -0,0 +1,14 @@
# Windows
[Dd]esktop.ini
Thumbs.db
$RECYCLE.BIN/
# macOS
.DS_Store
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
# Node.js
node_modules/

@ -0,0 +1,19 @@
// app.js
App({
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
},
globalData: {
userInfo: null
}
})

@ -0,0 +1,39 @@
{
"pages": [
"pages/index/index",
"pages/logs/logs",
"pages/commemorate/commemorate",
"pages/recommend/recommend"
],
"window": {
"backgroundTextStyle": "light",
"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,10 @@
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}

@ -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 */

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

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

@ -0,0 +1,40 @@
<!--index.wxml-->
<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,25 @@
/**index.wxss**/
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;
}
.menu .item{
display:flex;
flex-direction: column;
/**控制了文本的**/
align-items: center;
}

@ -0,0 +1,18 @@
// logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad() {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return {
date: util.formatTime(new Date(log)),
timeStamp: log
}
})
})
}
})

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "查看启动日志",
"usingComponents": {}
}

@ -0,0 +1,6 @@
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log.date}}</text>
</block>
</view>

@ -0,0 +1,8 @@
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}

@ -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 */

@ -0,0 +1,52 @@
{
"description": "项目配置文件",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"bundle": false,
"userConfirmedBundleSwitch": false,
"urlCheck": true,
"scopeDataCheck": false,
"coverView": true,
"es6": true,
"postcss": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"preloadBackgroundData": false,
"minified": true,
"autoAudits": false,
"newFeature": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"useIsolateContext": true,
"nodeModules": false,
"enhance": true,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"showShadowRootInWxmlPanel": true,
"packNpmManually": false,
"enableEngineNative": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"showES6CompileOption": false,
"minifyWXML": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.19.4",
"appid": "wx7f67447c72994c39",
"projectname": "miniprogram-92",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

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

@ -0,0 +1,7 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}

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

@ -0,0 +1,19 @@
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
}
const formatNumber = n => {
n = n.toString()
return n[1] ? n : `0${n}`
}
module.exports = {
formatTime
}
Loading…
Cancel
Save