@ -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: {},
|
||||
}
|
@ -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,14 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "Weixin",
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
},
|
||||
"style": "v2",
|
||||
"componentFramework": "glass-easel",
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
}
|
@ -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,4 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
<!--pages/nav/nav.wxml-->
|
||||
<view class="lb">
|
||||
<swiper indicator-dots="true" autoplay="true" interval="1000" circular="true">
|
||||
<swiper-item>
|
||||
<image src="/pictures/IMG_6954.JPG" mode=""/>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="/pictures/IMG_6960.JPG" mode=""/>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="/pictures/IMG_6969.JPG" mode=""/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<view class="jgg">
|
||||
<view class="item">
|
||||
<image src="/pictures/美食.png" mode=""/>
|
||||
<text>美食</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pictures/洗浴.png" mode=""/>
|
||||
<text>洗浴</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pictures/装修.png" mode=""/>
|
||||
<text>装修</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="jgg">
|
||||
<view class="item">
|
||||
<image src="/pictures/美食.png" mode=""/>
|
||||
<text>美食</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pictures/美食.png" mode=""/>
|
||||
<text>美食</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pictures/美食.png" mode=""/>
|
||||
<text>美食</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="jgg" style="border-bottom: 0;">
|
||||
<view class="item">
|
||||
<image src="/pictures/美食.png" mode=""/>
|
||||
<text>美食</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pictures/美食.png" mode=""/>
|
||||
<text>美食</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image src="/pictures/美食.png" mode=""/>
|
||||
<text>美食</text>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,23 @@
|
||||
swiper{
|
||||
height: 350rpx;
|
||||
}
|
||||
swiper image{
|
||||
width: 100%;
|
||||
}
|
||||
.jgg{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid gray;
|
||||
}
|
||||
.item{
|
||||
width: 180rpx;
|
||||
font-size: 35rpx;
|
||||
margin-left: 50rpx;
|
||||
margin-top: 100rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.item image{
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
After Width: | Height: | Size: 1.6 MiB |
After Width: | Height: | Size: 2.2 MiB |
After Width: | Height: | Size: 3.1 MiB |
After Width: | Height: | Size: 2.3 MiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 1.6 MiB |
@ -0,0 +1,13 @@
|
||||
package routers
|
||||
|
||||
import (
|
||||
"web0325/controllers"
|
||||
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
// 路由
|
||||
func init() {
|
||||
beego.Router("/", &controllers.MainController{})
|
||||
beego.Router("/may", &controllers.MainController{}, "get.post:Mayday")
|
||||
}
|
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 8.4 KiB |
@ -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": "wxfabab2225eb5630e"
|
||||
}
|
@ -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
|
||||
}
|