├── .github └── workflows │ └── main.yml ├── LICENSE ├── README.md ├── app.js ├── app.json ├── app.wxss ├── colorui ├── animation.wxss ├── components │ ├── cu-custom.js │ ├── cu-custom.json │ ├── cu-custom.wxml │ └── cu-custom.wxss ├── icon.wxss └── main.wxss ├── images ├── BookTag.png ├── book.png ├── book2.png ├── card-bg.png ├── classBoard.png ├── clear.png ├── close.png ├── down_w.png ├── electricity_title.png ├── help.png ├── holiday.png ├── index.png ├── index@active.png ├── info.png ├── loading.gif ├── more.png ├── nav │ ├── jiaoxuelou.png │ ├── location.png │ ├── mapicon_navi_e.png │ ├── mapicon_navi_s.png │ ├── marker.png │ ├── marker_checked.png │ ├── moveSchool.png │ ├── others.png │ ├── shitang.png │ ├── sports.png │ ├── staticMap.png │ ├── sushe.png │ ├── xiaomen.png │ └── xingzheng.png ├── netfare-bg.png ├── nothing.png ├── schoolLogo.png ├── teacherAvatar.png ├── title.png └── wave.png ├── package.json ├── pages ├── books │ ├── bind.js │ ├── bind.json │ ├── bind.wxml │ ├── bind.wxss │ ├── detail.js │ ├── detail.json │ ├── detail.wxml │ ├── detail.wxss │ ├── hot │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── index.js │ ├── index.json │ ├── index.wxml │ ├── index.wxss │ ├── my.js │ ├── my.json │ ├── my.wxml │ ├── my.wxss │ ├── overdue │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── recommend │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── search.js │ ├── search.json │ ├── search.wxml │ ├── search.wxss │ ├── shelf.js │ ├── shelf.json │ ├── shelf.wxml │ └── shelf.wxss ├── course │ ├── content.js │ ├── content.json │ ├── content.wxml │ ├── content.wxss │ ├── my.js │ ├── my.json │ ├── my.wxml │ ├── my.wxss │ ├── search.js │ ├── search.json │ ├── search.wxml │ ├── search.wxss │ └── stulist │ │ ├── content.js │ │ ├── content.json │ │ ├── content.wxml │ │ ├── content.wxss │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss ├── elesys │ ├── bind.js │ ├── bind.json │ ├── bind.wxml │ ├── bind.wxss │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── index │ ├── component │ │ ├── feecard.js │ │ ├── feecard.json │ │ ├── feecard.wxml │ │ ├── feecard.wxss │ │ ├── imagemodal.js │ │ ├── imagemodal.json │ │ ├── imagemodal.wxml │ │ ├── imagemodal.wxss │ │ ├── privacyPopup │ │ │ ├── privacyPopup.js │ │ │ ├── privacyPopup.json │ │ │ └── privacyPopup.wxml │ │ ├── tips.js │ │ ├── tips.json │ │ ├── tips.wxml │ │ └── tips.wxss │ ├── feature.js │ ├── feature.json │ ├── feature.wxml │ ├── feature.wxss │ ├── index.js │ ├── index.json │ ├── index.wxml │ ├── index.wxss │ ├── login.js │ ├── login.json │ ├── login.wxml │ ├── login.wxss │ ├── setting.js │ ├── setting.json │ ├── setting.wxml │ └── setting.wxss ├── netsys │ ├── bind.js │ ├── bind.json │ ├── bind.wxml │ ├── bind.wxss │ ├── index.js │ ├── index.json │ ├── index.wxml │ ├── index.wxss │ ├── list.js │ ├── list.json │ ├── list.wxml │ └── list.wxss ├── school │ ├── aboutus.js │ ├── aboutus.json │ ├── aboutus.wxml │ ├── aboutus.wxss │ ├── board │ │ ├── detail.js │ │ ├── detail.json │ │ ├── detail.wxml │ │ ├── detail.wxss │ │ ├── edit.js │ │ ├── edit.json │ │ ├── edit.wxml │ │ ├── edit.wxss │ │ ├── faq.js │ │ ├── faq.json │ │ ├── faq.wxml │ │ ├── faq.wxss │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── calendar.js │ ├── calendar.json │ ├── calendar.wxml │ ├── calendar.wxss │ ├── card │ │ ├── bind.js │ │ ├── bind.json │ │ ├── bind.wxml │ │ ├── bind.wxss │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── cert.js │ ├── cert.json │ ├── cert.wxml │ ├── cert.wxss │ ├── component │ │ ├── calendarItem.js │ │ ├── calendarItem.json │ │ ├── calendarItem.wxml │ │ └── calendarItem.wxss │ ├── finance │ │ ├── bind.js │ │ ├── bind.json │ │ ├── bind.wxml │ │ ├── bind.wxss │ │ ├── component │ │ │ ├── deferApply │ │ │ │ ├── deferApply.js │ │ │ │ ├── deferApply.json │ │ │ │ ├── deferApply.wxml │ │ │ │ └── deferApply.wxss │ │ │ ├── feeBusiness │ │ │ │ ├── feeBusiness.js │ │ │ │ ├── feeBusiness.json │ │ │ │ ├── feeBusiness.wxml │ │ │ │ └── feeBusiness.wxss │ │ │ ├── feeRecord │ │ │ │ ├── feeRecord.js │ │ │ │ ├── feeRecord.json │ │ │ │ ├── feeRecord.wxml │ │ │ │ └── feeRecord.wxss │ │ │ ├── invoiceApply │ │ │ │ ├── invoiceApply.js │ │ │ │ ├── invoiceApply.json │ │ │ │ ├── invoiceApply.wxml │ │ │ │ └── invoiceApply.wxss │ │ │ ├── orderRecord │ │ │ │ ├── orderRecord.js │ │ │ │ ├── orderRecord.json │ │ │ │ ├── orderRecord.wxml │ │ │ │ └── orderRecord.wxss │ │ │ └── subsidyInfo │ │ │ │ ├── subsidyInfo.js │ │ │ │ ├── subsidyInfo.json │ │ │ │ ├── subsidyInfo.wxml │ │ │ │ └── subsidyInfo.wxss │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── movie.js │ ├── movie.json │ ├── movie.wxml │ ├── movie.wxss │ ├── run │ │ ├── index.js │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── tel.js │ ├── tel.json │ ├── tel.wxml │ ├── tel.wxss │ ├── web.js │ ├── web.json │ ├── web.wxml │ ├── web.wxss │ ├── xiaoai.js │ ├── xiaoai.json │ ├── xiaoai.wxml │ └── xiaoai.wxss ├── score │ ├── score.js │ ├── score.json │ ├── score.wxml │ └── score.wxss ├── traffic │ ├── bus.js │ ├── bus.json │ ├── bus.wxml │ ├── bus.wxss │ ├── navi.js │ ├── navi.json │ ├── navi.wxml │ └── navi.wxss └── webview │ ├── redpacket.js │ ├── redpacket.json │ ├── redpacket.wxml │ ├── redpacket.wxss │ ├── webview.js │ ├── webview.json │ ├── webview.wxml │ └── webview.wxss ├── project.config.json ├── project.private.config.json ├── sitemap.json └── utils ├── amap-wx.js ├── calendar ├── core.js ├── helper.js ├── index.js ├── index.json ├── index.wxml ├── index.wxss ├── plugins │ ├── holidays │ │ ├── holidays-map.js │ │ └── index.js │ ├── index.js │ ├── preset │ │ ├── base.js │ │ ├── get-calendar-data.js │ │ └── index.js │ ├── selectable.js │ ├── solarLunar │ │ ├── convertSolarLunar.js │ │ └── index.js │ ├── time-range.js │ ├── todo.js │ └── week.js ├── render.js ├── theme │ ├── iconfont.wxss │ └── theme-default.wxss └── utils │ ├── index.js │ ├── logger.js │ └── wxData.js ├── canvasdrawer ├── canvasdrawer.js ├── canvasdrawer.json ├── canvasdrawer.wxml └── canvasdrawer.wxss ├── iconfont.wxss ├── util.js └── wxcharts.js /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: MP CI 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | strategy: 15 | matrix: 16 | node-version: [10.x] 17 | 18 | steps: 19 | - uses: actions/checkout@v2 20 | - name: Use Node.js ${{ matrix.node-version }} 21 | uses: actions/setup-node@v1 22 | with: 23 | node-version: ${{ matrix.node-version }} 24 | 25 | - name: Install Dependencies 26 | run: npm i 27 | 28 | # 从 secrets.UPLOAD_PRIVATE_KEY 生成私钥文件 29 | # see Project/Settings/Secrets 30 | - name: Generate private key for upload 31 | run: echo "$UPLOAD_PRIVATE_KEY" > private.key 32 | env: 33 | UPLOAD_PRIVATE_KEY: ${{ secrets.UPLOAD_PRIVATE_KEY }} 34 | # 上传代码 35 | - name: Upload to WeChat 36 | run: npx mp-ci upload ./ --pkp=./private.key 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ShellBox 2 | 3 | 贝壳小盒子 微信小程序 4 | 5 | [![OSCS Status](https://www.oscs1024.com/platform/badge/Airmole/ShellBox.svg?size=small)](https://www.oscs1024.com/project/Airmole/ShellBox?ref=badge_small) 6 | [![Star](https://img.shields.io/badge/Star-Airmole-brightgreen.svg)](https://github.com/Airmole/ShellBox/stargazers) 7 | [![Download](https://img.shields.io/badge/download-.zip-brightgreen.svg)](https://github.com/Airmole/ShellBox/archive/master.zip) 8 | [![last commit](https://img.shields.io/badge/last%20commit-2021--10--08-green.svg)](https://github.com/Airmole/ShellBox/commits/master) 9 | 10 | **!!!此版本接口服务已不再维护,仅供界面样式&交互操作作为参考代码!!** 11 | 12 | 13 | ## 线上版本体验 14 | 15 | 16 | 17 | > 此版本已不再维护,线上最新版本使用 uniapp 重新开发,见项目 [shellbox-uniapp](https://github.com/Airmole/shellbox-uniapp) 18 | 19 | ## 截图 20 | [![-1.jpg](https://upload-images.jianshu.io/upload_images/4697920-dfebfcf8673fc144.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)](https://z4a.net/image/7NtGdH) 21 | 22 | ## 页面路径说明 23 | 24 | 25 | | 页面路径 | 功能 | 26 | | -------------------------- | --------------------- | 27 | | pages/index/index | 默认首页 | 28 | | pages/index/login | 账号登录 | 29 | | pages/index/feature | 功能列表 | 30 | | pages/books/search | 图书检索 | 31 | | pages/books/index | 图书检索结果列表 | 32 | | pages/books/detail | 图书详情 | 33 | | pages/books/shelf | 图书书架 | 34 | | pages/books/bind | 绑定借阅 | 35 | | pages/books/hot/index | 热门图书排行 | 36 | | pages/books/overdue/index | 图书超期欠款 | 37 | | pages/books/my | 我的图书馆 | 38 | | pages/course/my | 个人课表 | 39 | | pages/course/search | 班级/教师课表搜索列表 | 40 | | pages/course/content | 班级/教师课表内容 | 41 | | pages/elesys/bind | 绑定电费寝室 | 42 | | pages/elesys/index | 寝室电费信息 | 43 | | pages/netsys/bind | 校园网账号绑定 | 44 | | pages/netsys/index | 网费查询结果界面 | 45 | | pages/netsys/list | 网费查询明细 | 46 | | pages/traffic/navi | 校园导航 | 47 | | pages/traffic/bus | 校园出行方案 | 48 | | pages/score/score | 成绩查询 | 49 | | pages/school/calendar | 校历 | 50 | | pages/school/tel | 校园通讯录 | 51 | | pages/school/cert | 考证助手 | 52 | | pages/school/web | 校园站点 | 53 | | pages/school/aboutus | 关于 | 54 | | pages/school/xiaoai | 小爱课表 | 55 | | pages/school/lost/index | 失物招领 | 56 | | pages/school/lost/detail | 失物招领详情 | 57 | | pages/school/run/index | 运动计步排行榜 | 58 | | pages/school/finance/bind | 缴费平台账号绑定 | 59 | | pages/school/finance/index | 缴费查询界面 | 60 | | pages/school/card/index | 校园一卡通查询界面 | 61 | | pages/school/card/bind | 校园一卡通绑定界面 | 62 | 63 | ## 参考借鉴 64 | 65 | - 登录、关于、课表、电费查询界面借鉴参考使用[We重邮](https://github.com/mcc108/wecqupt) 66 | 67 | - 校园导航路线规划使用[高德导航API](https://lbs.amap.com/) 68 | 69 | - 成绩查询界面统计图表[wx-charts](https://github.com/xiaolin3303/wx-charts) 70 | 71 | - [ColorUI](https://github.com/weilanwl/ColorUI) 72 | 73 | 74 | ## 参赛获奖 75 | 76 | - 2019 高校微信小程序开发大赛 华北赛区二等奖 (2019年7月25日) 77 | 78 | ## 其他版本 79 | 80 | - [贝壳小盒子QQ小程序版](https://github.com/Airmole/ShellBox_QApp) 81 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/index/login", 5 | "pages/index/feature", 6 | "pages/index/setting", 7 | "pages/books/search", 8 | "pages/books/index", 9 | "pages/books/detail", 10 | "pages/books/shelf", 11 | "pages/books/bind", 12 | "pages/books/hot/index", 13 | "pages/books/overdue/index", 14 | "pages/books/recommend/index", 15 | "pages/books/my", 16 | "pages/course/my", 17 | "pages/course/search", 18 | "pages/course/content", 19 | "pages/course/stulist/index", 20 | "pages/course/stulist/content", 21 | "pages/elesys/bind", 22 | "pages/elesys/index", 23 | "pages/netsys/bind", 24 | "pages/netsys/index", 25 | "pages/netsys/list", 26 | "pages/traffic/navi", 27 | "pages/traffic/bus", 28 | "pages/score/score", 29 | "pages/school/calendar", 30 | "pages/school/tel", 31 | "pages/school/cert", 32 | "pages/school/web", 33 | "pages/school/aboutus", 34 | "pages/school/xiaoai", 35 | "pages/school/board/index", 36 | "pages/school/board/edit", 37 | "pages/school/board/faq", 38 | "pages/school/board/detail", 39 | "pages/school/run/index", 40 | "pages/school/finance/bind", 41 | "pages/school/finance/index", 42 | "pages/school/card/index", 43 | "pages/school/card/bind", 44 | "pages/webview/webview", 45 | "pages/webview/redpacket", 46 | "pages/school/movie" 47 | ], 48 | "window": { 49 | "backgroundTextStyle": "light", 50 | "navigationBarBackgroundColor": "#fff", 51 | "navigationBarTitleText": "贝壳小盒子", 52 | "navigationStyle": "custom", 53 | "navigationBarTextStyle": "white" 54 | }, 55 | "usingComponents": { 56 | "cu-custom": "/colorui/components/cu-custom" 57 | }, 58 | "tabBar": { 59 | "selectedColor": "#84BD54", 60 | "color": "#333", 61 | "backgroundColor": "#fff", 62 | "position": "bottom", 63 | "list": [ 64 | { 65 | "pagePath": "pages/index/index", 66 | "text": "首页", 67 | "iconPath": "images/index.png", 68 | "selectedIconPath": "images/index@active.png" 69 | }, 70 | { 71 | "pagePath": "pages/index/feature", 72 | "text": "更多", 73 | "iconPath": "images/more.png", 74 | "selectedIconPath": "images/holiday.png" 75 | } 76 | ] 77 | }, 78 | "permission": { 79 | "scope.userLocation": { 80 | "desc": "你的位置信息将用于校园导航定位" 81 | }, 82 | "scope.addPhoneCalendar": { 83 | "desc": "用于添加上课日历事件提醒" 84 | } 85 | }, 86 | "requiredPrivateInfos": [ 87 | "getLocation" 88 | ], 89 | "plugins": { 90 | "ocr-plugin": { 91 | "version": "3.1.5", 92 | "provider": "wx4418e3e031e551be" 93 | } 94 | }, 95 | "__usePrivacyCheck__": true, 96 | "sitemapLocation": "sitemap.json" 97 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | @import "colorui/main.wxss"; 2 | @import "colorui/icon.wxss"; 3 | @import "utils/iconfont.wxss"; -------------------------------------------------------------------------------- /colorui/animation.wxss: -------------------------------------------------------------------------------- 1 | /* 2 | Animation 微动画 3 | 基于ColorUI组建库的动画模块 by 文晓港 2019年3月26日19:52:28 4 | */ 5 | 6 | /* css 滤镜 控制黑白底色gif的 */ 7 | .gif-black{ 8 | mix-blend-mode: screen; 9 | } 10 | .gif-white{ 11 | mix-blend-mode: multiply; 12 | } 13 | 14 | 15 | /* Animation css */ 16 | [class*=animation-] { 17 | animation-duration: .5s; 18 | animation-timing-function: ease-out; 19 | animation-fill-mode: both 20 | } 21 | 22 | .animation-fade { 23 | animation-name: fade; 24 | animation-duration: .8s; 25 | animation-timing-function: linear 26 | } 27 | 28 | .animation-scale-up { 29 | animation-name: scale-up 30 | } 31 | 32 | .animation-scale-down { 33 | animation-name: scale-down 34 | } 35 | 36 | .animation-slide-top { 37 | animation-name: slide-top 38 | } 39 | 40 | .animation-slide-bottom { 41 | animation-name: slide-bottom 42 | } 43 | 44 | .animation-slide-left { 45 | animation-name: slide-left 46 | } 47 | 48 | .animation-slide-right { 49 | animation-name: slide-right 50 | } 51 | 52 | .animation-shake { 53 | animation-name: shake 54 | } 55 | 56 | .animation-reverse { 57 | animation-direction: reverse 58 | } 59 | 60 | @keyframes fade { 61 | 0% { 62 | opacity: 0 63 | } 64 | 65 | 100% { 66 | opacity: 1 67 | } 68 | } 69 | 70 | @keyframes scale-up { 71 | 0% { 72 | opacity: 0; 73 | transform: scale(.2) 74 | } 75 | 76 | 100% { 77 | opacity: 1; 78 | transform: scale(1) 79 | } 80 | } 81 | 82 | @keyframes scale-down { 83 | 0% { 84 | opacity: 0; 85 | transform: scale(1.8) 86 | } 87 | 88 | 100% { 89 | opacity: 1; 90 | transform: scale(1) 91 | } 92 | } 93 | 94 | @keyframes slide-top { 95 | 0% { 96 | opacity: 0; 97 | transform: translateY(-100%) 98 | } 99 | 100 | 100% { 101 | opacity: 1; 102 | transform: translateY(0) 103 | } 104 | } 105 | 106 | @keyframes slide-bottom { 107 | 0% { 108 | opacity: 0; 109 | transform: translateY(100%) 110 | } 111 | 112 | 100% { 113 | opacity: 1; 114 | transform: translateY(0) 115 | } 116 | } 117 | 118 | @keyframes shake { 119 | 120 | 0%, 121 | 100% { 122 | transform: translateX(0) 123 | } 124 | 125 | 10% { 126 | transform: translateX(-9px) 127 | } 128 | 129 | 20% { 130 | transform: translateX(8px) 131 | } 132 | 133 | 30% { 134 | transform: translateX(-7px) 135 | } 136 | 137 | 40% { 138 | transform: translateX(6px) 139 | } 140 | 141 | 50% { 142 | transform: translateX(-5px) 143 | } 144 | 145 | 60% { 146 | transform: translateX(4px) 147 | } 148 | 149 | 70% { 150 | transform: translateX(-3px) 151 | } 152 | 153 | 80% { 154 | transform: translateX(2px) 155 | } 156 | 157 | 90% { 158 | transform: translateX(-1px) 159 | } 160 | } 161 | 162 | @keyframes slide-left { 163 | 0% { 164 | opacity: 0; 165 | transform: translateX(-100%) 166 | } 167 | 168 | 100% { 169 | opacity: 1; 170 | transform: translateX(0) 171 | } 172 | } 173 | 174 | @keyframes slide-right { 175 | 0% { 176 | opacity: 0; 177 | transform: translateX(100%) 178 | } 179 | 180 | 100% { 181 | opacity: 1; 182 | transform: translateX(0) 183 | } 184 | } -------------------------------------------------------------------------------- /colorui/components/cu-custom.js: -------------------------------------------------------------------------------- 1 | const app = getApp(); 2 | Component({ 3 | /** 4 | * 组件的一些选项 5 | */ 6 | options: { 7 | addGlobalClass: true, 8 | multipleSlots: true 9 | }, 10 | /** 11 | * 组件的对外属性 12 | */ 13 | properties: { 14 | bgColor: { 15 | type: String, 16 | default: '' 17 | }, 18 | isCustom: { 19 | type: [Boolean, String], 20 | default: false 21 | }, 22 | isBack: { 23 | type: [Boolean, String], 24 | default: false 25 | }, 26 | bgImage: { 27 | type: String, 28 | default: '' 29 | }, 30 | }, 31 | /** 32 | * 组件的初始数据 33 | */ 34 | data: { 35 | StatusBar: app.globalData.StatusBar, 36 | CustomBar: app.globalData.CustomBar, 37 | Custom: app.globalData.Custom 38 | }, 39 | /** 40 | * 组件的方法列表 41 | */ 42 | methods: { 43 | BackPage() { 44 | try { 45 | const _this = this 46 | wx.navigateBack({ 47 | delta: 1, 48 | fail() { _this.toHome()} 49 | }); 50 | } catch (error) { 51 | this.toHome() 52 | } 53 | }, 54 | toHome(){ 55 | wx.reLaunch({ 56 | url: '/pages/index/index', 57 | }) 58 | } 59 | } 60 | }) -------------------------------------------------------------------------------- /colorui/components/cu-custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /colorui/components/cu-custom.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /colorui/components/cu-custom.wxss: -------------------------------------------------------------------------------- 1 | /* colorui/components/cu-custom.wxss */ -------------------------------------------------------------------------------- /images/BookTag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/BookTag.png -------------------------------------------------------------------------------- /images/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/book.png -------------------------------------------------------------------------------- /images/book2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/book2.png -------------------------------------------------------------------------------- /images/card-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/card-bg.png -------------------------------------------------------------------------------- /images/classBoard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/classBoard.png -------------------------------------------------------------------------------- /images/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/clear.png -------------------------------------------------------------------------------- /images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/close.png -------------------------------------------------------------------------------- /images/down_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/down_w.png -------------------------------------------------------------------------------- /images/electricity_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/electricity_title.png -------------------------------------------------------------------------------- /images/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/help.png -------------------------------------------------------------------------------- /images/holiday.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/holiday.png -------------------------------------------------------------------------------- /images/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/index.png -------------------------------------------------------------------------------- /images/index@active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/index@active.png -------------------------------------------------------------------------------- /images/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/info.png -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/loading.gif -------------------------------------------------------------------------------- /images/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/more.png -------------------------------------------------------------------------------- /images/nav/jiaoxuelou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/jiaoxuelou.png -------------------------------------------------------------------------------- /images/nav/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/location.png -------------------------------------------------------------------------------- /images/nav/mapicon_navi_e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/mapicon_navi_e.png -------------------------------------------------------------------------------- /images/nav/mapicon_navi_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/mapicon_navi_s.png -------------------------------------------------------------------------------- /images/nav/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/marker.png -------------------------------------------------------------------------------- /images/nav/marker_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/marker_checked.png -------------------------------------------------------------------------------- /images/nav/moveSchool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/moveSchool.png -------------------------------------------------------------------------------- /images/nav/others.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/others.png -------------------------------------------------------------------------------- /images/nav/shitang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/shitang.png -------------------------------------------------------------------------------- /images/nav/sports.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/sports.png -------------------------------------------------------------------------------- /images/nav/staticMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/staticMap.png -------------------------------------------------------------------------------- /images/nav/sushe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/sushe.png -------------------------------------------------------------------------------- /images/nav/xiaomen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/xiaomen.png -------------------------------------------------------------------------------- /images/nav/xingzheng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nav/xingzheng.png -------------------------------------------------------------------------------- /images/netfare-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/netfare-bg.png -------------------------------------------------------------------------------- /images/nothing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/nothing.png -------------------------------------------------------------------------------- /images/schoolLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/schoolLogo.png -------------------------------------------------------------------------------- /images/teacherAvatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/teacherAvatar.png -------------------------------------------------------------------------------- /images/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/title.png -------------------------------------------------------------------------------- /images/wave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Airmole/ShellBox/3367dff2231f40c54284f1beaa9ca6d1079a2da2/images/wave.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shellbox", 3 | "version": "3.4.7", 4 | "description": "更新社科馆音像室放映地点", 5 | "author": "Airmole" 6 | } -------------------------------------------------------------------------------- /pages/books/bind.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#7acfa6", 3 | "backgroundColor": "#7acfa6", 4 | "navigationBarTitleText": "绑定借阅证", 5 | "enablePullDownRefresh": false, 6 | "disableScroll": true, 7 | "navigationStyle": "default" 8 | } -------------------------------------------------------------------------------- /pages/books/bind.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 42 | 43 | 44 | 45 | 46 | 帮助 47 | 48 | 49 | 50 | 1、证件号和密码是什么? 51 | 52 | 证件号:学生默认证件号为学号,教职工默认证件号请咨询图书馆。 53 | 密码:图书馆OPAC(“我的图书馆”)系统密码,默认密码为身份证后六位; 54 | 55 | 2、忘记密码? 56 | 57 | 忘记密码请携带学生证、身份证等证件前往图书馆(社科、理工两馆均可)借还处联系工作人员查询自己的OPAC系统密码 58 | 59 | 3、为什么“我的借阅”每次都要绑定? 60 | 61 | 这个锅得由图书馆的OPAC系统来背。由于该系统每次登录都必须用户手动输入验证码。所以麻烦小可爱花点时间输一下(●'◡'●) 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /pages/books/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/books/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/books/detail.wxss */ 2 | @import "../index/index.wxss"; 3 | 4 | page{ 5 | background: var(--cyan); 6 | } 7 | 8 | .infloor { 9 | border: 1px solid #1CBBB4; 10 | } -------------------------------------------------------------------------------- /pages/books/hot/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/books/hot/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/books/hot/index.wxss */ 2 | @import "../../school/cert.wxss"; -------------------------------------------------------------------------------- /pages/books/index.js: -------------------------------------------------------------------------------- 1 | // pages/books/index.js 2 | var app = getApp(); 3 | Page({ 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | keyword: "", 9 | searchType: '', 10 | searchResult: {}, 11 | isLoading: true 12 | }, 13 | 14 | /** 15 | * 生命周期函数--监听页面加载 16 | */ 17 | onLoad: function(options) { 18 | const searchType = options.type; 19 | const keyword = options.keyword; 20 | if (keyword.indexOf('978') >= 0) { 21 | wx.redirectTo({ url: `../books/detail?code=${keyword}&codeType=isbn` }) 22 | return 23 | } 24 | // console.log(options) 25 | this.setData({ searchType: searchType, keyword: keyword }) 26 | wx.showLoading({ title: '在找了在找了...' }); 27 | var _this = this; 28 | wx.request({ 29 | url: `${app.globalData.domain}/book/search`, 30 | data: {type: searchType, keyword: keyword}, 31 | timeout: app.globalData.requestTimeout, 32 | method: 'GET', 33 | success: function(res) { 34 | wx.hideLoading({}) 35 | _this.setData({ isLoading: '' }) 36 | if (res.data.total > 0) { 37 | _this.setData({ 38 | searchResult: res.data 39 | }) 40 | } 41 | } 42 | }) 43 | wx.showShareMenu({ 44 | withShareTicket: true, 45 | menus: ['shareAppMessage', 'shareTimeline'] 46 | }) 47 | }, 48 | /** 49 | * 用户点击右上角分享 50 | */ 51 | onShareAppMessage: function() { 52 | return { 53 | path: `pages/books/index?keyword=${this.data.keyword}&type=${this.data.searchType}`, 54 | title: `图书馆有这么多关于【${this.data.keyword}】的书啊~`, 55 | } 56 | } 57 | }) -------------------------------------------------------------------------------- /pages/books/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/books/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 图书查询 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 【{{keyword}}】相关的图书 14 | 15 | 16 | 17 | 在经历{{searchResult.cost}}秒的折腾后,我们为您找到了以下{{searchResult.total}}条内容 18 | 19 | 20 | 21 | 22 | 23 | 24 | {{item.title}} 25 | 26 | {{item.author}} \n 索书号:{{item.callNo}} 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /pages/books/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/books/index.wxss */ 2 | @import "../school/cert.wxss"; 3 | 4 | page { 5 | background: var(--cyan); 6 | } -------------------------------------------------------------------------------- /pages/books/my.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#73b4ef", 3 | "navigationBarTitleText": "我的借阅", 4 | "backgroundColor": "#73b4ef", 5 | "navigationStyle": "default" 6 | } -------------------------------------------------------------------------------- /pages/books/overdue/index.js: -------------------------------------------------------------------------------- 1 | // pages/books/overdue/index.js 2 | const app = getApp(); 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | title: '图书超期', 10 | isLoading: '加载中', 11 | screenHeight: '900', 12 | type: 'bulletin', 13 | uid: '', 14 | myFine: '', 15 | typeList: [{ 16 | title: '超期催还', 17 | value: 'bulletin' 18 | }, { 19 | title: '超期欠款', 20 | value: 'debt' 21 | }], 22 | datalist: [] 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面加载 27 | */ 28 | onLoad: function (options) { 29 | const type = options.type ? options.type : 'bulletin'; 30 | this.inital(type); 31 | this.getDatalist(type); 32 | }, 33 | inital: function (type) { 34 | const device = wx.getSystemInfoSync(); 35 | const uid = app.globalData.edusysUserInfo.uid; 36 | this.setData({ screenHeight: device.screenHeight, type: type, uid: uid }); 37 | wx.showShareMenu({ withShareTicket: true, menus: ['shareAppMessage', 'shareTimeline'] }); 38 | }, 39 | typeChanged: function (e) { 40 | const type = this.data.typeList[e.currentTarget.dataset.index].value; 41 | // console.log(type); 42 | this.setData({ type: type}); 43 | this.getDatalist(type); 44 | }, 45 | getDatalist: function (type = 'bulletin', page = '1') { 46 | const _this = this; 47 | wx.request({ 48 | url: `${app.globalData.domain}/book/overdue/${type}`, 49 | data: { page: page}, 50 | timeout: app.globalData.requestTimeout, 51 | success: (res) => { 52 | _this.setData({datalist: res.data, isLoading: false}) 53 | wx.vibrateShort({ type: 'medium' }) 54 | } 55 | }) 56 | }, 57 | // 上一页 58 | lastPage: function () { 59 | const current = this.data.datalist.pagination.current; 60 | const targetPage = current > 1 ? Number(current) - 1 : 2; 61 | this.getDatalist(this.data.type, targetPage); 62 | }, 63 | // 下一页 64 | nextPage: function () { 65 | const current = this.data.datalist.pagination.current; 66 | const last = this.data.datalist.pagination.last; 67 | const targetPage = current < last ? Number(current) + 1 : last; 68 | this.getDatalist(this.data.type, targetPage); 69 | }, 70 | searchInput: function (e) { 71 | const value = e.detail.value; 72 | // console.log(value) 73 | this.setData({ uid: value }); 74 | }, 75 | search: function () { 76 | const uid = this.data.uid; 77 | const _this = this; 78 | wx.request({ 79 | url: `${app.globalData.domain}/book/fine/${uid}`, 80 | timeout: app.globalData.requestTimeout, 81 | success: (res) => { 82 | _this.setData({myFine: res.data}) 83 | wx.vibrateShort({ type: 'medium' }) 84 | } 85 | }) 86 | }, 87 | /** 88 | * 生命周期函数--监听页面初次渲染完成 89 | */ 90 | onReady: function () { 91 | var _this = this; 92 | setTimeout(function () { _this.setData({ isLoading: false }) }, 1000); 93 | }, 94 | 95 | /** 96 | * 生命周期函数--监听页面显示 97 | */ 98 | onShow: function () { 99 | 100 | }, 101 | 102 | /** 103 | * 生命周期函数--监听页面隐藏 104 | */ 105 | onHide: function () { 106 | 107 | }, 108 | 109 | /** 110 | * 生命周期函数--监听页面卸载 111 | */ 112 | onUnload: function () { 113 | 114 | }, 115 | 116 | /** 117 | * 页面相关事件处理函数--监听用户下拉动作 118 | */ 119 | onPullDownRefresh: function () { 120 | 121 | }, 122 | 123 | /** 124 | * 页面上拉触底事件的处理函数 125 | */ 126 | onReachBottom: function () { 127 | 128 | }, 129 | 130 | /** 131 | * 用户点击右上角分享 132 | */ 133 | onShareAppMessage: function () { 134 | 135 | } 136 | }) -------------------------------------------------------------------------------- /pages/books/overdue/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/books/overdue/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{title}} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {{item.title}} 16 | 17 | 18 | 19 | 20 | 21 | 检索我的借阅超期信息 22 | 23 | 24 | 25 | 证件号 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 查找结果 36 | 37 | 38 | 39 | 40 | 您有{{myFine.overdueCount}}条超期图书记录 \n {{myFine.fineCount}}条欠款记录,共{{myFine.fineSum}}元\n 41 | 42 | 您所查找的证件号:{{myFine.opacid}} 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 书已经超期,请及时归还 51 | 有超期欠款未缴纳 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | {{item[1].value}} 61 | 62 | 63 | {{item[1].value}} 64 | 65 | {{item[0].title}}:{{item[0].value}} | {{item[2].value}} 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 75 | {{datalist.pagination.current}} / 76 | {{datalist.pagination.last}} 77 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /pages/books/overdue/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/books/overdue/index.wxss */ 2 | @import "../../school/cert.wxss"; -------------------------------------------------------------------------------- /pages/books/recommend/index.js: -------------------------------------------------------------------------------- 1 | // pages/books/recommend/index.js 2 | const app = getApp(); 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | title: '图书荐购', 10 | isLoading: '加载中', 11 | screenHeight: '900', 12 | datalist: [] 13 | }, 14 | 15 | /** 16 | * 生命周期函数--监听页面加载 17 | */ 18 | onLoad: function (options) { 19 | this.inital(); 20 | }, 21 | inital: function () { 22 | this.getRecommendBooks(); 23 | }, 24 | getRecommendBooks:function () { 25 | var _this = this 26 | wx.request({ 27 | url: `${app.globalData.domain}/book/recommend/history`, 28 | timeout: app.globalData.requestTimeout, 29 | success: function(res) { 30 | _this.setData({ 31 | datalist: res.data 32 | }) 33 | } 34 | }) 35 | }, 36 | /** 37 | * 生命周期函数--监听页面初次渲染完成 38 | */ 39 | onReady: function () { 40 | var _this = this; 41 | setTimeout(function () { _this.setData({ isLoading: false }) }, 1000); 42 | }, 43 | 44 | /** 45 | * 生命周期函数--监听页面显示 46 | */ 47 | onShow: function () { 48 | 49 | }, 50 | 51 | /** 52 | * 生命周期函数--监听页面隐藏 53 | */ 54 | onHide: function () { 55 | 56 | }, 57 | 58 | /** 59 | * 生命周期函数--监听页面卸载 60 | */ 61 | onUnload: function () { 62 | 63 | }, 64 | 65 | /** 66 | * 页面相关事件处理函数--监听用户下拉动作 67 | */ 68 | onPullDownRefresh: function () { 69 | 70 | }, 71 | 72 | /** 73 | * 页面上拉触底事件的处理函数 74 | */ 75 | onReachBottom: function () { 76 | 77 | }, 78 | 79 | /** 80 | * 用户点击右上角分享 81 | */ 82 | onShareAppMessage: function () { 83 | 84 | } 85 | }) -------------------------------------------------------------------------------- /pages/books/recommend/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/books/recommend/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{title}} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{item.data[0].value}}.《{{item.data[1].value}}》 16 | 17 | {{item.data[2].value}} | {{item.data[3].value}} \n {{item.data[4].title}}:{{item.data[4].value}} | {{item.data[5].value}}\n {{item.data[6].title}}:{{item.data[6].value}}暂无 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /pages/books/recommend/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/books/recommend/index.wxss */ 2 | @import "../../school/cert.wxss"; -------------------------------------------------------------------------------- /pages/books/search.js: -------------------------------------------------------------------------------- 1 | // pages/books/search.js 2 | var app = getApp(); 3 | Page({ 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | searchType: '02', 9 | radioItems: [ 10 | { name: '书名', value: '02', checked: true }, 11 | { name: '作者', value: '03' }, 12 | { name: '主题', value: '04' }, 13 | { name: '出版社', value: '09' } 14 | ], 15 | keyword: '', 16 | hotwords: [], 17 | shelfCatalog: [] 18 | }, 19 | onLoad: function() { 20 | this.inital() 21 | }, 22 | inital: function () { 23 | this.getHotKeyword() 24 | this.getShelfCatalog() 25 | 26 | wx.showShareMenu({ 27 | withShareTicket: true, 28 | menus: ['shareAppMessage', 'shareTimeline'] 29 | }) 30 | }, 31 | getHotKeyword: function () { 32 | var _this = this 33 | wx.request({ 34 | url: `${app.globalData.domain}/book/hot/keyword/top10`, 35 | timeout: app.globalData.requestTimeout, 36 | success: function (res) { 37 | _this.setData({ hotwords: res.data }) 38 | } 39 | }) 40 | }, 41 | getShelfCatalog: function () { 42 | var _this = this 43 | wx.request({ 44 | url: `${app.globalData.domain}/book/shelf/catalog`, 45 | timeout: app.globalData.requestTimeout, 46 | success: function (res) { 47 | _this.setData({ shelfCatalog: res.data }) 48 | } 49 | }) 50 | }, 51 | radioChange: function (e) { 52 | this.setData({ searchType: e.detail.value }) 53 | var radioItems = this.data.radioItems; 54 | for (var i = 0, len = radioItems.length; i < len; ++i) { 55 | radioItems[i].checked = radioItems[i].value == e.detail.value; 56 | } 57 | this.setData({ 58 | radioItems: radioItems, 59 | }); 60 | }, 61 | keywordInput: function (e) { 62 | this.setData({ 63 | keyword: e.detail.value 64 | }); 65 | }, 66 | searchBook: function () { 67 | const searchType = this.data.searchType; 68 | const keyword = this.data.keyword; 69 | // console.log(searchType, keyword); 70 | if(keyword.length == 0){ 71 | wx.showToast({ title: '请输入检索关键字', icon: 'none' }); 72 | return 73 | } 74 | wx.showLoading({ title: '在找了在找了...' }) 75 | if (keyword.indexOf('978') >= 0) { 76 | wx.navigateTo({ url: `../books/detail?code=${keyword}&codeType=isbn` }) 77 | return 78 | } 79 | wx.request({ 80 | url: `${app.globalData.domain}/book/search`, 81 | data: {type: searchType, keyword: keyword}, 82 | method: 'GET', 83 | success: function (res) { 84 | wx.hideLoading() 85 | if (res.data.total == '图书馆系统无响应') { 86 | wx.showToast({ title: '图书馆OPAC系统无响应', icon: 'none' }); 87 | } else if (res.data.total == 0) { 88 | wx.showToast({ title: '本馆暂无此书', icon: 'none' }); 89 | } else if (res.data.code == 500) { 90 | wx.showToast({ title: res.data.message, icon: 'none' }); 91 | } else { 92 | wx.navigateTo({ 93 | url: `../books/index?type=${searchType}&keyword=${keyword}`, 94 | }) 95 | } 96 | } 97 | }) 98 | }, 99 | /** 100 | * 用户点击右上角分享 101 | */ 102 | onShareAppMessage: function () { 103 | return { 104 | path: `pages/books/search`, 105 | title: `图书查找检索 - 贝壳小盒子`, 106 | } 107 | } 108 | }) -------------------------------------------------------------------------------- /pages/books/search.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/books/search.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 贝壳小盒子 - 图书检索 4 | 5 | 6 | 7 | 8 | 9 | 馆藏图书检索 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{item.name}} 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 热门检索关键词 30 | 31 | 储物柜 32 | {{item}} 33 | 34 | 35 | 36 | 37 | 38 | 学科图书类别导航 39 | 40 | 41 | {{item.title}} 42 | {{citem.title}} 43 | 44 | 45 | -------------------------------------------------------------------------------- /pages/books/search.wxss: -------------------------------------------------------------------------------- 1 | /* pages/books/search.wxss */ 2 | page { 3 | background-color: var(--wegreen); 4 | } -------------------------------------------------------------------------------- /pages/books/shelf.js: -------------------------------------------------------------------------------- 1 | // pages/books/shelf.js 2 | var app = getApp(); 3 | Page({ 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | isLoading: true, 9 | title: '', 10 | id: '', 11 | shelf: [], 12 | clc: '', 13 | slc: '', 14 | shelfType: 'personal', 15 | year: 5 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面加载 20 | */ 21 | onLoad: function (options) { 22 | let shelfType = options.shelfType ? options.shelfType : 'personal'; // personal或public 23 | if (shelfType == 'personal') { 24 | this.setData({ 25 | title: options.title, 26 | shelfType: shelfType, 27 | id: options.id 28 | }) 29 | this.getShelf(options.id) 30 | } 31 | if (shelfType == 'public') { 32 | this.setData({ 33 | title: options.title, 34 | clc: options.clc, 35 | slc: options.slc, 36 | shelfType: shelfType 37 | }) 38 | this.getShelfCatalogBooks(options.title, options.clc, options.slc) 39 | } 40 | 41 | wx.showShareMenu({ 42 | withShareTicket: true, 43 | menus: ['shareAppMessage', 'shareTimeline'] 44 | }) 45 | }, 46 | getShelf: function (id) { 47 | var _this = this; 48 | wx.request({ 49 | url: `${app.globalData.domain}/book/shelf/${id}`, 50 | method: 'GET', 51 | success: function(res) { 52 | _this.setData({shelf: res.data, isLoading: ''}) 53 | wx.vibrateShort({ type: 'medium' }) 54 | } 55 | }) 56 | }, 57 | getShelfCatalogBooks: function (title, clc, slc) { 58 | var _this = this; 59 | wx.request({ 60 | url: `${app.globalData.domain}/book/shelf/catalog/books?name=${title}&clc=${clc}&slc=${slc}`, 61 | method: 'GET', 62 | timeout: app.globalData.requestTimeout, 63 | success: function(res) { 64 | _this.setData({shelf: res.data, isLoading: ''}) 65 | wx.vibrateShort({ type: 'medium' }) 66 | } 67 | }) 68 | }, 69 | /** 70 | * 用户点击右上角分享 71 | */ 72 | onShareAppMessage: function () { 73 | let para = `?shelfType=${this.data.shelfType}&title=${this.data.title}` 74 | if (this.data.shelfType == 'personal') { 75 | para = `${para}&id=${this.data.id}` 76 | } 77 | if (this.data.shelfType == 'public') { 78 | para = `${para}&clc=${this.data.clc}&slc=${this.data.slc}` 79 | } 80 | 81 | return { 82 | path: `pages/books/shelf?shelfType=${this.data.shelfType}&type=${this.data.searchType}`, 83 | title: `贝壳小盒子 - 书架【${this.data.title}】`, 84 | } 85 | } 86 | }) -------------------------------------------------------------------------------- /pages/books/shelf.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/books/shelf.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 书架 - {{title}} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 【{{title}}】书架图书 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | {{item.data[0].value}}. {{item.data[1].value}} 22 | 23 | {{item.data[2].value}} | {{item.data[3].value}} | {{item.data[4].value}} \n {{item.data[5].title}}:{{item.data[5].value}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /pages/books/shelf.wxss: -------------------------------------------------------------------------------- 1 | /* pages/books/shelf.wxss */ 2 | @import "../school/cert.wxss"; 3 | 4 | page { 5 | background: var(--cyan); 6 | } -------------------------------------------------------------------------------- /pages/course/content.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#73b4ef", 3 | "navigationBarTitleText": "教师课表 - 贝壳小盒子", 4 | "backgroundColor": "#73b4ef", 5 | "enablePullDownRefresh": false, 6 | "navigationStyle": "default", 7 | "usingComponents": { 8 | "canvasdrawer": "/utils/canvasdrawer/canvasdrawer" 9 | } 10 | } -------------------------------------------------------------------------------- /pages/course/content.wxss: -------------------------------------------------------------------------------- 1 | /* pages/course/content.wxss */ 2 | @import "./my.wxss"; -------------------------------------------------------------------------------- /pages/course/my.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#73b4ef", 3 | "navigationBarTitleText": "我的课表", 4 | "backgroundColor": "#73b4ef", 5 | "enablePullDownRefresh": false, 6 | "navigationStyle": "default", 7 | "usingComponents": { 8 | "canvasdrawer": "/utils/canvasdrawer/canvasdrawer" 9 | } 10 | } -------------------------------------------------------------------------------- /pages/course/search.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#9f8bea", 3 | "navigationBarTitleText": "教师课表查询", 4 | "backgroundColor": "#9f8bea", 5 | "enablePullDownRefresh": false, 6 | "navigationStyle": "default" 7 | } -------------------------------------------------------------------------------- /pages/course/stulist/content.js: -------------------------------------------------------------------------------- 1 | // pages/course/stulist/content.js 2 | var app = getApp(); 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | StatusBar: app.globalData.StatusBar, 10 | CustomBar: app.globalData.CustomBar, 11 | isLoading: true, 12 | title: '', 13 | code: '' 14 | }, 15 | 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad: function (options) { 20 | // console.log(options) 21 | let courseName = options.course; 22 | let code = options.code; 23 | this.setData({ title: courseName, code: code }); 24 | this.getStulist(code); 25 | }, 26 | getStulist: function(code) { 27 | var _this = this; 28 | wx.request({ 29 | url: `${app.globalData.domain}/edu/stulist/${code}`, 30 | method: "GET", 31 | timeout: app.globalData.requestTimeout, 32 | success: function(res) { 33 | wx.vibrateShort({ type: 'medium' }) 34 | _this.setData({ students: res.data, isLoading: false }); 35 | } 36 | }) 37 | } 38 | }) -------------------------------------------------------------------------------- /pages/course/stulist/content.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/course/stulist/content.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 课堂花名册 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{title}} 14 | 15 | 16 | 17 | Tips:老师老师,长按可选择复制文字内容哟(^U^) 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {{item.serialNo}}. {{item.studentName}} 26 | 27 | ({{item.gender}}) {{item.major}} {{item.className}} 28 | 29 | 30 | {{item.studentID}} 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /pages/course/stulist/content.wxss: -------------------------------------------------------------------------------- 1 | /* pages/course/stulist/content.wxss */ 2 | @import "../../school/calendar.wxss"; 3 | 4 | page{ 5 | background-color: var(--cyan); 6 | } -------------------------------------------------------------------------------- /pages/course/stulist/index.js: -------------------------------------------------------------------------------- 1 | // pages/course/stulist/index.js 2 | var app = getApp(); 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | StatusBar: app.globalData.StatusBar, 10 | CustomBar: app.globalData.CustomBar, 11 | isLoading: true, 12 | courseIndex: [] 13 | }, 14 | 15 | /** 16 | * 生命周期函数--监听页面加载 17 | */ 18 | onLoad: function (options) { 19 | this.getCourseIndex(); 20 | }, 21 | getCourseIndex: function () { 22 | // console.log(app.globalData.edusysUserInfo) 23 | var _this = this; 24 | var uid = app.globalData.edusysUserInfo.uid; 25 | var pwd = app.globalData.edusysUserInfo.password; 26 | 27 | wx.request({ 28 | url: `${app.globalData.domain}/edu/profile`, 29 | data: { uid: uid, pwd: pwd }, 30 | timeout: 6000, 31 | method: 'POST', 32 | success: function(res){ 33 | try { 34 | if(res.data.name.length>1){ 35 | res.data.password = pwd 36 | wx.setStorage({ data: res.data, key: 'edusysUserInfo' }) 37 | app.globalData.edusysUserInfo = res.data 38 | _this.setData({ courseIndex: res.data.allCourses, isLoading: false }) 39 | wx.vibrateShort({ type: 'medium' }) 40 | } 41 | } catch (error) { 42 | console.log(error) 43 | if(app.globalData.hasEdusysStorage){ 44 | _this.setData({ courseIndex: app.globalData.edusysUserInfo.allCourse }) 45 | } else { 46 | wx.showToast({ 47 | title: res.data.message, 48 | icon: 'none', 49 | duration: 5000 50 | }) 51 | wx.clearStorage({ 52 | success: (res) => { 53 | app.globalData.edusysUserInfo = {}; 54 | app.globalData.hasEdusysStorage = false; 55 | wx.navigateTo({ url: '../../index/login' }); 56 | }, 57 | }) 58 | } 59 | } 60 | } 61 | }) 62 | } 63 | }) -------------------------------------------------------------------------------- /pages/course/stulist/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/course/stulist/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 花名册 - 贝壳小盒子 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 上课学生花名册列表 14 | 15 | 16 | 17 | 老师老师,您想看哪门课程的花名册? 18 | 19 | 20 | 21 | 22 | 23 | 24 | {{item.courseName}} 25 | {{item.className}} 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /pages/course/stulist/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/course/stulist/index.wxss */ 2 | @import "../../school/calendar.wxss"; 3 | 4 | page{ 5 | background-color: var(--cyan); 6 | } -------------------------------------------------------------------------------- /pages/elesys/bind.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationStyle": "default", 3 | "navigationBarTitleText": "寝室绑定", 4 | "navigationBarBackgroundColor": "#7acfa6", 5 | "enablePullDownRefresh": false, 6 | "disableScroll": true 7 | } -------------------------------------------------------------------------------- /pages/elesys/bind.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /pages/elesys/bind.wxss: -------------------------------------------------------------------------------- 1 | /* pages/elesys/bind.wxss */ 2 | @import "../index/login.wxss"; 3 | 4 | .container { 5 | height: auto; 6 | } 7 | 8 | .login-btn { 9 | font-size: 13pt; 10 | line-height: 85rpx; 11 | height: 85rpx; 12 | background: #04c065; 13 | color: #fff; 14 | text-align: center; 15 | border-radius: 25px; 16 | box-shadow: 5rpx 5rpx 15rpx #ccc; 17 | margin: 0 30rpx 30rpx; 18 | } 19 | 20 | .append-title { 21 | position: absolute; 22 | top: 30rpx; 23 | width: 100%; 24 | color: #777; 25 | font-size: 22pt; 26 | line-height: 200%; 27 | text-align: center; 28 | } 29 | 30 | .confirm-btn { 31 | margin-top: 0; 32 | } 33 | 34 | 35 | 36 | .append-form .input-group { 37 | padding: 20rpx 8rpx; 38 | margin: 30rpx 3%; 39 | } 40 | 41 | .append-form .input-label { 42 | font-size: 11pt; 43 | height: 20rpx; 44 | line-height: 20rpx; 45 | padding: 0 20rpx; 46 | } 47 | 48 | .append-form .input-group input, .append-form .input-group picker { 49 | font-size: 11pt; 50 | padding: 0 20rpx; 51 | } 52 | 53 | .volunteer-help { 54 | display: flex; 55 | align-items: center; 56 | justify-content: flex-end; 57 | font-size: 10pt; 58 | color: #bbb; 59 | margin-right: 3%; 60 | opacity: 0.8; 61 | } 62 | 63 | .volunteer-help-img { 64 | width: 11pt; 65 | height: 11pt; 66 | margin: 0 5rpx; 67 | } -------------------------------------------------------------------------------- /pages/elesys/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/elesys/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 电费查询 4 | 5 | 6 | 7 | 8 | 9 | {{building}}斋{{room}}寝室 10 | 修改寝室 11 | 12 | 13 | 截至时间:{{time}} 14 | 15 | 16 | 17 | 18 | 剩余电量 19 | 20 | {{eleData.balance}}度 21 | 22 | 23 | 24 | 25 | 26 | 剩余补助电量 27 | {{eleData.subsidize}} 28 | 29 | 30 | 31 | 上次充值电费 32 | {{eleData.lastRecharge}} 33 | 34 | 35 | 36 | 今日插座用电 37 | {{eleData.yesterday.eleSocket}} 38 | 39 | 40 | 41 | 今日空调/风扇用电 42 | {{eleData.yesterday.airConditer}} 43 | 44 | 45 | 46 | 47 | 48 | 50 | 51 | 52 | 53 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /pages/index/component/feecard.js: -------------------------------------------------------------------------------- 1 | // pages/index/component/feecard.js 2 | Component({ 3 | options: { 4 | styleIsolation: 'shared' 5 | }, 6 | /** 7 | * 组件的属性列表 8 | */ 9 | properties: { 10 | isShow: { 11 | type: Boolean, 12 | value: false 13 | }, 14 | title: { 15 | type: String, 16 | value: '' 17 | }, 18 | titleRight: { 19 | type: String, 20 | value: '' 21 | }, 22 | bindedUrl: { 23 | type: String, 24 | value: '' 25 | }, 26 | unbindUrl: { 27 | type: String, 28 | value: '' 29 | }, 30 | bindedShow: { 31 | type: Boolean, 32 | value: false 33 | }, 34 | unbindShow: { 35 | type: Boolean, 36 | value: false 37 | }, 38 | bindedAccount: { 39 | type: String, 40 | value: '' 41 | }, 42 | timeText: { 43 | type: String, 44 | value: '' 45 | }, 46 | contentTextLeft: { 47 | type: String, 48 | value: '' 49 | }, 50 | contentTextRight: { 51 | type: String, 52 | value: '' 53 | }, 54 | contentValue: { 55 | type: String, 56 | value: '' 57 | }, 58 | unbindTips: { 59 | type: String, 60 | value: '' 61 | }, 62 | unbindButton: { 63 | type: String, 64 | value: '' 65 | }, 66 | unbindTipsShowImage: { 67 | type: Boolean, 68 | value: true 69 | }, 70 | }, 71 | 72 | /** 73 | * 组件的初始数据 74 | */ 75 | data: { 76 | 77 | }, 78 | 79 | /** 80 | * 组件的方法列表 81 | */ 82 | methods: { 83 | 84 | } 85 | }) 86 | -------------------------------------------------------------------------------- /pages/index/component/feecard.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "tips": "./tips" 5 | } 6 | } -------------------------------------------------------------------------------- /pages/index/component/feecard.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{title}} 6 | 7 | {{titleRight}} 8 | 9 | 10 | 11 | 12 | {{bindedAccount}} 13 | {{timeText}} 14 | 15 | 16 | 17 | {{contentTextLeft}} 18 | {{contentValue}} 19 | {{contentTextRight}} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /pages/index/component/feecard.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/component/feecard.wxss */ 2 | /* @import "../../../colorui/main.wxss"; 3 | @import "../../../colorui/icon.wxss"; */ 4 | 5 | .df-value { 6 | color: #ffbf92; 7 | font-size: 46pt; 8 | font-weight: bold; 9 | padding: 0 15rpx; 10 | } 11 | 12 | .df-text { 13 | color: #acacac; 14 | font-size: 13pt; 15 | } 16 | -------------------------------------------------------------------------------- /pages/index/component/imagemodal.js: -------------------------------------------------------------------------------- 1 | 2 | // pages/index/component/tips.js 3 | Component({ 4 | options: { 5 | styleIsolation: 'shared' 6 | }, 7 | /** 8 | * 组件的属性列表 9 | */ 10 | properties: { 11 | hideBtnText: { 12 | type: String, 13 | value: '好的' 14 | }, 15 | image: { 16 | type: String, 17 | value: '' 18 | }, 19 | height: { 20 | type: Number, 21 | value: 550 22 | }, 23 | width: { 24 | type: Number, 25 | value: 375 26 | }, 27 | showModal: { 28 | type: Boolean, 29 | value: false 30 | } 31 | }, 32 | 33 | /** 34 | * 组件的初始数据 35 | */ 36 | data: { 37 | 38 | }, 39 | 40 | /** 41 | * 组件的方法列表 42 | */ 43 | methods: { 44 | _hideModal: function() { 45 | this.setData({ showModal: false }) 46 | }, 47 | _previewImage:function (e) { 48 | wx.previewImage({ urls: e.currentTarget.dataset.allurl, current: e.currentTarget.dataset.url }) 49 | }, 50 | } 51 | }) 52 | -------------------------------------------------------------------------------- /pages/index/component/imagemodal.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /pages/index/component/imagemodal.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{hideBtnText}} 14 | 15 | 16 | -------------------------------------------------------------------------------- /pages/index/component/imagemodal.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/component/tips.wxss */ -------------------------------------------------------------------------------- /pages/index/component/privacyPopup/privacyPopup.js: -------------------------------------------------------------------------------- 1 | // pages/index/component/privacyPopup/privacyPopup.js 2 | Component({ 3 | options: { 4 | styleIsolation: 'shared' 5 | }, 6 | /** 7 | * 组件的属性列表 8 | */ 9 | properties: { 10 | 11 | }, 12 | 13 | /** 14 | * 组件的初始数据 15 | */ 16 | data: { 17 | innerShow: false, 18 | contractName: '《用户隐私保护指引》' 19 | }, 20 | lifetimes: { 21 | attached: function () { 22 | if (wx.getPrivacySetting) { 23 | wx.getPrivacySetting({ 24 | success: res => { 25 | console.log("是否需要授权:", res.needAuthorization, "隐私协议的名称为:", res.privacyContractName) 26 | this.setData({ contractName: res.privacyContractName }) 27 | if (res.needAuthorization) { 28 | this.popUp() 29 | } else { 30 | this.triggerEvent("agree") 31 | } 32 | }, 33 | fail: () => { }, 34 | complete: () => { }, 35 | }) 36 | } else { 37 | // 低版本基础库不支持 wx.getPrivacySetting 接口,隐私接口可以直接调用 38 | this.triggerEvent("agree") 39 | } 40 | }, 41 | }, 42 | /** 43 | * 组件的方法列表 44 | */ 45 | methods: { 46 | handleDisagree(e) { 47 | this.triggerEvent("disagree") 48 | this.disPopUp() 49 | }, 50 | handleAgree(e) { 51 | this.triggerEvent("agree") 52 | this.disPopUp() 53 | }, 54 | popUp() { 55 | this.setData({ innerShow: true }) 56 | }, 57 | disPopUp() { 58 | this.setData({ innerShow: false }) 59 | }, 60 | openPrivacyContract() { 61 | wx.openPrivacyContract() 62 | } 63 | } 64 | }) 65 | -------------------------------------------------------------------------------- /pages/index/component/privacyPopup/privacyPopup.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /pages/index/component/privacyPopup/privacyPopup.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 用户隐私保护提示 7 | 8 | 9 | 10 | 11 | 首先,感谢您使用微信小程序《贝壳小盒子》,应微信团队官方《关于小程序隐私保护指引设置的公告》要求,在您使用本小程序之前请您务必授权同意本小程序相关的 12 | {{contractName}} 13 | 当您点击同意并开始时用产品服务时,即表示你已理解并同息该条款内容,该条款将对您产生法律约束力。如您拒绝,将无法正常使用本小程序部分功能,包括不限于:正常显示微信头像昵称,保存成绩分享图,添加上课日程到手机,参与运动榜单排行等功能。 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /pages/index/component/tips.js: -------------------------------------------------------------------------------- 1 | // pages/index/component/tips.js 2 | Component({ 3 | options: { 4 | styleIsolation: 'isolated' 5 | }, 6 | /** 7 | * 组件的属性列表 8 | */ 9 | properties: { 10 | tipsText: { 11 | type: String, 12 | value: '温馨提示' 13 | }, 14 | showImage: { 15 | type: Boolean, 16 | value: true 17 | } 18 | }, 19 | 20 | /** 21 | * 组件的初始数据 22 | */ 23 | data: { 24 | 25 | }, 26 | 27 | /** 28 | * 组件的方法列表 29 | */ 30 | methods: { 31 | 32 | } 33 | }) 34 | -------------------------------------------------------------------------------- /pages/index/component/tips.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /pages/index/component/tips.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{tipsText}} 5 | -------------------------------------------------------------------------------- /pages/index/component/tips.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/component/tips.wxss */ 2 | 3 | .remind-box { 4 | flex: 1; 5 | display: flex; 6 | flex-direction: column; 7 | align-items: center; 8 | justify-content: center; 9 | } 10 | .remind-img { 11 | width: 250rpx; 12 | height: 250rpx; 13 | padding-bottom: 25rpx; 14 | } 15 | 16 | .cu-form-group .title { 17 | min-width: calc(4em + 30rpx); 18 | } 19 | -------------------------------------------------------------------------------- /pages/index/feature.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "imagemodal": "./component/imagemodal" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/index/feature.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {{ userInfo.nickname ? (userInfo.nickname + ' | ') : '点击授权昵称头像' }} {{ edusysUserInfo.uid}} 10 | 11 | 12 | 13 | 14 | 15 | 您尚未登录 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {{value.title}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {{item.name}} 34 | 35 | 36 | 37 | 38 | 39 | {{item.name}} 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /pages/index/feature.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/feature.wxss */ 2 | @import "../../app.wxss"; 3 | @import "../../colorui/animation.wxss"; 4 | 5 | .UCenter-bg { 6 | background-size: cover; 7 | height: 500rpx; 8 | display: flex; 9 | justify-content: center; 10 | padding-top: 20rpx; 11 | overflow: hidden; 12 | position: relative; 13 | flex-direction: column; 14 | align-items: center; 15 | color: #fff; 16 | font-weight: 300; 17 | text-shadow: 0 0 3px rgba(0, 0, 0, 0.3); 18 | } 19 | 20 | .UCenter-bg text { 21 | opacity: 0.8; 22 | } 23 | 24 | .UCenter-bg image { 25 | width: 200rpx; 26 | height: 200rpx; 27 | } 28 | 29 | .UCenter-bg .gif-wave{ 30 | position: absolute; 31 | width: 100%; 32 | bottom: 0; 33 | left: 0; 34 | z-index: 99; 35 | mix-blend-mode: screen; 36 | height: 100rpx; 37 | } 38 | 39 | map,.mapBox{ 40 | left: 0; 41 | z-index: 99; 42 | mix-blend-mode: screen; 43 | height: 100rpx; 44 | } 45 | 46 | map,.mapBox{ 47 | width: 750rpx; 48 | height: 300rpx; 49 | } 50 | 51 | .userinfo-avatar { 52 | border-radius: 50rpx; 53 | clip-path: circle(50% at center); 54 | width: 180rpx; 55 | height: 180rpx; 56 | box-shadow: 5rpx 5rpx 15rpx #ccc; 57 | } 58 | 59 | .replay-board { 60 | width: 32px; 61 | height: 28px; 62 | margin-top: -2px; 63 | } 64 | 65 | .replay-board-title { 66 | margin-top: -22px; 67 | } 68 | 69 | .nickname { 70 | padding: 10rpx; 71 | background-color: rgba(243, 243, 243, 0.438); 72 | border-radius: 25rpx; 73 | color: black; 74 | font-weight: 350; 75 | } 76 | 77 | .feature-titles { 78 | min-height: 40rpx; 79 | align-items: flex-start; 80 | padding-bottom: 10rpx; 81 | } -------------------------------------------------------------------------------- /pages/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "./component/tips", 4 | "feecard": "./component/feecard", 5 | "imagemodal": "./component/imagemodal", 6 | "privacy": "./component/privacyPopup/privacyPopup" 7 | } 8 | } -------------------------------------------------------------------------------- /pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | .remind-box { 2 | flex: 1; 3 | display: flex; 4 | flex-direction: column; 5 | align-items: center; 6 | justify-content: center; 7 | padding-bottom: 300rpx; 8 | } 9 | .remind-img { 10 | width: 250rpx; 11 | height: 250rpx; 12 | padding-bottom: 25rpx; 13 | } 14 | 15 | .cu-form-group .title { 16 | min-width: calc(4em + 30rpx); 17 | } 18 | 19 | .praise { 20 | text-indent: 1em; 21 | } 22 | 23 | .school-ads { 24 | position: relative; 25 | top: 0; 26 | } -------------------------------------------------------------------------------- /pages/index/login.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationStyle": "default", 3 | "navigationBarTitleText": "登录", 4 | "navigationBarBackgroundColor": "#7acfa6", 5 | "enablePullDownRefresh": false, 6 | "disableScroll": true 7 | } -------------------------------------------------------------------------------- /pages/index/setting.js: -------------------------------------------------------------------------------- 1 | // pages/index/setting.js 2 | const app = getApp() 3 | Page({ 4 | data: { 5 | avatarUrl: app.globalData.defaultGrayAvatar, 6 | nickname: '' 7 | }, 8 | onLoad () { 9 | const uid = app.globalData.edusysUserInfo ? app.globalData.edusysUserInfo.uid : '' 10 | console.log('uid', uid) 11 | if (!uid) { 12 | wx.redirectTo({ url: '../index/login' }) 13 | return 14 | } 15 | this.fetch() 16 | }, 17 | fetch () { 18 | const _this = this 19 | const domain = app.globalData.domain 20 | var uid = app.globalData.edusysUserInfo ? app.globalData.edusysUserInfo.uid : '' 21 | wx.request({ 22 | url: `${domain}/wechat/userinfo`, 23 | data: { uid: uid }, 24 | timeout: app.globalData.requestTimeout, 25 | success: function(res){ 26 | if (res.statusCode == 200 && res.data.code == 200) { 27 | const avatarUrl = res.data.data.avatar ? res.data.data.avatar : app.globalData.defaultGrayAvatar 28 | const nickName = res.data.data.nickname ? res.data.data.nickname : uid 29 | _this.setData({ avatarUrl: avatarUrl, nickname: nickName }) 30 | let userInfo = { avatarUrl: avatarUrl, nickName: nickName } 31 | userInfo = Object.assign(userInfo, res.data.data) 32 | wx.setStorageSync('userInfo', userInfo) 33 | } 34 | } 35 | }) 36 | }, 37 | save () { 38 | var _this = this 39 | _this.setData({remind: '加载中'}) 40 | var uid = app.globalData.edusysUserInfo ? app.globalData.edusysUserInfo.uid : '' 41 | var openid = app.globalData.openid ? app.globalData.openid : '' 42 | var avatarUrl = this.data.avatarUrl 43 | var nickName = _this.data.nickname 44 | const domain = app.globalData.domain 45 | wx.request({ 46 | url: `${domain}/wechat/userinfo`, 47 | data:{ 48 | uid: uid, 49 | openid: openid, 50 | nickname: nickName, 51 | avatar: avatarUrl 52 | }, 53 | timeout: app.globalData.requestTimeout, 54 | method: 'POST', 55 | success: function(res){ 56 | if (res.statusCode == 200 && res.data.code == 200) { 57 | let userInfo = wx.getStorageSync('userInfo') || {} 58 | Object.assign(userInfo, { 59 | avatarUrl: avatarUrl, 60 | avatar: avatarUrl, 61 | nickname: nickName, 62 | nickName: nickName 63 | }) 64 | wx.setStorageSync('userInfo', userInfo) 65 | wx.navigateBack({ delta: 1 }) 66 | } 67 | } 68 | }) 69 | }, 70 | onChooseAvatar(e) { 71 | wx.showLoading({ title: '获取中' }) 72 | const avatarUrl = e.detail.avatarUrl 73 | this.uploadAvatar(avatarUrl) 74 | }, 75 | nicknameChange(e) { 76 | const nickname = e.detail.value 77 | this.setData({ nickname: nickname }) 78 | console.log(nickname) 79 | }, 80 | uploadAvatar: function (filepath) { 81 | var _this = this 82 | const domain = app.globalData.domain 83 | wx.uploadFile({ 84 | url: `${domain}/upload`, 85 | formData: { category: 'avatar' }, 86 | filePath: filepath, 87 | name: 'image', 88 | success(res) { 89 | wx.hideLoading() 90 | const data = JSON.parse(res.data) 91 | if (res.statusCode == 200 || data.code == 200) { 92 | _this.setData({ avatarUrl: data.url }) 93 | } else { 94 | wx.showToast({ title: res.data.message, icon: 'none' }) 95 | } 96 | } 97 | }) 98 | }, 99 | }) -------------------------------------------------------------------------------- /pages/index/setting.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/index/setting.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 昵称头像设置 4 | 5 | 6 | 7 | 9 | 点击上方空白头像授权修改 10 | 11 | 12 | 昵称 13 | 14 | 15 | 16 | 17 | 受《小程序用户头像昵称获取规则调整公告》通知要求,微信小程序使用用户头像昵称必须经过用户主动授权允许。小盒子调整为默认使用灰色头像,登录学号作为头像,昵称;您可在此页面修改授权。请放心,即使不修改授权也不会影响您任何功能正常使用 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /pages/index/setting.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/setting.wxss */ 2 | page { 3 | background: #eee; 4 | } 5 | 6 | .avatar { 7 | width: 100%; 8 | } -------------------------------------------------------------------------------- /pages/netsys/bind.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationStyle": "default", 3 | "navigationBarTitleText": "校园网账号绑定 - 贝壳小盒子", 4 | "navigationBarBackgroundColor": "#7acfa6", 5 | "enablePullDownRefresh": false, 6 | "disableScroll": true 7 | } -------------------------------------------------------------------------------- /pages/netsys/bind.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /pages/netsys/bind.wxss: -------------------------------------------------------------------------------- 1 | /* pages/netsys/bind.wxss */ 2 | @import "../index/login.wxss"; -------------------------------------------------------------------------------- /pages/netsys/index.js: -------------------------------------------------------------------------------- 1 | // pages/netsys/index.js 2 | var app = getApp() 3 | var util = require("../../utils/util") 4 | Page({ 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | isLoading: true, 10 | uid: '', 11 | netid: '', 12 | password: '', 13 | cookie: '', 14 | info: '', 15 | timeText: '' 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面加载 20 | */ 21 | onLoad: function (options) { 22 | this.inital(); 23 | }, 24 | inital: function () { 25 | var getDataBy = 'account' 26 | const netsysUserInfo = wx.getStorageSync('netsysUserInfo') || {} 27 | const edusysUserInfo = wx.getStorageSync('edusysUserInfo') || {} 28 | if (netsysUserInfo.netid.length > 0 && edusysUserInfo.uid.length > 0) { 29 | getDataBy = 'account'; 30 | this.setData({ 31 | uid: edusysUserInfo.uid, 32 | netid: netsysUserInfo.netid, 33 | password: netsysUserInfo.password 34 | }) 35 | this.getData(netsysUserInfo.netid, netsysUserInfo.password, '', getDataBy) 36 | } else if (app.globalData.netsysUserInfo != '') { 37 | getDataBy = 'cookie'; 38 | this.setData({ cookie: app.globalData.netsysUserInfo.cookie }) 39 | this.getData('', '', app.globalData.netsysUserInfo.cookie, getDataBy) 40 | } else { 41 | wx.removeStorageSync('netsysUserInfo') 42 | wx.redirectTo({ url: './bind' }) 43 | return 44 | } 45 | const date = new Date() 46 | const nowTimestamp = date.getTime() 47 | const timeText = util.formatDateTime(nowTimestamp, true) 48 | if (edusysUserInfo == '') { 49 | wx.redirectTo({ url: '../index/login' }) 50 | } 51 | this.setData({ timeText: timeText, uid: edusysUserInfo.uid}) 52 | }, 53 | getData: function (netid = '', password = '', cookie = '', getDataBy = 'account') { 54 | var _this = this 55 | let postdata = {} 56 | 57 | if (getDataBy === 'account') { 58 | postdata = { 59 | uid: app.globalData.edusysUserInfo.uid, 60 | userid: netid, 61 | password: password, 62 | } 63 | } else { 64 | postdata = { cookie: cookie } 65 | } 66 | 67 | wx.request({ 68 | url: `${app.globalData.domain}/netsys/profile`, 69 | data: postdata, 70 | timeout: app.globalData.requestTimeout, 71 | method: 'POST', 72 | success: function(res){ 73 | try { 74 | if (res.data.welcome.length > 1) { 75 | _this.setData({ info: res.data, isLoading: '' }) 76 | app.globalData.netsysUserInfo = res.data 77 | wx.vibrateShort({ type: 'medium' }) 78 | } 79 | } catch (error) { 80 | wx.showToast({ 81 | title: res.data.message, 82 | icon: 'none', 83 | duration: 5000 84 | }) 85 | wx.redirectTo({ url: './bind' }) 86 | } 87 | } 88 | }) 89 | }, 90 | unbind: function () { 91 | wx.removeStorageSync('netsysUserInfo') 92 | wx.vibrateShort({ type: 'medium' }) 93 | wx.redirectTo({ url: './bind' }) 94 | } 95 | }) -------------------------------------------------------------------------------- /pages/netsys/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "校历 - 贝壳小盒子", 3 | "navigationBarBackgroundColor": "#ffcb63", 4 | "enablePullDownRefresh": false 5 | } -------------------------------------------------------------------------------- /pages/netsys/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 网费查询 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {{info.name}} 14 | {{netid}} 15 | 16 | 17 | {{info.status}} {{info.service}} 18 | 解绑 19 | 20 | 21 | 22 | 23 | 24 | 余额 25 | 26 | {{info.leftMoney}}元 27 | 28 | 29 | 30 | 31 | 本月计费 32 | 33 | {{info.monthlyFare}} 元 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 本月流量 42 | {{info.monthlyFlow}}MB 43 | 44 | 45 | 46 | 本月在线时长 47 | {{info.monthlyTime}}分钟 48 | 49 | 50 | 51 | 使用宿舍 52 | {{info.userAddress}} 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 | -------------------------------------------------------------------------------- /pages/netsys/list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/netsys/list.wxss: -------------------------------------------------------------------------------- 1 | /* pages/netsys/list.wxss */ 2 | @import "../school/cert.wxss"; 3 | @import "./index.wxss"; 4 | 5 | page{ 6 | background-color: #eee; 7 | } 8 | 9 | .word-wrap { 10 | word-wrap:break-word; 11 | } -------------------------------------------------------------------------------- /pages/school/aboutus.js: -------------------------------------------------------------------------------- 1 | // pages/school/aboutus.js 2 | var app = getApp(); 3 | Page({ 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | width: '100%', 9 | height: '', 10 | version: '', 11 | QGroupModal: false, 12 | showFreedomFunc: false, 13 | weappCodeImage: 'https://upload-images.jianshu.io/upload_images/4697920-92c8f24e739051d3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 14 | coder: [{ 15 | avatar: 'https://upload-images.jianshu.io/upload_images/4697920-4bbd851e6b007d72.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/128', 16 | nickName: 'Airmole', 17 | weibo: 'pages/profile/profile?objectUid=2423156830&nickname=Airmole' 18 | }, { 19 | avatar: 'https://upload-images.jianshu.io/upload_images/4697920-54c15375dfd9568e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/128', 20 | nickName: '很奔放', 21 | weibo: '' 22 | }, { 23 | avatar: 'https://upload-images.jianshu.io/upload_images/4697920-5b0f0ef862d2e5e8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/128', 24 | nickName: '秃头程序媛', 25 | weibo: '' 26 | }], 27 | otherApps: [{ 28 | appid: 'wx183616af30e5723d', 29 | icon: 'https://upload-images.jianshu.io/upload_images/4697920-9f02095775140703.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/128', 30 | name: '贝壳班车订票' 31 | }] 32 | }, 33 | 34 | /** 35 | * 生命周期函数--监听页面加载 36 | */ 37 | onLoad: function (options) { 38 | var that = this; 39 | const accountInfo = wx.getAccountInfoSync(); 40 | 41 | that.setData({ 42 | version: accountInfo.miniProgram.version, 43 | width: wx.getSystemInfoSync().windowWidth * 0.9 + 'px', 44 | height: wx.getSystemInfoSync().windowWidth * 0.9 * 0.5625 + 'px' 45 | }) 46 | wx.pageScrollTo({ 47 | scrollTop: 1600, 48 | duration: 4000, 49 | }) 50 | 51 | wx.showShareMenu({ 52 | withShareTicket: true, 53 | menus: ['shareAppMessage', 'shareTimeline'] 54 | }) 55 | 56 | setTimeout(function () { 57 | wx.pageScrollTo({ 58 | scrollTop: 0, 59 | duration: 300, 60 | }) 61 | }, 4000); 62 | }, 63 | copyID: function () { 64 | wx.setClipboardData({ 65 | data: 'wxf0ba93e3faff4eda' 66 | }) 67 | wx.showToast({ 68 | title: '已复制到粘贴版', 69 | icon: 'none', 70 | duration: 1000 71 | }); 72 | }, 73 | 74 | /** 75 | * 用户点击右上角分享 76 | */ 77 | onShareAppMessage: function (res) { 78 | return { 79 | title: '关于 - 【贝壳小盒子】 ', 80 | path: 'pages/school/aboutus', 81 | } 82 | }, 83 | showAppCode: function () { 84 | var weappCode = this.data.weappCodeImage; 85 | wx.previewImage({ 86 | current: weappCode, // 当前显示图片的http链接 87 | urls: [weappCode] // 需要预览的图片http链接列表 88 | }) 89 | }, 90 | goOtherApps: function (e) { 91 | var appid = e.currentTarget.dataset.appid; 92 | wx.navigateToMiniProgram({ appId: appid }) 93 | }, 94 | checkUpdate: function () { 95 | app.appUpdate('userclick'); 96 | }, 97 | showQQGroupCode: function () { 98 | this.setData({ QGroupModal: true }) 99 | }, 100 | hideQQGroupCode: function () { 101 | this.setData({ QGroupModal: false }) 102 | }, 103 | goWeibo: function (e) { 104 | var weiboPath = e.currentTarget.dataset.weibo; 105 | 106 | if (weiboPath.length > 0) { 107 | wx.navigateToMiniProgram({ 108 | appId: 'wx9074de28009e1111', 109 | path: weiboPath 110 | }) 111 | } 112 | }, 113 | canBeFree: function (e) { 114 | const hasEdusysStorage = app.globalData.hasEdusysStorage 115 | if (!hasEdusysStorage) { 116 | return 117 | } 118 | 119 | if (this.data.showFreedomFunc) { 120 | this.setData({ showFreedomFunc: false }) 121 | return 122 | } 123 | 124 | } 125 | }) -------------------------------------------------------------------------------- /pages/school/aboutus.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/school/aboutus.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/aboutus.wxss */ 2 | .page { 3 | background-color: #7acfa6; 4 | } 5 | 6 | .container { 7 | padding: 0; 8 | font-size: 11pt; 9 | } 10 | 11 | .header { 12 | position: relative; 13 | width: 100%; 14 | height: 400rpx; 15 | text-align: center; 16 | box-sizing: border-box; 17 | overflow: hidden; 18 | display: flex; 19 | align-items: center; 20 | justify-content: center; 21 | } 22 | 23 | .header .title { 24 | position: relative; 25 | width: 600rpx; 26 | height: 200rpx; 27 | z-index: 3; 28 | opacity: 0.95; 29 | } 30 | 31 | .black-cover { 32 | position: absolute; 33 | z-index: 2; 34 | top: 0; 35 | left: 0; 36 | width: 100%; 37 | height: 100%; 38 | background: #888; 39 | opacity: 0.18; 40 | } 41 | 42 | .logo { 43 | position: absolute; 44 | top: 0; 45 | left: 0; 46 | z-index: 1; 47 | width: 100%; 48 | height: 750rpx; 49 | border-radius: 10rpx; 50 | margin-top: -175rpx; 51 | filter: blur(5px); 52 | } 53 | 54 | .content { 55 | flex: 1; 56 | } 57 | 58 | .version { 59 | height: 100rpx; 60 | background: #fff; 61 | display: flex; 62 | align-items: center; 63 | padding: 0 45rpx; 64 | box-sizing: border-box; 65 | font-size: 13pt; 66 | color: #666; 67 | border-bottom: 1px #e5e5e5 solid; 68 | } 69 | 70 | .version-title { 71 | flex: 1; 72 | display: flex; 73 | align-items: center; 74 | } 75 | 76 | .title-name { 77 | padding-right: 10rpx; 78 | } 79 | 80 | .version-text { 81 | font-size: 10pt; 82 | line-height: 100%; 83 | color: #7acfa6; 84 | border: 1px solid #7acfa6; 85 | padding: 5rpx 10rpx; 86 | border-radius: 5rpx; 87 | margin-left: 10rpx; 88 | text-align: center; 89 | } 90 | 91 | .version-log-link { 92 | position: relative; 93 | font-size: 12pt; 94 | color: #7acfa6; 95 | } 96 | 97 | .version-log-link:active { 98 | opacity: 0.8; 99 | } 100 | 101 | .update-log::after { 102 | content: ''; 103 | position: absolute; 104 | right: -3px; 105 | top: -1px; 106 | width: 5px; 107 | height: 5px; 108 | border-radius: 50%; 109 | background: #e55c5c; 110 | } 111 | 112 | .log-list { 113 | display: flex; 114 | flex-direction: column; 115 | align-items: stretch; 116 | } 117 | 118 | .describe { 119 | width: 100%; 120 | box-sizing: border-box; 121 | padding: 20rpx 45rpx 30rpx; 122 | display: flex; 123 | flex-flow: column nowrap; 124 | color: #545454; 125 | line-height: 175%; 126 | background: #fff; 127 | margin-top: 15rpx; 128 | border-top: 1px #e5e5e5 solid; 129 | border-bottom: 1px #e5e5e5 solid; 130 | border-radius: 25rpx; 131 | } 132 | 133 | .desc-title { 134 | display: flex; 135 | font-size: 13pt; 136 | line-height: 200%; 137 | margin-bottom: 15rpx; 138 | } 139 | 140 | .desc-v { 141 | flex: 1; 142 | } 143 | 144 | .desc-time { 145 | font-size: 11pt; 146 | color: #888; 147 | } 148 | 149 | .desc-list { 150 | display: flex; 151 | flex-direction: column; 152 | border-left: 8rpx solid #ddd; 153 | padding-left: 15rpx; 154 | color: #777; 155 | margin-bottom: 15rpx; 156 | font-size: 10pt; 157 | } 158 | 159 | .desc-content { 160 | padding-bottom: 15rpx; 161 | } 162 | 163 | .avatar-border{ 164 | border: 2px solid var(--wegreen); 165 | } -------------------------------------------------------------------------------- /pages/school/board/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/school/board/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/board/detail.wxss */ 2 | @import "../cert.wxss"; -------------------------------------------------------------------------------- /pages/school/board/edit.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/school/board/edit.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/board/edit.wxss */ 2 | @import "../cert.wxss"; -------------------------------------------------------------------------------- /pages/school/board/faq.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/school/board/faq.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 投诉维权 - 常见问题 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {{item.id}} 20 | {{item.created_at}} 21 | 22 | 23 | 24 | 25 | 26 | {{tags[item.tag]}} 27 | 28 | {{item.status == 1 ? '已回复': '待回复'}} 29 | {{item.content}} 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 查看详情 39 | 40 | 41 | 43 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 62 | {{datalist.pagination.current}} / 63 | {{datalist.pagination.last}} 64 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /pages/school/board/faq.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/board/faq.wxss */ 2 | @import "../cert.wxss"; -------------------------------------------------------------------------------- /pages/school/board/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/school/board/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/board/index.wxss */ 2 | @import "../cert.wxss"; 3 | 4 | .faq-item { 5 | min-height: 70rpx !important; 6 | } -------------------------------------------------------------------------------- /pages/school/calendar.js: -------------------------------------------------------------------------------- 1 | // pages/school/calendar.js 2 | var app = getApp(); 3 | Page({ 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | calendarImage: 'https://image.airmole.net/file/830d9301f45a8c7b109d1.jpg', 9 | isLoading: true, 10 | screenHeight: '900', 11 | colorArr: ['red','orange','yellow','olive','green','cyan','blue','purple','mauve','pink','brown','grey','gray'], 12 | jsonContent: '', 13 | gradeArray: [{ 14 | title: '大一', 15 | value: 'freshmanWork' 16 | },{ 17 | title: '大二', 18 | value: 'sophomoreWork' 19 | },{ 20 | title: '大三', 21 | value: 'juniorWork' 22 | },{ 23 | title: '大四', 24 | value: 'seniorWork' 25 | }] 26 | }, 27 | 28 | /** 29 | * 生命周期函数--监听页面加载 30 | */ 31 | onLoad: function (options) { 32 | this.inital(); 33 | }, 34 | inital: function () { 35 | const device = wx.getSystemInfoSync(); 36 | // console.log(device.screenHeight); 37 | this.setData({screenHeight: device.screenHeight}); 38 | // 再通过setData更改Page()里面的data,动态更新页面的数据 39 | var _this = this; 40 | wx.request({ 41 | url: app.globalData.domain + '/edu/calendar', 42 | success(res) { 43 | // console.log(res.data) 44 | _this.setData({ jsonContent: res.data }) 45 | setTimeout(function () { 46 | _this.setData({ isLoading: false }) 47 | wx.vibrateShort({ type: 'medium' }) 48 | }, 800) 49 | } 50 | }) 51 | 52 | wx.showShareMenu({ 53 | withShareTicket: true, 54 | menus: ['shareAppMessage', 'shareTimeline'] 55 | }) 56 | }, 57 | /** 58 | * 用户点击右上角分享 59 | */ 60 | onShareAppMessage: function (res) { 61 | return { 62 | title: '校历', 63 | path: 'pages/school/calendar', 64 | } 65 | }, 66 | showPic: function () { 67 | var image = this.data.calendarImage; 68 | wx.previewImage({ current: image, urls: [image] }) 69 | } 70 | }) -------------------------------------------------------------------------------- /pages/school/calendar.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "校历 - 贝壳小盒子", 3 | "navigationBarBackgroundColor": "#030c13", 4 | "enablePullDownRefresh": false, 5 | "usingComponents": { 6 | "calendar-item": "./component/calendarItem" 7 | } 8 | } -------------------------------------------------------------------------------- /pages/school/calendar.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/calendar.wxss */ 2 | page { 3 | background-color: #333333; 4 | } 5 | 6 | .calendar-item { 7 | position: relative; 8 | display: flex; 9 | padding: 0 30rpx; 10 | min-height: 100rpx; 11 | justify-content: space-between; 12 | align-items: center; 13 | background-color: var(--cyan); 14 | color: var(--white); 15 | } 16 | 17 | .remind-box { 18 | flex: 1; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | padding-top: 300rpx; 24 | padding-bottom: 300rpx; 25 | } 26 | .remind-img { 27 | width: 250rpx; 28 | height: 250rpx; 29 | padding-bottom: 25rpx; 30 | } 31 | .remind-text { 32 | font-size: 12pt; 33 | line-height: 150%; 34 | } 35 | .remind-btn { 36 | margin-top: 20rpx; 37 | font-size: 9pt; 38 | padding: 5rpx 20rpx; 39 | text-align: center; 40 | background-color: #7acfa6; 41 | border-radius: 3px; 42 | border-bottom: 2px solid #4fc08d; 43 | color: #fff; 44 | } 45 | 46 | .item-height{ 47 | height: 200rpx; 48 | } 49 | -------------------------------------------------------------------------------- /pages/school/card/bind.js: -------------------------------------------------------------------------------- 1 | // pages/school/card/bind.js 2 | var app = getApp() 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | webImage: 'https://upload-images.jianshu.io/upload_images/4697920-b9667ae84f3059d7.png', 10 | uid: '', 11 | password: '' 12 | }, 13 | 14 | /** 15 | * 生命周期函数--监听页面加载 16 | */ 17 | onLoad(options) { 18 | const ehallAccount = wx.getStorageSync('ehallAccount') || {} 19 | const idcard = app.globalData.edusysUserInfo.idcard || '' 20 | 21 | let uid = options.uid || '' 22 | let password = options.password || '' 23 | if (uid != '' && password == '') { 24 | const pointGrade = 20 25 | const grade = uid.substr(0, 2) 26 | // 20级之前默认密码身份证号码后六位 27 | if (grade < pointGrade && uid.indexOf(grade) === 0) password = idcard.substring(idcard.length - 6) 28 | // 20级之后默认密码身份证号码后八位 29 | if (grade >= pointGrade && uid.indexOf(grade) === 0) password = idcard.substring(idcard.length - 8) 30 | } 31 | if (uid != '' && password == '' && ehallAccount && ehallAccount.uid == uid) password = ehallAccount.password 32 | if (uid == '' && password=='' && ehallAccount && ehallAccount.uid) { 33 | uid = ehallAccount.uid 34 | password = ehallAccount.password 35 | } 36 | this.setData({ uid: uid, password: password }) 37 | if (uid && password) this.getCardAmount(uid, password) 38 | }, 39 | getCardAmount(uid = '', password = '') { 40 | var _this = this 41 | wx.request({ 42 | url: `${app.globalData.domain}/ehall/card`, 43 | data: { uid: uid, password: password }, 44 | success (res) { 45 | if (res.statusCode == 200) { 46 | wx.setStorageSync('ehallAccount', { 47 | uid: uid, 48 | password: password 49 | }) 50 | wx.redirectTo({ url: `./index?uid=${uid}&password=${password}` }) 51 | } else { 52 | _this.setData({ password: '' }) 53 | wx.showToast({ title: res.data.message, icon: 'none' }) 54 | } 55 | } 56 | }) 57 | } 58 | }) -------------------------------------------------------------------------------- /pages/school/card/bind.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/school/card/bind.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 一卡通绑定关联 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 请输入关联以上系统平台账号密码\r\n默认初始账号为学号,大一新生可能暂不支持\r\n19级默认密码身份证号后六位,20,21级末8位 13 | 14 | 15 | 16 | 17 | 账号 18 | 19 | 20 | 21 | 密码 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /pages/school/card/bind.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/card/bind.wxss */ -------------------------------------------------------------------------------- /pages/school/card/index.js: -------------------------------------------------------------------------------- 1 | // pages/school/card/index.js 2 | const app = getApp() 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | remind: '', 10 | user: {}, 11 | ehall: {}, 12 | uid: '', 13 | password: '' 14 | }, 15 | 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad(options) { 20 | let uid = options ? options.uid : '' 21 | let password = options ? options.password : '' 22 | if (uid == '' || password == '') { 23 | const ehallAccount = wx.getStorageSync('ehallAccount') || {} 24 | uid = ehallAccount ? ehallAccount.uid : '' 25 | password = ehallAccount ? ehallAccount.password : '' 26 | } 27 | if (uid == '' || password == '') { 28 | const idcard = app.globalData.edusysUserInfo.idcard || '' 29 | uid = app.globalData.edusysUserInfo.uid 30 | password = idcard.substring(idcard.length - 6) 31 | } 32 | if (uid == '' || password == '') { 33 | wx.redirectTo({ url: './bind?uid=&password=' }) 34 | return 35 | } 36 | 37 | this.getCardAmount(uid, password) 38 | this.setData({ user: app.globalData.edusysUserInfo, uid: uid, password: password }) 39 | }, 40 | getCardAmount(uid = '', password = '') { 41 | var _this = this 42 | wx.request({ 43 | url: `${app.globalData.domain}/ehall/card`, 44 | data: { uid: uid, password: password }, 45 | success(res) { 46 | if (res.statusCode == 200) { 47 | wx.setStorageSync('ehallAccount', { 48 | uid: uid, 49 | password: password 50 | }) 51 | _this.setData({ ehall: res.data }) 52 | } else { 53 | wx.showToast({ title: res.data.message, icon: 'none' }) 54 | setTimeout(function () { wx.redirectTo({ url: './bind?uid=&password=' }) }, 1500) 55 | } 56 | } 57 | }) 58 | }, 59 | rebind() { 60 | wx.showModal({ 61 | title: '提示', 62 | content: '您确认要切换查询其他一卡通余额?', 63 | success(res) { 64 | if (res.confirm) { 65 | wx.setStorageSync('ehallAccount', '') 66 | wx.redirectTo({ url: './bind?password=&uid=' }) 67 | } else if (res.cancel) { 68 | } 69 | } 70 | }) 71 | 72 | } 73 | }) -------------------------------------------------------------------------------- /pages/school/card/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/school/card/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 一卡通余额 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 余额 16 | 17 | {{ehall.amount}}元 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 截至:{{ehall.execTime}} 26 | 卡号:{{ehall.cardno}} 27 | 28 | 29 | 30 | 31 | 32 | 33 | 姓名 34 | 35 | 36 | {{user.name}} 37 | 38 | 39 | 40 | 41 | 班级 42 | 43 | 44 | {{user.class}} 45 | 46 | 47 | 48 | 49 | 学号 50 | 51 | 52 | {{user.uid}} 53 | 54 | 55 | 56 | 57 | 专业 58 | 59 | 60 | {{user.profession}} 61 | 62 | 63 | 64 | 65 | 一卡通卡号 66 | 67 | 68 | {{ehall.cardno}} 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 切换查询他人一卡通余额 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /pages/school/card/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/card/index.wxss */ 2 | 3 | /* 今日余额 */ 4 | .ykt-card { 5 | display: flex; 6 | flex-direction: column; 7 | height: 350rpx; 8 | margin: 15rpx 50rpx 45rpx; 9 | background: #ffcb63; 10 | border-radius: 15rpx; 11 | box-shadow: 5rpx 5rpx 15rpx #ccc; 12 | } 13 | .ykt-black-line { 14 | width: 100%; 15 | height: 80rpx; 16 | margin: 40rpx 0 0; 17 | background: #7b7b7b; 18 | } 19 | .ykt-content { 20 | flex: 1; 21 | display: flex; 22 | align-items: center; 23 | justify-content: space-between; 24 | } 25 | .ykt-ye { 26 | flex: 1; 27 | display: flex; 28 | flex-direction: column; 29 | padding-right: 50rpx; 30 | color: #777; 31 | } 32 | .ykt-ye-name { 33 | font-size: 11pt; 34 | line-height: 50rpx; 35 | padding-left: 30rpx; 36 | } 37 | .ykt-ye-money { 38 | text-align: center; 39 | font-size: 10pt; 40 | } 41 | .ykt-ye-value { 42 | font-size: 36pt; 43 | font-weight: bold; 44 | line-height: 80rpx; 45 | padding-right: 25rpx; 46 | } 47 | .ykt-img { 48 | display: flex; 49 | align-items: center; 50 | justify-content: center; 51 | width: 200rpx; 52 | } 53 | .ykt-img image { 54 | width: 125rpx; 55 | height: 125rpx; 56 | padding: 20rpx 30rpx; 57 | } 58 | .ykt-card-more { 59 | display: flex; 60 | justify-content: space-between; 61 | align-items: flex-end; 62 | margin: 5rpx 25rpx 10rpx 25rpx; 63 | line-height: 100%; 64 | opacity: .6; 65 | } 66 | .ykt-ye-time { 67 | font-size: 9pt; 68 | } 69 | .ykt-ye-id { 70 | font-size: 10pt; 71 | } 72 | -------------------------------------------------------------------------------- /pages/school/cert.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationStyle": "default", 3 | "navigationBarTitleText": "考证助手 - 贝壳小盒子", 4 | "navigationBarBackgroundColor": "#57B8B3", 5 | "enablePullDownRefresh": false 6 | } -------------------------------------------------------------------------------- /pages/school/cert.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 考证助手 12 | 13 | 14 | 15 | 大学期间可考的资格证书考证咨询,为同学们提供报考、成绩查询、准考证打印等资源信息。若相应网址链接变更可以咨询提醒客服学长修改。 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {{item.title}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | {{item.title}} 41 | 43 | {{subItem.subtitle}}: 44 | - {{subItem.url}} 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /pages/school/cert.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/cert.wxss */ 2 | 3 | page{ 4 | background-color: var(--cyan); 5 | } 6 | .remind-box { 7 | flex: 1; 8 | display: flex; 9 | flex-direction: column; 10 | align-items: center; 11 | justify-content: center; 12 | padding-bottom: 300rpx; 13 | } 14 | .remind-img { 15 | width: 250rpx; 16 | height: 250rpx; 17 | padding-bottom: 25rpx; 18 | } 19 | .card-item { 20 | padding: 30rpx; 21 | color: #fff; 22 | margin-bottom: 30rpx; 23 | overflow-x: scroll; 24 | } 25 | 26 | .card-title { 27 | font-size: 15pt; 28 | border-bottom: 1px solid #eee; 29 | } 30 | 31 | .card-content { 32 | margin-top: 15rpx; 33 | } 34 | 35 | .desc-title { 36 | display: flex; 37 | font-size: 13pt; 38 | line-height: 200%; 39 | } 40 | 41 | .desc-content { 42 | padding-bottom: 15rpx; 43 | font-size: 12pt; 44 | text-decoration: underline; 45 | white-space: nowrap; 46 | overflow: hidden; 47 | text-overflow: ellipsis; 48 | /* color: rgb(83, 143, 233); 49 | text-shadow:-1px 0 white,0 1px white,1px 0 white,0 -1px white; */ 50 | } -------------------------------------------------------------------------------- /pages/school/component/calendarItem.js: -------------------------------------------------------------------------------- 1 | // pages/school/component/calendarItem.js 2 | Component({ 3 | options: { 4 | styleIsolation: 'isolated' 5 | }, 6 | /** 7 | * 组件的属性列表 8 | */ 9 | properties: { 10 | outcolor: { 11 | type: String, 12 | value: 'black' 13 | }, 14 | bgcolor: { 15 | type: String, 16 | value: 'blue' 17 | }, 18 | value: { 19 | type: String, 20 | value: '' 21 | }, 22 | title: { 23 | type: String, 24 | value: '' 25 | }, 26 | subtitle: { 27 | type: String, 28 | value: '' 29 | } 30 | }, 31 | 32 | /** 33 | * 组件的初始数据 34 | */ 35 | data: { 36 | 37 | }, 38 | 39 | /** 40 | * 组件的方法列表 41 | */ 42 | methods: { 43 | 44 | } 45 | }) 46 | -------------------------------------------------------------------------------- /pages/school/component/calendarItem.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /pages/school/component/calendarItem.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{title}} 6 | {{subtitle}} 7 | 8 | {{value}} 9 | 10 | -------------------------------------------------------------------------------- /pages/school/component/calendarItem.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/component/calendarItem.wxss */ 2 | @import "../../../app.wxss"; 3 | 4 | .item-height{ 5 | height: 200rpx; 6 | } -------------------------------------------------------------------------------- /pages/school/finance/bind.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#7acfa6", 3 | "backgroundColor": "#7acfa6", 4 | "navigationBarTitleText": "绑定财务系统账号", 5 | "enablePullDownRefresh": false, 6 | "disableScroll": true, 7 | "navigationStyle": "default" 8 | } -------------------------------------------------------------------------------- /pages/school/finance/bind.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 42 | 43 | 44 | 45 | 46 | 帮助 47 | 48 | 49 | 50 | 1、证件号和密码是什么? 51 | 52 | 证件号:老生默认证件号为学号,新生没有学号可以试试考生号。已毕业离校学生不可使用 53 | 密码:默认密码为身份证账号后6位(X大写) 54 | 55 | 2、忘记密码? 56 | 57 | 登录收费平台网站(http://221.238.213.131:8809),点击“登录”->"领用及找回密码" 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /pages/school/finance/bind.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/finance/bind.wxss */ 2 | @import "../../books/bind.wxss"; -------------------------------------------------------------------------------- /pages/school/finance/component/deferApply/deferApply.js: -------------------------------------------------------------------------------- 1 | // pages/school/finance/component/deferApply/deferApply.js 2 | var app = getApp() 3 | Component({ 4 | options: { 5 | addGlobalClass: true, 6 | }, 7 | /** 8 | * 组件的属性列表 9 | */ 10 | properties: { 11 | 12 | }, 13 | 14 | lifetimes: { 15 | attached: function() { 16 | // 在组件实例进入页面节点树时执行 17 | this.inital() 18 | }, 19 | detached: function() { 20 | // 在组件实例被从页面节点树移除时执行 21 | }, 22 | }, 23 | /** 24 | * 组件的初始数据 25 | */ 26 | data: { 27 | tab: 'pending', 28 | tabs: [{ 29 | title: '可缓交', 30 | value: 'pending' 31 | }, { 32 | title: '已缓交', 33 | value: 'finished' 34 | }], 35 | data: '', 36 | datalist: [] 37 | }, 38 | 39 | /** 40 | * 组件的方法列表 41 | */ 42 | methods: { 43 | inital: function () { 44 | this.getDatalist() 45 | }, 46 | tabChanged: function (e) { 47 | const tab = this.data.tabs[e.currentTarget.dataset.index].value 48 | this.setData({ tab: tab}) 49 | const record = tab == 'pending' ? 'false' : 'true' 50 | this.getDatalist(record) 51 | }, 52 | getDatalist: function (record = 'false', page = 0, pagesize = 30) { 53 | wx.showLoading({ title: '等等,我加载下' }) 54 | const _this = this 55 | const cookie = app.globalData.financeInfo ? app.globalData.financeInfo.cookie : '' 56 | if (!cookie) { 57 | wx.showToast({ title: '请先登录', icon: 'none' }) 58 | wx.redirectTo({ url: '/pages/school/finance/bind' }) 59 | return 60 | } 61 | wx.request({ 62 | url: `${app.globalData.domain}/finance/defer`, 63 | data: { 64 | cookie: cookie, 65 | record: record, 66 | page: page, 67 | pagesize: pagesize 68 | }, 69 | timeout: app.globalData.requestTimeout, 70 | success: (res) => { 71 | if (res.data.code == 200) { 72 | const datalist = _this.formatAllDate(res.data.data) 73 | _this.setData({ datalist: datalist, data: res.data}) 74 | } else { 75 | wx.showToast({ title: res.data.message, icon: 'none' }) 76 | } 77 | }, 78 | complete: (res)=> { 79 | wx.hideLoading() 80 | } 81 | }) 82 | }, 83 | formatAllDate: function (array) { 84 | let result = [] 85 | array.forEach(element => { 86 | const showDate = new Date(parseInt(element.DelayEndTime.substr(6, 13))).toLocaleDateString() 87 | element.showDate = showDate 88 | result.push(element) 89 | }) 90 | return result 91 | } 92 | } 93 | }) 94 | -------------------------------------------------------------------------------- /pages/school/finance/component/deferApply/deferApply.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "tips": "../../../../index/component/tips" 5 | } 6 | } -------------------------------------------------------------------------------- /pages/school/finance/component/deferApply/deferApply.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{item.title}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {{item.Year}}{{item.FeeRange.Name}}{{item.ChargeProject.Name}} 15 | 16 | 17 | 18 | 19 | 欠费金额:{{item.Overdue}} 20 | 应收金额:{{item.ShowReceivable}} 21 | 缓交金额:{{tab == 'pending' ? item.Defer : item.Amount.Amount}} 22 | 23 | 24 | 到期日期:{{ item.showDate}} 25 | 26 | 27 | 上传附件:{{item.EnableAttachment}} 28 | 申请附件:{{item.FileName}} 29 | 30 | 31 | 助学贷款回执校验码:{{item.Zxdkhzjym}} 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 到底啦~什么都没有了 42 | -------------------------------------------------------------------------------- /pages/school/finance/component/deferApply/deferApply.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/finance/component/deferApply/deferApply.wxss */ -------------------------------------------------------------------------------- /pages/school/finance/component/feeBusiness/feeBusiness.js: -------------------------------------------------------------------------------- 1 | // pages/school/finance/component/feeBusiness/feeBusiness.js 2 | var app = getApp() 3 | Component({ 4 | options: { 5 | addGlobalClass: true, 6 | }, 7 | /** 8 | * 组件的属性列表 9 | */ 10 | properties: { 11 | 12 | }, 13 | lifetimes: { 14 | attached: function() { 15 | // 在组件实例进入页面节点树时执行 16 | this.inital() 17 | }, 18 | detached: function() { 19 | // 在组件实例被从页面节点树移除时执行 20 | }, 21 | }, 22 | /** 23 | * 组件的初始数据 24 | */ 25 | data: { 26 | tab: 'pending', 27 | tabs: [{ 28 | title: '待缴费', 29 | value: 'pending' 30 | }, { 31 | title: '已缴费', 32 | value: 'finished' 33 | }], 34 | data: {}, 35 | datalist: [] 36 | }, 37 | 38 | /** 39 | * 组件的方法列表 40 | */ 41 | methods: { 42 | inital: function () { 43 | this.getDatalist('false') 44 | }, 45 | tabChanged: function (e) { 46 | const tab = this.data.tabs[e.currentTarget.dataset.index].value 47 | this.setData({ tab: tab}) 48 | const paid = tab == 'pending' ? 'false' : 'true' 49 | this.getDatalist(paid) 50 | }, 51 | getDatalist: function (paid = 'true', page = 0, pagesize = 30) { 52 | wx.showLoading({ title: '等等,我加载下' }) 53 | const _this = this 54 | const cookie = app.globalData.financeInfo ? app.globalData.financeInfo.cookie : '' 55 | if (!cookie) { 56 | wx.showToast({ title: '请先登录', icon: 'none' }) 57 | wx.redirectTo({ url: '/pages/school/finance/bind' }) 58 | return 59 | } 60 | wx.request({ 61 | url: `${app.globalData.domain}/finance/fee`, 62 | data: { 63 | cookie: cookie, 64 | paid: paid, 65 | page: page, 66 | pagesize: pagesize 67 | }, 68 | timeout: app.globalData.requestTimeout, 69 | success: (res) => { 70 | _this.setData({ datalist: res.data.data, data: res.data }) 71 | }, 72 | complete: (res)=> { 73 | wx.hideLoading() 74 | } 75 | }) 76 | } 77 | } 78 | }) 79 | -------------------------------------------------------------------------------- /pages/school/finance/component/feeBusiness/feeBusiness.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "tips": "../../../../index/component/tips" 5 | } 6 | } -------------------------------------------------------------------------------- /pages/school/finance/component/feeBusiness/feeBusiness.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{item.title}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {{item.Year}}{{item.FeeRange.Name}}{{item.ChargeProject.Name}} 15 | 16 | 17 | 18 | 19 | 应收:{{item.NowReceivable}} 20 | 实收:{{item.Paid}} 21 | 22 | 23 | 减免金额:{{item.Reduce}} 24 | 欠费金额:{{item.Overdue}} 25 | 26 | 27 | 抵扣金额:{{item.Deductible}} 28 | 退费金额:{{item.Return}} 29 | 30 | 31 | 缓交金额:{{item.Delay}} 32 | 33 | 状态: 34 | 处理中 35 | {{item.ReceivableBalance <= 0 ? "已缴清" : "欠费"}} 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 到底啦~什么都没有了 47 | -------------------------------------------------------------------------------- /pages/school/finance/component/feeBusiness/feeBusiness.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/finance/component/feeBusiness/feeBusiness.wxss */ -------------------------------------------------------------------------------- /pages/school/finance/component/feeRecord/feeRecord.js: -------------------------------------------------------------------------------- 1 | // pages/school/finance/component/feeRecord.js 2 | var app = getApp() 3 | Component({ 4 | options: { 5 | addGlobalClass: true, 6 | }, 7 | /** 8 | * 组件的属性列表 9 | */ 10 | properties: { 11 | }, 12 | 13 | /** 14 | * 组件的初始数据 15 | */ 16 | data: { 17 | datalist: [] 18 | }, 19 | lifetimes: { 20 | attached: function() { 21 | // 在组件实例进入页面节点树时执行 22 | this.inital() 23 | }, 24 | detached: function() { 25 | // 在组件实例被从页面节点树移除时执行 26 | }, 27 | }, 28 | 29 | /** 30 | * 组件的方法列表 31 | */ 32 | methods: { 33 | inital: function () { 34 | this.getDatalist() 35 | }, 36 | formatDatalist: function (array = []) { 37 | let result = [] 38 | // 一级目录 39 | array.forEach(element => { 40 | if (element.ParentTaskUID == -1) { 41 | element.unfold = true 42 | result.push(element) 43 | } 44 | }) 45 | // 二级目录 46 | array.forEach(element => { 47 | result.forEach(function(subele, subidx) { 48 | if (!subele.children) { 49 | result[subidx].children = [] 50 | } 51 | if (element.ParentTaskUID == subele.UID) { 52 | result[subidx].children.push(element) 53 | } 54 | }) 55 | }) 56 | // 三级目录 57 | array.forEach(element => { 58 | result.forEach(function(subele, subidx) { 59 | subele.children.forEach(function(ssubele, ssubidx) { 60 | if (!ssubele.children) { 61 | result[subidx].children[ssubidx].children = [] 62 | } 63 | if (element.ParentTaskUID == ssubele.UID) { 64 | result[subidx].children[ssubidx].children.push(element) 65 | } 66 | }) 67 | }) 68 | }) 69 | // console.log(result) 70 | return result 71 | }, 72 | fold: function (e) { 73 | const index = e.currentTarget.dataset.index 74 | let datalist = this.data.datalist 75 | datalist[index].unfold = !datalist[index].unfold 76 | this.setData({ datalist: datalist }) 77 | }, 78 | getDatalist: function (page = 0, pagesize = 30) { 79 | wx.showLoading({ title: '等等,我加载下' }) 80 | const _this = this 81 | const cookie = app.globalData.financeInfo ? app.globalData.financeInfo.cookie : '' 82 | if (!cookie) { 83 | wx.showToast({ title: '请先登录', icon: 'none' }) 84 | wx.redirectTo({ url: '/pages/school/finance/bind' }) 85 | return 86 | } 87 | wx.request({ 88 | url: `${app.globalData.domain}/finance/paid`, 89 | data: { 90 | cookie: cookie, 91 | page: page, 92 | pagesize: pagesize 93 | }, 94 | timeout: app.globalData.requestTimeout, 95 | success: (res) => { 96 | if (res.data.code == 200) { 97 | const datalist = _this.formatDatalist(res.data.data) 98 | _this.setData({ datalist: datalist }) 99 | } else { 100 | wx.showToast({ title: res.data.message }) 101 | } 102 | }, 103 | complete: (res)=> { 104 | wx.hideLoading() 105 | } 106 | }) 107 | } 108 | } 109 | }) 110 | -------------------------------------------------------------------------------- /pages/school/finance/component/feeRecord/feeRecord.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "tips": "../../../../index/component/tips" 5 | } 6 | } -------------------------------------------------------------------------------- /pages/school/finance/component/feeRecord/feeRecord.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/finance/component/feeRecord.wxss */ 2 | page { 3 | background-color: var(--cyan); 4 | } 5 | .cu-list.menu-avatar.comment>.cu-item { 6 | padding: 30rpx 30rpx 0rpx 50rpx; 7 | } -------------------------------------------------------------------------------- /pages/school/finance/component/invoiceApply/invoiceApply.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "tips": "../../../../index/component/tips" 5 | } 6 | } -------------------------------------------------------------------------------- /pages/school/finance/component/invoiceApply/invoiceApply.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/finance/component/invoiceApply/invoiceApply.wxss */ -------------------------------------------------------------------------------- /pages/school/finance/component/orderRecord/orderRecord.js: -------------------------------------------------------------------------------- 1 | // pages/school/finance/component/orderRecord/orderRecord.js 2 | var app = getApp() 3 | Component({ 4 | options: { 5 | addGlobalClass: true, 6 | }, 7 | /** 8 | * 组件的属性列表 9 | */ 10 | properties: { 11 | 12 | }, 13 | 14 | lifetimes: { 15 | attached: function() { 16 | // 在组件实例进入页面节点树时执行 17 | this.inital() 18 | }, 19 | detached: function() { 20 | // 在组件实例被从页面节点树移除时执行 21 | }, 22 | }, 23 | /** 24 | * 组件的初始数据 25 | */ 26 | data: { 27 | data: '', 28 | datalist: [] 29 | }, 30 | 31 | /** 32 | * 组件的方法列表 33 | */ 34 | methods: { 35 | inital: function () { 36 | this.getDatalist() 37 | }, 38 | getDatalist: function (page = 0, pagesize = 30) { 39 | wx.showLoading({ title: '等等,我加载下' }) 40 | const _this = this 41 | const cookie = app.globalData.financeInfo ? app.globalData.financeInfo.cookie : '' 42 | if (!cookie) { 43 | wx.showToast({ title: '请先登录', icon: 'none' }) 44 | wx.redirectTo({ url: '/pages/school/finance/bind' }) 45 | return 46 | } 47 | 48 | wx.request({ 49 | url: `${app.globalData.domain}/finance/order`, 50 | data: { 51 | cookie: cookie, 52 | page: page, 53 | pagesize: pagesize 54 | }, 55 | timeout: app.globalData.requestTimeout, 56 | success: (res) => { 57 | if (res.data.code == 200) { 58 | _this.setData({ datalist: res.data.data, data: res.data }) 59 | } else { 60 | wx.showToast({ title: res.data.message, icon: 'none' }) 61 | } 62 | }, 63 | complete: (res)=> { 64 | wx.hideLoading() 65 | } 66 | }) 67 | } 68 | } 69 | }) 70 | -------------------------------------------------------------------------------- /pages/school/finance/component/orderRecord/orderRecord.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /pages/school/finance/component/orderRecord/orderRecord.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{item.OrderDetailList[0].Year}}{{item.OrderDetailList[0].FeeRange.Name}}{{item.OrderDetailList[0].ChargeProject.Name}} 8 | 9 | 10 | 11 | 12 | 订单编号:{{item.OrderNo}} 13 | 14 | 15 | 订单金额:{{item.Amount}} 16 | 支付金额:{{item.PayAmount}} 17 | 18 | 19 | 收费方式:{{item.ChargeType.Name}} 20 | 21 | 22 | 订单状态:{{item.OrderStatus}} 23 | 24 | 25 | 订单时间:{{item.CreateDate}} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 到底啦~什么都没有了 36 | -------------------------------------------------------------------------------- /pages/school/finance/component/orderRecord/orderRecord.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/finance/component/orderRecord/orderRecord.wxss */ -------------------------------------------------------------------------------- /pages/school/finance/component/subsidyInfo/subsidyInfo.js: -------------------------------------------------------------------------------- 1 | // pages/school/finance/component/subsidyInfo/subsidyInfo.js 2 | var app = getApp() 3 | Component({ 4 | options: { 5 | addGlobalClass: true, 6 | }, 7 | /** 8 | * 组件的属性列表 9 | */ 10 | properties: { 11 | 12 | }, 13 | 14 | lifetimes: { 15 | attached: function() { 16 | // 在组件实例进入页面节点树时执行 17 | this.inital() 18 | }, 19 | detached: function() { 20 | // 在组件实例被从页面节点树移除时执行 21 | }, 22 | }, 23 | /** 24 | * 组件的初始数据 25 | */ 26 | data: { 27 | 28 | tab: 'pending', 29 | tabs: [{ 30 | title: '待发放', 31 | value: 'pending' 32 | }, { 33 | title: '已发放', 34 | value: 'finished' 35 | }], 36 | data: '', 37 | datalist: [] 38 | }, 39 | 40 | /** 41 | * 组件的方法列表 42 | */ 43 | methods: { 44 | inital: function () { 45 | this.getDatalist() 46 | }, 47 | tabChanged: function (e) { 48 | const tab = this.data.tabs[e.currentTarget.dataset.index].value 49 | this.setData({ tab: tab}) 50 | const unrelease = tab == 'pending' ? 'true' : 'false' 51 | this.getDatalist(unrelease) 52 | }, 53 | getDatalist: function (unrelease = 'true', page = 0, pagesize = 30) { 54 | wx.showLoading({ title: '等等,我加载下' }) 55 | const _this = this 56 | const cookie = app.globalData.financeInfo ? app.globalData.financeInfo.cookie : '' 57 | if (!cookie) { 58 | wx.showToast({ title: '请先登录', icon: 'none' }) 59 | wx.redirectTo({ url: '/pages/school/finance/bind' }) 60 | return 61 | } 62 | wx.request({ 63 | url: `${app.globalData.domain}/finance/subsidy`, 64 | data: { 65 | cookie: cookie, 66 | unrelease: unrelease, 67 | page: page, 68 | pagesize: pagesize 69 | }, 70 | timeout: app.globalData.requestTimeout, 71 | success: (res) => { 72 | if (res.data.code == 200) { 73 | _this.setData({ datalist: res.data.data, data: res.data }) 74 | } else { 75 | wx.showToast({ title: res.data.message, icon: 'none' }) 76 | } 77 | }, 78 | complete: (res)=> { 79 | wx.hideLoading() 80 | } 81 | }) 82 | } 83 | } 84 | }) 85 | -------------------------------------------------------------------------------- /pages/school/finance/component/subsidyInfo/subsidyInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "tips": "../../../../index/component/tips" 5 | } 6 | } -------------------------------------------------------------------------------- /pages/school/finance/component/subsidyInfo/subsidyInfo.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{item.title}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {{item.GrantDate}}{{item.SubsidyType}} 15 | 16 | 17 | 18 | 19 | 发放金额:{{item.Payable}} 20 | 21 | 22 | 抵扣项目:{{item.DiKouItems[0].DYear}}{{item.DiKouItems[0].DFeeRange}}{{item.DiKouItems[0].DBaseChargeProject}} 23 | 24 | 25 | 抵扣金额:{{item.DiKouItems[0].DDeductible}} 26 | 实际发放金额:{{item.Paid}} 27 | 28 | 29 | 状态:{{item.State}} 30 | 31 | 32 | 发放说明:{{item.Remark ? item.Remark : ''}} 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 到底啦~什么都没有了 43 | -------------------------------------------------------------------------------- /pages/school/finance/component/subsidyInfo/subsidyInfo.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/finance/component/subsidyInfo/subsidyInfo.wxss */ -------------------------------------------------------------------------------- /pages/school/finance/index.js: -------------------------------------------------------------------------------- 1 | // pages/school/finance/index.js 2 | var app = getApp() 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | tabbar: '缴费记录', 10 | tabbars: [{ 11 | name: '缴费记录', 12 | icon: 'cuIcon-redpacket' 13 | }, { 14 | name: '缴费业务', 15 | icon: 'cuIcon-moneybag' 16 | }, { 17 | name: '订单记录', 18 | icon: 'cuIcon-list' 19 | }, { 20 | name: '补助信息', 21 | icon: 'cuIcon-refund' 22 | }, { 23 | name: '缓交申请', 24 | icon: 'cuIcon-comment' 25 | }, { 26 | name: '开票申请', 27 | icon: 'cuIcon-ticket' 28 | }] 29 | }, 30 | 31 | /** 32 | * 生命周期函数--监听页面加载 33 | */ 34 | onLoad: function (options) { 35 | let financeInfo = app.globalData.financeInfo 36 | if (!financeInfo) { 37 | wx.redirectTo({ url: './bind' }) 38 | return 39 | } 40 | console.log('finance收费平台账号登录信息', financeInfo) 41 | }, 42 | 43 | /** 44 | * 生命周期函数--监听页面初次渲染完成 45 | */ 46 | onReady: function () { 47 | 48 | }, 49 | 50 | /** 51 | * 生命周期函数--监听页面显示 52 | */ 53 | onShow: function () { 54 | 55 | }, 56 | 57 | /** 58 | * 生命周期函数--监听页面隐藏 59 | */ 60 | onHide: function () { 61 | 62 | }, 63 | 64 | /** 65 | * 生命周期函数--监听页面卸载 66 | */ 67 | onUnload: function () { 68 | 69 | }, 70 | 71 | /** 72 | * 页面相关事件处理函数--监听用户下拉动作 73 | */ 74 | onPullDownRefresh: function () { 75 | 76 | }, 77 | 78 | /** 79 | * 页面上拉触底事件的处理函数 80 | */ 81 | onReachBottom: function () { 82 | 83 | }, 84 | tabbarChange: function (e) { 85 | const name = e.currentTarget.dataset.name 86 | this.setData({ tabbar: name }) 87 | }, 88 | /** 89 | * 用户点击右上角分享 90 | */ 91 | onShareAppMessage: function () { 92 | 93 | } 94 | }) -------------------------------------------------------------------------------- /pages/school/finance/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "feeRecord": "./component/feeRecord/feeRecord", 4 | "orderRecord": "./component/orderRecord/orderRecord", 5 | "feeBusiness": "./component/feeBusiness/feeBusiness", 6 | "subsidyInfo": "./component/subsidyInfo/subsidyInfo", 7 | "deferApply": "./component/deferApply/deferApply", 8 | "invoiceApply": "./component/invoiceApply/invoiceApply" 9 | } 10 | } -------------------------------------------------------------------------------- /pages/school/finance/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{tabbar}} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{item.name}} 17 | 18 | -------------------------------------------------------------------------------- /pages/school/finance/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/finance/index.wxss */ -------------------------------------------------------------------------------- /pages/school/movie.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "calendar": "/utils/calendar/index", 4 | "tips": "../index/component/tips" 5 | } 6 | } -------------------------------------------------------------------------------- /pages/school/movie.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 音像室影片放映 4 | 5 | 6 | 7 | *:日期下方小绿点表示当天有影片放映安排 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 当天放映 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {{item.name}}({{item.year}}) 24 | 25 | 26 | {{ item.play_at }} 27 | 28 | 29 | 社科图书馆音像室(201) 30 | 31 | 32 | {{item.duration}} 33 | {{item.genre}} 34 | 35 | {{item.actor}} 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /pages/school/movie.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/movie.wxss */ -------------------------------------------------------------------------------- /pages/school/run/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tips": "../../index/component/tips" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/school/run/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/run/index.wxss */ 2 | page { 3 | background-color: #6847E7; 4 | height: 100%; 5 | } 6 | .image-width { 7 | width: 100%; 8 | } 9 | .icon-size { 10 | width: 60rpx; 11 | height: 80rpx; 12 | } 13 | .userinfo-avatar { 14 | border-radius: 50rpx; 15 | clip-path: circle(50% at center); 16 | box-shadow: 5rpx 5rpx 15rpx #ccc; 17 | } 18 | 19 | .bottom-image { 20 | margin-bottom: 150rpx; 21 | } -------------------------------------------------------------------------------- /pages/school/tel.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/school/tel.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 学院电话 - 贝壳小盒子 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | {{index}} 19 | 20 | 22 | 23 | {{tel.name}} 24 | 25 | 26 | 27 | {{tel.name}} 28 | 29 | 022-{{tel.tel}} 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | {{list[index]}} 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /pages/school/tel.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/tel.wxss */ 2 | page { 3 | padding-top: 100rpx; 4 | } 5 | 6 | .indexes { 7 | position: relative; 8 | } 9 | 10 | .indexBar { 11 | position: fixed; 12 | right: 0px; 13 | bottom: 0px; 14 | padding: 20rpx 20rpx 20rpx 60rpx; 15 | display: flex; 16 | align-items: center; 17 | } 18 | 19 | .indexBar .indexBar-box { 20 | width: 40rpx; 21 | height: auto; 22 | background: #fff; 23 | display: flex; 24 | flex-direction: column; 25 | box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1); 26 | border-radius: 10rpx; 27 | } 28 | 29 | .indexBar-item { 30 | flex: 1; 31 | width: 40rpx; 32 | height: 40rpx; 33 | display: flex; 34 | align-items: center; 35 | justify-content: center; 36 | font-size: 24rpx; 37 | color: #888; 38 | } 39 | 40 | movable-view.indexBar-item { 41 | width: 40rpx; 42 | height: 40rpx; 43 | z-index: 9; 44 | position: relative; 45 | } 46 | 47 | movable-view.indexBar-item::before { 48 | content: ""; 49 | display: block; 50 | position: absolute; 51 | left: 0; 52 | top: 10rpx; 53 | height: 20rpx; 54 | width: 4rpx; 55 | background-color: #f37b1d; 56 | } 57 | 58 | .indexToast { 59 | position: fixed; 60 | top: 0; 61 | right: 80rpx; 62 | bottom: 0; 63 | background: rgba(0, 0, 0, 0.5); 64 | width: 100rpx; 65 | height: 100rpx; 66 | border-radius: 10rpx; 67 | margin: auto; 68 | color: #fff; 69 | line-height: 100rpx; 70 | text-align: center; 71 | font-size: 48rpx; 72 | } 73 | -------------------------------------------------------------------------------- /pages/school/web.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/school/web.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 校园站点 - 贝壳小盒子 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 校园站点 16 | 17 | 18 | 19 | 学校相关的一些网站,打开新世界的大门。点击链接可以复制到粘贴板,然后可打开浏览器访问。校园网站点必须连接校园网方可访问(不是移动CMCC的那个,是学校的校园网)。\r\n\r\n *本页面内容仅做展示不代表以下站点与本程序有任何关联关系。 20 | 21 | 22 | 23 | 24 | - 公共外网 - 25 | 26 | 29 | {{item.title}} 30 | {{url}} 32 | 33 | 34 | 35 | 36 | 37 | - 校园网 - 38 | 39 | 42 | {{item.title}} 43 | {{url}} 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /pages/school/web.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/web.wxss */ 2 | @import "./cert.wxss"; 3 | 4 | page{ 5 | background-color: var(--cyan); 6 | } 7 | 8 | .underline{ 9 | text-decoration: underline; 10 | } -------------------------------------------------------------------------------- /pages/school/xiaoai.js: -------------------------------------------------------------------------------- 1 | // pages/school/xiaoai.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | isLoading:true, 9 | cover: 'https://upload-images.jianshu.io/upload_images/4697920-fc4ca94341465a0c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 10 | guideImages:[ 11 | 'https://upload-images.jianshu.io/upload_images/4697920-160801a94ef0039a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 12 | 'https://upload-images.jianshu.io/upload_images/4697920-67c3f6650998eee6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 13 | 'https://upload-images.jianshu.io/upload_images/4697920-19c2e81ae14d4e15.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 14 | 'https://upload-images.jianshu.io/upload_images/4697920-3e034cf229e93284.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 15 | 'https://upload-images.jianshu.io/upload_images/4697920-50e80fc9566bab30.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 16 | 'https://upload-images.jianshu.io/upload_images/4697920-43ddace2b43ddf58.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 17 | 'https://upload-images.jianshu.io/upload_images/4697920-f9d98473ae6ead5e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 18 | 'https://upload-images.jianshu.io/upload_images/4697920-f1418ec9f834aef0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 19 | 'https://upload-images.jianshu.io/upload_images/4697920-3705a1e3879ce130.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240', 20 | 'https://upload-images.jianshu.io/upload_images/4697920-43945b1dc3e74a4e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240' 21 | ] 22 | }, 23 | 24 | /** 25 | * 生命周期函数--监听页面加载 26 | */ 27 | onLoad: function (options) { 28 | wx.showShareMenu({ 29 | withShareTicket: true, 30 | menus: ['shareAppMessage', 'shareTimeline'] 31 | }) 32 | }, 33 | 34 | fullScreenPreview(){ 35 | const allImages = this.data.guideImages 36 | wx.showToast({ 37 | title: '左右滑动切换上/下一步', 38 | icon:'none' 39 | }) 40 | wx.previewImage({ 41 | urls: allImages, 42 | }) 43 | }, 44 | go2Bilibili: function () { 45 | wx.navigateToMiniProgram({ 46 | appId: 'wx7564fd5313d24844', 47 | path: 'pages/video/video?bvid=BV1CL4y1Y7C5' 48 | }) 49 | }, 50 | /** 51 | * 生命周期函数--监听页面初次渲染完成 52 | */ 53 | onReady: function () { 54 | var that = this; 55 | setTimeout(function() { 56 | that.setData({ 57 | isLoading: false 58 | }); 59 | }, 800); 60 | }, 61 | 62 | /** 63 | * 生命周期函数--监听页面显示 64 | */ 65 | onShow: function () { 66 | 67 | }, 68 | 69 | /** 70 | * 生命周期函数--监听页面隐藏 71 | */ 72 | onHide: function () { 73 | 74 | }, 75 | 76 | /** 77 | * 生命周期函数--监听页面卸载 78 | */ 79 | onUnload: function () { 80 | 81 | }, 82 | 83 | /** 84 | * 页面相关事件处理函数--监听用户下拉动作 85 | */ 86 | onPullDownRefresh: function () { 87 | 88 | }, 89 | 90 | /** 91 | * 页面上拉触底事件的处理函数 92 | */ 93 | onReachBottom: function () { 94 | 95 | }, 96 | 97 | /** 98 | * 用户点击右上角分享 99 | */ 100 | onShareAppMessage: function () { 101 | let cover = this.data.cover 102 | return { 103 | title: '“贝壳小盒子” - 小爱课程表使用指南', 104 | path: 'pages/school/xiaoai', 105 | imageUrl: cover 106 | } 107 | } 108 | }) -------------------------------------------------------------------------------- /pages/school/xiaoai.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/school/xiaoai.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 小爱课程表 - 贝壳小盒子 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 小爱课程表 16 | 17 | 18 | 19 | 小米或MIUI手机用户可以通过小爱同学快速查询学校课表,方法如下:\r\n 本功能由“不改需求的程序猿”同学个人开发,与任何单位组织无关联关系 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 演示视频 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /pages/school/xiaoai.wxss: -------------------------------------------------------------------------------- 1 | /* pages/school/xiaoai.wxss */ 2 | @import "./cert.wxss"; 3 | 4 | page{ 5 | background-color: var(--cyan); 6 | } -------------------------------------------------------------------------------- /pages/score/score.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#030c13", 3 | "enablePullDownRefresh": false, 4 | "usingComponents": { 5 | "calendar-item": "../school/component/calendarItem", 6 | "canvasdrawer": "/utils/canvasdrawer/canvasdrawer" 7 | } 8 | } -------------------------------------------------------------------------------- /pages/score/score.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 成绩 - 贝壳小盒子 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 成绩查询 16 | 17 | 18 | 19 | 注:最终成绩以教务为准,本程序计算结果仅作参考,不具有官方权威性。学分为0或成绩低于60分的课程不纳入计算公式。 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 分享成绩单 35 | My Transcript 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | {{semester}}学期 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | {{item.className}}({{item.classType}}) 55 | {{item.examType}} {{item.period}}学时 {{item.credit}}学分 56 | 57 | 58 | {{item.score}} 59 | {{item.score}} 60 | {{item.score}} 61 | 62 | 63 | 64 | 算术平均分:{{item.avg}} 65 | 加权平均分: {{item.gpa}} 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /pages/score/score.wxss: -------------------------------------------------------------------------------- 1 | /* pages/score/score.wxss */ 2 | @import "../school/calendar.wxss"; -------------------------------------------------------------------------------- /pages/traffic/bus.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/traffic/bus.wxss: -------------------------------------------------------------------------------- 1 | /* pages/traffic/bus.wxss */ 2 | @import "../school/calendar.wxss"; 3 | 4 | page{ 5 | background-color: #7acfa6; 6 | } 7 | 8 | .text-indent{ 9 | text-indent: 2em; 10 | } -------------------------------------------------------------------------------- /pages/traffic/navi.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationStyle": "default", 3 | "navigationBarTitleText": "校园导航 - 贝壳小盒子", 4 | "navigationBarBackgroundColor": "#7acfa6", 5 | "enablePullDownRefresh": false, 6 | "disableScroll": true 7 | } -------------------------------------------------------------------------------- /pages/traffic/navi.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {{placeName}} 26 | 距离:{{distance}} ({{cost}}) 27 | 详情 28 | 29 | 30 | 学校 31 | 前往 32 | 33 | {{schoolAddressText}}(邮编:{{postcode}}) 34 | 35 | 36 | -------------------------------------------------------------------------------- /pages/traffic/navi.wxss: -------------------------------------------------------------------------------- 1 | /* pages/traffic/navi.wxss */ 2 | .container { 3 | align-items: stretch; 4 | padding: 0; 5 | height: 100%; 6 | overflow: hidden; 7 | } 8 | 9 | .remind-box { 10 | flex: 1; 11 | display: flex; 12 | flex-direction: column; 13 | align-items: center; 14 | justify-content: center; 15 | padding-bottom: 300rpx; 16 | padding-top: 500rpx; 17 | } 18 | 19 | .remind-img { 20 | width: 250rpx; 21 | height: 250rpx; 22 | padding-bottom: 25rpx; 23 | } 24 | 25 | .controls { 26 | position: relative; 27 | top: 70%; 28 | left: 85%; 29 | /* display: flex; */ 30 | } 31 | 32 | .controls .img { 33 | margin-top: 5px; 34 | width: 80rpx; 35 | height: 80rpx; 36 | } 37 | 38 | .full { 39 | top: 82%; 40 | } 41 | 42 | .flex-style { 43 | display: -webkit-box; 44 | display: -webkit-flex; 45 | display: flex; 46 | } 47 | 48 | .flex-item { 49 | height: 35px; 50 | line-height: 35px; 51 | text-align: center; 52 | -webkit-box-flex: 1; 53 | -webkit-flex: 1; 54 | flex: 1; 55 | } 56 | 57 | .flex-item.active { 58 | color: #0091ff; 59 | } 60 | 61 | .map_box { 62 | position: absolute; 63 | top: 0px; 64 | bottom: 90px; 65 | left: 0px; 66 | right: 0px; 67 | } 68 | 69 | #navi_map { 70 | width: 100%; 71 | height: 100%; 72 | } 73 | 74 | .text_box { 75 | position: absolute; 76 | height: 90px; 77 | bottom: 0px; 78 | left: 0px; 79 | right: 0px; 80 | } 81 | 82 | .text_box .text { 83 | margin: 15px; 84 | } 85 | 86 | .detail_button { 87 | position: absolute; 88 | bottom: 50px; 89 | right: 10px; 90 | padding: 3px 5px; 91 | color: #fff; 92 | background: #0091ff; 93 | width: 50px; 94 | text-align: center; 95 | border-radius: 5px; 96 | } -------------------------------------------------------------------------------- /pages/webview/redpacket.js: -------------------------------------------------------------------------------- 1 | // pages/webview/redpacket.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | url: '' 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad(options) { 15 | const url = options.url ? decodeURIComponent(options.url) : '' 16 | console.log('红包封面领取链接地址:', url) 17 | if (url === '') wx.reLaunch({ url: '/pages/index/index' }) 18 | this.setData({ url: url }) 19 | }, 20 | 21 | /** 22 | * 生命周期函数--监听页面初次渲染完成 23 | */ 24 | onReady() { 25 | 26 | }, 27 | 28 | /** 29 | * 生命周期函数--监听页面显示 30 | */ 31 | onShow() { 32 | wx.showRedPackage({ url: this.data.url }) 33 | }, 34 | 35 | /** 36 | * 生命周期函数--监听页面隐藏 37 | */ 38 | onHide() { 39 | 40 | }, 41 | 42 | /** 43 | * 生命周期函数--监听页面卸载 44 | */ 45 | onUnload() { 46 | 47 | }, 48 | 49 | /** 50 | * 页面相关事件处理函数--监听用户下拉动作 51 | */ 52 | onPullDownRefresh() { 53 | 54 | }, 55 | 56 | /** 57 | * 页面上拉触底事件的处理函数 58 | */ 59 | onReachBottom() { 60 | 61 | }, 62 | 63 | /** 64 | * 用户点击右上角分享 65 | */ 66 | onShareAppMessage() { 67 | 68 | } 69 | }) -------------------------------------------------------------------------------- /pages/webview/redpacket.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /pages/webview/redpacket.wxml: -------------------------------------------------------------------------------- 1 |   -------------------------------------------------------------------------------- /pages/webview/redpacket.wxss: -------------------------------------------------------------------------------- 1 | /* pages/webview/redpacket.wxss */ -------------------------------------------------------------------------------- /pages/webview/webview.js: -------------------------------------------------------------------------------- 1 | // pages/webview/webview.js 2 | const defaultUrl = 'https://mp.weixin.qq.com/s/51iFkQBg89lZKz_1a7bLgw' 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | url: defaultUrl 10 | }, 11 | 12 | /** 13 | * 生命周期函数--监听页面加载 14 | */ 15 | onLoad(options) { 16 | let url = '' 17 | if (typeof options.url == 'undefined') { 18 | url = defaultUrl 19 | } else { 20 | url = decodeURIComponent(options.url) 21 | } 22 | this.setData({ url: url }) 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面初次渲染完成 27 | */ 28 | onReady() { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面显示 34 | */ 35 | onShow() { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面隐藏 41 | */ 42 | onHide() { 43 | 44 | }, 45 | 46 | /** 47 | * 生命周期函数--监听页面卸载 48 | */ 49 | onUnload() { 50 | 51 | }, 52 | 53 | /** 54 | * 页面相关事件处理函数--监听用户下拉动作 55 | */ 56 | onPullDownRefresh() { 57 | 58 | }, 59 | 60 | /** 61 | * 页面上拉触底事件的处理函数 62 | */ 63 | onReachBottom() { 64 | 65 | }, 66 | 67 | /** 68 | * 用户点击右上角分享 69 | */ 70 | onShareAppMessage() { 71 | 72 | } 73 | }) -------------------------------------------------------------------------------- /pages/webview/webview.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarBackgroundColor": "#7ACFA6", 3 | "navigationBarTextStyle": "white", 4 | "navigationBarTitleText": "贝壳小盒子", 5 | "backgroundColor": "#7ACFA6", 6 | "backgroundTextStyle": "light", 7 | "navigationStyle": "default" 8 | } -------------------------------------------------------------------------------- /pages/webview/webview.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pages/webview/webview.wxss: -------------------------------------------------------------------------------- 1 | /* pages/webview/webview.wxss */ -------------------------------------------------------------------------------- /project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件", 3 | "packOptions": { 4 | "ignore": [], 5 | "include": [] 6 | }, 7 | "setting": { 8 | "urlCheck": true, 9 | "es6": true, 10 | "enhance": false, 11 | "postcss": true, 12 | "preloadBackgroundData": false, 13 | "minified": true, 14 | "newFeature": true, 15 | "coverView": true, 16 | "nodeModules": false, 17 | "autoAudits": false, 18 | "showShadowRootInWxmlPanel": true, 19 | "scopeDataCheck": false, 20 | "uglifyFileName": false, 21 | "checkInvalidKey": true, 22 | "checkSiteMap": true, 23 | "uploadWithSourceMap": true, 24 | "compileHotReLoad": false, 25 | "useMultiFrameRuntime": false, 26 | "useApiHook": false, 27 | "useApiHostProcess": false, 28 | "babelSetting": { 29 | "ignore": [], 30 | "disablePlugins": [], 31 | "outputPath": "" 32 | }, 33 | "useIsolateContext": false, 34 | "userConfirmedBundleSwitch": false, 35 | "packNpmManually": false, 36 | "packNpmRelationList": [], 37 | "minifyWXSS": true, 38 | "disableUseStrict": false, 39 | "minifyWXML": true, 40 | "showES6CompileOption": false, 41 | "useCompilerPlugins": false, 42 | "ignoreUploadUnusedFiles": true, 43 | "condition": false 44 | }, 45 | "compileType": "miniprogram", 46 | "libVersion": "2.15.0", 47 | "appid": "wxf0ba93e3faff4eda", 48 | "projectname": "shellbox-weapp", 49 | "simulatorType": "wechat", 50 | "simulatorPluginLibVersion": {}, 51 | "condition": { 52 | "search": { 53 | "list": [] 54 | }, 55 | "conversation": { 56 | "list": [] 57 | }, 58 | "game": { 59 | "currentL": -1, 60 | "list": [] 61 | }, 62 | "miniprogram": { 63 | "list": [] 64 | } 65 | }, 66 | "editorSetting": { 67 | "tabIndent": "insertSpaces", 68 | "tabSize": 2 69 | } 70 | } -------------------------------------------------------------------------------- /project.private.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "setting": { 3 | "urlCheck": false 4 | }, 5 | "condition": { 6 | "miniprogram": { 7 | "list": [ 8 | { 9 | "name": "movie", 10 | "pathName": "pages/school/movie", 11 | "query": "", 12 | "launchMode": "default", 13 | "scene": null 14 | } 15 | ] 16 | } 17 | }, 18 | "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", 19 | "libVersion": "2.33.0" 20 | } -------------------------------------------------------------------------------- /sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /utils/calendar/helper.js: -------------------------------------------------------------------------------- 1 | import { dateUtil } from './utils/index' 2 | 3 | export function calcTargetYMInfo() { 4 | return { 5 | right: dateUtil.getPrevMonthInfo, 6 | left: dateUtil.getNextMonthInfo, 7 | prev_month: dateUtil.getPrevMonthInfo, 8 | next_month: dateUtil.getNextMonthInfo, 9 | prev_year: dateUtil.getPrevYearInfo, 10 | next_year: dateUtil.getNextYearInfo 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /utils/calendar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /utils/calendar/plugins/index.js: -------------------------------------------------------------------------------- 1 | import preset from './preset/index' 2 | 3 | export default { 4 | installed: [...preset], 5 | use(plugin) { 6 | if (typeof plugin !== 'function') return 7 | const info = plugin() || {} 8 | const { name } = info 9 | if ( 10 | name && 11 | name !== 'methods' && 12 | !this.installed.some(p => p[0] === name) 13 | ) { 14 | this.installed.unshift([name, info]) 15 | } 16 | return this 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /utils/calendar/plugins/preset/get-calendar-data.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @Author: drfu* 3 | * @Description: 获取日历数据 4 | * @Date: 2020-10-08 21:22:09* 5 | * @Last Modified by: drfu 6 | * @Last Modified time: 2020-10-11 13:42:37 7 | * */ 8 | 9 | import { getCalendarData, logger, getCalendarConfig } from '../../utils/index' 10 | 11 | function wrapDateWithLunar(dates = [], convertFn) { 12 | const datesWithLunar = JSON.parse(JSON.stringify(dates)).map(date => ({ 13 | ...date, 14 | lunar: convertFn(date) 15 | })) 16 | return datesWithLunar 17 | } 18 | 19 | export default () => { 20 | return { 21 | name: 'getData', 22 | methods(component) { 23 | return { 24 | getCurrentYM: () => { 25 | const { curYear, curMonth } = getCalendarData('calendar', component) 26 | return { 27 | year: curYear, 28 | month: curMonth 29 | } 30 | }, 31 | getSelectedDates: (options = {}) => { 32 | const dates = 33 | getCalendarData('calendar.selectedDates', component) || [] 34 | const config = getCalendarConfig(component) || {} 35 | if (options.lunar && !config.showLunar) { 36 | const injectedFns = component.calendar || {} 37 | if (typeof injectedFns.convertSolarLunar === 'function') { 38 | return wrapDateWithLunar(dates, injectedFns.convertSolarLunar) 39 | } else { 40 | logger.warn('获取农历信息需引入农历插件') 41 | } 42 | } else { 43 | return dates 44 | } 45 | }, 46 | getCalendarDates: (options = {}) => { 47 | const config = getCalendarConfig(component) || {} 48 | const dates = getCalendarData('calendar.dates', component) 49 | if (options.lunar && !config.showLunar) { 50 | const injectedFns = component.calendar || {} 51 | if (typeof injectedFns.convertSolarLunar === 'function') { 52 | return wrapDateWithLunar(dates, injectedFns.convertSolarLunar) 53 | } else { 54 | logger.warn('获取农历信息需引入农历插件') 55 | } 56 | } else { 57 | return dates 58 | } 59 | }, 60 | getCalendarAllData: () => { 61 | return { 62 | data: getCalendarData('calendar', component) || {}, 63 | config: getCalendarConfig(component) || {} 64 | } 65 | } 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /utils/calendar/plugins/preset/index.js: -------------------------------------------------------------------------------- 1 | import base from './base' 2 | import getCalendarData from './get-calendar-data' 3 | 4 | const preset = [ 5 | ['base', base()], 6 | ['get-calendar-data', getCalendarData()] 7 | ] 8 | 9 | export default preset 10 | -------------------------------------------------------------------------------- /utils/calendar/plugins/solarLunar/index.js: -------------------------------------------------------------------------------- 1 | import { dateUtil } from '../../utils/index' 2 | import convertSolarLunar from './convertSolarLunar' 3 | 4 | function getDateRow2Dict(dateInfo) { 5 | if (!dateInfo) return dateInfo 6 | if (typeof dateInfo === 'string' && dateInfo.includes('-')) { 7 | dateInfo = dateUtil.transformDateRow2Dict(dateInfo) 8 | } 9 | return dateInfo 10 | } 11 | 12 | export default () => { 13 | return { 14 | name: 'convertSolarLunar', 15 | beforeRender(calendarData = {}, calendarConfig = {}) { 16 | let { dates = [], selectedDates = [] } = calendarData 17 | if (calendarConfig.showLunar) { 18 | dates = dates.map(dataInfo => { 19 | const { year, month, date } = dataInfo 20 | return { 21 | ...dataInfo, 22 | lunar: convertSolarLunar.solar2lunar(year, month, date) 23 | } 24 | }) 25 | selectedDates = selectedDates.map(dataInfo => { 26 | const { year, month, date } = dataInfo 27 | return { 28 | ...dataInfo, 29 | lunar: convertSolarLunar.solar2lunar(year, month, date) 30 | } 31 | }) 32 | } 33 | return { 34 | calendarData: { 35 | ...calendarData, 36 | dates: dates, 37 | selectedDates: selectedDates 38 | }, 39 | calendarConfig 40 | } 41 | }, 42 | methods() { 43 | return { 44 | convertSolarLunar: dateInfo => { 45 | dateInfo = getDateRow2Dict(dateInfo) 46 | if (!dateInfo) return dateInfo 47 | const { year, month, date } = dateInfo 48 | return convertSolarLunar.solar2lunar(year, month, date) 49 | }, 50 | convertlLunar2Solar: (dateInfo, isLeapMonth) => { 51 | dateInfo = getDateRow2Dict(dateInfo) 52 | if (!dateInfo) return dateInfo 53 | const { year, month, date } = dateInfo 54 | return convertSolarLunar.lunar2solar(year, month, date, isLeapMonth) 55 | } 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /utils/calendar/render.js: -------------------------------------------------------------------------------- 1 | import plugins from './plugins/index' 2 | import { getCalendarConfig } from './utils/index' 3 | 4 | /** 5 | * 渲染日历 6 | */ 7 | export function renderCalendar(calendarData, calendarConfig) { 8 | return new Promise(resolve => { 9 | const Component = this 10 | if (Component.firstRender === void 0) { 11 | Component.firstRender = true 12 | } else { 13 | Component.firstRender = false 14 | } 15 | const exitData = Component.data.calendar || {} 16 | for (let plugin of plugins.installed) { 17 | const [, p] = plugin 18 | if (typeof p.beforeRender === 'function') { 19 | const { 20 | calendarData: newData, 21 | calendarConfig: newConfig 22 | } = p.beforeRender( 23 | { ...exitData, ...calendarData }, 24 | calendarConfig || getCalendarConfig(Component), 25 | Component 26 | ) 27 | calendarData = newData 28 | calendarConfig = newConfig 29 | } 30 | } 31 | 32 | Component.setData( 33 | { 34 | config: calendarConfig, 35 | calendar: calendarData 36 | }, 37 | () => { 38 | const rst = { 39 | calendar: calendarData, 40 | config: calendarConfig, 41 | firstRender: Component.firstRender 42 | } 43 | resolve(rst) 44 | if (Component.firstRender) { 45 | Component.triggerEvent('afterCalendarRender', rst) 46 | Component.firstRender = false 47 | } 48 | } 49 | ) 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /utils/calendar/theme/iconfont.wxss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url(data:font/truetype;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTYda3jUAAAfEAAAAHEdERUYAKQANAAAHpAAAAB5PUy8yPllJ4AAAAVgAAABWY21hcAAP65kAAAHIAAABQmdhc3D//wADAAAHnAAAAAhnbHlmLotR3AAAAxwAAAGkaGVhZBTU+ykAAADcAAAANmhoZWEHKwOFAAABFAAAACRobXR4DasB4gAAAbAAAAAWbG9jYQC0AR4AAAMMAAAAEG1heHABEwAyAAABOAAAACBuYW1lKeYRVQAABMAAAAKIcG9zdEoLnOYAAAdIAAAAUgABAAAAAQAAiPM8al8PPPUACwQAAAAAANjbW5YAAAAA2NtblgCzAAQDTQL8AAAACAACAAAAAAAAAAEAAAOA/4AAXAQAAAAAAANNAAEAAAAAAAAAAAAAAAAAAAAEAAEAAAAHACYAAgAAAAAAAgAAAAoACgAAAP8AAAAAAAAAAQQAAZAABQAAAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5+vn7gOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAAAAAAEAAAABAABLgD4ALQAswAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAA5+7//wAA5+v//xgYAAEAAAAAAAABBgAAAQAAAAAAAAABAgAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgBMAI4A0gABAS4ABAMKAvwAEgAACQEmBh0BFBcJAQYdARQWNwE2NAL+/j0ECQYBaP6YBgkEAcMMAZkBYAMEBU0IBf7n/ucFCE0FBAMBYAoeAAAAAQD4AAQC1AL8ABIAAAE1NCYHAQYUFwEWNj0BNCcJATYC1AkE/j0MDAHDBAkG/pgBaAYCpk0FBAP+oAoeCv6gAwQFTQgFARkBGQUAAAIAtAAgA00C4AASACUAAAkBNiYrASIHAwYUFwEWOwEyNicTATYmKwEiBwMGFBcBFjsBMjYnAREBCQMEBU0IBf8HBwD/BQhNBQQDJwEJAwQFTQgF/wcHAP8FCE0FBAMBgAFTBAkG/roJFgn+ugYJBAFTAVMECQb+ugkWCf66BgkEAAAAAAIAswAgA0wC4AASACUAAAEDJisBIgYXCQEGFjsBMjcBNjQlAyYrASIGFwkBBhY7ATI3ATY0AhX/BQhNBQQDAQn+9wMEBU0IBQD/BwEp/wUITQUEAwEJ/vcDBAVNCAUA/wcBlAFGBgkE/q3+rQQJBgFGCRYJAUYGCQT+rf6tBAkGAUYJFgAAAAAAABIA3gABAAAAAAAAABUALAABAAAAAAABAAgAVAABAAAAAAACAAcAbQABAAAAAAADAAgAhwABAAAAAAAEAAgAogABAAAAAAAFAAsAwwABAAAAAAAGAAgA4QABAAAAAAAKACsBQgABAAAAAAALABMBlgADAAEECQAAACoAAAADAAEECQABABAAQgADAAEECQACAA4AXQADAAEECQADABAAdQADAAEECQAEABAAkAADAAEECQAFABYAqwADAAEECQAGABAAzwADAAEECQAKAFYA6gADAAEECQALACYBbgAKAEMAcgBlAGEAdABlAGQAIABiAHkAIABpAGMAbwBuAGYAbwBuAHQACgAACkNyZWF0ZWQgYnkgaWNvbmZvbnQKAABpAGMAbwBuAGYAbwBuAHQAAGljb25mb250AABSAGUAZwB1AGwAYQByAABSZWd1bGFyAABpAGMAbwBuAGYAbwBuAHQAAGljb25mb250AABpAGMAbwBuAGYAbwBuAHQAAGljb25mb250AABWAGUAcgBzAGkAbwBuACAAMQAuADAAAFZlcnNpb24gMS4wAABpAGMAbwBuAGYAbwBuAHQAAGljb25mb250AABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAABHZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuAABoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAABodHRwOi8vZm9udGVsbG8uY29tAAACAAAAAAAAAAoAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAcAAAABAAIBAgEDAQQBBQVyaWdodARsZWZ0CmRvdWJsZWxlZnQLZG91YmxlcmlnaHQAAAAAAAH//wACAAEAAAAMAAAAFgAAAAIAAQADAAYAAQAEAAAAAgAAAAAAAAABAAAAANWkJwgAAAAA2NtblgAAAADY21uW) format('truetype'); 4 | font-weight: normal; 5 | font-style: normal; 6 | } 7 | 8 | .iconfont { 9 | font-family: "iconfont" !important; 10 | font-size: 16px; 11 | font-style: normal; 12 | -webkit-font-smoothing: antialiased; 13 | } 14 | 15 | .icon-right::before { 16 | content: "\e7eb"; 17 | } 18 | 19 | .icon-left::before { 20 | content: "\e7ec"; 21 | } 22 | 23 | .icon-doubleleft::before { 24 | content: "\e7ed"; 25 | } 26 | 27 | .icon-doubleright::before { 28 | content: "\e7ee"; 29 | } 30 | -------------------------------------------------------------------------------- /utils/calendar/theme/theme-default.wxss: -------------------------------------------------------------------------------- 1 | 2 | /* 日历主要颜色相关样式 */ 3 | 4 | .default_color, 5 | .default_weekend-color, 6 | .default_handle-color, 7 | .default_week-color { 8 | color: #333; 9 | } 10 | 11 | .default_today { 12 | color: #fff; 13 | background-color: #874fb4; 14 | } 15 | 16 | .default_choosed { 17 | color: #fff; 18 | background-color: #7ACFA6; 19 | } 20 | 21 | .default_date-disable { 22 | color: #c7c7c7; 23 | } 24 | 25 | .default_choosed.default_date-disable { 26 | color: #e2e2e2; 27 | background-color: #c2afb6; 28 | } 29 | 30 | .default_prev-month-date, 31 | .default_next-month-date { 32 | color: #e2e2e2; 33 | } 34 | 35 | .default_normal-date { 36 | color: #333; 37 | } 38 | 39 | .default_todo-circle { 40 | border-color: #88d2ac; 41 | } 42 | 43 | .default_todo-dot { 44 | background-color: #e54d42; 45 | } 46 | 47 | .default_date-desc { 48 | color: #c2c2c2; 49 | } 50 | 51 | .default_date-desc-lunar { 52 | color: #e54d42; 53 | } 54 | 55 | .default_date-desc-disable { 56 | color: #e2e2e2; 57 | } 58 | 59 | .default_festival { 60 | color: #c2c2c2; 61 | } 62 | -------------------------------------------------------------------------------- /utils/calendar/utils/logger.js: -------------------------------------------------------------------------------- 1 | export default class Logger { 2 | info(msg) { 3 | console.log( 4 | '%cInfo: %c' + msg, 5 | 'color:#FF0080;font-weight:bold', 6 | 'color: #FF509B' 7 | ) 8 | } 9 | warn(msg) { 10 | console.log( 11 | '%cWarn: %c' + msg, 12 | 'color:#FF6600;font-weight:bold', 13 | 'color: #FF9933' 14 | ) 15 | } 16 | tips(msg) { 17 | console.log( 18 | '%cTips: %c' + msg, 19 | 'color:#00B200;font-weight:bold', 20 | 'color: #00CC33' 21 | ) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /utils/calendar/utils/wxData.js: -------------------------------------------------------------------------------- 1 | class WxData { 2 | constructor(component) { 3 | this.Component = component 4 | } 5 | getData(key) { 6 | const data = this.Component.data 7 | if (!key) return data 8 | if (key.includes('.')) { 9 | let keys = key.split('.') 10 | const tmp = keys.reduce((prev, next) => { 11 | return prev[next] 12 | }, data) 13 | return tmp 14 | } else { 15 | return this.Component.data[key] 16 | } 17 | } 18 | setData(data) { 19 | return new Promise((resolve, reject) => { 20 | if (!data) return reject('no data to set') 21 | if (typeof data === 'object') { 22 | this.Component.setData(data, () => { 23 | resolve(data) 24 | }) 25 | } 26 | }) 27 | } 28 | } 29 | 30 | export default WxData 31 | -------------------------------------------------------------------------------- /utils/canvasdrawer/canvasdrawer.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /utils/canvasdrawer/canvasdrawer.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/canvasdrawer/canvasdrawer.wxss: -------------------------------------------------------------------------------- 1 | .board { 2 | position: fixed; 3 | top: 2000rpx; 4 | } -------------------------------------------------------------------------------- /utils/iconfont.wxss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; /* Project id 2595220 */ 3 | src: url('//at.alicdn.com/t/c/font_2595220_zeufk5pdrnb.woff2?t=1681224149963') format('woff2'), 4 | url('//at.alicdn.com/t/c/font_2595220_zeufk5pdrnb.woff?t=1681224149963') format('woff'), 5 | url('//at.alicdn.com/t/c/font_2595220_zeufk5pdrnb.ttf?t=1681224149963') format('truetype'); 6 | } 7 | 8 | .iconfont { 9 | font-family: "iconfont" !important; 10 | font-size: 16px; 11 | font-style: normal; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | } 15 | 16 | .icon-yu:before { 17 | content: "\e607"; 18 | } 19 | 20 | .icon-biye:before { 21 | content: "\e605"; 22 | } 23 | 24 | .icon-plane:before { 25 | content: "\e627"; 26 | } 27 | 28 | .icon-tel:before { 29 | content: "\e606"; 30 | } 31 | 32 | .icon-dianfei:before { 33 | content: "\e622"; 34 | } 35 | 36 | .icon-diqiu:before { 37 | content: "\e600"; 38 | } 39 | 40 | .icon-zhengjian:before { 41 | content: "\e60a"; 42 | } 43 | 44 | .icon-tushuguan:before { 45 | content: "\e78e"; 46 | } 47 | 48 | .icon-qiankuanjiesuan:before { 49 | content: "\e630"; 50 | } 51 | 52 | .icon-jiaoshikebiao:before { 53 | content: "\e623"; 54 | } 55 | 56 | .icon-banjikebiao:before { 57 | content: "\e631"; 58 | } 59 | 60 | .icon-dushuma:before { 61 | content: "\e845"; 62 | } 63 | 64 | .icon-chengji:before { 65 | content: "\e601"; 66 | } 67 | 68 | .icon-bangdan:before { 69 | content: "\e610"; 70 | } 71 | 72 | .icon-CET:before { 73 | content: "\e603"; 74 | } 75 | 76 | .icon-wodekebiao:before { 77 | content: "\ef0b"; 78 | } 79 | 80 | .icon-xiaoli:before { 81 | content: "\e625"; 82 | } 83 | 84 | .icon-gongrenhuamingce:before { 85 | content: "\e672"; 86 | } 87 | 88 | .icon-wangluo:before { 89 | content: "\e640"; 90 | } 91 | 92 | .icon-tubiao_ditu:before { 93 | content: "\e68a"; 94 | } 95 | 96 | .icon-xiaoai:before { 97 | content: "\e608"; 98 | } 99 | 100 | .icon-daba:before { 101 | content: "\e604"; 102 | } 103 | 104 | .icon-tuijian:before { 105 | content: "\e602"; 106 | } 107 | 108 | .icon-lost:before { 109 | content: "\e632"; 110 | } 111 | 112 | .icon-runsteps:before { 113 | content: "\e637"; 114 | } 115 | 116 | .icon-finance:before { 117 | content: "\e668"; 118 | } 119 | 120 | .icon-card:before { 121 | content: "\e6c6"; 122 | } 123 | 124 | .icon-booksearch:before { 125 | content: "\eb58"; 126 | } 127 | 128 | .icon-cabinet:before { 129 | content: "\e77a"; 130 | } 131 | 132 | .icon-movie:before { 133 | content: "\e70d"; 134 | } 135 | -------------------------------------------------------------------------------- /utils/util.js: -------------------------------------------------------------------------------- 1 | const formatTime = date => { 2 | const year = date.getFullYear() 3 | const month = date.getMonth() + 1 4 | const day = date.getDate() 5 | const hour = date.getHours() 6 | const minute = date.getMinutes() 7 | const second = date.getSeconds() 8 | 9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') 10 | } 11 | 12 | const formatNumber = n => { 13 | n = n.toString() 14 | return n[1] ? n : '0' + n 15 | } 16 | 17 | //格式化时间 18 | function wecquFormatTime(date, t) { 19 | var year = date.getFullYear(); 20 | var month = date.getMonth() + 1; 21 | var day = date.getDate(); 22 | var hour = date.getHours(); 23 | var minute = date.getMinutes(); 24 | var second = date.getSeconds(); 25 | if(t === 'h:m') { return [hour, minute].map(formatNumber).join(':'); } 26 | else { return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':'); } 27 | } 28 | 29 | function CompareDate(t1, t2) { 30 | var date = new Date(); 31 | var t1Arr = t1.split(':'); 32 | var t2Arr = t2.split(':'); 33 | if (t1Arr[0] - t2Arr[0] < 0) { 34 | return true; 35 | } else if (t1Arr[0] == t2Arr[0]) { 36 | if (t1Arr[1] - t2Arr[1] < 0) 37 | return true; 38 | } else { 39 | return false; 40 | } 41 | } 42 | 43 | function formatDateTime(inputTime, type) { 44 | var date = new Date(inputTime); 45 | var y = date.getFullYear(); 46 | var m = date.getMonth() + 1; 47 | m = m < 10 ? ('0' + m) : m; 48 | var d = date.getDate(); 49 | d = d < 10 ? ('0' + d) : d; 50 | var h = date.getHours(); 51 | h = h < 10 ? ('0' + h) : h; 52 | var minute = date.getMinutes(); 53 | var second = date.getSeconds(); 54 | minute = minute < 10 ? ('0' + minute) : minute; 55 | second = second < 10 ? ('0' + second) : second; 56 | if(type) { 57 | return y + '-' + m + '-' + d+' '+h+':'+minute+':'+second;//2017-12-12 12:23:34 58 | } else { 59 | return y + '-' + m + '-' + d; //2017-12-12 60 | } 61 | } 62 | 63 | //格局化日期:yyyy-MM-dd 64 | function formatDate(date) { 65 | var myyear = date.getFullYear(); 66 | var mymonth = date.getMonth()+1; 67 | var myweekday = date.getDate(); 68 | 69 | if(mymonth < 10){ 70 | mymonth = "0" + mymonth; 71 | } 72 | if(myweekday < 10){ 73 | myweekday = "0" + myweekday; 74 | } 75 | return (myyear+"-"+mymonth + "-" + myweekday); 76 | } 77 | 78 | function getCourseNoticeTimestamp (whichDayOfWeek, clocktime) { 79 | clocktime = clocktime.length < 5 ? '0' + clocktime : clocktime; 80 | var now = new Date(); //当前日期 81 | var nowDayOfWeek = now.getDay(); //今天本周的第几天 82 | var nowDay = now.getDate(); //当前日 83 | var nowMonth = now.getMonth(); //当前月 84 | var nowYear = now.getYear(); //当前年 85 | nowYear += (nowYear < 2000) ? 1900 : 0; 86 | var weekStartDate = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek + 1); 87 | var en_dayWeek_array = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday','sunday']; 88 | var whichDayOfWeekIndex = en_dayWeek_array.indexOf(whichDayOfWeek) ? en_dayWeek_array.indexOf(whichDayOfWeek) : 0; 89 | var targetDayDate = formatDateTime(weekStartDate.getTime() + whichDayOfWeekIndex*3600000*24); 90 | var finalDatetime = targetDayDate + ' ' + clocktime + ':00.0'; 91 | // console.log(finalDatetime) 92 | finalDatetime = finalDatetime.substring(0,19); 93 | finalDatetime = finalDatetime.replace(/-/g,'/'); 94 | var result = new Date(finalDatetime).getTime().toString().slice(0, -3); 95 | // console.log(result) 96 | return result; 97 | } 98 | 99 | module.exports = { 100 | formatTime: formatTime, 101 | wecquFormatTime: wecquFormatTime, 102 | CompareDate: CompareDate, 103 | getCourseNoticeTimestamp: getCourseNoticeTimestamp, 104 | formatDate: formatDate, 105 | formatDateTime: formatDateTime 106 | } 107 | --------------------------------------------------------------------------------