@ -1,2 +1,7 @@
|
||||
# profile3
|
||||
|
||||
本项目是一个婚礼邀请函
|
||||
效果如下:
|
||||

|
||||

|
||||

|
||||

|
||||
@ -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,49 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/guest/guest",
|
||||
"pages/video/video",
|
||||
"pages/picture/picture"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#ff4c91",
|
||||
"navigationBarTextStyle": "white"
|
||||
},
|
||||
"style": "v2",
|
||||
"componentFramework": "glass-easel",
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"lazyCodeLoading": "requiredComponents",
|
||||
"tabBar": {
|
||||
"color": "#ccc",
|
||||
"selectedColor": "#ff4c91",
|
||||
"borderStyle": "white",
|
||||
"backgroundColor": "#fff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "images/invite.png",
|
||||
"selectedIconPath": "images/invite.png",
|
||||
"text": "邀请函"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/picture/picture",
|
||||
"iconPath": "images/marry.png",
|
||||
"selectedIconPath": "images/marry.png",
|
||||
"text": "照片"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/video/video",
|
||||
"iconPath": "images/video.png",
|
||||
"selectedIconPath": "images/video.png",
|
||||
"text": "美好时光"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/guest/guest",
|
||||
"iconPath": "images/guest.png",
|
||||
"selectedIconPath": "images/guest.png",
|
||||
"text": "宾客信息"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 316 KiB |
|
After Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
@ -0,0 +1,66 @@
|
||||
// pages/guest/guest.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "邀请函"
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
<image class="bg" src="/images/bj_2.png" />
|
||||
<form>
|
||||
<view class="content">
|
||||
<!-- 姓名 -->
|
||||
<view class="input">
|
||||
<input name="name" placeholder-class="phcolor" placeholder="输入您的姓名" />
|
||||
</view>
|
||||
<!-- 手机号码 -->
|
||||
<view class="input">
|
||||
<input name="phone" placeholder-class="phcolor" placeholder="输入您的手机号码" />
|
||||
</view>
|
||||
<!-- 性别 -->
|
||||
<view class="radio">
|
||||
<text>请选择您的性别:</text>
|
||||
<radio-group>
|
||||
<radio>男</radio>
|
||||
<radio>女</radio>
|
||||
</radio-group>
|
||||
</view>
|
||||
<!-- 需要的点心 -->
|
||||
<view class="check">
|
||||
<text>请选择您需要的点心:</text>
|
||||
<checkbox-group>
|
||||
<checkbox>蛋糕</checkbox>
|
||||
<checkbox>甜甜圈</checkbox>
|
||||
<checkbox>巧克力</checkbox>
|
||||
</checkbox-group>
|
||||
</view>
|
||||
<button>提交</button>
|
||||
</view>
|
||||
</form>
|
||||
@ -0,0 +1,54 @@
|
||||
/* 背景图片 */
|
||||
.bg {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
/* 内容区域外层容器 */
|
||||
.content {
|
||||
width: 80vw;
|
||||
position: fixed;
|
||||
left: 10vw;
|
||||
bottom: 8vh;
|
||||
}
|
||||
/* 姓名和手机号码区域 */
|
||||
.content .input {
|
||||
font-size: large;
|
||||
border: 1rpx solid #ff4c91;
|
||||
border-radius: 10rpx;
|
||||
padding: 1.5vh 40rpx;
|
||||
margin-bottom: 1.5vh;
|
||||
color: #ff4c91;
|
||||
}
|
||||
/* 性别区域 */
|
||||
.content .radio {
|
||||
font-size: large;
|
||||
margin-bottom: 1.5vh;
|
||||
color: #ff4c91;
|
||||
display: flex;
|
||||
}
|
||||
/* 点心区域 */
|
||||
.content .check {
|
||||
font-size: large;
|
||||
margin-bottom: 1.5vh;
|
||||
color: #ff4c91;
|
||||
}
|
||||
.check checkbox-group {
|
||||
margin-top: 1.5vh;
|
||||
color: #ff4c91;
|
||||
}
|
||||
.check checkbox-group checkbox {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.check checkbox-group checkbox:nth-child(1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
/* 提交按钮 */
|
||||
.content button {
|
||||
font-size: large;
|
||||
background: #ff4c91;
|
||||
color: #fff;
|
||||
}
|
||||
/* 占位符样式 */
|
||||
.content .phcolor {
|
||||
color: #ff4c91;
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "邀请函"
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
/* 背景图片样式 */
|
||||
.bg {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* 内容区域外层容器样式 */
|
||||
.content {
|
||||
width: 80vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
bottom: 8vh;
|
||||
}
|
||||
|
||||
/* 顶部图片区域样式 */
|
||||
.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;
|
||||
}
|
||||
|
||||
/* 合照区域样式 */
|
||||
.content-avatar image {
|
||||
width: 24vh;
|
||||
height: 24vh;
|
||||
border: 3px solid #ff4c91;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* 新郎新娘姓名区域外层样式 */
|
||||
.content-info {
|
||||
width: 45vw;
|
||||
text-align: center;
|
||||
margin-top: 4vh;
|
||||
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;
|
||||
}
|
||||
|
||||
/* 婚礼信息区域第一个view样式 */
|
||||
.content-address view:first-child {
|
||||
font-size: 3vh;
|
||||
padding-bottom: 2vh;
|
||||
}
|
||||
@ -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 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
<!--logs.wxml-->
|
||||
<scroll-view class="scrollarea" scroll-y type="list">
|
||||
<block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
|
||||
<view class="log-item">{{index + 1}}. {{log.date}}</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
@ -0,0 +1,16 @@
|
||||
page {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.scrollarea {
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.log-item {
|
||||
margin-top: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.log-item:last-child {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
// pages/picture/picture.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "邀请函"
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
<swiper indicator-color="white" indicator-active-color="#ff4c91" indicator-dots autoplay interval="3500" duration="1000" vertical circular>
|
||||
<swiper-item>
|
||||
<image src="/images/timg1.jpg" />
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="/images/timg2.jpg" />
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="/images/timg3.jpg" />
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="/images/timg4.jpg" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@ -0,0 +1,7 @@
|
||||
swiper {
|
||||
height: 100vh;
|
||||
}
|
||||
image {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
// pages/video/video.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "邀请函"
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
.video {
|
||||
box-shadow: 0 8rpx 17rpx 0 rgba(7, 17, 27, 0.1);
|
||||
margin: 10rpx 25rpx;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.video-title {
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
}
|
||||
.video-time {
|
||||
font-size: 26rpx;
|
||||
color: #979797;
|
||||
}
|
||||
.video video {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
{
|
||||
"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": ""
|
||||
},
|
||||
"compileWorklet": false,
|
||||
"uglifyFileName": false,
|
||||
"uploadWithSourceMap": true,
|
||||
"packNpmManually": false,
|
||||
"minifyWXSS": true,
|
||||
"minifyWXML": true,
|
||||
"localPlugins": false,
|
||||
"condition": false,
|
||||
"swc": false,
|
||||
"disableSWC": true,
|
||||
"disableUseStrict": false,
|
||||
"useCompilerPlugins": false
|
||||
},
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "auto",
|
||||
"tabSize": 2
|
||||
},
|
||||
"appid": "wx43948905fd1ec84c",
|
||||
"simulatorPluginLibVersion": {}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 399 KiB |
|
After Width: | Height: | Size: 317 KiB |
|
After Width: | Height: | Size: 1012 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
|
||||
}
|
||||