parent
e88999738c
commit
62dfcdad82
Binary file not shown.
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* 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,19 +0,0 @@
|
||||
// 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
|
||||
}
|
||||
})
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"pages":[
|
||||
"pages/index/index",
|
||||
"pages/logs/logs"
|
||||
],
|
||||
"window":{
|
||||
"backgroundTextStyle":"light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "Weixin",
|
||||
"navigationBarTextStyle":"black"
|
||||
},
|
||||
"style": "v2",
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
/**app.wxss**/
|
||||
.container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 200rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
Before Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 329 KiB |
@ -1,3 +0,0 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
<!--index.wxml-->
|
||||
<view class="container">
|
||||
<image src='/images/bg_2.png' class="bg_2"></image>
|
||||
<image src='/images/start.png' animation="{{rotate}}" bindtap="start" class="start"></image>
|
||||
|
||||
<view class="detail">自选餐</view>
|
||||
<view class="detail">麻辣烫</view>
|
||||
<view class="detail">汉堡炸鸡</view>
|
||||
<view class="detail">面食</view>
|
||||
<view class="detail">烤盘饭</view>
|
||||
<view class="detail">煎饼果子</view>
|
||||
|
||||
<view class="btnView">
|
||||
<button class="btn1" type="warn" plain="true">返回</button>
|
||||
</view>
|
||||
</view>
|
@ -1,70 +0,0 @@
|
||||
/**index.wxss**/
|
||||
.container view{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
line-height: 100px;
|
||||
}
|
||||
.bg_2{
|
||||
width: 514rpx;
|
||||
height: 514rpx;
|
||||
position: absolute;
|
||||
top: 60rpx;
|
||||
}
|
||||
.start{
|
||||
width: 134rpx;
|
||||
height: 163rpx;
|
||||
position: absolute;
|
||||
top: 220rpx;
|
||||
}
|
||||
|
||||
.detail{
|
||||
position: absolute;
|
||||
}
|
||||
/* 自选餐 */
|
||||
.container>.detail:nth-child(3){
|
||||
top:20px;left:125px;
|
||||
width: 70px; height: 20px;
|
||||
font-weight:bold;
|
||||
color: rgb(3, 10, 32);
|
||||
}
|
||||
/* 麻辣烫 */
|
||||
.container>.detail:nth-child(4){
|
||||
top:60px;left:175px;
|
||||
width: 70px; height: 20px;
|
||||
font-weight:bold;
|
||||
color: rgb(0, 0, 0);
|
||||
}
|
||||
/* 炸鸡汉堡 */
|
||||
.container>.detail:nth-child(5){
|
||||
top:115px;left:180px;
|
||||
width: 70px; height: 20px;
|
||||
font-weight:bold;
|
||||
color: rgb(2, 3, 7);
|
||||
}
|
||||
/* 面食 */
|
||||
.container>.detail:nth-child(6){
|
||||
top:150px;left:125px;
|
||||
width: 70px; height: 20px;
|
||||
font-weight:bold;
|
||||
color: rgb(0, 4, 15);
|
||||
}
|
||||
/* 烤盘饭 */
|
||||
.container>.detail:nth-child(7){
|
||||
top: 118px;left:70px;
|
||||
width: 70px; height: 20px;
|
||||
font-weight:bold;
|
||||
color: rgb(0, 3, 12);
|
||||
}
|
||||
/* 煎饼果子 */
|
||||
.container>.detail:nth-child(8){
|
||||
top:60px;left:70px;
|
||||
width: 70px; height: 20px;
|
||||
font-weight:bold;
|
||||
color: rgb(0, 2, 7);
|
||||
}
|
||||
|
||||
.container>.btnView>.btn1{
|
||||
top:220px;left:-40px;
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
// 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
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "查看启动日志",
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<!--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>
|
@ -1,8 +0,0 @@
|
||||
.log-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 40rpx;
|
||||
}
|
||||
.log-item {
|
||||
margin: 10rpx;
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.19.4",
|
||||
"appid": "wx0c976aa21b9e6e57",
|
||||
"projectname": "miniprogram-92",
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 4
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||
"rules": [{
|
||||
"action": "allow",
|
||||
"page": "*"
|
||||
}]
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
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…
Reference in new issue