main
feng xue 8 months ago
parent f16f450f4c
commit 3d0d0b9ebe

@ -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: {},
}

@ -1,2 +1,3 @@
# personal-formation5
![截图](./screen.png)

@ -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,46 @@
{
"pages": [
"pages/index/index",
"pages/list/list",
"pages/video/video",
"pages/picture/picture"
],
"tabBar": {
"color": "#ccc",
"selectedColor": "#ff4c91",
"borderStyle":"white",
"backgroundColor": "#fff",
"list": [{
"pagePath": "pages/index/index",
"text": "邀请函",
"iconPath": "/images/invite.png",
"selectedIconPath": "/images/invite.png"
},{
"pagePath": "pages/list/list",
"text": "照片",
"iconPath": "/images/marry.png",
"selectedIconPath": "/images/marry.png"
},{
"pagePath": "pages/video/video",
"text": "美好时光",
"iconPath": "/images/video.png",
"selectedIconPath": "/images/video.png"
},{
"pagePath": "pages/picture/picture",
"text": "宾客信息",
"iconPath": "/images/guest.png",
"selectedIconPath": "/images/guest.png"
}]
},
"window": {
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#ff4c91",
"navigationBarTextStyle":"white"
},
"style": "v2",
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents"
}

@ -0,0 +1,7 @@
/**app.wxss**/
page {
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

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

@ -0,0 +1,3 @@
{
"navigationBarTitleText": "邀请函"
}

@ -0,0 +1,31 @@
<!--pages/index/index.wxml-->
<image class="bg" src="/images/bg_1.png" mode=""/>
<view class="content">
<image class="content-gif" src="/images/save_the_date.gif" mode=""/>
<view class="content-title">邀请函</view>
<view class="content-avatar"><image class="image" src="/images/avatar.png" mode=""/></view>
<view class="content-info"></view>
<view class="content-address"></view>
<view class="content-info" >
<view class="content-name">
<image src="/images/tel.png" mode=""/>
<view>王辉辉</view>
<view>新郎 </view>
</view>
<view class="content-wedding">
<image src="/images/wedding.png" mode=""/>
</view>
<view class="content-name">
<image src="/images/tel.png" mode=""/>
<view>张琳琳</view>
<view>新娘</view>
</view>
</view>
<view class="content-address">
<view>我们诚邀您来参加我们的婚礼</view>
<view>时间2022年1月28日</view>
<view> 地点北京市海淀区xx路xx酒店</view>
</view>
</view>

@ -0,0 +1,73 @@
/* pages/index/index.wxss */
.bg{
width: 100vw;
height: 100vh;
}
.content{
width: 100vw;
height: 100vh;
position: fixed;
display: flex;
flex-direction: column;
align-items: center;
}
.content-gif{
width: 19vh;
height: 18.6vh;
margin-bottom: 1.5vh;
}
.content-title{
font-size: 5vh;
color: #ff4c91;
text-align: center;
margin-bottom: 2.5vh;
}
.image{
width: 24vh;
height: 21vh;
border: 2px solid #ff4c91;
border-radius: 50%;
}
.content-info{
width: 45vw;
text-align: center;
margin-top: 3vh;
display: flex;
align-items: center;
}
.content-name{
color: #ff4c91;
font-size: 2.7vh;
line-height: 4.5vh;
font-weight: bold;
position: relative;
}
.content-name > image{
width: 2.6vh;
height: 2.6vh;
border: 1px solid #ff4c91;
border-radius: 50%;
position: absolute;
top: -1vh;
right: -3.6vh;
}
.content-wedding{
flex: 1;
}
.content-wedding > image{
width: 5.5vh;
height: 5.5vh;
margin-left: 20rpx;
}
.content-address{
margin-top: 5vh;
color: #ec5f89;
font-size: 2.5vh;
font-weight: bold;
text-align: center;
line-height: 4.5vh;
}
.content-address view:first-child{
font-size: 3vh;
padding-bottom: 2vh;
}

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

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

@ -0,0 +1,2 @@
<!--pages/list/list.wxml-->
<text>pages/list/list.wxml</text>

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

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

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

@ -0,0 +1,2 @@
<!--pages/picture/picture.wxml-->
<text>pages/picture/picture.wxml</text>

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

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

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

@ -0,0 +1,2 @@
<!--pages/video/video.wxml-->
<text>pages/video/video.wxml</text>

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

@ -0,0 +1,28 @@
{
"compileType": "miniprogram",
"libVersion": "trial",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"condition": {},
"editorSetting": {
"tabIndent": "auto",
"tabSize": 2
},
"appid": "wxbd7d6bca05128b6b"
}

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 KiB

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

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