├── miniprogram
├── pages
│ ├── hdbm
│ │ ├── hdbm.wxss
│ │ ├── hdbm.json
│ │ ├── hdbm.wxml
│ │ └── hdbm.js
│ ├── jbgl
│ │ ├── jbgl.wxss
│ │ ├── jbgl.json
│ │ ├── jbgl.wxml
│ │ └── jbgl.js
│ ├── qxyy
│ │ ├── qxyy.wxss
│ │ ├── qxyy.json
│ │ ├── qxyy.wxml
│ │ └── qxyy.js
│ ├── dk
│ │ ├── dk.json
│ │ ├── dk.wxml
│ │ ├── dk.js
│ │ └── dk.wxss
│ ├── notic
│ │ ├── notic.wxss
│ │ ├── notic.json
│ │ ├── notic.wxml
│ │ └── notic.js
│ ├── sm
│ │ ├── sm.json
│ │ ├── sm.wxml
│ │ ├── sm.wxss
│ │ └── sm.js
│ ├── dkjl
│ │ ├── dkjl.json
│ │ ├── dkjl.wxml
│ │ └── dkjl.js
│ ├── glht
│ │ ├── glht.json
│ │ ├── glht.wxss
│ │ ├── glht.wxml
│ │ └── glht.js
│ ├── grzl
│ │ ├── grzl.json
│ │ ├── grzl.wxml
│ │ ├── grzl.wxss
│ │ └── grzl.js
│ ├── gywm
│ │ ├── gywm.json
│ │ ├── gywm.wxml
│ │ ├── gywm.wxss
│ │ └── gywm.js
│ ├── jdjb
│ │ ├── jdjb.json
│ │ ├── jdjb.wxss
│ │ ├── jdjb.wxml
│ │ └── jdjb.js
│ ├── news
│ │ ├── news.json
│ │ ├── news.wxml
│ │ ├── news.wxss
│ │ └── news.js
│ ├── swxq
│ │ ├── swxq.json
│ │ ├── swxq.wxss
│ │ ├── swxq.wxml
│ │ └── swxq.js
│ ├── swzl
│ │ ├── swzl.json
│ │ ├── swzl.wxss
│ │ ├── swzl.js
│ │ └── swzl.wxml
│ ├── tsxq
│ │ ├── tsxq.json
│ │ ├── tsxq.wxml
│ │ ├── tsxq.js
│ │ └── tsxq.wxss
│ ├── wdyy
│ │ ├── wdyy.json
│ │ ├── wdyy.wxss
│ │ ├── wdyy.wxml
│ │ └── wdyy.js
│ ├── wpxx
│ │ ├── wpxx.json
│ │ ├── wpxx.wxss
│ │ ├── wpxx.wxml
│ │ └── wpxx.js
│ ├── xgxx
│ │ ├── xgxx.json
│ │ ├── xgxx.wxml
│ │ ├── xgxx.wxss
│ │ └── xgxx.js
│ ├── getuser
│ │ ├── getuser.json
│ │ ├── getuser.wxml
│ │ ├── getuser.wxss
│ │ └── getuser.js
│ ├── index
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ ├── jgglxq
│ │ ├── jgglxq.json
│ │ ├── jgglxq.wxml
│ │ ├── jgglxq.wxss
│ │ └── jgglxq.js
│ ├── fbxx
│ │ ├── fbxx.wxss
│ │ ├── fbxx.json
│ │ ├── fbxx.wxml
│ │ └── fbxx.js
│ ├── fqjb
│ │ ├── fqjb.wxss
│ │ ├── fqjb.json
│ │ ├── fqjb.wxml
│ │ └── fqjb.js
│ ├── fwzx
│ │ ├── fwzx.wxss
│ │ ├── fwzx.json
│ │ ├── fwzx.wxml
│ │ └── fwzx.js
│ ├── yjfk
│ │ ├── yjfk.wxss
│ │ ├── yjfk.json
│ │ ├── yjfk.wxml
│ │ └── yjfk.js
│ ├── zwyd
│ │ ├── zwyd.json
│ │ ├── zwyd.wxml
│ │ ├── zwyd.wxss
│ │ └── zwyd.js
│ ├── zwyy
│ │ ├── zwyy.json
│ │ ├── zwyy.wxss
│ │ ├── zwyy.wxml
│ │ └── zwyy.js
│ ├── tscx
│ │ ├── tscx.json
│ │ ├── tscx.wxml
│ │ ├── tscx.js
│ │ └── tscx.wxss
│ └── my
│ │ ├── my.json
│ │ ├── my.wxss
│ │ ├── my.js
│ │ └── my.wxml
├── images
│ ├── dk.png
│ ├── jl.png
│ ├── qr.png
│ ├── tz.png
│ ├── yh.png
│ ├── map.png
│ ├── ssjg.png
│ ├── 1035211.jpg
│ ├── biaodan.png
│ ├── chaxun.png
│ ├── confirm.png
│ ├── guahao.png
│ ├── guahao1.png
│ ├── qingdan.png
│ ├── tuandui.png
│ ├── xuexiao.png
│ ├── zhinan.png
│ ├── 17972299.png
│ ├── calendar.png
│ ├── huodong1.png
│ ├── shenghuo.png
│ ├── shenghuo1.png
│ ├── tuandui1.png
│ ├── xuexiao1.png
│ ├── dakaqiandao.png
│ ├── kefuguanli.png
│ ├── qiyeguanli.png
│ ├── shoucangjia.png
│ ├── shoucangjia1.png
│ ├── wodemaidan.png
│ ├── 5c9647d0c66d1.jpg
│ ├── 5cff6f9da2f6c.png
│ ├── 5d03ae5765a9c.jpg
│ ├── 5d044a1b5b7e4.jpg
│ ├── 5d21f5a20be59.jpg
│ ├── 5d5bb0b712455.jpg
│ ├── 5d5bb90e8d412.jpg
│ ├── chakandingdan.png
│ ├── huiyishenqing.png
│ ├── shiwuzhaoling.png
│ ├── zhanghaoguanli.png
│ ├── online-tracking.png
│ └── arrow.svg
├── envList.js
├── sitemap.json
├── app.wxss
├── app.js
├── utils
│ ├── index.js
│ ├── times.js
│ └── barcode.js
└── app.json
├── cloudfunctions
├── getjdjb
│ ├── config.json
│ ├── package.json
│ └── index.js
├── getxz
│ ├── config.json
│ ├── package.json
│ └── index.js
├── getzw
│ ├── config.json
│ ├── index.js
│ └── package.json
├── jbglcx
│ ├── config.json
│ ├── package.json
│ └── index.js
├── open
│ ├── config.json
│ ├── package.json
│ └── index.js
├── getjbglxq
│ ├── config.json
│ ├── package.json
│ └── index.js
├── getzwlist
│ ├── config.json
│ ├── package.json
│ └── index.js
├── fstz
│ ├── config.json
│ ├── package.json
│ └── index.js
└── quickstartFunctions
│ ├── config.json
│ ├── selectRecord
│ └── index.js
│ ├── package.json
│ ├── getOpenId
│ └── index.js
│ ├── sumRecord
│ └── index.js
│ ├── getMiniProgramCode
│ └── index.js
│ ├── updateRecord
│ └── index.js
│ ├── index.js
│ └── createCollection
│ └── index.js
├── uploadCloudFunction.bat
├── .gitignore
├── README.md
├── .eslintrc.js
├── project.private.config.json
└── project.config.json
/miniprogram/pages/hdbm/hdbm.wxss:
--------------------------------------------------------------------------------
1 | /* pages/hdbm/hdbm.wxss */
--------------------------------------------------------------------------------
/miniprogram/pages/jbgl/jbgl.wxss:
--------------------------------------------------------------------------------
1 | /* pages/jbgl/jbgl.wxss */
--------------------------------------------------------------------------------
/miniprogram/pages/qxyy/qxyy.wxss:
--------------------------------------------------------------------------------
1 | /* pages/qxyy/qxyy.wxss */
--------------------------------------------------------------------------------
/miniprogram/pages/dk/dk.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/notic/notic.wxss:
--------------------------------------------------------------------------------
1 | /* pages/notic/notic.wxss */
--------------------------------------------------------------------------------
/miniprogram/pages/sm/sm.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/dkjl/dkjl.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/glht/glht.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/grzl/grzl.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/gywm/gywm.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/hdbm/hdbm.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/jbgl/jbgl.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/jdjb/jdjb.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/news/news.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/swxq/swxq.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/swzl/swzl.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/tsxq/tsxq.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/wdyy/wdyy.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/wpxx/wpxx.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/xgxx/xgxx.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/getuser/getuser.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/jgglxq/jgglxq.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/notic/notic.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/fbxx/fbxx.wxss:
--------------------------------------------------------------------------------
1 | /* pages/fbxx/fbxx.wxss */
2 | page{height:100%;}
--------------------------------------------------------------------------------
/miniprogram/pages/fqjb/fqjb.wxss:
--------------------------------------------------------------------------------
1 | /* pages/fqjb/fqjb.wxss */
2 | page{height:100%;}
--------------------------------------------------------------------------------
/miniprogram/pages/fwzx/fwzx.wxss:
--------------------------------------------------------------------------------
1 | /* pages/fwzx/fwzx.wxss */
2 | page{height:100%;}
--------------------------------------------------------------------------------
/miniprogram/pages/yjfk/yjfk.wxss:
--------------------------------------------------------------------------------
1 | /* pages/yjfk/yjfk.wxss */
2 | page{height:100%;}
--------------------------------------------------------------------------------
/miniprogram/pages/zwyd/zwyd.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 |
4 | }
5 | }
--------------------------------------------------------------------------------
/cloudfunctions/getjdjb/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloudfunctions/getxz/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloudfunctions/getzw/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloudfunctions/jbglcx/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloudfunctions/open/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloudfunctions/getjbglxq/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloudfunctions/getzwlist/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/miniprogram/images/dk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/dk.png
--------------------------------------------------------------------------------
/miniprogram/images/jl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/jl.png
--------------------------------------------------------------------------------
/miniprogram/images/qr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/qr.png
--------------------------------------------------------------------------------
/miniprogram/images/tz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/tz.png
--------------------------------------------------------------------------------
/miniprogram/images/yh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/yh.png
--------------------------------------------------------------------------------
/miniprogram/pages/notic/notic.wxml:
--------------------------------------------------------------------------------
1 |
2 | pages/notic/notic.wxml
3 |
--------------------------------------------------------------------------------
/miniprogram/pages/zwyy/zwyy.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "enablePullDownRefresh": true
4 | }
--------------------------------------------------------------------------------
/uploadCloudFunction.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/uploadCloudFunction.bat
--------------------------------------------------------------------------------
/miniprogram/images/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/map.png
--------------------------------------------------------------------------------
/miniprogram/images/ssjg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/ssjg.png
--------------------------------------------------------------------------------
/miniprogram/images/1035211.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/1035211.jpg
--------------------------------------------------------------------------------
/miniprogram/images/biaodan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/biaodan.png
--------------------------------------------------------------------------------
/miniprogram/images/chaxun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/chaxun.png
--------------------------------------------------------------------------------
/miniprogram/images/confirm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/confirm.png
--------------------------------------------------------------------------------
/miniprogram/images/guahao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/guahao.png
--------------------------------------------------------------------------------
/miniprogram/images/guahao1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/guahao1.png
--------------------------------------------------------------------------------
/miniprogram/images/qingdan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/qingdan.png
--------------------------------------------------------------------------------
/miniprogram/images/tuandui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/tuandui.png
--------------------------------------------------------------------------------
/miniprogram/images/xuexiao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/xuexiao.png
--------------------------------------------------------------------------------
/miniprogram/images/zhinan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/zhinan.png
--------------------------------------------------------------------------------
/miniprogram/images/17972299.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/17972299.png
--------------------------------------------------------------------------------
/miniprogram/images/calendar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/calendar.png
--------------------------------------------------------------------------------
/miniprogram/images/huodong1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/huodong1.png
--------------------------------------------------------------------------------
/miniprogram/images/shenghuo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/shenghuo.png
--------------------------------------------------------------------------------
/miniprogram/images/shenghuo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/shenghuo1.png
--------------------------------------------------------------------------------
/miniprogram/images/tuandui1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/tuandui1.png
--------------------------------------------------------------------------------
/miniprogram/images/xuexiao1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/xuexiao1.png
--------------------------------------------------------------------------------
/miniprogram/pages/fwzx/fwzx.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-msg": "weui-miniprogram/msg/msg"
4 | }
5 | }
--------------------------------------------------------------------------------
/miniprogram/pages/tscx/tscx.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-icon": "weui-miniprogram/icon/icon"
4 | }
5 | }
--------------------------------------------------------------------------------
/miniprogram/pages/yjfk/yjfk.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-msg": "weui-miniprogram/msg/msg"
4 | }
5 | }
--------------------------------------------------------------------------------
/miniprogram/images/dakaqiandao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/dakaqiandao.png
--------------------------------------------------------------------------------
/miniprogram/images/kefuguanli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/kefuguanli.png
--------------------------------------------------------------------------------
/miniprogram/images/qiyeguanli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/qiyeguanli.png
--------------------------------------------------------------------------------
/miniprogram/images/shoucangjia.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/shoucangjia.png
--------------------------------------------------------------------------------
/miniprogram/images/shoucangjia1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/shoucangjia1.png
--------------------------------------------------------------------------------
/miniprogram/images/wodemaidan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/wodemaidan.png
--------------------------------------------------------------------------------
/miniprogram/pages/my/my.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-dialog": "weui-miniprogram/dialog/dialog"
4 | }
5 | }
--------------------------------------------------------------------------------
/cloudfunctions/fstz/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | "templateMessage.send"
5 | ]
6 | }
7 | }
--------------------------------------------------------------------------------
/miniprogram/images/5c9647d0c66d1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/5c9647d0c66d1.jpg
--------------------------------------------------------------------------------
/miniprogram/images/5cff6f9da2f6c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/5cff6f9da2f6c.png
--------------------------------------------------------------------------------
/miniprogram/images/5d03ae5765a9c.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/5d03ae5765a9c.jpg
--------------------------------------------------------------------------------
/miniprogram/images/5d044a1b5b7e4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/5d044a1b5b7e4.jpg
--------------------------------------------------------------------------------
/miniprogram/images/5d21f5a20be59.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/5d21f5a20be59.jpg
--------------------------------------------------------------------------------
/miniprogram/images/5d5bb0b712455.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/5d5bb0b712455.jpg
--------------------------------------------------------------------------------
/miniprogram/images/5d5bb90e8d412.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/5d5bb90e8d412.jpg
--------------------------------------------------------------------------------
/miniprogram/images/chakandingdan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/chakandingdan.png
--------------------------------------------------------------------------------
/miniprogram/images/huiyishenqing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/huiyishenqing.png
--------------------------------------------------------------------------------
/miniprogram/images/shiwuzhaoling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/shiwuzhaoling.png
--------------------------------------------------------------------------------
/miniprogram/images/zhanghaoguanli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/zhanghaoguanli.png
--------------------------------------------------------------------------------
/miniprogram/images/online-tracking.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YgCookie/miniprogram-1/HEAD/miniprogram/images/online-tracking.png
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | "wxacode.get"
5 | ]
6 | }
7 | }
--------------------------------------------------------------------------------
/miniprogram/envList.js:
--------------------------------------------------------------------------------
1 | const envList = [{"envId":"cloud1-5gnbg2zy6247a86d","alias":"cloud1"}]
2 | const isMac = false
3 | module.exports = {
4 | envList,
5 | isMac
6 | }
--------------------------------------------------------------------------------
/miniprogram/pages/glht/glht.wxss:
--------------------------------------------------------------------------------
1 | /* pages/glht/glht.wxss */
2 | .banner{
3 | width: 100%;
4 | height: 250rpx;
5 | }
6 | .banner image{
7 | width: 100%;
8 | height: 100%;
9 | }
--------------------------------------------------------------------------------
/miniprogram/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows
2 | [Dd]esktop.ini
3 | Thumbs.db
4 | $RECYCLE.BIN/
5 |
6 | # macOS
7 | .DS_Store
8 | .fseventsd
9 | .Spotlight-V100
10 | .TemporaryItems
11 | .Trashes
12 |
13 | # Node.js
14 | node_modules/
15 |
--------------------------------------------------------------------------------
/miniprogram/pages/jdjb/jdjb.wxss:
--------------------------------------------------------------------------------
1 | /* pages/jdjb/jdjb.wxss */
2 | .banner{
3 | width: 100%;
4 | height: 250rpx;
5 | }
6 | .banner image{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .wdjb{
11 | margin-top: 50rpx;
12 | }
--------------------------------------------------------------------------------
/miniprogram/pages/glht/glht.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/miniprogram/pages/wdyy/wdyy.wxss:
--------------------------------------------------------------------------------
1 | /* pages/wdyy/wdyy.wxss */
2 | .banner{
3 | width: 100%;
4 | height: 250rpx;
5 | }
6 | .banner image{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .yyxx_box{
11 | width: 95%;
12 | margin: 20rpx auto;
13 | }
--------------------------------------------------------------------------------
/miniprogram/pages/gywm/gywm.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram/pages/wpxx/wpxx.wxss:
--------------------------------------------------------------------------------
1 | /* pages/wpxx/wpxx.wxss */
2 | .zp{
3 | width: 90%;
4 | height: 350rpx;
5 | margin: 30rpx auto;
6 | }
7 | .zp image{
8 | width: 100%;
9 | height: 100%;
10 | }
11 | .wz{
12 | line-height: 90rpx;
13 | color: rgb(78, 78, 78);
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/getzw/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init({
5 | // env:'tsgl-4gpqt9omb33f4369'
6 | env:'cloud1-5gnbg2zy6247a86d'
7 | })
8 | const db=cloud.database()
9 | // 云函数入口函数
10 | exports.main = async (event, context) => {
11 | return await db.collection("tsgzw").get()
12 | }
--------------------------------------------------------------------------------
/cloudfunctions/fstz/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fstz",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.5.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/open/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "open",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.5.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/getjdjb/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "getjdjb",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.5.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/getxz/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "getxz",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.5.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/getzw/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "getzw",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.5.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/jbglcx/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jbglcx",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.5.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/getjbglxq/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "getjbglxq",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.5.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/getzwlist/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "getzwlist",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.5.3"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/selectRecord/index.js:
--------------------------------------------------------------------------------
1 | const cloud = require('wx-server-sdk');
2 |
3 | cloud.init({
4 | env: cloud.DYNAMIC_CURRENT_ENV
5 | });
6 | const db = cloud.database();
7 |
8 | // 查询数据库集合云函数入口函数
9 | exports.main = async (event, context) => {
10 | // 返回数据库查询结果
11 | return await db.collection('sales').get();
12 | };
13 |
--------------------------------------------------------------------------------
/cloudfunctions/open/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 |
6 | // 云函数入口函数
7 | exports.main = async (event, context) => {
8 | const wxContext = cloud.getWXContext()
9 |
10 | return {
11 | event,
12 | openid: wxContext.OPENID,
13 | appid: wxContext.APPID,
14 | unionid: wxContext.UNIONID,
15 | }
16 | }
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "quickstartFunctions",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "~2.4.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/miniprogram/pages/news/news.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 新闻公告:{{title}}
4 | 发布时间:{{time}}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/getOpenId/index.js:
--------------------------------------------------------------------------------
1 | const cloud = require('wx-server-sdk');
2 |
3 | cloud.init({
4 | env: cloud.DYNAMIC_CURRENT_ENV
5 | });
6 |
7 | // 获取openId云函数入口函数
8 | exports.main = async (event, context) => {
9 | // 获取基础信息
10 | const wxContext = cloud.getWXContext();
11 |
12 | return {
13 | openid: wxContext.OPENID,
14 | appid: wxContext.APPID,
15 | unionid: wxContext.UNIONID,
16 | };
17 | };
18 |
--------------------------------------------------------------------------------
/miniprogram/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | .container {
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | box-sizing: border-box;
7 | }
8 |
9 | button {
10 | background: initial;
11 | }
12 |
13 | button:focus{
14 | outline: 0;
15 | }
16 |
17 | button::after{
18 | border: none;
19 | }
20 |
21 |
22 | page {
23 | background: #f6f6f6;
24 | display: flex;
25 | flex-direction: column;
26 | justify-content: flex-start;
27 | }
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/sumRecord/index.js:
--------------------------------------------------------------------------------
1 | const cloud = require('wx-server-sdk');
2 |
3 | cloud.init({
4 | env: cloud.DYNAMIC_CURRENT_ENV
5 | });
6 | const db = cloud.database();
7 | const $ = db.command.aggregate;
8 |
9 | // 聚合记录云函数入口函数
10 | exports.main = async (event, context) => {
11 | // 返回数据库聚合结果
12 | return db.collection('sales').aggregate()
13 | .group({
14 | _id: '$region',
15 | sum: $.sum('$sales')
16 | })
17 | .end();
18 | };
19 |
--------------------------------------------------------------------------------
/miniprogram/pages/qxyy/qxyy.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-form-page": "weui-miniprogram/form-page/form-page",
4 | "mp-toptips": "weui-miniprogram/toptips/toptips",
5 | "mp-cell": "weui-miniprogram/cell/cell",
6 | "mp-form": "weui-miniprogram/form/form",
7 | "mp-checkbox-group": "weui-miniprogram/checkbox-group/checkbox-group",
8 | "mp-checkbox": "weui-miniprogram/checkbox/checkbox",
9 | "mp-cells": "weui-miniprogram/cells/cells"
10 | }
11 | }
--------------------------------------------------------------------------------
/cloudfunctions/jbglcx/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init({
5 | // env:'tsgl-4gpqt9omb33f4369'
6 | env:'cloud1-5gnbg2zy6247a86d'
7 | })
8 | const db=cloud.database()
9 | // 云函数入口函数
10 | exports.main = async (event, context) => {
11 | return await db.collection('jdjb').aggregate()
12 | .lookup({
13 | from:'tsgzw',
14 | localField:'jbzw',
15 | foreignField:'_id',
16 | as:'zwlist'
17 | })
18 | .end()
19 | }
--------------------------------------------------------------------------------
/miniprogram/pages/gywm/gywm.wxss:
--------------------------------------------------------------------------------
1 | /* pages/gywm/gywm.wxss */
2 |
3 | .banner{
4 | width: 100%;
5 | height: 350rpx;
6 | }
7 | .banner image{
8 | width: 100%;
9 | height: 100%;
10 | }
11 | .text{
12 | width: 90%;
13 | margin:0 auto ;
14 | color: rgb(100, 99, 98);
15 | line-height: 50rpx;
16 | margin-top: 20rpx;
17 | }
18 | .text1{
19 | color: rgb(55, 150, 228);
20 | line-height: 100rpx;
21 | font-size: 35rpx;
22 | text-align: center;
23 | }
24 | .dd{
25 | width: 90%;
26 | margin: 10rpx auto;
27 | }
--------------------------------------------------------------------------------
/miniprogram/pages/yjfk/yjfk.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 点击下方按钮,按反馈类型填写提交,在反馈核实后第一时间联系您!
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/miniprogram/pages/fbxx/fbxx.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-form-page": "weui-miniprogram/form-page/form-page",
4 | "mp-toptips": "weui-miniprogram/toptips/toptips",
5 | "mp-cells": "weui-miniprogram/cells/cells",
6 | "mp-cell": "weui-miniprogram/cell/cell",
7 | "mp-checkbox": "weui-miniprogram/checkbox/checkbox",
8 | "mp-checkbox-group": "weui-miniprogram/checkbox-group/checkbox-group",
9 | "mp-form": "weui-miniprogram/form/form",
10 | "mp-uploader": "weui-miniprogram/uploader/uploader"
11 | }
12 | }
--------------------------------------------------------------------------------
/miniprogram/pages/fqjb/fqjb.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-form-page": "weui-miniprogram/form-page/form-page",
4 | "mp-toptips": "weui-miniprogram/toptips/toptips",
5 | "mp-cells": "weui-miniprogram/cells/cells",
6 | "mp-cell": "weui-miniprogram/cell/cell",
7 | "mp-checkbox": "weui-miniprogram/checkbox/checkbox",
8 | "mp-checkbox-group": "weui-miniprogram/checkbox-group/checkbox-group",
9 | "mp-form": "weui-miniprogram/form/form",
10 | "mp-uploader": "weui-miniprogram/uploader/uploader"
11 | }
12 | }
--------------------------------------------------------------------------------
/miniprogram/pages/fwzx/fwzx.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 点击下方按钮,在反馈后第一时间联系您!
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/miniprogram/pages/getuser/getuser.wxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/cloudfunctions/getjbglxq/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init({
5 | // env:'tsgl-4gpqt9omb33f4369'
6 | env:'cloud1-5gnbg2zy6247a86d'
7 | })
8 | const db=cloud.database()
9 | // 云函数入口函数
10 | exports.main = async (event, context) => {
11 | var id=event.id
12 | return await db.collection('jdjb').aggregate().match({
13 | _id:id
14 | })
15 | .lookup({
16 | from:'tsgzw',
17 | localField:'jbzw',
18 | foreignField:'_id',
19 | as:'zwlist'
20 | })
21 | .end()
22 | }
--------------------------------------------------------------------------------
/cloudfunctions/getjdjb/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init({
5 | // env:'tsgl-4gpqt9omb33f4369'
6 | env:'cloud1-5gnbg2zy6247a86d'
7 | })
8 | const db=cloud.database()
9 | // 云函数入口函数
10 | exports.main = async (event, context) => {
11 | var listid=event.listid
12 | return await db.collection('jdjb').aggregate().match({
13 | openid:listid
14 | })
15 | .lookup({
16 | from:'tsgzw',
17 | localField:'jbzw',
18 | foreignField:'_id',
19 | as:'zwlist'
20 | })
21 | .end()
22 | }
--------------------------------------------------------------------------------
/cloudfunctions/getzwlist/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init({
5 | // env:'tsgl-4gpqt9omb33f4369'
6 | env:'cloud1-5gnbg2zy6247a86d'
7 | })
8 | const db=cloud.database()
9 | // 云函数入口函数
10 | exports.main = async (event, context) => {
11 | var listid=event.listid
12 | return await db.collection('tsgzw').aggregate().match({
13 | _id:listid
14 | })
15 | .lookup({
16 | from:'tsgwz',
17 | localField:'lc',
18 | foreignField:'_id',
19 | as:'zwlist'
20 | })
21 | .end()
22 | }
--------------------------------------------------------------------------------
/miniprogram/pages/getuser/getuser.wxss:
--------------------------------------------------------------------------------
1 | /* pages/getuser/getuser.wxss */
2 | .avatar-wrapper{
3 | width: 300rpx;
4 | height: 300rpx;
5 | }
6 | .avatar{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .row{
11 | width: 100%;
12 | border: 1rpx solid rgb(241, 241, 235);
13 | }
14 | .text1{
15 | margin: 20rpx auto;
16 | float: left;
17 | height: 50rpx;
18 | color: rgb(117, 114, 114);
19 | padding-left: 20rpx;
20 | padding-right: 20rpx;
21 | }
22 | .weui-input{
23 | width: 400rpx;
24 | margin: 20rpx auto;
25 | float: left;
26 | height: 50rpx;
27 | }
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/getMiniProgramCode/index.js:
--------------------------------------------------------------------------------
1 | const cloud = require('wx-server-sdk');
2 |
3 | cloud.init({
4 | env: cloud.DYNAMIC_CURRENT_ENV
5 | });
6 |
7 | // 获取小程序二维码云函数入口函数
8 | exports.main = async (event, context) => {
9 | // 获取小程序二维码的buffer
10 | const resp = await cloud.openapi.wxacode.get({
11 | path: 'pages/index/index'
12 | });
13 | const { buffer } = resp;
14 | // 将图片上传云存储空间
15 | const upload = await cloud.uploadFile({
16 | cloudPath: 'code.png',
17 | fileContent: buffer
18 | });
19 | return upload.fileID;
20 | };
21 |
--------------------------------------------------------------------------------
/miniprogram/app.js:
--------------------------------------------------------------------------------
1 | // app.js
2 | App({
3 | onLaunch: function () {
4 | if (!wx.cloud) {
5 | console.error('请使用 2.2.3 或以上的基础库以使用云能力');
6 | } else {
7 | wx.cloud.init({
8 | // env 参数说明:
9 | // env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源
10 | // 此处请填入环境 ID, 环境 ID 可打开云控制台查看
11 | // 如不填则使用默认环境(第一个创建的环境)
12 | env: 'cloud1-5gnbg2zy6247a86d',
13 |
14 | traceUser: true,
15 | });
16 | }
17 |
18 | this.globalData = {};
19 | },
20 | globalData:{
21 | openid:''
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # miniprogram-1
2 |
3 | > 该图书馆座位预约系统是一个二次开发系统。
4 |
5 | 从b站老师Liu-Nano的教程中学习的,其中对该系统做出了以下的优化:
6 | 1.扫码签退功能的完善
7 | 2.增加一些功能
8 |
9 | > 打✔表示已完成的增加的功能
10 |
11 | - [] 同一个人在同一时间不能预约多个座位
12 | - [] 在一个时间段内只能签到该时间段的座位
13 | - [] 迟到次数
14 | - [] 缺卡次数
15 | - [] 积分,积分低于一定的值将一段时间内无法进入
16 |
17 | 搞了几天,决定把管理端分离开,由于不想把代码分开上传,所以决定把管理端代码adminLibrary文件夹弄进来了,其中上述的功能我的另外一个同学已经弄好了,但由于不是我弄的,所以不打算上传,等暑假的时候复盘的时候我会完善自己的然后上传。
18 |
19 | > 下列✔内容为管理端增加的内容,管理端在admin分支
20 |
21 | - [x] 用Echarts增加了上座率的视图可视化
22 | - [x] 增加了一键关闭图书馆(自习室)或开放图书馆(自习室)的功能
23 |
--------------------------------------------------------------------------------
/miniprogram/pages/news/news.wxss:
--------------------------------------------------------------------------------
1 | /* pages/news/news.wxss */
2 | .news_title{
3 | width: 100%;
4 | height: 200rpx;
5 | background-color: aliceblue;
6 | }
7 | .news-tite1{
8 | text-align: center;
9 | margin-top: 20rpx;
10 | line-height: 50rpx;
11 | font-weight: 700;
12 | }
13 | .news-tite2{
14 | text-align: center;
15 | margin-top: 2rpx;
16 | line-height: 70rpx;
17 | font-weight: 500;
18 | font-size: 25rpx;
19 | color: rgb(180, 184, 184);
20 | }
21 | .news_main{
22 | width: 95%;
23 | margin: 0 auto;
24 | }
25 | image{
26 | width: 600rpx;
27 | height: 350rpx;
28 | margin: 0 auto;
29 | }
30 |
--------------------------------------------------------------------------------
/miniprogram/utils/index.js:
--------------------------------------------------------------------------------
1 | var barcode = require('./barcode');
2 | var qrcode = require('./qrcode');
3 |
4 | function convert_length(length) {
5 | return Math.round(wx.getSystemInfoSync().windowWidth * length / 750);
6 | }
7 |
8 | function barc(id, code, width, height) {
9 | barcode.code128(wx.createCanvasContext(id), code, convert_length(width), convert_length(height))
10 | }
11 |
12 | function qrc(id, code, width, height) {
13 | qrcode.api.draw(code, {
14 | ctx: wx.createCanvasContext(id),
15 | width: convert_length(width),
16 | height: convert_length(height)
17 | })
18 | }
19 |
20 | module.exports = {
21 | barcode: barc,
22 | qrcode: qrc
23 | }
--------------------------------------------------------------------------------
/cloudfunctions/getxz/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init({
5 | // env:'tsgl-4gpqt9omb33f4369'
6 | env:'cloud1-5gnbg2zy6247a86d'
7 | })
8 | const db = cloud.database()
9 | // 云函数入口函数
10 | exports.main = async (event, context) => {
11 | var text = event.openid
12 | return await db.collection('xzxx').aggregate().match({openid:text})
13 | // 将输入记录的一个字段和被连接集合的一个字段进行相等匹配时(即合并数据库)
14 | .lookup({
15 | from:'tsgzw',//要连接的集合名
16 | localField:'zxzw',//输入记录的要进行相等匹配的字段
17 | foreignField:'_id',//被连接集合的要进行相等匹配的字段
18 | as:'zwList'//输出的数组字段名
19 | })
20 | .sort({
21 | _updateTime: -1 // 倒序
22 | })
23 | .end()
24 | }
--------------------------------------------------------------------------------
/miniprogram/utils/times.js:
--------------------------------------------------------------------------------
1 | function toDate(number){
2 | var date = new Date(number);
3 | var y = date.getFullYear();
4 | var m = date.getMonth() + 1;
5 | m = m < 10 ? ('0' + m) : m;
6 | var d = date.getDate();
7 | d = d < 10 ? ('0' + d) : d;
8 | var h = date.getHours();
9 | h = h < 10 ? ('0' + h) : h;
10 | var minute = date.getMinutes();
11 | var second = date.getSeconds();
12 | minute = minute < 10 ? ('0' + minute) : minute;
13 | second = second < 10 ? ('0' + second) : second;
14 | // return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒
15 | return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
16 | }
17 | module.exports = {
18 | toDate: toDate
19 | }
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Eslint config file
3 | * Documentation: https://eslint.org/docs/user-guide/configuring/
4 | * Install the Eslint extension before using this feature.
5 | */
6 | module.exports = {
7 | env: {
8 | es6: true,
9 | browser: true,
10 | node: true,
11 | },
12 | ecmaFeatures: {
13 | modules: true,
14 | },
15 | parserOptions: {
16 | ecmaVersion: 2018,
17 | sourceType: 'module',
18 | },
19 | globals: {
20 | wx: true,
21 | App: true,
22 | Page: true,
23 | getCurrentPages: true,
24 | getApp: true,
25 | Component: true,
26 | requirePlugin: true,
27 | requireMiniProgram: true,
28 | },
29 | // extends: 'eslint:recommended',
30 | rules: {},
31 | }
32 |
--------------------------------------------------------------------------------
/miniprogram/pages/jbgl/jbgl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 举报管理中心
4 |
5 |
6 | {{item.zwlist[0].bh}}
7 | {{item.yy}}
8 |
9 | {{item._createTime}}
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/miniprogram/pages/qxyy/qxyy.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/updateRecord/index.js:
--------------------------------------------------------------------------------
1 | const cloud = require('wx-server-sdk');
2 |
3 | cloud.init({
4 | env: cloud.DYNAMIC_CURRENT_ENV
5 | });
6 | const db = cloud.database();
7 |
8 | // 修改数据库信息云函数入口函数
9 | exports.main = async (event, context) => {
10 | try {
11 | // 遍历修改数据库信息
12 | for (let i = 0; i < event.data.length; i++) {
13 | await db.collection('sales').where({
14 | _id: event.data[i]._id
15 | })
16 | .update({
17 | data: {
18 | sales: event.data[i].sales
19 | },
20 | });
21 | }
22 | return {
23 | success: true,
24 | data: event.data
25 | };
26 | } catch (e) {
27 | return {
28 | success: false,
29 | errMsg: e
30 | };
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/miniprogram/pages/swzl/swzl.wxss:
--------------------------------------------------------------------------------
1 | /* pages/swzl/swzl.wxss */
2 | .top_banner{
3 | width: 100%;
4 | height: 250rpx;
5 | }
6 | .top_banner image{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .nav{
11 | width: 100%;
12 | height: 150rpx;
13 | background-color: rgb(245, 233, 233);
14 | }
15 | .nav_main{
16 | width: 90%;
17 | margin: 0 auto;
18 | }
19 | .nav_mian_bar{
20 | width: 33.33%;
21 | height: 150rpx;
22 | float: left;
23 | }
24 | .nav_bar_bord{
25 | width: 100rpx;
26 | height: 150rpx;
27 | margin: 0 auto;
28 | }
29 | .nav_bar_bord image{
30 | width: 100rpx;
31 | height: 100rpx;
32 | }
33 | .text{
34 | height: 30rpx;
35 | line-height: 30rpx;
36 | font-size: 20rpx;
37 | text-align: center;
38 | }
39 | .xwxx{
40 | width: 95%;
41 | min-height: 620rpx;
42 | margin: 30rpx auto;
43 | }
--------------------------------------------------------------------------------
/miniprogram/pages/swxq/swxq.wxss:
--------------------------------------------------------------------------------
1 | /* pages/swxq/swxq.wxss */
2 | /* pages/swzl/swzl.wxss */
3 | .top_banner{
4 | width: 100%;
5 | height: 250rpx;
6 | }
7 | .top_banner image{
8 | width: 100%;
9 | height: 100%;
10 | }
11 | .nav{
12 | width: 100%;
13 | height: 150rpx;
14 | background-color: rgb(245, 233, 233);
15 | }
16 | .nav_main{
17 | width: 90%;
18 | margin: 0 auto;
19 | }
20 | .nav_mian_bar{
21 | width: 33.33%;
22 | height: 150rpx;
23 | float: left;
24 | }
25 | .nav_bar_bord{
26 | width: 100rpx;
27 | height: 150rpx;
28 | margin: 0 auto;
29 | }
30 | .nav_bar_bord image{
31 | width: 100rpx;
32 | height: 100rpx;
33 | }
34 | .text{
35 | height: 30rpx;
36 | line-height: 30rpx;
37 | font-size: 20rpx;
38 | text-align: center;
39 | }
40 | .xwxx{
41 | width: 95%;
42 | min-height: 620rpx;
43 | margin: 30rpx auto;
44 | }
--------------------------------------------------------------------------------
/miniprogram/pages/notic/notic.js:
--------------------------------------------------------------------------------
1 | // pages/notic/notic.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad(options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady() {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow() {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide() {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload() {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh() {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom() {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage() {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/project.private.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "libVersion": "2.23.4",
3 | "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
4 | "condition": {
5 | "miniprogram": {
6 | "list": [
7 | {
8 | "name": "db guide",
9 | "pathName": "pages/databaseGuide/databaseGuide",
10 | "query": ""
11 | },
12 | {
13 | "name": "我的页面",
14 | "pathName": "pages/my/my",
15 | "query": "",
16 | "launchMode": "default",
17 | "scene": null
18 | },
19 | {
20 | "name": "扫码",
21 | "pathName": "pages/sm/sm",
22 | "query": "",
23 | "launchMode": "default",
24 | "scene": null
25 | }
26 | ]
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/miniprogram/images/arrow.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/miniprogram/pages/sm/sm.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{code_openid}}
9 |
10 |
11 |
12 |
13 |
14 | 用户认证二维码,请不要提供给他人!
15 |
16 |
17 |
18 |
19 |
20 | {{userinfo[0].username}}
21 | 已实名认证
22 |
23 |
24 |
25 |
26 |
27 | 扫一扫
28 |
29 |
30 |
--------------------------------------------------------------------------------
/cloudfunctions/fstz/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 |
6 | // 云函数入口函数
7 | exports.main = async (event, context) => {
8 | try{
9 | const result = await cloud.openapi.subscribeMessage.send({
10 | touser: event.openid, //要推送给那个用户
11 | page: 'pages/index/index', //要跳转到那个小程序页面
12 | data: {//推送的内容
13 | time5: {
14 | value: event.time
15 | },
16 | phrase6: {
17 | value: event.wz
18 | },
19 | date4: {
20 | value: event.sj
21 | },
22 | thing14: {
23 | value: event.bh
24 | },
25 | time23: {
26 | value: event.xzsjd
27 | },
28 | },
29 | templateId: 'YghafEHLxELYPBhw2RGes01ijkwyi5po5Xrg' //模板id
30 | })
31 | console.log(result)
32 | return result
33 | } catch (err) {
34 | console.log(err)
35 | return err
36 | }
37 | }
--------------------------------------------------------------------------------
/miniprogram/pages/dkjl/dkjl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 你还没有打卡记录
7 |
8 |
9 |
10 |
11 | 打卡记录
12 |
13 | 座位: {{item.zwList[0].bh}}
14 | 打卡时间: {{item.qdsj}}
15 | 打卡时间: 暂未签到
16 | 签退时间: {{item.qtsj}}
17 | 签退时间: 暂未签到
18 |
19 |
20 |
--------------------------------------------------------------------------------
/miniprogram/pages/fwzx/fwzx.js:
--------------------------------------------------------------------------------
1 | // pages/fwzx/fwzx.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/miniprogram/pages/yjfk/yjfk.js:
--------------------------------------------------------------------------------
1 | // pages/yjfk/yjfk.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/miniprogram/pages/swxq/swxq.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{bt}}
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{item.title}}
16 | {{item.wzxx}}
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/miniprogram/pages/jdjb/jdjb.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 我的举报
8 |
9 |
10 | 对{{item.zwlist[0].bh}}的举报
11 | {{item.yy}}
12 | {{item.cljg}}
13 |
14 | 时间:{{item._createTime}}
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/miniprogram/pages/glht/glht.js:
--------------------------------------------------------------------------------
1 | // pages/glht/glht.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 | jhht(){
39 | wx.navigateTo({
40 | url: '../jbgl/jbgl',
41 | })
42 | },
43 | /**
44 | * 生命周期函数--监听页面卸载
45 | */
46 | onUnload: function () {
47 |
48 | },
49 |
50 | /**
51 | * 页面相关事件处理函数--监听用户下拉动作
52 | */
53 | onPullDownRefresh: function () {
54 |
55 | },
56 |
57 | /**
58 | * 页面上拉触底事件的处理函数
59 | */
60 | onReachBottom: function () {
61 |
62 | },
63 |
64 | /**
65 | * 用户点击右上角分享
66 | */
67 | onShareAppMessage: function () {
68 |
69 | }
70 | })
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/index.js:
--------------------------------------------------------------------------------
1 | const getOpenId = require('./getOpenId/index');
2 | const getMiniProgramCode = require('./getMiniProgramCode/index');
3 | const createCollection = require('./createCollection/index');
4 | const selectRecord = require('./selectRecord/index');
5 | const updateRecord = require('./updateRecord/index');
6 | const sumRecord = require('./sumRecord/index');
7 |
8 |
9 | // 云函数入口函数
10 | exports.main = async (event, context) => {
11 | switch (event.type) {
12 | case 'getOpenId':
13 | return await getOpenId.main(event, context);
14 | case 'getMiniProgramCode':
15 | return await getMiniProgramCode.main(event, context);
16 | case 'createCollection':
17 | return await createCollection.main(event, context);
18 | case 'selectRecord':
19 | return await selectRecord.main(event, context);
20 | case 'updateRecord':
21 | return await updateRecord.main(event, context);
22 | case 'sumRecord':
23 | return await sumRecord.main(event, context);
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/miniprogram/pages/tsxq/tsxq.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{rmb.name}}
9 | 作者:{{rmb.zz}}
10 | 出版社:{{rmb.cbs}}
11 | 位置:{{rmb.wz}}
12 |
13 | {{rmb.btn1}}
14 | {{rmb.btn2}}
15 | {{rmb.btn3}}
16 |
17 |
18 |
19 |
20 |
21 | 内容描述
22 | {{rmb.nrgk}}
23 |
24 |
25 | 图书馆位置
26 | {{rmb.wz}}
27 |
--------------------------------------------------------------------------------
/miniprogram/pages/grzl/grzl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 姓名:
8 | {{userInfo[0].username}}
9 |
10 |
11 | 电话:
12 | {{userInfo[0].phone}}
13 |
14 |
15 | 学院:
16 | {{userInfo[0].xy}}
17 |
18 |
19 | 学号:
20 | {{userInfo[0].studentid}}
21 |
22 |
23 | 年级:
24 | {{userInfo[0].nj}}
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/miniprogram/pages/gywm/gywm.js:
--------------------------------------------------------------------------------
1 | // pages/gywm/gywm.js
2 | const db = wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | msgList:""
10 | },
11 |
12 | /**
13 | * 生命周期函数--监听页面加载
14 | */
15 | onLoad: function (options) {
16 | db.collection("gywm").get({
17 | success:res=>{
18 | console.log(res)
19 | this.setData({
20 | msgList:res.data
21 | })
22 | }
23 | })
24 | },
25 |
26 | /**
27 | * 生命周期函数--监听页面初次渲染完成
28 | */
29 | onReady: function () {
30 |
31 | },
32 |
33 | /**
34 | * 生命周期函数--监听页面显示
35 | */
36 | onShow: function () {
37 |
38 | },
39 |
40 | /**
41 | * 生命周期函数--监听页面隐藏
42 | */
43 | onHide: function () {
44 |
45 | },
46 |
47 | /**
48 | * 生命周期函数--监听页面卸载
49 | */
50 | onUnload: function () {
51 |
52 | },
53 |
54 | /**
55 | * 页面相关事件处理函数--监听用户下拉动作
56 | */
57 | onPullDownRefresh: function () {
58 |
59 | },
60 |
61 | /**
62 | * 页面上拉触底事件的处理函数
63 | */
64 | onReachBottom: function () {
65 |
66 | },
67 |
68 | /**
69 | * 用户点击右上角分享
70 | */
71 | onShareAppMessage: function () {
72 |
73 | }
74 | })
--------------------------------------------------------------------------------
/miniprogram/pages/tsxq/tsxq.js:
--------------------------------------------------------------------------------
1 | // pages/tsxq/tsxq.js
2 | const db= wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | listid:'',
10 | rmb:''
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | console.log(options.id)
18 | this.setData({
19 | listid:options.id
20 | })
21 | db.collection("tsjs").doc(this.data.listid).get().then(res=>{
22 | console.log(res.data)
23 | this.setData({
24 | rmb:res.data
25 | })
26 | })
27 | },
28 |
29 | /**
30 | * 生命周期函数--监听页面初次渲染完成
31 | */
32 | onReady: function () {
33 |
34 | },
35 |
36 | /**
37 | * 生命周期函数--监听页面显示
38 | */
39 | onShow: function () {
40 |
41 | },
42 |
43 | /**
44 | * 生命周期函数--监听页面隐藏
45 | */
46 | onHide: function () {
47 |
48 | },
49 |
50 | /**
51 | * 生命周期函数--监听页面卸载
52 | */
53 | onUnload: function () {
54 |
55 | },
56 |
57 | /**
58 | * 页面相关事件处理函数--监听用户下拉动作
59 | */
60 | onPullDownRefresh: function () {
61 |
62 | },
63 |
64 | /**
65 | * 页面上拉触底事件的处理函数
66 | */
67 | onReachBottom: function () {
68 |
69 | },
70 |
71 | /**
72 | * 用户点击右上角分享
73 | */
74 | onShareAppMessage: function () {
75 |
76 | }
77 | })
--------------------------------------------------------------------------------
/miniprogram/pages/tscx/tscx.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 取消
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{item.name}}
16 | 作者:{{item.zz}}
17 | 出版社:{{item.cbs}}
18 | 位置:{{item.wz}}
19 |
20 | {{item.btn1}}
21 | {{item.btn2}}
22 | {{item.btn3}}
23 |
24 |
25 |
26 |
27 |
28 |
29 | 查询暂无结果
30 |
--------------------------------------------------------------------------------
/cloudfunctions/quickstartFunctions/createCollection/index.js:
--------------------------------------------------------------------------------
1 | const cloud = require('wx-server-sdk');
2 |
3 | cloud.init({
4 | env: cloud.DYNAMIC_CURRENT_ENV
5 | });
6 |
7 | const db = cloud.database();
8 |
9 | // 创建集合云函数入口函数
10 | exports.main = async (event, context) => {
11 | try {
12 | // 创建集合
13 | await db.createCollection('sales');
14 | await db.collection('sales').add({
15 | // data 字段表示需新增的 JSON 数据
16 | data: {
17 | region: '华东',
18 | city: '上海',
19 | sales: 11
20 | }
21 | });
22 | await db.collection('sales').add({
23 | // data 字段表示需新增的 JSON 数据
24 | data: {
25 | region: '华东',
26 | city: '南京',
27 | sales: 11
28 | }
29 | });
30 | await db.collection('sales').add({
31 | // data 字段表示需新增的 JSON 数据
32 | data: {
33 | region: '华南',
34 | city: '广州',
35 | sales: 22
36 | }
37 | });
38 | await db.collection('sales').add({
39 | // data 字段表示需新增的 JSON 数据
40 | data: {
41 | region: '华南',
42 | city: '深圳',
43 | sales: 22
44 | }
45 | });
46 | return {
47 | success: true
48 | };
49 | } catch (e) {
50 | // 这里catch到的是该collection已经存在,从业务逻辑上来说是运行成功的,所以catch返回success给前端,避免工具在前端抛出异常
51 | return {
52 | success: true,
53 | data: 'create collection success'
54 | };
55 | }
56 | };
57 |
--------------------------------------------------------------------------------
/miniprogram/pages/jgglxq/jgglxq.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 座位:
5 | {{rmb[0].zwlist[0].bh}}
6 |
7 |
8 | 时间:
9 | {{rmb[0]._createTime}}
10 |
11 |
12 | 时间段:
13 | {{rmb[0].sjdz}}
14 |
15 |
16 | 类型:
17 | {{rmb[0].jblx}}
18 |
19 |
20 | 附件:
21 |
22 |
23 |
24 |
25 |
26 | 原因:
27 | {{rmb[0].yy}}
28 |
29 |
30 | 处理结果:
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/miniprogram/pages/grzl/grzl.wxss:
--------------------------------------------------------------------------------
1 | /* pages/grzl/grzl.wxss */
2 | .topbanner{
3 | width: 100%;
4 | height: 300rpx;
5 | background-color: rgb(196, 134, 134);
6 | }
7 | .toplogo{
8 | width: 200rpx;
9 | height: 200rpx;
10 | padding-top: 40rpx;
11 | margin-left: 40rpx;
12 | float: left;
13 | }
14 | .toplogo image{
15 | width: 100%;
16 | height: 100%;
17 | border-radius: 50%;
18 | }
19 | .toptext{
20 | width: 400rpx;
21 | height: 200rpx;
22 | padding-top: 70rpx;
23 | float: right;
24 | margin-right: 30rpx;
25 | color: white;
26 | }
27 | .user-name{
28 | font-size: 40rpx;
29 | font-weight: 700;
30 | }
31 | .user-name2{
32 | font:17rpx;
33 | margin-top: 20rpx;
34 | }
35 | .fqzd-ban{
36 | width: 80%;
37 | margin: 0 auto;
38 | }
39 | .row{
40 | width: 100%;
41 | height: 120rpx;
42 | font-size: 30rpx;
43 | line-height: 120rpx;
44 | border-bottom:1px solid rgb(199, 196, 196);
45 | }
46 | .text1{
47 | width: 20%;
48 | float: left;
49 | }
50 | .text2{
51 | width: 80%;
52 | float: left;
53 | text-align: right;
54 | }
55 | .text4{
56 | width: 100%;
57 | height: 100rpx;
58 | line-height: 100rpx;
59 | }
60 | .text3{
61 | width: 100%;
62 | }
63 | .row1{
64 | width: 100%;
65 | min-height: 200rpx;
66 | font-size: 30rpx;
67 | line-height: 30rpx;
68 | border-bottom:1px solid rgb(199, 196, 196);
69 | }
70 | .banner{
71 | width: 100%;
72 | height: 300rpx;
73 | }
74 | .banner image{
75 | width: 100%;
76 | height: 100%;
77 | }
--------------------------------------------------------------------------------
/miniprogram/pages/news/news.js:
--------------------------------------------------------------------------------
1 | // pages/news/news.js
2 | const db = wx.cloud.database()
3 | var times=require('../../utils/times.js')
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | text_id:'',
11 | html:'',
12 | time:'',
13 | title:'',
14 | photo:''
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: function (options) {
21 | this.setData({
22 | text_id:options.text_id
23 | })
24 | db.collection("xwtz").doc(this.data.text_id).get().then(res=>{
25 | console.log(res);
26 | this.setData({
27 | html:res.data.nr,
28 | title:res.data.title,
29 | time:times.toDate(res.data["_createTime"]),
30 | photo:res.data.photo
31 | })
32 | })
33 | },
34 |
35 | /**
36 | * 生命周期函数--监听页面初次渲染完成
37 | */
38 | onReady: function () {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面显示
44 | */
45 | onShow: function () {
46 |
47 | },
48 |
49 | /**
50 | * 生命周期函数--监听页面隐藏
51 | */
52 | onHide: function () {
53 |
54 | },
55 |
56 | /**
57 | * 生命周期函数--监听页面卸载
58 | */
59 | onUnload: function () {
60 |
61 | },
62 |
63 | /**
64 | * 页面相关事件处理函数--监听用户下拉动作
65 | */
66 | onPullDownRefresh: function () {
67 |
68 | },
69 |
70 | /**
71 | * 页面上拉触底事件的处理函数
72 | */
73 | onReachBottom: function () {
74 |
75 | },
76 |
77 | /**
78 | * 用户点击右上角分享
79 | */
80 | onShareAppMessage: function () {
81 |
82 | }
83 | })
--------------------------------------------------------------------------------
/miniprogram/pages/swxq/swxq.js:
--------------------------------------------------------------------------------
1 | // pages/swxq/swxq.js
2 | const db = wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | rmb:'',
10 | bt:''
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | if (options.id == 0) {
18 | db.collection("swzl").where({ xxzt: '失物招领' }).get().then(res => {
19 | console.log(res.data)
20 | this.setData({
21 | rmb: res.data,
22 | bt:"失物招领"
23 | })
24 | })
25 | } else {
26 | db.collection("swzl").where({ xxzt: '寻物' }).get().then(res => {
27 | console.log(res.data)
28 | this.setData({
29 | rmb: res.data,
30 | bt:"寻物"
31 | })
32 | })
33 | }
34 |
35 |
36 | },
37 |
38 | /**
39 | * 生命周期函数--监听页面初次渲染完成
40 | */
41 | onReady: function () {
42 |
43 | },
44 |
45 | /**
46 | * 生命周期函数--监听页面显示
47 | */
48 | onShow: function () {
49 |
50 | },
51 |
52 | /**
53 | * 生命周期函数--监听页面隐藏
54 | */
55 | onHide: function () {
56 |
57 | },
58 |
59 | /**
60 | * 生命周期函数--监听页面卸载
61 | */
62 | onUnload: function () {
63 |
64 | },
65 |
66 | /**
67 | * 页面相关事件处理函数--监听用户下拉动作
68 | */
69 | onPullDownRefresh: function () {
70 |
71 | },
72 |
73 | /**
74 | * 页面上拉触底事件的处理函数
75 | */
76 | onReachBottom: function () {
77 |
78 | },
79 |
80 | /**
81 | * 用户点击右上角分享
82 | */
83 | onShareAppMessage: function () {
84 |
85 | }
86 | })
--------------------------------------------------------------------------------
/miniprogram/pages/wpxx/wpxx.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 详情信息
4 |
5 |
6 |
7 |
8 |
9 | {{rmb.title}}
10 | {{rmb.wzxx}}
11 | 联系电话:{{rmb.dh}}
12 | 地点:{{rmb.wz}}
13 | 日期:{{rmb.data}}
14 | 时间:{{rmb.time}}
15 | 已完结
16 |
17 | 发布时间:{{rmb._createTime}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/miniprogram/pages/xgxx/xgxx.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
36 |
--------------------------------------------------------------------------------
/miniprogram/pages/swzl/swzl.js:
--------------------------------------------------------------------------------
1 | // pages/swzl/swzl.js
2 | const db = wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | rmb:'',
10 | rmb1:''
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | db.collection("swzl").where({xxzt:'失物招领'}).get().then(res=>{
18 | console.log(res.data)
19 | this.setData({
20 | rmb:res.data
21 | })
22 | })
23 | db.collection("swzl").where({xxzt:'寻物'}).get().then(res=>{
24 | console.log(res.data)
25 | this.setData({
26 | rmb1:res.data
27 | })
28 | })
29 | },
30 | fbxx(){
31 | wx.navigateTo({
32 | url: '../fbxx/fbxx',
33 | })
34 | },
35 | ckgd(e){
36 | console.log(e.currentTarget.id)
37 | wx.navigateTo({
38 | url: '../swxq/swxq?id='+e.currentTarget.id,
39 | })
40 | },
41 | /**
42 | * 生命周期函数--监听页面初次渲染完成
43 | */
44 | onReady: function () {
45 |
46 | },
47 |
48 | /**
49 | * 生命周期函数--监听页面显示
50 | */
51 | onShow: function () {
52 |
53 | },
54 |
55 | /**
56 | * 生命周期函数--监听页面隐藏
57 | */
58 | onHide: function () {
59 |
60 | },
61 |
62 | /**
63 | * 生命周期函数--监听页面卸载
64 | */
65 | onUnload: function () {
66 |
67 | },
68 |
69 | /**
70 | * 页面相关事件处理函数--监听用户下拉动作
71 | */
72 | onPullDownRefresh: function () {
73 |
74 | },
75 |
76 | /**
77 | * 页面上拉触底事件的处理函数
78 | */
79 | onReachBottom: function () {
80 |
81 | },
82 |
83 | /**
84 | * 用户点击右上角分享
85 | */
86 | onShareAppMessage: function () {
87 |
88 | }
89 | })
--------------------------------------------------------------------------------
/miniprogram/pages/grzl/grzl.js:
--------------------------------------------------------------------------------
1 | // pages/grzl/grzl.js
2 | const db=wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | openid:'',
10 | userInfo:''
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | const app =getApp()
18 |
19 | var openid =app.globalData.openid
20 | this.setData({
21 | openid:openid
22 | })
23 | // 2. 构造查询语句
24 | // collection 方法获取一个集合的引用
25 | // where 方法传入一个对象,数据库返回集合中字段等于指定值的 JSON 文档。API 也支持高级的查询条件(比如大于、小于、in 等),具体见文档查看支持列表
26 | // get 方法会触发网络请求,往数据库取数据
27 | // res
28 | db.collection("user").where({openid:this.data.openid}).get().then(res=>{
29 | console.log(res.data)
30 | this.setData({
31 | userInfo:res.data
32 | })
33 | })
34 | },
35 | showgrxg(){
36 | wx.navigateTo({
37 | url: '../xgxx/xgxx',
38 | })
39 | },
40 | /**
41 | * 生命周期函数--监听页面初次渲染完成
42 | */
43 | onReady: function () {
44 |
45 | },
46 |
47 | /**
48 | * 生命周期函数--监听页面显示
49 | */
50 | onShow: function () {
51 |
52 | },
53 |
54 | /**
55 | * 生命周期函数--监听页面隐藏
56 | */
57 | onHide: function () {
58 |
59 | },
60 |
61 | /**
62 | * 生命周期函数--监听页面卸载
63 | */
64 | onUnload: function () {
65 |
66 | },
67 |
68 | /**
69 | * 页面相关事件处理函数--监听用户下拉动作
70 | */
71 | onPullDownRefresh: function () {
72 |
73 | },
74 |
75 | /**
76 | * 页面上拉触底事件的处理函数
77 | */
78 | onReachBottom: function () {
79 |
80 | },
81 |
82 | /**
83 | * 用户点击右上角分享
84 | */
85 | onShareAppMessage: function () {
86 |
87 | }
88 | })
--------------------------------------------------------------------------------
/miniprogram/pages/jbgl/jbgl.js:
--------------------------------------------------------------------------------
1 | // pages/jbgl/jbgl.js
2 | var times=require('../../utils/times.js')
3 | const db=wx.cloud.database()
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | rmb:''
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | wx.cloud.callFunction({
18 | name:'jbglcx',
19 | data:{
20 |
21 | },
22 | complete:res=>{
23 | console.log(res)
24 | for(var i=0;i{
29 | // console.log(res.result.list)
30 | for(var i=0;i{
29 | console.log(res.result.list)
30 | for(var i=0;i
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 0/200
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/miniprogram/pages/tscx/tscx.js:
--------------------------------------------------------------------------------
1 | // pages/tscx/tscx.js
2 | const db= wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | rmb:'',
10 | value:'',
11 | qxshow:0,
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function (options) {
18 | db.collection("tsjs").get().then(res=>{
19 | console.log(res.data)
20 | this.setData({
21 | rmb:res.data
22 | })
23 | })
24 | },
25 | yhdj(){
26 | this.setData({
27 | qxshow:1
28 | })
29 | },
30 | seachtype:function(e){
31 |
32 | console.log(e.detail.value)
33 | db.collection("tsjs").where({name:db.RegExp({
34 | regexp:e.detail.value,
35 | options:'i',
36 | })
37 | }).get().then(res=>{
38 | console.log(res.data)
39 | this.setData({
40 | rmb:res.data
41 | })
42 | })
43 | },
44 | qx(){
45 | console.log("取消了")
46 | db.collection("tsjs").get().then(res=>{
47 | console.log(res.data)
48 | this.setData({
49 | rmb:res.data,
50 | value:'',
51 | qxshow:0
52 | })
53 | })
54 | },
55 | tsxq(e){
56 | console.log(e.currentTarget.id)
57 | wx.navigateTo({
58 | url: '../tsxq/tsxq?id='+e.currentTarget.id,
59 | })
60 | },
61 | /**
62 | * 生命周期函数--监听页面初次渲染完成
63 | */
64 | onReady: function () {
65 |
66 | },
67 |
68 | /**
69 | * 生命周期函数--监听页面显示
70 | */
71 | onShow: function () {
72 |
73 | },
74 |
75 | /**
76 | * 生命周期函数--监听页面隐藏
77 | */
78 | onHide: function () {
79 |
80 | },
81 |
82 | /**
83 | * 生命周期函数--监听页面卸载
84 | */
85 | onUnload: function () {
86 |
87 | },
88 |
89 | /**
90 | * 页面相关事件处理函数--监听用户下拉动作
91 | */
92 | onPullDownRefresh: function () {
93 |
94 | },
95 |
96 | /**
97 | * 页面上拉触底事件的处理函数
98 | */
99 | onReachBottom: function () {
100 |
101 | },
102 |
103 | /**
104 | * 用户点击右上角分享
105 | */
106 | onShareAppMessage: function () {
107 |
108 | }
109 | })
--------------------------------------------------------------------------------
/miniprogram/pages/zwyd/zwyd.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 选座
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 选择日期
15 |
16 |
17 |
18 | 2021.02.10
19 | ∨
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 选择时间
29 |
30 |
31 |
32 | {{sjxx[sjxxindex][0]}}
33 | ∨
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 座位信息
44 |
45 |
46 | {{rmbs[0].zwlist[0].tsglc}}座位编号{{rmbs[0].bh}}
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 用户信息
55 |
56 |
57 | 姓名:{{userinfo[0].name}}
58 | 信息:{{userinfo[0].xy}}{{userinfo[0].nj}}
59 |
60 | 确认选座
61 |
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "miniprogramRoot": "miniprogram/",
3 | "cloudfunctionRoot": "cloudfunctions/",
4 | "setting": {
5 | "urlCheck": true,
6 | "es6": false,
7 | "enhance": true,
8 | "postcss": true,
9 | "preloadBackgroundData": false,
10 | "minified": true,
11 | "newFeature": false,
12 | "coverView": true,
13 | "nodeModules": false,
14 | "autoAudits": false,
15 | "showShadowRootInWxmlPanel": true,
16 | "scopeDataCheck": false,
17 | "uglifyFileName": false,
18 | "checkInvalidKey": true,
19 | "checkSiteMap": true,
20 | "uploadWithSourceMap": true,
21 | "compileHotReLoad": false,
22 | "lazyloadPlaceholderEnable": false,
23 | "useMultiFrameRuntime": false,
24 | "babelSetting": {
25 | "ignore": [],
26 | "disablePlugins": [],
27 | "outputPath": ""
28 | },
29 | "useIsolateContext": true,
30 | "userConfirmedBundleSwitch": false,
31 | "packNpmManually": false,
32 | "packNpmRelationList": [],
33 | "minifyWXSS": true,
34 | "disableUseStrict": false,
35 | "minifyWXML": true,
36 | "showES6CompileOption": false,
37 | "useCompilerPlugins": false,
38 | "ignoreUploadUnusedFiles": true,
39 | "useStaticServer": true
40 | },
41 | "cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
42 | "compileType": "miniprogram",
43 | "simulatorType": "wechat",
44 | "simulatorPluginLibVersion": {},
45 | "condition": {
46 | "miniprogram": {
47 | "list": [
48 | {
49 | "name": "db guide",
50 | "pathName": "pages/databaseGuide/databaseGuide",
51 | "query": ""
52 | }
53 | ]
54 | }
55 | },
56 | "srcMiniprogramRoot": "miniprogram/",
57 | "editorSetting": {
58 | "tabIndent": "insertSpaces",
59 | "tabSize": 2
60 | },
61 | "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
62 | "libVersion": "2.24.0",
63 | "packOptions": {
64 | "ignore": [],
65 | "include": []
66 | },
67 | "appid": "wx52720210becb0b87",
68 | "projectname": "quickstart-wx-cloud"
69 | }
--------------------------------------------------------------------------------
/miniprogram/pages/dk/dk.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Hi, {{userinfo[0].name}} !
12 | 累计签到{{qdcs}}次啦~
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | 签到打卡
23 |
24 |
25 |
26 |
27 |
28 | 打卡记录
29 |
30 |
31 |
32 |
33 | 0
34 | 迟到
35 |
36 |
37 | 0
38 | 缺卡
39 |
40 |
41 | 0
42 | 早退
43 |
44 |
45 | 0
46 | 取消
47 |
48 |
49 |
50 |
51 | 近期预约提醒
52 |
53 | 预约座位: {{xzxx[len-1].zwList[len-1].bh}}
54 | 预约时间: {{xzxx[len-1]._createTime}}
55 | 打卡时间: {{xzxx[len-1].qdsj}}
56 | 打卡时间: 暂未签到
57 |
58 |
--------------------------------------------------------------------------------
/miniprogram/pages/zwyy/zwyy.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 时间选择:
7 |
8 |
9 | {{sjxx[sjxxindex][0]}}
10 |
11 |
12 |
13 |
14 |
15 |
16 | 位置:
17 |
18 |
19 | {{placearr[index]}}
20 |
21 |
22 |
23 |
24 | 状态:
25 |
26 |
27 | {{ztarr[yyzt][0]}}
28 |
29 |
30 |
31 |
32 |
33 |
34 | {{item1.tsglc}}
35 |
36 |
37 | 编号
38 | {{item.bh}}
39 | 可预约
40 |
41 |
42 | 编号
43 | {{item.bh}}
44 | 不可预约
45 |
46 |
47 | 编号
48 | {{item.bh}}
49 | 已预约
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/miniprogram/pages/my/my.wxss:
--------------------------------------------------------------------------------
1 | /* pages/my/my.wxss */
2 | .my_top{
3 | width: 100%;
4 | height: 350rpx;
5 | }
6 | .my_top image{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .my_logo{
11 | width: 100%;
12 | height: 350rpx;
13 | margin-top: -350rpx;
14 | }
15 | .my_logo_pho{
16 | width: 150rpx;
17 | height: 150rpx;
18 | margin: 30rpx auto;
19 | border-radius: 50%;
20 | overflow: hidden;
21 | }
22 | .my_logo_text{
23 | text-align: center;
24 | font-weight: 600;
25 | color: white;
26 | }
27 | .nav_my{
28 | width: 90%;
29 | height: 200rpx;
30 | background-color: rgb(245, 244, 245);
31 | margin: 0 auto;
32 | border-radius: 10rpx;
33 | margin-top: -70rpx;
34 | box-shadow: 0 0 20px rgb(0 0 0 / 20%);
35 | /* background-color: yellow; */
36 | }
37 | .nav_bar{
38 | width: 33.3333%;
39 | height: 100%;
40 | float: left;
41 | /* background-color: red; */
42 | }
43 | .nav_bar_logo{
44 | width: 110rpx;
45 | height: 110rpx;
46 | margin: 20rpx auto;
47 | margin-bottom: 10rpx;
48 | }
49 | .nav_bar_logo image{
50 | width: 100%;
51 | height: 100%;
52 | }
53 | .nar_bar_text{
54 | text-align: center;
55 | font-weight: 600;
56 | font-size: 27rpx;
57 | }
58 | .top_title{
59 | font-weight: 600;
60 | line-height: 90rpx;
61 | color: white;
62 | text-align: center;
63 | font-size: 30rpx;
64 | margin-top: 20rpx;
65 | margin-bottom: 10rpx;
66 | }
67 | .banner-xx{
68 | width: 100%;
69 | height: 650rpx;
70 | }
71 | .ban-t{
72 | width: 90%;
73 | margin: 0 auto;
74 | }
75 | .ban-row{
76 | width: 100%;
77 | height: 150rpx;
78 | border-bottom:1rpx solid rgb(230, 229, 229);
79 | }
80 | .ban-im{
81 | width: 100rpx;
82 | height: 100rpx;
83 | padding-top: 25rpx;
84 | float: left;
85 | }
86 | .ban-im image{
87 | width: 100%;
88 | height: 100%;
89 | }
90 | .ban-tx{
91 | float: left;
92 | padding-top: 25rpx;
93 | height: 100rpx;
94 | line-height: 100rpx;
95 | margin-left: 20rpx;
96 | width: 500rpx;
97 | text-align: right;
98 | color: rgb(53, 52, 52);
99 | font-size: 35rpx;
100 | font-weight: 700;
101 | }
102 | .userinfo-avatar{
103 | width: 100%;
104 | height: 100%;
105 | }
--------------------------------------------------------------------------------
/miniprogram/pages/wpxx/wpxx.js:
--------------------------------------------------------------------------------
1 | // pages/wpxx/wpxx.js
2 | const db = wx.cloud.database()
3 | var times=require('../../utils/times.js')
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | rmb:'',
11 | listid:'',
12 | openid:''
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: function (options) {
19 | const app=getApp()
20 | var openid=app.globalData.openid
21 | this.setData({
22 | openid:openid
23 | })
24 | console.log(options.id)
25 | this.setData({
26 | listid:options.id
27 | })
28 | db.collection("swzl").doc(options.id).get().then(res => {
29 | console.log(res.data)
30 | res.data["_createTime"]=times.toDate(res.data["_createTime"])
31 | this.setData({
32 | rmb: res.data
33 | })
34 | })
35 | },
36 | wj(){
37 | db.collection("swzl").doc(this.data.listid).update({
38 | data:{
39 | wzzt:1
40 | },
41 | success:res=>{
42 | wx.showToast({
43 | title: '完结成功',
44 | icon: 'success',
45 | duration: 2000,
46 | success:res=>{
47 | wx.switchTab({
48 | url: '../index/index',
49 | })
50 | }
51 | })
52 | }
53 | })
54 | },
55 | qc(){
56 | db.collection("swzl").doc(this.data.listid).remove({
57 | success:function(res){
58 | wx.switchTab({
59 | url: '../index/index',
60 | })
61 | }
62 | })
63 | },
64 | /**
65 | * 生命周期函数--监听页面初次渲染完成
66 | */
67 | onReady: function () {
68 |
69 | },
70 |
71 | /**
72 | * 生命周期函数--监听页面显示
73 | */
74 | onShow: function () {
75 |
76 | },
77 |
78 | /**
79 | * 生命周期函数--监听页面隐藏
80 | */
81 | onHide: function () {
82 |
83 | },
84 |
85 | /**
86 | * 生命周期函数--监听页面卸载
87 | */
88 | onUnload: function () {
89 |
90 | },
91 |
92 | /**
93 | * 页面相关事件处理函数--监听用户下拉动作
94 | */
95 | onPullDownRefresh: function () {
96 |
97 | },
98 |
99 | /**
100 | * 页面上拉触底事件的处理函数
101 | */
102 | onReachBottom: function () {
103 |
104 | },
105 |
106 | /**
107 | * 用户点击右上角分享
108 | */
109 | onShareAppMessage: function () {
110 |
111 | }
112 | })
--------------------------------------------------------------------------------
/miniprogram/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/glht/glht",
5 | "pages/fbxx/fbxx",
6 | "pages/swzl/swzl",
7 | "pages/fqjb/fqjb",
8 | "pages/zwyy/zwyy",
9 | "pages/my/my",
10 | "pages/qxyy/qxyy",
11 | "pages/jdjb/jdjb",
12 | "pages/wdyy/wdyy",
13 | "pages/tscx/tscx",
14 | "pages/dk/dk",
15 | "pages/sm/sm",
16 | "pages/zwyd/zwyd",
17 | "pages/news/news",
18 | "pages/getuser/getuser",
19 | "pages/grzl/grzl",
20 | "pages/xgxx/xgxx",
21 | "pages/dkjl/dkjl",
22 | "pages/tsxq/tsxq",
23 | "pages/swxq/swxq",
24 | "pages/wpxx/wpxx",
25 | "pages/hdbm/hdbm",
26 | "pages/yjfk/yjfk",
27 | "pages/fwzx/fwzx",
28 | "pages/gywm/gywm",
29 | "pages/jbgl/jbgl",
30 | "pages/jgglxq/jgglxq",
31 | "pages/notic/notic"
32 | ],
33 | "window": {
34 | "backgroundColor": "#F6F6F6",
35 | "backgroundTextStyle": "light",
36 | "navigationBarBackgroundColor": "#3742fa",
37 | "navigationBarTitleText": "图书馆预约小程序",
38 | "navigationBarTextStyle": "white"
39 | },
40 | "tabBar": {
41 | "color": "#a9b7b7",
42 | "selectedColor": "#11cd6e",
43 | "borderStyle": "black",
44 | "list": [
45 | {
46 | "pagePath": "pages/index/index",
47 | "iconPath": "images/shenghuo.png",
48 | "selectedIconPath": "images/shenghuo1.png",
49 | "text": "首页"
50 | },
51 | {
52 | "pagePath": "pages/zwyy/zwyy",
53 | "iconPath": "images/xuexiao.png",
54 | "selectedIconPath": "images/xuexiao1.png",
55 | "text": "座位"
56 | },
57 | {
58 | "pagePath": "pages/dk/dk",
59 | "iconPath": "images/guahao.png",
60 | "selectedIconPath": "images/guahao1.png",
61 | "text": "打卡"
62 | },
63 | {
64 | "pagePath": "pages/tscx/tscx",
65 | "iconPath": "images/shoucangjia.png",
66 | "selectedIconPath": "images/shoucangjia1.png",
67 | "text": "检索"
68 | },
69 | {
70 | "pagePath": "pages/my/my",
71 | "iconPath": "images/tuandui.png",
72 | "selectedIconPath": "images/tuandui1.png",
73 | "text": "我"
74 | }
75 | ]
76 | },
77 | "sitemapLocation": "sitemap.json",
78 | "style": "v2",
79 | "useExtendedLib": {
80 | "weui": true
81 | }
82 | }
--------------------------------------------------------------------------------
/miniprogram/pages/sm/sm.wxss:
--------------------------------------------------------------------------------
1 | /* pages/sm/sm.wxss */
2 | .bj{
3 | width: 100%;
4 | height: 100vh;
5 | }
6 | .bj image{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .main{
11 | width: 100%;
12 | height: 100vh;
13 | margin-top: -100vh;
14 | }
15 | .barcode {
16 | display: flex;
17 | height: 80rpx;
18 | flex-direction: column;
19 | justify-content: center;
20 | align-items: center;
21 | }
22 | .barnum {
23 | width: 670rpx;
24 | height: 100rpx;
25 | line-height: 100rpx;
26 | font-size: 38rpx;
27 | font-weight: bold;
28 | text-align: center;
29 | letter-spacing: 10rpx;
30 | white-space: nowrap;
31 | }
32 | .bar{
33 | height: 200rpx;
34 | }
35 | .barcode > canvas {
36 | width: 680rpx;
37 | height: 180rpx;
38 | }
39 |
40 | .qrcode {
41 | height: 420rpx;
42 | display: flex;
43 | flex-direction: column;
44 | justify-content: flex-end;
45 | align-items: center;
46 | }
47 |
48 | .qrcode > canvas {
49 | width: 420rpx;
50 | height: 420rpx;
51 | }
52 | .mian_box{
53 | width: 80%;
54 | height: 680rpx;
55 | margin: 0 auto;
56 | margin-top: 16vh;
57 | }
58 | .tx{
59 | width:100%;
60 | height: 50rpx;
61 | text-align: center;
62 | font-size: 25rpx;
63 | color: rgb(184, 185, 187);
64 | }
65 | .userinfo{
66 | width: 80%;
67 | height: 100rpx;
68 | margin: 70rpx auto;
69 | }
70 | .userlogo{
71 | width: 100rpx;
72 | height: 100rpx;
73 | border-radius: 50%;
74 | margin: 0 20rpx;
75 | float: left;
76 | }
77 | .userlogo image{
78 | width: 100%;
79 | height: 100%;
80 | }
81 | .user-text{
82 | width: 250rpx;
83 | float: left;
84 | height: 100%;
85 | line-height: 100rpx;
86 | margin-left: 20rpx;
87 | }
88 | .qr{
89 | width: 120rpx;
90 | height: 200rpx;
91 | margin: 100rpx auto;
92 | margin-bottom: 0;
93 | }
94 | .qr_zr{
95 | width: 120rpx;
96 | height: 120rpx;
97 | }
98 | .qr image{
99 | width: 100%;
100 | height: 100%;
101 | }
102 | .qr_zrtext{
103 | text-align: center;
104 | line-height: 80rpx;
105 | color: white;
106 | }
107 | .rztb{
108 | width: 150rpx;
109 | height: 50rpx;
110 | background-color: rgb(255, 145, 0);
111 | float: right;
112 | font-size: 22rpx;
113 | border-radius: 15rpx;
114 | margin-top: 25rpx;
115 | text-align: center;
116 | color: white;
117 | line-height: 50rpx;
118 | margin-right: 15rpx;
119 | }
--------------------------------------------------------------------------------
/miniprogram/pages/wdyy/wdyy.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 座位
9 | {{item.zwList[0].bh}}
10 |
11 |
12 |
13 | 预约时间
14 | {{item._createTime}}
15 |
16 |
17 | 签到时间
18 | {{item.qdsj}}
19 |
20 |
21 | 签到时间
22 | 暂未签到
23 |
24 |
25 | 签退时间
26 | {{item.qtsj}}
27 |
28 |
29 | 签退时间
30 | 暂未签退
31 |
32 |
33 | 取消状态
34 | 该订单已取消
35 |
36 |
37 | 编号
38 | {{item._id}}
39 |
40 |
41 |
42 |
43 | 辅助操作
44 | 取消
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/miniprogram/pages/tsxq/tsxq.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tsxq/tsxq.wxss */
2 | .top{
3 | width: 100%;
4 | height: 300rpx;
5 | background-color: rgb(226, 229, 229);
6 | }
7 | .tslb_main{
8 | width: 90%;
9 | height: 250rpx;
10 | margin: 30rpx auto;
11 | padding-bottom: 10rpx;
12 | }
13 | .tslb_left{
14 | width:25%;
15 | height: 100%;
16 | float: left;
17 | }
18 | .tslb_left image{
19 | width: 100%;
20 | height: 100%;
21 | }
22 | .tslb_right{
23 | width: 75%;
24 | height: 100%;
25 | float: left;
26 | }
27 | .tslb_right_title{
28 | margin-left: 40rpx;
29 | width: 85%;
30 | max-height: 70rpx;
31 | min-height: 40rpx;
32 | font-size: 25rpx;
33 | margin-top: 20rpx;
34 | line-height: 35rpx;
35 | font-weight: 700;
36 | }
37 | .tslb_right_zz{
38 | margin-left: 40rpx;
39 | width: 85%;
40 | height: 30rpx;
41 | font-size: 22rpx;
42 | margin-top: 5rpx;
43 | line-height: 30rpx;
44 | }
45 | .tslb_right_an{
46 | margin-left: 40rpx;
47 | width: 85%;
48 | height: 40rpx;
49 | font-size: 22rpx;
50 | margin-top: 10rpx;
51 | line-height: 30rpx;
52 | }
53 | .tslb_right_an_main{
54 | width: 120rpx;
55 | height: 40rpx;
56 | border-radius: 15rpx;
57 | background-color: rgb(86, 150, 95);
58 | line-height: 40rpx;
59 | text-align: center;
60 | font-size: 22rpx;
61 | float: left;
62 | color: white;
63 | margin-right: 20rpx;
64 | }
65 | .btn1{
66 | background-color: rgb(105, 189, 189);
67 | }
68 | .btn2{
69 | background-color: rgb(168, 91, 121);
70 | }
71 | .tsjj{
72 | width: 90%;
73 | min-height: 200rpx;
74 | margin: 20rpx auto;
75 | }
76 | .tsjj_title{
77 | border-left: 4px solid rgb(6, 6, 134);
78 | line-height: 60rpx;
79 | height: 60rpx;
80 | margin: 20rpx 0;
81 | font-weight: 700;
82 | font-size: 35rpx;
83 | padding-left: 10rpx;
84 | }
85 | .tsjj_main{
86 | width: 90%;
87 | min-height: 150rpx;
88 | margin: 10rpx auto;
89 | font-size: 25rpx;
90 | text-indent: 2em;
91 | }
92 | .tsgwz{
93 | width: 90%;
94 | min-height: 150rpx;
95 | margin: 20rpx auto;
96 | }
97 | .tsgwz_title{
98 | border-left: 4px solid rgb(6, 6, 134);
99 | line-height: 60rpx;
100 | height: 60rpx;
101 | margin: 20rpx 0;
102 | font-weight: 700;
103 | font-size: 35rpx;
104 | padding-left: 10rpx;
105 | }
106 | .tsgwz_main{
107 | font-size: 35rpx;
108 | width: 90%;
109 | margin: 10rpx auto;
110 | }
--------------------------------------------------------------------------------
/miniprogram/pages/tscx/tscx.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tscx/tscx.wxss */
2 | .banner{
3 | width: 100%;
4 | height: 250rpx;
5 | }
6 | .banner image{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .tslb{
11 | width: 95%;
12 | min-height: 500rpx;
13 | margin: 0 auto;
14 | }
15 | .tslb_main{
16 | width: 100%;
17 | height: 250rpx;
18 | margin: 20rpx auto;
19 | padding-bottom: 10rpx;
20 | border-bottom: 1rpx solid rgb(184, 181, 181);
21 | }
22 | .tslb_left{
23 | width:25%;
24 | height: 100%;
25 | float: left;
26 | }
27 | .tslb_left image{
28 | width: 100%;
29 | height: 100%;
30 | }
31 | .tslb_right{
32 | width: 75%;
33 | height: 100%;
34 | float: left;
35 | }
36 | .tslb_right_title{
37 | margin-left: 40rpx;
38 | width: 85%;
39 | max-height: 70rpx;
40 | min-height: 40rpx;
41 | font-size: 25rpx;
42 | margin-top: 20rpx;
43 | line-height: 35rpx;
44 | font-weight: 700;
45 | }
46 | .tslb_right_zz{
47 | margin-left: 40rpx;
48 | width: 85%;
49 | height: 30rpx;
50 | font-size: 22rpx;
51 | margin-top: 5rpx;
52 | line-height: 30rpx;
53 | }
54 | .tslb_right_an{
55 | margin-left: 40rpx;
56 | width: 85%;
57 | height: 40rpx;
58 | font-size: 22rpx;
59 | margin-top: 10rpx;
60 | line-height: 30rpx;
61 | }
62 | .tslb_right_an_main{
63 | width: 120rpx;
64 | height: 40rpx;
65 | border-radius: 15rpx;
66 | background-color: rgb(86, 150, 95);
67 | line-height: 40rpx;
68 | text-align: center;
69 | font-size: 22rpx;
70 | float: left;
71 | color: white;
72 | margin-right: 20rpx;
73 | }
74 | .btn1{
75 | background-color: rgb(105, 189, 189);
76 | }
77 | .btn2{
78 | background-color: rgb(168, 91, 121);
79 | }
80 | .search{
81 | width: 100%;
82 | height: 80rpx;
83 | background-color: rgb(238, 236, 236);
84 | }
85 | .weui-input{
86 | height: 60rpx;
87 | width: 80%;
88 | background-color: white;
89 | margin: 10rpx 20rpx;
90 | border-radius: 10rpx;
91 | padding-left: 20rpx;
92 | float: left;
93 | }
94 | .ipputqx{
95 | float: left;
96 | height: 60rpx;
97 | margin: 10rpx 2rpx;
98 | line-height: 60rpx;
99 | color: rgb(91, 85, 97);
100 | }
101 | .qxkz{
102 | width: 450rpx;
103 | height: 500rpx;
104 | margin: 100rpx auto;
105 | }
106 | .qxkz image{
107 | width: 100%;
108 | height: 450rpx;
109 | }
110 | .qxkz_text{
111 | text-align: center;
112 | line-height: 50rpx;
113 | color: rgb(203, 205, 207);
114 | margin-top: -80rpx;
115 | }
--------------------------------------------------------------------------------
/miniprogram/pages/fbxx/fbxx.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
53 |
54 |
--------------------------------------------------------------------------------
/miniprogram/pages/wdyy/wdyy.js:
--------------------------------------------------------------------------------
1 | // pages/wdyy/wdyy.js
2 | const db=wx.cloud.database()
3 | var times=require('../../utils/times.js')
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | openid:'',
11 | xzxx:'',
12 | qxxx:''
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: function (options) {
19 | const app=getApp()
20 | var openid=app.globalData.openid
21 | this.setData({
22 | openid:openid
23 | })
24 | wx.cloud.callFunction({
25 | name:'getxz',
26 | data:{
27 | openid:openid
28 | },
29 | complete:res=>{
30 | console.log(res.result.list)
31 | for(var i=0;i{
50 | console.log(res.data)
51 | if(res.data.qx!=1&&res.data.qdzt==0){
52 | wx.navigateTo({
53 | url: '../qxyy/qxyy?id='+e.currentTarget.id,
54 | })
55 | }else{
56 | wx.showToast({
57 | title: '不可取消',
58 | icon: 'error',
59 | duration: 2000
60 | })
61 | }
62 | })
63 |
64 |
65 |
66 | },
67 | /**
68 | * 生命周期函数--监听页面初次渲染完成
69 | */
70 | onReady: function () {
71 |
72 | },
73 |
74 | /**
75 | * 生命周期函数--监听页面显示
76 | */
77 | onShow: function () {
78 |
79 | },
80 |
81 | /**
82 | * 生命周期函数--监听页面隐藏
83 | */
84 | onHide: function () {
85 |
86 | },
87 |
88 | /**
89 | * 生命周期函数--监听页面卸载
90 | */
91 | onUnload: function () {
92 |
93 | },
94 |
95 | /**
96 | * 页面相关事件处理函数--监听用户下拉动作
97 | */
98 | onPullDownRefresh: function () {
99 |
100 | },
101 |
102 | /**
103 | * 页面上拉触底事件的处理函数
104 | */
105 | onReachBottom: function () {
106 |
107 | },
108 |
109 | /**
110 | * 用户点击右上角分享
111 | */
112 | onShareAppMessage: function () {
113 |
114 | }
115 | })
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index/index.wxss */
2 | .banner{
3 | width: 100%;
4 | height: 300rpx;
5 | }
6 | .swip_main{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .news{
11 | width: 95%;
12 | height: 85rpx;
13 | margin: 20rpx auto;
14 | border-radius: 10rpx;
15 | border: 1px solid #0000a7;
16 | }
17 | .news_left{
18 | width: 35%;
19 | height: 100%;
20 | float: left;
21 | }
22 | .news_left image{
23 | width: 60rpx;
24 | height: 60rpx;
25 | margin-top: 12rpx;
26 | margin-left: 15rpx;
27 | float: left;
28 | }
29 | .news_title{
30 | float: left;
31 | line-height: 85rpx;
32 | margin-left: 5rpx;
33 | font-weight: 700;
34 | font-size: 35rpx;
35 | color: #050d9e;
36 | }
37 | .news_right{
38 | width: 65%;
39 | float: left;
40 | height: 100%;
41 | }
42 | .swiper-news-top{
43 | width: 100%;
44 | height: 100%;
45 | }
46 | .swiper_item {
47 | font-size: 27rpx;
48 | font-weight: 600;
49 | line-height: 80rpx;
50 | overflow: hidden;
51 | text-overflow: ellipsis;
52 | white-space: nowrap;
53 | letter-spacing: 2px;
54 | text-align: center;
55 | color: #88888b;
56 | }
57 | .nav{
58 | width: 100%;
59 | height: 150rpx;
60 | }
61 | .nav-banner{
62 | height: 100%;
63 | width: 20%;
64 | background-color: aliceblue;
65 | float: left;
66 | }
67 | .nav-banner-img{
68 | width: 100%;
69 | height: 75%;
70 | }
71 | .nav-banner-img image{
72 | width: 70%;
73 | height: 80%;
74 | padding: 10% 15%;
75 | }
76 | .nav-banner-text{
77 | text-align: center;
78 | margin-top: -10rpx;
79 | font-size: 26rpx;
80 | }
81 | .news-bar{
82 | width: 95%;
83 | min-height: 300rpx;
84 | margin: 20rpx auto;
85 | }
86 | .newa-bar-title{
87 | width: 100%;
88 | height: 80rpx;
89 | line-height: 80rpx;
90 | padding-left: 20rpx;
91 | font-weight: 700;
92 | border-left: 5px solid rgb(0, 0, 153);
93 | }
94 | .news-bar-box{
95 | width: 100%;
96 | height: 210rpx;
97 | margin:30rpx auto;
98 | }
99 | .news-box-img{
100 | width: 300rpx;
101 | height: 210rpx;
102 | float: left;
103 | }
104 | .news-box-img image{
105 | width: 100%;
106 | height: 100%;
107 | }
108 | .news-box-text{
109 | width: 350rpx;
110 | height: 210rpx;
111 | float: left;
112 | padding-left: 20rpx;
113 | }
114 | .news-box-text-title{
115 | width: 100%;
116 | height: 160rpx;
117 | line-height: 50rpx;
118 | font-weight: 700;
119 | font-size: 28rpx;
120 | }
121 | .news-bar-box-time{
122 | height: 50rpx;
123 | width: 100%;
124 | line-height: 50rpx;
125 | color: #88888b;
126 | font-size: 24rpx;
127 | }
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 【 公告 】
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | · {{item.text}}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 打卡签到
36 |
37 |
38 |
39 |
40 |
41 | 监督举报
42 |
43 |
44 |
45 |
46 |
47 | 活动报名
48 |
49 |
50 |
51 |
52 |
53 | 失物招领
54 |
55 |
56 |
57 |
58 |
59 | 图书检索
60 |
61 |
62 |
63 |
64 | 新闻公告
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | {{item.title}}
73 |
74 |
75 | {{item._createTime}}
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.js:
--------------------------------------------------------------------------------
1 | // pages/index/index.js
2 | const db=wx.cloud.database()
3 | var times=require('../../utils/times.js')
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | mglist:'',
11 | msgList:'',
12 | rmb:''
13 | },
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function (options) {
18 | wx.cloud.callFunction({
19 | name: 'open',
20 | success: (res) => {
21 | var usid = res.result.openid
22 | console.log(usid)
23 | this.setData({
24 | openid: res.result.openid,
25 | })
26 | getApp().globalData.openid = res.result.openid
27 | db.collection("user").where({ openid: res.result.openid }).get().then(res => {
28 | console.log(res.data)
29 | this.setData({
30 | userInfo: res.data
31 | })
32 | wx.setStorageSync('userinfo', res.data)
33 | })
34 | wx.setStorageSync('openid', res.result.openid)
35 | },
36 | })
37 | db.collection("banner").get({
38 | success:res=>{
39 | this.setData({
40 | mglist:res.data
41 | })
42 | }
43 | })
44 | db.collection("tzgg").get({
45 | success:res=>{
46 | this.setData({
47 | msgList:res.data
48 | })
49 | }
50 | })
51 | db.collection("xwtz").get({
52 | success:res=>{
53 | for(var i=0;i{
31 | console.log(res.result.list)
32 | console.log(res.result.list.length);
33 | var leng=res.result.list.length;
34 | for(var i=0;i{
62 | // console.log(res)
63 | // this.setData({
64 | // xzxx:res.data
65 | // })
66 | //
67 | // })
68 | },
69 | qd(){
70 | wx.navigateTo({
71 | url: '../sm/sm',
72 | })
73 | },
74 | jl(){
75 | wx.navigateTo({
76 | url: '../dkjl/dkjl',
77 | })
78 | },
79 | /**
80 | * 生命周期函数--监听页面初次渲染完成
81 | */
82 | onReady: function () {
83 |
84 | },
85 |
86 | /**
87 | * 生命周期函数--监听页面显示
88 | */
89 | onShow: function () {
90 |
91 | },
92 |
93 | /**
94 | * 生命周期函数--监听页面隐藏
95 | */
96 | onHide: function () {
97 |
98 | },
99 |
100 | /**
101 | * 生命周期函数--监听页面卸载
102 | */
103 | onUnload: function () {
104 |
105 | },
106 |
107 | /**
108 | * 页面相关事件处理函数--监听用户下拉动作
109 | */
110 | onPullDownRefresh: function () {
111 |
112 | },
113 |
114 | /**
115 | * 页面上拉触底事件的处理函数
116 | */
117 | onReachBottom: function () {
118 |
119 | },
120 |
121 | /**
122 | * 用户点击右上角分享
123 | */
124 | onShareAppMessage: function () {
125 |
126 | }
127 | })
--------------------------------------------------------------------------------
/miniprogram/pages/zwyd/zwyd.wxss:
--------------------------------------------------------------------------------
1 | /* pages/zwyd/zwyd.wxss */
2 | .title{
3 | width: 90%;
4 | height: 100rpx;
5 | font-weight: 700;
6 | font-size: 45rpx;
7 | line-height: 100rpx;
8 | margin:30rpx auto;
9 | letter-spacing:8px;
10 | color: white;
11 | }
12 | .xzxx{
13 | width: 90%;
14 | margin:20rpx auto;
15 | height: 200rpx;
16 | }
17 | .xzxx_box{
18 | width: 47%;
19 | height: 100%;
20 | background-color: rgba(235, 235, 235, 0.219);
21 | border-radius: 20rpx;
22 | float: left;
23 | }
24 | .xzxx_box1{
25 | width: 47%;
26 | height: 100%;
27 | background-color: rgba(235, 235, 235, 0.219);
28 | border-radius: 20rpx;
29 | float: right;
30 | }
31 | .xzzz_box_title{
32 | width: 90%;
33 | height: 70rpx;
34 | margin: 20rpx auto;
35 | }
36 | .xzzz_box_title_icon{
37 | width: 70rpx;
38 | height: 70rpx;
39 | float: left;
40 | }
41 | .xzzz_box_title_icon image{
42 | width: 100%;
43 | height: 100%;
44 | }
45 | .xzzz_box_title_text{
46 | float: left;
47 | width: 170rpx;
48 | height: 70rpx;
49 | line-height: 70rpx;
50 | letter-spacing:3px;
51 | padding-left: 10rpx;
52 | font-weight: 600;
53 | font-size: 35rpx;
54 | color: white;
55 | }
56 | .xzxx_mian{
57 | width: 90%;
58 | margin: 10rpx auto;
59 | height: 70rpx;
60 | }
61 | .xzzz_mian_text{
62 | width: 80%;
63 | height: 70rpx;
64 | line-height: 70rpx;
65 | letter-spacing:3px;
66 | font-weight: 600;
67 | font-size: 29rpx;
68 | float: left;
69 | color: white;
70 | }
71 | .xzzz_mian_icon{
72 | width: 20%;
73 | height: 70rpx;
74 | line-height: 70rpx;
75 | font-weight: 600;
76 | font-size: 29rpx;
77 | float: left;
78 | color: white;
79 | }
80 | .back{
81 | width: 100%;
82 | height: 100vh;
83 | }
84 | .back image{
85 | width: 100%;
86 | height: 100%;
87 | }
88 | .main{
89 | margin-top: -100vh;
90 | }
91 | .zwxx{
92 | width: 90%;
93 | margin: 50rpx auto;
94 | height: 200rpx;
95 | background-color: rgba(235, 235, 235, 0.219);
96 | border-radius: 20rpx;
97 | }
98 | .zwxx_box_title{
99 | width: 90%;
100 | height: 70rpx;
101 | padding-top: 20rpx;
102 | margin-left: 20rpx;
103 | }
104 | .zwxx_wz{
105 | width: 90%;
106 | height: 80rpx;
107 | line-height: 70rpx;
108 | margin: 10rpx auto;
109 | text-align: center;
110 | font-weight: 600;
111 | font-size: 35rpx;
112 | color: white;
113 | letter-spacing:2rpx;
114 | }
115 | .lq{
116 | width: 250rpx;
117 | height: 100rpx;
118 | margin: 50rpx auto;
119 | background-color: rgba(216, 235, 53, 0.637);
120 | border-radius: 20rpx;
121 | line-height: 100rpx;
122 | text-align: center;
123 | letter-spacing:3px;
124 | color: white;
125 | font-weight: 800;
126 | }
127 | .yhxx{
128 | width: 90%;
129 | margin: 50rpx auto;
130 | height: 270rpx;
131 | background-color: rgba(235, 235, 235, 0.219);
132 | border-radius: 20rpx;
133 | }
--------------------------------------------------------------------------------
/miniprogram/pages/swzl/swzl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 发布信息
11 |
12 |
13 |
14 |
15 |
16 | 寻物信息
17 |
18 |
19 |
20 |
21 |
22 | 失物招领
23 |
24 |
25 |
26 |
27 |
28 |
29 | 失物招领
30 |
31 |
32 |
33 |
34 |
35 |
36 | {{item.title}}
37 | {{item.wzxx}}
38 |
39 |
40 |
41 |
42 |
43 | 查看更多
44 |
45 |
46 |
47 |
48 |
49 | 寻物信息
50 |
51 |
52 |
53 |
54 |
55 |
56 | {{item.title}}
57 | {{item.wzxx}}
58 |
59 |
60 |
61 |
62 |
63 | 查看更多
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/miniprogram/pages/getuser/getuser.js:
--------------------------------------------------------------------------------
1 | // pages/getuser/getuser.js
2 | const db = wx.cloud.database()
3 | const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | avatarUrl: defaultAvatarUrl,
11 | name: '',
12 | userid: '',
13 | userphoto: '',
14 | imgrl: ''
15 | },
16 | onChooseAvatar(e) {
17 | const { avatarUrl } = e.detail
18 | this.setData({
19 | avatarUrl,
20 | })
21 | },
22 | formInputChange(e) {
23 | console.log(e)
24 | this.setData({
25 | name: e.detail.value
26 | })
27 | },
28 | formSubmit(e) {
29 | console.log(e.detail.value.input)
30 | this.setData({
31 | name: e.detail.value.input
32 | })
33 | var that = this;
34 | const filePath = this.data.avatarUrl
35 | wx.cloud.uploadFile({
36 | cloudPath: (new Date()).valueOf() + '.png', // 文件名
37 | filePath: filePath, // 文件路径
38 | success: res => {
39 | // get resource ID
40 | console.log(res.fileID)
41 | // 赋值图片
42 | that.setData({
43 | imgrl: res.fileID
44 | })
45 | that.upload(res.fileID);
46 | },
47 | fail: err => {
48 | // handle error
49 | }
50 | })
51 | },
52 | upload(filepath){
53 | console.log(filepath)
54 | db.collection("user").add({
55 | data: {
56 | name:this.data.name,
57 | openid:this.data.userid,
58 | userphoto:filepath,
59 | _createTime: Date.parse(new Date()),
60 | }
61 | }).then(res => {
62 | wx.showToast({
63 | title: '添加成功',
64 | icon: 'success',
65 | duration: 2000
66 | })
67 | wx.redirectTo({
68 | url: '../my/my',
69 | })
70 | })
71 | },
72 | /**
73 | * 生命周期函数--监听页面加载
74 | */
75 | onLoad: function (options) {
76 | const app = getApp()
77 | var userid = app.globalData.openid
78 | this.setData({
79 | userid: userid,
80 | })
81 | },
82 |
83 | /**
84 | * 生命周期函数--监听页面初次渲染完成
85 | */
86 | onReady: function () {
87 |
88 | },
89 |
90 | /**
91 | * 生命周期函数--监听页面显示
92 | */
93 | onShow: function () {
94 |
95 | },
96 |
97 | /**
98 | * 生命周期函数--监听页面隐藏
99 | */
100 | onHide: function () {
101 |
102 | },
103 |
104 | /**
105 | * 生命周期函数--监听页面卸载
106 | */
107 | onUnload: function () {
108 |
109 | },
110 |
111 | /**
112 | * 页面相关事件处理函数--监听用户下拉动作
113 | */
114 | onPullDownRefresh: function () {
115 |
116 | },
117 |
118 | /**
119 | * 页面上拉触底事件的处理函数
120 | */
121 | onReachBottom: function () {
122 |
123 | },
124 |
125 | /**
126 | * 用户点击右上角分享
127 | */
128 | onShareAppMessage: function () {
129 |
130 | }
131 | })
--------------------------------------------------------------------------------
/miniprogram/pages/dk/dk.wxss:
--------------------------------------------------------------------------------
1 | /* pages/dk/dk.wxss */
2 | .dk_top{
3 | width: 100%;
4 | height: 350rpx;
5 | }
6 | .dk_top image{
7 | width: 100%;
8 | height: 100%;
9 | }
10 | .dk_top_bar{
11 | width: 100%;
12 | height: 350rpx;
13 | margin-top: -350rpx;
14 | }
15 | .user_logo{
16 | width: 90%;
17 | height: 150rpx;
18 | margin: 50rpx auto;
19 | }
20 | .user_logo_image{
21 | width: 150rpx;
22 | height: 150rpx;
23 | border-radius: 50%;
24 | overflow: hidden;
25 | float: left;
26 | }
27 | .user_logo_image image{
28 | width: 100%;
29 | height: 100%;
30 | }
31 | .user_text{
32 | float: left;
33 | height: 120rpx;
34 | margin: 15rpx 20rpx;
35 | width: 350rpx;
36 | }
37 | .user_text1{
38 | font-size: 28rpx;
39 | line-height: 70rpx;
40 | letter-spacing: 3rpx;
41 | color: white;
42 | font-weight: 600;
43 | }
44 | .user_ljqd{
45 | font-size: 30rpx;
46 | letter-spacing: 2rpx;
47 | color: white;
48 | }
49 | .dkjm{
50 | width: 90%;
51 | height: 400rpx;
52 | background-color: rgb(243, 240, 243);
53 | margin: 0 auto;
54 | margin-top: -110rpx;
55 | border-radius: 10rpx;
56 | box-shadow: 0 0 20px rgb(0 0 0 / 20%);
57 | }
58 | .dk_row1{
59 | width: 80%;
60 | height: 200rpx;
61 | margin: 20rpx auto;
62 | }
63 | .dk_row_zpmain{
64 | margin: 0 50rpx;
65 | float: left;
66 | height: 200rpx;
67 | width: 160rpx;
68 | }
69 | .dk_row_zp{
70 | width: 160rpx;
71 | height: 160rpx;
72 | }
73 | .dk_row_zp_text{
74 | width: 100%;
75 | height: 40rpx;
76 | text-align: center;
77 | line-height: 40rpx;
78 | font-size: 25rpx;
79 | letter-spacing: 2rpx;
80 | }
81 | .dk_row_zp image{
82 | width: 100%;
83 | height: 100%;
84 | }
85 | .dk_row_zp2{
86 | float: right;
87 | }
88 | .dk_row2{
89 | width: 90%;
90 | height: 130rpx;
91 | margin: 20rpx auto;
92 | color: rgb(121, 120, 120);
93 | }
94 | .dk_row2_bar{
95 | width: 25%;
96 | height: 100%;
97 | float: left;
98 | }
99 | .dk_row2_bar_sz{
100 | width: 100%;
101 | height: 80rpx;
102 | line-height: 80rpx;
103 | font-size: 38rpx;
104 | text-align: center;
105 | }
106 | .dk_row2_bar_mz{
107 | width: 100%;
108 | height: 50rpx;
109 | line-height: 50rpx;
110 | font-size: 30rpx;
111 | text-align: center;
112 | letter-spacing: 10rpx;
113 | }
114 | .jqdk{
115 | width: 90%;
116 | height:350rpx;
117 | background-image: linear-gradient(to right, rgba(7, 53, 180, 0.103) , rgba(229, 226, 226, 0.253));
118 | margin:90rpx auto;
119 | border-radius: 10rpx;
120 | box-shadow: 0 0 20px rgb(0 0 0 / 20%);
121 | }
122 | .jqdk_title{
123 | line-height: 80rpx;
124 | margin-left: 50rpx;
125 | letter-spacing: 4rpx;
126 | color: rgb(5, 67, 124);
127 | font-weight: 600;
128 | }
129 | .jqdk_main{
130 | width: 98%;
131 | height: 200rpx;
132 | border-left: 10rpx solid rgb(46, 81, 146);
133 | }
134 | .jqdk_main_text1{
135 | margin-left: 30rpx;
136 | line-height: 90rpx;
137 | font-weight: 700;
138 | font-size: 35rpx;
139 | letter-spacing: 3rpx;
140 | }
141 | .jqdk_main_text2{
142 | margin-left: 30rpx;
143 | line-height: 60rpx;
144 | color: rgb(118, 119, 121);
145 | font-size: 30rpx;
146 | letter-spacing: 3rpx;
147 | }
--------------------------------------------------------------------------------
/miniprogram/pages/jgglxq/jgglxq.js:
--------------------------------------------------------------------------------
1 | // pages/jgglxq/jgglxq.js
2 | var times=require('../../utils/times.js')
3 | const db=wx.cloud.database()
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | rmb:'',
11 | // sjxx: [["时间段1:8:00-9:30"], ["时间段2:9:30-11:00"], ["时间段3:11:00-12:30"], ["时间段4:12:30-2:00"], ["时间段5:2:00-4:00"]],
12 | sjxx: [["时间段1:7:30-9:30", 0], ["时间段2:9:30-11:30", 1], ["时间段3:11:30-14:30", 2], ["时间段4:14:30-19:00", 3], ["时间段5:19:00-22:00", 4]],
13 | fyyj:'',
14 | id:''
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: function (options) {
21 | console.log(options.id)
22 | var id=options.id
23 | this.setData({
24 | id:options.id
25 | })
26 | wx.cloud.callFunction({
27 | name:'getjbglxq',
28 | data:{
29 | id:id
30 | },
31 | complete:res=>{
32 | console.log(res)
33 | for(var i=0;i {
60 | wx.showToast({
61 | title: '处理成功',
62 | icon: 'success',
63 | duration: 2000
64 | })
65 | },
66 | })
67 | },
68 | showgrxg1(){
69 | db.collection('jdjb').doc(this.data.id).update({
70 | data:{
71 | cljg:this.data.fkyy
72 | },
73 | success: res => {
74 | if(this.data.rmb[0].jblx=="座位预约无人使用"){
75 | db.collection('tsgzw').doc(this.data.rmb[0].jbzw).update({
76 | data:{
77 | ['sj.'+this.data.rmb[0].sjd+'.0']:0
78 | }
79 | })
80 | }
81 | wx.showToast({
82 | title: '处理成功',
83 | icon: 'success',
84 | duration: 2000
85 | })
86 | },
87 | })
88 | },
89 | /**
90 | * 生命周期函数--监听页面初次渲染完成
91 | */
92 | onReady: function () {
93 |
94 | },
95 |
96 | /**
97 | * 生命周期函数--监听页面显示
98 | */
99 | onShow: function () {
100 |
101 | },
102 |
103 | /**
104 | * 生命周期函数--监听页面隐藏
105 | */
106 | onHide: function () {
107 |
108 | },
109 |
110 | /**
111 | * 生命周期函数--监听页面卸载
112 | */
113 | onUnload: function () {
114 |
115 | },
116 |
117 | /**
118 | * 页面相关事件处理函数--监听用户下拉动作
119 | */
120 | onPullDownRefresh: function () {
121 |
122 | },
123 |
124 | /**
125 | * 页面上拉触底事件的处理函数
126 | */
127 | onReachBottom: function () {
128 |
129 | },
130 |
131 | /**
132 | * 用户点击右上角分享
133 | */
134 | onShareAppMessage: function () {
135 |
136 | }
137 | })
--------------------------------------------------------------------------------
/miniprogram/pages/qxyy/qxyy.js:
--------------------------------------------------------------------------------
1 | // pages/qxyy/qxyy.js
2 | const db=wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | radioItems: [{
10 | name: '有课',
11 | value: 'yk',
12 | checked: true
13 | },
14 | {
15 | name: '生病',
16 | value: 'sb'
17 | },
18 | {
19 | name: '其他',
20 | value: 'qt'
21 | }
22 | ],
23 | xzyy:'',
24 | list_id:''
25 | },
26 | /**
27 | * 生命周期函数--监听页面加载
28 | */
29 | onLoad: function (options) {
30 | const app=getApp()
31 | var openid=app.globalData.openid
32 | this.setData({
33 | openid:openid
34 | })
35 | console.log(options.id)
36 | this.setData({
37 | list_id:options.id
38 | })
39 | },
40 | radioChange(e){
41 | console.log("取消");
42 | console.log(e.detail.value)
43 | this.setData({
44 | xzyy:e.detail.value
45 | })
46 | },
47 | submitForm(){
48 | db.collection('qxdd').add({
49 | data:{
50 | yyxx:this.data.list_id,
51 | qxyy:this.data.xzyy,
52 | openid:this.data.openid,
53 | _createTime: Date.parse(new Date()),
54 | },
55 | success: (res)=> {
56 | db.collection('xzxx').doc(this.data.list_id).update({
57 | data:{
58 | qx:1,
59 | _updateTime: Date.parse(new Date()),
60 | },
61 | success:(res=>{
62 | db.collection('xzxx').doc(this.data.list_id).get().then(res=>{
63 | // console.log("失败");
64 | console.log("取消的时间段:"+res.data.zxsj)
65 | var zwid=res.data.zxzw
66 | var xzsj=res.data.zxsj
67 | db.collection('tsgzw').doc(zwid).update({
68 | data:{
69 | // zwzt:0,
70 | ['sj.'+xzsj+'.0']:0,
71 | _updateTime: Date.parse(new Date()),
72 | },
73 | success:(res=>{
74 | wx.showToast({
75 | title: '取消成功',
76 | icon:'success',
77 | duration:2000,
78 | success:(res)=>{
79 | setTimeout(function(){
80 | wx.switchTab({
81 | url: '../index/index',
82 | })
83 | },2000)
84 | }
85 | })
86 | })
87 | })
88 | })
89 | })
90 | })
91 | }
92 | })
93 | },
94 | /**
95 | * 生命周期函数--监听页面初次渲染完成
96 | */
97 | onReady: function () {
98 |
99 | },
100 |
101 | /**
102 | * 生命周期函数--监听页面显示
103 | */
104 | onShow: function () {
105 |
106 | },
107 |
108 | /**
109 | * 生命周期函数--监听页面隐藏
110 | */
111 | onHide: function () {
112 |
113 | },
114 |
115 | /**
116 | * 生命周期函数--监听页面卸载
117 | */
118 | onUnload: function () {
119 |
120 | },
121 |
122 | /**
123 | * 页面相关事件处理函数--监听用户下拉动作
124 | */
125 | onPullDownRefresh: function () {
126 |
127 | },
128 |
129 | /**
130 | * 页面上拉触底事件的处理函数
131 | */
132 | onReachBottom: function () {
133 |
134 | },
135 |
136 | /**
137 | * 用户点击右上角分享
138 | */
139 | onShareAppMessage: function () {
140 |
141 | }
142 | })
--------------------------------------------------------------------------------
/miniprogram/pages/hdbm/hdbm.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 活动标题
8 | {{item.title}}
9 |
10 |
11 |
12 |
13 | 地点
14 | {{item.place}}
15 |
16 |
17 | 时间
18 | {{item.time}}
19 |
20 |
21 | 举办单位
22 | {{item.fqdw}}
23 |
24 |
25 | 报名人数
26 | {{item.rs}}
27 |
28 |
29 | 简介
30 | {{item.jj}}
31 |
32 |
33 |
34 | 一键报名
35 |
36 |
37 |
38 |
39 |
40 | 活动标题
41 | {{item.title}}
42 |
43 |
44 |
45 |
46 | 地点
47 | {{item.place}}
48 |
49 |
50 | 时间
51 | {{item.time}}
52 |
53 |
54 | 举办单位
55 | {{item.fqdw}}
56 |
57 |
58 | 报名人数
59 | {{item.rs}}
60 |
61 |
62 | 简介
63 | {{item.jj}}
64 |
65 |
66 |
67 | 取消预约
68 | 更多操作
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/miniprogram/pages/xgxx/xgxx.js:
--------------------------------------------------------------------------------
1 | // pages/xgxx/xgxx.js
2 | const db=wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | openid:'',
10 | userInfo:'',
11 | array:["大一","大二","大三","大四","研究生"],
12 | array1:["计信学院","食生院","物电学院","烹酒学院"],
13 | xy_index:0,
14 | nj_index:0
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: function (options) {
21 | const app =getApp()
22 | //
23 | var openid =app.globalData.openid
24 | this.setData({
25 | openid:openid
26 | })
27 | db.collection("user").where({openid:this.data.openid}).get().then(res=>{
28 | console.log(res.data)
29 | this.setData({
30 | userInfo:res.data
31 | })
32 | console.log(this.data.userInfo[0].nj)
33 | for(let i=0;i {
21 | var usid = res.result.openid
22 | console.log(usid)
23 | this.setData({
24 | openid: res.result.openid,
25 | })
26 | getApp().globalData.openid = res.result.openid
27 | db.collection("user").where({ openid: res.result.openid }).get().then(res => {
28 | console.log(res.data)
29 | this.setData({
30 | userInfo: res.data
31 | })
32 | if (res.data == '') {
33 | wx.navigateTo({
34 | url: '../getuser/getuser',
35 | })
36 | }
37 | // 把数据缓存在本地key值为userinfo
38 | wx.setStorageSync('userinfo', res.data)
39 | })
40 |
41 | wx.setStorageSync('openid', res.result.openid)
42 | },
43 | fail(res) {
44 | console.log("获取失败", res);
45 | }
46 | })/*
47 | wx.getUserProfile({
48 | desc:'用于完善资料',//声明
49 | success:(res)=>{
50 | this.setData({
51 | userInfo:res.userInfo
52 | })
53 | },
54 | fail(res){
55 | console.log('用户拒绝')
56 | }
57 | })*/
58 | },
59 | wdyy(){
60 | wx.navigateTo({
61 | url: '../wdyy/wdyy',
62 | })
63 | },
64 | grzl() {
65 | if (this.data.openid != '') {
66 | wx.navigateTo({
67 | url: '../grzl/grzl',
68 | })
69 | } else {
70 | wx.showToast({
71 | title: '请登录',
72 | icon: 'error',
73 | duration: 2000
74 | })
75 | }
76 | },
77 | /**
78 | * 生命周期函数--监听页面加载
79 | */
80 | onLoad: function (options) {
81 | // wx.getStorageSync:从本地缓存中同步获取指定 key 的内容。
82 | let user=wx.getStorageSync('openid')
83 | var userinfo =wx.getStorageSync('userinfo')
84 | this.setData({
85 | openid:user,
86 | userInfo:userinfo
87 | })
88 | getApp().globalData.openid = user
89 | if(this.data.userInfo==''){
90 | db.collection("user").where({ openid: user }).get().then(res => {
91 | console.log(res.data)
92 | this.setData({
93 | userInfo: res.data
94 | })
95 | wx.setStorageSync('userinfo', res.data)
96 | })
97 | }
98 |
99 | },
100 | showgyqfk(){
101 | wx.navigateTo({
102 | url: '../yjfk/yjfk',
103 | })
104 | },
105 | fwzx(){
106 | wx.navigateTo({
107 | url: '../fwzx/fwzx',
108 | })
109 | },
110 | showgywm(){
111 | wx.navigateTo({
112 | url: '../gywm/gywm',
113 | })
114 | },
115 | showgl(){
116 | if(this.data.userInfo[0].isadmin==1){
117 | wx.navigateTo({
118 | url: '../glht/glht',
119 | })
120 | }else{
121 | wx.showToast({
122 | title: '无权限',
123 | icon: 'error',
124 | duration: 2000
125 | })
126 | }
127 | },
128 | /**
129 | * 生命周期函数--监听页面初次渲染完成
130 | */
131 | onReady: function () {
132 |
133 | },
134 |
135 | /**
136 | * 生命周期函数--监听页面显示
137 | */
138 | onShow: function () {
139 |
140 | },
141 |
142 | /**
143 | * 生命周期函数--监听页面隐藏
144 | */
145 | onHide: function () {
146 |
147 | },
148 |
149 | /**
150 | * 生命周期函数--监听页面卸载
151 | */
152 | onUnload: function () {
153 |
154 | },
155 |
156 | /**
157 | * 页面相关事件处理函数--监听用户下拉动作
158 | */
159 | onPullDownRefresh: function () {
160 |
161 | },
162 |
163 | /**
164 | * 页面上拉触底事件的处理函数
165 | */
166 | onReachBottom: function () {
167 |
168 | },
169 |
170 | /**
171 | * 用户点击右上角分享
172 | */
173 | onShareAppMessage: function () {
174 |
175 | }
176 | })
--------------------------------------------------------------------------------
/miniprogram/pages/my/my.wxml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
23 |
24 |
25 |
26 |
31 |
32 |
33 |
34 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | {{userInfo[0].name}}
55 |
56 |
57 |
58 | 您还未授权登录
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | 我的预约
67 |
68 |
69 |
70 |
71 |
72 | 个人资料
73 |
74 |
75 |
76 |
77 |
78 | 服务中心
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | 帮助中心
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | 意见反馈
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | 关于我们 & 版本管理
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 | 管理后台
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/miniprogram/pages/hdbm/hdbm.js:
--------------------------------------------------------------------------------
1 | // pages/hdbm/hdbm.js
2 | const db=wx.cloud.database()
3 | var times=require('../../utils/times.js')
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | openid:'',
11 | rmb:'',
12 | rmb1:''
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: function (options) {
19 | const app=getApp()
20 | var openid=app.globalData.openid
21 | this.setData({
22 | openid:openid
23 | })
24 |
25 | db.collection("hdbm").get().then(res=>{
26 | console.log(res.data)
27 | this.setData({
28 | rmb:res.data
29 | })
30 | })
31 | db.collection("hdyy").where({openid:this.data.openid}).get().then(res=>{
32 | console.log(res.data)
33 | var lins=this.data.rmb
34 | for(let i=0;i {
52 | console.log('授权成功', res)
53 | wx.cloud.callFunction({
54 | name: "fstz",
55 | data: {
56 | openid: this.data.openid
57 | }
58 | }).then(res => {
59 | console.log(this.data.openid)
60 | console.log("推送消息成功", res)
61 | }).catch(res => {
62 | console.log("推送消息失败", res)
63 | })
64 | },
65 | fail(res) {
66 | console.log('授权失败', res)
67 | }
68 | })
69 | },
70 | hdyy(e){
71 | console.log(e.currentTarget.id)
72 | db.collection("hdyy").add({
73 | data:{
74 | openid:this.data.openid,
75 | hd:e.currentTarget.id,
76 | _createTime: Date.parse(new Date()),
77 | },
78 | success:res=>{
79 | wx.showToast({
80 | title: '报名成功',
81 | icon: 'success',
82 | duration: 2000,
83 | success:res=>{
84 | db.collection("hdyy").where({openid:this.data.openid}).get().then(res=>{
85 | console.log(res.data)
86 | var lins=this.data.rmb
87 | for(let i=0;i {
109 | wx.showToast({
110 | title: '取消成功',
111 | icon: 'success',
112 | duration: 2000,
113 | success:res=>{
114 | db.collection("hdyy").where({openid:this.data.openid}).get().then(res=>{
115 | console.log(res.data)
116 | var lins=this.data.rmb
117 | for(let i=0;i{
22 | // console.log(res);
23 | // this.setData({
24 | // rmbs:res.data
25 | // })
26 | // })
27 |
28 | // wx.cloud.callFunction({
29 | // name:'getzwlist',
30 | // data:{
31 | // listid:options.list_id// 此处填入了某种方式获取得到的 Buffer 数据,可以是 request 下来的,可以是读文件读出来的等等
32 |
33 | // },
34 | // // 无论对错均输出
35 | // complete:res=>{
36 | // console.log(res.result);
37 | // this.setData({
38 | // // rmbs:res.result
39 | // })
40 | // }
41 | // })
42 |
43 |
44 |
45 | // },
46 |
47 | // /**
48 | // * 生命周期函数--监听页面初次渲染完成
49 | // */
50 | // onReady() {
51 |
52 | // },
53 |
54 | // /**
55 | // * 生命周期函数--监听页面显示
56 | // */
57 | // onShow() {
58 |
59 | // },
60 |
61 | // /**
62 | // * 生命周期函数--监听页面隐藏
63 | // */
64 | // onHide() {
65 |
66 | // },
67 |
68 | // /**
69 | // * 生命周期函数--监听页面卸载
70 | // */
71 | // onUnload() {
72 |
73 | // },
74 |
75 | // /**
76 | // * 页面相关事件处理函数--监听用户下拉动作
77 | // */
78 | // onPullDownRefresh() {
79 |
80 | // },
81 |
82 | // /**
83 | // * 页面上拉触底事件的处理函数
84 | // */
85 | // onReachBottom() {
86 |
87 | // },
88 |
89 | // /**
90 | // * 用户点击右上角分享
91 | // */
92 | // onShareAppMessage() {
93 |
94 | // }
95 | // })
96 |
97 |
98 |
99 |
100 |
101 | /***************************************************************** */
102 | // pages/zwyd/zwyd.js
103 | const db=wx.cloud.database()
104 | Page({
105 |
106 | /**
107 | * 页面的初始数据
108 | */
109 | data: {
110 | list_id:'',
111 | rmbs:'',
112 | userinfo:'',
113 | openid:'',
114 | // sjxx:[["8:00-9:30",0],["9:30-11:00",1],["11:00-12:30",2],["12:30-2:00",3],["2:00-4:00",4]],
115 | sjxx: [["时间段1:7:30-9:30", 0], ["时间段2:9:30-11:30", 1], ["时间段3:11:30-14:30", 2], ["时间段4:14:30-19:00", 3], ["时间段5:19:00-22:00", 4]],
116 | sjxxindex:0,//时间默认值
117 | },
118 |
119 | /**
120 | * 生命周期函数--监听页面加载
121 | */
122 | onLoad: function (options) {
123 | var userinfo =wx.getStorageSync('userinfo')
124 | // const app = getApp()
125 | // var openid = app.globalData.openid
126 | var openid = wx.getStorageSync('openid')
127 | console.log(options)
128 | this.setData({
129 | list_id:options.list_id,
130 | userinfo:userinfo,
131 | openid:openid,
132 | sjxxindex:options.sjid
133 | })
134 | wx.cloud.callFunction({
135 | //云函数的引入区分单引号和双引号
136 | name:"getzwlist",
137 | data:{
138 | listid:options.list_id
139 | },
140 | complete:res=>{
141 | console.log(res.result.list)
142 | this.setData({
143 | rmbs:res.result.list
144 | })
145 | }
146 | })
147 | },
148 | qrxz(){
149 | db.collection("xzxx").add({
150 | data:{
151 | openid:this.data.openid,
152 | zxzw:this.data.list_id,
153 | // zxzw:options.list_id,
154 | qdzt:0,
155 | qt:0,
156 | zxsj:this.data.sjxxindex,
157 | _createTime: Date.parse(new Date()),
158 | }
159 | }).then(res=>{
160 | wx.showToast({
161 | title:'选座成功',
162 | icon:'success',
163 | duration:2000,
164 | success:()=>{
165 | console.log(this.data.list_id)
166 | db.collection("tsgzw").doc(this.data.list_id).update({
167 | data:{
168 | // zwzt:2
169 | ['sj.'+this.data.sjxxindex+'.0']:2
170 | },
171 | success:res=>{
172 | setTimeout(function(){
173 | wx.switchTab({
174 | url: '../index/index',
175 | })
176 | },2000)
177 | }
178 | })
179 | }
180 | })
181 | })
182 | },
183 | /**
184 | * 生命周期函数--监听页面初次渲染完成
185 | */
186 | onReady: function () {
187 |
188 | },
189 |
190 | /**
191 | * 生命周期函数--监听页面显示
192 | */
193 | onShow: function () {
194 |
195 | },
196 |
197 | /**
198 | * 生命周期函数--监听页面隐藏
199 | */
200 | onHide: function () {
201 |
202 | },
203 |
204 | /**
205 | * 生命周期函数--监听页面卸载
206 | */
207 | onUnload: function () {
208 |
209 | },
210 |
211 | /**
212 | * 页面相关事件处理函数--监听用户下拉动作
213 | */
214 | onPullDownRefresh: function () {
215 |
216 | },
217 |
218 | /**
219 | * 页面上拉触底事件的处理函数
220 | */
221 | onReachBottom: function () {
222 |
223 | },
224 |
225 | /**
226 | * 用户点击右上角分享
227 | */
228 | onShareAppMessage: function () {
229 |
230 | }
231 | })
--------------------------------------------------------------------------------
/miniprogram/pages/sm/sm.js:
--------------------------------------------------------------------------------
1 | var wxbarcode=require('../../utils/index.js')
2 | var times=require('../../utils/times.js')
3 | const db= wx.cloud.database()
4 | Page({
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | code_openid:'',
10 | openid:'',
11 | userinfo:'',
12 | xzsj:0,
13 | sqqk:0,
14 | },
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: function (options) {
19 | // const app =getApp()
20 | // var openid =app.globalData.openid
21 | var openid =wx.getStorageSync('openid')
22 | var userinfo =wx.getStorageSync('userinfo')
23 | this.setData({
24 | openid:openid,
25 | userinfo:userinfo,
26 | code_openid:openid.substr(-10).padStart(openid.length, "*")
27 | })
28 | wxbarcode.barcode('barcode',openid,680,100)
29 | wxbarcode.qrcode('qrcode',openid,420,420)
30 | },
31 | openqr:function(){
32 | var openid=this.data.openid
33 | wx.scanCode({
34 | onlyFromCamera: true,
35 | success (res) {
36 | console.log(res.result)
37 | // 用户id
38 | var resultid=res.result
39 | // qt:0 有预约过的座位再次预约签到的时候会显示签退,因为找到了第零条信息,所以要找签退状态为0的那条数据
40 | db.collection("xzxx").where({zxzw:res.result,qt:0}).get().then(res=>{
41 | // console.log(res.data[0].openid)
42 | // 判断用户标识和用户openid是否一致
43 | console.log("预约时间段:");
44 | // console.log(res.data[0].zxsj);
45 |
46 | if(res.data.length==0){
47 | wx.showToast({
48 | title:"请检查预约信息",
49 | icon:"error",
50 | duration:2000,
51 | })
52 | }else{
53 | let xzsj=res.data[0].zxsj
54 | if(res.data[0].openid==openid){
55 | console.log(resultid)
56 | if(res.data[0].qdzt==0){
57 | db.collection("xzxx").where({zxzw:res.result}).update({
58 | data:{
59 | qdzt:1,
60 | qdsj: Date.parse(new Date()),
61 | },
62 | success:res=>{
63 | wx.showToast({
64 | title:"签到成功",
65 | icon:"success",
66 | duration:2000,
67 | })
68 | }
69 | })
70 | }else{
71 | var qdsj=res.data[0].qdsj
72 | console.log(qdsj);
73 | var dateNow=(new Date()).valueOf();
74 | var usedTime=dateNow-qdsj
75 | console.log(usedTime);
76 | var minutes=Math.floor(usedTime/(60*10000));
77 | console.log(minutes);
78 | // if(minutes>0){
79 | db.collection("xzxx").where({zxzw:resultid}).update({
80 | data:{
81 | qt:1,
82 | qtsj:Date.parse(new Date())
83 | },
84 | success:res=>{
85 | console.log(resultid)
86 | db.collection("tsgzw").doc(resultid).update({
87 | data:{
88 | ['sj.'+xzsj+'.0']:0
89 | },
90 | success:res=>{
91 | wx.showToast({
92 | title:"签退成功",
93 | icon:"success",
94 | duration:2000,
95 | })
96 | }
97 | })
98 | }
99 | })
100 | // }else{
101 | // wx.showToast({
102 | // title:"签退间隔过短",
103 | // icon:"error",
104 | // duration:2000,
105 | // })
106 | // }
107 |
108 | }
109 | }else{
110 | wx.showToast({
111 | title:"请检查座位",
112 | icon:"error",
113 | duration:2000,
114 | })
115 | }
116 | }
117 | })
118 |
119 | }
120 | })
121 |
122 | },
123 |
124 |
125 | /**
126 | * 生命周期函数--监听页面初次渲染完成
127 | */
128 | onReady: function () {
129 |
130 | },
131 |
132 | /**
133 | * 生命周期函数--监听页面显示
134 | */
135 | onShow: function () {
136 |
137 | },
138 |
139 | /**
140 | * 生命周期函数--监听页面隐藏
141 | */
142 | onHide: function () {
143 |
144 | },
145 |
146 | /**
147 | * 生命周期函数--监听页面卸载
148 | */
149 | onUnload: function () {
150 |
151 | },
152 |
153 | /**
154 | * 页面相关事件处理函数--监听用户下拉动作
155 | */
156 | onPullDownRefresh: function () {
157 |
158 | },
159 |
160 | /**
161 | * 页面上拉触底事件的处理函数
162 | */
163 | onReachBottom: function () {
164 |
165 | },
166 |
167 | /**
168 | * 用户点击右上角分享
169 | */
170 | onShareAppMessage: function () {
171 |
172 | }
173 | })
--------------------------------------------------------------------------------
/miniprogram/pages/fqjb/fqjb.js:
--------------------------------------------------------------------------------
1 | // pages/fqjb/fqjb.js
2 | const db = wx.cloud.database()
3 | Page({
4 |
5 | data: {
6 | showTopTips: false,
7 | radioItems: [
8 | { name: '座位被他人占用', value: '0', checked: true },
9 | { name: '座位预约无人使用', value: '1' }
10 | ],
11 | items: [],
12 | files: [],
13 | jbzw: 0,
14 | // sjxx: [["时间段1:8:00-9:30", 0], ["时间段2:9:30-11:00", 1], ["时间段3:11:00-12:30", 2], ["时间段4:12:30-2:00", 3], ["时间段5:2:00-4:00", 4]],
15 | sjxx: [["时间段1:7:30-9:30", 0], ["时间段2:9:30-11:30", 1], ["时间段3:11:30-14:30", 2], ["时间段4:14:30-19:00", 3], ["时间段5:19:00-22:00", 4]],
16 | sjxxIndex: 0,
17 | formData: {
18 | },
19 | jbyy: '',
20 | rules: [{
21 | name: 'radio',
22 | rules: { required: false, message: '单选列表是必选项' },
23 | }],
24 | openid:''
25 | },
26 | onLoad: function (options) {
27 | const app=getApp()
28 | var openid=app.globalData.openid
29 | this.setData({
30 | openid:openid
31 | })
32 | this.setData({
33 | selectFile: this.selectFile.bind(this),
34 | uplaodFile: this.uplaodFile.bind(this)
35 | })
36 | wx.cloud.callFunction({
37 | name: "getzwlist",
38 | complete: res => {
39 | console.log(res.result.list)
40 | var lscc = [];
41 | for (let i = 0; i < res.result.list.length; i++) {
42 | var lssz = {};
43 | lssz.name = res.result.list[i].bh;
44 | lssz.value = res.result.list[i]._id;
45 | lscc.push(lssz);
46 | }
47 | this.setData({
48 | items: lscc
49 | })
50 | }
51 | })
52 | },
53 | formip(e) {
54 | console.log(e.detail.value)
55 | this.setData({
56 | jbyy: e.detail.value
57 | })
58 | },
59 | radioChange: function (e) {
60 | console.log('radio发生change事件,携带value值为:', e.detail.value);
61 | var radioItems = this.data.radioItems;
62 | for (var i = 0, len = radioItems.length; i < len; ++i) {
63 | radioItems[i].checked = radioItems[i].value == e.detail.value;
64 | }
65 | this.setData({
66 | radioItems: radioItems,
67 | [`formData.radio`]: e.detail.value
68 | });
69 | },
70 | bindxzzw: function (e) {
71 | this.setData({
72 | jbzw: e.detail.value
73 | })
74 | },
75 | bindsjxx: function (e) {
76 | this.setData({
77 | sjxxIndex: e.detail.value
78 | })
79 | },
80 | submitForm() {
81 | if (this.data.jbyy != '') {
82 | db.collection('jdjb').add({
83 | data: {
84 | openid: this.data.openid,
85 | yy: this.data.jbyy,
86 | jbzw: this.data.items[this.data.jbzw].value,
87 | zp:this.data.files,
88 | jblx:this.data.formData.radio,
89 | sjd: this.data.sjxxIndex,
90 | cljg:'',
91 | _createTime: Date.parse(new Date()),
92 | }
93 | }).then(res => {
94 | wx.showToast({
95 | title: '举报成功',
96 | icon: 'success',
97 | duration: 2000,
98 | success:res=>{
99 | setTimeout(function(){
100 | wx.switchTab({
101 | url: '../index/index',
102 | })
103 | },2000)
104 | }
105 | })
106 | })
107 | }
108 | },
109 | chooseImage: function (e) {
110 | var that = this;
111 | wx.chooseImage({
112 | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
113 | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
114 | success: function (res) {
115 | // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
116 | that.setData({
117 | files: that.data.files.concat(res.tempFilePaths)
118 | });
119 | }
120 | })
121 | },
122 | previewImage: function (e) {
123 | wx.previewImage({
124 | current: e.currentTarget.id, // 当前显示图片的http链接
125 | urls: this.data.files // 需要预览的图片http链接列表
126 | })
127 | },
128 | selectFile(files) {
129 | console.log('files', files)
130 | // 返回false可以阻止某次文件上传
131 | },
132 | uplaodFile(files) {
133 | console.log('upload files', files)
134 | console.log('upload files', files)
135 | // 文件上传的函数,返回一个promise
136 | return new Promise((resolve, reject) => {
137 | const tempFilePaths = files.tempFilePaths;
138 | //上传返回值
139 | const that = this;
140 | const object = {};
141 | for (var i = 0; i < tempFilePaths.length; i++) {
142 | let filePath = '', cloudPath = ''
143 | filePath = tempFilePaths[i]
144 | // 上传图片
145 | // cloudPath 最好按时间 遍历的index来排序,避免文件名重复
146 | cloudPath = 'blog-title-image-' + new Date().getTime() + '-' + i + filePath.match(/\.[^.]+?$/)[0]
147 |
148 | console.log(filePath)
149 | console.log(cloudPath)
150 | const upload_task = wx.cloud.uploadFile({
151 | filePath,
152 | cloudPath,
153 | success: function (res) {
154 | console.log(res)
155 | // 可能会有好几个200+的返回码,表示成功
156 | if (res.statusCode === 200 || res.statusCode === 204 || res.statusCode === 205) {
157 | const url = res.fileID
158 | that.data.files.push(url)
159 | if (that.data.files.length === tempFilePaths.length) {
160 | object.urls = that.data.files;
161 | resolve(object) //这就是判断是不是最后一张已经上传了,用来返回,
162 | }
163 | } else {
164 | reject('error')
165 | }
166 | },
167 | fail: function (err) {
168 | console.log(err)
169 | },
170 | conplete: () => {
171 |
172 | }
173 | })
174 | }
175 | })
176 | // 文件上传的函数,返回一个promise
177 | },
178 | uploadError(e) {
179 | console.log('upload error', e.detail)
180 | },
181 | uploadSuccess(e) {
182 | console.log('upload success', e.detail)
183 | }
184 | })
--------------------------------------------------------------------------------
/miniprogram/pages/fbxx/fbxx.js:
--------------------------------------------------------------------------------
1 | // pages/fbxx/fbxx.js
2 | const db = wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | radioItems: [
10 | { name: '寻物', value: '0', checked: true },
11 | { name: '失物招领', value: '1' }
12 | ],
13 | fbxx:'',
14 | formData: {
15 |
16 | },
17 | date:'',
18 | time:'',
19 | openid:'',
20 | files: [],
21 | fblx:'寻物'
22 | },
23 | radioChange: function (e) {
24 | console.log('radio发生change事件,携带value值为:', e.detail.value);
25 | var radioItems = this.data.radioItems;
26 | for (var i = 0, len = radioItems.length; i < len; ++i) {
27 | radioItems[i].checked = radioItems[i].value == e.detail.value;
28 | }
29 | this.setData({
30 | radioItems: radioItems,
31 | fblx: this.data.radioItems[e.detail.value].name
32 | });
33 | },
34 | submitForm(e){
35 | console.log(e)
36 | if(e.detail.value.name!=''&&e.detail.value.date!=''&&e.detail.value.dd!=''&&e.detail.value.mobile!=''&&e.detail.value.time!=''){
37 | db.collection('swzl').add({
38 | data: {
39 | openid: this.data.openid,
40 | title:e.detail.value.name,
41 | zp:this.data.files,
42 | wz:this.data.fbxx,
43 | time:e.detail.value.time,
44 | wzxx:e.detail.value.dd,
45 | wzzt:0,
46 | xxzt:this.data.fblx,
47 | data:e.detail.value.date,
48 | dh:e.detail.value.mobile,
49 | _createTime: Date.parse(new Date()),
50 | }
51 | }).then(res => {
52 | wx.showToast({
53 | title: '提交成功',
54 | icon: 'success',
55 | duration: 2000,
56 | success:res=>{
57 | setTimeout(function(){
58 | wx.switchTab({
59 | url: '../index/index',
60 | })
61 | },2000)
62 | }
63 | })
64 | })
65 | }else{
66 | wx.showToast({
67 | title: '请填写完整',
68 | icon: 'error',
69 | duration: 2000,
70 | })
71 | }
72 | },
73 | formip(e){
74 | console.log(e.detail.value)
75 | this.setData({
76 | fbxx: e.detail.value
77 | })
78 | },
79 | bindDateChange:function(e){
80 | this.setData({
81 | date:e.detail.value
82 | })
83 | },
84 | bindtimeChange:function(e){
85 | this.setData({
86 | time:e.detail.value
87 | })
88 | },
89 | /**
90 | * 生命周期函数--监听页面加载
91 | */
92 | onLoad: function (options) {
93 | const app=getApp()
94 | var openid=app.globalData.openid
95 | this.setData({
96 | openid:openid
97 | })
98 | this.setData({
99 | selectFile: this.selectFile.bind(this),
100 | uplaodFile: this.uplaodFile.bind(this)
101 | })
102 | },
103 | chooseImage: function (e) {
104 | var that = this;
105 | wx.chooseImage({
106 | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
107 | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
108 | success: function (res) {
109 | // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
110 | that.setData({
111 | files: that.data.files.concat(res.tempFilePaths)
112 | });
113 | }
114 | })
115 | },
116 | previewImage: function (e) {
117 | wx.previewImage({
118 | current: e.currentTarget.id, // 当前显示图片的http链接
119 | urls: this.data.files // 需要预览的图片http链接列表
120 | })
121 | },
122 | selectFile(files) {
123 | console.log('files', files)
124 | // 返回false可以阻止某次文件上传
125 | },
126 | uplaodFile(files) {
127 | console.log('upload files', files)
128 | console.log('upload files', files)
129 | // 文件上传的函数,返回一个promise
130 | return new Promise((resolve, reject) => {
131 | const tempFilePaths = files.tempFilePaths;
132 | //上传返回值
133 | const that = this;
134 | const object = {};
135 | for (var i = 0; i < tempFilePaths.length; i++) {
136 | let filePath = '', cloudPath = ''
137 | filePath = tempFilePaths[i]
138 | // 上传图片
139 | // cloudPath 最好按时间 遍历的index来排序,避免文件名重复
140 | cloudPath = 'blog-title-image-' + new Date().getTime() + '-' + i + filePath.match(/\.[^.]+?$/)[0]
141 |
142 | console.log(filePath)
143 | console.log(cloudPath)
144 | const upload_task = wx.cloud.uploadFile({
145 | filePath,
146 | cloudPath,
147 | success: function (res) {
148 | console.log(res)
149 | // 可能会有好几个200+的返回码,表示成功
150 | if (res.statusCode === 200 || res.statusCode === 204 || res.statusCode === 205) {
151 | const url = res.fileID
152 | that.data.files.push(url)
153 | if (that.data.files.length === tempFilePaths.length) {
154 | object.urls = that.data.files;
155 | resolve(object) //这就是判断是不是最后一张已经上传了,用来返回,
156 | }
157 | } else {
158 | reject('error')
159 | }
160 | },
161 | fail: function (err) {
162 | console.log(err)
163 | },
164 | conplete: () => {
165 |
166 | }
167 | })
168 | }
169 | })
170 | // 文件上传的函数,返回一个promise
171 | },
172 | uploadError(e) {
173 | console.log('upload error', e.detail)
174 | },
175 | uploadSuccess(e) {
176 | console.log('upload success', e.detail)
177 | },
178 | /**
179 | * 生命周期函数--监听页面初次渲染完成
180 | */
181 | onReady: function () {
182 |
183 | },
184 |
185 | /**
186 | * 生命周期函数--监听页面显示
187 | */
188 | onShow: function () {
189 |
190 | },
191 |
192 | /**
193 | * 生命周期函数--监听页面隐藏
194 | */
195 | onHide: function () {
196 |
197 | },
198 |
199 | /**
200 | * 生命周期函数--监听页面卸载
201 | */
202 | onUnload: function () {
203 |
204 | },
205 |
206 | /**
207 | * 页面相关事件处理函数--监听用户下拉动作
208 | */
209 | onPullDownRefresh: function () {
210 |
211 | },
212 |
213 | /**
214 | * 页面上拉触底事件的处理函数
215 | */
216 | onReachBottom: function () {
217 |
218 | },
219 |
220 | /**
221 | * 用户点击右上角分享
222 | */
223 | onShareAppMessage: function () {
224 |
225 | }
226 | })
--------------------------------------------------------------------------------
/miniprogram/pages/zwyy/zwyy.js:
--------------------------------------------------------------------------------
1 | // pages/zwyy/zwyy.js
2 | const db = wx.cloud.database()
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | index: 0,
10 | sjxx: [["时间段1:7:30-9:30", 0], ["时间段2:9:30-11:30", 1], ["时间段3:11:30-14:30", 2], ["时间段4:14:30-19:00", 3], ["时间段5:19:00-22:00", 4]],
11 | sjxxindex: 0,
12 | placearr: ['查看全部', '东区图书馆一楼', '东区图书馆二楼'],
13 | ztarr: [['查看全部', 0], ['已预约', 1], ['可预约', 2], ['不可预约', 3]],
14 | rmb: '',
15 | tswz: '',
16 | wzxz: '',
17 | yyzt: 0,
18 | sjzt: '',
19 | lcid: ''
20 | },
21 | bindPickerChangeplace: function (e) {
22 | console.log(e.detail.value)
23 | this.setData({
24 | index: e.detail.value,
25 | wzxz: this.data.placearr[e.detail.value]
26 | })
27 | var lstszw=this.data.tswz
28 | if(e.detail.value==0){
29 | for(let k=0;k {
66 | for (let i = 0; i < res.result.data.length; i++) {
67 | res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
68 | var ztsjk = 0;
69 | if (this.data.yyzt == 1) {
70 | ztsjk = 2
71 | } else if (this.data.yyzt == 2) {
72 | ztsjk = 0
73 | } else {
74 | ztsjk = 1
75 | }
76 | if (res.result.data[i].zwzt != ztsjk) {
77 | res.result.data[i].zt = 1
78 | }
79 | this.setData({
80 | rmb: res.result.data
81 | })
82 | }
83 | }
84 | })
85 | }else{
86 | if(this.data.sjxxindex!=''&&this.data.yyzt==0){
87 | wx.cloud.callFunction({
88 | name: "getzw",
89 | complete: res => {
90 | for (let i = 0; i < res.result.data.length; i++) {
91 | res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
92 | this.setData({
93 | rmb: res.result.data
94 | })
95 | }
96 | }
97 | })
98 | }else{
99 | wx.cloud.callFunction({
100 | name: "getzw",
101 | complete: res => {
102 | for (let i = 0; i < res.result.data.length; i++) {
103 | res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
104 | var ztsjk = 0;
105 | if (this.data.yyzt == 1) {
106 | ztsjk = 2
107 | } else if (this.data.yyzt == 2) {
108 | ztsjk = 0
109 | } else {
110 | ztsjk = 1
111 | }
112 | if (res.result.data[i].zwzt != ztsjk) {
113 | res.result.data[i].zt = 1
114 | }
115 | this.setData({
116 | rmb: res.result.data
117 | })
118 | }
119 | }
120 | })
121 | }
122 | }
123 | },
124 |
125 |
126 | // if (this.data.sjxxindex != '' && this.data.wzxz == 0 && this.data.yyzt == 0) {
127 | // console.log("5")
128 | // wx.cloud.callFunction({
129 | // name: "getzw",
130 | // complete: res => {
131 | // for (let i = 0; i < res.result.data.length; i++) {
132 | // res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
133 | // this.setData({
134 | // rmb: res.result.data
135 | // })
136 | // }
137 | // }
138 | // })
139 | // } else if (this.data.sjxxindex != '' && this.data.wzxz == 0 && this.data.yyzt != 0) {
140 | // console.log("55")
141 | // wx.cloud.callFunction({
142 | // name: "getzw",
143 | // complete: res => {
144 | // for (let i = 0; i < res.result.data.length; i++) {
145 | // res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
146 | // var ztsjk = 0;
147 | // if (this.data.yyzt == 1) {
148 | // ztsjk = 2
149 | // } else if (this.data.yyzt == 2) {
150 | // ztsjk = 0
151 | // } else {
152 | // ztsjk = 1
153 | // }
154 | // if (res.result.data[i].zwzt != ztsjk) {
155 | // res.result.data[i].zt = 1
156 | // }
157 | // this.setData({
158 | // rmb: res.result.data
159 | // })
160 | // }
161 | // }
162 | // })
163 | // } else if (this.data.sjxxindex != '' && this.data.wzxz != 0 && this.data.yyzt == 0) {
164 | // console.log("555")
165 | // for (let i = 0; i < this.data.tswz.length; i++) {
166 | // if (this.data.tswz[i].tsglc == this.data.wzxz) {
167 | // var lcid = this.data.tswz[i]._id
168 | // this.setData({
169 | // lcid: this.data.tswz[i]._id
170 | // })
171 | // }
172 | // wx.cloud.callFunction({
173 | // name: "getzw",
174 | // complete: res => {
175 | // for (let i = 0; i < res.result.data.length; i++) {
176 | // res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
177 | // if (this.data.lcid != res.result.data[i].lc) {
178 | // res.result.data[i].zt = 1
179 | // }
180 | // this.setData({
181 | // rmb: res.result.data
182 | // })
183 | // }
184 | // }
185 | // })
186 | // }
187 | // } else {
188 | // if (this.data.wzxz != "查看全部") {
189 | // for (let i = 0; i < this.data.tswz.length; i++) {
190 | // console.log(this.data.tswz[i].tsglc)
191 | // if (this.data.tswz[i].tsglc == this.data.wzxz) {
192 | // console.log(this.data.tswz[i]._id)
193 | // var lcid = this.data.tswz[i]._id
194 | // this.setData({
195 | // lcid: this.data.tswz[i]._id
196 | // })
197 | // }
198 | // wx.cloud.callFunction({
199 | // name: "getzw",
200 | // complete: res => {
201 | // for (let i = 0; i < res.result.data.length; i++) {
202 | // res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
203 | // if (this.data.lcid != res.result.data[i].lc) {
204 | // res.result.data[i].zt = 1
205 | // }
206 | // this.setData({
207 | // rmb: res.result.data
208 | // })
209 | // }
210 | // }
211 | // })
212 | // }
213 | // }else{
214 | // wx.cloud.callFunction({
215 | // name: "getzw",
216 | // complete: res => {
217 | // for (let i = 0; i < res.result.data.length; i++) {
218 | // res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
219 | // this.setData({
220 | // rmb: res.result.data
221 | // })
222 | // }
223 | // }
224 | // })
225 | // }
226 | // }
227 |
228 | /**
229 | * 生命周期函数--监听页面加载
230 | */
231 | onLoad: function (options) {
232 | wx.cloud.callFunction({
233 | name: "getzw",
234 | complete: res => {
235 | for (let i = 0; i < res.result.data.length; i++) {
236 | res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
237 | this.setData({
238 | rmb: res.result.data
239 | })
240 | }
241 | }
242 | })
243 | db.collection("tsgwz").get().then(res => {
244 | console.log(res)
245 | for(let k=0;k {
265 | for (let i = 0; i < res.result.data.length; i++) {
266 | res.result.data[i].zwzt = res.result.data[i].sj[this.data.sjxxindex][0]
267 | this.setData({
268 | rmb: res.result.data
269 | })
270 | }
271 | }
272 | })
273 | },
274 | showxq(e) {
275 | console.log(e.currentTarget.id)
276 | db.collection("tsgzw").doc(e.currentTarget.id).get().then(res => {
277 | res.data.zwzt = res.data.sj[this.data.sjxxindex][0]
278 | var dbxs = ''
279 | var dbfz = ''
280 | if (this.data.sjxxindex == 0) {
281 | dbxs = 7; dbfz = 30;
282 | } else if (this.data.sjxxindex == 1) {
283 | dbxs = 11; dbfz = 30;
284 | } else if (this.data.sjxxindex == 2) {
285 | dbxs = 16; dbfz = 30;
286 | } else if (this.data.sjxxindex == 3) {
287 | dbxs = 19; dbfz = 0;
288 | } else {
289 | dbxs = 23; dbfz =59
290 | }
291 | console.log(res.data.zwzt)
292 | var myDate = new Date();
293 | var xs = myDate.getHours();//获取小时
294 | var fz = myDate.getMinutes();
295 |
296 | if (res.data.zwzt == 0) {
297 | if (xs < dbxs) {
298 | this.getList();
299 | wx.navigateTo({
300 | url: '../zwyd/zwyd?list_id=' + e.currentTarget.id + "&sjid=" + this.data.sjxxindex,
301 | })
302 | } else if (xs == dbxs) {
303 | if (fz < dbfz) {
304 | this.getList();
305 | wx.navigateTo({
306 | url: '../zwyd/zwyd?list_id=' + e.currentTarget.id + "&sjid=" + this.data.sjxxindex,
307 | })
308 | } else {
309 | wx.showToast({
310 | title: '不可预约',
311 | icon: 'error',
312 | duration: 2000
313 | })
314 | }
315 | } else {
316 | wx.showToast({
317 | title: '该时间段已过',
318 | icon: 'error',
319 | duration: 2000
320 | })
321 | }
322 | }
323 | else {
324 | wx.showToast({
325 | title: '不可预约',
326 | icon: 'error',
327 | duration: 2000
328 | })
329 | this.getList();
330 | }
331 | })
332 | },
333 | /**
334 | * 生命周期函数--监听页面初次渲染完成
335 | */
336 | onReady: function () {
337 |
338 | },
339 |
340 | /**
341 | * 生命周期函数--监听页面显示
342 | */
343 | onShow: function () {
344 | console.log("显示了")
345 | this.getList();
346 | },
347 |
348 | /**
349 | * 生命周期函数--监听页面隐藏
350 | */
351 | onHide: function () {
352 |
353 | },
354 |
355 | /**
356 | * 生命周期函数--监听页面卸载
357 | */
358 | onUnload: function () {
359 |
360 | },
361 |
362 | /**
363 | * 页面相关事件处理函数--监听用户下拉动作
364 | */
365 | onPullDownRefresh: function () {
366 | this.getList()
367 | },
368 |
369 | /**
370 | * 页面上拉触底事件的处理函数
371 | */
372 | onReachBottom: function () {
373 |
374 | },
375 |
376 | /**
377 | * 用户点击右上角分享
378 | */
379 | onShareAppMessage: function () {
380 |
381 | }
382 | })
--------------------------------------------------------------------------------
/miniprogram/utils/barcode.js:
--------------------------------------------------------------------------------
1 | var CHAR_TILDE = 126;
2 | var CODE_FNC1 = 102;
3 |
4 | var SET_STARTA = 103;
5 | var SET_STARTB = 104;
6 | var SET_STARTC = 105;
7 | var SET_SHIFT = 98;
8 | var SET_CODEA = 101;
9 | var SET_CODEB = 100;
10 | var SET_STOP = 106;
11 |
12 |
13 | var REPLACE_CODES = {
14 | CHAR_TILDE: CODE_FNC1 //~ corresponds to FNC1 in GS1-128 standard
15 | }
16 |
17 | var CODESET = {
18 | ANY: 1,
19 | AB: 2,
20 | A: 3,
21 | B: 4,
22 | C: 5
23 | };
24 |
25 | function getBytes(str) {
26 | var bytes = [];
27 | for (var i = 0; i < str.length; i++) {
28 | bytes.push(str.charCodeAt(i));
29 | }
30 | return bytes;
31 | }
32 |
33 | exports.code128 = function (ctx, text, width, height) {
34 |
35 | width = parseInt(width);
36 |
37 | height = parseInt(height);
38 |
39 | var codes = stringToCode128(text);
40 |
41 | var g = new Graphics(ctx, width, height);
42 |
43 | var barWeight = g.area.width / ((codes.length - 3) * 11 + 35);
44 |
45 | var x = g.area.left;
46 | var y = g.area.top;
47 | for (var i = 0; i < codes.length; i++) {
48 | var c = codes[i];
49 | //two bars at a time: 1 black and 1 white
50 | for (var bar = 0; bar < 8; bar += 2) {
51 | var barW = PATTERNS[c][bar] * barWeight;
52 | // var barH = height - y - this.border;
53 | var barH = height - y;
54 | var spcW = PATTERNS[c][bar + 1] * barWeight;
55 |
56 | //no need to draw if 0 width
57 | if (barW > 0) {
58 | g.fillFgRect(x, y, barW, barH);
59 | }
60 |
61 | x += barW + spcW;
62 | }
63 | }
64 |
65 | ctx.draw();
66 | }
67 |
68 |
69 | function stringToCode128(text) {
70 |
71 | var barc = {
72 | currcs: CODESET.C
73 | };
74 |
75 | var bytes = getBytes(text);
76 | //decide starting codeset
77 | var index = bytes[0] == CHAR_TILDE ? 1 : 0;
78 |
79 | var csa1 = bytes.length > 0 ? codeSetAllowedFor(bytes[index++]) : CODESET.AB;
80 | var csa2 = bytes.length > 0 ? codeSetAllowedFor(bytes[index++]) : CODESET.AB;
81 | barc.currcs = getBestStartSet(csa1, csa2);
82 | barc.currcs = perhapsCodeC(bytes, barc.currcs);
83 |
84 | //if no codeset changes this will end up with bytes.length+3
85 | //start, checksum and stop
86 | var codes = new Array();
87 |
88 | switch (barc.currcs) {
89 | case CODESET.A:
90 | codes.push(SET_STARTA);
91 | break;
92 | case CODESET.B:
93 | codes.push(SET_STARTB);
94 | break;
95 | default:
96 | codes.push(SET_STARTC);
97 | break;
98 | }
99 |
100 |
101 | for (var i = 0; i < bytes.length; i++) {
102 | var b1 = bytes[i]; //get the first of a pair
103 | //should we translate/replace
104 | if (b1 in REPLACE_CODES) {
105 | codes.push(REPLACE_CODES[b1]);
106 | i++ //jump to next
107 | b1 = bytes[i];
108 | }
109 |
110 | //get the next in the pair if possible
111 | var b2 = bytes.length > (i + 1) ? bytes[i + 1] : -1;
112 |
113 | codes = codes.concat(codesForChar(b1, b2, barc.currcs));
114 | //code C takes 2 chars each time
115 | if (barc.currcs == CODESET.C) i++;
116 | }
117 |
118 | //calculate checksum according to Code 128 standards
119 | var checksum = codes[0];
120 | for (var weight = 1; weight < codes.length; weight++) {
121 | checksum += (weight * codes[weight]);
122 | }
123 | codes.push(checksum % 103);
124 |
125 | codes.push(SET_STOP);
126 |
127 | //encoding should now be complete
128 | return codes;
129 |
130 | function getBestStartSet(csa1, csa2) {
131 | //tries to figure out the best codeset
132 | //to start with to get the most compact code
133 | var vote = 0;
134 | vote += csa1 == CODESET.A ? 1 : 0;
135 | vote += csa1 == CODESET.B ? -1 : 0;
136 | vote += csa2 == CODESET.A ? 1 : 0;
137 | vote += csa2 == CODESET.B ? -1 : 0;
138 | //tie goes to B due to my own predudices
139 | return vote > 0 ? CODESET.A : CODESET.B;
140 | }
141 |
142 | function perhapsCodeC(bytes, codeset) {
143 | for (var i = 0; i < bytes.length; i++) {
144 | var b = bytes[i]
145 | if ((b < 48 || b > 57) && b != CHAR_TILDE)
146 | return codeset;
147 | }
148 | return CODESET.C;
149 | }
150 |
151 | //chr1 is current byte
152 | //chr2 is the next byte to process. looks ahead.
153 | function codesForChar(chr1, chr2, currcs) {
154 | var result = [];
155 | var shifter = -1;
156 |
157 | if (charCompatible(chr1, currcs)) {
158 | if (currcs == CODESET.C) {
159 | if (chr2 == -1) {
160 | shifter = SET_CODEB;
161 | currcs = CODESET.B;
162 | }
163 | else if ((chr2 != -1) && !charCompatible(chr2, currcs)) {
164 | //need to check ahead as well
165 | if (charCompatible(chr2, CODESET.A)) {
166 | shifter = SET_CODEA;
167 | currcs = CODESET.A;
168 | }
169 | else {
170 | shifter = SET_CODEB;
171 | currcs = CODESET.B;
172 | }
173 | }
174 | }
175 | }
176 | else {
177 | //if there is a next char AND that next char is also not compatible
178 | if ((chr2 != -1) && !charCompatible(chr2, currcs)) {
179 | //need to switch code sets
180 | switch (currcs) {
181 | case CODESET.A:
182 | shifter = SET_CODEB;
183 | currcs = CODESET.B;
184 | break;
185 | case CODESET.B:
186 | shifter = SET_CODEA;
187 | currcs = CODESET.A;
188 | break;
189 | }
190 | }
191 | else {
192 | //no need to shift code sets, a temporary SHIFT will suffice
193 | shifter = SET_SHIFT;
194 | }
195 | }
196 |
197 | //ok some type of shift is nessecary
198 | if (shifter != -1) {
199 | result.push(shifter);
200 | result.push(codeValue(chr2));
201 | }
202 | else {
203 | if (currcs == CODESET.C) {
204 | //include next as well
205 | result.push(codeValue(chr1, chr2));
206 | }
207 | else {
208 | result.push(codeValue(chr1));
209 | }
210 | }
211 | barc.currcs = currcs;
212 |
213 | return result;
214 | }
215 | }
216 |
217 | //reduce the ascii code to fit into the Code128 char table
218 | function codeValue(chr1, chr2) {
219 | if (typeof chr2 == "undefined") {
220 | return chr1 >= 32 ? chr1 - 32 : chr1 + 64;
221 | }
222 | else {
223 | return parseInt(String.fromCharCode(chr1) + String.fromCharCode(chr2));
224 | }
225 | }
226 |
227 | function charCompatible(chr, codeset) {
228 | var csa = codeSetAllowedFor(chr);
229 | if (csa == CODESET.ANY) return true;
230 | //if we need to change from current
231 | if (csa == CODESET.AB) return true;
232 | if (csa == CODESET.A && codeset == CODESET.A) return true;
233 | if (csa == CODESET.B && codeset == CODESET.B) return true;
234 | return false;
235 | }
236 |
237 | function codeSetAllowedFor(chr) {
238 | if (chr >= 48 && chr <= 57) {
239 | //0-9
240 | return CODESET.ANY;
241 | }
242 | else if (chr >= 32 && chr <= 95) {
243 | //0-9 A-Z
244 | return CODESET.AB;
245 | }
246 | else {
247 | //if non printable
248 | return chr < 32 ? CODESET.A : CODESET.B;
249 | }
250 | }
251 |
252 | var Graphics = function(ctx, width, height) {
253 |
254 | this.width = width;
255 | this.height = height;
256 | this.quiet = Math.round(this.width / 40);
257 |
258 | this.border_size = 0;
259 | this.padding_width = 0;
260 |
261 | this.area = {
262 | width : width - this.padding_width * 2 - this.quiet * 2,
263 | height: height - this.border_size * 2,
264 | top : this.border_size - 4,
265 | left : this.padding_width + this.quiet
266 | };
267 |
268 | this.ctx = ctx;
269 | this.fg = "#000000";
270 | this.bg = "#ffffff";
271 |
272 | // fill background
273 | this.fillBgRect(0,0, width, height);
274 |
275 | // fill center to create border
276 | this.fillBgRect(0, this.border_size, width, height - this.border_size * 2);
277 | }
278 |
279 | //use native color
280 | Graphics.prototype._fillRect = function(x, y, width, height, color) {
281 | this.ctx.setFillStyle(color)
282 | this.ctx.fillRect(x, y, width, height)
283 | }
284 |
285 | Graphics.prototype.fillFgRect = function(x,y, width, height) {
286 | this._fillRect(x, y, width, height, this.fg);
287 | }
288 |
289 | Graphics.prototype.fillBgRect = function(x,y, width, height) {
290 | this._fillRect(x, y, width, height, this.bg);
291 | }
292 |
293 | var PATTERNS = [
294 | [2, 1, 2, 2, 2, 2, 0, 0], // 0
295 | [2, 2, 2, 1, 2, 2, 0, 0], // 1
296 | [2, 2, 2, 2, 2, 1, 0, 0], // 2
297 | [1, 2, 1, 2, 2, 3, 0, 0], // 3
298 | [1, 2, 1, 3, 2, 2, 0, 0], // 4
299 | [1, 3, 1, 2, 2, 2, 0, 0], // 5
300 | [1, 2, 2, 2, 1, 3, 0, 0], // 6
301 | [1, 2, 2, 3, 1, 2, 0, 0], // 7
302 | [1, 3, 2, 2, 1, 2, 0, 0], // 8
303 | [2, 2, 1, 2, 1, 3, 0, 0], // 9
304 | [2, 2, 1, 3, 1, 2, 0, 0], // 10
305 | [2, 3, 1, 2, 1, 2, 0, 0], // 11
306 | [1, 1, 2, 2, 3, 2, 0, 0], // 12
307 | [1, 2, 2, 1, 3, 2, 0, 0], // 13
308 | [1, 2, 2, 2, 3, 1, 0, 0], // 14
309 | [1, 1, 3, 2, 2, 2, 0, 0], // 15
310 | [1, 2, 3, 1, 2, 2, 0, 0], // 16
311 | [1, 2, 3, 2, 2, 1, 0, 0], // 17
312 | [2, 2, 3, 2, 1, 1, 0, 0], // 18
313 | [2, 2, 1, 1, 3, 2, 0, 0], // 19
314 | [2, 2, 1, 2, 3, 1, 0, 0], // 20
315 | [2, 1, 3, 2, 1, 2, 0, 0], // 21
316 | [2, 2, 3, 1, 1, 2, 0, 0], // 22
317 | [3, 1, 2, 1, 3, 1, 0, 0], // 23
318 | [3, 1, 1, 2, 2, 2, 0, 0], // 24
319 | [3, 2, 1, 1, 2, 2, 0, 0], // 25
320 | [3, 2, 1, 2, 2, 1, 0, 0], // 26
321 | [3, 1, 2, 2, 1, 2, 0, 0], // 27
322 | [3, 2, 2, 1, 1, 2, 0, 0], // 28
323 | [3, 2, 2, 2, 1, 1, 0, 0], // 29
324 | [2, 1, 2, 1, 2, 3, 0, 0], // 30
325 | [2, 1, 2, 3, 2, 1, 0, 0], // 31
326 | [2, 3, 2, 1, 2, 1, 0, 0], // 32
327 | [1, 1, 1, 3, 2, 3, 0, 0], // 33
328 | [1, 3, 1, 1, 2, 3, 0, 0], // 34
329 | [1, 3, 1, 3, 2, 1, 0, 0], // 35
330 | [1, 1, 2, 3, 1, 3, 0, 0], // 36
331 | [1, 3, 2, 1, 1, 3, 0, 0], // 37
332 | [1, 3, 2, 3, 1, 1, 0, 0], // 38
333 | [2, 1, 1, 3, 1, 3, 0, 0], // 39
334 | [2, 3, 1, 1, 1, 3, 0, 0], // 40
335 | [2, 3, 1, 3, 1, 1, 0, 0], // 41
336 | [1, 1, 2, 1, 3, 3, 0, 0], // 42
337 | [1, 1, 2, 3, 3, 1, 0, 0], // 43
338 | [1, 3, 2, 1, 3, 1, 0, 0], // 44
339 | [1, 1, 3, 1, 2, 3, 0, 0], // 45
340 | [1, 1, 3, 3, 2, 1, 0, 0], // 46
341 | [1, 3, 3, 1, 2, 1, 0, 0], // 47
342 | [3, 1, 3, 1, 2, 1, 0, 0], // 48
343 | [2, 1, 1, 3, 3, 1, 0, 0], // 49
344 | [2, 3, 1, 1, 3, 1, 0, 0], // 50
345 | [2, 1, 3, 1, 1, 3, 0, 0], // 51
346 | [2, 1, 3, 3, 1, 1, 0, 0], // 52
347 | [2, 1, 3, 1, 3, 1, 0, 0], // 53
348 | [3, 1, 1, 1, 2, 3, 0, 0], // 54
349 | [3, 1, 1, 3, 2, 1, 0, 0], // 55
350 | [3, 3, 1, 1, 2, 1, 0, 0], // 56
351 | [3, 1, 2, 1, 1, 3, 0, 0], // 57
352 | [3, 1, 2, 3, 1, 1, 0, 0], // 58
353 | [3, 3, 2, 1, 1, 1, 0, 0], // 59
354 | [3, 1, 4, 1, 1, 1, 0, 0], // 60
355 | [2, 2, 1, 4, 1, 1, 0, 0], // 61
356 | [4, 3, 1, 1, 1, 1, 0, 0], // 62
357 | [1, 1, 1, 2, 2, 4, 0, 0], // 63
358 | [1, 1, 1, 4, 2, 2, 0, 0], // 64
359 | [1, 2, 1, 1, 2, 4, 0, 0], // 65
360 | [1, 2, 1, 4, 2, 1, 0, 0], // 66
361 | [1, 4, 1, 1, 2, 2, 0, 0], // 67
362 | [1, 4, 1, 2, 2, 1, 0, 0], // 68
363 | [1, 1, 2, 2, 1, 4, 0, 0], // 69
364 | [1, 1, 2, 4, 1, 2, 0, 0], // 70
365 | [1, 2, 2, 1, 1, 4, 0, 0], // 71
366 | [1, 2, 2, 4, 1, 1, 0, 0], // 72
367 | [1, 4, 2, 1, 1, 2, 0, 0], // 73
368 | [1, 4, 2, 2, 1, 1, 0, 0], // 74
369 | [2, 4, 1, 2, 1, 1, 0, 0], // 75
370 | [2, 2, 1, 1, 1, 4, 0, 0], // 76
371 | [4, 1, 3, 1, 1, 1, 0, 0], // 77
372 | [2, 4, 1, 1, 1, 2, 0, 0], // 78
373 | [1, 3, 4, 1, 1, 1, 0, 0], // 79
374 | [1, 1, 1, 2, 4, 2, 0, 0], // 80
375 | [1, 2, 1, 1, 4, 2, 0, 0], // 81
376 | [1, 2, 1, 2, 4, 1, 0, 0], // 82
377 | [1, 1, 4, 2, 1, 2, 0, 0], // 83
378 | [1, 2, 4, 1, 1, 2, 0, 0], // 84
379 | [1, 2, 4, 2, 1, 1, 0, 0], // 85
380 | [4, 1, 1, 2, 1, 2, 0, 0], // 86
381 | [4, 2, 1, 1, 1, 2, 0, 0], // 87
382 | [4, 2, 1, 2, 1, 1, 0, 0], // 88
383 | [2, 1, 2, 1, 4, 1, 0, 0], // 89
384 | [2, 1, 4, 1, 2, 1, 0, 0], // 90
385 | [4, 1, 2, 1, 2, 1, 0, 0], // 91
386 | [1, 1, 1, 1, 4, 3, 0, 0], // 92
387 | [1, 1, 1, 3, 4, 1, 0, 0], // 93
388 | [1, 3, 1, 1, 4, 1, 0, 0], // 94
389 | [1, 1, 4, 1, 1, 3, 0, 0], // 95
390 | [1, 1, 4, 3, 1, 1, 0, 0], // 96
391 | [4, 1, 1, 1, 1, 3, 0, 0], // 97
392 | [4, 1, 1, 3, 1, 1, 0, 0], // 98
393 | [1, 1, 3, 1, 4, 1, 0, 0], // 99
394 | [1, 1, 4, 1, 3, 1, 0, 0], // 100
395 | [3, 1, 1, 1, 4, 1, 0, 0], // 101
396 | [4, 1, 1, 1, 3, 1, 0, 0], // 102
397 | [2, 1, 1, 4, 1, 2, 0, 0], // 103
398 | [2, 1, 1, 2, 1, 4, 0, 0], // 104
399 | [2, 1, 1, 2, 3, 2, 0, 0], // 105
400 | [2, 3, 3, 1, 1, 1, 2, 0] // 106
401 | ]
402 |
403 |
--------------------------------------------------------------------------------