Repository: GreenPomelo/Undergraduate Branch: master Commit: 588a71f801d0 Files: 127 Total size: 827.6 KB Directory structure: gitextract_xiig83cc/ ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .github/ │ └── ISSUE_TEMPLATE/ │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .prettierrc ├── CHANGELOG.md ├── LICENSE ├── README-zh_CN.md ├── README.md ├── package.json ├── src/ │ ├── app.wpy │ ├── campus-card-page/ │ │ ├── components/ │ │ │ ├── consumption-detail-card.wpy │ │ │ ├── pay-flow.wpy │ │ │ ├── pwdfield.wpy │ │ │ └── wxcharts-min.js │ │ └── pages/ │ │ ├── add-room.wpy │ │ ├── campus-card-charge.wpy │ │ ├── campus-card-index.wpy │ │ ├── campus-card-loss.wpy │ │ ├── campus-card-lossPage.wpy │ │ ├── consumption-detail.wpy │ │ ├── electric-charge.wpy │ │ ├── money-log.wpy │ │ ├── net-charge.wpy │ │ └── select-room.wpy │ ├── components/ │ │ ├── baseContainer.wpy │ │ ├── qy-container.wpy │ │ ├── qy-datetime-select.wpy │ │ ├── qy-input.wpy │ │ ├── qy-listitem.wpy │ │ ├── qy-modal.wpy │ │ ├── qy-navigation.wpy │ │ ├── qy-popup.wpy │ │ ├── qy-swiper.wpy │ │ └── qy-tip.wpy │ ├── css/ │ │ ├── global-style.styl │ │ ├── loading.styl │ │ ├── normal-input.styl │ │ └── search-input.styl │ ├── edu-admin-page/ │ │ ├── components/ │ │ │ ├── card.wpy │ │ │ ├── grade-card.wpy │ │ │ └── subject-card.wpy │ │ └── pages/ │ │ ├── check-grade.wpy │ │ ├── course.wpy │ │ ├── credit.wpy │ │ ├── cut-down.wpy │ │ ├── score-inquire.wpy │ │ ├── search-course.wpy │ │ └── supplement-and-tutorials.wpy │ ├── mixins/ │ │ ├── Gpa/ │ │ │ ├── Gpa.js │ │ │ └── utils.js │ │ ├── all-search-thing.js │ │ ├── class.js │ │ ├── get-div-info.js │ │ ├── module.js │ │ └── test.js │ ├── mock/ │ │ ├── campusCard.js │ │ ├── common.js │ │ ├── education.js │ │ ├── index.js │ │ ├── library.js │ │ └── notification.js │ ├── others-edu-page/ │ │ ├── components/ │ │ │ ├── GpaCard.wpy │ │ │ ├── GpaCustomScore.wpy │ │ │ └── pe-card.wpy │ │ ├── graduatePages/ │ │ │ ├── clear-memory.wpy │ │ │ ├── index.wpy │ │ │ ├── memory-choose.wpy │ │ │ ├── memory-mode.wpy │ │ │ └── say-goodbye.wpy │ │ └── pages/ │ │ ├── GpaCalculator.wpy │ │ ├── calendar.wpy │ │ └── pe-score.wpy │ ├── others-page/ │ │ ├── components/ │ │ │ ├── bus-card.wpy │ │ │ ├── changeLogItem.wpy │ │ │ ├── information-card.wpy │ │ │ └── seats-card.wpy │ │ ├── mixins/ │ │ │ ├── all-search-thing.js │ │ │ └── page-jump.js │ │ ├── pages/ │ │ │ ├── advertisement.wpy │ │ │ ├── associationPages/ │ │ │ │ ├── association-detail.wpy │ │ │ │ ├── association-register.wpy │ │ │ │ ├── association.wpy │ │ │ │ ├── club-personal.wpy │ │ │ │ └── register-success.wpy │ │ │ ├── auth.wpy │ │ │ ├── close.wpy │ │ │ ├── display-webview.wpy │ │ │ ├── feedbackPages/ │ │ │ │ ├── feedback.wpy │ │ │ │ ├── historyfeedback.wpy │ │ │ │ └── myfeedback.wpy │ │ │ ├── information-box.wpy │ │ │ ├── libraryPages/ │ │ │ │ ├── library-history.wpy │ │ │ │ ├── library-recommened.wpy │ │ │ │ └── library.wpy │ │ │ ├── login.wpy │ │ │ ├── more.wpy │ │ │ ├── news.wpy │ │ │ ├── nicpPages/ │ │ │ │ ├── nicp-check-in.wpy │ │ │ │ ├── nicp-more.wpy │ │ │ │ └── nicp-vote.wpy │ │ │ ├── personalPages/ │ │ │ │ ├── aboutus.wpy │ │ │ │ ├── change-password.wpy │ │ │ │ ├── change-phone.wpy │ │ │ │ ├── changelog.wpy │ │ │ │ └── protocol.wpy │ │ │ ├── questionnairePages/ │ │ │ │ ├── questionnaire-homepage.wpy │ │ │ │ └── questionnaire.wpy │ │ │ ├── run.wpy │ │ │ ├── school-bus.wpy │ │ │ ├── search.wpy │ │ │ └── tuition.wpy │ │ └── wxs/ │ │ └── filter.wxs │ ├── pages/ │ │ ├── index.wpy │ │ ├── news-list.wpy │ │ └── profile.wpy │ ├── store/ │ │ ├── actions/ │ │ │ └── index.js │ │ ├── index.js │ │ ├── reducers/ │ │ │ ├── graduate.js │ │ │ ├── index.js │ │ │ └── visitor-mode.js │ │ └── types/ │ │ ├── graduate.js │ │ └── visitor-mode.js │ └── utils/ │ └── Crypto.js └── wepy.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ root = true [*] charset = utf-8 indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true ================================================ FILE: .eslintignore ================================================ /src/campus-card-page/components/wxcharts-min.js ================================================ FILE: .eslintrc.js ================================================ module.exports = { root: true, parser: "babel-eslint", parserOptions: { sourceType: "module" }, env: { browser: true }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style extends: ["prettier"], // required to lint *.wpy files plugins: ["html", "prettier"], settings: { "html/html-extensions": [".html", ".wpy"] }, // add your custom rules here rules: { "prettier/prettier": "error", // allow paren-stylus arrow functions "arrow-parens": 0, // allow async-await "generator-star-spacing": 0, // allow debugger during development "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0, "space-before-function-paren": 0, "standard/computed-property-even-spacing": 0 }, prettier: { singleQuote: true, semi: false }, globals: { getCurrentPages: true } }; ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] **Additional context** Add any other context about the problem here. ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. ================================================ FILE: .gitignore ================================================ dist/* node_modules/* src/config/* .DS_Store .idea/* .vscode/* .wepycache src/api/* ================================================ FILE: .prettierrc ================================================ { "singleQuote": false, "semi": true, "overrides": [ { "files": "*.wpy", "options": { "parser": "babylon" } } ] } ================================================ FILE: CHANGELOG.md ================================================ ### 3.4.6 (2018-12-25) - 添加电费余额查询 ### 3.4.5 (2018-12-22) - 添加 `wx.updateManager` ### 3.4.4 (2018-12-21) - 添加金额操作记录页面 ### 3.4.3 (2018-12-16) - 更改一卡通支付逻辑 - 修复电费充值的若干 bug ### 3.4.2 (2018-12-07) - module 接口改为到具体页面接入,让首页顶部的 icon 加载更快 ### 3.4.1 (2018-12-04) - 将体育部,问卷页面和 userInfo 解耦 - 问卷,考试倒计时,体育部页面添加 Loading ### 3.4.0 (2018-11-10) - 消息盒子的提示红点 - 资讯 TabBar 的小红点 - 拦截器的 API 替换 - 校园卡拾取的匿名 ### 3.3.4 (2018-10-23) - 修复消息盒子不提示的 bug - 优化图书馆模块的代码 - 修复淘宝口令会弹出社团招新模态框的 bug 以及添加可以关闭模态框 ### 3.3.1 (2018-10-17) - 增加 `wx-axios` 模块以及拦截器的整合,重构 API 列表 - 修复来回登录的 bug 以及更新错误处理 - 首页的逻辑,代码优化 ### 3.3.0 (2018-10-16) - 整合开源版本 - 修复充值组件需要嵌套 `$parent` 的 bug ### 3.2.2 (2018-10-01) - 导航栏切换为迎国庆 ### 3.2.1 (2018-09-07) - 导航栏切换为开学季 ### 3.2.0 (2018-8-13) - 修改注册登录的逻辑 - 增加了修改绑定手机功能 - 更新了一卡通的页面风格 - 增加了电费充值绑定宿舍的功能 - 增加了学费查询功能 - 添加跳转到校谈的入口 - 微调了一些 ui,修复了一些 bug - 运营在痛骂程序员不给力 ### 3.0.1 (2018-4-20) - 登录注册添加友好错误提示 - 修复图书馆搜索结果 bug - 修复反馈对话界面的消息排版出错 bug - 修复挂失列表加载问题 - 完成考试倒计时 ### 3.0.0 (2018-4-8) - 新增绑定用户手机号功能 - 新增电费、网费充值 - 新增用户消息系统 - 新增搜索功能页 - 新增 GPA 计算器 - 完善课表查询 - 完善考试倒计时 - 祭天了一个产品经理 ### 2.4.0 (2017-10-12) - 增加了青柚工作室招新 - 更改了欢迎页面 - 增加了我的反馈页面,大家可以看到自己的反馈状态 - 程序员已经快要祭不动了 ### 2.3.0 (2017-9-1) - 修复社团招新的一些 bug - 校园卡功能恢复 - 新增了欢迎页面 - 体育部功能恢复正常使用 - 祭天的程序员被拉出来又祭了一次 ### 2.0.0 (2017-8-10) - 新增更多功能入口 - 新增考试查询、补考查询,等级考试,补考辅导课查询功能 - 新增查学费功能 - 新增图书馆荐购功能 - 新增校园卡挂失,解挂失,发布挂失消息功能 - 新增资讯详情页附件在线预览功能 - 完善更新密码的方式 - 完善课表查询功能 ================================================ FILE: LICENSE ================================================ GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Undergraduate Copyright (C) 2018 GreenPomelo This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . ================================================ FILE: README-zh_CN.md ================================================ ## 南京邮电大学小程序 [English](./README.md) | 简体中文 ### 介绍 南京邮电大学小程序是由南京邮电大学青柚工作室开发,一款方便快捷,无需下载安装即可在微信客户端即开即用的 APP,有别于一般需要下载安装的 APP,也不同于微信公众号,具有方便快捷的特点。

菊花码

### 学习本项目 整套前端使用 [Wepy](https://github.com/tencent/wepy) 开发,提倡前端组件化工程化,高效的完成前端项目。 #### 项目文件结构 ``` project │ └───src │ │ assets 静态图片 │ │ │ └───campus-card-page │ │ │ components 校园卡模块组件 │ │ │ pages 校园卡模块页面 │ │ │ └───components 全局组件 │ │ │ qy-container.wpy │ │ │ qy-navigation.wpy │ │ │ ... │ │ │ └───css 全局样式 │ │ │ global-style.styl │ │ │ loading.styl │ │ │ ... │ │ │ └───edu-admin-page │ │ │ components 正方模块组件 │ │ │ pages 正方模块页面 │ │ │ └───mixins 混入 │ │ │ Gpa Gpa 计算器的 mixin │ │ │ class.js 课表的 mixin │ │ │ all-search-thing.js 模块开关的控制 │ │ │ ... │ │ │ └───others-edu-page │ │ │ components 体育部模块组件 │ │ │ pages 体育部模块页面 │ │ │ └───others-page │ │ │ components 其他模块组件 │ │ │ pages 其他模块页面 │ │ │ └───pages 三个主页面 │ │ │ index.wpy 首页 │ │ │ news-list.wpy 资讯页 │ │ │ profile.wpy 个人中心页 │ │ │ └───store 状态管理 │ │ │ └───utils 工具辅助函数 │ │ │ └───app.wpy 项目配置 │ │ .editorconfig │ .eslintignore │ .eslintrc.js │ .gitignore │ .prettierrc │ CHANGELOG.md │ LICENSE │ README.md │ package.json │ wepy.config.js ``` #### 安装(更新) wepy 命令行工具 > node >= 8.9 ```bash $ npm install -g wepy-cli ``` #### 安装依赖 & 开发实时编译 ``` $ cd [project] $ npm install $ npm run dev ``` ------ ### 青柚工作室 [青柚工作室的主页](https://qingyou.njupt.edu.cn) 青柚工作室是由南京邮电大学信息办指导建设,以学生开发为核心的互联网工作团队。 倡导使用新技术、优秀的技术去实现智慧校园,服务同学。 本项目至少会持续维护到南京邮电大学本科生 3.x 版本结束。 ------ ### 开源许可 本项目使用开源许可证 `License AGPLv3` ,代码开源仅供学习。 请认真阅读并遵守以下开源协议 `AGPLv3` [GNU Affero General Public License v3.0](https://github.com/GreenPomelo/Undergraduate/blob/master/LICENSE) #### 青柚工作室开源计划: 希望能够将实战中的技术成果回报社区,并且鼓励社区为这个项目做出贡献,大家可以通过 `Pull Requests` 的方式帮我们解决目前存在的不足,或者通过 `Issues` 告知我们。 ------ ### 青柚工作室招新计划: 青柚工作室持续招新,对象为南京邮电大学全日制本科生,主要以大二大三在校学生为主,大一能力强者亦可。招新岗位为技术、外联、运营、办公、程序员鼓励师......希望有兴趣的同学能投递简历至`qingyou@njupt.edu.cn`,一起来用爱发电,为南邮做出更多方便师生的项目。 ------ ### 更新日志 [CHANGELOG](./CHANGELOG.md)

狒狒神


Boss Pwn


Flytam


GooeyNyan


WynnXin


niffler-bkkkk


kishivn


ChenKS12138


cucu6

================================================ FILE: README.md ================================================ ## MiniProgram of Nanjing University of Posts and Telecommunications English | [简体中文](./README-zh_CN.md) ### Introduction The MiniProgram of Nanjing University of Posts and Telecommunications(hereinafter called NJUPT MiniProgram), developed by QingYou Studio of NJUPT, which is a convenient and swift application that can launch in WeChat client immediately dispense with download and install. Different from the common applications that need to download and install and WeChat Official Account, it is convenient and efficient.

菊花码

### Learn this Project Advocating componentization and engineering of front-end, this project is developed by [Wepy](https://github.com/tencent/wepy), to finish front-end project efficiently. ### Files Structure ``` project │ └───src │ │ assets static images │ │ │ └───campus-card-page │ │ │ components components of Campus-card module │ │ │ pages pages of Campus-card module │ │ │ └───components global components │ │ │ qy-container.wpy │ │ │ qy-navigation.wpy │ │ │ ... │ │ │ └───css global css style │ │ │ global-style.styl │ │ │ loading.styl │ │ │ ... │ │ │ └───edu-admin-page │ │ │ components components of ZHENGFANG module │ │ │ pages pages of ZHENGFANG module │ │ │ └───mixins │ │ │ Gpa mixin of GPA Calculator │ │ │ class.js mixin of Curriculum │ │ │ all-search-thing.js controller of modules │ │ │ ... │ │ │ └───others-edu-page │ │ │ components components of PE module │ │ │ pages pages of PE module │ │ │ └───others-page │ │ │ components components of other modules │ │ │ pages pages of other modules │ │ │ └───pages Main Pages │ │ │ index.wpy Homepage │ │ │ news-list.wpy Information Page │ │ │ profile.wpy Personal Page │ │ │ └───store state management │ │ │ └───utils auxiliary functions │ │ │ └───app.wpy project config │ │ .editorconfig │ .eslintignore │ .eslintrc.js │ .gitignore │ .prettierrc │ CHANGELOG.md │ LICENSE │ README.md │ package.json │ wepy.config.js ``` ### Install (Update) Wepy-Cli > node >= 8.9 ```bash $ npm install -g wepy-cli ``` ### Install Dependencies & Serve with Hot Reload ``` $ cd [project] $ npm install $ npm run dev ``` ------ ### QingYou Studio [Homepage of QingYou Studio](https://qingyou.njupt.edu.cn) Built up by Information Office of NJUPT, QingYou Studio is an Internet working team with student developement as its core. We advocate to use new and excellent technologies to achieve the Smart Campus and to serve students. This project will be maintained at least until the end of the 3.x version of NJUPT-Undergraduate. ------ ### License This project uses the license `License AGPLv3`,and the code is open source for learning. Please read and abide by the following open source agreements: `AGPLv3` [GNU Affero General Public License v3.0](https://github.com/GreenPomelo/Undergraduate/blob/master/LICENSE) ### QingYou Studio Open Source We hope that we can return the technical achievements to the community, and we encourage the community to contribute to this project. You can help us resolve the existing deficiencises through `Pull Request`, or tell us through `Issue`. ------ ### QingYou Studio Recruitment Mainly in the sophomore and junior students, QingYou Studio is recruiting new members from the full-time undergraduates in NJUPT, and the freshman who has excellent ability can be also recruited. Our posts contain technology, outreach, operations, office and ...... We hope anyone interested in can submit your resume to `qingyou@njupt.edu.cn`, together with us to do more projects for teachers and students in NJUPT. ------ ### Update Log [CHANGELOG](./CHANGELOG.md) ----- ### Core Team(Contributors)

狒狒神


Boss Pwn


Flytam


GooeyNyan


WynnXin


niffler-bkkkk


kishivn


ChenKS12138


cucu6

================================================ FILE: package.json ================================================ { "name": "undergraduate", "version": "3.4.24", "description": "NJUPT wechat app for undergraduate students", "main": "dist/app.js", "file": [ "src" ], "scripts": { "dev": "wepy build --watch", "build": "cross-env NODE_ENV=production wepy build --no-cache", "lint": "./node_modules/.bin/eslint --fix src/**", "precommit": "lint-staged", "format": "prettier-eslint --write *.js" }, "repository": { "type": "git", "url": "git+https://github.com/GreenPomelo/Undergraduate" }, "bugs": { "url": "https://github.com/GreenPomelo/Undergraduate/issues" }, "keywords": [ "wechat-app" ], "author": "GreenPomelo ", "license": "AGPL", "lint-staged": { "*.{js,wpy}": [ "./node_modules/.bin/eslint --fix", "git add" ] }, "dependencies": { "@types/crypto-js": "^3.1.43", "crypto-js": "^3.1.9-1", "qs": "^6.5.2", "redux": "^3.7.2", "redux-actions": "^2.2.1", "redux-promise": "^0.5.3", "stylus": "^0.54.5", "we-rich": "^1.0.2", "wepy": "^1.7.1", "wepy-async-function": "^1.4.4", "wepy-redux": "^1.5.3", "wx-axios": "^0.0.7" }, "devDependencies": { "babel-eslint": "^7.2.1", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-export-extensions": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-preset-env": "^1.6.1", "babel-preset-stage-1": "^6.24.1", "cross-env": "^5.1.1", "eslint": ">=4.18.2", "eslint-config-prettier": "^2.9.0", "eslint-friendly-formatter": "^2.0.7", "eslint-plugin-html": "^3.2.2", "eslint-plugin-prettier": "^2.3.1", "eslint-plugin-promise": "^3.5.0", "husky": "^0.14.3", "lint-staged": "^4.3.0", "prettier": "^1.7.4", "prettier-eslint-cli": "^4.7.0", "wepy-compiler-babel": "^1.5.1", "wepy-compiler-pug": "^1.4.7", "wepy-compiler-stylus": "^1.3.10", "wepy-eslint": "^1.5.2", "wepy-plugin-autoprefixer": "^1.5.10", "wepy-plugin-imagemin": "^1.5.2", "wepy-plugin-uglifyjs": "^1.3.6" }, "homepage": "https://qingyou.njupt.edu.cn" } ================================================ FILE: src/app.wpy ================================================ ================================================ FILE: src/campus-card-page/components/consumption-detail-card.wpy ================================================ ================================================ FILE: src/campus-card-page/components/pay-flow.wpy ================================================ ================================================ FILE: src/campus-card-page/components/pwdfield.wpy ================================================ ================================================ FILE: src/campus-card-page/components/wxcharts-min.js ================================================ "use strict";function assign(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),a=1;a=0?r=0:Math.abs(t)>=o-n&&(r=n-o),r}function isInAngleRange(t,e,i){function a(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t}return t=a(t),e=a(e),i=a(i),e>i&&(i+=2*Math.PI,t=e&&t<=i}function calRotateTranslate(t,e,i){var a=t,n=i-e,o=a+(i-n-a)/Math.sqrt(2);return o*=-1,{transX:o,transY:(i-n)*(Math.sqrt(2)-1)-(i-n-a)/Math.sqrt(2)}}function createCurveControlPoints(t,e){function i(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].y>=Math.max(t[e-1].y,t[e+1].y)||t[e].y<=Math.min(t[e-1].y,t[e+1].y))}var a=null,n=null,o=null,r=null;if(e<1?(a=t[0].x+.2*(t[1].x-t[0].x),n=t[0].y+.2*(t[1].y-t[0].y)):(a=t[e].x+.2*(t[e+1].x-t[e-1].x),n=t[e].y+.2*(t[e+1].y-t[e-1].y)),e>t.length-3){var s=t.length-1;o=t[s].x-.2*(t[s].x-t[s-1].x),r=t[s].y-.2*(t[s].y-t[s-1].y)}else o=t[e+1].x-.2*(t[e+2].x-t[e].x),r=t[e+1].y-.2*(t[e+2].y-t[e].y);return i(t,e+1)&&(r=t[e+1].y),i(t,e)&&(n=t[e].y),{ctrA:{x:a,y:n},ctrB:{x:o,y:r}}}function convertCoordinateOrigin(t,e,i){return{x:i.x+t,y:i.y-e}}function avoidCollision(t,e){if(e)for(;util.isCollision(t,e);)t.start.x>0?t.start.y--:t.start.x<0?t.start.y++:t.start.y>0?t.start.y++:t.start.y--;return t}function fillSeriesColor(t,e){var i=0;return t.map(function(t){return t.color||(t.color=e.colors[i],i=(i+1)%e.colors.length),t})}function getDataRange(t,e){var i=0,a=e-t;return i=a>=1e4?1e3:a>=1e3?100:a>=100?10:a>=10?5:a>=1?1:a>=.1?.1:.01,{minRange:findRange(t,"lower",i),maxRange:findRange(e,"upper",i)}}function measureText(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;t=String(t);var t=t.split(""),i=0;return t.forEach(function(t){/[a-zA-Z]/.test(t)?i+=7:/[0-9]/.test(t)?i+=5.5:/\./.test(t)?i+=2.7:/-/.test(t)?i+=3.25:/[\u4e00-\u9fa5]/.test(t)?i+=10:/\(|\)/.test(t)?i+=3.73:/\s/.test(t)?i+=2.5:/%/.test(t)?i+=8:i+=10}),i*e/10}function dataCombine(t){return t.reduce(function(t,e){return(t.data?t.data:t).concat(e.data)},[])}function getSeriesDataItem(t,e){var i=[];return t.forEach(function(t){if(null!==t.data[e]&&void 0!==t.data[e]){var a={};a.color=t.color,a.name=t.name,a.data=t.format?t.format(t.data[e]):t.data[e],i.push(a)}}),i}function getMaxTextListLength(t){var e=t.map(function(t){return measureText(t)});return Math.max.apply(null,e)}function getRadarCoordinateSeries(t){for(var e=2*Math.PI/t,i=[],a=0;a4&&void 0!==arguments[4]?arguments[4]:{},o=t.map(function(t){return{text:n.format?n.format(t,a[i]):t.name+": "+t.data,color:t.color}}),r=[],s={x:0,y:0};return e.forEach(function(t){void 0!==t[i]&&null!==t[i]&&r.push(t[i])}),r.forEach(function(t){s.x=Math.round(t.x),s.y+=t.y}),s.y/=r.length,{textList:o,offset:s}}function findCurrentIndex(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=-1;return isInExactChartArea(t,i,a)&&e.forEach(function(e,i){t.x+n>e&&(o=i)}),o}function isInExactChartArea(t,e,i){return t.xi.padding+i.yAxisWidth+i.yAxisTitleWidth&&t.y>i.padding&&t.y2*Math.PI&&(t-=2*Math.PI),t},r=Math.atan2(e.center.y-t.y,t.x-e.center.x);r*=-1,r<0&&(r+=2*Math.PI);e.angleList.map(function(t){return t=o(-1*t)}).forEach(function(t,e){var i=o(t-a/2),s=o(t+a/2);s=i&&r<=s||r+2*Math.PI>=i&&r+2*Math.PI<=s)&&(n=e)})}return n}function findPieChartCurrentIndex(t,e){var i=-1;if(isInExactPieChartArea(t,e.center,e.radius)){var a=Math.atan2(e.center.y-t.y,t.x-e.center.x);a=-a;for(var n=0,o=e.series.length;ne.width?(a.push(o),n=i,o=[t]):(n+=i,o.push(t))}),o.length&&a.push(o),{legendList:a,legendHeight:a.length*(i.fontSize+8)+5}}function calCategoriesData(t,e,i){var a={angle:0,xAxisHeight:i.xAxisHeight},n=getXAxisPoints(t,e,i),o=n.eachSpacing,r=t.map(function(t){return measureText(t)}),s=Math.max.apply(this,r);return s+2*i.xAxisTextPadding>o&&(a.angle=45*Math.PI/180,a.xAxisHeight=2*i.xAxisTextPadding+s*Math.sin(a.angle)),a}function getRadarDataPoints(t,e,i,a,n){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,r=n.extra.radar||{};r.max=r.max||0;var s=Math.max(r.max,Math.max.apply(null,dataCombine(a))),l=[];return a.forEach(function(a){var n={};n.color=a.color,n.data=[],a.data.forEach(function(a,r){var l={};l.angle=t[r],l.proportion=a/s,l.position=convertCoordinateOrigin(i*l.proportion*o*Math.cos(l.angle),i*l.proportion*o*Math.sin(l.angle),e),n.data.push(l)}),l.push(n)}),l}function getPieDataPoints(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=0,a=0;return t.forEach(function(t){t.data=null===t.data?0:t.data,i+=t.data}),t.forEach(function(t){t.data=null===t.data?0:t.data,t._proportion_=t.data/i*e}),t.forEach(function(t){t._start_=a,a+=2*t._proportion_*Math.PI}),t}function getPieTextMaxLength(t){t=getPieDataPoints(t);var e=0;return t.forEach(function(t){var i=t.format?t.format(+t._proportion_.toFixed(2)):util.toFixed(100*t._proportion_)+"%";e=Math.max(e,measureText(i))}),e}function fixColumeData(t,e,i,a,n,o){return t.map(function(t){return null===t?null:(t.width=(e-2*n.columePadding)/i,o.extra.column&&o.extra.column.width&&+o.extra.column.width>0?t.width=Math.min(t.width,+o.extra.column.width):t.width=Math.min(t.width,25),t.x+=(a+.5-i/2)*t.width,t)})}function getXAxisPoints(t,e,i){var a=i.yAxisWidth+i.yAxisTitleWidth,n=e.width-2*i.padding-a,o=e.enableScroll?Math.min(5,t.length):t.length,r=n/o,s=[],l=i.padding+a,h=e.width-i.padding;return t.forEach(function(t,e){s.push(l+e*r)}),!0===e.enableScroll?s.push(l+t.length*r):s.push(h),{xAxisPoints:s,startX:l,endX:h,eachSpacing:r}}function getDataPoints(t,e,i,a,n,o,r){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,l=[],h=o.height-2*r.padding-r.xAxisHeight-r.legendHeight;return t.forEach(function(t,c){if(null===t)l.push(null);else{var d={};d.x=a[c]+Math.round(n/2);var x=h*(t-e)/(i-e);x*=s,d.y=o.height-r.xAxisHeight-r.legendHeight-Math.round(x)-r.padding,l.push(d)}}),l}function getYAxisTextList(t,e,i){var a=dataCombine(t);a=a.filter(function(t){return null!==t});var n=Math.min.apply(this,a),o=Math.max.apply(this,a);if("number"==typeof e.yAxis.min&&(n=Math.min(e.yAxis.min,n)),"number"==typeof e.yAxis.max&&(o=Math.max(e.yAxis.max,o)),n===o){var r=o||1;n-=r,o+=r}for(var s=getDataRange(n,o),l=s.minRange,h=s.maxRange,c=[],d=(h-l)/i.yAxisSplit,x=0;x<=i.yAxisSplit;x++)c.push(l+d*x);return c.reverse()}function calYAxisData(t,e,i){var a=getYAxisTextList(t,e,i),n=i.yAxisWidth,o=a.map(function(t){return t=util.toFixed(t,2),t=e.yAxis.format?e.yAxis.format(Number(t)):t,n=Math.max(n,measureText(t)+5),t});return!0===e.yAxis.disabled&&(n=0),{rangesFormat:o,ranges:a,yAxisWidth:n}}function drawPointShape(t,e,i,a){a.beginPath(),a.setStrokeStyle("#ffffff"),a.setLineWidth(1),a.setFillStyle(e),"diamond"===i?t.forEach(function(t,e){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y),a.lineTo(t.x,t.y+4.5),a.lineTo(t.x+4.5,t.y),a.lineTo(t.x,t.y-4.5))}):"circle"===i?t.forEach(function(t,e){null!==t&&(a.moveTo(t.x+3.5,t.y),a.setLineWidth(1),a.setStrokeStyle("rgb(102,209,255)"),a.arc(t.x,t.y,3,0,2*Math.PI,!1),a.stroke())}):"rect"===i?t.forEach(function(t,e){null!==t&&(a.moveTo(t.x-3.5,t.y-3.5),a.rect(t.x-3.5,t.y-3.5,7,7))}):"triangle"===i&&t.forEach(function(t,e){null!==t&&(a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y+4.5),a.lineTo(t.x+4.5,t.y+4.5),a.lineTo(t.x,t.y-4.5))}),a.closePath(),a.setFillStyle("white"),a.fill(),a.setFillStyle("rgba(223,249,255,1)"),a.stroke()}function drawRingTitle(t,e,i){var a=t.title.fontSize||e.titleFontSize,n=t.subtitle.fontSize||e.subtitleFontSize,o=t.title.name||"",r=t.subtitle.name||"",s=t.title.color||e.titleColor,l=t.subtitle.color||e.subtitleColor,h=o?a:0,c=r?n:0;if(r){var d=measureText(r,n),x=(t.width-d)/2+(t.subtitle.offsetX||0),f=(t.height-e.legendHeight+n)/2;o&&(f-=(h+5)/2),i.beginPath(),i.setFontSize(n),i.setFillStyle(l),i.fillText(r,x,f),i.stroke(),i.closePath()}if(o){var g=measureText(o,a),u=(t.width-g)/2+(t.title.offsetX||0),p=(t.height-e.legendHeight+a)/2;r&&(p+=(c+5)/2),i.beginPath(),i.setFontSize(a),i.setFillStyle(s),i.fillText(o,u,p),i.stroke(),i.closePath()}}function drawPointText(t,e,i,a){var n=e.data;a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle("#666666"),t.forEach(function(t,i){if(null!==t){var o=e.format?e.format(n[i]):n[i];a.fillText(o,t.x-measureText(o)/2,t.y-2)}}),a.closePath(),a.stroke()}function drawRadarLabel(t,e,i,a,n,o){var r=a.extra.radar||{};e+=n.radarLabelTextMargin,o.beginPath(),o.setFontSize(n.fontSize),o.setFillStyle(r.labelColor||"#666666"),t.forEach(function(t,r){var s={x:e*Math.cos(t),y:e*Math.sin(t)},l=convertCoordinateOrigin(s.x,s.y,i),h=l.x,c=l.y;util.approximatelyEqual(s.x,0)?h-=measureText(a.categories[r]||"")/2:s.x<0&&(h-=measureText(a.categories[r]||"")),o.fillText(a.categories[r]||"",h,c+n.fontSize/2)}),o.stroke(),o.closePath()}function drawPieText(t,e,i,a,n,o){var r=n+i.pieChartLinePadding,s=(i.pieChartTextPadding,[]),l=null;t.map(function(t){return{arc:2*Math.PI-(t._start_+2*Math.PI*t._proportion_/2),text:t.format?t.format(+t._proportion_.toFixed(2)):util.toFixed(100*t._proportion_)+"%",color:t.color}}).forEach(function(t){var e=Math.cos(t.arc)*r,a=Math.sin(t.arc)*r,o=Math.cos(t.arc)*n,h=Math.sin(t.arc)*n,c=e>=0?e+i.pieChartTextPadding:e-i.pieChartTextPadding,d=a,x=measureText(t.text),f=d;l&&util.isSameXCoordinateArea(l.start,{x:c})&&(f=c>0?Math.min(d,l.start.y):e<0?Math.max(d,l.start.y):d>0?Math.max(d,l.start.y):Math.min(d,l.start.y)),c<0&&(c-=x);var g={lineStart:{x:o,y:h},lineEnd:{x:e,y:a},start:{x:c,y:f},width:x,height:i.fontSize,text:t.text,color:t.color};l=avoidCollision(g,l),s.push(l)}),s.forEach(function(t){var e=convertCoordinateOrigin(t.lineStart.x,t.lineStart.y,o),n=convertCoordinateOrigin(t.lineEnd.x,t.lineEnd.y,o),r=convertCoordinateOrigin(t.start.x,t.start.y,o);a.setLineWidth(1),a.setFontSize(i.fontSize),a.beginPath(),a.setStrokeStyle(t.color),a.setFillStyle(t.color),a.moveTo(e.x,e.y);var s=t.start.x<0?r.x+t.width:r.x,l=t.start.x<0?r.x-5:r.x+5;a.quadraticCurveTo(n.x,n.y,s,r.y),a.moveTo(e.x,e.y),a.stroke(),a.closePath(),a.beginPath(),a.moveTo(r.x+t.width,r.y),a.arc(s,r.y,2,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.setFillStyle("#666666"),a.fillText(t.text,l,r.y+3),a.closePath(),a.stroke(),a.closePath()})}function drawToolTipSplitLine(t,e,i,a){var n=i.padding,o=e.height-i.padding-i.xAxisHeight-i.legendHeight;a.beginPath(),a.setStrokeStyle("#cccccc"),a.setLineWidth(1),a.moveTo(t,n),a.lineTo(t,o),a.stroke(),a.closePath()}function drawToolTip(t,e,i,a,n){var o=!1;e=assign({x:0,y:0},e),e.y-=8;var r=t.map(function(t){return measureText(t.text)}),s=9+4*a.toolTipPadding+Math.max.apply(null,r),l=2*a.toolTipPadding+t.length*a.toolTipLineHeight;e.x-Math.abs(i._scrollDistance_)+8+s>i.width&&(o=!0),n.beginPath(),n.setFillStyle(i.tooltip.option.background||a.toolTipBackground),n.setGlobalAlpha(a.toolTipOpacity),o?(n.moveTo(e.x,e.y+10),n.lineTo(e.x-8,e.y+10-5),n.lineTo(e.x-8,e.y+10+5),n.moveTo(e.x,e.y+10),n.fillRect(e.x-s-8,e.y,s,l)):(n.moveTo(e.x,e.y+10),n.lineTo(e.x+8,e.y+10-5),n.lineTo(e.x+8,e.y+10+5),n.moveTo(e.x,e.y+10),n.fillRect(e.x+8,e.y,s,l)),n.closePath(),n.fill(),n.setGlobalAlpha(1),t.forEach(function(t,i){n.beginPath(),n.setFillStyle(t.color);var r=e.x+8+2*a.toolTipPadding,l=e.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding;o&&(r=e.x-s-8+2*a.toolTipPadding),n.fillRect(r,l,4,a.fontSize),n.closePath()}),n.beginPath(),n.setFontSize(a.fontSize),n.setFillStyle("#ffffff"),t.forEach(function(t,i){var r=e.x+8+2*a.toolTipPadding+4+5;o&&(r=e.x-s-8+2*a.toolTipPadding+4+5);var l=e.y+(a.toolTipLineHeight-a.fontSize)/2+a.toolTipLineHeight*i+a.toolTipPadding;n.fillText(t.text,r,l+a.fontSize)}),n.stroke(),n.closePath()}function drawYAxisTitle(t,e,i,a){var n=i.xAxisHeight+(e.height-i.xAxisHeight-measureText(t))/2;a.save(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(e.yAxis.titleFontColor||"#333333"),a.translate(0,e.height),a.rotate(-90*Math.PI/180),a.fillText(t,n,i.padding+.5*i.fontSize),a.stroke(),a.closePath(),a.restore()}function drawColumnDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),d=r.shift();e.height,i.padding,i.xAxisHeight,i.legendHeight;return a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&a.translate(e._scrollDistance_,0),t.forEach(function(o,r){var s=o.data,x=getDataPoints(s,c,d,l,h,e,i,n);x=fixColumeData(x,h,t.length,r,i,e),a.beginPath(),a.setFillStyle(o.color),x.forEach(function(t,n){if(null!==t){var o=t.x-t.width/2+1,r=e.height-t.y-i.padding-i.xAxisHeight-i.legendHeight;a.moveTo(o,t.y),a.rect(o,t.y,t.width-2,r)}}),a.closePath(),a.fill()}),t.forEach(function(o,r){var s=o.data,x=getDataPoints(s,c,d,l,h,e,i,n);x=fixColumeData(x,h,t.length,r,i,e),!1!==e.dataLabel&&1===n&&drawPointText(x,o,i,a)}),a.restore(),{xAxisPoints:l,eachSpacing:h}}function drawAreaDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),d=r.shift(),x=e.height-i.padding-i.xAxisHeight-i.legendHeight,f=[];return a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&a.translate(e._scrollDistance_,0),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===n&&drawToolTipSplitLine(e.tooltip.offset.x,e,i,a),t.forEach(function(t,o){var r=t.data,s=getDataPoints(r,c,d,l,h,e,i,n);(f.push(s),splitPoints(s).forEach(function(t){if(a.beginPath(),a.setStrokeStyle("rgb(102,209,255)"),a.setFillStyle("rgba(223,249,255,1)"),a.setLineWidth(2),t.length>1){var i=t[0],n=t[t.length-1];a.moveTo(i.x,i.y),"curve"===e.extra.lineStyle?t.forEach(function(e,i){if(i>0){var n=createCurveControlPoints(t,i-1);a.bezierCurveTo(n.ctrA.x,n.ctrA.y,n.ctrB.x,n.ctrB.y,e.x,e.y)}}):t.forEach(function(t,e){e>0&&a.lineTo(t.x,t.y)}),a.stroke(),a.lineTo(n.x,x),a.lineTo(i.x,x),a.lineTo(i.x,i.y)}else{var o=t[0];a.moveTo(o.x-h/2,o.y),a.lineTo(o.x+h/2,o.y),a.lineTo(o.x+h/2,x),a.lineTo(o.x-h/2,x),a.moveTo(o.x-h/2,o.y)}a.closePath(),a.fill(),a.setGlobalAlpha(1)}),!1!==e.dataPointShape)&&(i.dataPointShape[o%i.dataPointShape.length],drawPointShape(s,t.color,"circle",a))}),!1!==e.dataLabel&&1===n&&t.forEach(function(t,o){drawPointText(getDataPoints(t.data,c,d,l,h,e,i,n),t,i,a)}),a.restore(),{xAxisPoints:l,calPoints:f,eachSpacing:h}}function drawLineDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),d=r.shift(),x=[];return a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&a.translate(e._scrollDistance_,0),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===n&&drawToolTipSplitLine(e.tooltip.offset.x,e,i,a),t.forEach(function(t,o){var r=t.data,s=getDataPoints(r,c,d,l,h,e,i,n);if(x.push(s),splitPoints(s).forEach(function(i,n){a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(2),1===i.length?(a.moveTo(i[0].x,i[0].y),a.arc(i[0].x,i[0].y,1,0,2*Math.PI)):(a.moveTo(i[0].x,i[0].y),"curve"===e.extra.lineStyle?i.forEach(function(t,e){if(e>0){var n=createCurveControlPoints(i,e-1);a.bezierCurveTo(n.ctrA.x,n.ctrA.y,n.ctrB.x,n.ctrB.y,t.x,t.y)}}):i.forEach(function(t,e){e>0&&a.lineTo(t.x,t.y)}),a.moveTo(i[0].x,i[0].y)),a.closePath(),a.stroke()}),!1!==e.dataPointShape){var f=i.dataPointShape[o%i.dataPointShape.length];drawPointShape(s,t.color,f,a)}}),!1!==e.dataLabel&&1===n&&t.forEach(function(t,o){drawPointText(getDataPoints(t.data,c,d,l,h,e,i,n),t,i,a)}),a.restore(),{xAxisPoints:l,calPoints:x,eachSpacing:h}}function drawToolTipBridge(t,e,i,a){i.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&i.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&drawToolTip(t.tooltip.textList,t.tooltip.offset,t,e,i),i.restore()}function drawXAxis(t,e,i,a){var n=getXAxisPoints(t,e,i),o=n.xAxisPoints,r=n.eachSpacing,s=e.height-i.padding-i.xAxisHeight-i.legendHeight;i.xAxisLineHeight;a.save(),e._scrollDistance_&&0!==e._scrollDistance_&&a.translate(e._scrollDistance_,0),a.beginPath(),a.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),!0!==e.xAxis.disableGrid&&(e.xAxis.type,o.forEach(function(t,e){})),a.closePath(),a.stroke();var l=e.width-2*i.padding-i.yAxisWidth-i.yAxisTitleWidth,h=Math.min(t.length,Math.ceil(l/i.fontSize/1.5)),c=Math.ceil(t.length/h);t=t.map(function(t,e){return e%c!=0?"":t}),0===i._xAxisTextAngle_?(a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(e.xAxis.fontColor||"#666666"),t.forEach(function(t,e){var n=r/2-measureText(t)/2;a.fillText(t,o[e]+n,s+i.fontSize+5)}),a.closePath(),a.stroke()):t.forEach(function(t,n){a.save(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle(e.xAxis.fontColor||"#666666");var l=measureText(t),h=r/2-l,c=calRotateTranslate(o[n]+r/2,s+i.fontSize/2+5,e.height),d=c.transX,x=c.transY;a.rotate(-1*i._xAxisTextAngle_),a.translate(d,x),a.fillText(t,o[n]+h,s+i.fontSize+5),a.closePath(),a.stroke(),a.restore()}),a.restore()}function drawYAxisGrid(t,e,i){for(var a=t.height-2*e.padding-e.xAxisHeight-e.legendHeight,n=Math.floor(a/e.yAxisSplit),o=e.yAxisWidth+e.yAxisTitleWidth,r=e.padding+o,s=t.width-e.padding,l=[],h=0;h4&&void 0!==arguments[4]?arguments[4]:1,o=e.extra.pie||{};t=getPieDataPoints(t,n);var r={x:e.width/2,y:(e.height-i.legendHeight)/2},s=Math.min(r.x-i.pieChartLinePadding-i.pieChartTextPadding-i._pieTextMaxLength_,r.y-i.pieChartLinePadding-i.pieChartTextPadding);if(e.dataLabel?s-=10:s-=2*i.padding,t=t.map(function(t){return t._start_+=(o.offsetAngle||0)*Math.PI/180,t}),t.forEach(function(t){a.beginPath(),a.setLineWidth(2),a.setStrokeStyle("#ffffff"),a.setFillStyle(t.color),a.moveTo(r.x,r.y),a.arc(r.x,r.y,s,t._start_,t._start_+2*t._proportion_*Math.PI),a.closePath(),a.fill(),!0!==e.disablePieStroke&&a.stroke()}),"ring"===e.type){var l=.6*s;"number"==typeof e.extra.ringWidth&&e.extra.ringWidth>0&&(l=Math.max(0,s-e.extra.ringWidth)),a.beginPath(),a.setFillStyle(e.background||"#ffffff"),a.moveTo(r.x,r.y),a.arc(r.x,r.y,l,0,2*Math.PI),a.closePath(),a.fill()}if(!1!==e.dataLabel&&1===n){for(var h=!1,c=0,d=t.length;c0){h=!0;break}h&&drawPieText(t,e,i,a,s,r)}return 1===n&&"ring"===e.type&&drawRingTitle(e,i,a),{center:r,radius:s,series:t}}function drawRadarDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=e.extra.radar||{},r=getRadarCoordinateSeries(e.categories.length),s={x:e.width/2,y:(e.height-i.legendHeight)/2},l=Math.min(s.x-(getMaxTextListLength(e.categories)+i.radarLabelTextMargin),s.y-i.radarLabelTextMargin);l-=i.padding,a.beginPath(),a.setLineWidth(1),a.setStrokeStyle(o.gridColor||"#cccccc"),r.forEach(function(t){var e=convertCoordinateOrigin(l*Math.cos(t),l*Math.sin(t),s);a.moveTo(s.x,s.y),a.lineTo(e.x,e.y)}),a.stroke(),a.closePath();for(var h=1;h<=i.radarGridCount;h++)!function(t){var e={};a.beginPath(),a.setLineWidth(1),a.setStrokeStyle(o.gridColor||"#cccccc"),r.forEach(function(n,o){var r=convertCoordinateOrigin(l/i.radarGridCount*t*Math.cos(n),l/i.radarGridCount*t*Math.sin(n),s);0===o?(e=r,a.moveTo(r.x,r.y)):a.lineTo(r.x,r.y)}),a.lineTo(e.x,e.y),a.stroke(),a.closePath()}(h);return getRadarDataPoints(r,s,l,t,e,n).forEach(function(t,n){if(a.beginPath(),a.setFillStyle(t.color),a.setGlobalAlpha(.6),t.data.forEach(function(t,e){0===e?a.moveTo(t.position.x,t.position.y):a.lineTo(t.position.x,t.position.y)}),a.closePath(),a.fill(),a.setGlobalAlpha(1),!1!==e.dataPointShape){var o=i.dataPointShape[n%i.dataPointShape.length];drawPointShape(t.data.map(function(t){return t.position}),t.color,o,a)}}),drawRadarLabel(r,l,s,e,i,a),{center:s,radius:l,angleList:r}}function drawCanvas(t,e){e.draw()}function Animation(t){this.isStop=!1,t.duration=void 0===t.duration?1e3:t.duration,t.timing=t.timing||"linear";var e=function(){return"undefined"!=typeof requestAnimationFrame?requestAnimationFrame:"undefined"!=typeof setTimeout?function(t,e){setTimeout(function(){var e=+new Date;t(e)},e)}:function(t){t(null)}}(),i=null,a=function(n){if(null===n||!0===this.isStop)return t.onProcess&&t.onProcess(1),void(t.onAnimationFinish&&t.onAnimationFinish());if(null===i&&(i=n),n-it.end.x||e.end.xt.start.y||e.start.y0&&void 0!==arguments[0]?arguments[0]:{};this.opts.series=t.series||this.opts.series,this.opts.categories=t.categories||this.opts.categories,this.opts.title=assign({},this.opts.title,t.title||{}),this.opts.subtitle=assign({},this.opts.subtitle,t.subtitle||{}),drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)},Charts.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()},Charts.prototype.addEventListener=function(t,e){this.event.addEventListener(t,e)},Charts.prototype.getCurrentDataIndex=function(t){var e=t.touches&&t.touches.length?t.touches:t.changedTouches;if(e&&e.length){var i=e[0],a=i.x,n=i.y;return"pie"===this.opts.type||"ring"===this.opts.type?findPieChartCurrentIndex({x:a,y:n},this.chartData.pieData):"radar"===this.opts.type?findRadarChartCurrentIndex({x:a,y:n},this.chartData.radarData,this.opts.categories.length):findCurrentIndex({x:a,y:n},this.chartData.xAxisPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}return-1},Charts.prototype.showToolTip=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("line"===this.opts.type||"area"===this.opts.type){var i=this.getCurrentDataIndex(t),a=this.scrollOption.currentOffset,n=assign({},this.opts,{_scrollDistance_:a,animation:!1});if(i>-1){var o=getSeriesDataItem(this.opts.series,i);if(0!==o.length){var r=getToolTipData(o,this.chartData.calPoints,i,this.opts.categories,e),s=r.textList,l=r.offset;n.tooltip={textList:s,offset:l,option:e}}}drawCharts.call(this,n.type,n,this.config,this.context)}},Charts.prototype.scrollStart=function(t){t.touches[0]&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=t.touches[0].x)},Charts.prototype.scroll=function(t){if(t.touches[0]&&!0===this.opts.enableScroll){var e=t.touches[0].x-this.scrollOption.startTouchX,i=this.scrollOption.currentOffset,a=calValidDistance(i+e,this.chartData,this.config,this.opts);this.scrollOption.distance=e=a-i;var n=assign({},this.opts,{_scrollDistance_:i+e,animation:!1});drawCharts.call(this,n.type,n,this.config,this.context)}},Charts.prototype.scrollEnd=function(t){if(!0===this.opts.enableScroll){var e=this.scrollOption,i=e.currentOffset,a=e.distance;this.scrollOption.currentOffset=i+a,this.scrollOption.distance=0}},module.exports=Charts; ================================================ FILE: src/campus-card-page/pages/add-room.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/campus-card-charge.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/campus-card-index.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/campus-card-loss.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/campus-card-lossPage.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/consumption-detail.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/electric-charge.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/money-log.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/net-charge.wpy ================================================ ================================================ FILE: src/campus-card-page/pages/select-room.wpy ================================================ ================================================ FILE: src/components/baseContainer.wpy ================================================ ================================================ FILE: src/components/qy-container.wpy ================================================ ================================================ FILE: src/components/qy-datetime-select.wpy ================================================ ================================================ FILE: src/components/qy-input.wpy ================================================ ================================================ FILE: src/components/qy-listitem.wpy ================================================ ================================================ FILE: src/components/qy-modal.wpy ================================================ ================================================ FILE: src/components/qy-navigation.wpy ================================================ ================================================ FILE: src/components/qy-popup.wpy ================================================ ================================================ FILE: src/components/qy-swiper.wpy ================================================ ================================================ FILE: src/components/qy-tip.wpy ================================================ ================================================ FILE: src/css/global-style.styl ================================================ .hide-page position fixed width 100% height 100% background rgba(0, 0, 0, 0.5) display flex justify-content center align-items center .protocol-content position relative margin 0 auto width 600rpx padding 20rpx background #fff border-radius 30rpx display flex justify-content center align-items center font-size 28rpx flex-direction column ================================================ FILE: src/css/loading.styl ================================================ .boxLoading width 100rpx height 100rpx margin 0 auto position relative left 0 right 0 top 0 bottom 0 &:before content '' width 100rpx height 10rpx background #000 opacity 0.1 position absolute top 108rpx left 0 border-radius 50% animation shadow 0.5s linear infinite overflow hidden &:after content '' width 100rpx height 100rpx background #47CFF5 animation animate 0.5s linear infinite position absolute top 0 left 0 border-radius 3px overflow hidden @keyframes animate 17% border-bottom-right-radius 3px 25% transform translateY(9px) rotate(22.5deg) 50% transform translateY(18px) scale(1, 0.9) rotate(45deg) border-bottom-right-radius 40px 75% transform translateY(9px) rotate(67.5deg) 100% transform translateY(0) rotate(90deg) @keyframes shadow 0%, 100% transform scale(1, 1) 50% transform scale(1.2, 1) ================================================ FILE: src/css/normal-input.styl ================================================ .input border-radius 30rpx background-color rgb(238, 238, 238) width 545rpx height 72rpx padding 0 30rpx box-sizing border-box .placeholder font-size 30rpx font-family "SimHei" color rgb(84, 83, 83) ================================================ FILE: src/css/search-input.styl ================================================ .search-input position relative z-index 0 height 60rpx box-sizing border-box padding-left 60rpx background #F5F5F5 width 630rpx border-radius 100rpx color: #353535 display inline-block ================================================ FILE: src/edu-admin-page/components/card.wpy ================================================ ================================================ FILE: src/edu-admin-page/components/grade-card.wpy ================================================ ================================================ FILE: src/edu-admin-page/components/subject-card.wpy ================================================ ================================================ FILE: src/edu-admin-page/pages/check-grade.wpy ================================================ ================================================ FILE: src/edu-admin-page/pages/course.wpy ================================================ ================================================ FILE: src/edu-admin-page/pages/credit.wpy ================================================ ================================================ FILE: src/edu-admin-page/pages/cut-down.wpy ================================================ ================================================ FILE: src/edu-admin-page/pages/score-inquire.wpy ================================================ ================================================ FILE: src/edu-admin-page/pages/search-course.wpy ================================================ ================================================ FILE: src/edu-admin-page/pages/supplement-and-tutorials.wpy ================================================ ================================================ FILE: src/mixins/Gpa/Gpa.js ================================================ import wepy from "wepy"; import { sumCredits, termReducer, sumCreditMultiplyPoint, handleSum, handleTerm } from "./utils"; export default class GpaMixin extends wepy.mixin { /** * 处理成绩的逻辑 * @param { Array } scores 各学期所有的成绩 */ handleScores(scores) { if (this.hasData()) { return { credits: sumCredits(), scores: termReducer(), sumOfCreditMultiplyPoint: sumCreditMultiplyPoint() // 获取总的 [学分 * 绩点] }; } for (let i = 0; i < scores.length; i++) { const score = scores[i]; /** * isEnd 判断是否是 最后一条成绩的记录 * 用于判断是否到了累加最后一个学期的所有成绩的时候 */ let isEnd = false; if (i === scores.length - 1) isEnd = true; handleSum(score); handleTerm(score, isEnd); } return { credits: sumCredits(), scores: termReducer(), sumOfCreditMultiplyPoint: sumCreditMultiplyPoint() // 获取总的 [学分 * 绩点] }; } /** * 处理绩点变动的逻辑,关注两个关键量 * sumOfCreditMultiplyPoint 总(学分 * 单科绩点)的变化量 * credits 总学分 的变化量 */ handleModifyScore(sumOfCreditMultiplyPoint, credits) { this.sumOfCreditMultiplyPoint += sumOfCreditMultiplyPoint; this.credits += credits; } processScoreInput({ value: score }, type) { score = this.discardUnnecessaryChars(score); score = this.limitScore(score); score = score.length === 0 ? 0 : score; this.$emit(type, this.$index, score); return score; } discardUnnecessaryChars(value) { return value.replace(/[^\d.]/g, ""); } limitScore(score) { if (Number(score) > 100) { // 如果 score 大于 100,截断后面的 if (Number(score.slice(0, 3)) === 100) { score = score.slice(0, 3); } else { score = score.slice(0, 2); } } return score; } hasData() { return sumCredits() !== 0; } } ================================================ FILE: src/mixins/Gpa/utils.js ================================================ // 延迟计算 const curry = (fn, ...optionalArgs) => { const cache = []; return (...args) => { if (args.length === 0) return fn(cache, ...optionalArgs); else cache.push(args[0]); }; }; const sum = ary => { let result = 0; for (const value of ary) result += Number(value); return result; }; /** * 累加单个学期的成绩 * @param { Array } scores 成绩对象的数组 * @param { string } year 年份 * @param { string } term 学期 */ const reduceScores = (scores, year, term) => { /** * 返回一个对象 * title 显示在卡片顶部的标题 * courses 具体的课程成绩 */ const termScores = { title: `${year}学年 第${Number(term) === 1 ? `一` : `二`}学期`, scores: [], isFolded: true, count: 0 }; for (const score of scores) { termScores.scores.push(score); } termScores.scores.sort((a, b) => Number(b.credit) - Number(a.credit)); termScores.count = termScores.scores.length; return termScores; }; /** * 累加各学期的成绩 * @param { Array } terms 各学期成绩的数组 */ const reduceAllTeams = terms => { /** * 返回各学期成绩的数组 */ const allScores = []; for (const term of terms) { allScores.unshift(term); } return allScores; }; const isTheSameTerm = (currentYear, year, currentTerm, term) => currentYear === year && currentTerm === term; const mapScore = score => { switch (score) { case `优秀`: return 95; case `良好`: return 85; case `中等`: return 75; case `及格`: return 65; default: return Number(score); } }; const currySum = () => curry(sum); export const sumCredits = currySum(); export const sumCreditMultiplyPoint = currySum(); export const termReducer = curry(reduceAllTeams); /** * 需要关注的属性 * credit 学分 * point 单科绩点 * type 课程类型 */ export const handleSum = ({ credit, point, courseType: type }) => { // 任选课不统计学分 if (type === `任选`) return; sumCredits(Number(credit)); sumCreditMultiplyPoint(Number(credit) * Number(point)); }; export const handleTerm = (() => { /** * 闭包保存几个变量,用于判断累加 * currentYear 当前年份 * currentTerm 当前学期 * scoreReducer 当前学期的成绩累加器 */ let currentYear = ``; let currentTerm = ``; let scoreReducer = null; return ( { courseName: name, credit, point, score, resitScore, retakeScore, year, term, courseType: type }, isEnd ) => { /** * 如果年份和学期不一样了,那自然是到了别的学期, * 如果之前的 scoreReducer 不为 null, 累加之前学期记录的成绩 */ if (!isTheSameTerm(currentYear, year, currentTerm, term)) { if (scoreReducer) { termReducer(scoreReducer()); } scoreReducer = curry(reduceScores, year, term); currentYear = year; currentTerm = term; } score = mapScore(score); resitScore = mapScore(resitScore); retakeScore = mapScore(retakeScore); const scoreItem = { name, credit: Number(credit).toFixed(1), point: Number(point), score: Math.max(score, resitScore, retakeScore), isOptionalCourses: type === `任选`, isEditing: false, shouldFocus: false }; scoreReducer(scoreItem); if (isEnd) { termReducer(scoreReducer()); currentYear = currentTerm = scoreReducer = null; } }; })(); ================================================ FILE: src/mixins/all-search-thing.js ================================================ import wepy from "wepy"; export default class allSearch extends wepy.mixin { allSearchThing() { const AllSearhes = [ { name: "图书馆", icon: "https://static.airbob.org/under-graduate/more/library.png", isIndex: true, id: 0, path: "../others-page/pages/libraryPages/library", isOpen: true, module: "图书馆" }, { name: "已借书目", icon: "https://static.airbob.org/under-graduate/more/borrow.png", isIndex: false, id: 1, path: "../others-page/pages/libraryPages/library", isOpen: true, module: "图书馆" }, { name: "检索书目", icon: "https://static.airbob.org/under-graduate/more/retrieval.png", isIndex: false, id: 2, path: "../others-page/pages/libraryPages/library", isOpen: true, module: "图书馆" }, { name: "座位查询", icon: "https://static.airbob.org/under-graduate/more/seat inquiry.png", isIndex: false, id: 3, path: "../others-page/pages/libraryPages/library", isOpen: true, module: "图书馆" }, { name: "一卡通", icon: "https://static.airbob.org/under-graduate/more/card.png", isIndex: true, id: 4, path: "../campus-card-page/pages/campus-card-index", isOpen: true, module: "一卡通" }, { name: "校园卡充值", icon: "https://static.airbob.org/under-graduate/more/recharge.png", isIndex: false, id: 5, path: "../campus-card-page/pages/campus-card-charge", isOpen: true, module: "一卡通" }, { name: "电费充值", icon: "https://static.airbob.org/under-graduate/more/electricity.png", isIndex: false, id: 6, path: "../campus-card-page/pages/electric-charge", isOpen: true, module: "一卡通" }, { name: "校园网充值", icon: "https://static.airbob.org/under-graduate/more/ campus network.png", isIndex: false, id: 7, path: "../campus-card-page/pages/net-charge", isOpen: true, module: "一卡通" }, { name: "校园卡挂失", icon: "https://static.airbob.org/under-graduate/more/report the loss.png", isIndex: false, id: 8, path: "../campus-card-page/pages/campus-card-loss", isOpen: true, module: "一卡通" }, { name: "成绩查询", icon: "https://static.airbob.org/under-graduate/more/results query.png", isIndex: true, id: 9, path: "../edu-admin-page/pages/score-inquire", isOpen: true, module: "正方" }, { name: "体育部", icon: "https://static.airbob.org/under-graduate/more/sport.png", isIndex: true, id: 10, path: "../others-edu-page/pages/pe-score", isOpen: true, module: "体育部" }, { name: "考试倒计时", icon: "https://static.airbob.org/under-graduate/more/exam.png", isIndex: false, id: 11, path: "../edu-admin-page/pages/course", isOpen: true, module: "正方" }, { name: "等级考试", icon: "https://static.airbob.org/under-graduate/more/rank examination.png", isIndex: false, id: 12, path: "../edu-admin-page/pages/check-grade", isOpen: true, module: "正方" }, { name: "补考查询", icon: "https://static.airbob.org/under-graduate/more/resit.png", isIndex: true, id: 13, path: "../edu-admin-page/pages/cut-down", isOpen: true, module: "正方" }, { name: "辅导课查询", icon: "https://static.airbob.org/under-graduate/more/prenatal class.png", isIndex: false, id: 14, path: "../edu-admin-page/pages/supplement-and-tutorials", isOpen: true, module: "正方" }, { name: "GPA计算器", icon: "https://static.airbob.org/under-graduate/more/gpa.png", isIndex: false, id: 15, path: "../others-edu-page/pages/GpaCalculator", isOpen: true, module: "正方" }, { name: "课表", icon: "https://static.airbob.org/under-graduate/more/timetable.png", isIndex: true, id: 16, path: "../edu-admin-page/pages/course", isOpen: true, module: "正方" }, { name: "校历", icon: "https://static.airbob.org/under-graduate/more/calendar.png", isIndex: true, id: 17, path: "../others-page/pages/calendar", isOpen: true, module: "校历" }, { name: "自主学分", icon: "https://static.airbob.org/under-graduate/more/credit.png", isIndex: false, id: 18, path: "../edu-admin-page/pages/credit", isOpen: true, module: "正方" }, { name: "晨跑", icon: "https://static.airbob.org/under-graduate/more/run.png", isIndex: true, id: 19, path: "../others-page/pages/run", isOpen: true, module: "晨跑" }, { name: "学费查询", icon: "https://static.airbob.org/under-graduate/more/tuition.png", isIndex: false, id: 20, path: "../others-page/pages/tuition", isOpen: true, module: "正方" }, { name: "社团招新", icon: "https://static.airbob.org/under-graduate/more/club.png", isIndex: false, id: 21, path: "../others-page/pages/associationPages/association", isOpen: true, module: "正方" }, { name: "认证", icon: "https://static.airbob.org/under-graduate/more/club.png", isIndex: false, id: 22, path: "../others-page/pages/auth", isOpen: true, module: "正方" } ]; return AllSearhes; } } ================================================ FILE: src/mixins/class.js ================================================ import wepy from "wepy"; export default class ClassMixin extends wepy.mixin { getColor(data) { var all = data; let colorArr = ["#6AD5E1", "#87E5DA", "#F7C562", "#FFB677", "#FF8364"]; let borderColor = ["#44888F", "#57938C", "#9C7C3E", "#A7784F", "#9C503D"]; let firstcolor; for (var i = 0; i <= all.length - 1; i++) { let secondcolor; do { secondcolor = Math.floor(Math.random() * 5); } while (firstcolor ? firstcolor === secondcolor : false); firstcolor = secondcolor; all[i].bgc = colorArr[secondcolor]; all[i].borderColor = borderColor[secondcolor]; } return all; } /** * 计算课的与上边界的距离 * @param {Object} courseItem * @returns {Object} */ getElementHeight(courseItem) { const { sectionend, sectionstart } = courseItem; return ( parseInt(sectionend - sectionstart + 1) * (sectionend - sectionstart === 3 ? 106 : 105) + "rpx" ); } /** * 计算课的高度 * @param {Object} courseItem * @returns {Object} */ getElementTop(courseItem) { const { sectionstart } = courseItem; return parseInt((sectionstart - 1) * 108 + 93) + "rpx"; } /** * @param {Object} courseItem 想搜寻的课 * @param {Array} courses 从哪些课中搜寻 * @returns {Boolean} 是否有相同时间的课 */ getCourseItemAtSameTimeIndex(courseItem, courses) { const { day, sectionstart, sectionend } = courseItem; return courses.findIndex( x => x !== courseItem && x.day === day && x.sectionstart === sectionstart && x.sectionend === sectionend ); } /** * * @param {Array} courses 所有的课程 * @param {Number} chosenWeek 当前的周次 * @param {Boolean} onlyShowThisWeek 是否为只显示单周模式,为true时为显示单双周模式 * @returns {[Array,Array]} shownCourse unShownCourse */ handleCourses(courses, chosenWeek, onlyShowThisWeek) { courses = this.getColor(courses); const shownCourse = [[], [], [], [], [], [], []]; // 一个二维数组,每个元素为本周当天需要上的课 const unShownCourse = [[], [], [], [], [], [], []]; // 一个二维数组,每个元素为本周当天不需要上的课 // 遍历courses,计算courses中的每个元素的bgc,elementHeight,elemntTop for (const course of courses) { if (course.day === 7 || course.day === "7") { course.day = 0; } course.elementHeight = this.getElementHeight(course); course.elementTop = this.getElementTop(course); course.withMoreCourse = false; } // 将courses中的course进行分组,分入unShownCourse和shownCourse中 for (const course of courses) { const { day, weekarr } = course; if (!weekarr.includes(chosenWeek)) { course.bgc = "#D8D8D8"; if (!onlyShowThisWeek) { shownCourse[day].push(course); } } else { shownCourse[day].push(course); } } const allShownCourse = shownCourse.reduce( (total, current) => total.concat(current), [] ); const allUnShownCourse = unShownCourse.reduce( (total, current) => total.concat(current), [] ); for (const dailyCourses of shownCourse) { // 对shownCourse中的每个数组排序,使本周会上的课排在前面 dailyCourses.sort(course => (course.bgc === "#D8D8D8" ? -1 : 1)); // 使有不止一个课的时间段的课,withMoreCourse 为true for (const dailyCoursesItem of dailyCourses) { const swipperCourseAtSameTimeIndex = this.getCourseItemAtSameTimeIndex( dailyCoursesItem, allShownCourse.concat(allUnShownCourse) ); if (swipperCourseAtSameTimeIndex !== -1) { dailyCoursesItem.withMoreCourse = true; } } } // 将shownCourse和unShownCourse中的最后一个元素移到前面 shownCourse.push(shownCourse.shift()); unShownCourse.push(unShownCourse.shift()); // 过滤掉课程出现重叠的课程 const newShownCourse = shownCourse.map(dailyCourses => dailyCourses.filter( course => !( course.bgc === "#D8D8D8" && dailyCourses.find( x => x !== course && x.sectionstart >= course.sectionstart && x.sectionend <= course.sectionend ) ) ) ); return [newShownCourse, unShownCourse]; } } ================================================ FILE: src/mixins/get-div-info.js ================================================ import wepy from "wepy"; export default class getDivInfoMixin extends wepy.mixin { // id 为字符串"#XXX"形式 // 调用方式: // import getDivInfoMixin mixins = [getDivInfoMixin]; // from "@/mixins/get-div-info.js"; // that.getDivInfo("#XXX").then(res => { // }); // 在回调函数中获取元素信息:res为对象{height: 150, width: 375, left: 0, right: 375, top: 130…} getDivInfo(id) { return new Promise((resolve, reject) => { let query = wepy.createSelectorQuery(); query.select(id).boundingClientRect(); query.exec(res => { let divInfo = {}; divInfo.height = res[0].height; // px divInfo.width = res[0].width; // px divInfo.left = res[0].left; // px divInfo.right = res[0].right; // px divInfo.top = res[0].top; // px divInfo.bottom = res[0].bottom; // px divInfo.dataset = res[0].dataset; resolve(divInfo); }); }); } } ================================================ FILE: src/mixins/module.js ================================================ import wepy from "wepy"; export default class module extends wepy.mixin { judgeStatus(name) { return new Promise((resolve, reject) => { const moduleStatus = wepy.getStorageSync("moduleStatus"); for (let i of moduleStatus) { if (i.moduleName === name && !i.open) { if (name !== "课表") { this.$redirect({ url: "/others-page/pages/close" }); reject(); } else { resolve(); } break; } } resolve(); }); } } ================================================ FILE: src/mixins/test.js ================================================ import wepy from "wepy"; export default class testMixin extends wepy.mixin {} ================================================ FILE: src/mock/campusCard.js ================================================ import { mockRequest as request } from "@/api/request"; import qs from "qs"; export const mockCampusCardRequestInfo = () => { return request.post("/5a6e75c9011d2a207121663d"); }; export const mockSevenDayTurnOver = () => { return request.post("/5ab7aee122017f206f8bf382"); }; export const mockYearTurnOver = () => { const year = new Date().getFullYear(); return request.post( `/5a6ea8ef97c1292065e2452c`, qs.stringify({ year: year }) ); }; export const mockInternetRemain = (tran = "1", password = "1") => { return request.post( `/5ab86e5df21ec32066101d81`, qs.stringify({ tran: tran, password: password }) ); }; export const mockOneDayTurnOver = (page = "1") => { return request.post( "/5a6fd895011d2a20712167ab", qs.stringify({ page: page }) ); }; export const mockGetMoneyLog = () => { return request.get("/5c11c210cc00a21d11d2b7f9"); }; ================================================ FILE: src/mock/common.js ================================================ import { mockRequest as request } from "@/api/request"; export const mockGetUserPEGrade = (semester = "1") => { return request.get("/5a5d9300f21ec320660ff3d4", { params: { semester } }); }; export const mockGetExercise = () => { return request.get("/5d294b3ce640c81fad72a058"); }; export const mockGetRunHistory = () => { return request.get("/5d29524fa992181fb4f64ec1"); }; export const mockOwnGraduateGrade = () => { return request.get("/5d31678103cf111fb9ed623a"); }; export const getUpdateLog = () => request.get("/5de23e43db66aa1fb0609cc3"); export const getSchoolBus = () => request.get("/5de66a21db66aa1fb0609e1e"); ================================================ FILE: src/mock/education.js ================================================ import { mockRequest as request } from "@/api/request"; export const mockClassSchedule = () => { return request.get("/5a7b2324011d2a20712177ae"); }; export const mockGetAddCourses = (type = "type") => { return request.post(`/5c054f50b2e9fd1d1feef378?type=${type}`); }; export const mockGetUserGrade = () => { return request.get("/5a7b2641011d2a20712177bb"); }; export const mockRankingSelf = () => { return request.get("/5ab9b7ae22017f206f8bf4cc"); }; export const mockGetUserGradeTest = () => { return request.get("/5a7b237cf21ec320661009ac"); }; export const mockGetSupplyment = () => { return request.get("/5a6194a797c1292065e240dc"); }; export const mockGetYourOwnExam = (type = 1) => { return request.get(`/5a617d38f21ec320660ff3d9?type=${type}`); }; ================================================ FILE: src/mock/index.js ================================================ import wepy from "wepy"; console.log(wepy.$store.getState()); ================================================ FILE: src/mock/library.js ================================================ import { mockRequest as request } from "@/api/request"; export const mockCheckBookHistory = () => { return request.get("/5c4476be1382fc1d1917dccc"); }; export const mockHotBooks = () => { return request.get("/5a9662d7011d2a2071218137"); }; export const mockRemainSeats = () => { return request.get("/5a9639d1f21ec3206610131f"); }; export const mockLibrarySearch = (content, page) => { return request.post("/5a9639fb97c1292065e25fed", { content, page }); }; export const mockAlreadyBorrowBooksSum = () => { return request.post("/5a9639ee22017f206f8bea5e"); }; export const mockHistoricalBorrow = () => { return request.post("/5a9635a4011d2a207121812c"); }; export const mockBookArrears = () => { return request.post("/5a966239011d2a2071218134"); }; export const mockBookStore = () => { return request.get("/5c4476be1382fc1d1917dccc"); }; export const mockBookStoreAgain = () => { return request.post("/5a96a283f21ec320661013b3"); }; export const mockBookStoreContent = (marc_no = "123") => { return request.post("/5a963dcc97c1292065e25ff1", { marc_no }); }; ================================================ FILE: src/mock/notification.js ================================================ import { mockRequest as request } from "@/api/request"; export const mockGetNotification = () => { return request.get("/5abccaa0011d2a2071218d43"); }; export const mockMarkAllAsRead = () => { return request.put("/5abccb7a22017f206f8bf68e"); }; export const mockDeleteAll = () => { return request.put("/5abccba497c1292065e26c0c"); }; ================================================ FILE: src/others-edu-page/components/GpaCard.wpy ================================================ ================================================ FILE: src/others-edu-page/components/GpaCustomScore.wpy ================================================ ================================================ FILE: src/others-edu-page/components/pe-card.wpy ================================================ ================================================ FILE: src/others-edu-page/graduatePages/clear-memory.wpy ================================================ ================================================ FILE: src/others-edu-page/graduatePages/index.wpy ================================================ ================================================ FILE: src/others-edu-page/graduatePages/memory-choose.wpy ================================================ ================================================ FILE: src/others-edu-page/graduatePages/memory-mode.wpy ================================================ ================================================ FILE: src/others-edu-page/graduatePages/say-goodbye.wpy ================================================ ================================================ FILE: src/others-edu-page/pages/GpaCalculator.wpy ================================================ ================================================ FILE: src/others-edu-page/pages/calendar.wpy ================================================ ================================================ FILE: src/others-edu-page/pages/pe-score.wpy ================================================ ================================================ FILE: src/others-page/components/bus-card.wpy ================================================ ================================================ FILE: src/others-page/components/changeLogItem.wpy ================================================ ================================================ FILE: src/others-page/components/information-card.wpy ================================================ ================================================ FILE: src/others-page/components/seats-card.wpy ================================================ ================================================ FILE: src/others-page/mixins/all-search-thing.js ================================================ import wepy from "wepy"; export default class allSearch extends wepy.mixin { allSearchThing() { const AllSearhes = [ { name: "图书馆", icon: "https://static.airbob.org/under-graduate/more/library.png", isIndex: true, id: 0, path: "../others-page/pages/libraryPages/library", isOpen: true, module: "图书馆" }, { name: "已借书目", icon: "https://static.airbob.org/under-graduate/more/borrow.png", isIndex: false, id: 1, path: "../others-page/pages/libraryPages/library", isOpen: true, module: "图书馆" }, { name: "检索书目", icon: "https://static.airbob.org/under-graduate/more/retrieval.png", isIndex: false, id: 2, path: "../others-page/pages/libraryPages/library", isOpen: true, module: "图书馆" }, { name: "座位查询", icon: "https://static.airbob.org/under-graduate/more/seat inquiry.png", isIndex: false, id: 3, path: "../others-page/pages/libraryPages/library", isOpen: true, module: "图书馆" }, { name: "一卡通", icon: "https://static.airbob.org/under-graduate/more/card.png", isIndex: true, id: 4, path: "../campus-card-page/pages/campus-card-index", isOpen: true, module: "一卡通" }, { name: "校园卡充值", icon: "https://static.airbob.org/under-graduate/more/recharge.png", isIndex: false, id: 5, path: "../campus-card-page/pages/campus-card-charge", isOpen: true, module: "一卡通" }, { name: "电费充值", icon: "https://static.airbob.org/under-graduate/more/electricity.png", isIndex: false, id: 6, path: "../campus-card-page/pages/electric-charge", isOpen: true, module: "一卡通" }, { name: "校园网充值", icon: "https://static.airbob.org/under-graduate/more/ campus network.png", isIndex: false, id: 7, path: "../campus-card-page/pages/net-charge", isOpen: true, module: "一卡通" }, { name: "校园卡挂失", icon: "https://static.airbob.org/under-graduate/more/report the loss.png", isIndex: false, id: 8, path: "../campus-card-page/pages/campus-card-loss", isOpen: true, module: "一卡通" }, { name: "成绩查询", icon: "https://static.airbob.org/under-graduate/more/results query.png", isIndex: true, id: 9, path: "../edu-admin-page/pages/score-inquire", isOpen: true, module: "正方" }, { name: "体育部", icon: "https://static.airbob.org/under-graduate/more/sport.png", isIndex: true, id: 10, path: "../others-edu-page/pages/pe-score", isOpen: true, module: "体育部" }, { name: "考试倒计时", icon: "https://static.airbob.org/under-graduate/more/exam.png", isIndex: false, id: 11, path: "../edu-admin-page/pages/course", isOpen: true, module: "正方" }, { name: "等级考试", icon: "https://static.airbob.org/under-graduate/more/rank examination.png", isIndex: false, id: 12, path: "../edu-admin-page/pages/check-grade", isOpen: true, module: "正方" }, { name: "补考查询", icon: "https://static.airbob.org/under-graduate/more/resit.png", isIndex: true, id: 13, path: "../edu-admin-page/pages/cut-down", isOpen: true, module: "正方" }, { name: "辅导课查询", icon: "https://static.airbob.org/under-graduate/more/prenatal class.png", isIndex: false, id: 14, path: "../edu-admin-page/pages/supplement-and-tutorials", isOpen: true, module: "正方" }, { name: "GPA计算器", icon: "https://static.airbob.org/under-graduate/more/gpa.png", isIndex: false, id: 15, path: "../others-edu-page/pages/GpaCalculator", isOpen: true, module: "正方" }, { name: "课表", icon: "https://static.airbob.org/under-graduate/more/timetable.png", isIndex: true, id: 16, path: "../edu-admin-page/pages/course", isOpen: true, module: "正方" }, { name: "校历", icon: "https://static.airbob.org/under-graduate/more/calendar.png", isIndex: true, id: 17, path: "../others-edu-page/pages/calendar", isOpen: true, module: "校历" }, { name: "自主学分", icon: "https://static.airbob.org/under-graduate/more/credit.png", isIndex: false, id: 18, path: "../edu-admin-page/pages/credit", isOpen: true, module: "正方" }, { name: "晨跑", icon: "https://static.airbob.org/under-graduate/more/run.png", isIndex: true, id: 19, path: "../others-page/pages/run", isOpen: true, module: "晨跑" }, { name: "学费查询", icon: "https://static.airbob.org/under-graduate/more/tuition.png", isIndex: false, id: 20, path: "../others-page/pages/tuition", isOpen: true, module: "正方" }, { name: "社团招新", icon: "https://static.airbob.org/under-graduate/more/club.png", isIndex: false, id: 21, path: "../others-page/pages/associationPages/association", isOpen: true, module: "正方" }, { name: "认证", icon: "https://static.airbob.org/under-graduate/more/club.png", isIndex: false, id: 22, path: "../others-page/pages/auth", isOpen: true, module: "正方" } ]; return AllSearhes; } } ================================================ FILE: src/others-page/mixins/page-jump.js ================================================ import wepy from "wepy"; export default class allSearch extends wepy.mixin { methods = { toAssociationHome() { /** * 如果路由栈中,招新首页前面还有页面,就navigateBack到招新首页 * 如果路由栈中,不存在招新首页,或者路由栈最底层是招新首页,就reLaunch到招新首页 */ const routes = getCurrentPages(); const ASSOCIATION_PATH = "others-page/pages/associationPages/association"; const index = routes.findIndex(page => page.route === ASSOCIATION_PATH); if (index > 0) { const deps = routes.length - index - 1; wepy.navigateBack({ delta: deps }); } else { wepy.reLaunch({ url: `/${ASSOCIATION_PATH}` }); } } }; } ================================================ FILE: src/others-page/pages/advertisement.wpy ================================================ ================================================ FILE: src/others-page/pages/associationPages/association-detail.wpy ================================================ ================================================ FILE: src/others-page/pages/associationPages/association-register.wpy ================================================