diff --git a/.gitignore b/.gitignore index b694934..c1d6aa5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.venv \ No newline at end of file +.venv +.vscode diff --git a/README.md b/README.md index 462f928..e0dc7de 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ @@ -8,20 +8,24 @@ ## 在 `cqucc` 的一些代码 1. 目录结构 - ```sh - . - ├── DataStructure # 数据结构 - ├── PracticalTrain # 实训 - ├── Server # Node.js 从基础到项目实践 - ├── Spider # Python 网络爬虫基础教程 - └── Web # Web 前端开发技术 - ``` + + ```sh + . + ├── DataStructure # 数据结构 + ├── PracticalTrain # 实训 + ├── Server # Node.js 从基础到项目实践 + ├── Spider # Python 网络爬虫基础教程 + ├── WechatSmallProject # 微信小程序开发实战 + └── Web # Web 前端开发技术 + ``` 2. 目录 + - [数据结构](DataStructure/README.md) - [`Node.js` 从基础到项目实践](Server/README.md) - [`Python` 网络爬虫基础教程](Spider/README.md) - [`Web` 前端开发技术](Web/README.md) +- [微信小程序开发实战](WechatSmallProject/README.md) - [实训](PracticalTrain/README.md) ## 📜 License diff --git a/WechatSmallProject/README.md b/WechatSmallProject/README.md new file mode 100644 index 0000000..e7151e3 --- /dev/null +++ b/WechatSmallProject/README.md @@ -0,0 +1,19 @@ + + +## 微信小程序开发实战 + +### 文件介绍 + +```sh +. +├── images # 图片资源 +├── test1 # 实验1 +├── test2 # 实验2 +├── test3 # 实验3 +└── test4 # 实验4 +``` diff --git a/WechatSmallProject/test1/.eslintrc.js b/WechatSmallProject/test1/.eslintrc.js new file mode 100644 index 0000000..115cc02 --- /dev/null +++ b/WechatSmallProject/test1/.eslintrc.js @@ -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: {}, +} diff --git a/WechatSmallProject/test1/README.md b/WechatSmallProject/test1/README.md new file mode 100644 index 0000000..0550bd4 --- /dev/null +++ b/WechatSmallProject/test1/README.md @@ -0,0 +1,3 @@ +## 微信小程序课程实训 + +- 实验一: [实验一](./pages/demo1) diff --git a/WechatSmallProject/test1/app.js b/WechatSmallProject/test1/app.js new file mode 100644 index 0000000..4af33be --- /dev/null +++ b/WechatSmallProject/test1/app.js @@ -0,0 +1,2 @@ +// app.js +App({}) diff --git a/WechatSmallProject/test1/app.json b/WechatSmallProject/test1/app.json new file mode 100644 index 0000000..8c3ca75 --- /dev/null +++ b/WechatSmallProject/test1/app.json @@ -0,0 +1,14 @@ +{ + "pages": [ + "pages/demo1/demo1" + ], + "window": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "Weixin", + "navigationBarBackgroundColor": "#ffffff" + }, + "style": "v2", + "componentFramework": "glass-easel", + "sitemapLocation": "sitemap.json", + "lazyCodeLoading": "requiredComponents" +} \ No newline at end of file diff --git a/WechatSmallProject/test1/app.wxss b/WechatSmallProject/test1/app.wxss new file mode 100644 index 0000000..06c6fc9 --- /dev/null +++ b/WechatSmallProject/test1/app.wxss @@ -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; +} diff --git a/WechatSmallProject/test1/images/demo1/193_会议室.png b/WechatSmallProject/test1/images/demo1/193_会议室.png new file mode 100644 index 0000000..10460a0 Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_会议室.png differ diff --git a/WechatSmallProject/test1/images/demo1/193_公告.png b/WechatSmallProject/test1/images/demo1/193_公告.png new file mode 100644 index 0000000..c46f7ff Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_公告.png differ diff --git a/WechatSmallProject/test1/images/demo1/193_共享中心.png b/WechatSmallProject/test1/images/demo1/193_共享中心.png new file mode 100644 index 0000000..c0434eb Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_共享中心.png differ diff --git a/WechatSmallProject/test1/images/demo1/193_报修.png b/WechatSmallProject/test1/images/demo1/193_报修.png new file mode 100644 index 0000000..00c2772 Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_报修.png differ diff --git a/WechatSmallProject/test1/images/demo1/193_推广.png b/WechatSmallProject/test1/images/demo1/193_推广.png new file mode 100644 index 0000000..56fced1 Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_推广.png differ diff --git a/WechatSmallProject/test1/images/demo1/193_活动.png b/WechatSmallProject/test1/images/demo1/193_活动.png new file mode 100644 index 0000000..db63e1e Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_活动.png differ diff --git a/WechatSmallProject/test1/images/demo1/193_流程.png b/WechatSmallProject/test1/images/demo1/193_流程.png new file mode 100644 index 0000000..647bcc9 Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_流程.png differ diff --git a/WechatSmallProject/test1/images/demo1/193_通讯录.png b/WechatSmallProject/test1/images/demo1/193_通讯录.png new file mode 100644 index 0000000..62bc690 Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_通讯录.png differ diff --git a/WechatSmallProject/test1/images/demo1/193_食堂.png b/WechatSmallProject/test1/images/demo1/193_食堂.png new file mode 100644 index 0000000..4f97140 Binary files /dev/null and b/WechatSmallProject/test1/images/demo1/193_食堂.png differ diff --git a/WechatSmallProject/test1/pages/demo1/demo1.js b/WechatSmallProject/test1/pages/demo1/demo1.js new file mode 100644 index 0000000..1ffa2a5 --- /dev/null +++ b/WechatSmallProject/test1/pages/demo1/demo1.js @@ -0,0 +1,66 @@ +// pages/demo1/demo1.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/WechatSmallProject/test1/pages/demo1/demo1.json b/WechatSmallProject/test1/pages/demo1/demo1.json new file mode 100644 index 0000000..44e5777 --- /dev/null +++ b/WechatSmallProject/test1/pages/demo1/demo1.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "实验一", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" +} \ No newline at end of file diff --git a/WechatSmallProject/test1/pages/demo1/demo1.wxml b/WechatSmallProject/test1/pages/demo1/demo1.wxml new file mode 100644 index 0000000..8f0cbb4 --- /dev/null +++ b/WechatSmallProject/test1/pages/demo1/demo1.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + 会议室 + + + 公告 + + + 报修 + + + 共享中心 + + + 活动 + + + 流程 + + + 食堂 + + + 通讯录 + + + 推广 + + + \ No newline at end of file diff --git a/WechatSmallProject/test1/pages/demo1/demo1.wxss b/WechatSmallProject/test1/pages/demo1/demo1.wxss new file mode 100644 index 0000000..3e84270 --- /dev/null +++ b/WechatSmallProject/test1/pages/demo1/demo1.wxss @@ -0,0 +1,53 @@ +.demo1-container { + height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + box-sizing: border-box; +} + +.lbt { + width: 100%; + height: 300rpx; +} + +swiper-item { + display: flex; +} + +swiper-item>image { + flex: 1; +} + +.jgg { + width: 100%; + flex: 1; + display: flex; + width: 100%; + flex-wrap: wrap; +} + +.jgg .items { + width: 33.33%; + height: 33.33%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + box-sizing: border-box; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +.jgg .items>image { + width: 100rpx; + height: 100rpx; +} + +.jgg .items:nth-child(3) { + border-right: none; +} + +.jgg .items:nth-last-child(6) { + border-bottom: none; +} \ No newline at end of file diff --git a/WechatSmallProject/test1/project.config.json b/WechatSmallProject/test1/project.config.json new file mode 100644 index 0000000..003cb85 --- /dev/null +++ b/WechatSmallProject/test1/project.config.json @@ -0,0 +1,35 @@ +{ + "setting": { + "es6": true, + "postcss": true, + "minified": true, + "uglifyFileName": false, + "enhance": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "useCompilerPlugins": false, + "minifyWXML": true, + "compileWorklet": false, + "uploadWithSourceMap": true, + "packNpmManually": false, + "minifyWXSS": true, + "localPlugins": false, + "disableUseStrict": false, + "condition": false, + "swc": false, + "disableSWC": true + }, + "compileType": "miniprogram", + "simulatorPluginLibVersion": {}, + "packOptions": { + "ignore": [], + "include": [] + }, + "appid": "wx8c60a45abd90774a", + "editorSetting": {}, + "libVersion": "3.15.1" +} \ No newline at end of file diff --git a/WechatSmallProject/test1/project.private.config.json b/WechatSmallProject/test1/project.private.config.json new file mode 100644 index 0000000..aadbb6e --- /dev/null +++ b/WechatSmallProject/test1/project.private.config.json @@ -0,0 +1,22 @@ +{ + "libVersion": "3.15.1", + "projectname": "test1", + "setting": { + "urlCheck": true, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "skylineRenderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "compileHotReLoad": true, + "useApiHook": true, + "useApiHostProcess": true, + "useStaticServer": false, + "useLanDebug": false, + "showES6CompileOption": false, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true, + "bigPackageSizeSupport": false + } +} \ No newline at end of file diff --git a/WechatSmallProject/test1/sitemap.json b/WechatSmallProject/test1/sitemap.json new file mode 100644 index 0000000..cd24f35 --- /dev/null +++ b/WechatSmallProject/test1/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/WechatSmallProject/test2/.eslintrc.js b/WechatSmallProject/test2/.eslintrc.js new file mode 100644 index 0000000..115cc02 --- /dev/null +++ b/WechatSmallProject/test2/.eslintrc.js @@ -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: {}, +} diff --git a/WechatSmallProject/test2/README.md b/WechatSmallProject/test2/README.md new file mode 100644 index 0000000..0550bd4 --- /dev/null +++ b/WechatSmallProject/test2/README.md @@ -0,0 +1,3 @@ +## 微信小程序课程实训 + +- 实验一: [实验一](./pages/demo1) diff --git a/WechatSmallProject/test2/app.js b/WechatSmallProject/test2/app.js new file mode 100644 index 0000000..4af33be --- /dev/null +++ b/WechatSmallProject/test2/app.js @@ -0,0 +1,2 @@ +// app.js +App({}) diff --git a/WechatSmallProject/test2/app.json b/WechatSmallProject/test2/app.json new file mode 100644 index 0000000..b9126e4 --- /dev/null +++ b/WechatSmallProject/test2/app.json @@ -0,0 +1,45 @@ +{ + "pages": [ + "pages/demo2/demo2", + "pages/demo2/guest/guest", + "pages/demo2/video/video", + "pages/demo2/picture/picture" + ], + "style": "v2", + "renderer": "webview", + "componentFramework": "glass-easel", + "sitemapLocation": "sitemap.json", + "lazyCodeLoading": "requiredComponents", + "tabBar": { + "color": "#ccc", + "selectedColor": "#ff4c91", + "borderStyle": "white", + "backgroundColor": "#fff", + "list": [ + { + "pagePath": "pages/demo2/demo2", + "text": "邀请函", + "iconPath": "images/demo2/invite.png", + "selectedIconPath": "images/demo2/invite.png" + }, + { + "pagePath": "pages/demo2/picture/picture", + "text": "照片", + "iconPath": "images/demo2/marry.png", + "selectedIconPath": "images/demo2/marry.png" + }, + { + "pagePath": "pages/demo2/video/video", + "text": "美好时光", + "iconPath": "images/demo2/video.png", + "selectedIconPath": "images/demo2/video.png" + }, + { + "pagePath": "pages/demo2/guest/guest", + "text": "宾客信息", + "iconPath": "images/demo2/guest.png", + "selectedIconPath": "images/demo2/guest.png" + } + ] + } +} \ No newline at end of file diff --git a/WechatSmallProject/test2/app.wxss b/WechatSmallProject/test2/app.wxss new file mode 100644 index 0000000..06c6fc9 --- /dev/null +++ b/WechatSmallProject/test2/app.wxss @@ -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; +} diff --git a/WechatSmallProject/test2/components/navigation-bar/navigation-bar.js b/WechatSmallProject/test2/components/navigation-bar/navigation-bar.js new file mode 100644 index 0000000..eb1770e --- /dev/null +++ b/WechatSmallProject/test2/components/navigation-bar/navigation-bar.js @@ -0,0 +1,102 @@ +Component({ + options: { + multipleSlots: true // 在组件定义时的选项中启用多slot支持 + }, + /** + * 组件的属性列表 + */ + properties: { + extClass: { + type: String, + value: '' + }, + title: { + type: String, + value: '' + }, + background: { + type: String, + value: '' + }, + color: { + type: String, + value: '' + }, + back: { + type: Boolean, + value: true + }, + loading: { + type: Boolean, + value: false + }, + homeButton: { + type: Boolean, + value: false, + }, + animated: { + // 显示隐藏的时候opacity动画效果 + type: Boolean, + value: true + }, + show: { + // 显示隐藏导航,隐藏的时候navigation-bar的高度占位还在 + type: Boolean, + value: true, + observer: '_showChange' + }, + // back为true的时候,返回的页面深度 + delta: { + type: Number, + value: 1 + }, + }, + /** + * 组件的初始数据 + */ + data: { + displayStyle: '' + }, + lifetimes: { + attached() { + const rect = wx.getMenuButtonBoundingClientRect() + const platform = (wx.getDeviceInfo() || wx.getSystemInfoSync()).platform + const isAndroid = platform === 'android' + const isDevtools = platform === 'devtools' + const { windowWidth, safeArea: { top = 0, bottom = 0 } = {} } = wx.getWindowInfo() || wx.getSystemInfoSync() + this.setData({ + ios: !isAndroid, + innerPaddingRight: `padding-right: ${windowWidth - rect.left}px`, + leftWidth: `width: ${windowWidth - rect.left}px`, + safeAreaTop: isDevtools || isAndroid ? `height: calc(var(--height) + ${top}px); padding-top: ${top}px` : `` + }) + }, + }, + /** + * 组件的方法列表 + */ + methods: { + _showChange(show) { + const animated = this.data.animated + let displayStyle = '' + if (animated) { + displayStyle = `opacity: ${show ? '1' : '0' + };transition:opacity 0.5s;` + } else { + displayStyle = `display: ${show ? '' : 'none'}` + } + this.setData({ + displayStyle + }) + }, + back() { + const data = this.data + if (data.delta) { + wx.navigateBack({ + delta: data.delta + }) + } + this.triggerEvent('back', { delta: data.delta }, {}) + } + }, +}) diff --git a/WechatSmallProject/test2/components/navigation-bar/navigation-bar.json b/WechatSmallProject/test2/components/navigation-bar/navigation-bar.json new file mode 100644 index 0000000..4a20f17 --- /dev/null +++ b/WechatSmallProject/test2/components/navigation-bar/navigation-bar.json @@ -0,0 +1,5 @@ +{ + "component": true, + "styleIsolation": "apply-shared", + "usingComponents": {} +} \ No newline at end of file diff --git a/WechatSmallProject/test2/components/navigation-bar/navigation-bar.wxml b/WechatSmallProject/test2/components/navigation-bar/navigation-bar.wxml new file mode 100644 index 0000000..be9a663 --- /dev/null +++ b/WechatSmallProject/test2/components/navigation-bar/navigation-bar.wxml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{title}} + + + + + + + + + + + + diff --git a/WechatSmallProject/test2/components/navigation-bar/navigation-bar.wxss b/WechatSmallProject/test2/components/navigation-bar/navigation-bar.wxss new file mode 100644 index 0000000..8bd379e --- /dev/null +++ b/WechatSmallProject/test2/components/navigation-bar/navigation-bar.wxss @@ -0,0 +1,96 @@ +.weui-navigation-bar { + --weui-FG-0:rgba(0,0,0,.9); + --height: 44px; + --left: 16px; +} +.weui-navigation-bar .android { + --height: 48px; +} + +.weui-navigation-bar { + overflow: hidden; + color: var(--weui-FG-0); + flex: none; +} + +.weui-navigation-bar__inner { + position: relative; + top: 0; + left: 0; + height: calc(var(--height) + env(safe-area-inset-top)); + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + padding-top: env(safe-area-inset-top); + width: 100%; + box-sizing: border-box; +} + +.weui-navigation-bar__left { + position: relative; + padding-left: var(--left); + display: flex; + flex-direction: row; + align-items: flex-start; + height: 100%; + box-sizing: border-box; +} + +.weui-navigation-bar__btn_goback_wrapper { + padding: 11px 18px 11px 16px; + margin: -11px -18px -11px -16px; +} + +.weui-navigation-bar__btn_goback_wrapper.weui-active { + opacity: 0.5; +} + +.weui-navigation-bar__btn_goback { + font-size: 12px; + width: 12px; + height: 24px; + -webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%; + mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%; + -webkit-mask-size: cover; + mask-size: cover; + background-color: var(--weui-FG-0); +} + +.weui-navigation-bar__center { + font-size: 17px; + text-align: center; + position: relative; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + font-weight: bold; + flex: 1; + height: 100%; +} + +.weui-navigation-bar__loading { + margin-right: 4px; + align-items: center; +} + +.weui-loading { + font-size: 16px; + width: 16px; + height: 16px; + display: block; + background: transparent url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23606060' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23606060' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23606060' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A") no-repeat; + background-size: 100%; + margin-left: 0; + animation: loading linear infinite 1s; +} + +@keyframes loading { + from { + transform: rotate(0); + } + to { + transform: rotate(360deg); + } +} diff --git a/WechatSmallProject/test2/images/demo2/avatar.png b/WechatSmallProject/test2/images/demo2/avatar.png new file mode 100644 index 0000000..20ab9f6 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/avatar.png differ diff --git a/WechatSmallProject/test2/images/demo2/bg_1.png b/WechatSmallProject/test2/images/demo2/bg_1.png new file mode 100644 index 0000000..667d4f5 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/bg_1.png differ diff --git a/WechatSmallProject/test2/images/demo2/bj_2.png b/WechatSmallProject/test2/images/demo2/bj_2.png new file mode 100644 index 0000000..60e7fad Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/bj_2.png differ diff --git a/WechatSmallProject/test2/images/demo2/guest.png b/WechatSmallProject/test2/images/demo2/guest.png new file mode 100644 index 0000000..6d296a4 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/guest.png differ diff --git a/WechatSmallProject/test2/images/demo2/invite.png b/WechatSmallProject/test2/images/demo2/invite.png new file mode 100644 index 0000000..d61de76 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/invite.png differ diff --git a/WechatSmallProject/test2/images/demo2/marry.png b/WechatSmallProject/test2/images/demo2/marry.png new file mode 100644 index 0000000..dc553fa Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/marry.png differ diff --git a/WechatSmallProject/test2/images/demo2/save_the_date.gif b/WechatSmallProject/test2/images/demo2/save_the_date.gif new file mode 100644 index 0000000..49ed478 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/save_the_date.gif differ diff --git a/WechatSmallProject/test2/images/demo2/tel.png b/WechatSmallProject/test2/images/demo2/tel.png new file mode 100644 index 0000000..f0aa13a Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/tel.png differ diff --git a/WechatSmallProject/test2/images/demo2/timg1.jpg b/WechatSmallProject/test2/images/demo2/timg1.jpg new file mode 100644 index 0000000..2c6345c Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/timg1.jpg differ diff --git a/WechatSmallProject/test2/images/demo2/timg2.jpg b/WechatSmallProject/test2/images/demo2/timg2.jpg new file mode 100644 index 0000000..a5823a6 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/timg2.jpg differ diff --git a/WechatSmallProject/test2/images/demo2/timg3.jpg b/WechatSmallProject/test2/images/demo2/timg3.jpg new file mode 100644 index 0000000..f150567 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/timg3.jpg differ diff --git a/WechatSmallProject/test2/images/demo2/timg4.jpg b/WechatSmallProject/test2/images/demo2/timg4.jpg new file mode 100644 index 0000000..7d76c44 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/timg4.jpg differ diff --git a/WechatSmallProject/test2/images/demo2/video.png b/WechatSmallProject/test2/images/demo2/video.png new file mode 100644 index 0000000..4daa739 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/video.png differ diff --git a/WechatSmallProject/test2/images/demo2/wedding.png b/WechatSmallProject/test2/images/demo2/wedding.png new file mode 100644 index 0000000..42635f7 Binary files /dev/null and b/WechatSmallProject/test2/images/demo2/wedding.png differ diff --git a/WechatSmallProject/test2/pages/demo2/demo2.js b/WechatSmallProject/test2/pages/demo2/demo2.js new file mode 100644 index 0000000..ea54de3 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/demo2.js @@ -0,0 +1,66 @@ +// pages/demo2/demo2.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/demo2.json b/WechatSmallProject/test2/pages/demo2/demo2.json new file mode 100644 index 0000000..93bf6b5 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/demo2.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "邀请函", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" +} \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/demo2.wxml b/WechatSmallProject/test2/pages/demo2/demo2.wxml new file mode 100644 index 0000000..622c1de --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/demo2.wxml @@ -0,0 +1,28 @@ + + + + 邀请函 + + + + + + + 王辉辉 + 新郎 + + + + + + + 张琳琳 + 新娘 + + + + 我们诚邀请您来参加我们的婚礼 + 时间:2022年1月28日 + 地点:北京市海淀区 XX路 XX酒店 + + \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/demo2.wxss b/WechatSmallProject/test2/pages/demo2/demo2.wxss new file mode 100644 index 0000000..a7be528 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/demo2.wxss @@ -0,0 +1,92 @@ +page { + display: flex; + flex-direction: column; + justify-content: space-between; + box-sizing: border-box; +} + +.demo2-container { + height: 100vh; + width: 100vw; + display: flex; + flex-direction: column; + align-items: center; + position: relative; +} + +.bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -1; +} + +.content-gif { + width: 19vh; + height: 18.6vh; +} + +.content-title { + font-size: 5vh; + color: #ff4c91; + text-align: center; + margin-bottom: 2.5vh; +} + +.content-avatar image { + width: 24vh; + height: 24vh; + border: 2px 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; + 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; +} \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/guest/guest.js b/WechatSmallProject/test2/pages/demo2/guest/guest.js new file mode 100644 index 0000000..3c34518 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/guest/guest.js @@ -0,0 +1,66 @@ +// pages/demo2/guest/guest.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/guest/guest.json b/WechatSmallProject/test2/pages/demo2/guest/guest.json new file mode 100644 index 0000000..5b86b55 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/guest/guest.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "宾客信息", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" +} \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/guest/guest.wxml b/WechatSmallProject/test2/pages/demo2/guest/guest.wxml new file mode 100644 index 0000000..e7ba2b8 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/guest/guest.wxml @@ -0,0 +1,28 @@ + + +
+ + + + + + + + + 请选择您的性别: + + + + + + + 请选择您需要的点心: + + 蛋糕 + 甜甜圈 + 巧克力 + + + + +
\ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/guest/guest.wxss b/WechatSmallProject/test2/pages/demo2/guest/guest.wxss new file mode 100644 index 0000000..f65a2eb --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/guest/guest.wxss @@ -0,0 +1,56 @@ +.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; +} \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/picture/picture.js b/WechatSmallProject/test2/pages/demo2/picture/picture.js new file mode 100644 index 0000000..db1c805 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/picture/picture.js @@ -0,0 +1,66 @@ +// pages/demo2/picture/picture.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/picture/picture.json b/WechatSmallProject/test2/pages/demo2/picture/picture.json new file mode 100644 index 0000000..dab689b --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/picture/picture.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "图片", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" +} \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/picture/picture.wxml b/WechatSmallProject/test2/pages/demo2/picture/picture.wxml new file mode 100644 index 0000000..08407b6 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/picture/picture.wxml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/picture/picture.wxss b/WechatSmallProject/test2/pages/demo2/picture/picture.wxss new file mode 100644 index 0000000..2e56ef1 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/picture/picture.wxss @@ -0,0 +1,9 @@ +/* pages/demo2/picture/picture.wxss */ +swiper { + height: 100vh; +} + +image { + width: 100vw; + height: 100vh; +} \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/video/video.js b/WechatSmallProject/test2/pages/demo2/video/video.js new file mode 100644 index 0000000..8e7a9a9 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/video/video.js @@ -0,0 +1,66 @@ +// pages/demo2/video/video.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/video/video.json b/WechatSmallProject/test2/pages/demo2/video/video.json new file mode 100644 index 0000000..789bd56 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/video/video.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "美好时光", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" +} \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/video/video.wxml b/WechatSmallProject/test2/pages/demo2/video/video.wxml new file mode 100644 index 0000000..e1ff081 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/video/video.wxml @@ -0,0 +1,16 @@ + + + 标题:海边随拍 + 拍摄日期:2022-01-01 + + + + 标题:勿忘初心 + 拍摄日期:2022-01-10 + + + + 标题:十年之约 + 拍摄日期:2022-01-20 + + \ No newline at end of file diff --git a/WechatSmallProject/test2/pages/demo2/video/video.wxss b/WechatSmallProject/test2/pages/demo2/video/video.wxss new file mode 100644 index 0000000..b5064e8 --- /dev/null +++ b/WechatSmallProject/test2/pages/demo2/video/video.wxss @@ -0,0 +1,19 @@ +/* pages/demo2/video/video.wxss */ +.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: #fffF; +} + +.video-title { + font-size: 35rpx; + color: #333; +} + +.video video { + width: 100%; + margin-top: 20rpx; +} \ No newline at end of file diff --git a/WechatSmallProject/test2/project.config.json b/WechatSmallProject/test2/project.config.json new file mode 100644 index 0000000..003cb85 --- /dev/null +++ b/WechatSmallProject/test2/project.config.json @@ -0,0 +1,35 @@ +{ + "setting": { + "es6": true, + "postcss": true, + "minified": true, + "uglifyFileName": false, + "enhance": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "useCompilerPlugins": false, + "minifyWXML": true, + "compileWorklet": false, + "uploadWithSourceMap": true, + "packNpmManually": false, + "minifyWXSS": true, + "localPlugins": false, + "disableUseStrict": false, + "condition": false, + "swc": false, + "disableSWC": true + }, + "compileType": "miniprogram", + "simulatorPluginLibVersion": {}, + "packOptions": { + "ignore": [], + "include": [] + }, + "appid": "wx8c60a45abd90774a", + "editorSetting": {}, + "libVersion": "3.15.1" +} \ No newline at end of file diff --git a/WechatSmallProject/test2/project.private.config.json b/WechatSmallProject/test2/project.private.config.json new file mode 100644 index 0000000..50fabf3 --- /dev/null +++ b/WechatSmallProject/test2/project.private.config.json @@ -0,0 +1,22 @@ +{ + "libVersion": "3.15.1", + "projectname": "test2", + "setting": { + "urlCheck": true, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "skylineRenderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "compileHotReLoad": true, + "useApiHook": true, + "useApiHostProcess": true, + "useStaticServer": false, + "useLanDebug": false, + "showES6CompileOption": false, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true, + "bigPackageSizeSupport": false + } +} \ No newline at end of file diff --git a/WechatSmallProject/test2/server/.gitignore b/WechatSmallProject/test2/server/.gitignore new file mode 100644 index 0000000..f52e6f5 --- /dev/null +++ b/WechatSmallProject/test2/server/.gitignore @@ -0,0 +1,2 @@ +node_modules +pnpm-lock.yaml \ No newline at end of file diff --git a/WechatSmallProject/test2/server/htdocs/01.mp4 b/WechatSmallProject/test2/server/htdocs/01.mp4 new file mode 100644 index 0000000..06e937a Binary files /dev/null and b/WechatSmallProject/test2/server/htdocs/01.mp4 differ diff --git a/WechatSmallProject/test2/server/htdocs/02.mp4 b/WechatSmallProject/test2/server/htdocs/02.mp4 new file mode 100644 index 0000000..03450ec Binary files /dev/null and b/WechatSmallProject/test2/server/htdocs/02.mp4 differ diff --git a/WechatSmallProject/test2/server/htdocs/03.mp4 b/WechatSmallProject/test2/server/htdocs/03.mp4 new file mode 100644 index 0000000..5364c33 Binary files /dev/null and b/WechatSmallProject/test2/server/htdocs/03.mp4 differ diff --git a/WechatSmallProject/test2/server/index.js b/WechatSmallProject/test2/server/index.js new file mode 100644 index 0000000..427ce91 --- /dev/null +++ b/WechatSmallProject/test2/server/index.js @@ -0,0 +1,9 @@ +var express = require('express'); + +var app = express(); + +app.use(express.static('./htdocs')); + +app.listen(3000, res => { + console.log('服务器启动成功,访问地址:http://127.0.0.1:3000/文件名'); +}); diff --git a/WechatSmallProject/test2/server/package.json b/WechatSmallProject/test2/server/package.json new file mode 100644 index 0000000..f33d89c --- /dev/null +++ b/WechatSmallProject/test2/server/package.json @@ -0,0 +1,16 @@ +{ + "name": "music", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "start": "node index.js" + }, + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.18.1", + "multiparty": "^4.2.1", + "serve-index": "^1.9.1" + } +} \ No newline at end of file diff --git a/WechatSmallProject/test2/server/使用说明.txt b/WechatSmallProject/test2/server/使用说明.txt new file mode 100644 index 0000000..1f92c82 --- /dev/null +++ b/WechatSmallProject/test2/server/使用说明.txt @@ -0,0 +1,17 @@ +1. ׼ +װNode.js +УлĿ¼ǰĿ¼ + +2. ִ +node index.js + +3. ƵƵļhtdocsĿ¼ + +4. ȡļ + +http://127.0.0.1:3000/ļ + +磺 +http://127.0.0.1:3000/1.mp4 +http://127.0.0.1:3000/2.mp4 + diff --git a/WechatSmallProject/test2/sitemap.json b/WechatSmallProject/test2/sitemap.json new file mode 100644 index 0000000..cd24f35 --- /dev/null +++ b/WechatSmallProject/test2/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/WechatSmallProject/test3/app.js b/WechatSmallProject/test3/app.js new file mode 100644 index 0000000..1ed57c4 --- /dev/null +++ b/WechatSmallProject/test3/app.js @@ -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 + } +}) diff --git a/WechatSmallProject/test3/app.json b/WechatSmallProject/test3/app.json new file mode 100644 index 0000000..7508301 --- /dev/null +++ b/WechatSmallProject/test3/app.json @@ -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" +} diff --git a/WechatSmallProject/test3/app.wxss b/WechatSmallProject/test3/app.wxss new file mode 100644 index 0000000..06c6fc9 --- /dev/null +++ b/WechatSmallProject/test3/app.wxss @@ -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; +} diff --git a/WechatSmallProject/test3/pages/index/index.js b/WechatSmallProject/test3/pages/index/index.js new file mode 100644 index 0000000..1797f78 --- /dev/null +++ b/WechatSmallProject/test3/pages/index/index.js @@ -0,0 +1,12 @@ +Page({ + data: { + currentTab: 0 + }, + + switchTab(e) { + const tab = e.currentTarget.dataset.tab; + this.setData({ + currentTab: parseInt(tab) + }) + } +}) \ No newline at end of file diff --git a/WechatSmallProject/test3/pages/index/index.json b/WechatSmallProject/test3/pages/index/index.json new file mode 100644 index 0000000..b55b5a2 --- /dev/null +++ b/WechatSmallProject/test3/pages/index/index.json @@ -0,0 +1,4 @@ +{ + "usingComponents": { + } +} \ No newline at end of file diff --git a/WechatSmallProject/test3/pages/index/index.wxml b/WechatSmallProject/test3/pages/index/index.wxml new file mode 100644 index 0000000..1fc5748 --- /dev/null +++ b/WechatSmallProject/test3/pages/index/index.wxml @@ -0,0 +1,32 @@ + + + + + 页面1 + + + 页面2 + + + 页面3 + + + + + + 第 1 个界面 + 对应 Tab1 内容 + + + + 第 2 个界面 + 对应 Tab2 内容 + + + + 第 3 个界面 + 对应 Tab3 内容 + + + + \ No newline at end of file diff --git a/WechatSmallProject/test3/pages/index/index.wxss b/WechatSmallProject/test3/pages/index/index.wxss new file mode 100644 index 0000000..876145e --- /dev/null +++ b/WechatSmallProject/test3/pages/index/index.wxss @@ -0,0 +1,69 @@ +.container { + padding: 20rpx; + +} + +.tab-box { + display: flex; + gap: 10rpx; + margin-bottom: 30rpx; +} + +.tab { + flex: 1; + text-align: center; + padding: 25rpx; + font-size: 32rpx; + border-radius: 10rpx; + color: #fff; +} + +.tab1 { + background: #ff7676; +} + +.tab2 { + background: #56c1fe; +} + +.tab3 { + background: #62d462; +} + +.tab1.active { + background: #ff4444; +} + +.tab2.active { + background: #0099ff; +} + +.tab3.active { + background: #22cc22; +} + +.page { + width: 100vw; + height: 100vh; + border-radius: 12rpx; + text-align: center; + color: #fff; +} + +.page1 { + background: #ff7676; +} + +.page2 { + background: #56c1fe; +} + +.page3 { + background: #62d462; +} + +.title { + font-size: 40rpx; + font-weight: bold; + margin-bottom: 20rpx; +} \ No newline at end of file diff --git a/WechatSmallProject/test3/project.config.json b/WechatSmallProject/test3/project.config.json new file mode 100644 index 0000000..a390b84 --- /dev/null +++ b/WechatSmallProject/test3/project.config.json @@ -0,0 +1,41 @@ +{ + "compileType": "miniprogram", + "libVersion": "3.15.2", + "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": "wx8c60a45abd90774a", + "simulatorPluginLibVersion": {} +} \ No newline at end of file diff --git a/WechatSmallProject/test3/project.private.config.json b/WechatSmallProject/test3/project.private.config.json new file mode 100644 index 0000000..3e0ec94 --- /dev/null +++ b/WechatSmallProject/test3/project.private.config.json @@ -0,0 +1,24 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "test3", + "setting": { + "compileHotReLoad": true, + "urlCheck": true, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "skylineRenderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "useApiHook": true, + "useApiHostProcess": true, + "showShadowRootInWxmlPanel": true, + "useStaticServer": false, + "useLanDebug": false, + "showES6CompileOption": false, + "bigPackageSizeSupport": false, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true + }, + "libVersion": "3.15.2", + "condition": {} +} \ No newline at end of file diff --git a/WechatSmallProject/test3/server/.gitignore b/WechatSmallProject/test3/server/.gitignore new file mode 100644 index 0000000..f52e6f5 --- /dev/null +++ b/WechatSmallProject/test3/server/.gitignore @@ -0,0 +1,2 @@ +node_modules +pnpm-lock.yaml \ No newline at end of file diff --git a/WechatSmallProject/test3/server/data.json b/WechatSmallProject/test3/server/data.json new file mode 100644 index 0000000..f3a1e02 --- /dev/null +++ b/WechatSmallProject/test3/server/data.json @@ -0,0 +1 @@ +[{"id":1,"image":"http://127.0.0.1:3000/deal/2846ed948e95eef4c4d50edaf52a483432023.jpg","name":"宫廷月亮虾饼","phone":"15530710686","address":"任丘市裕华中路与会战道交叉口东南角蕾莎汇生活4层","businessHours":"周一至周日10:00-21:00"},{"id":2,"image":"http://127.0.0.1:3000/deal/c23c7c29e74602f9939158c3f3e21fda141581.jpg","name":"第1佳大鸡排(蕾莎店)","phone":"18732727277","address":"任丘市裕华西路与会战北道路口东南角蕾莎汇生活4楼小吃街","businessHours":"周一至周日08:30-22:30"},{"id":3,"image":"http://127.0.0.1:3000/deal/4e01539cd10265284b7b895746aea54836686.jpg","name":"口袋鸡排","phone":"13582628110","address":"任丘市裕华中路与会战北道东南角,蕾莎汇生活4层小吃街","businessHours":"周一至周日08:30-22:30"},{"id":4,"image":"http://127.0.0.1:3000/deal/ecfae46d44390d0fad40b4dacbd04213334496.jpg","name":"好食客自助","phone":"0317-8565866","address":"南皮县光明中路烈士陵园北200米路西","businessHours":"周一至周日08:30-22:30"},{"id":5,"image":"http://127.0.0.1:3000/deal/c40ee7af26d65a44626f7cc905e2c7c3117336.jpg","name":"好再来蛋糕房","phone":"13011996119","address":"东光县老十字街南30米路西","businessHours":"周一至周日08:30-22:30"},{"id":6,"image":"http://127.0.0.1:3000/deal/8ce591879123fe1dcf6d48c022c7bd8f260331.jpg","name":"食客大王(泰昌店)","phone":"13343175919","address":"献县新华路泰昌购物中心一楼二期西侧","businessHours":"周一至周日08:30-22:30"},{"id":7,"image":"http://127.0.0.1:3000/deal/c23c7c29e74602f9939158c3f3e21fda141581.jpg","name":"d第1佳大鸡排(渤海路店)","phone":"15832782698","address":"任丘市渤海中路新绿洲时代广场对面","businessHours":"周一至周日09:30-20:00"},{"id":8,"image":"http://127.0.0.1:3000/apiback/9f7fc7c9e7dca62deb8c8e297ca4686b70710.jpg","name":"Shen寿司(颐和新世界店)","phone":"0317-3061878","address":"运河区市场街道水月寺街1号南颐和新世界A2-185号(近新华路老华北商厦颐和新世界)","businessHours":"每天10:30-20:30"},{"id":9,"image":"http://127.0.0.1:3000/deal/a684723c1ccbb89675ac14c89ce203a513606.jpg","name":"酒窝甜品","phone":"0317-5699886","address":"任丘市会战北道与裕华中路交叉口蕾莎汇生活5层","businessHours":"周一至周日09:00-21:00"},{"id":10,"image":"http://127.0.0.1:3000/deal/8d154dd60be1cb05d7aef075a3e46765121513.jpg","name":"韩式石锅拌饭","phone":"15350777649","address":"泊头市解放西路上河城B区13-10号底商(信誉楼西南方向100米,清真海鲜城东100米)","businessHours":"周一至周日08:30-22:30"},{"id":11,"image":"http://127.0.0.1:3000/deal/0f6bbcb4b9f37de4b4a875d314175d25109824.jpg","name":"福源祥黄焖鸡米饭","phone":"13785770681","address":"运河区黄河路33号荣盛广场5楼美食广场内","businessHours":"周一至周日08:30-22:30"},{"id":12,"image":"http://127.0.0.1:3000/deal/39ac88a1f8ef7c4686019c206da0766536494.jpg","name":"N多寿司(任丘店)","phone":"0317-2212595","address":"任丘市京开道新华路办事处对过(京开购物商城南300米)","businessHours":"周一至周日08:00-21:00"},{"id":13,"image":"http://127.0.0.1:3000/deal/2f6a1aae6e6a72c05b89b65b3c0d90f446665.jpg","name":"昆仑时代天街铁板烧","phone":"0317-2912222","address":"任丘市燕山南道与泰山南道交叉口东南方向600米(东风美食街后街昆仑时代天街)","businessHours":"周一至周日10:00-22:00"},{"id":90,"image":"http://127.0.0.1:3000/deal/0339a1bb9e5e3bb59350d15af9847bd0147857.jpg","name":"重庆秦妈火锅店(御河路店)","phone":"0317-2038777","address":"运河区御河路新天厨东面(近新天厨)","businessHours":"周一至周日10:00-20:30"},{"id":91,"image":"http://127.0.0.1:3000/deal/e724e21efcaa3219e38497b340e08d01153620.jpg","name":"食点伴","phone":"0317-3593666","address":"运河区解放东路南湖公园对过(云顶KTV2楼)","businessHours":"周一至周日08:30-22:30"},{"id":92,"image":"http://127.0.0.1:3000/deal/0de97931592d5f006a713ce2f22b41a826964.jpg","name":"陈阿婆重庆绿色鱼火锅","phone":"0317-7950777","address":"吴桥县太行道百盛庄园对面","businessHours":"周一至周日08:30-22:30"},{"id":93,"image":"http://127.0.0.1:3000/deal/169bab75ef27222be4b56f8229c213cb128037.jpg","name":"巫山烤全鱼(解放西路店)","phone":"0317-2040401","address":"运河区解放西路颐和文园门市六区1层1231铺","businessHours":"11:00-14:0016:30-20:30"},{"id":94,"image":"http://127.0.0.1:3000/deal/484a437d64fff67e051fe254d7395cad121490.jpg","name":"蜀哈哈麻辣香锅","phone":"18732731713","address":"运河区荣盛广场5楼","businessHours":"周一至周日08:30-22:30"},{"id":95,"image":"http://127.0.0.1:3000/deal/__46146569__6411830.jpg","name":"渔家瓦舍(荣盛店)","phone":"0317-2135757/18631709788","address":"运河区黄河西路33号荣盛广场5楼D区","businessHours":"周一至周日11:00-21:00"},{"id":96,"image":"http://127.0.0.1:3000/deal/ea766dbba77f00bd37643c9697bc01c8153096.jpg","name":"魔锅坊麻辣香锅(沧州旗舰店)","phone":"0317-5690200","address":"运河区御河路御河新城103号门市","businessHours":"周一至周日09:30-14:00"},{"id":97,"image":"http://127.0.0.1:3000/deal/91c1f50b978a6b5c2850c7b4f4577fe637117.jpg","name":"夹层客汉堡","phone":"0317-2711010","address":"任丘市华油商业街前街东头往西20米路北(原川合顺麻辣香锅地点)","businessHours":"周一至周日08:30-22:30"},{"id":98,"image":"http://127.0.0.1:3000/deal/8286612e525aee2cc83760bbe2ff3c7b106503.jpg","name":"辣有道麻辣香锅","phone":"15720487955","address":"运河区朝阳西路颐和文园中街1236号","businessHours":"周一至周日08:30-22:30"},{"id":99,"image":"http://127.0.0.1:3000/deal/__45049923__6050023.jpg","name":"金利来蛋糕店(颐和文园第一总店)","phone":"0317-2041379/15532769273","address":"运河区解放西路颐和文园南侧","businessHours":"周一至周日08:00-21:00"},{"id":100,"image":"http://127.0.0.1:3000/deal/99b0a33bff1190385b53405dfd5fcc8628228.jpg","name":"多味蛋糕店","phone":"0317-2255071","address":"任丘市裕华西路4号","businessHours":"周一至周日08:30-22:30"},{"id":101,"image":"http://127.0.0.1:3000/deal/32a178b1a223a52301be30287aaa9bc136898.jpg","name":"串串厨房","phone":"0317-3333221","address":"任丘市裕华中路与会战北道交叉口蕾莎汇生活4层","businessHours":"周一至周日08:30-22:30"},{"id":102,"image":"http://127.0.0.1:3000/deal/acb1b6e571229803ddcbc48708020f38147357.jpg","name":"富华肥牛城","phone":"0317-8266665","address":"泊头市红旗大街北段","businessHours":"周一至周日08:30-22:30"},{"id":103,"image":"http://127.0.0.1:3000/deal/e5d43f4230aec5444fe72160de740f31119005.jpg","name":"福面道","phone":"18232760805","address":"运河区御河路御河新城南门天厨饭店东150米路北","businessHours":"周一至周日08:30-22:30"},{"id":104,"image":"http://127.0.0.1:3000/deal/3057d6e185181f1a4819424b2a3fa56f118050.jpg","name":"京小面","phone":"13082179139","address":"运河区颐和新世界A1-159,华北商厦东后门对面","businessHours":"周一至周日08:30-22:30"},{"id":105,"image":"http://127.0.0.1:3000/deal/e88d92d039eb53d084a307a886d04611102578.jpg","name":"玛格利塔现烤批萨(泊头店)","phone":"0317-5666066","address":"泊头市建设街泊信商厦西门斜对过","businessHours":"周一至周日08:30-22:30"},{"id":106,"image":"http://127.0.0.1:3000/deal/2ebad3638ae63edd7c4c1d8033d578ec119900.jpg","name":"部落格干锅鸡","phone":"18732718098","address":"泊头市八粮站十字路口东行200米路北","businessHours":"周一至周日08:30-22:30"},{"id":107,"image":"http://127.0.0.1:3000/deal/a56133247578dadd95f444ff6315f0e134886.jpg","name":"后街时光咖啡","phone":"0317-2885988","address":"任丘市东风美食街后街乐库KTV北正对面","businessHours":"周一至周日08:30-22:30"},{"id":108,"image":"http://127.0.0.1:3000/deal/f69589ef518f9b264b21005bdcf683b4102030.jpg","name":"麦德客欢乐餐厅(吴桥店)","phone":"0317-7279176","address":"吴桥县长江路信发商厦东侧门市","businessHours":"周一至周日08:30-22:30"},{"id":109,"image":"http://127.0.0.1:3000/deal/c0609cbcfd1f1a95256fe25dc30d9238119711.jpg","name":"玛格利塔现烤披萨(水月寺店)","phone":"0317-3567772","address":"运河区水月寺大街刺绣厂门市楼A座2号(金豪大饭店南侧,德善饭庄对面)","businessHours":"周一至周日08:30-22:30"},{"id":110,"image":"http://127.0.0.1:3000/deal/843f3a97e4c2ec24888a0501b3ccda9198016.jpg","name":"N多寿司(道东店)","phone":"0317-5697626","address":"新华区千童大道与黄河路交叉口东南角","businessHours":"周一至周日09:30-20:00"},{"id":111,"image":"http://127.0.0.1:3000/deal/aa3906333aed718ad8cf3c2a9ca4a7c3346489.jpg","name":"味好美烘焙店","phone":"0317-8570588","address":"黄骅市信誉楼大街南段华贸商厦一楼","businessHours":"周一至周日08:30-22:30"},{"id":112,"image":"http://127.0.0.1:3000/deal/db80ebddd202b27bba28d7cd1ae9273629749.jpg","name":"爱情麻辣烫","phone":"13513485984","address":"肃宁县清源街与武垣路交叉口南30米路西(耀华商厦西侧德克士正对过)","businessHours":"周一至周日11:00-20:30"},{"id":113,"image":"http://127.0.0.1:3000/deal/c274f0927931d6be76b156cccf14ab7c252781.jpg","name":"晶晶奶糕店","phone":"15031717124","address":"任丘市文化道与裕华中路十字路口南行100米路东","businessHours":"周一至周日08:30-22:30"},{"id":114,"image":"http://127.0.0.1:3000/deal/f78bc7c15702b7f3fe7021ebf17494ef357509.jpg","name":"大街小巷","phone":"0317-8071777","address":"运河区水月寺街9-12号(8路公交站牌处)","businessHours":"周一至周日08:30-22:30"},{"id":115,"image":"http://127.0.0.1:3000/deal/ffead6264d34e3c0f0ba3b33e55e57ed109930.jpg","name":"德克士(建新店)","phone":"0317-3165832","address":"运河区清池大道建新大厦正门底商","businessHours":"周一至周日08:30-22:30"},{"id":116,"image":"http://127.0.0.1:3000/deal/a8b49f497c9b7fc68449000711f587c5117154.jpg","name":"和米堂","phone":"0317-2023765","address":"新华区新华路华北商厦9楼(华北商厦)","businessHours":"周一至周日09:00-21:00"},{"id":117,"image":"http://127.0.0.1:3000/deal/1a71f6f0fc3370fe061d0894b530e71d94674.jpg","name":"提拉米酥烘培坊","phone":"0317-3370111","address":"任丘市会战北道蕾莎儿童海洋馆一楼底商","businessHours":"周一至周日08:30-22:30"},{"id":118,"image":"http://127.0.0.1:3000/deal/35a158f022bc41433fb2a94ef7b81477127695.jpg","name":"大嘴巴酸辣粉","phone":"15373386311/15373386211","address":"运河区老华北后身颐和新世界商业街","businessHours":"周一至周日08:30-22:30"},{"id":119,"image":"http://127.0.0.1:3000/poi/cc9138c67cf7cec2789a5b13bb7132dc43167.jpg","name":"N多寿司(千童购物中心店)","phone":"0317-6299882","address":"盐山县北大街17号(千童购物中心1层化妆品东侧)","businessHours":"周一至周日08:30-20:00"},{"id":120,"image":"http://127.0.0.1:3000/deal/2cd60840a9952e6366e99202881d1c57152524.jpg","name":"乐堡士(交河店)","phone":"0317-5660936","address":"泊头市交河镇钟楼街移动南侧","businessHours":"周一至周日09:00-22:00"},{"id":121,"image":"http://127.0.0.1:3000/deal/4cbf9155ddf4075df7c442945de5277e396004.jpg","name":"美丽年华蛋糕坊","phone":"0317-4626693","address":"献县东大街工商银行东行50米路南(春天药房西邻)","businessHours":"周一至周日08:30-22:30"},{"id":122,"image":"http://127.0.0.1:3000/deal/6b41b8ef2edb71df237dc84ad97793fe484797.jpg","name":"咕噜咕噜涮涮锅(盐百商厦店)","phone":"15175852679/15028782192","address":"运河区南门步行街盐百南门商厦西侧","businessHours":"周一至周日08:30-22:30"},{"id":123,"image":"http://127.0.0.1:3000/deal/e68910d95f9c4056e2066a23e708f35b43639.jpg","name":"DF冰激凌(蕾莎店)","phone":"13473125087","address":"任丘市裕华中路与会战北道交叉口蕾莎城市广场5楼(裕华中路与会战北道交叉口往南50米路东)","businessHours":"周一至周日08:30-22:30"},{"id":124,"image":"http://127.0.0.1:3000/deal/99a6e8bb98bed7c724ca63e091693d94139085.jpg","name":"爵士牛排","phone":"0317-4618168","address":"献县乐寿镇泰昌购物广场2期楼下","businessHours":"周一至周日08:30-22:30"},{"id":125,"image":"http://127.0.0.1:3000/deal/b4e94fa5cdb1838bc362ea5b985ba1ae92457.jpg","name":"广州味道面包工坊","phone":"0317-7630802","address":"东光县府前大街81号","businessHours":"周一至周日11:30-23:00"},{"id":126,"image":"http://127.0.0.1:3000/deal/0306a219ae56c2a8bd93fb91a9b034e6336340.jpg","name":"米斯韦尔烘焙坊","phone":"0317-4616877/18732782826","address":"献县平安大街泰昌路口曲美往东50米","businessHours":"周一至周日07:00-20:30"},{"id":127,"image":"http://127.0.0.1:3000/deal/__47190232__7563879.jpg","name":"顶好蛋糕(千童大道店)","phone":"13313178393/13784769718","address":"新华区千童大道43号(原东安商厦对面)","businessHours":"周一至周日09:00-18:00"},{"id":128,"image":"http://127.0.0.1:3000/deal/9dc80616b6178221cf61df4b9dc0d1d929640.jpg","name":"阿姨奶茶(蕾莎店)","phone":"15632709694","address":"任丘市裕华路与会战道交叉口东南角蕾莎汇生活四层","businessHours":"周一至周日09:00-21:00"},{"id":129,"image":"http://127.0.0.1:3000/deal/b7a446c030060222597d454ccb3e29b2136826.jpg","name":"一绝冒菜","phone":"18733766101","address":"运河区荣盛广场5楼大地影院北侧(原伊堤湾)","businessHours":"周一至周日10:30-21:00"},{"id":130,"image":"http://127.0.0.1:3000/deal/bf53d96ec2272d19d087d72d67df565f37970.jpg","name":"第1佳大鸡排","phone":"13785736435","address":"河间市长卿路北街长青网吧对面(东北烧烤南面)","businessHours":"周一至周日08:30-22:30"},{"id":131,"image":"http://127.0.0.1:3000/deal/bfeb6437bbb3a125bee67473c52de9a978845.jpg","name":"N多寿司(老华北店)","phone":"15226754177","address":"运河区老华北商厦八楼(近水月大街红达小牛)","businessHours":"周一至周日09:30-21:00"},{"id":132,"image":"http://127.0.0.1:3000/deal/e6ddb4f0532fc1e028e5d3b5a62ef71535980.jpg","name":"荣兴斋(迎宾店)","phone":"0317-5021239/6121788","address":"肃宁县武垣路57号","businessHours":"周一至周日08:30-22:30"},{"id":133,"image":"http://127.0.0.1:3000/deal/3e028a516f458b38485205acb1412de435804.jpg","name":"玛格利塔现烤批萨","phone":"0317-5335899","address":"黄骅市信誉楼大街96号(西五金正对面)","businessHours":"周一至周日09:00-21:00"},{"id":134,"image":"http://127.0.0.1:3000/deal/9f2b7f9e012fcbdfeac7933183c33517135253.jpg","name":"御膳鸡煲(颐和文园店)","phone":"15227537375/15175714745","address":"运河区解放西路颐和文园东街东门往南20米","businessHours":"周一至周日08:30-22:30"},{"id":135,"image":"http://127.0.0.1:3000/deal/f077a13f324aaf0db0b75163eaf29f3d110649.jpg","name":"惠民重庆老火锅","phone":"0317-2360688/3390100","address":"任丘市渤海东路惠民酒店东侧(战前小区旁边)","businessHours":"周一至周日08:30-22:30"},{"id":136,"image":"http://127.0.0.1:3000/deal/7d9cd35c3e1815830cd1376e71faa686108274.jpg","name":"川町家","phone":"13333076371","address":"新华区新华东路老华北八楼","businessHours":"周一至周日全天;"},{"id":137,"image":"http://127.0.0.1:3000/deal/9aa8f3d00cd6caae6bd506ba1d9a1e69117204.jpg","name":"德克士聪明兔餐厅(新华中路店)","phone":"0317-2123156","address":"运河区新华中路181号(第八中学对面)","businessHours":"周一至周日06:30-22:00"},{"id":138,"image":"http://127.0.0.1:3000/shaitu/71143bedc401441202d6cab04a04cf85108784.jpg","name":"三清洞摩西韩国年糕火锅(荣盛店)","phone":"15632786900","address":"运河区黄河路与开元大道交叉口向西200米路南荣盛国际购物广场五楼5576铺","businessHours":"周一至周日08:30-22:30"},{"id":139,"image":"http://127.0.0.1:3000/deal/e72d342d802c410f6622f5e36f265176312462.jpg","name":"红苹果烘焙坊","phone":"0317-6010899","address":"献县本斋路增琪幼儿园斜对面","businessHours":"周一至周日08:30-22:30"},{"id":140,"image":"http://127.0.0.1:3000/deal/76eb2d45ecdf7c82e0e5fb94059d7ed927134.jpg","name":"麦德客欢乐餐厅(泊头店)","phone":"0317-8262656","address":"泊头市解放西路376号(信誉楼西行100米路南)","businessHours":"周一至周日08:30-21:30"},{"id":141,"image":"http://127.0.0.1:3000/deal/__45042322__1416996.jpg","name":"盛客莱火锅","phone":"0317-3077766","address":"运河区光荣路与金街步行街交叉口(盐百商厦南门对面)","businessHours":"周一至周日10:00-22:00"},{"id":142,"image":"http://127.0.0.1:3000/deal/c2ce13dc00d3a99551c4ceed3a335b60136735.jpg","name":"王品火锅城","phone":"0317-2371946","address":"任丘市燕山南道五洲酒店东门南行20米路东","businessHours":"周一至周日09:00-22:00"},{"id":143,"image":"http://127.0.0.1:3000/deal/5a66ad072d784e828172c6ac23df9f26112275.jpg","name":"巴莉蜜语","phone":"0317-8288860/15127789063","address":"泊头市红旗大街与解放东路交叉口(农业银行对面)","businessHours":"周一至周日08:30-22:30"},{"id":144,"image":"http://127.0.0.1:3000/deal/2a4ca81a2a6e43649c815a9a44ce891f362231.jpg","name":"亚马逊自助主题餐厅(颐和店)","phone":"0317-2206788/2209788","address":"运河区解放西路颐和国际B座底商(全聚德左侧)","businessHours":"周一至周日08:30-22:30"},{"id":145,"image":"http://127.0.0.1:3000/deal/d7377b700bd01dfcfdcf3bb20be32949112265.jpg","name":"乐克汉堡","phone":"15369836770","address":"泊头市建设街与解放西路交叉口西北角(泊信商厦西门对过)","businessHours":"周一至周日08:30-22:30"},{"id":146,"image":"http://127.0.0.1:3000/deal/37628d111617d3b7a1565996ed059927131383.jpg","name":"尚客火锅鸡","phone":"18333016868","address":"任丘市东凉道口西行100米路南","businessHours":"周一至周日11:00-14:3016:30-23:30"},{"id":147,"image":"http://127.0.0.1:3000/deal/ac106e3c34373dbeb7ecdb11d0a9938337722.jpg","name":"状元烤猪蹄","phone":"0317-2862686","address":"任丘市会战北道与裕华中路交叉口东南角蕾莎汇生活4层小吃街","businessHours":"9:00-21:00"},{"id":148,"image":"http://127.0.0.1:3000/deal/fcc7c3ec2ba903cb4b75232e2b35db6650472.jpg","name":"肆月天时尚自选餐厅","phone":"0317-2106966","address":"运河区荣盛购物广场5楼","businessHours":"11:30-14:00,17:30-21:00"},{"id":149,"image":"http://127.0.0.1:3000/deal/0b4003327bef5c16677d26b904b3f3f0129083.jpg","name":"优乐自动餐厅(献县店)","phone":"18231758173","address":"献县泰昌路口南80米路西(泰昌家园斜对面泰昌购物一期北30米路西)","businessHours":"周一至周日11:00-21:00"},{"id":150,"image":"http://127.0.0.1:3000/deal/c9f1c341821b4656f81bfb976cbfa55c32496.jpg","name":"最高鸡密","phone":"15631772290","address":"任丘市裕华东路与文化道交口南行200米东侧","businessHours":"周一至周日08:30-21:30"},{"id":151,"image":"http://127.0.0.1:3000/deal/ad87ab62a9daeb88e67e4e9a2ec97323141365.jpg","name":"黄记煌三汁焖锅(荣盛国际店)","phone":"0317-2135399","address":"运河区黄河西路与开元大道交口荣盛国际购物广场5楼","businessHours":"周一至周日10:30-21:30"},{"id":152,"image":"http://127.0.0.1:3000/deal/__48385594__1448848.jpg","name":"日月潭(华北店)","phone":"15369794957","address":"新华区华北商厦新华路店地下超市东入口","businessHours":"周一至周日08:00-20:00"},{"id":153,"image":"http://127.0.0.1:3000/deal/e94d919267508bfcfb1b629d8727c17f106610.jpg","name":"韩釜宫(新华路店)","phone":"0317-3770888","address":"新华区新华路老华北西侧国贸大厦6楼","businessHours":"周一至周日11:00-14:0017:00-21:00"},{"id":154,"image":"http://127.0.0.1:3000/deal/68405bb25b7510424aa45b36016e2dcf124862.jpg","name":"T3在首尔","phone":"13832712808","address":"运河区老华北后身一中前街,颐和新世界东侧,一幼对面A1-128号","businessHours":"周一至周日08:30-22:30"},{"id":155,"image":"http://127.0.0.1:3000/deal/55feb9a557b54ab5594b3efdc51b6e8f277046.jpg","name":"富丽园自助烤肉城","phone":"0317-7577888/7971818","address":"运河区新华路老华北往南300米好伦哥对面(佰顺隆数码广场4楼)","businessHours":"周一至周日08:30-22:30"},{"id":156,"image":"http://127.0.0.1:3000/deal/9cdf099d87d0dbc027fe8c1ccae6017d104798.jpg","name":"风情汉斯(东光店)","phone":"0317-7777799","address":"东光县东光镇茧城大街富翔大酒店院内二楼","businessHours":"周一至周日08:30-22:30"}] \ No newline at end of file diff --git a/WechatSmallProject/test3/server/index.js b/WechatSmallProject/test3/server/index.js new file mode 100644 index 0000000..bc78f4b --- /dev/null +++ b/WechatSmallProject/test3/server/index.js @@ -0,0 +1,42 @@ +// 引入 Node.js 的 fs 模块,该模块用于处理文件系统操作,比如读取文件 +let fs = require("fs"); +// 引入 express 模块,express 是一个流行的 Node.js Web 应用框架,用于快速搭建 Web 服务器 +var express = require("express"); + +// 读取 JSON 数据 +// 使用 fs.readFileSync 同步读取当前目录下的 data.json 文件 +// 第二个参数指定以 UTF-8 编码读取文件,读取结果存储在 jsonStr 变量中 +let jsonStr = fs.readFileSync("./data.json", { + encoding: "utf8", +}); + +// 将读取到的 JSON 字符串解析为 JavaScript 对象,存储在 data 变量中 +let data = JSON.parse(jsonStr); + +// 创建 Web 服务器对象 +// 调用 express 函数创建一个 express 应用实例,后续使用该实例来配置和启动服务器 +var app = express(); + +// 静态资源处理 +// 使用 express.static 中间件来处理静态资源,这里指定 public 目录为静态资源目录 +// 客户端可以直接访问 public 目录下的文件,例如图片、CSS、JavaScript 文件等 +app.use(express.static("public")); + +// 定义一个 GET 请求的路由,当客户端访问 /data 路径时会触发该路由处理函数 +app.get("/data", (req, res) => { + // 使用扩展运算符将 data 数组复制一份到 arr 数组中 。扩展运算符是 ES6 中引入的新特性,它可以将一个可迭代对象(如数组、字符串、Map、Set 等)展开成一个个独立的元素。数组复制:在代码中 let [ ...arr ] = data 就是利用扩展运算符将 data 数组中的元素展开,然后复制到一个新的数组 arr 中。这样就创建了一个 data 数组的浅拷贝,arr 和 data 是两个不同的数组对象,但是它们内部的元素(如果是基本类型)是相同的,或者(如果是引用类型)是指向同一个对象的引用。 + let [...arr] = data; + // 计算当前页数据的起始索引 + // req.query.page 是客户端请求中传递的页码参数,req.query.pageSize 是每页显示的数据条数 + let start = (req.query.page - 1) * req.query.pageSize; + // 设置响应头 X-Total-Count,用于告知客户端数据的总条数 + res.setHeader("X-Total-Count", data.length); + // 从 arr 数组中截取从 start 索引开始,长度为 req.query.pageSize 的数据,并将其作为响应发送给客户端 + res.send(arr.splice(start, req.query.pageSize)); +}); + +// 启动服务器,监听 3000 端口 +// 当服务器启动成功后,会在控制台输出提示信息,告知服务器的访问地址 +app.listen(3000, () => { + console.log("服务器启动成功,地址为:http://127.0.0.1:3000"); +}); diff --git a/WechatSmallProject/test3/server/package.json b/WechatSmallProject/test3/server/package.json new file mode 100644 index 0000000..3d1a5ab --- /dev/null +++ b/WechatSmallProject/test3/server/package.json @@ -0,0 +1,15 @@ +{ + "name": "json-data-server", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.18.1" + } +} diff --git a/WechatSmallProject/test3/server/public/apiback/9f7fc7c9e7dca62deb8c8e297ca4686b70710.jpg b/WechatSmallProject/test3/server/public/apiback/9f7fc7c9e7dca62deb8c8e297ca4686b70710.jpg new file mode 100644 index 0000000..d813ceb Binary files /dev/null and b/WechatSmallProject/test3/server/public/apiback/9f7fc7c9e7dca62deb8c8e297ca4686b70710.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/0306a219ae56c2a8bd93fb91a9b034e6336340.jpg b/WechatSmallProject/test3/server/public/deal/0306a219ae56c2a8bd93fb91a9b034e6336340.jpg new file mode 100644 index 0000000..bef174d Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/0306a219ae56c2a8bd93fb91a9b034e6336340.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/0339a1bb9e5e3bb59350d15af9847bd0147857.jpg b/WechatSmallProject/test3/server/public/deal/0339a1bb9e5e3bb59350d15af9847bd0147857.jpg new file mode 100644 index 0000000..11e7c86 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/0339a1bb9e5e3bb59350d15af9847bd0147857.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/0b4003327bef5c16677d26b904b3f3f0129083.jpg b/WechatSmallProject/test3/server/public/deal/0b4003327bef5c16677d26b904b3f3f0129083.jpg new file mode 100644 index 0000000..a2c93ab Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/0b4003327bef5c16677d26b904b3f3f0129083.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/0de97931592d5f006a713ce2f22b41a826964.jpg b/WechatSmallProject/test3/server/public/deal/0de97931592d5f006a713ce2f22b41a826964.jpg new file mode 100644 index 0000000..1141a06 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/0de97931592d5f006a713ce2f22b41a826964.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/0f6bbcb4b9f37de4b4a875d314175d25109824.jpg b/WechatSmallProject/test3/server/public/deal/0f6bbcb4b9f37de4b4a875d314175d25109824.jpg new file mode 100644 index 0000000..652fd62 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/0f6bbcb4b9f37de4b4a875d314175d25109824.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/169bab75ef27222be4b56f8229c213cb128037.jpg b/WechatSmallProject/test3/server/public/deal/169bab75ef27222be4b56f8229c213cb128037.jpg new file mode 100644 index 0000000..715a973 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/169bab75ef27222be4b56f8229c213cb128037.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/1a71f6f0fc3370fe061d0894b530e71d94674.jpg b/WechatSmallProject/test3/server/public/deal/1a71f6f0fc3370fe061d0894b530e71d94674.jpg new file mode 100644 index 0000000..a8bf81d Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/1a71f6f0fc3370fe061d0894b530e71d94674.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/2846ed948e95eef4c4d50edaf52a483432023.jpg b/WechatSmallProject/test3/server/public/deal/2846ed948e95eef4c4d50edaf52a483432023.jpg new file mode 100644 index 0000000..adb0365 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/2846ed948e95eef4c4d50edaf52a483432023.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/2a4ca81a2a6e43649c815a9a44ce891f362231.jpg b/WechatSmallProject/test3/server/public/deal/2a4ca81a2a6e43649c815a9a44ce891f362231.jpg new file mode 100644 index 0000000..c7998b5 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/2a4ca81a2a6e43649c815a9a44ce891f362231.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/2cd60840a9952e6366e99202881d1c57152524.jpg b/WechatSmallProject/test3/server/public/deal/2cd60840a9952e6366e99202881d1c57152524.jpg new file mode 100644 index 0000000..55bac84 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/2cd60840a9952e6366e99202881d1c57152524.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/2ebad3638ae63edd7c4c1d8033d578ec119900.jpg b/WechatSmallProject/test3/server/public/deal/2ebad3638ae63edd7c4c1d8033d578ec119900.jpg new file mode 100644 index 0000000..bfa3b2c Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/2ebad3638ae63edd7c4c1d8033d578ec119900.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/2f6a1aae6e6a72c05b89b65b3c0d90f446665.jpg b/WechatSmallProject/test3/server/public/deal/2f6a1aae6e6a72c05b89b65b3c0d90f446665.jpg new file mode 100644 index 0000000..24b2190 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/2f6a1aae6e6a72c05b89b65b3c0d90f446665.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/3057d6e185181f1a4819424b2a3fa56f118050.jpg b/WechatSmallProject/test3/server/public/deal/3057d6e185181f1a4819424b2a3fa56f118050.jpg new file mode 100644 index 0000000..ef576e5 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/3057d6e185181f1a4819424b2a3fa56f118050.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/32a178b1a223a52301be30287aaa9bc136898.jpg b/WechatSmallProject/test3/server/public/deal/32a178b1a223a52301be30287aaa9bc136898.jpg new file mode 100644 index 0000000..047e488 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/32a178b1a223a52301be30287aaa9bc136898.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/35a158f022bc41433fb2a94ef7b81477127695.jpg b/WechatSmallProject/test3/server/public/deal/35a158f022bc41433fb2a94ef7b81477127695.jpg new file mode 100644 index 0000000..0a501fe Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/35a158f022bc41433fb2a94ef7b81477127695.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/37628d111617d3b7a1565996ed059927131383.jpg b/WechatSmallProject/test3/server/public/deal/37628d111617d3b7a1565996ed059927131383.jpg new file mode 100644 index 0000000..ccb19eb Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/37628d111617d3b7a1565996ed059927131383.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/39ac88a1f8ef7c4686019c206da0766536494.jpg b/WechatSmallProject/test3/server/public/deal/39ac88a1f8ef7c4686019c206da0766536494.jpg new file mode 100644 index 0000000..546bc20 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/39ac88a1f8ef7c4686019c206da0766536494.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/3e028a516f458b38485205acb1412de435804.jpg b/WechatSmallProject/test3/server/public/deal/3e028a516f458b38485205acb1412de435804.jpg new file mode 100644 index 0000000..454b9fe Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/3e028a516f458b38485205acb1412de435804.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/484a437d64fff67e051fe254d7395cad121490.jpg b/WechatSmallProject/test3/server/public/deal/484a437d64fff67e051fe254d7395cad121490.jpg new file mode 100644 index 0000000..bba8fa5 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/484a437d64fff67e051fe254d7395cad121490.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/4cbf9155ddf4075df7c442945de5277e396004.jpg b/WechatSmallProject/test3/server/public/deal/4cbf9155ddf4075df7c442945de5277e396004.jpg new file mode 100644 index 0000000..335c3f7 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/4cbf9155ddf4075df7c442945de5277e396004.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/4e01539cd10265284b7b895746aea54836686.jpg b/WechatSmallProject/test3/server/public/deal/4e01539cd10265284b7b895746aea54836686.jpg new file mode 100644 index 0000000..4632c98 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/4e01539cd10265284b7b895746aea54836686.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/55feb9a557b54ab5594b3efdc51b6e8f277046.jpg b/WechatSmallProject/test3/server/public/deal/55feb9a557b54ab5594b3efdc51b6e8f277046.jpg new file mode 100644 index 0000000..efa4cce Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/55feb9a557b54ab5594b3efdc51b6e8f277046.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/5a66ad072d784e828172c6ac23df9f26112275.jpg b/WechatSmallProject/test3/server/public/deal/5a66ad072d784e828172c6ac23df9f26112275.jpg new file mode 100644 index 0000000..ca015f0 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/5a66ad072d784e828172c6ac23df9f26112275.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/68405bb25b7510424aa45b36016e2dcf124862.jpg b/WechatSmallProject/test3/server/public/deal/68405bb25b7510424aa45b36016e2dcf124862.jpg new file mode 100644 index 0000000..f1f931f Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/68405bb25b7510424aa45b36016e2dcf124862.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/6b41b8ef2edb71df237dc84ad97793fe484797.jpg b/WechatSmallProject/test3/server/public/deal/6b41b8ef2edb71df237dc84ad97793fe484797.jpg new file mode 100644 index 0000000..b35370b Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/6b41b8ef2edb71df237dc84ad97793fe484797.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/76eb2d45ecdf7c82e0e5fb94059d7ed927134.jpg b/WechatSmallProject/test3/server/public/deal/76eb2d45ecdf7c82e0e5fb94059d7ed927134.jpg new file mode 100644 index 0000000..c448067 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/76eb2d45ecdf7c82e0e5fb94059d7ed927134.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/7d9cd35c3e1815830cd1376e71faa686108274.jpg b/WechatSmallProject/test3/server/public/deal/7d9cd35c3e1815830cd1376e71faa686108274.jpg new file mode 100644 index 0000000..7c0fb26 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/7d9cd35c3e1815830cd1376e71faa686108274.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/8286612e525aee2cc83760bbe2ff3c7b106503.jpg b/WechatSmallProject/test3/server/public/deal/8286612e525aee2cc83760bbe2ff3c7b106503.jpg new file mode 100644 index 0000000..ff6728e Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/8286612e525aee2cc83760bbe2ff3c7b106503.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/843f3a97e4c2ec24888a0501b3ccda9198016.jpg b/WechatSmallProject/test3/server/public/deal/843f3a97e4c2ec24888a0501b3ccda9198016.jpg new file mode 100644 index 0000000..8c69153 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/843f3a97e4c2ec24888a0501b3ccda9198016.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/8ce591879123fe1dcf6d48c022c7bd8f260331.jpg b/WechatSmallProject/test3/server/public/deal/8ce591879123fe1dcf6d48c022c7bd8f260331.jpg new file mode 100644 index 0000000..96f7ea3 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/8ce591879123fe1dcf6d48c022c7bd8f260331.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/8d154dd60be1cb05d7aef075a3e46765121513.jpg b/WechatSmallProject/test3/server/public/deal/8d154dd60be1cb05d7aef075a3e46765121513.jpg new file mode 100644 index 0000000..090af0b Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/8d154dd60be1cb05d7aef075a3e46765121513.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/91c1f50b978a6b5c2850c7b4f4577fe637117.jpg b/WechatSmallProject/test3/server/public/deal/91c1f50b978a6b5c2850c7b4f4577fe637117.jpg new file mode 100644 index 0000000..0714da6 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/91c1f50b978a6b5c2850c7b4f4577fe637117.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/99a6e8bb98bed7c724ca63e091693d94139085.jpg b/WechatSmallProject/test3/server/public/deal/99a6e8bb98bed7c724ca63e091693d94139085.jpg new file mode 100644 index 0000000..20ef1fd Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/99a6e8bb98bed7c724ca63e091693d94139085.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/99b0a33bff1190385b53405dfd5fcc8628228.jpg b/WechatSmallProject/test3/server/public/deal/99b0a33bff1190385b53405dfd5fcc8628228.jpg new file mode 100644 index 0000000..7f4cddd Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/99b0a33bff1190385b53405dfd5fcc8628228.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/9aa8f3d00cd6caae6bd506ba1d9a1e69117204.jpg b/WechatSmallProject/test3/server/public/deal/9aa8f3d00cd6caae6bd506ba1d9a1e69117204.jpg new file mode 100644 index 0000000..99a9428 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/9aa8f3d00cd6caae6bd506ba1d9a1e69117204.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/9cdf099d87d0dbc027fe8c1ccae6017d104798.jpg b/WechatSmallProject/test3/server/public/deal/9cdf099d87d0dbc027fe8c1ccae6017d104798.jpg new file mode 100644 index 0000000..1baec29 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/9cdf099d87d0dbc027fe8c1ccae6017d104798.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/9dc80616b6178221cf61df4b9dc0d1d929640.jpg b/WechatSmallProject/test3/server/public/deal/9dc80616b6178221cf61df4b9dc0d1d929640.jpg new file mode 100644 index 0000000..7aa1672 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/9dc80616b6178221cf61df4b9dc0d1d929640.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/9f2b7f9e012fcbdfeac7933183c33517135253.jpg b/WechatSmallProject/test3/server/public/deal/9f2b7f9e012fcbdfeac7933183c33517135253.jpg new file mode 100644 index 0000000..756bafb Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/9f2b7f9e012fcbdfeac7933183c33517135253.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/__45042322__1416996.jpg b/WechatSmallProject/test3/server/public/deal/__45042322__1416996.jpg new file mode 100644 index 0000000..dd3510c Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/__45042322__1416996.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/__45049923__6050023.jpg b/WechatSmallProject/test3/server/public/deal/__45049923__6050023.jpg new file mode 100644 index 0000000..c29fcc1 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/__45049923__6050023.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/__46146569__6411830.jpg b/WechatSmallProject/test3/server/public/deal/__46146569__6411830.jpg new file mode 100644 index 0000000..64f2453 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/__46146569__6411830.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/__47190232__7563879.jpg b/WechatSmallProject/test3/server/public/deal/__47190232__7563879.jpg new file mode 100644 index 0000000..0e003e0 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/__47190232__7563879.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/__48385594__1448848.jpg b/WechatSmallProject/test3/server/public/deal/__48385594__1448848.jpg new file mode 100644 index 0000000..42be407 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/__48385594__1448848.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/a56133247578dadd95f444ff6315f0e134886.jpg b/WechatSmallProject/test3/server/public/deal/a56133247578dadd95f444ff6315f0e134886.jpg new file mode 100644 index 0000000..df581c0 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/a56133247578dadd95f444ff6315f0e134886.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/a684723c1ccbb89675ac14c89ce203a513606.jpg b/WechatSmallProject/test3/server/public/deal/a684723c1ccbb89675ac14c89ce203a513606.jpg new file mode 100644 index 0000000..a63c1da Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/a684723c1ccbb89675ac14c89ce203a513606.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/a8b49f497c9b7fc68449000711f587c5117154.jpg b/WechatSmallProject/test3/server/public/deal/a8b49f497c9b7fc68449000711f587c5117154.jpg new file mode 100644 index 0000000..fdd0c9e Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/a8b49f497c9b7fc68449000711f587c5117154.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/aa3906333aed718ad8cf3c2a9ca4a7c3346489.jpg b/WechatSmallProject/test3/server/public/deal/aa3906333aed718ad8cf3c2a9ca4a7c3346489.jpg new file mode 100644 index 0000000..442221b Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/aa3906333aed718ad8cf3c2a9ca4a7c3346489.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/ac106e3c34373dbeb7ecdb11d0a9938337722.jpg b/WechatSmallProject/test3/server/public/deal/ac106e3c34373dbeb7ecdb11d0a9938337722.jpg new file mode 100644 index 0000000..3583526 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/ac106e3c34373dbeb7ecdb11d0a9938337722.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/acb1b6e571229803ddcbc48708020f38147357.jpg b/WechatSmallProject/test3/server/public/deal/acb1b6e571229803ddcbc48708020f38147357.jpg new file mode 100644 index 0000000..bd30bc7 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/acb1b6e571229803ddcbc48708020f38147357.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/ad87ab62a9daeb88e67e4e9a2ec97323141365.jpg b/WechatSmallProject/test3/server/public/deal/ad87ab62a9daeb88e67e4e9a2ec97323141365.jpg new file mode 100644 index 0000000..244ca20 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/ad87ab62a9daeb88e67e4e9a2ec97323141365.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/b4e94fa5cdb1838bc362ea5b985ba1ae92457.jpg b/WechatSmallProject/test3/server/public/deal/b4e94fa5cdb1838bc362ea5b985ba1ae92457.jpg new file mode 100644 index 0000000..6adb68a Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/b4e94fa5cdb1838bc362ea5b985ba1ae92457.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/b7a446c030060222597d454ccb3e29b2136826.jpg b/WechatSmallProject/test3/server/public/deal/b7a446c030060222597d454ccb3e29b2136826.jpg new file mode 100644 index 0000000..80ac6cf Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/b7a446c030060222597d454ccb3e29b2136826.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/bf53d96ec2272d19d087d72d67df565f37970.jpg b/WechatSmallProject/test3/server/public/deal/bf53d96ec2272d19d087d72d67df565f37970.jpg new file mode 100644 index 0000000..968672d Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/bf53d96ec2272d19d087d72d67df565f37970.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/bfeb6437bbb3a125bee67473c52de9a978845.jpg b/WechatSmallProject/test3/server/public/deal/bfeb6437bbb3a125bee67473c52de9a978845.jpg new file mode 100644 index 0000000..55fa239 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/bfeb6437bbb3a125bee67473c52de9a978845.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/c0609cbcfd1f1a95256fe25dc30d9238119711.jpg b/WechatSmallProject/test3/server/public/deal/c0609cbcfd1f1a95256fe25dc30d9238119711.jpg new file mode 100644 index 0000000..44a5e3e Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/c0609cbcfd1f1a95256fe25dc30d9238119711.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/c23c7c29e74602f9939158c3f3e21fda141581.jpg b/WechatSmallProject/test3/server/public/deal/c23c7c29e74602f9939158c3f3e21fda141581.jpg new file mode 100644 index 0000000..0404464 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/c23c7c29e74602f9939158c3f3e21fda141581.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/c274f0927931d6be76b156cccf14ab7c252781.jpg b/WechatSmallProject/test3/server/public/deal/c274f0927931d6be76b156cccf14ab7c252781.jpg new file mode 100644 index 0000000..85031b5 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/c274f0927931d6be76b156cccf14ab7c252781.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/c2ce13dc00d3a99551c4ceed3a335b60136735.jpg b/WechatSmallProject/test3/server/public/deal/c2ce13dc00d3a99551c4ceed3a335b60136735.jpg new file mode 100644 index 0000000..116eb8a Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/c2ce13dc00d3a99551c4ceed3a335b60136735.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/c40ee7af26d65a44626f7cc905e2c7c3117336.jpg b/WechatSmallProject/test3/server/public/deal/c40ee7af26d65a44626f7cc905e2c7c3117336.jpg new file mode 100644 index 0000000..75afc6d Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/c40ee7af26d65a44626f7cc905e2c7c3117336.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/c9f1c341821b4656f81bfb976cbfa55c32496.jpg b/WechatSmallProject/test3/server/public/deal/c9f1c341821b4656f81bfb976cbfa55c32496.jpg new file mode 100644 index 0000000..a0f33a1 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/c9f1c341821b4656f81bfb976cbfa55c32496.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/d7377b700bd01dfcfdcf3bb20be32949112265.jpg b/WechatSmallProject/test3/server/public/deal/d7377b700bd01dfcfdcf3bb20be32949112265.jpg new file mode 100644 index 0000000..3b4041a Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/d7377b700bd01dfcfdcf3bb20be32949112265.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/db80ebddd202b27bba28d7cd1ae9273629749.jpg b/WechatSmallProject/test3/server/public/deal/db80ebddd202b27bba28d7cd1ae9273629749.jpg new file mode 100644 index 0000000..db46338 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/db80ebddd202b27bba28d7cd1ae9273629749.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/e5d43f4230aec5444fe72160de740f31119005.jpg b/WechatSmallProject/test3/server/public/deal/e5d43f4230aec5444fe72160de740f31119005.jpg new file mode 100644 index 0000000..701c9c2 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/e5d43f4230aec5444fe72160de740f31119005.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/e68910d95f9c4056e2066a23e708f35b43639.jpg b/WechatSmallProject/test3/server/public/deal/e68910d95f9c4056e2066a23e708f35b43639.jpg new file mode 100644 index 0000000..0c57ce0 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/e68910d95f9c4056e2066a23e708f35b43639.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/e6ddb4f0532fc1e028e5d3b5a62ef71535980.jpg b/WechatSmallProject/test3/server/public/deal/e6ddb4f0532fc1e028e5d3b5a62ef71535980.jpg new file mode 100644 index 0000000..99e10a9 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/e6ddb4f0532fc1e028e5d3b5a62ef71535980.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/e724e21efcaa3219e38497b340e08d01153620.jpg b/WechatSmallProject/test3/server/public/deal/e724e21efcaa3219e38497b340e08d01153620.jpg new file mode 100644 index 0000000..d392a34 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/e724e21efcaa3219e38497b340e08d01153620.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/e72d342d802c410f6622f5e36f265176312462.jpg b/WechatSmallProject/test3/server/public/deal/e72d342d802c410f6622f5e36f265176312462.jpg new file mode 100644 index 0000000..bdbf5cb Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/e72d342d802c410f6622f5e36f265176312462.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/e88d92d039eb53d084a307a886d04611102578.jpg b/WechatSmallProject/test3/server/public/deal/e88d92d039eb53d084a307a886d04611102578.jpg new file mode 100644 index 0000000..2141aff Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/e88d92d039eb53d084a307a886d04611102578.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/e94d919267508bfcfb1b629d8727c17f106610.jpg b/WechatSmallProject/test3/server/public/deal/e94d919267508bfcfb1b629d8727c17f106610.jpg new file mode 100644 index 0000000..aaadd60 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/e94d919267508bfcfb1b629d8727c17f106610.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/ea766dbba77f00bd37643c9697bc01c8153096.jpg b/WechatSmallProject/test3/server/public/deal/ea766dbba77f00bd37643c9697bc01c8153096.jpg new file mode 100644 index 0000000..8a5ff3c Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/ea766dbba77f00bd37643c9697bc01c8153096.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/ecfae46d44390d0fad40b4dacbd04213334496.jpg b/WechatSmallProject/test3/server/public/deal/ecfae46d44390d0fad40b4dacbd04213334496.jpg new file mode 100644 index 0000000..033f43e Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/ecfae46d44390d0fad40b4dacbd04213334496.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/f077a13f324aaf0db0b75163eaf29f3d110649.jpg b/WechatSmallProject/test3/server/public/deal/f077a13f324aaf0db0b75163eaf29f3d110649.jpg new file mode 100644 index 0000000..9dc026b Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/f077a13f324aaf0db0b75163eaf29f3d110649.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/f69589ef518f9b264b21005bdcf683b4102030.jpg b/WechatSmallProject/test3/server/public/deal/f69589ef518f9b264b21005bdcf683b4102030.jpg new file mode 100644 index 0000000..17ad363 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/f69589ef518f9b264b21005bdcf683b4102030.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/f78bc7c15702b7f3fe7021ebf17494ef357509.jpg b/WechatSmallProject/test3/server/public/deal/f78bc7c15702b7f3fe7021ebf17494ef357509.jpg new file mode 100644 index 0000000..ca8c834 Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/f78bc7c15702b7f3fe7021ebf17494ef357509.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/fcc7c3ec2ba903cb4b75232e2b35db6650472.jpg b/WechatSmallProject/test3/server/public/deal/fcc7c3ec2ba903cb4b75232e2b35db6650472.jpg new file mode 100644 index 0000000..02c500f Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/fcc7c3ec2ba903cb4b75232e2b35db6650472.jpg differ diff --git a/WechatSmallProject/test3/server/public/deal/ffead6264d34e3c0f0ba3b33e55e57ed109930.jpg b/WechatSmallProject/test3/server/public/deal/ffead6264d34e3c0f0ba3b33e55e57ed109930.jpg new file mode 100644 index 0000000..71eccea Binary files /dev/null and b/WechatSmallProject/test3/server/public/deal/ffead6264d34e3c0f0ba3b33e55e57ed109930.jpg differ diff --git a/WechatSmallProject/test3/server/public/poi/cc9138c67cf7cec2789a5b13bb7132dc43167.jpg b/WechatSmallProject/test3/server/public/poi/cc9138c67cf7cec2789a5b13bb7132dc43167.jpg new file mode 100644 index 0000000..7ab0c6d Binary files /dev/null and b/WechatSmallProject/test3/server/public/poi/cc9138c67cf7cec2789a5b13bb7132dc43167.jpg differ diff --git a/WechatSmallProject/test3/server/public/shaitu/71143bedc401441202d6cab04a04cf85108784.jpg b/WechatSmallProject/test3/server/public/shaitu/71143bedc401441202d6cab04a04cf85108784.jpg new file mode 100644 index 0000000..53fe015 Binary files /dev/null and b/WechatSmallProject/test3/server/public/shaitu/71143bedc401441202d6cab04a04cf85108784.jpg differ diff --git a/WechatSmallProject/test3/sitemap.json b/WechatSmallProject/test3/sitemap.json new file mode 100644 index 0000000..ca02add --- /dev/null +++ b/WechatSmallProject/test3/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/WechatSmallProject/test4/app.js b/WechatSmallProject/test4/app.js new file mode 100644 index 0000000..1ed57c4 --- /dev/null +++ b/WechatSmallProject/test4/app.js @@ -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 + } +}) diff --git a/WechatSmallProject/test4/app.json b/WechatSmallProject/test4/app.json new file mode 100644 index 0000000..b3cb4aa --- /dev/null +++ b/WechatSmallProject/test4/app.json @@ -0,0 +1,14 @@ +{ + "pages": [ + "pages/shoplist/shoplist" + ], + "window": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "Weixin", + "navigationBarBackgroundColor": "#ffffff" + }, + "style": "v2", + "componentFramework": "glass-easel", + "sitemapLocation": "sitemap.json", + "lazyCodeLoading": "requiredComponents" +} diff --git a/WechatSmallProject/test4/app.wxss b/WechatSmallProject/test4/app.wxss new file mode 100644 index 0000000..06c6fc9 --- /dev/null +++ b/WechatSmallProject/test4/app.wxss @@ -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; +} diff --git a/WechatSmallProject/test4/pages/shoplist/shoplist.js b/WechatSmallProject/test4/pages/shoplist/shoplist.js new file mode 100644 index 0000000..e5de1e4 --- /dev/null +++ b/WechatSmallProject/test4/pages/shoplist/shoplist.js @@ -0,0 +1,120 @@ +// pages/shoplist/shoplist.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + shopList: [], + isLoading: false + }, + + listData: { + page: 1, + pageSize: 10, + total: 0 + }, + + getShopList: function (cb) { + this.isLoading = true + wx.showLoading({ + title: '数据加载中...', + }) + + wx.request({ + url: 'http://127.0.0.1:3000/data', + method: "GET", + data: { + page: this.listData.page, + pageSize: this.listData.pageSize + }, + success: (res) => { + console.log(res); + this.setData({ + shopList: [...this.data.shopList, ...res.data], + }) + this.listData.total = res.header['X-Total-Count'] - 0 + }, + complete: () => { + wx.hideLoading() + this.isLoading = false + cb & cb() + } + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.getShopList() + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + this.setData({ + shopList: [] + }) + this.listData.page = 1 + this.listData.total = 0 + this.getShopList(() => { + wx.stopPullDownRefresh() + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + if (this.listData.page * this.listData.pageSize >= this.listData.total) { + return wx.showToast({ + title: '数据加载完毕', + icon: "none" + }) + } + + if (this.isLoading) { + return + } + + ++this.listData.page + this.getShopList() + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/WechatSmallProject/test4/pages/shoplist/shoplist.json b/WechatSmallProject/test4/pages/shoplist/shoplist.json new file mode 100644 index 0000000..3de5e53 --- /dev/null +++ b/WechatSmallProject/test4/pages/shoplist/shoplist.json @@ -0,0 +1,8 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "美食", + "onReachBottomDistance": 200, + "enablePullDownRefresh": true, + "backgroundColor": "#efefef", + "backgroundTextStyle": "dark" +} \ No newline at end of file diff --git a/WechatSmallProject/test4/pages/shoplist/shoplist.wxml b/WechatSmallProject/test4/pages/shoplist/shoplist.wxml new file mode 100644 index 0000000..67b4fd5 --- /dev/null +++ b/WechatSmallProject/test4/pages/shoplist/shoplist.wxml @@ -0,0 +1,12 @@ + + + + + + {{item.name}} + 电话:{{tools.splitPhone(item.phone)}} + 地址:{{item.address}} + 营业时间:{{item.businessHours}} + + + \ No newline at end of file diff --git a/WechatSmallProject/test4/pages/shoplist/shoplist.wxss b/WechatSmallProject/test4/pages/shoplist/shoplist.wxss new file mode 100644 index 0000000..751a23b --- /dev/null +++ b/WechatSmallProject/test4/pages/shoplist/shoplist.wxss @@ -0,0 +1,74 @@ +/* 页面整体 */ +page { + background-color: #f5f5f5; +} + +/* 列表项 */ +.shop-item { + display: flex; + padding: 20rpx; + margin: 20rpx; + background: #ffffff; + border-radius: 16rpx; + box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.05); +} + +/* 图片区域 */ +.thumb { + width: 180rpx; + height: 180rpx; + margin-right: 20rpx; + flex-shrink: 0; +} + +.thumb image { + width: 100%; + height: 100%; + border-radius: 12rpx; + background: #eee; +} + +/* 右侧信息 */ +.info { + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +/* 标题 */ +.shop-title { + font-size: 32rpx; + font-weight: bold; + color: #333; + margin-bottom: 10rpx; + + /* 超出两行省略 */ + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* 文字通用 */ +.info text { + font-size: 24rpx; + color: #666; + margin-bottom: 6rpx; +} + +/* 电话高亮 */ +.info text:nth-child(2) { + color: #2a7fff; +} + +/* 地址稍微淡一点 */ +.info text:nth-child(3) { + color: #999; +} + +/* 营业时间 */ +.info text:nth-child(4) { + color: #999; + font-size: 22rpx; +} \ No newline at end of file diff --git a/WechatSmallProject/test4/project.config.json b/WechatSmallProject/test4/project.config.json new file mode 100644 index 0000000..b9bcb22 --- /dev/null +++ b/WechatSmallProject/test4/project.config.json @@ -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": "wx8c60a45abd90774a", + "simulatorPluginLibVersion": {} +} \ No newline at end of file diff --git a/WechatSmallProject/test4/project.private.config.json b/WechatSmallProject/test4/project.private.config.json new file mode 100644 index 0000000..b918f69 --- /dev/null +++ b/WechatSmallProject/test4/project.private.config.json @@ -0,0 +1,23 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "test4", + "setting": { + "compileHotReLoad": true, + "urlCheck": false, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "skylineRenderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "useApiHook": true, + "useApiHostProcess": true, + "showShadowRootInWxmlPanel": true, + "useStaticServer": false, + "useLanDebug": false, + "showES6CompileOption": false, + "bigPackageSizeSupport": false, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true + }, + "libVersion": "3.15.2" +} \ No newline at end of file diff --git a/WechatSmallProject/test4/sitemap.json b/WechatSmallProject/test4/sitemap.json new file mode 100644 index 0000000..ca02add --- /dev/null +++ b/WechatSmallProject/test4/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/WechatSmallProject/test4/utils/tools.wxs b/WechatSmallProject/test4/utils/tools.wxs new file mode 100644 index 0000000..8f06891 --- /dev/null +++ b/WechatSmallProject/test4/utils/tools.wxs @@ -0,0 +1,13 @@ +function splitPhone(str) { + if (str.length !== 11) { + return str + } + var arr = str.split("") + arr.splice(3, 0, '-') + arr.splice(8, 0, '-') + return arr.join("") +} + +module.exports = { + splitPhone: splitPhone +} \ No newline at end of file