├── README.md ├── app.js ├── app.json ├── app.wxss ├── images ├── core │ ├── bx.png │ ├── bx │ │ ├── bx_accepted.png │ │ ├── bx_dispatched.png │ │ ├── bx_finished.png │ │ ├── bx_refused.png │ │ └── bx_waited.png │ ├── bx@disabled.png │ ├── cet.png │ ├── cet@disabled.png │ ├── cj.png │ ├── cj@disabled.png │ ├── close.png │ ├── common │ │ ├── down.png │ │ ├── down_w.png │ │ ├── left_g.png │ │ ├── right_g.png │ │ └── up.png │ ├── fail.png │ ├── fw.png │ ├── fw │ │ └── fw-logo.png │ ├── fw1.png │ ├── fw@disabled.png │ ├── jy.png │ ├── jy │ │ ├── green.png │ │ ├── purple.png │ │ ├── red.png │ │ └── yellow.png │ ├── jy@disabled.png │ ├── kb.png │ ├── kb@disabled.png │ ├── kjs.png │ ├── kjs │ │ ├── building-icon.png │ │ ├── classTime-icon.png │ │ ├── classroom-icon.png │ │ ├── day-icon.png │ │ └── week-icon.png │ ├── kjs@disabled.png │ ├── ks.png │ ├── ks@disabled.png │ ├── sdf.png │ ├── sdf │ │ └── sdf-bg.png │ ├── sdf@disabled.png │ ├── xf.png │ ├── xf@disabled.png │ ├── xs.png │ ├── xs │ │ ├── clear.png │ │ └── search-sign.png │ ├── xs@disabled.png │ ├── ykt.png │ ├── ykt │ │ └── card-bg.png │ └── ykt@disabled.png ├── index │ ├── index.png │ ├── index@active.png │ ├── jy-bg.png │ ├── jy-book.png │ ├── kb-bg.png │ ├── loading.gif │ ├── more.png │ ├── more@active.png │ ├── news.png │ ├── news@active.png │ ├── nothing.png │ ├── sdf-bg.png │ ├── tri.png │ └── ykt-bg.png ├── more │ ├── about.png │ ├── append.png │ ├── close.png │ ├── enter.png │ ├── help.png │ ├── issue.png │ ├── lanshan.png │ ├── logo.png │ ├── title.png │ └── wave.png └── news │ ├── all.png │ ├── all@colour.png │ ├── all@gray.png │ ├── file.png │ ├── hy.png │ ├── hy@colour.png │ ├── hy@gray.png │ ├── jw.png │ ├── jw@colour.png │ ├── jw@gray.png │ ├── jz.png │ ├── jz@colour.png │ ├── jz@gray.png │ ├── new.png │ ├── new@colour.png │ ├── new@gray.png │ ├── oa.png │ ├── oa@colour.png │ └── oa@gray.png ├── pages ├── core │ ├── bx │ │ ├── bx.js │ │ ├── bx.json │ │ ├── bx.wxml │ │ ├── bx.wxss │ │ ├── bx_apply.js │ │ ├── bx_apply.json │ │ ├── bx_apply.wxml │ │ ├── bx_apply.wxss │ │ ├── bx_detail.js │ │ ├── bx_detail.json │ │ ├── bx_detail.wxml │ │ └── bx_detail.wxss │ ├── cet │ │ ├── cet.js │ │ ├── cet.json │ │ ├── cet.wxml │ │ ├── cet.wxss │ │ ├── result.js │ │ ├── result.json │ │ ├── result.wxml │ │ └── result.wxss │ ├── cj │ │ ├── cj.js │ │ ├── cj.json │ │ ├── cj.wxml │ │ └── cj.wxss │ ├── fw │ │ ├── fw.js │ │ ├── fw.json │ │ ├── fw.wxml │ │ └── fw.wxss │ ├── jy │ │ ├── jy.js │ │ ├── jy.json │ │ ├── jy.wxml │ │ └── jy.wxss │ ├── kb │ │ ├── kb.js │ │ ├── kb.json │ │ ├── kb.wxml │ │ └── kb.wxss │ ├── kjs │ │ ├── kjs.js │ │ ├── kjs.json │ │ ├── kjs.wxml │ │ └── kjs.wxss │ ├── ks │ │ ├── ks.js │ │ ├── ks.json │ │ ├── ks.wxml │ │ └── ks.wxss │ ├── sdf │ │ ├── sdf.js │ │ ├── sdf.json │ │ ├── sdf.wxml │ │ └── sdf.wxss │ ├── xf │ │ ├── xf.js │ │ ├── xf.json │ │ ├── xf.wxml │ │ └── xf.wxss │ ├── xs │ │ ├── xs.js │ │ ├── xs.json │ │ ├── xs.wxml │ │ └── xs.wxss │ └── ykt │ │ ├── ykt.js │ │ ├── ykt.json │ │ ├── ykt.wxml │ │ └── ykt.wxss ├── index │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── more │ ├── about.js │ ├── about.json │ ├── about.wxml │ ├── about.wxss │ ├── append.js │ ├── append.json │ ├── append.wxml │ ├── append.wxss │ ├── help │ │ ├── volunteerHelp.js │ │ ├── volunteerHelp.json │ │ ├── volunteerHelp.wxml │ │ └── volunteerHelp.wxss │ ├── issues.js │ ├── issues.json │ ├── issues.wxml │ ├── issues.wxss │ ├── login.js │ ├── login.json │ ├── login.wxml │ ├── login.wxss │ ├── more.js │ ├── more.json │ ├── more.wxml │ └── more.wxss └── news │ ├── detail │ ├── detail.js │ ├── detail.wxml │ └── detail.wxss │ ├── hy │ ├── hy_detail.js │ ├── hy_detail.json │ ├── hy_detail.wxml │ └── hy_detail.wxss │ ├── jw │ ├── jw_detail.js │ ├── jw_detail.json │ ├── jw_detail.wxml │ └── jw_detail.wxss │ ├── jz │ ├── jz_detail.js │ ├── jz_detail.json │ ├── jz_detail.wxml │ └── jz_detail.wxss │ ├── new │ ├── new_detail.js │ ├── new_detail.json │ ├── new_detail.wxml │ └── new_detail.wxss │ ├── news.js │ ├── news.json │ ├── news.wxml │ ├── news.wxss │ └── oa │ ├── oa_detail.js │ ├── oa_detail.json │ ├── oa_detail.wxml │ └── oa_detail.wxss ├── project.config.json └── utils ├── base64.min.js ├── md5.min.js └── util.js /README.md: -------------------------------------------------------------------------------- 1 | # ihut 2 | i湖工大小程序 是碎片化、一站式、一体化校园移动门户,适用于学生和教师,集课表、成绩、考试、空教室、学生查询、一卡通、借阅、学费、电费、报修、资讯等各功能于一身。 3 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages":[ 3 | "pages/index/index", 4 | "pages/news/news", 5 | "pages/news/jw/jw_detail", 6 | "pages/news/oa/oa_detail", 7 | "pages/news/hy/hy_detail", 8 | "pages/news/jz/jz_detail", 9 | "pages/news/new/new_detail", 10 | "pages/more/login", 11 | "pages/more/append", 12 | "pages/more/more", 13 | "pages/more/issues", 14 | "pages/more/about", 15 | "pages/core/kb/kb", 16 | "pages/core/cj/cj", 17 | "pages/core/ks/ks", 18 | "pages/core/kjs/kjs", 19 | "pages/core/xs/xs", 20 | "pages/core/ykt/ykt", 21 | "pages/core/jy/jy", 22 | "pages/core/xf/xf", 23 | "pages/core/sdf/sdf", 24 | "pages/core/bx/bx", 25 | "pages/core/bx/bx_apply", 26 | "pages/core/bx/bx_detail", 27 | "pages/core/cet/cet", 28 | "pages/core/cet/result", 29 | "pages/core/fw/fw", 30 | "pages/more/help/volunteerHelp" 31 | ], 32 | "window": { 33 | "navigationBarBackgroundColor": "#7acfa6", 34 | "navigationBarTextStyle": "white", 35 | "navigationBarTitleText": "i湖工大", 36 | "backgroundColor": "#7acfa6", 37 | "backgroundTextStyle": "light", 38 | "enablePullDownRefresh": true 39 | }, 40 | "tabBar": { 41 | "color": "#7f848a", 42 | "selectedColor": "#7acfa6", 43 | "backgroundColor": "#f7f6fb", 44 | "list": [ 45 | { 46 | "pagePath": "pages/index/index", 47 | "text": "首页", 48 | "iconPath": "images/index/index.png", 49 | "selectedIconPath": "images/index/index@active.png" 50 | }, 51 | { 52 | "pagePath": "pages/news/news", 53 | "text": "资讯", 54 | "iconPath": "images/index/news.png", 55 | "selectedIconPath": "images/index/news@active.png" 56 | }, 57 | { 58 | "pagePath": "pages/more/more", 59 | "text": "更多", 60 | "iconPath": "images/index/more.png", 61 | "selectedIconPath": "images/index/more@active.png" 62 | } 63 | ] 64 | }, 65 | "networkTimeout": { 66 | "request": 20000, 67 | "uploadFile": 30000, 68 | "downloadFile": 30000 69 | } 70 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss*/ 2 | page{ 3 | font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif; 4 | font-size: 10pt; 5 | line-height: 150%; 6 | color: #666; 7 | min-height: 100%; 8 | position: relative; 9 | display: flex; 10 | flex-direction: column; 11 | align-items: stretch; 12 | } 13 | 14 | .container { 15 | position: relative; 16 | flex: 1; 17 | display: flex; 18 | flex-direction: column; 19 | min-height: 100%; 20 | padding-bottom: 100rpx; 21 | box-sizing: border-box; 22 | } 23 | 24 | .remind-box { 25 | flex: 1; 26 | display: flex; 27 | flex-direction: column; 28 | align-items: center; 29 | justify-content: center; 30 | padding-bottom: 300rpx; 31 | } 32 | 33 | .remind-img { 34 | width: 250rpx; 35 | height: 250rpx; 36 | padding-bottom: 25rpx; 37 | } 38 | 39 | .remind-text { 40 | font-size: 12pt; 41 | line-height: 150%; 42 | } 43 | 44 | .remind-btn { 45 | margin-top: 20rpx; 46 | font-size: 9pt; 47 | padding: 5rpx 20rpx; 48 | text-align: center; 49 | background-color: #7acfa6; 50 | border-radius: 3px; 51 | border-bottom: 2px solid #4fc08d; 52 | color: #fff; 53 | } 54 | 55 | .fix_tip{ 56 | position: fixed; 57 | bottom: 50rpx; 58 | left: 0; 59 | width: 100%; 60 | text-align: center; 61 | opacity: 0; 62 | transform: translate3d(0, 80rpx, 0); 63 | transition: all .5s cubic-bezier(0.19, 1, 0.22, 1) 64 | } 65 | 66 | .fix_tip.active{ 67 | opacity: 1; 68 | transform: translate3d(0, 0, 0); 69 | } 70 | 71 | .fix_tip text{ 72 | font-size: 9pt; 73 | line-height: 100%; 74 | padding: 10rpx 20rpx; 75 | border-radius: 10rpx; 76 | background: rgba(66,66,66,.6); 77 | color: #fff; 78 | } 79 | 80 | .lanshan-studio{ 81 | position: absolute; 82 | left: 0; 83 | right: 0; 84 | bottom: 0; 85 | width: 100%; 86 | font-size: 9pt; 87 | line-height: 100%; 88 | padding: 9pt 0; 89 | text-align: center; 90 | opacity: 0.15; 91 | } -------------------------------------------------------------------------------- /images/core/bx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/bx.png -------------------------------------------------------------------------------- /images/core/bx/bx_accepted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/bx/bx_accepted.png -------------------------------------------------------------------------------- /images/core/bx/bx_dispatched.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/bx/bx_dispatched.png -------------------------------------------------------------------------------- /images/core/bx/bx_finished.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/bx/bx_finished.png -------------------------------------------------------------------------------- /images/core/bx/bx_refused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/bx/bx_refused.png -------------------------------------------------------------------------------- /images/core/bx/bx_waited.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/bx/bx_waited.png -------------------------------------------------------------------------------- /images/core/bx@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/bx@disabled.png -------------------------------------------------------------------------------- /images/core/cet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/cet.png -------------------------------------------------------------------------------- /images/core/cet@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/cet@disabled.png -------------------------------------------------------------------------------- /images/core/cj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/cj.png -------------------------------------------------------------------------------- /images/core/cj@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/cj@disabled.png -------------------------------------------------------------------------------- /images/core/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/close.png -------------------------------------------------------------------------------- /images/core/common/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/common/down.png -------------------------------------------------------------------------------- /images/core/common/down_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/common/down_w.png -------------------------------------------------------------------------------- /images/core/common/left_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/common/left_g.png -------------------------------------------------------------------------------- /images/core/common/right_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/common/right_g.png -------------------------------------------------------------------------------- /images/core/common/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/common/up.png -------------------------------------------------------------------------------- /images/core/fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/fail.png -------------------------------------------------------------------------------- /images/core/fw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/fw.png -------------------------------------------------------------------------------- /images/core/fw/fw-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/fw/fw-logo.png -------------------------------------------------------------------------------- /images/core/fw1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/fw1.png -------------------------------------------------------------------------------- /images/core/fw@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/fw@disabled.png -------------------------------------------------------------------------------- /images/core/jy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/jy.png -------------------------------------------------------------------------------- /images/core/jy/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/jy/green.png -------------------------------------------------------------------------------- /images/core/jy/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/jy/purple.png -------------------------------------------------------------------------------- /images/core/jy/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/jy/red.png -------------------------------------------------------------------------------- /images/core/jy/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/jy/yellow.png -------------------------------------------------------------------------------- /images/core/jy@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/jy@disabled.png -------------------------------------------------------------------------------- /images/core/kb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kb.png -------------------------------------------------------------------------------- /images/core/kb@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kb@disabled.png -------------------------------------------------------------------------------- /images/core/kjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kjs.png -------------------------------------------------------------------------------- /images/core/kjs/building-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kjs/building-icon.png -------------------------------------------------------------------------------- /images/core/kjs/classTime-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kjs/classTime-icon.png -------------------------------------------------------------------------------- /images/core/kjs/classroom-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kjs/classroom-icon.png -------------------------------------------------------------------------------- /images/core/kjs/day-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kjs/day-icon.png -------------------------------------------------------------------------------- /images/core/kjs/week-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kjs/week-icon.png -------------------------------------------------------------------------------- /images/core/kjs@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/kjs@disabled.png -------------------------------------------------------------------------------- /images/core/ks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/ks.png -------------------------------------------------------------------------------- /images/core/ks@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/ks@disabled.png -------------------------------------------------------------------------------- /images/core/sdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/sdf.png -------------------------------------------------------------------------------- /images/core/sdf/sdf-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/sdf/sdf-bg.png -------------------------------------------------------------------------------- /images/core/sdf@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/sdf@disabled.png -------------------------------------------------------------------------------- /images/core/xf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/xf.png -------------------------------------------------------------------------------- /images/core/xf@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/xf@disabled.png -------------------------------------------------------------------------------- /images/core/xs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/xs.png -------------------------------------------------------------------------------- /images/core/xs/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/xs/clear.png -------------------------------------------------------------------------------- /images/core/xs/search-sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/xs/search-sign.png -------------------------------------------------------------------------------- /images/core/xs@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/xs@disabled.png -------------------------------------------------------------------------------- /images/core/ykt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/ykt.png -------------------------------------------------------------------------------- /images/core/ykt/card-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/ykt/card-bg.png -------------------------------------------------------------------------------- /images/core/ykt@disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/core/ykt@disabled.png -------------------------------------------------------------------------------- /images/index/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/index.png -------------------------------------------------------------------------------- /images/index/index@active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/index@active.png -------------------------------------------------------------------------------- /images/index/jy-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/jy-bg.png -------------------------------------------------------------------------------- /images/index/jy-book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/jy-book.png -------------------------------------------------------------------------------- /images/index/kb-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/kb-bg.png -------------------------------------------------------------------------------- /images/index/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/loading.gif -------------------------------------------------------------------------------- /images/index/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/more.png -------------------------------------------------------------------------------- /images/index/more@active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/more@active.png -------------------------------------------------------------------------------- /images/index/news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/news.png -------------------------------------------------------------------------------- /images/index/news@active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/news@active.png -------------------------------------------------------------------------------- /images/index/nothing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/nothing.png -------------------------------------------------------------------------------- /images/index/sdf-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/sdf-bg.png -------------------------------------------------------------------------------- /images/index/tri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/tri.png -------------------------------------------------------------------------------- /images/index/ykt-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/index/ykt-bg.png -------------------------------------------------------------------------------- /images/more/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/about.png -------------------------------------------------------------------------------- /images/more/append.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/append.png -------------------------------------------------------------------------------- /images/more/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/close.png -------------------------------------------------------------------------------- /images/more/enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/enter.png -------------------------------------------------------------------------------- /images/more/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/help.png -------------------------------------------------------------------------------- /images/more/issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/issue.png -------------------------------------------------------------------------------- /images/more/lanshan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/lanshan.png -------------------------------------------------------------------------------- /images/more/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/logo.png -------------------------------------------------------------------------------- /images/more/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/title.png -------------------------------------------------------------------------------- /images/more/wave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/more/wave.png -------------------------------------------------------------------------------- /images/news/all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/all.png -------------------------------------------------------------------------------- /images/news/all@colour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/all@colour.png -------------------------------------------------------------------------------- /images/news/all@gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/all@gray.png -------------------------------------------------------------------------------- /images/news/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/file.png -------------------------------------------------------------------------------- /images/news/hy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/hy.png -------------------------------------------------------------------------------- /images/news/hy@colour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/hy@colour.png -------------------------------------------------------------------------------- /images/news/hy@gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/hy@gray.png -------------------------------------------------------------------------------- /images/news/jw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/jw.png -------------------------------------------------------------------------------- /images/news/jw@colour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/jw@colour.png -------------------------------------------------------------------------------- /images/news/jw@gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/jw@gray.png -------------------------------------------------------------------------------- /images/news/jz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/jz.png -------------------------------------------------------------------------------- /images/news/jz@colour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/jz@colour.png -------------------------------------------------------------------------------- /images/news/jz@gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/jz@gray.png -------------------------------------------------------------------------------- /images/news/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/new.png -------------------------------------------------------------------------------- /images/news/new@colour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/new@colour.png -------------------------------------------------------------------------------- /images/news/new@gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/new@gray.png -------------------------------------------------------------------------------- /images/news/oa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/oa.png -------------------------------------------------------------------------------- /images/news/oa@colour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/oa@colour.png -------------------------------------------------------------------------------- /images/news/oa@gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morge007/ihut/34bd6358da1a9c1bca70a42105a7a08689348877/images/news/oa@gray.png -------------------------------------------------------------------------------- /pages/core/bx/bx.js: -------------------------------------------------------------------------------- 1 | //bx.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | count: '-', 8 | list: [], 9 | process_state: { 10 | '未审核': 'waited', 11 | '未受理': 'waited', 12 | '已受理': 'accepted', 13 | '已派出': 'dispatched', 14 | '已完工': 'finished', 15 | '驳回': 'refused' 16 | } 17 | }, 18 | //下拉更新 19 | onPullDownRefresh: function () { 20 | this.getData(); 21 | }, 22 | onLoad: function () { 23 | this.getData(); 24 | }, 25 | getData: function () { 26 | var that = this; 27 | if (!app._user.we.ykth) { 28 | that.setData({ 29 | remind: '未绑定' 30 | }); 31 | return false; 32 | } 33 | // 发送请求 34 | wx.request({ 35 | url: app._server + "/api/bx/get_repair_list.php", 36 | method: 'POST', 37 | data: app.key({ 38 | openid: app._user.openid, 39 | "yktID": app._user.we.ykth 40 | }), 41 | success: function (res) { 42 | 43 | if (res.data && res.data.status === 200) { 44 | var list = res.data.data; 45 | if (!list || !list.length) { 46 | that.setData({ 47 | 'remind': '无申报记录' 48 | }); 49 | } else { 50 | for (var i = 0, len = list.length; i < len; i++) { 51 | list[i].state = that.data.process_state[list[i].wx_wxztm]; 52 | list[i].wx_bt = that.convertHtmlToText(list[i].wx_bt).replace(/[\r|\n]/g, ""); 53 | } 54 | that.setData({ 55 | 'list': list, 56 | 'count': len, 57 | 'remind': '' 58 | }); 59 | } 60 | } else { 61 | that.setData({ 62 | remind: res.data.message || '未知错误', 63 | 'count': 0 64 | }); 65 | } 66 | }, 67 | fail: function (res) { 68 | app.showErrorModal(res.errMsg); 69 | that.setData({ 70 | remind: '网络错误', 71 | 'count': 0 72 | }); 73 | }, 74 | complete: function () { 75 | wx.stopPullDownRefresh(); 76 | } 77 | }); 78 | }, 79 | convertHtmlToText: function (inputText) { 80 | var returnText = "" + inputText; 81 | returnText = returnText.replace(/<\/?[^>]*>/g, '').replace(/[ | ]*\n/g, '\n').replace(/ /ig, '') 82 | .replace(/&mdash/gi, '-').replace(/&ldquo/gi, '“').replace(/&rdquo/gi, '”'); 83 | return returnText; 84 | } 85 | }); -------------------------------------------------------------------------------- /pages/core/bx/bx.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "物业报修" 3 | } -------------------------------------------------------------------------------- /pages/core/bx/bx.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 申报入口 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{remind}} 14 | 15 | 16 | 17 | 申报记录({{count}}条) 18 | 19 | 20 | 21 | 22 | 23 | {{item.wx_bt}} 24 | 25 | 26 | {{item.wx_wxztm}} 27 | 28 | 29 | 30 | 31 | 32 | 服务类型 33 | 34 | 35 | {{item.wx_bxlxm}} 36 | 37 | 38 | 39 | 40 | 报修时间 41 | 42 | 43 | {{item.wx_bxsj}} 44 | 45 | 46 | 47 | 48 | 响应时间 49 | 50 | 51 | {{item.xysj=='120分钟以上响应'?'未响应':item.xysj}} 52 | 53 | 54 | 55 | 56 | 57 | 详情 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /pages/core/bx/bx.wxss: -------------------------------------------------------------------------------- 1 | /**bx.wxss**/ 2 | .container{ 3 | background-color: #f7f7f7; 4 | padding-top: 200rpx; 5 | } 6 | .service-nav{ 7 | position: fixed; 8 | top: 0; 9 | left: 0; 10 | right: 0; 11 | width: 100%; 12 | display: flex; 13 | background: #fff; 14 | background: rgba(255,255,255,.9); 15 | border-bottom: 1rpx solid #eee; 16 | margin-bottom: 10rpx; 17 | } 18 | .service-nav-item { 19 | display: flex; 20 | flex-direction: column; 21 | justify-content: center; 22 | font-size: 11pt; 23 | line-height: 150%; 24 | height: 160rpx; 25 | padding: 20rpx; 26 | border-right: 1rpx solid #eee; 27 | } 28 | .service-apply-btn{ 29 | flex: 1; 30 | flex-direction: row; 31 | align-items: center; 32 | font-size: 25pt; 33 | font-weight: bold; 34 | color: #7acfa6; 35 | background: rgba(122,207,166,.1); 36 | } 37 | .service-apply-btn:active{ 38 | background: #fff; 39 | } 40 | .service-nav-hd { 41 | color: #777; 42 | } 43 | .service-nav-bd { 44 | display: flex; 45 | justify-content: center; 46 | } 47 | .service-nav-value { 48 | font-size: 30pt; 49 | color: #7acfa6; 50 | font-weight: bold; 51 | line-height: 150%; 52 | padding: 0 20rpx 0 30rpx; 53 | } 54 | .service-apply-icon{ 55 | flex-shrink: 0; 56 | width: 100rpx; 57 | height: 100rpx; 58 | margin-right: 15rpx; 59 | } 60 | 61 | .service-process-title{ 62 | color: #888; 63 | padding: 20rpx 20rpx 15rpx; 64 | } 65 | .process{ 66 | display: flex; 67 | flex-direction: column; 68 | background-color: #fff; 69 | border-top: 1px solid #eee; 70 | border-bottom: 1px solid #eee; 71 | margin-bottom: 20rpx; 72 | } 73 | .process-hd{ 74 | display: flex; 75 | align-items: center; 76 | height: 100rpx; 77 | font-size: 11pt; 78 | margin-left: 30rpx; 79 | border-bottom: 1px solid #eee; 80 | } 81 | .review-process-icon{ 82 | flex-shrink: 0; 83 | width: 45rpx; 84 | height: 45rpx; 85 | margin-right: 15rpx; 86 | } 87 | .order-number-name{ 88 | flex: 1 1 auto; 89 | white-space: nowrap; 90 | text-overflow: ellipsis; 91 | overflow: hidden; 92 | } 93 | .process-state{ 94 | flex-shrink: 0; 95 | display: flex; 96 | align-items: center; 97 | justify-content: flex-end; 98 | padding-right: 30rpx; 99 | font-weight: bold; 100 | } 101 | .process-state-waited{ 102 | color: #ffcb63; 103 | } 104 | .process-state-accepted{ 105 | color: #73b4ef; 106 | } 107 | .process-state-dispatched{ 108 | color: #e78ab0; 109 | } 110 | .process-state-finished{ 111 | color: #9f8bea; 112 | } 113 | .process-state-refused{ 114 | color: #999; 115 | } 116 | .process-bd{ 117 | padding: 10rpx 30rpx; 118 | } 119 | .process-item{ 120 | display: flex; 121 | justify-content: space-between; 122 | margin: 20rpx 5rpx; 123 | } 124 | .process-item-bd{ 125 | display:flex; 126 | } 127 | .process-item-ft{ 128 | display: flex; 129 | } 130 | .service-detail-open{ 131 | display: flex; 132 | align-items: center; 133 | justify-content: center; 134 | text-align: center; 135 | padding: 25rpx; 136 | border-top: 1px solid #eee; 137 | color: #7acfa6; 138 | } -------------------------------------------------------------------------------- /pages/core/bx/bx_apply.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "报修申请", 3 | "enablePullDownRefresh": false 4 | } -------------------------------------------------------------------------------- /pages/core/bx/bx_apply.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{remind}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 服务类型 15 | 16 | 17 | 18 | 请选择服务类型 19 | {{serviceTypeRange[serviceTypeValue]}} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 服务项目 29 | 30 | 31 | 32 | 请先选择服务类型 33 | 请选择服务项目 34 | {{serviceObjectRange[serviceObjectValue]}} 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 服务区域 44 | 45 | 46 | 47 | 请选择服务区域 48 | {{serviceAreaRange[serviceAreaValue]}} 49 | 50 | 51 | 52 | 53 | 54 | 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 | -------------------------------------------------------------------------------- /pages/core/bx/bx_apply.wxss: -------------------------------------------------------------------------------- 1 | /**bx_apply.wxss**/ 2 | .container{ 3 | padding-bottom: 55rpx; 4 | background-color: #f7f7f7; 5 | } 6 | .repair-detail{ 7 | display: flex; 8 | flex-direction: column; 9 | background-color: #fff; 10 | border-top: 1px solid #eee; 11 | margin-top: 30rpx; 12 | overflow: hidden; 13 | } 14 | .repair-detail-item{ 15 | display: flex; 16 | flex-direction: column; 17 | border-bottom: 1px solid #ddd; 18 | } 19 | .repair-detail-item.error{ 20 | background: rgba(231, 138, 176, 0.06); 21 | } 22 | .repair-detail-item-hd{ 23 | display: flex; 24 | align-items: center; 25 | height: 88rpx; 26 | font-size: 11pt; 27 | margin-left: 30rpx; 28 | } 29 | .repair-detail-item-ft{ 30 | font-size: 10pt; 31 | flex: 1; 32 | display: flex; 33 | align-items: center; 34 | padding-right: 30rpx; 35 | } 36 | .repair-detail-picker { 37 | flex: 1; 38 | display: flex; 39 | align-items: center; 40 | justify-content: flex-end; 41 | } 42 | .repair-detail-content{ 43 | flex: 1; 44 | display: flex; 45 | align-items: center; 46 | justify-content: flex-end; 47 | padding: 20rpx 0; 48 | } 49 | .repair-detail-info { 50 | flex: 1; 51 | } 52 | .repair-detail-info.disabled{ 53 | color: #bbb; 54 | } 55 | .more-icon{ 56 | width: 18rpx; 57 | height: 27rpx; 58 | margin-left: 30rpx; 59 | } 60 | 61 | 62 | 63 | .reporter-detail{ 64 | display: flex; 65 | flex-direction: column; 66 | background-color: #fff; 67 | border-top: 1px solid #eee; 68 | border-bottom: 1px solid #eee; 69 | margin-top: 25rpx; 70 | overflow: hidden; 71 | } 72 | .reporter-detail-item{ 73 | display: flex; 74 | align-items: center; 75 | height: 88rpx; 76 | border-bottom: 1px solid #e5e5e5; 77 | padding-left: 30rpx; 78 | } 79 | .reporter-detail-item.error{ 80 | background: rgba(231, 138, 176, 0.06); 81 | } 82 | .reporter-detail-item.reporter-address { 83 | border: none; 84 | } 85 | .reporter-user .reporter-detail-input{ 86 | color: #999; 87 | } 88 | .reporter-detail-name{ 89 | font-size: 11pt; 90 | } 91 | .service-cells-items{ 92 | padding-left: 40rpx; 93 | padding-right: 40rpx; 94 | } 95 | .servcie-cell-item{ 96 | height: 70rpx; 97 | border-bottom: 1px solid #e5e5e5; 98 | display: flex; 99 | align-items: center; 100 | } 101 | .reporter-detail-input{ 102 | flex: 1; 103 | display: flex; 104 | align-items: center; 105 | justify-content: flex-end; 106 | padding-right: 30rpx; 107 | padding-left: 45rpx; 108 | } 109 | .reporter-detail-input input{ 110 | font-size: 10pt; 111 | width: 100%; 112 | } 113 | .input-placeholder { 114 | font-size: 10pt; 115 | } 116 | .declare-context{ 117 | display: flex; 118 | flex-direction: column; 119 | margin-top: 15rpx; 120 | overflow: hidden; 121 | } 122 | .declare-context-panel{ 123 | display: flex; 124 | flex-direction: column; 125 | align-items: stretch; 126 | background-color: #fff; 127 | border-top: 1px solid #eee; 128 | border-bottom: 1px solid #eee; 129 | } 130 | .declare-context-title{ 131 | color: #888; 132 | margin: 5rpx 0 10rpx 30rpx; 133 | } 134 | .declare-context-input { 135 | border-bottom: 1px solid #e5e5e5; 136 | height: 88rpx; 137 | padding: 0 30rpx; 138 | } 139 | .declare-context-input input{ 140 | height: 88rpx; 141 | } 142 | .declare-context-input.error{ 143 | background: rgba(231, 138, 176, 0.06); 144 | } 145 | .declare-context-textarea{ 146 | padding: 30rpx; 147 | width: 100%; 148 | min-height: 200rpx; 149 | box-sizing:border-box; 150 | } 151 | .declare-context-textarea.error{ 152 | background: rgba(231, 138, 176, 0.06); 153 | } 154 | .submit-declare{ 155 | display: flex; 156 | align-items: center; 157 | justify-content: center; 158 | margin: 40rpx 3%; 159 | height: 80rpx; 160 | border-radius: 3px; 161 | text-align: center; 162 | background-color: #7acfa6; 163 | color: #fff; 164 | font-size: 12pt; 165 | } 166 | .submit-declare:active{ 167 | opacity: .8; 168 | } -------------------------------------------------------------------------------- /pages/core/bx/bx_detail.js: -------------------------------------------------------------------------------- 1 | //bx_detail.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | detail: {}, //工单详情 8 | state: [] //处理详情(申请-审核-受理-派单-完工-驳回.倒序) 9 | }, 10 | //下拉更新 11 | onPullDownRefresh: function () { 12 | this.getData(); 13 | }, 14 | onLoad: function (options) { 15 | this.setData({ 16 | bxID: options.id 17 | }); 18 | this.getData(); 19 | }, 20 | getData: function () { 21 | var _this = this; 22 | if (!app._user.we.ykth || !_this.data.bxID) { 23 | _this.setData({ 24 | remind: '404' 25 | }); 26 | return false; 27 | } 28 | // 发送请求 29 | wx.request({ 30 | url: app._server + "/api/bx/get_repair_detail.php", 31 | method: 'POST', 32 | data: app.key({ 33 | openid: app._user.openid, 34 | "yktID": app._user.we.ykth, 35 | "bxID": _this.data.bxID 36 | }), 37 | success: function (res) { 38 | if (res.data && res.data.status === 200) { 39 | var info = res.data.data; 40 | //报修内容过滤标签 41 | info.wx_bt = _this.convertHtmlToText(info.wx_bt).replace(/[\r|\n]/g, ""); 42 | info.wx_bxnr = _this.convertHtmlToText(info.wx_bxnr); 43 | //处理详情 44 | var state = [{ 45 | 'type': 'refused', 46 | name: '驳回', 47 | status: info.wx_wxztm == '驳回', 48 | list: {} 49 | }, { 50 | 'type': 'finished', 51 | name: '完工', 52 | status: info.wx_wxztm == '已完工', 53 | list: { 54 | '用时': info.wx_ysfz + '分钟' 55 | } 56 | }, { 57 | 'type': 'dispatched', 58 | name: '派单', 59 | status: !!info.wx_wxgm.trim(), 60 | list: { 61 | '承修人': info.wx_wxgm 62 | } 63 | }, { 64 | 'type': 'accepted', 65 | name: '受理', 66 | status: !!info.wx_slr.trim(), 67 | list: { 68 | '受理人': info.wx_slr, 69 | '承修部门': info.wx_cxbmm, 70 | '响应时间': info.xysj == '120分钟以上响应' ? '未响应' : info.xysj 71 | } 72 | }, { 73 | 'type': 'waited', 74 | name: '审核', 75 | status: !!info.wx_shr.trim(), 76 | list: { 77 | '审核人': info.wx_shr 78 | } 79 | }, { 80 | 'type': 'waited', 81 | name: '申请', 82 | status: true, 83 | list: { 84 | '申请人': info.wx_bxr + ' (' + info.wx_bxrrzm + ')', 85 | '申报时间': info.wx_bxsj 86 | } 87 | }]; 88 | _this.setData({ 89 | 'detail': info, 90 | 'state': state.filter(function (e, i) { 91 | return e.status 92 | }), 93 | 'remind': '' 94 | }); 95 | } else { 96 | _this.setData({ 97 | remind: res.data.message || '未知错误' 98 | }); 99 | } 100 | }, 101 | fail: function (res) { 102 | app.showErrorModal(res.errMsg); 103 | _this.setData({ 104 | remind: '网络错误' 105 | }); 106 | }, 107 | complete: function () { 108 | wx.stopPullDownRefresh(); 109 | } 110 | }); 111 | }, 112 | convertHtmlToText: function (inputText) { 113 | var returnText = "" + inputText; 114 | returnText = returnText.replace(/<\/?[^>]*>/g, '').replace(/[ | ]*\n/g, '\n').replace(/ /ig, '') 115 | .replace(/&mdash/gi, '-').replace(/&ldquo/gi, '“').replace(/&rdquo/gi, '”'); 116 | return returnText; 117 | } 118 | }); -------------------------------------------------------------------------------- /pages/core/bx/bx_detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "报修详情" 3 | } -------------------------------------------------------------------------------- /pages/core/bx/bx_detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{remind}} 8 | 9 | 10 | 11 | 12 | 13 | 处理详情 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{item.name}} 21 | 22 | 23 | {{key}} 24 | 25 | {{value}} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 工单详情 36 | 37 | 38 | 服务项目 39 | 40 | {{detail.wx_bxlxm}} 41 | 42 | 43 | 44 | 服务区域 45 | 46 | {{detail.wx_fwqym}} 47 | 48 | 49 | 50 | 申报人 51 | 52 | {{detail.wx_bxr}} 53 | 54 | 55 | 56 | 联系电话 57 | 58 | {{detail.wx_bxdh}} 59 | 60 | 61 | 62 | 报修地址 63 | 64 | {{detail.wx_bxdd}} 65 | 66 | 67 | 68 | 申报标题 69 | 70 | {{detail.wx_bt}} 71 | 72 | 73 | 74 | 申报内容 75 | 76 | {{detail.wx_bxnr}} 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /pages/core/bx/bx_detail.wxss: -------------------------------------------------------------------------------- 1 | /**bx_detail.wxss**/ 2 | .container{ 3 | background-color: #f7f7f7; 4 | } 5 | 6 | .repair-state-panel, .work-sheet-panel{ 7 | display: flex; 8 | flex-direction: column; 9 | margin-top: 15rpx; 10 | } 11 | .repair-state-title, .work-sheet-title{ 12 | color: #888; 13 | padding: 5rpx 0 10rpx 30rpx; 14 | } 15 | .repair-state, .work-sheet{ 16 | display: flex; 17 | flex-direction: column; 18 | background-color: #fff; 19 | border-top: 1px solid #eee; 20 | border-bottom: 1px solid #eee; 21 | overflow: hidden; 22 | } 23 | .repair-state{ 24 | padding: 30rpx 0 20rpx 20rpx; 25 | } 26 | .repair-state-item{ 27 | display: flex; 28 | align-items: flex-start; 29 | margin: 10rpx 0 5rpx; 30 | } 31 | .repair-state-icon{ 32 | position: relative; 33 | z-index: 2; 34 | width: 25rpx; 35 | height: 25rpx; 36 | border-radius: 50rpx; 37 | background: #d8d8d8; 38 | border: 5rpx solid #eee; 39 | margin: 15rpx 30rpx; 40 | } 41 | .repair-state-icon-waited{ 42 | background: #ffcb63; 43 | } 44 | .repair-state-icon-accepted{ 45 | background: #73b4ef; 46 | } 47 | .repair-state-icon-dispatched{ 48 | background: #e78ab0; 49 | } 50 | .repair-state-icon-finished{ 51 | background: #9f8bea; 52 | } 53 | .repair-state-icon-refused{ 54 | background: #999; 55 | } 56 | .repair-state-info{ 57 | position: relative; 58 | flex: 1; 59 | display: flex; 60 | flex-direction: column; 61 | padding-bottom: 15rpx; 62 | border-bottom: 1rpx solid #eee; 63 | } 64 | .repair-state-info::before{ 65 | position: absolute; 66 | top: 30rpx; 67 | left: -47rpx; 68 | content: ''; 69 | width: 5rpx; 70 | background: #eee; 71 | height: 100%; 72 | } 73 | .repair-state-info.repair-state-info-last{ 74 | border: none; 75 | } 76 | .repair-state-info.repair-state-info-last::before{ 77 | background: transparent; 78 | width: 0; 79 | height: 0; 80 | } 81 | .repair-info-bd { 82 | color: #888; 83 | } 84 | .repair-info-bd.repair-state-name{ 85 | flex: 1; 86 | color: #777; 87 | font-size: 11pt; 88 | font-weight: bold; 89 | margin: 5rpx 0; 90 | } 91 | .repair-info-item{ 92 | display: flex; 93 | align-items: center; 94 | height: 55rpx; 95 | } 96 | .repair-note-ft{ 97 | padding-left: 120rpx; 98 | } 99 | 100 | .work-sheet{ 101 | padding: 30rpx; 102 | } 103 | .repair-info-ft{ 104 | flex: 1; 105 | display: flex; 106 | align-items: center; 107 | justify-content: flex-end; 108 | padding-right: 45rpx; 109 | } 110 | .repair-note-ft{ 111 | text-align: right; 112 | } 113 | 114 | .work-sheet-item{ 115 | display: flex; 116 | align-items: flex-start; 117 | min-height: 65rpx; 118 | } 119 | .work-sheet-bd{ 120 | color: #888; 121 | width: 55pt; 122 | } 123 | .work-sheet-ft{ 124 | flex: 1; 125 | display: flex; 126 | align-items: center; 127 | } -------------------------------------------------------------------------------- /pages/core/cet/cet.js: -------------------------------------------------------------------------------- 1 | // cet.js 2 | const orderQuery = 'https://we.cqu.pt/api/cet/post_cet_info.php'; 3 | const app = getApp(); 4 | 5 | function checkValue(value, type) { 6 | var warn = ''; 7 | switch (type) { 8 | case 'name': 9 | if (!/\S{1,}/.test(value)) { 10 | warn =  "姓名不能为空"; 11 | } 12 | break; 13 | case 'tel': 14 | if (!/\S{1,}/.test(value)) { 15 | warn = "手机号不能为空"; 16 | } 17 | else if (!/^[0-9]{11}$/.test(value)) { 18 | warn = "手机号格式错误"; 19 | } 20 | break; 21 | case 'idCard': 22 | if (!/\S{1,}/.test(value)) { 23 | warn = "准考证号不能为空"; 24 | } else if (!/^\S{15}$/.test(value)) { 25 | warn = "准考证号格式错误"; 26 | } 27 | break; 28 | case 'email': 29 | if (value.length > 0 && !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test(value)) { 30 | warn = "邮箱格式错误"; 31 | } 32 | break; 33 | default: 34 | break; 35 | } 36 | return warn; 37 | } 38 | 39 | Page({ 40 | data: { 41 | curselected: true, // 0 - 成绩查询, 1 - 预约 42 | nameWarn: '', 43 | nameFlag: false, 44 | idCardWarn: '', 45 | idCardFlag: false, 46 | idCard_focus: false, 47 | telWarn: '', 48 | telFlag: false, 49 | emailWarn: '', 50 | emailFlag: false 51 | }, 52 | inputFocus: function (e) { 53 | var id = e.target.id, 54 | newData = {}; 55 | console.log(id); 56 | newData[id + '_focus'] = true; 57 | this.setData(newData); 58 | }, 59 | inputBlur: function (e) { 60 | var id = e.target.id, 61 | newData = {}; 62 | newData[id + '_focus'] = false; 63 | this.setData(newData); 64 | }, 65 | checkInput: function (e) { 66 | var name = e.target.dataset.name, 67 | value = e.detail.value, 68 | warn = this.data[name + 'Warn'], 69 | flag = this.data[name + 'Flag']; 70 | if (warn || flag) { 71 | if (!flag) 72 | flag = true; 73 | warn = checkValue(value, name); 74 | if (warn != this.data[name + 'Warn']) { 75 | var newData = {}; 76 | newData[name + 'Warn'] = warn; 77 | newData[name + 'Flag'] = flag; 78 | this.setData(newData); 79 | } 80 | } 81 | }, 82 | submitForm: function (e) { 83 | var formData = e.detail.value, 84 | warn = '', 85 | flag = true, 86 | curselected = this.data.curselected; 87 | for (var key in formData) { 88 | if (warn = checkValue(formData[key], key)) { 89 | var newData = {}; 90 | newData[key + 'Warn'] = warn; 91 | this.setData(newData); 92 | flag = false; 93 | } 94 | } 95 | 96 | if (flag) { 97 | if (curselected) { 98 | wx.navigateTo({ 99 | url: 'result?candidate_number=' + formData.idCard + '&name=' + formData.name 100 | }); 101 | } else { 102 | let orderData = { 103 | openid: app._user.openid, 104 | candidate_number: formData.idCard, 105 | phone: formData.tel, 106 | email: formData.email, 107 | name: formData.name 108 | }; 109 | wx.request({ 110 | url: orderQuery, 111 | data: app.key(orderData), 112 | method: 'post', 113 | success: function (res) { 114 | var data = res.data; 115 | if (data.status == 200) { 116 | wx.showToast({ 117 | title: '预约成功', 118 | icon: 'success', 119 | duration: 2000 120 | }) 121 | } else if (data.status == 405) { 122 | wx.showToast({ 123 | title: '已预约', 124 | image: '../../../images/core/fail.png', 125 | duration: 2000 126 | }) 127 | } else { 128 | wx.showToast({ 129 | title: '预约失败', 130 | image: '../../../images/core/fail.png', 131 | duration: 2000 132 | }) 133 | } 134 | }, 135 | fail: function () { 136 | wx.showToast({ 137 | title: '预约失败', 138 | image: '../../../images/fail.png', 139 | duration: 2000 140 | }) 141 | } 142 | }) 143 | } 144 | } 145 | }, 146 | changeModule: function () { 147 | // this.setData({ 148 | // curselected:!this.data.curselected, 149 | // nameWarn: '', 150 | // idCardWarn: '', 151 | // idCardFlag: false, 152 | // telWarn: '', 153 | // telFlag: false, 154 | // emailWarn: '', 155 | // emailFlag: false 156 | // }); 157 | wx.showToast({ 158 | title: '敬请期待', 159 | image: '../../../images/core/close.png', 160 | duration: 2000 161 | }) 162 | } 163 | }); -------------------------------------------------------------------------------- /pages/core/cet/cet.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#73b4ef", 3 | "navigationBarTitleText": "四六级查询", 4 | "backgroundColor": "#73b4ef", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/cet/cet.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 成绩查询 5 | 预约 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{nameWarn}} 19 | 20 | 准考证 21 | 22 | 23 | 24 | {{idCardWarn}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {{telWarn}} 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | {{emailWarn}} 41 | 44 |
45 |
46 |
-------------------------------------------------------------------------------- /pages/core/cet/cet.wxss: -------------------------------------------------------------------------------- 1 | .container{ 2 | background: #f7f7f7; 3 | } 4 | 5 | /* 顶部导航 */ 6 | 7 | .navTab{ 8 | display: flex; 9 | margin-left: 20rpx; 10 | margin-right: 20rpx; 11 | margin-top: 30rpx; 12 | margin-bottom: 35rpx; 13 | background: #fff; 14 | height: 80rpx; 15 | line-height: 80rpx; 16 | border-radius: 10rpx; 17 | overflow: hidden; 18 | } 19 | /* .navTab view{ 20 | flex: 1; 21 | text-align: center; 22 | color: #999; 23 | font-size: 26rpx; 24 | font-weight: bold; 25 | } */ 26 | .navTab view{ 27 | flex: 1; 28 | text-align: center; 29 | color: white; 30 | background: #D2D3D5; 31 | font-size: 26rpx; 32 | font-weight: bold; 33 | } 34 | .navTab .selected{ 35 | background: #73b4ef; 36 | color: white; 37 | } 38 | 39 | /* 表单 */ 40 | 41 | 42 | .input-label { 43 | height: 20rpx; 44 | line-height: 20rpx; 45 | padding: 0 20rpx; 46 | color: #888; 47 | border-right: 1px solid #d8d8d8; 48 | min-width: 80rpx; 49 | text-align: justify; 50 | 51 | } 52 | .input-group input { 53 | padding: 0 20rpx; 54 | flex: 1; 55 | min-height: 52rpx; 56 | height: 52rpx; 57 | line-height: 52rpx; 58 | } 59 | 60 | .input-group { 61 | display: flex; 62 | align-items: center; 63 | padding: 25rpx 10rpx; 64 | margin:0 60rpx; 65 | background: #fff; 66 | border-radius: 5px; 67 | border: 2px solid #f4f4f4; 68 | 69 | } 70 | .input-group.active { 71 | border: 2px solid #73b4ef; 72 | } 73 | 74 | .left{ 75 | float: left; 76 | } 77 | .right{ 78 | float: right; 79 | } 80 | 81 | .btn{ 82 | margin: auto; 83 | background:#73b4ef; 84 | width: 200rpx; 85 | height: 60rpx; 86 | line-height: 60rpx; 87 | color: white; 88 | text-align: center; 89 | border-radius: 10rpx; 90 | margin-top: 20rpx; 91 | font-size: 30rpx; 92 | font-weight: bold; 93 | } 94 | .warn{ 95 | color: red; 96 | margin-left: 80rpx; 97 | height: 40rpx; 98 | line-height: 40rpx; 99 | } 100 | 101 | /* 查询结果 */ 102 | 103 | .result{ 104 | margin-left: 70rpx; 105 | margin-right: 70rpx; 106 | margin-top: 50rpx; 107 | 108 | } 109 | .result .examName{ 110 | font-size: 32rpx; 111 | margin-bottom: 20rpx; 112 | } 113 | .result .name, 114 | .result .idCard{ 115 | color: #999; 116 | } 117 | .result .score{ 118 | margin-top: 30rpx; 119 | background: #F2F2F2; 120 | padding:25rpx; 121 | } 122 | .result .score{ 123 | color: #999; 124 | } 125 | .result .score .total{ 126 | font-size: 33rpx; 127 | color: #333; 128 | } 129 | .result .score .scoreList{ 130 | margin-left: 50rpx; 131 | margin-top: 20rpx; 132 | } -------------------------------------------------------------------------------- /pages/core/cet/result.js: -------------------------------------------------------------------------------- 1 | // cet.js 2 | const queryCET = 'https://we.cqu.pt/api/cet/get_cet_result.php'; 3 | const app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | result: { // 查询结果 8 | name: '', 9 | time: '', 10 | idCard: '', 11 | total: 0, 12 | listen: 0, 13 | read: 0, 14 | write: 0, 15 | school: '' 16 | } 17 | }, 18 | onLoad: function (options) { 19 | var data = options, 20 | that = this; 21 | 22 | data.openid = app._user.openid; 23 | data.name = encodeURI(data.name); 24 | wx.showNavigationBarLoading(); 25 | wx.request({ 26 | url: queryCET, 27 | data: app.key(data), 28 | method: 'post', 29 | success: function (res) { 30 | var data = res.data; 31 | if (data.status == '200') { 32 | var { 33 | name, 34 | candidate_number, 35 | listening, 36 | writing, 37 | reading, 38 | score, 39 | school, 40 | time, 41 | } = data.data, 42 | result = null; 43 | result = { 44 | name: name, 45 | idCard: candidate_number, 46 | listen: listening, 47 | write: writing, 48 | read: reading, 49 | total: score, 50 | school: school, 51 | time: time 52 | }; 53 | that.setData({ 54 | result: result, 55 | remind: false 56 | }); 57 | } else if (data.status == 403) { 58 | that.setData({ 59 | remind: '请检查您的准考证号和姓名' 60 | }); 61 | } else { 62 | that.setData({ 63 | remind: '网络错误' 64 | }); 65 | } 66 | }, 67 | fail: function () { 68 | if (that.data.remind == '加载中') { 69 | that.setData({ 70 | remind: '网络错误' 71 | }); 72 | } 73 | console.warn('网络错误'); 74 | }, 75 | complete: function () { 76 | wx.hideNavigationBarLoading(); 77 | } 78 | }) 79 | }, 80 | onShareAppMessage: function () { 81 | 82 | } 83 | }); -------------------------------------------------------------------------------- /pages/core/cet/result.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#73b4ef", 3 | "navigationBarTitleText": "查询结果", 4 | "backgroundColor": "#73b4ef", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/cet/result.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{remind}} 7 | 8 | 9 | 10 | 11 | 12 | 查询结果 13 | 14 | {{result.examName}} 15 | {{'姓名:' + result.name}} 16 | {{'学校:' + result.school}} 17 | {{'考试时间:' + result.time}} 18 | {{'准考证号:' + result.idCard}} 19 | 20 | 21 | 22 | {{'总分:' + result.total}} 23 | 24 | 25 | 听力 26 | {{result.listen}} 27 | 28 | 29 | 阅读 30 | {{result.read}} 31 | 32 | 33 | 写作和翻译 34 | {{result.write}} 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /pages/core/cet/result.wxss: -------------------------------------------------------------------------------- 1 | .container{ 2 | background: #f7f7f7; 3 | } 4 | 5 | /* 查询结果 */ 6 | 7 | .result{ 8 | margin-left: 70rpx; 9 | margin-right: 70rpx; 10 | margin-top: 70rpx; 11 | } 12 | .result .baseinf{ 13 | margin-top: 30rpx; 14 | } 15 | .result .examName{ 16 | font-size: 32rpx; 17 | margin-bottom: 20rpx; 18 | } 19 | .result .school, 20 | .result .name, 21 | .result .time, 22 | .result .idCard{ 23 | color: #999; 24 | font-size: 26rpx; 25 | } 26 | .result .score{ 27 | margin-top: 50rpx; 28 | background: #F2F2F2; 29 | padding:25rpx; 30 | 31 | } 32 | .result .score{ 33 | color: #999; 34 | background: #fff; 35 | } 36 | .result .score .total{ 37 | font-size: 33rpx; 38 | color: #333; 39 | } 40 | .result .score .scoreList{ 41 | margin-top: 20rpx; 42 | } 43 | .result .list{ 44 | overflow: hidden; 45 | padding: 15rpx; 46 | border-top: 1px solid #eee; 47 | } 48 | .result .list .left{ 49 | float: left; 50 | } 51 | .result .list .right{ 52 | float: right; 53 | } 54 | .resultTitle{ 55 | font-size: 20pt; 56 | font-weight: bold; 57 | color: #222; 58 | } -------------------------------------------------------------------------------- /pages/core/cj/cj.js: -------------------------------------------------------------------------------- 1 | //cj.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | cjInfo: [ 8 | 9 | ], 10 | xqNum: { 11 | grade: '', 12 | semester: '' 13 | }, 14 | xqName: { 15 | grade: '', 16 | semester: '' 17 | } 18 | }, 19 | onLoad: function () { 20 | var _this = this; 21 | if (!app._user.we.info.id || !app._user.we.info.name) { 22 | _this.setData({ 23 | remind: '未绑定' 24 | }); 25 | return false; 26 | } 27 | _this.setData({ 28 | id: app._user.we.info.id, 29 | name: app._user.we.info.name 30 | }); 31 | //判断并读取缓存 32 | if (app.cache.cj) { cjRender(app.cache.cj); } 33 | function cjRender(_data) { 34 | var term = _data[0].term.trim(); 35 | var xh = _data[0].xh; 36 | var year = term.slice(0, 4); 37 | var semester = term.slice(-3, -2); 38 | var yearIn = xh.slice(0, 4); 39 | var xqName_grade = changeNum(year - yearIn + 1); 40 | var xqName_semester = (semester == 1) ? '上' : '下'; 41 | var xqName = { 42 | grade: xqName_grade, 43 | semester: xqName_semester, 44 | term: term 45 | }; 46 | 47 | _this.setData({ 48 | cjInfo: _data, 49 | xqName: xqName, 50 | remind: '' 51 | }); 52 | } 53 | wx.showNavigationBarLoading(); 54 | wx.request({ 55 | url: app._server + "/api/get_kscj.php", 56 | method: 'POST', 57 | data: app.key({ 58 | openid: app._user.openid, 59 | id: app._user.we.info.id 60 | }), 61 | success: function (res) { 62 | 63 | if (res.data && res.data.status === 200) { 64 | var _data = res.data.data; 65 | if (_data) { 66 | //保存成绩缓存 67 | app.saveCache('cj', _data); 68 | cjRender(_data); 69 | } else { _this.setData({ remind: '暂无数据' }); } 70 | 71 | } else { 72 | app.removeCache('cj'); 73 | _this.setData({ 74 | remind: res.data.message || '未知错误' 75 | }); 76 | } 77 | 78 | }, 79 | fail: function (res) { 80 | if (_this.data.remind == '加载中') { 81 | _this.setData({ 82 | remind: '网络错误' 83 | }); 84 | } 85 | console.warn('网络错误'); 86 | }, 87 | complete: function () { 88 | wx.hideNavigationBarLoading(); 89 | } 90 | }); 91 | 92 | function changeNum(num) { 93 | var china = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; 94 | var arr = []; 95 | var n = ''.split.call(num, ''); 96 | for (var i = 0; i < n.length; i++) { 97 | arr[i] = china[n[i]]; 98 | } 99 | return arr.join("") 100 | } 101 | } 102 | }); -------------------------------------------------------------------------------- /pages/core/cj/cj.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#e78ab0", 3 | "navigationBarTitleText": "成绩查询", 4 | "backgroundColor": "#e78ab0", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/cj/cj.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{remind}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 成绩查询 15 | 学号:{{id}} 16 | 姓名:{{name}} 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | {{xqName.term}} 28 | 大{{xqName.grade}}{{xqName.semester}}学期 29 | 30 | 31 | 32 | 33 | 34 | {{item.course_name}} 35 | {{item.socres}} 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /pages/core/cj/cj.wxss: -------------------------------------------------------------------------------- 1 | /**cj.wxss**/ 2 | .container{ 3 | padding-left: 30rpx; 4 | padding-right: 30rpx; 5 | background-color: #f7f7f7; 6 | } 7 | .cj-header{ 8 | display: flex; 9 | flex-flow: row nowrap; 10 | justify-content: space-between; 11 | align-items: center; 12 | padding: 50rpx 0; 13 | } 14 | .cj-text{ 15 | display: flex; 16 | flex-flow: column nowrap; 17 | justify-content: flex-start; 18 | padding-left: 25rpx; 19 | } 20 | .cj-header-title{ 21 | font-size: 20pt; 22 | font-weight: bold; 23 | line-height: 150%; 24 | margin-bottom: 15rpx; 25 | color: #222; 26 | } 27 | .cj-header-info{ 28 | font-size: 11pt; 29 | line-height: 160%; 30 | color: #888; 31 | } 32 | 33 | .cj-bg{ 34 | display: block; 35 | width: 200rpx; 36 | height: 200rpx; 37 | padding-right: 5rpx; 38 | opacity: .3; 39 | } 40 | 41 | .cj-info-ctn{ 42 | display: flex; 43 | flex-flow: column nowrap; 44 | align-items: stretch; 45 | border-radius: 3px; 46 | background: #fff; 47 | margin-bottom: 50rpx; 48 | } 49 | .cj-grade{ 50 | display: flex; 51 | flex-flow: row nowrap; 52 | align-items: center; 53 | padding: 25rpx 30rpx; 54 | } 55 | .cj-grade-logo{ 56 | width: 100rpx; 57 | height: 100rpx; 58 | } 59 | 60 | .cj-grade-term{ 61 | flex: 1; 62 | padding-left: 30rpx; 63 | color: #666; 64 | font-size: 11pt; 65 | line-height: 160%; 66 | } 67 | .cj-grade-fst{ 68 | display: flex; 69 | flex-flow: column nowrap; 70 | } 71 | 72 | .grade-comment{ 73 | color: #999; 74 | font-size: 26rpx; 75 | } 76 | 77 | .cj-info-box{ 78 | display: flex; 79 | flex-flow: column nowrap; 80 | align-items: stretch; 81 | padding: 5rpx 30rpx 15rpx; 82 | } 83 | .cj-info{ 84 | background: #fff; 85 | font-size: 11pt; 86 | display: flex; 87 | flex-flow: row nowrap; 88 | justify-content: space-between; 89 | align-items: center; 90 | border-top: 1px solid #eee; 91 | padding: 25rpx 10rpx 20rpx 5rpx; 92 | } 93 | .cj-info-socre{ 94 | padding-left: 100rpx; 95 | } -------------------------------------------------------------------------------- /pages/core/fw/fw.js: -------------------------------------------------------------------------------- 1 | var app = getApp(); 2 | 3 | Page({ 4 | data: { 5 | remind: '加载中', 6 | userName: '', 7 | userSex: '', 8 | totalTime: 0,// 服务总时长 9 | serverHistory: [] 10 | }, 11 | renderRecord: function (data) { 12 | var _this = this; 13 | _this.setData(data); 14 | }, 15 | onLoad: function () { 16 | var _this = this; 17 | if (!app._user.we.info.name || !app._user.we.info.id) { 18 | _this.setData({ 19 | remind: '未绑定帐号' 20 | }); 21 | return false; 22 | } 23 | if (!app._user.we.volunteer_uid) { 24 | _this.setData({ 25 | remind: '未完善志愿者信息' 26 | }); 27 | return false; 28 | } 29 | //判断并读取缓存 30 | if (app.cache.fw) { _this.renderRecord(app.cache.fw); } 31 | wx.showNavigationBarLoading(); 32 | wx.request({ 33 | url: 'https://we.cqu.pt/api/get_volunteer_info.php', 34 | method: 'post', 35 | data: app.key({ 36 | openid: app._user.openid, 37 | volunteer_uid: app._user.we.volunteer_uid 38 | }), 39 | success(result) { 40 | var result = result.data; 41 | if (result.status === 200) { 42 | var data = result.data, 43 | record = data.record || [], 44 | len = record.length, 45 | items = [], 46 | y = {}, 47 | i = 0; 48 | record.forEach(function (item, index) { 49 | var curY = item.time.split('-')[0]; 50 | if (y[curY] === undefined) { 51 | y[curY] = i; 52 | items[i] = { 53 | y: curY, 54 | historys: [] 55 | }; 56 | ++i; 57 | } 58 | items[y[curY]].historys.push({ 59 | date: item.time, 60 | content: item.content, 61 | pos: item.place, 62 | time: item.hours 63 | }); 64 | }); 65 | var recordData = { 66 | userName: data.info.name, 67 | userSex: data.info.sex, 68 | totalTime: data.info.volunteer_time, 69 | serverHistory: items, 70 | remind: '' 71 | } 72 | app.saveCache('fw', recordData); 73 | _this.renderRecord(recordData); 74 | } else { 75 | _this.setData({ 76 | remind: res.data.message || '未知错误' 77 | }); 78 | } 79 | }, 80 | fail: function (res) { 81 | if (_this.data.remind == '加载中') { 82 | _this.setData({ 83 | remind: '网络错误' 84 | }); 85 | } 86 | console.warn('网络错误'); 87 | }, 88 | complete: function () { 89 | wx.hideNavigationBarLoading(); 90 | } 91 | }); 92 | } 93 | }); -------------------------------------------------------------------------------- /pages/core/fw/fw.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#e78ab0", 3 | "navigationBarTitleText": "服务记录", 4 | "backgroundColor": "#e78ab0", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/fw/fw.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{remind}} 7 | 前往完善 8 | 9 | 10 | 11 | 12 | 13 | 服务记录 14 | 15 | 姓名: 16 | {{userName}} 17 | 18 | 19 | 性别: 20 | {{userSex}} 21 | 22 | 23 | 时长: 24 | {{totalTime}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | {{item.y+'年'}} 32 | 33 | 34 | 35 | {{item.date}} 36 | 37 | 服务内容: 38 | {{item.content}} 39 | 40 | 41 | 服务地点: 42 | {{item.pos}} 43 | 44 | 45 | 服务时长: 46 | {{item.time }} 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 你还没有参加过志愿服务 57 | 请继续努力 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /pages/core/fw/fw.wxss: -------------------------------------------------------------------------------- 1 | /* fw.wxss */ 2 | .container{ 3 | background-color: #f7f7f7; 4 | padding-bottom: 0rpx; 5 | } 6 | .loaded{ 7 | background: #fff; 8 | } 9 | .remind-btn{ 10 | background: #e78ab0; 11 | border-bottom:2px solid #e78ab0; 12 | } 13 | /* 基本信息 */ 14 | .fw-baseinf{ 15 | padding: 32rpx 55rpx; 16 | background-color: #f7f7f7; 17 | position: relative; 18 | } 19 | .fw-baseinf .title{ 20 | color: #222; 21 | font-size: 54rpx; 22 | font-weight: bold; 23 | margin-bottom: 16rpx; 24 | } 25 | .fw-baseinf .item{ 26 | margin-top: 18rpx; 27 | color: #7f848a; 28 | font-size: 30rpx; 29 | } 30 | .fw-baseinf .item-title{ 31 | margin-right: 20rpx; 32 | } 33 | .fw-baseinf .total-time{ 34 | color: #e78ab0; 35 | } 36 | .fw-baseinf .bg{ 37 | width: 200rpx; 38 | height: 200rpx; 39 | position: absolute; 40 | left: 492rpx; 41 | top: 43rpx; 42 | } 43 | /* 服务记录信息 */ 44 | .fw-history{ 45 | padding: 0rpx 17rpx 45rpx; 46 | background: #fff; 47 | } 48 | .fw-history .year{ 49 | color: #e78ab0; 50 | font-size: 32rpx; 51 | margin-bottom: 30rpx; 52 | margin-top: 45rpx; 53 | } 54 | .history-item{ 55 | overflow: hidden; 56 | position: relative; 57 | } 58 | .history-item .radio{ 59 | background: #e78ab0; 60 | border-radius: 50%; 61 | width: 22rpx; 62 | height: 22rpx; 63 | position: absolute; 64 | left: 7rpx; 65 | } 66 | 67 | .history-item .content{ 68 | padding-left: 56rpx; 69 | border-left: 2rpx solid #e78ab0; 70 | margin-left: 17rpx; 71 | width: 630rpx; 72 | overflow: hidden; 73 | } 74 | .history-item .content .date{ 75 | color: #000; 76 | font-size: 26rpx; 77 | margin-bottom: 15rpx; 78 | margin-top: 3rpx; 79 | } 80 | .history-item .content .hr{ 81 | height: 2px; 82 | background:#e9e9e9; 83 | margin-top: 36rpx; 84 | margin-bottom: 20rpx; 85 | } 86 | .content-item{ 87 | color: #7f848a; 88 | font-size: 28rpx; 89 | margin-top: 8rpx; 90 | } 91 | 92 | .content-item .time{ 93 | color: #e78ab0; 94 | } 95 | .content-item .title{ 96 | margin-right: 10rpx; 97 | } 98 | /* 没有记录 */ 99 | .no-record{ 100 | margin-top: 100rpx; 101 | } -------------------------------------------------------------------------------- /pages/core/jy/jy.js: -------------------------------------------------------------------------------- 1 | //jy.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | jyData: { 8 | book_list: [], //当前借阅列表 9 | books_num: 0, //当前借阅量 10 | history: 0, //历史借阅量 11 | dbet: 0, //欠费 12 | nothing: true //当前是否有借阅 13 | }, 14 | jyHistoryTap: false //点击历史借阅 15 | }, 16 | onLoad: function () { 17 | this.getData(); 18 | }, 19 | onPullDownRefresh: function () { 20 | this.getData(); 21 | }, 22 | getData: function () { 23 | var _this = this; 24 | if (!app._user.we.info.id || !app._user.we.info.name) { 25 | _this.setData({ 26 | remind: '未绑定' 27 | }); 28 | return false; 29 | } 30 | //判断并读取缓存 31 | if (app.cache.jy) { jyRender(app.cache.jy); } 32 | function jyRender(info) { 33 | info.nothing = !parseInt(info.books_num) || !info.book_list || !info.book_list.length; 34 | var colors = ['green', 'yellow', 'red', 'purple'], 35 | nowTime = new Date().getTime(); 36 | if (!info.nothing) { 37 | info.book_list.map(function (e) { 38 | var jDate = e.jsrq.split('-'), hDate = e.yhrq.split('-'), 39 | jTime = new Date(jDate[0], jDate[1] - 1, jDate[2]).getTime(), 40 | hTime = new Date(hDate[0], hDate[1] - 1, hDate[2]).getTime(); 41 | var sum = parseInt((hTime - jTime) / 1000 / 60 / 60 / 24), 42 | timing = parseInt((hTime - nowTime) / 1000 / 60 / 60 / 24), 43 | k = 1 - timing / sum, n = 0; 44 | if (k < 0.3) { n = 0; } 45 | else if (k < 0.7) { n = 1; } 46 | else if (k <= 1) { n = 2; } 47 | else if (k > 1) { n = 3; } 48 | e.color = colors[n]; 49 | return e; 50 | }); 51 | } 52 | _this.setData({ 53 | jyData: info, 54 | remind: '' 55 | }); 56 | } 57 | wx.showNavigationBarLoading(); 58 | wx.request({ 59 | url: app._server + "/api/get_books.php", 60 | method: 'POST', 61 | data: app.key({ 62 | openid: app._user.openid, 63 | ykth: app._user.we.ykth 64 | }), 65 | success: function (res) { 66 | if (res.data && res.data.status === 200) { 67 | var info = res.data.data; 68 | if (info) { 69 | //保存借阅缓存 70 | app.saveCache('jy', info); 71 | jyRender(info); 72 | } else { _this.setData({ remind: '暂无数据' }); } 73 | 74 | } else { 75 | app.removeCache('jy'); 76 | _this.setData({ 77 | remind: res.data.message || '未知错误' 78 | }); 79 | } 80 | }, 81 | fail: function (res) { 82 | if (_this.data.remind == '加载中') { 83 | _this.setData({ 84 | remind: '网络错误' 85 | }); 86 | } 87 | console.warn('网络错误'); 88 | }, 89 | complete: function () { 90 | wx.hideNavigationBarLoading(); 91 | } 92 | }); 93 | }, 94 | jyHistory: function () { 95 | var _this = this; 96 | if (!_this.data.jyHistoryTap) { 97 | _this.setData({ 98 | jyHistoryTap: true 99 | }); 100 | setTimeout(function () { 101 | _this.setData({ 102 | jyHistoryTap: false 103 | }); 104 | }, 2000); 105 | } 106 | } 107 | }); -------------------------------------------------------------------------------- /pages/core/jy/jy.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#73b4ef", 3 | "navigationBarTitleText": "借阅信息", 4 | "backgroundColor": "#73b4ef" 5 | } -------------------------------------------------------------------------------- /pages/core/jy/jy.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{remind}} 8 | 9 | 10 | 11 | 12 | 13 | 当前借阅 14 | 15 | {{jyData.books_num}} 16 | 17 | 18 | 19 | 20 | 历史借阅 21 | 22 | {{jyData.history}} 23 | 24 | 25 | 26 | 27 | 欠费 28 | 29 | {{jyData.dbet}} 30 | 31 | 32 | 33 | 34 | 35 | 36 | 当前无借阅 37 | 38 | 39 | 当前借阅记录 40 | 41 | 42 | 43 | {{itemName.book}} 44 | 45 | 46 | 47 | 借阅日期: 48 | {{itemName.jsrq}} 49 | 50 | 51 | 应还日期: 52 | {{itemName.yhrq}} 53 | 54 | 55 | 56 | 57 | 58 | 59 | 暂不能查看历史借阅详情哦~ 60 | 61 | 62 | -------------------------------------------------------------------------------- /pages/core/jy/jy.wxss: -------------------------------------------------------------------------------- 1 | /**jy.wxss**/ 2 | .container { 3 | background-color: #f7f7f7; 4 | } 5 | .user-jy { 6 | display: flex; 7 | background: #fefefe; 8 | border-bottom: 1rpx solid #eee; 9 | } 10 | .user-jy-item { 11 | flex: 1; 12 | display: flex; 13 | flex-direction: column; 14 | justify-content: center; 15 | font-size: 11pt; 16 | line-height: 150%; 17 | height: 150rpx; 18 | padding: 20rpx; 19 | border-right: 1rpx solid #eee; 20 | } 21 | .user-jy-dbet { 22 | border: none; 23 | } 24 | .user-jy-hd { 25 | color: #777; 26 | } 27 | .user-jy-bd { 28 | display: flex; 29 | justify-content: center; 30 | } 31 | .user-jy-value { 32 | font-size: 28pt; 33 | color: #73b4ef; 34 | font-weight: bold; 35 | line-height: 150%; 36 | padding: 0 20rpx 0 30rpx; 37 | } 38 | .user-jy-text { 39 | color: #999; 40 | font-size: 10pt; 41 | line-height: 200%; 42 | align-self: flex-end; 43 | } 44 | .book-list { 45 | display: flex; 46 | flex-direction: column; 47 | align-items: stretch; 48 | padding: 25rpx 30rpx; 49 | } 50 | .current-type { 51 | color: #777; 52 | font-size: 10pt; 53 | line-height: 200%; 54 | margin-bottom: 15rpx; 55 | } 56 | .book-wraper { 57 | display: flex; 58 | flex-direction: column; 59 | align-items: stretch; 60 | justify-content: space-between; 61 | overflow: hidden; 62 | padding: 35rpx 30rpx 10rpx; 63 | margin-bottom: 20rpx; 64 | background: #fff; 65 | border-radius: 3px; 66 | } 67 | .book-name { 68 | font-size: 15pt; 69 | line-height: 135%; 70 | word-break: break-all; 71 | } 72 | .book-date { 73 | display: flex; 74 | align-items: flex-end; 75 | justify-content: space-between; 76 | margin-top: 25rpx; 77 | font-size: 9pt; 78 | color: #888; 79 | } 80 | .yhrq-value{ 81 | font-size: 13pt; 82 | } 83 | 84 | .book-img { 85 | height: 13pt; 86 | width: 13pt; 87 | margin-top: 2pt; 88 | margin-right: 10rpx; 89 | } -------------------------------------------------------------------------------- /pages/core/kb/kb.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#73b4ef", 3 | "navigationBarTitleText": "我的课表", 4 | "backgroundColor": "#73b4ef", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/kjs/kjs.js: -------------------------------------------------------------------------------- 1 | //kjs.js 2 | //获取应用实例 3 | var app = getApp(); 4 | 5 | // 定义常量数据 6 | var WEEK_DATA = ['', '第一周', '第二周', '第三周', '第四周', '第五周', '第六周', '第七周', '第八周', '第九周', '第十周', 7 | '十一周', '十二周', '十三周', '十四周', '十五周', '十六周', '十七周', '十八周', '十九周', '二十周'], 8 | DAY_DATA = ['', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'], 9 | CLASSTIME_DATA = ['', { time: '1-2节', index: '1@2' }, { time: '3-4节', index: '3@4' }, { time: '5-6节', index: '5@6' }, 10 | { time: '7-8节', index: '7@8' }, { time: '9-10节', index: '9@10' }, { time: '11-12节', index: '11@12' }], 11 | BUILDING_DATA = ['', '', '二教', '三教', '四教', '五教', '', '', '八教']; 12 | 13 | 14 | // 处理数组classNo 15 | function getHandledClassNo(classNo) { 16 | var result = ''; 17 | classNo.forEach(function (value, index) { 18 | if (value) { 19 | if (index === 1) { 20 | result = CLASSTIME_DATA[index].index; 21 | } else if (index > 1) { 22 | result = result + '@' + CLASSTIME_DATA[index].index; 23 | } 24 | } 25 | }); 26 | return result; 27 | } 28 | Page({ 29 | data: { 30 | DATA: { 31 | WEEK_DATA: WEEK_DATA, 32 | DAY_DATA: DAY_DATA, 33 | CLASSTIME_DATA: CLASSTIME_DATA, 34 | BUILDING_DATA: BUILDING_DATA, 35 | }, 36 | active: { // 发送请求的数据对象 初始为默认值 37 | weekNo: 1, 38 | weekDay: 1, 39 | buildingNo: 2, 40 | classNo: ['', true, false, false, false, false, false], 41 | }, 42 | nowWeekNo: 1, 43 | testData: null 44 | }, 45 | 46 | onLoad: function () { 47 | this.setData({ 48 | 'nowWeekNo': app._time.week, 49 | 'active.weekNo': app._time.week 50 | }); 51 | // 初始默认显示 52 | this.sendRequest(); 53 | }, 54 | 55 | //下拉更新 56 | onPullDownRefresh: function () { 57 | 58 | this.sendRequest(); 59 | }, 60 | 61 | // 发送请求的函数 62 | sendRequest: function (query, bd) { 63 | 64 | app.showLoadToast(); 65 | 66 | var that = this; 67 | var query = query || {}, activeData = that.data.active; 68 | var requestData = { 69 | weekNo: query.weekNo || activeData.weekNo, 70 | weekDay: query.weekDay || activeData.weekDay, 71 | classNo: getHandledClassNo(query.classNo || activeData.classNo), 72 | buildingNo: query.buildingNo || activeData.buildingNo, 73 | openid: app._user.openid, 74 | }; 75 | 76 | // 对成功进行处理 77 | function doSuccess(data) { 78 | 79 | that.setData({ 80 | 'testData': data, 81 | 'errObj.errorDisplay': true 82 | }); 83 | } 84 | 85 | // 对失败进行处理 86 | function doFail(message) { 87 | 88 | app.showErrorModal(message); 89 | } 90 | 91 | // 发送请求 92 | wx.request({ 93 | url: app._server + '/api/get_empty_room.php', 94 | method: 'POST', 95 | data: app.key(requestData), 96 | success: function (res) { 97 | if (res.data && res.data.status === 200) { 98 | doSuccess(res.data.data); 99 | //执行回调函数 100 | if (bd) { bd(that); } 101 | } else { 102 | doFail(res.data.message); 103 | } 104 | }, 105 | fail: function (res) { 106 | doFail(res.errMsg); 107 | }, 108 | complete: function () { 109 | wx.hideToast(); 110 | wx.stopPullDownRefresh(); 111 | } 112 | }); 113 | }, 114 | 115 | // week 116 | chooseWeek: function (e) { 117 | 118 | var index = parseInt(e.target.dataset.weekno, 10); 119 | 120 | if (isNaN(index)) { return false; } 121 | 122 | this.sendRequest({ 123 | weekNo: index 124 | }, function (that) { 125 | that.setData({ 126 | 'active.weekNo': index 127 | }); 128 | }); 129 | }, 130 | 131 | // day 132 | chooseDay: function (e) { 133 | 134 | var index = parseInt(e.target.dataset.dayno, 10); 135 | 136 | if (isNaN(index)) { return false; } 137 | 138 | this.sendRequest({ 139 | weekDay: index 140 | }, function (that) { 141 | that.setData({ 142 | 'active.weekDay': index 143 | }); 144 | }); 145 | }, 146 | 147 | // classTime 148 | chooseClaasTime: function (e) { 149 | 150 | var index = e.target.dataset.classno, 151 | classNo = this.data.active.classNo, 152 | selectNum = 0; 153 | console.log(classNo); 154 | classNo.forEach(function (value) { 155 | if (value) 156 | ++selectNum; 157 | }); 158 | if (classNo[index] && selectNum > 1) { 159 | classNo[index] = !classNo[index]; 160 | } else { 161 | classNo[index] = true; 162 | } 163 | if (isNaN(index)) { return false; } 164 | 165 | this.sendRequest({ 166 | classNo: classNo 167 | }, function (that) { 168 | that.setData({ 169 | 'active.classNo': classNo 170 | }); 171 | }); 172 | }, 173 | 174 | // building 175 | chooseBuilding: function (e) { 176 | 177 | var index = parseInt(e.target.dataset.buildingno, 10); 178 | 179 | if (isNaN(index)) { return false; } 180 | 181 | this.sendRequest({ 182 | buildingNo: index 183 | }, function (that) { 184 | that.setData({ 185 | 'active.buildingNo': index 186 | }); 187 | }); 188 | } 189 | }); -------------------------------------------------------------------------------- /pages/core/kjs/kjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#e78ab0", 3 | "navigationBarTitleText": "空教室", 4 | "backgroundColor": "#e78ab0" 5 | } -------------------------------------------------------------------------------- /pages/core/kjs/kjs.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {{item}} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | {{item.time}} 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | {{item}} 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | {{item}} 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /pages/core/kjs/kjs.wxss: -------------------------------------------------------------------------------- 1 | /**kjs.wxss**/ 2 | 3 | page { 4 | position: relative; 5 | height: 100%; 6 | } 7 | 8 | .container { 9 | 10 | background: #fff; 11 | padding-bottom: 480rpx; 12 | box-sizing: border-box; 13 | } 14 | 15 | 16 | /* ========================================================================== 17 | main-roomUl 18 | ============================================================================ */ 19 | .main-roomUl { 20 | 21 | display: flex; 22 | flex-flow: column nowrap; 23 | padding: 30rpx 45rpx; 24 | } 25 | .roomUl-floor { 26 | 27 | display: flex; 28 | width: 600rpx; 29 | flex-flow: column nowrap; 30 | margin-top: 20rpx; 31 | padding: 0 0 0 65rpx; 32 | /*background: url('/images/core/kjs/classroom-icon.png') no-repeat;*/ 33 | /*微信暂不支持静态bgimg文件,改用服务器url*/ 34 | background: url('https://we.cqu.pt/app/images/core/kjs/classroom-icon.png') no-repeat; 35 | background-size: 30rpx 25rpx; 36 | background-position: 15rpx 8rpx; 37 | } 38 | .floor { 39 | 40 | flex: 1; 41 | width: 600rpx; 42 | display: flex; 43 | flex-wrap: wrap; 44 | } 45 | .floor text { 46 | 47 | padding-bottom: 25rpx; 48 | width: 120rpx; 49 | font-size: 11pt; 50 | letter-spacing: 0.1rem; 51 | text-align: center; 52 | } 53 | 54 | /* ========================================================================== 55 | main-condition 56 | ============================================================================ */ 57 | .main-condition { 58 | 59 | position: fixed; 60 | bottom: 0; 61 | left: 0; 62 | z-index: 100; 63 | display: flex; 64 | flex-flow: column wrap; 65 | width: 100%; 66 | height: 480rpx; 67 | border-top: 1rpx solid #F1F1F2; 68 | } 69 | .condition { 70 | 71 | display: flex; 72 | box-sizing: border-box; 73 | padding: 0; 74 | width: 100%; 75 | height: 120rpx; 76 | white-space: nowrap; 77 | } 78 | .condition-li { 79 | 80 | display: inline-block; 81 | width: 111rpx; 82 | height: 120rpx; 83 | line-height: 120rpx; 84 | text-align: center; 85 | } 86 | .building-condition .condition-li { 87 | width: 115rpx; 88 | } 89 | .day-condition .condition-li { 90 | width: 115rpx; 91 | } 92 | .week-active, 93 | .day-active, 94 | .classTime-active, 95 | .building-active { 96 | color: #FFF; 97 | font-weight: 900; 98 | } 99 | .scroll-space { 100 | 101 | display: inline-block; 102 | width: 30rpx; 103 | height: 30rpx; 104 | } 105 | 106 | 107 | /* main-condition > condition-week 108 | ============================================================================ */ 109 | .condition-week { 110 | 111 | background-color: #FBFAF8; 112 | } 113 | .week-active { 114 | 115 | /*background: url('/images/core/kjs/week-icon.png') no-repeat;*/ 116 | /*微信暂不支持静态bgimg文件,改用服务器url*/ 117 | background: url('https://we.cqu.pt/app/images/core/kjs/week-icon.png') no-repeat; 118 | background-size: 100rpx 100rpx; 119 | background-position: 50% 50%; 120 | } 121 | 122 | 123 | /* main-condition > condition-day 124 | ============================================================================ */ 125 | .condition-day { 126 | 127 | background-color: #F1F1F2; 128 | } 129 | .day-active { 130 | 131 | /*background: url('/images/core/kjs/day-icon.png') no-repeat;*/ 132 | /*微信暂不支持静态bgimg文件,改用服务器url*/ 133 | background: url('https://we.cqu.pt/app/images/core/kjs/day-icon.png') no-repeat; 134 | background-size: 100rpx 100rpx; 135 | background-position: 50% 50%; 136 | } 137 | 138 | /* main-condition > condition-classTime 139 | ============================================================================ */ 140 | .condition-classTime { 141 | 142 | background-color: #FBFAF8; 143 | overflow: hidden; 144 | } 145 | .classTime-active { 146 | 147 | /*background: url('/images/core/kjs/classTime-icon.png') no-repeat;*/ 148 | /*微信暂不支持静态bgimg文件,改用服务器url*/ 149 | background: url('https://we.cqu.pt/app/images/core/kjs/classTime-icon.png') no-repeat; 150 | background-size: 100rpx 100rpx; 151 | background-position: 50% 50%; 152 | } 153 | 154 | /* main-condition > condition-building 155 | ============================================================================ */ 156 | .condition-building { 157 | 158 | background-color: #F1F1F2; 159 | overflow: hidden; 160 | } 161 | .building-active { 162 | 163 | /*background: url('/images/core/kjs/building-icon.png') no-repeat;*/ 164 | /*微信暂不支持静态bgimg文件,改用服务器url*/ 165 | background: url('https://we.cqu.pt/app/images/core/kjs/building-icon.png') no-repeat; 166 | background-size: 100rpx 100rpx; 167 | background-position: 50% 50%; 168 | } -------------------------------------------------------------------------------- /pages/core/ks/ks.js: -------------------------------------------------------------------------------- 1 | //ks.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | list: [], 8 | first: 1 9 | }, 10 | togglePage: function (e) { 11 | var id = e.currentTarget.id, data = {}; 12 | data.show = []; 13 | for (var i = 0, len = this.data.class.length; i < len; i++) { 14 | data.show[i] = false; 15 | } 16 | if (this.data.first) { 17 | this.setData(data); 18 | this.data.first = 0; 19 | } 20 | data.show[id] = !this.data.show[id]; 21 | this.setData(data); 22 | }, 23 | //分享 24 | onShareAppMessage: function () { 25 | var name = this.data.name || app._user.we.info.name, 26 | id = this.data.id || app._user.we.info.id; 27 | return { 28 | title: name + '的考试安排', 29 | desc: 'We重邮 - 考试安排', 30 | path: '/pages/core/ks/ks?id=' + id + '&name=' + name 31 | }; 32 | }, 33 | //下拉更新 34 | onPullDownRefresh: function () { 35 | var _this = this; 36 | _this.loginHandler({ 37 | id: _this.data.id || app._user.we.info.id, 38 | name: _this.data.name || app._user.we.info.name 39 | }); 40 | }, 41 | onLoad: function (options) { 42 | var _this = this; 43 | app.loginLoad(function () { 44 | _this.loginHandler.call(_this, options); 45 | }); 46 | }, 47 | //让分享时自动登录 48 | loginHandler: function (options) { 49 | var _this = this; 50 | var id, name; 51 | if (options.id && options.name) { 52 | id = options.id; 53 | name = options.name; 54 | _this.setData({ 55 | teacher: false 56 | }); 57 | } else { 58 | id = app._user.we.info.id, 59 | name = app._user.we.info.name; 60 | _this.setData({ 61 | teacher: app._user.teacher 62 | }); 63 | } 64 | if (!id || !name) { 65 | _this.setData({ 66 | remind: '未绑定' 67 | }); 68 | return false; 69 | } 70 | _this.setData({ 71 | id: id, 72 | name: name 73 | }); 74 | var data = { 75 | openid: app._user.openid, 76 | id: id 77 | }; 78 | if (app._user.teacher && !options.name) { data.type = 'teacher'; } 79 | 80 | //判断并读取缓存 81 | if (app.cache.ks && !options.name) { ksRender(app.cache.ks); } 82 | function ksRender(list) { 83 | if (!list || !list.length) { 84 | _this.setData({ 85 | remind: '无考试安排' 86 | }); 87 | return false; 88 | } 89 | var days = ['一', '二', '三', '四', '五', '六', '日']; 90 | for (var i = 0, len = list.length; i < len; ++i) { 91 | list[i].open = false; 92 | list[i].index = i; 93 | list[i].day = days[list[i].day - 1]; 94 | list[i].time = list[i].time.trim().replace('—', '~'); 95 | list[i].lesson = list[i].lesson.replace(',', '-'); 96 | //倒计时提醒 97 | if (list[i].days > 0) { 98 | list[i].countdown = '还有' + list[i].days + '天考试'; 99 | list[i].place = '(' + list[i].time + ')' + list[i].room; 100 | if (!app._user.teacher) { 101 | list[i].place += '#' + list[i].number; 102 | } 103 | } else if (list[i].days < 0) { 104 | list[i].countdown = '考试已过了' + (-list[i].days) + '天'; 105 | list[i].place = ''; 106 | } else { 107 | list[i].countdown = '今天考试'; 108 | list[i].place = '(' + list[i].time + ')' + list[i].room; 109 | if (!app._user.teacher) { 110 | list[i].place += '#' + list[i].number; 111 | } 112 | } 113 | } 114 | list[0].open = true; 115 | _this.setData({ 116 | list: list, 117 | remind: '' 118 | }); 119 | } 120 | wx.showNavigationBarLoading(); 121 | wx.request({ 122 | url: app._server + "/api/get_ks.php", 123 | method: 'POST', 124 | data: app.key(data), 125 | success: function (res) { 126 | if (res.data && res.data.status === 200) { 127 | var list = res.data.data; 128 | if (list) { 129 | if (!options.name) { 130 | //保存考试缓存 131 | app.saveCache('ks', list); 132 | } 133 | ksRender(list); 134 | } else { _this.setData({ remind: '暂无数据' }); } 135 | 136 | } else { 137 | app.removeCache('ks'); 138 | _this.setData({ 139 | remind: res.data.message || '未知错误' 140 | }); 141 | } 142 | }, 143 | fail: function (res) { 144 | if (_this.data.remind == '加载中') { 145 | _this.setData({ 146 | remind: '网络错误' 147 | }); 148 | } 149 | console.warn('网络错误'); 150 | }, 151 | complete: function () { 152 | wx.hideNavigationBarLoading(); 153 | wx.stopPullDownRefresh(); 154 | } 155 | }); 156 | }, 157 | // 展示考试详情 158 | slideDetail: function (e) { 159 | var id = e.currentTarget.dataset.id, 160 | list = this.data.list; 161 | // 每次点击都将当前open换为相反的状态并更新到视图,视图根据open的值来切换css 162 | for (var i = 0, len = list.length; i < len; ++i) { 163 | if (i == id) { 164 | list[i].open = !list[i].open; 165 | } else { 166 | list[i].open = false; 167 | } 168 | } 169 | this.setData({ 170 | list: list 171 | }); 172 | } 173 | }); -------------------------------------------------------------------------------- /pages/core/ks/ks.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#7acfa6", 3 | "navigationBarTitleText": "考试安排", 4 | "backgroundColor": "#7acfa6" 5 | } -------------------------------------------------------------------------------- /pages/core/ks/ks.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{remind}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 考试安排 15 | {{ks.ksName}} 16 | 学号:{{id}} 17 | 教师号:{{id}} 18 | 姓名:{{name}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 【{{item.type}}】{{item.course}} 30 | 31 | 32 | {{item.countdown}}{{item.place}} 33 | 34 | 35 | 36 | 37 | 38 | 39 | 类型 40 | {{item.type}} 41 | 42 | 43 | 日期 44 | {{item.date}}({{item.week}}周-周{{item.day}}) 45 | 46 | 47 | 时间 48 | {{item.time}}({{item.lesson}}) 49 | 50 | 51 | 地点 52 | {{item.room}} 53 | 54 | 55 | 座位号 56 | {{item.number}} 57 | 58 | 59 | 60 | 主监考 61 | {{item.main_supervisor}} 62 | 63 | 64 | 副监考 65 | {{item.supervisor?item.supervisor:'无'}} 66 | 67 | 68 | 69 | 任课教师 70 | {{item.teacher?item.teacher:'无'}} 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /pages/core/ks/ks.wxss: -------------------------------------------------------------------------------- 1 | /**ks.wxss**/ 2 | .container{ 3 | padding-left: 30rpx; 4 | padding-right: 30rpx; 5 | background-color: #f7f7f7; 6 | } 7 | .ks-header{ 8 | display: flex; 9 | flex-flow: row nowrap; 10 | justify-content: space-between; 11 | align-items: center; 12 | padding: 50rpx 0; 13 | } 14 | .ks-text{ 15 | display: flex; 16 | flex-flow: column nowrap; 17 | justify-content: flex-start; 18 | padding-left: 25rpx; 19 | } 20 | .ks-header-title{ 21 | font-size: 20pt; 22 | font-weight: bold; 23 | line-height: 150%; 24 | margin-bottom: 15rpx; 25 | color: #222; 26 | } 27 | .ks-header-info, .ks-header-info-ksName{ 28 | font-size: 11pt; 29 | line-height: 160%; 30 | color: #888; 31 | } 32 | 33 | .ks-bg{ 34 | display: block; 35 | width: 200rpx; 36 | height: 200rpx; 37 | padding-right: 5rpx; 38 | opacity: .3; 39 | } 40 | 41 | .ks-class-ctn{ 42 | display: flex; 43 | flex-flow: column nowrap; 44 | align-items: stretch; 45 | } 46 | 47 | .ks-class-item { 48 | display: flex; 49 | flex-direction: column; 50 | font-size: 11pt; 51 | padding: 0 40rpx; 52 | margin-bottom: 20rpx; 53 | background-color: #fff; 54 | border-radius: 3px; 55 | } 56 | .ks-hd { 57 | display: flex; 58 | align-items: center; 59 | justify-content: space-between; 60 | height: 145rpx; 61 | } 62 | 63 | .ks-hd-left { 64 | flex: 1; 65 | display: flex; 66 | flex-direction: column; 67 | overflow: hidden; 68 | padding-right: 30rpx; 69 | } 70 | 71 | /**列表展开时标题的颜色变化 **/ 72 | .ks-hd-name { 73 | font-size: 12pt; 74 | line-height: 225%; 75 | letter-spacing: 1px; 76 | transition: color .15s ease-in-out; 77 | overflow: hidden; 78 | white-space: nowrap; 79 | text-overflow: ellipsis; 80 | } 81 | .ks-item-show .ks-hd-name { 82 | transition: color .15s ease-in-out; 83 | color: #7acfa6; 84 | } 85 | .ks-hd-other { 86 | font-size: 10pt; 87 | line-height: 100%; 88 | color: #aaa; 89 | } 90 | .ks-item-show .ks-hd-place { 91 | display: none; 92 | } 93 | 94 | /**列表展开的icon旋转 **/ 95 | .ks-item-icon{ 96 | flex-shrink: 0; 97 | width: 30rpx; 98 | height: 30rpx; 99 | transition: transform .2s; 100 | transform: rotate(0deg); 101 | } 102 | .ks-item-show .ks-item-icon{ 103 | transform: rotate(180deg); 104 | } 105 | 106 | .ks-detail { 107 | display: none; 108 | flex-direction: column; 109 | overflow: hidden; 110 | padding: 0; 111 | } 112 | .ks-item-show .ks-detail { 113 | display: flex; 114 | padding: 5rpx 0 15rpx; 115 | } 116 | .ks-detail-item { 117 | display: flex; 118 | align-items: center; 119 | padding: 25rpx 5rpx 20rpx; 120 | border-top: 1px solid #eee; 121 | } 122 | .ks-detail-label { 123 | color: #888; 124 | width: 55pt; 125 | } 126 | .ks-detail-content { 127 | flex: 1; 128 | } 129 | .ks-jxb { 130 | /*background: url('/images/core/xs.png') no-repeat;*/ 131 | /*微信暂不支持静态bgimg文件,改用服务器url*/ 132 | background: url('https://we.cqu.pt/app/images/core/xs.png') no-repeat; 133 | background-size: 30rpx 30rpx; 134 | background-position: 0 50%; 135 | padding-left: 40rpx; 136 | color: #888; 137 | } -------------------------------------------------------------------------------- /pages/core/sdf/sdf.js: -------------------------------------------------------------------------------- 1 | //sdf.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | userName: '', 8 | renderData: {} 9 | }, 10 | 11 | onLoad: function () { 12 | var _this = this; 13 | if (!app._user.we.info.name || !app._user.we.info.id) { 14 | _this.setData({ 15 | remind: '未绑定帐号' 16 | }); 17 | return false; 18 | } 19 | if (!app._user.we.room || !app._user.we.build) { 20 | _this.setData({ 21 | remind: '未完善寝室信息' 22 | }); 23 | return false; 24 | } 25 | _this.setData({ 26 | userName: app._user.we.info.name, 27 | userYkth: app._user.we.ykth 28 | }); 29 | //判断并读取缓存 30 | if (app.cache.sdf) { sdfRender(app.cache.sdf); } 31 | function sdfRender(info) { 32 | _this.setData({ 33 | 'renderData': info, 34 | 'renderData.room_name': info.room.split('-').join('栋'), 35 | 'renderData.record_time': info.record_time.split(' ')[0].split('/').join('-'), 36 | remind: '' 37 | }); 38 | } 39 | wx.showNavigationBarLoading(); 40 | // 发送请求 41 | wx.request({ 42 | url: app._server + '/api/get_elec.php', 43 | method: 'POST', 44 | data: app.key({ 45 | openid: app._user.openid, 46 | buildingNo: app._user.we.build, 47 | floor: app._user.we.room.slice(0, 1), 48 | room: parseInt(app._user.we.room.slice(1)) 49 | }), 50 | success: function (res) { 51 | if (res.data && res.data.status === 200) { 52 | var info = res.data.data; 53 | if (info) { 54 | //保存电费缓存 55 | app.saveCache('sdf', info); 56 | sdfRender(info); 57 | } else { _this.setData({ remind: '暂无数据' }); } 58 | 59 | } else { 60 | app.removeCache('sdf'); 61 | _this.setData({ 62 | remind: res.data.message || '未知错误' 63 | }); 64 | } 65 | }, 66 | fail: function (res) { 67 | if (_this.data.remind == '加载中') { 68 | _this.setData({ 69 | remind: '网络错误' 70 | }); 71 | } 72 | console.warn('网络错误'); 73 | }, 74 | complete: function () { 75 | wx.hideNavigationBarLoading(); 76 | } 77 | }); 78 | } 79 | }); -------------------------------------------------------------------------------- /pages/core/sdf/sdf.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#ffcb63", 3 | "navigationBarTitleText": "电费查询", 4 | "backgroundColor": "#ffcb63", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/sdf/sdf.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{remind}} 9 | 前往完善 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{renderData.room_name}}寝室 19 | 修改寝室 20 | 21 | 22 | {{userName}}({{userYkth}}) 23 | 截至时间:{{renderData.record_time}} 24 | 25 | 26 | 27 | 28 | 29 | 当月用电 30 | 31 | {{renderData.elec_spend}}度 32 | 33 | 34 | 35 | 36 | 免费额度剩余 37 | 38 | {{-renderData.elec_cost}}元 39 | 40 | 41 | 42 | 当月电费用超 43 | 44 | {{renderData.elec_cost}}元 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 电起度 53 | {{renderData.elec_start}} 54 | 55 | 56 | 57 | 电止度 58 | {{renderData.elec_end}} 59 | 60 | 61 | 62 | 每月免费电量 63 | {{renderData.elec_free}} 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /pages/core/sdf/sdf.wxss: -------------------------------------------------------------------------------- 1 | /**sdf.wxss**/ 2 | .container{ 3 | box-sizing: border-box; 4 | padding: 30rpx; 5 | background: #fefefe; 6 | } 7 | .remind-btn { 8 | background-color: #ffcb63; 9 | border-color: #e0b358; 10 | } 11 | .result-page { 12 | display: flex; 13 | flex-flow: column; 14 | align-items: stretch; 15 | font-size: 11pt; 16 | } 17 | .result-model { 18 | display: flex; 19 | flex-flow: column; 20 | border-radius: 3px; 21 | color: #666; 22 | background-color: #faf9f7; 23 | overflow: hidden; 24 | } 25 | 26 | .result-userInfo { 27 | 28 | display: flex; 29 | align-items: stretch; 30 | padding: 35rpx 30rpx; 31 | } 32 | 33 | .userInfo-dormitory { 34 | 35 | display: flex; 36 | align-items: center; 37 | justify-content: space-between; 38 | margin: 10rpx 0 20rpx; 39 | } 40 | .dormitory-info { 41 | font-size: 20pt; 42 | line-height: 150%; 43 | letter-spacing: 1px; 44 | } 45 | .dormitory-resetBtn { 46 | font-size: 9pt; 47 | padding: 5rpx 20rpx; 48 | text-align: center; 49 | background-color: #ffcb63; 50 | border-radius: 3px; 51 | color: #fff; 52 | } 53 | 54 | .userInfo-basic { 55 | 56 | display: flex; 57 | align-items: center; 58 | justify-content: space-between; 59 | color: #888; 60 | } 61 | .basic-name { 62 | font-size: 11pt; 63 | line-height: 150%; 64 | } 65 | .basic-time { 66 | font-size: 10pt; 67 | } 68 | 69 | .result-chargeInfo { 70 | 71 | display: flex; 72 | flex-direction: row; 73 | margin: 20rpx 0; 74 | } 75 | .chargeInfo-model { 76 | 77 | flex: 1; 78 | padding: 35rpx 30rpx; 79 | } 80 | 81 | .chargeInfo-num { 82 | 83 | margin-right: 10rpx; 84 | } 85 | .chargeInfo-cost { 86 | 87 | margin-left: 10rpx; 88 | } 89 | .chargeInfo-model-title{ 90 | 91 | margin-bottom: 30rpx; 92 | } 93 | .chargeInfo-model-info { 94 | 95 | text-align: center; 96 | } 97 | .model-info { 98 | 99 | color: #777; 100 | font-weight: bold; 101 | font-size: 40pt; 102 | line-height: 120%; 103 | padding: 0 15rpx 0 20rpx; 104 | } 105 | 106 | .result-specificInfo { 107 | 108 | padding: 35rpx 30rpx; 109 | } 110 | .specificInfo-item { 111 | 112 | display: flex; 113 | justify-content: space-between; 114 | padding: 25rpx 0; 115 | } 116 | .specificInfo-item-label{ 117 | flex: 1; 118 | } 119 | .specificInfo-item-value{ 120 | 121 | color: #888; 122 | font-weight: bold; 123 | font-size: 12pt; 124 | margin-right: 10rpx; 125 | } 126 | 127 | .sdf-bg{ 128 | position: fixed; 129 | width: 750rpx; 130 | height: 90rpx; 131 | bottom: -2rpx; 132 | left: 0; 133 | right: 0; 134 | } -------------------------------------------------------------------------------- /pages/core/xf/xf.js: -------------------------------------------------------------------------------- 1 | //xf.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | xfData: [], // 学费数据 8 | stuInfo: {}, // 学生数据 9 | listAnimation: {} // 列表动画 10 | }, 11 | 12 | // 页面加载 13 | onLoad: function () { 14 | var _this = this; 15 | if (!app._user.we.info.id || !app._user.we.info.name) { 16 | _this.setData({ 17 | remind: '未绑定' 18 | }); 19 | return false; 20 | } 21 | _this.setData({ 22 | id: app._user.we.info.id, 23 | name: app._user.we.info.name 24 | }); 25 | //判断并读取缓存 26 | if (app.cache.xf) { xfRender(app.cache.xf); } 27 | function xfRender(info) { 28 | // 为每一个学年设置是否显示当前学年学费详情的标志open, false表示不显示 29 | var list = info.reverse(); 30 | for (var i = 0, len = list.length; i < len; ++i) { 31 | list[i].open = false; 32 | } 33 | list[0].open = true; 34 | _this.setData({ 35 | remind: '', 36 | xfData: list, 37 | stuInfo: { 38 | sno: list[0].StuID, 39 | sname: list[0].StuName, 40 | remind: '' 41 | } 42 | }); 43 | } 44 | wx.showNavigationBarLoading(); 45 | wx.request({ 46 | url: app._server + "/api/get_jzsf.php", 47 | method: 'POST', 48 | data: app.key({ 49 | openid: app._user.openid, 50 | id: app._user.we.info.id 51 | }), 52 | success: function (res) { 53 | 54 | if (res.data && res.data.status === 200) { 55 | var info = res.data.data; 56 | if (info) { 57 | //保存学费缓存 58 | app.saveCache('xf', info); 59 | xfRender(info); 60 | } else { _this.setData({ remind: '暂无数据' }); } 61 | 62 | } else { 63 | app.removeCache('xf'); 64 | _this.setData({ 65 | remind: res.data.message || '未知错误' 66 | }); 67 | } 68 | 69 | }, 70 | fail: function (res) { 71 | if (_this.data.remind == '加载中') { 72 | _this.setData({ 73 | remind: '网络错误' 74 | }); 75 | } 76 | console.warn('网络错误'); 77 | }, 78 | complete: function () { 79 | wx.hideNavigationBarLoading(); 80 | } 81 | }); 82 | }, 83 | 84 | // 展示学费详情 85 | slideDetail: function (e) { 86 | 87 | var id = e.currentTarget.id, 88 | list = this.data.xfData; 89 | 90 | // 每次点击都将当前open换为相反的状态并更新到视图,视图根据open的值来切换css 91 | for (var i = 0, len = list.length; i < len; ++i) { 92 | if (list[i].Schoolyears == id) { 93 | list[i].open = !list[i].open; 94 | } else { 95 | list[i].open = false; 96 | } 97 | } 98 | this.setData({ 99 | xfData: list 100 | }); 101 | } 102 | }); -------------------------------------------------------------------------------- /pages/core/xf/xf.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#9f8bea", 3 | "navigationBarTitleText": "学费查询", 4 | "backgroundColor": "#9f8bea", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/xf/xf.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{remind}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 学费查询 17 | 18 | 学号:{{id}} 19 | 姓名:{{name}} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {{itemName.Schoolyears}}学年 31 | 32 | 33 | 34 | 35 | 已缴金额 36 | {{itemName.Payed}} 37 | 38 | 39 | 未缴金额 40 | {{itemName.NoPay}} 41 | 42 | 43 | 应缴总金额 44 | {{itemName.TotalPay}} 45 | 46 | 47 | 总学费 48 | {{itemName.TotalTuition}} 49 | 50 | 51 | 学费 52 | {{itemName.MajorTuition}} 53 | 54 | 55 | 学分费 56 | {{itemName.GradeTuition}} 57 | 58 | 59 | 二专费 60 | {{itemName.SecMajorTuition}} 61 | 62 | 63 | 住宿费 64 | {{itemName.ApartmentPay}} 65 | 66 | 67 | 书费 68 | {{itemName.CollectingPay}} 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /pages/core/xf/xf.wxss: -------------------------------------------------------------------------------- 1 | /**xf.wxss**/ 2 | .container { 3 | padding-left: 30rpx; 4 | padding-right: 30rpx; 5 | background-color: #f7f7f7; 6 | } 7 | 8 | /** 学费title **/ 9 | .xf-title-wraper { 10 | display: flex; 11 | justify-content: space-between; 12 | padding: 50rpx 0; 13 | } 14 | .xf-title-info { 15 | display: flex; 16 | flex-direction: column; 17 | justify-content: center; 18 | padding-left: 25rpx; 19 | } 20 | .xf-stu-info { 21 | display: flex; 22 | flex-direction: column; 23 | } 24 | .xf-stu-info text { 25 | font-size: 11pt; 26 | line-height: 160%; 27 | color: #888; 28 | } 29 | .xf-title { 30 | font-size: 20pt; 31 | font-weight: bold; 32 | line-height: 150%; 33 | margin-bottom: 15rpx; 34 | color: #222; 35 | } 36 | .xf-title-icon { 37 | display: block; 38 | width: 200rpx; 39 | height: 200rpx; 40 | padding-right: 5rpx; 41 | opacity: .3; 42 | } 43 | 44 | /** 学费类型 **/ 45 | .xf-types { 46 | display: flex; 47 | flex-direction: column; 48 | } 49 | .xf-type-item { 50 | display: flex; 51 | flex-direction: column; 52 | font-size: 11pt; 53 | padding: 0 40rpx; 54 | margin-bottom: 20rpx; 55 | background-color: #fff; 56 | border-radius: 3px; 57 | } 58 | .xf-head { 59 | display: flex; 60 | align-items: center; 61 | justify-content: space-between; 62 | height: 145rpx; 63 | } 64 | 65 | .xf-detail { 66 | display: none; 67 | flex-direction: column; 68 | overflow: hidden; 69 | padding: 0; 70 | } 71 | .xf-item-show .xf-detail { 72 | display: flex; 73 | padding: 5rpx 0 15rpx; 74 | } 75 | .xf-detail-item { 76 | display: flex; 77 | align-items: center; 78 | padding: 25rpx 5rpx 20rpx; 79 | border-top: 1px solid #eee; 80 | } 81 | .xf-detail-label { 82 | color: #888; 83 | width: 75pt; 84 | } 85 | .xf-detail-content { 86 | flex: 1; 87 | } 88 | 89 | /**列表展开的icon旋转 **/ 90 | .xf-item-icon{ 91 | width: 30rpx; 92 | height: 30rpx; 93 | transition: transform .2s; 94 | transform: rotate(0deg); 95 | } 96 | .xf-item-show .xf-item-icon{ 97 | transform: rotate(180deg); 98 | } 99 | 100 | /**列表展开时标题的颜色变化 **/ 101 | .xf-type-name { 102 | font-size: 12pt; 103 | letter-spacing: 1px; 104 | transition: color .15s ease-in-out; 105 | } 106 | .xf-item-show .xf-type-name { 107 | transition: color .15s ease-in-out; 108 | color: #8271bf; 109 | } 110 | 111 | .xf-TotalTuition, .xf-ApartmentPay, .xf-CollectingPay { 112 | margin-left: 25rpx; 113 | } 114 | .xf-MajorTuition, .xf-GradeTuition, .xf-SecMajorTuition { 115 | margin-left: 50rpx; 116 | } -------------------------------------------------------------------------------- /pages/core/xs/xs.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#9f8bea", 3 | "navigationBarTitleText": "学生查询", 4 | "backgroundColor": "#9f8bea", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/xs/xs.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 23 | 26 |
27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | 学生名单 ({{main.total}}人) 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | {{item.activeName}}{{item.normalXm}} 47 | 48 | 学号:{{item.activeXh}}{{item.normalXh}} 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 87 | 88 | 89 | 90 | 91 | {{main.message}} 92 | 93 | 94 | 95 | 96 | 97 | 98 | 帮助 99 | 100 | 101 | 102 | 1、根据姓名、学号、班级、专业等查询 103 | 104 | 您可以通过输入姓名、学号、班级、专业等学生信息的完整关键词进行精确搜索,也可以输入学生信息的前一部分进行模糊搜索。例如搜索 “闵” ,将会搜索到所有姓‘闵’的同学。 105 | 106 | 2、根据课程教学班查询 107 | 108 | 您可以通过输入 ‘教学班:’+教学班号 进行精确搜索。如搜索 “教学班:SK161572” ,将会搜索到SK161572教学班的学生名单。 109 | 110 | 111 | 112 | 113 | 114 | 115 | 118 |
-------------------------------------------------------------------------------- /pages/core/ykt/ykt.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#ffcb63", 3 | "navigationBarTitleText": "一卡通", 4 | "backgroundColor": "#ffcb63", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/core/ykt/ykt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{remind}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 余额 16 | 17 | {{balance}}元 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 截至时间:{{last_time}} 26 | 卡号:{{ykt_id}} 27 | 28 | 29 | 30 | 近10次交易情况: 31 | 32 | 余额 33 | 交易额 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | {{switchBtn ? "余额" : "交易额"}} 43 | 最近交易 44 | 45 | 46 | 点击上图查看对应交易详情 47 | 48 | 49 | 交易详情 50 | 51 | 52 | 53 | 交易时间 54 | {{tapDetail.time}} 55 | 56 | 57 | 交易类型 58 | {{tapDetail.transaction}} 59 | 60 | 61 | 交易金额 62 | {{(tapDetail.cost>0?'+':'')+tapDetail.cost}} 63 | 64 | 65 | 交易设备 66 | {{tapDetail.device}} 67 | 68 | 69 | 交易地点 70 | {{tapDetail.address}} 71 | 72 | 73 | 交易余额 74 | {{tapDetail.balance}} 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /pages/core/ykt/ykt.wxss: -------------------------------------------------------------------------------- 1 | /**ykt.wxss**/ 2 | .container { 3 | background-color: #f7f7f7; 4 | padding-left: 30rpx; 5 | padding-right: 30rpx; 6 | } 7 | 8 | /* 今日余额 */ 9 | .ykt-card { 10 | display: flex; 11 | flex-direction: column; 12 | height: 350rpx; 13 | margin: 15rpx 50rpx 45rpx; 14 | background: #ffcb63; 15 | border-radius: 15rpx; 16 | box-shadow: 5rpx 5rpx 15rpx #ccc; 17 | } 18 | .ykt-black-line { 19 | width: 100%; 20 | height: 80rpx; 21 | margin: 40rpx 0 0; 22 | background: #7b7b7b; 23 | } 24 | .ykt-content { 25 | flex: 1; 26 | display: flex; 27 | align-items: center; 28 | justify-content: space-between; 29 | } 30 | .ykt-ye { 31 | flex: 1; 32 | display: flex; 33 | flex-direction: column; 34 | padding-right: 50rpx; 35 | color: #777; 36 | } 37 | .ykt-ye-name { 38 | font-size: 11pt; 39 | line-height: 50rpx; 40 | padding-left: 30rpx; 41 | } 42 | .ykt-ye-money { 43 | text-align: center; 44 | font-size: 10pt; 45 | } 46 | .ykt-ye-value { 47 | font-size: 36pt; 48 | font-weight: bold; 49 | line-height: 80rpx; 50 | padding-right: 25rpx; 51 | } 52 | .ykt-img { 53 | display: flex; 54 | align-items: center; 55 | justify-content: center; 56 | width: 200rpx; 57 | } 58 | .ykt-img image { 59 | width: 125rpx; 60 | height: 125rpx; 61 | padding: 20rpx 30rpx; 62 | } 63 | .ykt-card-more { 64 | display: flex; 65 | justify-content: space-between; 66 | align-items: flex-end; 67 | margin: 5rpx 25rpx 10rpx 25rpx; 68 | line-height: 100%; 69 | opacity: .6; 70 | } 71 | .ykt-ye-time { 72 | font-size: 9pt; 73 | } 74 | .ykt-ye-id { 75 | font-size: 10pt; 76 | } 77 | 78 | /* canvas */ 79 | .grid-remind { 80 | padding-left: 40rpx; 81 | color: #999; 82 | margin-bottom: 25rpx; 83 | } 84 | 85 | /* 余额、消费切换按钮 */ 86 | .balance-consumption { 87 | display: flex; 88 | margin: 0 45rpx 10rpx; 89 | border-radius: 5px; 90 | box-shadow: 0 0 10rpx #ddd; 91 | overflow: hidden; 92 | } 93 | .balance-consumption text { 94 | flex: 1; 95 | flex-shrink: 0; 96 | line-height: 150%; 97 | font-size: 10pt; 98 | padding: 12rpx 0; 99 | font-weight: bold; 100 | text-align: center; 101 | background: #fff; 102 | } 103 | .balance-consumption .current-btn { 104 | color: #fff; 105 | background: #ffcb63; 106 | } 107 | 108 | /* 网格 */ 109 | .grid-wraper { 110 | display: flex; 111 | align-items: center; 112 | justify-content: center; 113 | position: relative; 114 | margin-top: 50rpx; 115 | width: 100%; 116 | height: 300px; 117 | } 118 | #ykt-canvas { 119 | position: absolute; 120 | top: 0; 121 | right: 0; 122 | left: 0; 123 | bottom: 0; 124 | z-index: 1; 125 | width: 100%; 126 | height: 100%; 127 | } 128 | 129 | /* 详情竖线 */ 130 | .line { 131 | position: absolute; 132 | z-index: 999; 133 | top: 15px; 134 | height: 265px; 135 | width: 3px; 136 | background: #e78ab0; 137 | } 138 | 139 | /* 横纵坐标的含义 */ 140 | .y-text { 141 | position: absolute; 142 | left: 15rpx; 143 | top: -40rpx; 144 | padding: 0 10rpx; 145 | font-size: 24rpx; 146 | color: #999; 147 | } 148 | .x-text{ 149 | position: absolute; 150 | right: 25rpx; 151 | bottom: -10rpx; 152 | padding: 0 10rpx; 153 | font-size: 24rpx; 154 | color: #999; 155 | } 156 | 157 | /* 详情盒子 */ 158 | .detail-remind { 159 | font-size: 9pt; 160 | line-height: 100%; 161 | color: #aaa; 162 | text-align: center; 163 | margin: 30rpx 5rpx; 164 | } 165 | .ykt-detail-wraper { 166 | display: flex; 167 | flex-direction: column; 168 | margin: 0 30rpx 30rpx; 169 | background: #fff; 170 | border-radius: 3px; 171 | } 172 | .ykt-detail { 173 | display: flex; 174 | flex-direction: column; 175 | padding: 0 10rpx; 176 | overflow: hidden; 177 | } 178 | .ykt-head { 179 | display: flex; 180 | justify-content: center; 181 | align-items: center; 182 | height: 120rpx; 183 | } 184 | .ykt-type-name { 185 | font-size: 11pt; 186 | } 187 | .detail-list { 188 | display: flex; 189 | flex-direction: column; 190 | align-items: stretch; 191 | padding: 0 35rpx 10rpx; 192 | } 193 | .detail-item { 194 | display: flex; 195 | justify-content: space-between; 196 | align-items: center; 197 | padding: 25rpx 5rpx 20rpx; 198 | border-top: 1px solid #eee; 199 | } 200 | .detail-item-label { 201 | color: #888; 202 | width: 60pt; 203 | } 204 | .detail-item-value { 205 | flex: 1; 206 | } -------------------------------------------------------------------------------- /pages/index/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /pages/more/about.js: -------------------------------------------------------------------------------- 1 | //about.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | version: '', 7 | showLog: false 8 | }, 9 | onLoad: function () { 10 | this.setData({ 11 | version: app.version, 12 | year: new Date().getFullYear() 13 | }); 14 | }, 15 | toggleLog: function () { 16 | this.setData({ 17 | showLog: !this.data.showLog 18 | }); 19 | } 20 | }); -------------------------------------------------------------------------------- /pages/more/about.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "关于", 3 | "enablePullDownRefresh": false 4 | } -------------------------------------------------------------------------------- /pages/more/about.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | i 湖工大 12 | {{version}} 13 | 原型内测版 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 102程序员—追☆梦 23 | 24 | Copyright @ {{year}} All Rights Reserved 25 | 26 | -------------------------------------------------------------------------------- /pages/more/about.wxss: -------------------------------------------------------------------------------- 1 | /**about.wxss**/ 2 | .container{ 3 | background: #f4f4f4; 4 | padding: 0; 5 | font-size: 11pt; 6 | } 7 | .header{ 8 | position: relative; 9 | width: 100%; 10 | height: 400rpx; 11 | text-align: center; 12 | box-sizing: border-box; 13 | overflow: hidden; 14 | display: flex; 15 | align-items: center; 16 | justify-content: center; 17 | } 18 | .header .title{ 19 | position: relative; 20 | width: 600rpx; 21 | height: 200rpx; 22 | z-index: 3; 23 | opacity: .95; 24 | } 25 | .black-cover{ 26 | position: absolute; 27 | z-index: 2; 28 | top:0; 29 | left: 0; 30 | width: 100%; 31 | height: 100%; 32 | background: #888; 33 | opacity: .18; 34 | } 35 | .logo{ 36 | position: absolute; 37 | top:0; 38 | left: 0; 39 | z-index: 1; 40 | width: 100%; 41 | height: 750rpx; 42 | border-radius: 10rpx; 43 | margin-top: -175rpx; 44 | filter: blur(15px); 45 | } 46 | .content{ 47 | flex: 1; 48 | } 49 | .version{ 50 | height: 100rpx; 51 | background: #fff; 52 | display: flex; 53 | align-items: center; 54 | padding: 0 45rpx; 55 | box-sizing: border-box; 56 | font-size: 13pt; 57 | color: #666; 58 | border-bottom: 1px #e5e5e5 solid; 59 | } 60 | .version-title{ 61 | flex: 1; 62 | display: flex; 63 | align-items: center; 64 | } 65 | .title-name{ 66 | padding-right: 10rpx; 67 | } 68 | .version-text{ 69 | font-size: 10pt; 70 | line-height: 100%; 71 | color: #7acfa6; 72 | border: 1px solid #7acfa6; 73 | padding: 5rpx 10rpx; 74 | border-radius: 5rpx; 75 | margin-left: 10rpx; 76 | text-align: center; 77 | } 78 | .version-log-link{ 79 | position: relative; 80 | font-size: 12pt; 81 | color: #7acfa6; 82 | } 83 | .version-log-link:active{ 84 | opacity: .8; 85 | } 86 | .update-log::after{ 87 | content: ''; 88 | position: absolute; 89 | right: -3px; 90 | top: -1px; 91 | width: 5px; 92 | height: 5px; 93 | border-radius: 50%; 94 | background: #e55c5c; 95 | } 96 | .log-list{ 97 | display: flex; 98 | flex-direction: column; 99 | align-items: stretch; 100 | } 101 | .describe{ 102 | width: 100%; 103 | box-sizing: border-box; 104 | padding: 20rpx 45rpx 30rpx; 105 | display: flex; 106 | flex-flow: column nowrap; 107 | color: #545454; 108 | line-height: 175%; 109 | background: #fff; 110 | margin-top: 15rpx; 111 | border-top: 1px #e5e5e5 solid; 112 | border-bottom: 1px #e5e5e5 solid; 113 | } 114 | .desc-title{ 115 | display: flex; 116 | font-size: 13pt; 117 | line-height: 200%; 118 | margin-bottom: 15rpx; 119 | } 120 | .desc-v{ 121 | flex: 1; 122 | } 123 | .desc-time{ 124 | font-size: 11pt; 125 | color: #888; 126 | } 127 | .desc-list{ 128 | display: flex; 129 | flex-direction: column; 130 | border-left: 8rpx solid #ddd; 131 | padding-left: 15rpx; 132 | color: #777; 133 | margin-bottom: 15rpx; 134 | font-size: 10pt; 135 | } 136 | .desc-content{ 137 | padding-bottom: 15rpx; 138 | } 139 | .footer{ 140 | display: flex; 141 | flex-direction: column; 142 | font-size: 9pt; 143 | line-height: 150%; 144 | text-align: center; 145 | padding: 100rpx 0 15rpx; 146 | color: #c2c2c2; 147 | } 148 | .footer-lanshan{ 149 | font-size: 10pt; 150 | height: 10pt; 151 | line-height: 10pt; 152 | display: flex; 153 | align-items: center; 154 | justify-content: center; 155 | margin-bottom: 8rpx; 156 | } 157 | .footer-lanshan image{ 158 | width: 10pt; 159 | height: 10pt; 160 | margin-right: 5rpx; 161 | } -------------------------------------------------------------------------------- /pages/more/append.js: -------------------------------------------------------------------------------- 1 | //append.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | building_list: ['1', '2', '3', '4', '5', '6', '8', '9', 8 | '10', '11', '12', '15', '16', '17', '18', '19', 9 | '20', '21', '22', '23A', '23B', '24', '25', '26', '27', '28', '29', 10 | '30', '31', '32', '33', '34', '35', '36', '37', '39'], //寝室楼栋 11 | buildings: ['1栋(知行苑1舍)', '2栋(知行苑2舍)', '3栋(知行苑3舍)', '4栋(知行苑4舍)', '5栋(知行苑5舍)', '6栋(知行苑6舍)', '8栋(宁静苑1舍)', '9栋(宁静苑2舍)', 12 | '10栋(宁静苑3舍)', '11栋(宁静苑4舍)', '12栋(宁静苑5舍)', '15栋(知行苑7舍)', '16栋(知行苑8舍)', '17栋(兴业苑1舍)', '18栋(兴业苑2舍)', '19栋(兴业苑3舍)', 13 | '20栋(兴业苑4舍)', '21栋(兴业苑5舍)', '22栋(兴业苑6舍)', '23A栋(兴业苑7舍)', '23B栋(兴业苑8舍)', '24栋(明理苑1舍)', '25栋(明理苑2舍)', '26栋(明理苑3舍)', '27栋(明理苑4舍)', '28栋(明理苑5舍)', '29栋(明理苑6舍)', 14 | '30栋(明理苑7舍)', '31栋(明理苑8舍)', '32栋(宁静苑6舍)', '33栋(宁静苑7舍)', '34栋(宁静苑8舍)', '35栋(宁静苑9舍)', '36栋(四海苑1舍)', '37栋(四海苑2舍)', '39栋(明理苑9舍)'], // picker-range 15 | ibuilding: false, // picker-index 16 | room_focus: false, 17 | room: '', 18 | volunteer_uid_focus: false, 19 | volunteer_uid: '', 20 | angle: 0 21 | }, 22 | onLoad: function () { 23 | var _this = this; 24 | if (app._user.we.build) { 25 | _this.data.buildings.forEach(function (e, i) { 26 | if (e.split("栋")[0] == app._user.we.build) { 27 | _this.setData({ 28 | ibuilding: i 29 | }); 30 | } 31 | }); 32 | } 33 | if (app._user.we.room) { 34 | _this.setData({ 35 | 'room': app._user.we.room 36 | }); 37 | } 38 | if (app._user.we.volunteer_uid) { 39 | _this.setData({ 40 | 'volunteer_uid': app._user.we.volunteer_uid 41 | }); 42 | } 43 | wx.onAccelerometerChange(function (res) { 44 | var angle = -(res.x * 30).toFixed(1); 45 | if (angle > 14) { angle = 14; } 46 | else if (angle < -14) { angle = -14; } 47 | if (_this.data.angle !== angle) { 48 | _this.setData({ 49 | angle: angle 50 | }); 51 | } 52 | }); 53 | }, 54 | onReady: function () { 55 | var _this = this; 56 | setTimeout(function () { 57 | _this.setData({ 58 | remind: '' 59 | }); 60 | }, 1000); 61 | }, 62 | buildingPicker: function (e) { 63 | this.setData({ 64 | ibuilding: e.detail.value 65 | }); 66 | }, 67 | inputFocus: function (e) { 68 | var id = e.target.id, 69 | newData = {}; 70 | newData[id + '_focus'] = true; 71 | this.setData(newData); 72 | }, 73 | inputBlur: function (e) { 74 | var id = e.target.id, 75 | newData = {}; 76 | newData[id + '_focus'] = false; 77 | this.setData(newData); 78 | }, 79 | roomInput: function (e) { 80 | this.setData({ 81 | 'room': e.detail.value 82 | }); 83 | if (e.detail.value.length >= 4) { 84 | wx.hideKeyboard(); 85 | } 86 | }, 87 | volunteerUidInput: function (e) { 88 | this.setData({ 89 | 'volunteer_uid': e.detail.value 90 | }); 91 | }, 92 | volunteerHelp: function () { 93 | wx.navigateTo({ 94 | url: './help/volunteerHelp', 95 | }) 96 | }, 97 | confirm: function () { 98 | var _this = this; 99 | if (app.g_status) { 100 | app.showErrorModal(app.g_status, '提交失败'); 101 | return; 102 | } 103 | var data = { 104 | openid: app._user.openid 105 | }; 106 | if (!_this.data.ibuilding || !_this.data.room) { 107 | app.showErrorModal('请填写完整的表单信息', '提醒'); 108 | return false; 109 | } 110 | var buildText = _this.data.buildings[_this.data.ibuilding]; 111 | var build = buildText.split("栋")[0]; 112 | data.build = build; 113 | data.room = _this.data.room; 114 | data.volunteer_uid = _this.data.volunteer_uid; 115 | app.showLoadToast(); 116 | wx.request({ 117 | url: app._server + '/api/users/set_info.php', 118 | data: app.key(data), 119 | method: 'POST', 120 | success: function (res) { 121 | if (res.data && res.data.status === 200) { 122 | app.appendInfo(data); 123 | wx.showToast({ 124 | title: '保存成功', 125 | icon: 'success', 126 | duration: 2000 127 | }); 128 | app._user.we.volunteer_uid = _this.data.volunteer_uid; 129 | app._user.we.room = _this.data.room; 130 | app._user.we.build = data.build; 131 | app.removeCache('fw'); 132 | wx.navigateBack(); 133 | } else { 134 | wx.hideToast(); 135 | app.showErrorModal(res.data.message); 136 | } 137 | }, 138 | fail: function (res) { 139 | wx.hideToast(); 140 | app.showErrorModal(res.errMsg); 141 | } 142 | }); 143 | } 144 | }); -------------------------------------------------------------------------------- /pages/more/append.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": " ", 3 | "enablePullDownRefresh": false, 4 | "disableScroll": true 5 | } -------------------------------------------------------------------------------- /pages/more/append.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 完善信息 16 |
17 | 18 | 寝室楼栋 19 | 20 | 请选择寝室楼栋 21 | {{buildings[ibuilding]}} 22 | 23 | 24 | 25 | 寝室号 26 | 27 | 28 | 29 | 志愿号 30 | 31 | 32 | 33 | 不知道志愿号 34 | 35 | 36 |
37 | 38 | 保存 39 | 40 |
41 |
42 |
43 |
-------------------------------------------------------------------------------- /pages/more/append.wxss: -------------------------------------------------------------------------------- 1 | /**append.wxss**/ 2 | @import './login.wxss'; 3 | .container{ 4 | height: auto; 5 | } 6 | .append-title { 7 | position: absolute; 8 | top: 30rpx; 9 | width: 100%; 10 | color: #777; 11 | font-size: 22pt; 12 | line-height: 200%; 13 | text-align: center; 14 | } 15 | .confirm-btn{ 16 | margin-top: 0; 17 | } 18 | .append-form { 19 | padding: 150rpx 0 30rpx; 20 | } 21 | .append-form .input-group { 22 | padding: 20rpx 8rpx; 23 | margin: 30rpx 3%; 24 | } 25 | .append-form .input-label { 26 | font-size: 11pt; 27 | height: 20rpx; 28 | line-height: 20rpx; 29 | padding: 0 20rpx; 30 | } 31 | .append-form .input-group input, 32 | .append-form .input-group picker { 33 | font-size: 11pt; 34 | padding: 0 20rpx; 35 | } 36 | 37 | .volunteer-help { 38 | display: flex; 39 | align-items: center; 40 | justify-content: flex-end; 41 | font-size: 10pt; 42 | color: #bbb; 43 | margin-right: 3%; 44 | opacity: .8; 45 | } 46 | .volunteer-help-img { 47 | width: 11pt; 48 | height: 11pt; 49 | margin: 0 5rpx; 50 | } -------------------------------------------------------------------------------- /pages/more/help/volunteerHelp.js: -------------------------------------------------------------------------------- 1 | // volunteerHelp.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 | }) -------------------------------------------------------------------------------- /pages/more/help/volunteerHelp.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /pages/more/help/volunteerHelp.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{remind}} 8 | 9 | 10 | 11 | 12 | 如何获取志愿者编号 13 | 14 | 15 | 1.进入湖工大志愿者服务网(hut.edu.cn) 16 | 17 | 2.登录后进入用户中心,点击选择基本信息 18 | 19 | 3.复制个人资料中的UID填写资料,一次绑定后便可以永远查看 20 | 21 | 22 | -------------------------------------------------------------------------------- /pages/more/help/volunteerHelp.wxss: -------------------------------------------------------------------------------- 1 | /* volunteerHelp.wxss */ 2 | .container{ 3 | background: #fff; 4 | padding: 0 30rpx; 5 | } 6 | .title{ 7 | font-size: 18pt; 8 | font-weight: bold; 9 | margin-top: 40rpx; 10 | line-height: 140%; 11 | word-break: break-all; 12 | } 13 | .content{ 14 | font-size: 11pt; 15 | line-height: 150%; 16 | padding: 50rpx 15rpx 200rpx; 17 | } 18 | .text { 19 | margin-top: 25rpx; 20 | } -------------------------------------------------------------------------------- /pages/more/issues.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "问题反馈", 3 | "enablePullDownRefresh": false 4 | } -------------------------------------------------------------------------------- /pages/more/issues.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 我的反馈记录({{list.count}}次) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | #{{item.issues}} 17 | 18 | 19 | {{label.name}} 20 | 21 | 已解决 22 | 进行中 23 | 24 | 25 | 26 | {{item.title}} 27 | 28 | 29 | 30 | 31 | 32 | {{item_remind ? item_remind : item.content.body}} 33 | 34 | 35 | 36 | {{comment.user.login}} 37 | {{comment.body}} 38 | 39 | 40 | 41 | 42 | 43 | 该反馈记录仅显示了反馈及回复的内容摘要,若要了解反馈详细,请访问 https://github.com/morge007/ihut/issues i湖工大-Github。 44 | 45 | {{list_remind}} 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 | 您的反馈将会以Issues的形式提交至i湖工大的Github,您可通过访问 https://github.com/morge007/ihut/issues 来了解反馈动态;另注:频繁恶意反馈的用户将取消其反馈资格。 71 | 72 | 提交反馈 73 | 74 | 75 | -------------------------------------------------------------------------------- /pages/more/login.js: -------------------------------------------------------------------------------- 1 | //login.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | remind: '加载中', 7 | help_status: false, 8 | userid_focus: false, 9 | passwd_focus: false, 10 | userid: '', 11 | passwd: '', 12 | angle: 0 13 | }, 14 | onReady: function () { 15 | var _this = this; 16 | setTimeout(function () { 17 | _this.setData({ 18 | remind: '' 19 | }); 20 | }, 1000); 21 | wx.onAccelerometerChange(function (res) { 22 | var angle = -(res.x * 30).toFixed(1); 23 | if (angle > 14) { angle = 14; } 24 | else if (angle < -14) { angle = -14; } 25 | if (_this.data.angle !== angle) { 26 | _this.setData({ 27 | angle: angle 28 | }); 29 | } 30 | }); 31 | }, 32 | bind: function () { 33 | var _this = this; 34 | if (app.g_status) { 35 | app.showErrorModal(app.g_status, '绑定失败'); 36 | return; 37 | } 38 | if (!_this.data.userid || !_this.data.passwd) { 39 | app.showErrorModal('账号及密码不能为空', '提醒'); 40 | return false; 41 | } 42 | if (!app._user.openid) { 43 | app.showErrorModal('未能成功登录', '错误'); 44 | return false; 45 | } 46 | app.showLoadToast('绑定中'); 47 | wx.request({ 48 | method: 'POST', 49 | url: app._server + '/api/users/bind.php', 50 | data: app.key({ 51 | openid: app._user.openid, 52 | yktid: _this.data.userid, 53 | passwd: _this.data.passwd 54 | }), 55 | success: function (res) { 56 | if (res.data && res.data.status === 200) { 57 | app.showLoadToast('请稍候'); 58 | //清除缓存 59 | app.cache = {}; 60 | wx.clearStorage(); 61 | app.getUser(function () { 62 | wx.showToast({ 63 | title: '绑定成功', 64 | icon: 'success', 65 | duration: 1500 66 | }); 67 | if (!app._user.teacher) { 68 | setTimeout(function () { 69 | wx.showModal({ 70 | title: '提示', 71 | content: '部分功能需要完善信息才能正常使用,是否前往完善信息?', 72 | cancelText: '以后再说', 73 | confirmText: '完善信息', 74 | success: function (res) { 75 | if (res.confirm) { 76 | wx.redirectTo({ 77 | url: 'append' 78 | }); 79 | } else { 80 | wx.navigateBack(); 81 | } 82 | } 83 | }); 84 | }, 1500); 85 | } else { 86 | wx.navigateBack(); 87 | } 88 | }); 89 | } else { 90 | wx.hideToast(); 91 | app.showErrorModal(res.data.message, '绑定失败'); 92 | } 93 | }, 94 | fail: function (res) { 95 | wx.hideToast(); 96 | app.showErrorModal(res.errMsg, '绑定失败'); 97 | } 98 | }); 99 | }, 100 | useridInput: function (e) { 101 | this.setData({ 102 | userid: e.detail.value 103 | }); 104 | if (e.detail.value.length >= 7) { 105 | wx.hideKeyboard(); 106 | } 107 | }, 108 | passwdInput: function (e) { 109 | this.setData({ 110 | passwd: e.detail.value 111 | }); 112 | }, 113 | inputFocus: function (e) { 114 | if (e.target.id == 'userid') { 115 | this.setData({ 116 | 'userid_focus': true 117 | }); 118 | } else if (e.target.id == 'passwd') { 119 | this.setData({ 120 | 'passwd_focus': true 121 | }); 122 | } 123 | }, 124 | inputBlur: function (e) { 125 | if (e.target.id == 'userid') { 126 | this.setData({ 127 | 'userid_focus': false 128 | }); 129 | } else if (e.target.id == 'passwd') { 130 | this.setData({ 131 | 'passwd_focus': false 132 | }); 133 | } 134 | }, 135 | tapHelp: function (e) { 136 | if (e.target.id == 'help') { 137 | this.hideHelp(); 138 | } 139 | }, 140 | showHelp: function (e) { 141 | this.setData({ 142 | 'help_status': true 143 | }); 144 | }, 145 | hideHelp: function (e) { 146 | this.setData({ 147 | 'help_status': false 148 | }); 149 | } 150 | }); -------------------------------------------------------------------------------- /pages/more/login.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": " ", 3 | "enablePullDownRefresh": false, 4 | "disableScroll": true 5 | } -------------------------------------------------------------------------------- /pages/more/login.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 29 | 30 | 确认绑定 31 | 32 | 33 | 34 | 35 | 36 | 37 | 帮助 38 | 39 | 40 | 41 | 1、帐号和密码是什么? 42 | 43 | 帐号:统一认证码(校园一卡通卡号) 44 | 密码:初始密码或者已更改密码 45 | 其中初始密码与个人身份证号码相关,采用以下规则:①身份证号码:取最后6位作为密码;②身份证号码最后一位是x的默认大写;③无居民身份证的人员(如国外留学生等),密码与统一认证码相同 46 | 47 | 2、忘记密码? 48 | 49 | 请访问统一身份认证平台(开发中)进行忘记密码操作 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /pages/more/more.js: -------------------------------------------------------------------------------- 1 | //more.js 2 | //获取应用实例 3 | var app = getApp(); 4 | Page({ 5 | data: { 6 | user: {} 7 | }, 8 | onShow: function () { 9 | this.getData(); 10 | }, 11 | getData: function () { 12 | var _this = this; 13 | var days = ['一', '二', '三', '四', '五', '六', '日']; 14 | _this.setData({ 15 | 'user': app._user, 16 | 'time': { 17 | 'term': app._time.term, 18 | 'week': app._time.week, 19 | 'day': days[app._time.day - 1] 20 | }, 21 | 'is_bind': !!app._user.is_bind 22 | }); 23 | } 24 | }); -------------------------------------------------------------------------------- /pages/more/more.json: -------------------------------------------------------------------------------- 1 | { 2 | "enablePullDownRefresh": false 3 | } -------------------------------------------------------------------------------- /pages/more/more.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 38 | 39 | 40 | 41 | 完善信息 42 | 43 | 44 | 45 | 46 | 47 | 48 | 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 | -------------------------------------------------------------------------------- /pages/more/more.wxss: -------------------------------------------------------------------------------- 1 | /**more.wxss**/ 2 | .container{ 3 | background-color: #f6f6f6; 4 | padding: 0; 5 | } 6 | .user-info, .more-btn { 7 | display: flex; 8 | background-color: #fff; 9 | min-height: 85rpx; 10 | border-top: 1px solid #e5e5e5; 11 | border-bottom: 1px solid #e5e5e5; 12 | } 13 | /**user-info**/ 14 | .user-info-box{ 15 | margin-bottom: 40rpx; 16 | } 17 | .user-info { 18 | flex-direction: column; 19 | margin: 30rpx 0 -1px; 20 | padding: 25rpx 30rpx 20rpx; 21 | } 22 | .info-hd { 23 | display: flex; 24 | align-items: center; 25 | } 26 | .bind-btn { 27 | color: #aaa; 28 | } 29 | .user-avatar { 30 | width: 120rpx; 31 | height: 120rpx; 32 | border-radius: 5px; 33 | } 34 | .user-title { 35 | flex: 1; 36 | display: flex; 37 | flex-direction: column; 38 | padding-left: 25rpx; 39 | } 40 | .time-box { 41 | display: flex; 42 | flex-direction: column; 43 | align-items: center; 44 | font-size: 10pt; 45 | line-height: 140%; 46 | color: #aaa; 47 | } 48 | .user-name { 49 | font-size: 16pt; 50 | line-height: 160%; 51 | letter-spacing: 1px; 52 | } 53 | .user-id { 54 | font-size: 11pt; 55 | color: #8b8b8b; 56 | } 57 | .info-bd { 58 | display: flex; 59 | justify-content: space-between; 60 | padding: 25rpx 15rpx 0 5rpx; 61 | font-size: 11pt; 62 | line-height: 150%; 63 | color: #8b8b8b; 64 | } 65 | .info-bd-left, .info-bd-right { 66 | display: flex; 67 | flex-direction: column; 68 | } 69 | .info-bd-left{ 70 | flex-shrink: 0; 71 | padding-right: 30rpx; 72 | } 73 | /**more-list**/ 74 | .more-list { 75 | flex: 1; 76 | display: flex; 77 | flex-direction: column; 78 | } 79 | .more-btn { 80 | align-items: center; 81 | font-size: 13pt; 82 | padding: 0 30rpx; 83 | } 84 | .issue-link, .about-link { 85 | margin-bottom: 20rpx; 86 | } 87 | .btn-icon { 88 | width: 45rpx; 89 | height: 45rpx; 90 | margin-right: 15rpx; 91 | } 92 | .btn-text { 93 | flex: 1; 94 | } 95 | .btn-open { 96 | display: flex; 97 | align-items: center; 98 | justify-content: flex-end; 99 | margin-left: 10rpx; 100 | } 101 | .btn-enter { 102 | width: 18rpx; 103 | height: 27rpx; 104 | } 105 | .login-btn { 106 | font-size: 13pt; 107 | line-height: 85rpx; 108 | height: 85rpx; 109 | background: #e55c5c; 110 | color: #fff; 111 | text-align: center; 112 | border-radius: 5px; 113 | margin: 40rpx 3%; 114 | } -------------------------------------------------------------------------------- /pages/news/detail/detail.js: -------------------------------------------------------------------------------- 1 | //detail.js (common) 2 | var app = getApp(); 3 | module.exports.ipage = { 4 | data: { 5 | remind: "加载中", 6 | id: "", 7 | title: "", // 新闻标题 8 | date: "", // 发布日期 9 | author: "", // 发布作者 10 | reading: "", // 阅读量 11 | content: "", // 新闻内容 12 | files_len: 0, // 附件数量 13 | files_list: [], 14 | file_loading: false, //下载状态 15 | source: '', // 附件来源 16 | sources: { 17 | 'jw': '教务在线', 18 | 'oa': 'OA系统', 19 | 'hy': 'OA系统', 20 | 'jz': 'OA系统', 21 | 'new': '新闻中心' 22 | } 23 | }, 24 | //分享 25 | onShareAppMessage: function () { 26 | var _this = this; 27 | return { 28 | title: _this.data.title, 29 | desc: 'i湖工大 - 资讯详情', 30 | path: 'pages/news/' + _this.data.type + '/' + _this.data.type + '_detail?type=' + _this.data.type + '&id=' + _this.data.id 31 | } 32 | }, 33 | 34 | convertHtmlToText: function (inputText) { 35 | var returnText = "" + inputText; 36 | returnText = returnText.replace(/<\/?[^>]*>/g, '').replace(/[ | ]*\n/g, '\n').replace(/ /ig, '') 37 | .replace(/&mdash/gi, '-').replace(/&ldquo/gi, '“').replace(/&rdquo/gi, '”'); 38 | return returnText; 39 | }, 40 | 41 | onLoad: function (options) { 42 | var _this = this; 43 | app.loginLoad(function () { 44 | _this.loginHandler.call(_this, options); 45 | }); 46 | }, 47 | loginHandler: function (options) { 48 | var _this = this; 49 | 50 | if (!options.type || !options.id) { 51 | _this.setData({ 52 | remind: '404' 53 | }); 54 | return false; 55 | } 56 | _this.setData({ 57 | 'type': options.type, 58 | id: options.id 59 | }); 60 | options.openid = app._user.openid; 61 | wx.request({ 62 | url: app._server + '/api/get_news_detail.php', 63 | data: options, 64 | success: function (res) { 65 | if (res.data && res.data.status === 200) { 66 | var info = res.data.data; 67 | // 提取信息中的时间,作者,阅读量 68 | var author_info = []; 69 | if (info.author) { 70 | author_info = info.author.split(' ').map(function (e) { 71 | return e.split(':')[1]; 72 | }); 73 | } 74 | _this.setData({ 75 | date: author_info[0] || info.time || "", // 发布日期 76 | author: author_info[1] || "", // 发布作者 77 | reading: author_info[2] || "", // 阅读量 78 | title: info.title, //新闻标题 79 | content: _this.convertHtmlToText(info.body), // 新闻内容 80 | source: _this.data.sources[options.type], 81 | remind: '' 82 | }); 83 | 84 | // 如果存在附件则提取附件里面的信息 85 | if (info.fjlist && info.fjlist.length) { 86 | info.fjlist.map(function (e) { 87 | //判断是否支持预览 88 | e.preview = (e.fjtitle.search(/\.doc|.xls|.ppt|.pdf|.docx|.xlsx|.pptx$/) !== -1); 89 | return e; 90 | }); 91 | _this.setData({ 92 | files_len: info.fjlist.length, 93 | files_list: info.fjlist 94 | }); 95 | } 96 | } else { 97 | app.showErrorModal(res.data.message); 98 | _this.setData({ 99 | remind: res.data.message || '未知错误' 100 | }); 101 | } 102 | }, 103 | fail: function () { 104 | app.showErrorModal(res.errMsg); 105 | _this.setData({ 106 | remind: '网络错误' 107 | }); 108 | } 109 | }) 110 | }, 111 | 112 | getFj: function (e) { 113 | var _this = this; 114 | if (!e.currentTarget.dataset.preview) { 115 | app.showErrorModal('不支持该格式文件预览!', '无法预览'); 116 | return; 117 | } 118 | wx.showModal({ 119 | title: '提示', 120 | content: '预览或下载附件需要消耗流量,是否继续?', 121 | confirmText: '继续', 122 | success: function (res) { 123 | if (res.confirm) { 124 | app.showLoadToast('下载中,请稍候'); 125 | wx.showNavigationBarLoading(); 126 | _this.setData({ 127 | file_loading: true 128 | }); 129 | //下载 130 | wx.downloadFile({ 131 | url: e.currentTarget.dataset.url, 132 | success: function (res) { 133 | var filePath = res.tempFilePath; 134 | //预览 135 | wx.openDocument({ 136 | filePath: filePath, 137 | success: function (res) { 138 | console.info('预览成功'); 139 | }, 140 | fail: function (res) { 141 | app.showErrorModal(res.errMsg, '预览失败'); 142 | }, 143 | complete: function () { 144 | wx.hideNavigationBarLoading(); 145 | wx.hideToast(); 146 | _this.setData({ 147 | file_loading: false 148 | }); 149 | } 150 | }); 151 | }, 152 | fail: function (res) { 153 | app.showErrorModal(res.errMsg, '下载失败'); 154 | wx.hideNavigationBarLoading(); 155 | wx.hideToast(); 156 | _this.setData({ 157 | file_loading: false 158 | }); 159 | } 160 | }); 161 | } 162 | } 163 | }); 164 | } 165 | }; -------------------------------------------------------------------------------- /pages/news/detail/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{remind}} 8 | 9 | 10 | 11 | 12 | {{title}} 13 | 14 | 15 | 发布时间:{{date}} 16 | 作者:{{author}} 17 | 阅读量:{{reading}} 18 | 19 | {{content}} 20 | 21 | 22 | 23 | 24 | 25 | {{item.fjtitle}} 26 | {{source}} 27 | 28 | 29 | 30 | {{item.preview ? '点击预览' : '无法预览'}} 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /pages/news/detail/detail.wxss: -------------------------------------------------------------------------------- 1 | /**detail.wxss**/ 2 | .container{ 3 | background: #fff; 4 | padding: 0 30rpx; 5 | } 6 | .title{ 7 | font-size: 18pt; 8 | font-weight: bold; 9 | margin-top: 40rpx; 10 | line-height: 140%; 11 | word-break: break-all; 12 | } 13 | .info{ 14 | margin-top: 30rpx; 15 | color: #b2b2b2; 16 | } 17 | .info text{ 18 | padding: 0 20rpx 0 5rpx; 19 | } 20 | .detail{ 21 | font-size: 11pt; 22 | line-height: 150%; 23 | padding: 50rpx 15rpx 200rpx; 24 | word-break: break-all; 25 | text-align: justify; 26 | } 27 | .files_list { 28 | position: fixed; 29 | bottom: -10rpx; 30 | left: 0; 31 | right: 0; 32 | height: 190rpx; 33 | display: flex; 34 | flex-direction: column; 35 | align-items: stretch; 36 | } 37 | .file{ 38 | padding: 0 30rpx 0 50rpx; 39 | height: 140rpx; 40 | margin: 0 30rpx; 41 | background-color: #fcfcfc; 42 | border: 1rpx solid #ececec; 43 | border-radius: 3px; 44 | display: flex; 45 | justify-content: space-between; 46 | align-items: center; 47 | } 48 | .file:active{ 49 | background-color: #fff; 50 | } 51 | .fileNameSource{ 52 | flex: 1 1 auto; 53 | display: flex; 54 | flex-direction: column; 55 | overflow: hidden; 56 | padding-left: 40rpx; 57 | } 58 | .file-name{ 59 | font-size: 11pt; 60 | line-height: 150%; 61 | white-space: nowrap; 62 | text-overflow: ellipsis; 63 | width: 100%; 64 | overflow: hidden; 65 | } 66 | .file-source{ 67 | font-size: 10pt; 68 | color: #919191; 69 | } 70 | .file-remind{ 71 | flex: 0 0 25pt; 72 | width: 25pt; 73 | height: 25pt; 74 | font-size: 10pt; 75 | text-align: center; 76 | padding: 0 10rpx; 77 | } 78 | .file-remind image { 79 | width: 100%; 80 | height: 100%; 81 | } 82 | .file-img{ 83 | flex: 0 0 39rpx; 84 | width: 39rpx; 85 | height: 48rpx; 86 | } -------------------------------------------------------------------------------- /pages/news/hy/hy_detail.js: -------------------------------------------------------------------------------- 1 | //ht_detal.js 2 | var detail = require('../detail/detail.js'); 3 | // 获取应用实例 4 | var app = getApp(); 5 | Page(detail.ipage); -------------------------------------------------------------------------------- /pages/news/hy/hy_detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#ffcb63", 3 | "navigationBarTitleText": "会议通知", 4 | "backgroundColor": "#ffcb63", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/news/hy/hy_detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pages/news/hy/hy_detail.wxss: -------------------------------------------------------------------------------- 1 | /**hy_detail.wxss**/ 2 | @import "../detail/detail.wxss"; -------------------------------------------------------------------------------- /pages/news/jw/jw_detail.js: -------------------------------------------------------------------------------- 1 | //jw_detail.js 2 | var detail = require('../detail/detail.js'); 3 | //获取应用实例 4 | var app = getApp(); 5 | Page(detail.ipage); -------------------------------------------------------------------------------- /pages/news/jw/jw_detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#9f8bea", 3 | "navigationBarTitleText": "教务公告", 4 | "backgroundColor": "#9f8bea", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/news/jw/jw_detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pages/news/jw/jw_detail.wxss: -------------------------------------------------------------------------------- 1 | /**jw_detail.wxss**/ 2 | @import "../detail/detail.wxss"; -------------------------------------------------------------------------------- /pages/news/jz/jz_detail.js: -------------------------------------------------------------------------------- 1 | //jz_detail.js 2 | var detail = require('../detail/detail.js'); 3 | //获取应用实例 4 | var app = getApp(); 5 | Page(detail.ipage); -------------------------------------------------------------------------------- /pages/news/jz/jz_detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#e78ab0", 3 | "navigationBarTitleText": "学术讲座", 4 | "backgroundColor": "#e78ab0", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/news/jz/jz_detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pages/news/jz/jz_detail.wxss: -------------------------------------------------------------------------------- 1 | /**jz_detail.wxss**/ 2 | @import "../detail/detail.wxss"; -------------------------------------------------------------------------------- /pages/news/new/new_detail.js: -------------------------------------------------------------------------------- 1 | //new_detail.js 2 | var detail = require('../detail/detail.js'); 3 | //获取应用实例 4 | var app = getApp(); 5 | Page(detail.ipage); -------------------------------------------------------------------------------- /pages/news/new/new_detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#7acfa6", 3 | "navigationBarTitleText": "综合新闻", 4 | "backgroundColor": "#7acfa6", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/news/new/new_detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pages/news/new/new_detail.wxss: -------------------------------------------------------------------------------- 1 | /**new_detail.wxss**/ 2 | @import "../detail/detail.wxss"; -------------------------------------------------------------------------------- /pages/news/news.json: -------------------------------------------------------------------------------- 1 | { 2 | "backgroundColor": "#ffffff", 3 | "backgroundTextStyle": "dark" 4 | } -------------------------------------------------------------------------------- /pages/news/news.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{item.title}} 21 | {{item.time}} 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | {{active.remind}} 30 | 31 | 32 | 无权限查阅 33 | 34 | -------------------------------------------------------------------------------- /pages/news/news.wxss: -------------------------------------------------------------------------------- 1 | 2 | /**news.wxss**/ 3 | .container{ 4 | background-color: #fff; 5 | padding-bottom: 20rpx; 6 | } 7 | .filter{ 8 | position: fixed; 9 | z-index: 1; 10 | width: 100%; 11 | height: 160rpx; 12 | white-space: nowrap; 13 | background: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,1)), color-stop(0.93, rgba(255,255,255,.93)), to(rgba(255,255,255,0))); 14 | } 15 | .filter-item{ 16 | width: 120rpx; 17 | height: 120rpx; 18 | margin: 20rpx; 19 | margin-left: 0; 20 | border-radius: 5rpx; 21 | box-shadow: 1px 2px 3px #e5e5e5; 22 | opacity: .66; 23 | } 24 | .filter-item#all{ 25 | margin-left: 20rpx; 26 | } 27 | .filter-item.active{ 28 | opacity: 1; 29 | transform: scale(1.08,1.08); 30 | box-shadow: 1px 2px 3px #ddd; 31 | } 32 | .loader{ 33 | display: inline-block; 34 | width: 100%; 35 | height: 160rpx; 36 | line-height: 160rpx; 37 | margin-top: -160rpx; 38 | letter-spacing: 10rpx; 39 | text-align: center; 40 | box-sizing: border-box; 41 | padding-top: 40rpx; 42 | } 43 | .loader image{ 44 | height: 80rpx; 45 | width: 80rpx; 46 | } 47 | .content{ 48 | display: flex; 49 | flex-direction: column; 50 | padding: 160rpx 20rpx 0; 51 | } 52 | .content-ending{ 53 | width: 100%; 54 | color: #bbb; 55 | text-align: center; 56 | margin: 30rpx auto; 57 | } 58 | .list-item{ 59 | display: flex; 60 | align-items: center; 61 | justify-content: space-between; 62 | height: 120rpx; 63 | margin-bottom: 20rpx; 64 | border-radius: 3px; 65 | box-shadow: 1px 2px 3px #ddd; 66 | padding: 0 30rpx; 67 | color: #fff; 68 | } 69 | .list-item.jw{ 70 | background-color: #9f8bea; 71 | } 72 | .list-item.oa{ 73 | background-color: #73b4ef; 74 | } 75 | .list-item.hy{ 76 | background-color: #ffcb63; 77 | } 78 | .list-item.jz{ 79 | background-color: #e78ab0; 80 | } 81 | .list-item.new{ 82 | background-color: #7acfa6; 83 | } 84 | .list-item-left{ 85 | flex: 1 1 auto; 86 | display: flex; 87 | flex-direction: column; 88 | overflow: hidden; 89 | padding-right: 10rpx; 90 | } 91 | .list-item-title{ 92 | font-size: 13pt; 93 | line-height: 175%; 94 | white-space: nowrap; 95 | text-overflow: ellipsis; 96 | width: 100%; 97 | overflow: hidden; 98 | } 99 | .list-item-time{ 100 | font-size: 10pt; 101 | line-height: 125%; 102 | opacity: 0.6; 103 | } 104 | .list-item-icon{ 105 | flex: 0 0 60rpx; 106 | height: 60rpx; 107 | width: 60rpx; 108 | border-left: 1px solid #fff; 109 | padding-left: 25rpx; 110 | } -------------------------------------------------------------------------------- /pages/news/oa/oa_detail.js: -------------------------------------------------------------------------------- 1 | //oa_detail.js 2 | var detail = require('../detail/detail.js'); 3 | //获取应用实例 4 | var app = getApp(); 5 | Page(detail.ipage); -------------------------------------------------------------------------------- /pages/news/oa/oa_detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#73b4ef", 3 | "navigationBarTitleText": "OA公告", 4 | "backgroundColor": "#73b4ef", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/news/oa/oa_detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pages/news/oa/oa_detail.wxss: -------------------------------------------------------------------------------- 1 | /**oa_detail.wxss**/ 2 | @import "../detail/detail.wxss"; -------------------------------------------------------------------------------- /project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件。", 3 | "setting": { 4 | "urlCheck": true, 5 | "es6": true, 6 | "postcss": true, 7 | "minified": true, 8 | "newFeature": true 9 | }, 10 | "compileType": "miniprogram", 11 | "libVersion": "1.9.94", 12 | "appid": "wxaa258d082924fe62", 13 | "projectname": "ihut", 14 | "svr": "", 15 | "client": "", 16 | "qcloudRoot": "", 17 | "miniprogramRoot": "", 18 | "pluginRoot": "", 19 | "condition": { 20 | "search": { 21 | "current": -1, 22 | "list": [] 23 | }, 24 | "conversation": { 25 | "current": -1, 26 | "list": [] 27 | }, 28 | "plugin": { 29 | "current": -1, 30 | "list": [] 31 | }, 32 | "game": { 33 | "list": [] 34 | }, 35 | "miniprogram": { 36 | "current": -1, 37 | "list": [] 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /utils/base64.min.js: -------------------------------------------------------------------------------- 1 | /* base64.js v2.1.9 2 | * https://github.com/dankogai/js-base64 3 | * (做出了一些修改用以适应小程序, 此外请勿擅自修改 @ Cong Min) 4 | */ 5 | (function (global) { "use strict"; var version = "2.1.9"; var b64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var b64tab = function (bin) { var t = {}; for (var i = 0, l = bin.length; i < l; i++)t[bin.charAt(i)] = i; return t }(b64chars); var fromCharCode = String.fromCharCode; var cb_utob = function (c) { if (c.length < 2) { var cc = c.charCodeAt(0); return cc < 128 ? c : cc < 2048 ? fromCharCode(192 | cc >>> 6) + fromCharCode(128 | cc & 63) : fromCharCode(224 | cc >>> 12 & 15) + fromCharCode(128 | cc >>> 6 & 63) + fromCharCode(128 | cc & 63) } else { var cc = 65536 + (c.charCodeAt(0) - 55296) * 1024 + (c.charCodeAt(1) - 56320); return fromCharCode(240 | cc >>> 18 & 7) + fromCharCode(128 | cc >>> 12 & 63) + fromCharCode(128 | cc >>> 6 & 63) + fromCharCode(128 | cc & 63) } }; var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; var utob = function (u) { return u.replace(re_utob, cb_utob) }; var cb_encode = function (ccc) { var padlen = [0, 2, 1][ccc.length % 3], ord = ccc.charCodeAt(0) << 16 | (ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8 | (ccc.length > 2 ? ccc.charCodeAt(2) : 0), chars = [b64chars.charAt(ord >>> 18), b64chars.charAt(ord >>> 12 & 63), padlen >= 2 ? "=" : b64chars.charAt(ord >>> 6 & 63), padlen >= 1 ? "=" : b64chars.charAt(ord & 63)]; return chars.join("") }; var btoa = function (b) { return b.replace(/[\s\S]{1,3}/g, cb_encode) }; var _encode = function (u) { return btoa(utob(u)) }; var encode = function (u, urisafe) { return !urisafe ? _encode(String(u)) : _encode(String(u)).replace(/[+\/]/g, function (m0) { return m0 == "+" ? "-" : "_" }).replace(/=/g, "") }; var encodeURI = function (u) { return encode(u, true) }; var re_btou = new RegExp(["[À-ß][€-¿]", "[à-ï][€-¿]{2}", "[ð-÷][€-¿]{3}"].join("|"), "g"); var cb_btou = function (cccc) { switch (cccc.length) { case 4: var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536; return fromCharCode((offset >>> 10) + 55296) + fromCharCode((offset & 1023) + 56320); case 3: return fromCharCode((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2)); default: return fromCharCode((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1)) } }; var btou = function (b) { return b.replace(re_btou, cb_btou) }; var cb_decode = function (cccc) { var len = cccc.length, padlen = len % 4, n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) | (len > 3 ? b64tab[cccc.charAt(3)] : 0), chars = [fromCharCode(n >>> 16), fromCharCode(n >>> 8 & 255), fromCharCode(n & 255)]; chars.length -= [0, 0, 2, 1][padlen]; return chars.join("") }; var atob = function (a) { return a.replace(/[\s\S]{1,4}/g, cb_decode) }; var _decode = function (a) { return btou(atob(a)) }; var decode = function (a) { return _decode(String(a).replace(/[-_]/g, function (m0) { return m0 == "-" ? "+" : "/" }).replace(/[^A-Za-z0-9\+\/]/g, "")) }; var base64 = { VERSION: version, atob: atob, btoa: btoa, fromBase64: decode, toBase64: encode, utob: utob, encode: encode, encodeURI: encodeURI, btou: btou, decode: decode }; "function" == typeof define && define.amd ? define(function () { return base64 }) : "object" == typeof module && module.exports ? module.exports = base64 : global.base64 = base64 })(this); 6 | -------------------------------------------------------------------------------- /utils/md5.min.js: -------------------------------------------------------------------------------- 1 | /* JavaScript MD5 v2.4.0 2 | * https://github.com/blueimp/JavaScript-MD5 3 | */ 4 | !function (n) { "use strict"; function t(n, t) { var r = (65535 & n) + (65535 & t), e = (n >> 16) + (t >> 16) + (r >> 16); return e << 16 | 65535 & r } function r(n, t) { return n << t | n >>> 32 - t } function e(n, e, o, u, c, f) { return t(r(t(t(e, n), t(u, f)), c), o) } function o(n, t, r, o, u, c, f) { return e(t & r | ~t & o, n, t, u, c, f) } function u(n, t, r, o, u, c, f) { return e(t & o | r & ~o, n, t, u, c, f) } function c(n, t, r, o, u, c, f) { return e(t ^ r ^ o, n, t, u, c, f) } function f(n, t, r, o, u, c, f) { return e(r ^ (t | ~o), n, t, u, c, f) } function i(n, r) { n[r >> 5] |= 128 << r % 32, n[(r + 64 >>> 9 << 4) + 14] = r; var e, i, a, h, d, l = 1732584193, g = -271733879, v = -1732584194, m = 271733878; for (e = 0; e < n.length; e += 16)i = l, a = g, h = v, d = m, l = o(l, g, v, m, n[e], 7, -680876936), m = o(m, l, g, v, n[e + 1], 12, -389564586), v = o(v, m, l, g, n[e + 2], 17, 606105819), g = o(g, v, m, l, n[e + 3], 22, -1044525330), l = o(l, g, v, m, n[e + 4], 7, -176418897), m = o(m, l, g, v, n[e + 5], 12, 1200080426), v = o(v, m, l, g, n[e + 6], 17, -1473231341), g = o(g, v, m, l, n[e + 7], 22, -45705983), l = o(l, g, v, m, n[e + 8], 7, 1770035416), m = o(m, l, g, v, n[e + 9], 12, -1958414417), v = o(v, m, l, g, n[e + 10], 17, -42063), g = o(g, v, m, l, n[e + 11], 22, -1990404162), l = o(l, g, v, m, n[e + 12], 7, 1804603682), m = o(m, l, g, v, n[e + 13], 12, -40341101), v = o(v, m, l, g, n[e + 14], 17, -1502002290), g = o(g, v, m, l, n[e + 15], 22, 1236535329), l = u(l, g, v, m, n[e + 1], 5, -165796510), m = u(m, l, g, v, n[e + 6], 9, -1069501632), v = u(v, m, l, g, n[e + 11], 14, 643717713), g = u(g, v, m, l, n[e], 20, -373897302), l = u(l, g, v, m, n[e + 5], 5, -701558691), m = u(m, l, g, v, n[e + 10], 9, 38016083), v = u(v, m, l, g, n[e + 15], 14, -660478335), g = u(g, v, m, l, n[e + 4], 20, -405537848), l = u(l, g, v, m, n[e + 9], 5, 568446438), m = u(m, l, g, v, n[e + 14], 9, -1019803690), v = u(v, m, l, g, n[e + 3], 14, -187363961), g = u(g, v, m, l, n[e + 8], 20, 1163531501), l = u(l, g, v, m, n[e + 13], 5, -1444681467), m = u(m, l, g, v, n[e + 2], 9, -51403784), v = u(v, m, l, g, n[e + 7], 14, 1735328473), g = u(g, v, m, l, n[e + 12], 20, -1926607734), l = c(l, g, v, m, n[e + 5], 4, -378558), m = c(m, l, g, v, n[e + 8], 11, -2022574463), v = c(v, m, l, g, n[e + 11], 16, 1839030562), g = c(g, v, m, l, n[e + 14], 23, -35309556), l = c(l, g, v, m, n[e + 1], 4, -1530992060), m = c(m, l, g, v, n[e + 4], 11, 1272893353), v = c(v, m, l, g, n[e + 7], 16, -155497632), g = c(g, v, m, l, n[e + 10], 23, -1094730640), l = c(l, g, v, m, n[e + 13], 4, 681279174), m = c(m, l, g, v, n[e], 11, -358537222), v = c(v, m, l, g, n[e + 3], 16, -722521979), g = c(g, v, m, l, n[e + 6], 23, 76029189), l = c(l, g, v, m, n[e + 9], 4, -640364487), m = c(m, l, g, v, n[e + 12], 11, -421815835), v = c(v, m, l, g, n[e + 15], 16, 530742520), g = c(g, v, m, l, n[e + 2], 23, -995338651), l = f(l, g, v, m, n[e], 6, -198630844), m = f(m, l, g, v, n[e + 7], 10, 1126891415), v = f(v, m, l, g, n[e + 14], 15, -1416354905), g = f(g, v, m, l, n[e + 5], 21, -57434055), l = f(l, g, v, m, n[e + 12], 6, 1700485571), m = f(m, l, g, v, n[e + 3], 10, -1894986606), v = f(v, m, l, g, n[e + 10], 15, -1051523), g = f(g, v, m, l, n[e + 1], 21, -2054922799), l = f(l, g, v, m, n[e + 8], 6, 1873313359), m = f(m, l, g, v, n[e + 15], 10, -30611744), v = f(v, m, l, g, n[e + 6], 15, -1560198380), g = f(g, v, m, l, n[e + 13], 21, 1309151649), l = f(l, g, v, m, n[e + 4], 6, -145523070), m = f(m, l, g, v, n[e + 11], 10, -1120210379), v = f(v, m, l, g, n[e + 2], 15, 718787259), g = f(g, v, m, l, n[e + 9], 21, -343485551), l = t(l, i), g = t(g, a), v = t(v, h), m = t(m, d); return [l, g, v, m] } function a(n) { var t, r = "", e = 32 * n.length; for (t = 0; t < e; t += 8)r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255); return r } function h(n) { var t, r = []; for (r[(n.length >> 2) - 1] = void 0, t = 0; t < r.length; t += 1)r[t] = 0; var e = 8 * n.length; for (t = 0; t < e; t += 8)r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32; return r } function d(n) { return a(i(h(n), 8 * n.length)) } function l(n, t) { var r, e, o = h(n), u = [], c = []; for (u[15] = c[15] = void 0, o.length > 16 && (o = i(o, 8 * n.length)), r = 0; r < 16; r += 1)u[r] = 909522486 ^ o[r], c[r] = 1549556828 ^ o[r]; return e = i(u.concat(h(t)), 512 + 8 * t.length), a(i(c.concat(e), 640)) } function g(n) { var t, r, e = "0123456789abcdef", o = ""; for (r = 0; r < n.length; r += 1)t = n.charCodeAt(r), o += e.charAt(t >>> 4 & 15) + e.charAt(15 & t); return o } function v(n) { return unescape(encodeURIComponent(n)) } function m(n) { return d(v(n)) } function p(n) { return g(m(n)) } function s(n, t) { return l(v(n), v(t)) } function C(n, t) { return g(s(n, t)) } function A(n, t, r) { return t ? r ? s(t, n) : C(t, n) : r ? m(n) : p(n) } "function" == typeof define && define.amd ? define(function () { return A }) : "object" == typeof module && module.exports ? module.exports = A : n.md5 = A }(this); 5 | -------------------------------------------------------------------------------- /utils/util.js: -------------------------------------------------------------------------------- 1 | //格式化时间 2 | function formatTime(date, t) { 3 | var year = date.getFullYear(); 4 | var month = date.getMonth() + 1; 5 | var day = date.getDate(); 6 | var hour = date.getHours(); 7 | var minute = date.getMinutes(); 8 | var second = date.getSeconds(); 9 | if (t === 'h:m') { return [hour, minute].map(formatNumber).join(':'); } 10 | else { return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':'); } 11 | } 12 | 13 | function formatNumber(n) { 14 | n = n.toString(); 15 | return n[1] ? n : '0' + n; 16 | } 17 | 18 | //判断是否为纯粹对象 19 | function isPlainObject(obj) { 20 | if (!obj || obj.toString() !== "[object Object]" || obj.nodeType || obj.setInterval) { 21 | return false; 22 | } 23 | if (obj.constructor && !obj.hasOwnProperty("constructor") && !obj.constructor.prototype.hasOwnProperty("isPrototypeOf")) { 24 | return false; 25 | } 26 | for (var key in obj) { } 27 | return key === undefined || obj.hasOwnProperty(key); 28 | } 29 | function cloneObj(obj) { 30 | if (!isPlainObject(obj)) { return false; } 31 | return JSON.parse(JSON.stringify(obj)); 32 | } 33 | 34 | //md5&base64 35 | var md5 = require('md5.min.js'), base64 = require('base64.min.js'), 36 | sign = function (data) { 37 | var _data = cloneObj(data); 38 | _data['\x74\x6f\x6b\x65\x6e'] = base64.decode(getApp()['\x5f\x74']); 39 | return md5(JSON.stringify(_data)); 40 | }, 41 | key = function (data) { 42 | if (!isPlainObject(data)) { return false; } 43 | data.timestamp = parseInt(new Date().getTime().toString().substr(0, 10)); 44 | 45 | data.sign = sign(data); 46 | 47 | return { 48 | key: base64.encode(JSON.stringify(data)) 49 | }; 50 | } 51 | 52 | module.exports = { 53 | formatTime: formatTime, 54 | md5: md5, 55 | base64: base64, 56 | key: key 57 | } --------------------------------------------------------------------------------