├── .gitignore ├── LICENSE ├── README.md ├── app.js ├── app.json ├── app.wxss ├── conf ├── api.js └── const.js ├── images ├── ddq.jpeg ├── icon_99.png ├── icon_99_active.png ├── icon_dongdong.png ├── icon_dongdong_active.png ├── icon_home.png ├── icon_home_active.png ├── icon_profile.png ├── icon_profile_active.png ├── icon_search.png └── share.png ├── pages ├── 99baoyou │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── detail │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── dongdong │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── index │ ├── index.js │ ├── index.wxml │ └── index.wxss └── profile │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── project.config.json ├── services ├── restful.js ├── storage.js └── user.js ├── style ├── base │ ├── fn.wxss │ ├── mixin │ │ ├── setArrow.wxss │ │ ├── setOnepx.wxss │ │ └── text.wxss │ ├── reset.wxss │ └── variable │ │ ├── color.wxss │ │ ├── global.wxss │ │ ├── weui-button.wxss │ │ ├── weui-cell.wxss │ │ ├── weui-dialog.wxss │ │ ├── weui-grid.wxss │ │ ├── weui-msg.wxss │ │ └── weui-progress.wxss ├── weui.wxss └── widget │ ├── weui-agree │ └── weui-agree.wxss │ ├── weui-animate │ └── weui-animate.wxss │ ├── weui-button │ └── weui-button.wxss │ ├── weui-cell │ ├── weui-access.wxss │ ├── weui-cell.wxss │ ├── weui-check.wxss │ ├── weui-form.wxss │ ├── weui-form │ │ ├── weui-form-preview.wxss │ │ ├── weui-form_common.wxss │ │ ├── weui-select.wxss │ │ └── weui-vcode.wxss │ ├── weui-switch.wxss │ └── weui-uploader.wxss │ ├── weui-flex │ └── weui-flex.wxss │ ├── weui-footer │ └── weui-footer.wxss │ ├── weui-grid │ └── weui-grid.wxss │ ├── weui-loading │ └── weui-loading.wxss │ ├── weui-media-box │ └── weui-media-box.wxss │ ├── weui-page │ ├── weui-article.wxss │ └── weui-msg.wxss │ ├── weui-panel │ └── weui-panel.wxss │ ├── weui-progress │ └── weui-progress.wxss │ ├── weui-searchbar │ └── weui-searchbar.wxss │ ├── weui-tab │ ├── weui-navbar.wxss │ └── weui-tab.wxss │ └── weui-tips │ ├── weui-badge.wxss │ └── weui-loadmore.wxss └── utils ├── html.js ├── http.js └── util.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | 61 | .idea 62 | .vscode 63 | .DS_Store 64 | **/.DS_Store 65 | **/*/.DS_Store 66 | 67 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wx-tbk 2 | 淘宝客小程序静态 3 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const UserService = require("./services/user"); 2 | 3 | //app.js 4 | App({ 5 | onLaunch: function () { 6 | 7 | wx.checkSession({ 8 | success: function () { 9 | //session 未过期,并且在本生命周期一直有效 10 | }, 11 | fail: function () { 12 | //登录态过期 13 | wx.login({ 14 | success: res => { 15 | // 发送 res.code 到后台换取 openId, sessionKey, unionId 16 | UserService.login(res.code); 17 | } 18 | }); 19 | } 20 | }) 21 | 22 | // 获取用户信息 23 | wx.getSetting({ 24 | success: res => { 25 | if (res.authSetting['scope.userInfo']) { 26 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 27 | wx.getUserInfo({ 28 | withCredentials: false, 29 | success: res => { 30 | // 可以将 res 发送给后台解码出 unionId 31 | this.globalData.userInfo = res.userInfo; 32 | console.log(res); 33 | 34 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 35 | // 所以此处加入 callback 以防止这种情况 36 | if (this.userInfoReadyCallback) { 37 | this.userInfoReadyCallback(res) 38 | } 39 | } 40 | }) 41 | } 42 | } 43 | }) 44 | 45 | }, 46 | globalData: { 47 | userInfo: null 48 | } 49 | }) -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/logs/logs", 5 | "pages/99baoyou/index", 6 | "pages/dongdong/index", 7 | "pages/profile/index", 8 | "pages/detail/index" 9 | ], 10 | "window": { 11 | "backgroundTextStyle": "light", 12 | "navigationBarBackgroundColor": "#f48fb1", 13 | "navigationBarTitleText": "爱折扣享优惠", 14 | "navigationBarTextStyle": "white", 15 | "backgroundColor": "#fff" 16 | }, 17 | "tabBar": { 18 | "color": "#999999", 19 | "selectedColor": "#f48fb1", 20 | "borderStyle": "black", 21 | "backgroundColor": "#ffffff", 22 | "list": [ 23 | { 24 | "pagePath": "pages/index/index", 25 | "iconPath": "images/icon_home.png", 26 | "selectedIconPath": "images/icon_home_active.png", 27 | "text": "首页" 28 | }, 29 | { 30 | "pagePath": "pages/99baoyou/index", 31 | "iconPath": "images/icon_99.png", 32 | "selectedIconPath": "images/icon_99_active.png", 33 | "text": "九块九" 34 | }, 35 | { 36 | "pagePath": "pages/dongdong/index", 37 | "iconPath": "images/icon_dongdong.png", 38 | "selectedIconPath": "images/icon_dongdong_active.png", 39 | "text": "咚咚抢" 40 | }, 41 | { 42 | "pagePath": "pages/profile/index", 43 | "iconPath": "images/icon_profile.png", 44 | "selectedIconPath": "images/icon_profile_active.png", 45 | "text": "个人中心" 46 | }, 47 | { 48 | "pagePath": "pages/detail/index", 49 | "iconPath": "images/icon_profile.png", 50 | "selectedIconPath": "images/icon_profile_active.png", 51 | "text": "优惠券详情" 52 | } 53 | ] 54 | }, 55 | "networkTimeout": { 56 | "request": 10000, 57 | "downloadFile": 10000 58 | }, 59 | "debug": true 60 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | @import 'style/weui.wxss'; 2 | 3 | page{ 4 | box-sizing:border-box; 5 | font-size:30rpx; 6 | color:#999; 7 | } 8 | 9 | .page_bd { 10 | padding-bottom: 0; 11 | } 12 | 13 | view{ 14 | box-sizing:border-box; 15 | } 16 | 17 | /**app.wxss**/ 18 | .container { 19 | height: 100%; 20 | display: flex; 21 | flex-direction: column; 22 | align-items: center; 23 | justify-content: space-between; 24 | padding: 200rpx 0; 25 | box-sizing: border-box; 26 | } 27 | 28 | .tab-scroll{ 29 | display: flex; 30 | white-space: nowrap; 31 | height: 75rpx; 32 | } 33 | .tab-item{ 34 | display: inline-block; 35 | width: 115rpx; 36 | height: 100%; 37 | font-size: 32rpx; 38 | line-height: 75rpx; 39 | text-align: center; 40 | } 41 | .tab-scroll .active{ 42 | border-bottom: 5rpx solid #f48fb1; 43 | color: #f48fb1; 44 | } 45 | 46 | 47 | 48 | .pdct-list{ 49 | padding-top: 1rpx; 50 | background: #f5f5f5; 51 | } 52 | .pdct-item{ 53 | display: flex; 54 | height: 250rpx; 55 | margin: 10rpx 0; 56 | padding: 10rpx; 57 | overflow: hidden; 58 | background: #fff; 59 | } 60 | .pdct-item image{ 61 | width: 30%; 62 | height: auto; 63 | } 64 | .pdct-mid { 65 | width: 50%; 66 | padding: 20rpx 8rpx; 67 | text-align: left; 68 | } 69 | .pdct-mid text:first-child{ 70 | display:-webkit-box; 71 | -webkit-box-orient:vertical; 72 | -webkit-line-clamp:2; 73 | overflow:hidden; 74 | text-overflow:ellipsis; 75 | } 76 | .pdct-mid text:nth-child(2){ 77 | display: block; 78 | float: left; 79 | margin-top: 20rpx; 80 | padding: 2rpx; 81 | border: 1rpx solid #f48fb1; 82 | border-radius: 5rpx; 83 | color: #f48fb1; 84 | } 85 | .pdct-mid text:nth-child(3){ 86 | display: block; 87 | float: left; 88 | margin-top: 8rpx; 89 | margin-left: 20rpx; 90 | padding: 2rpx; 91 | font-size: 1.2rem; 92 | color: #f48fb1; 93 | } 94 | .pdct-mid text:nth-child(4){ 95 | display: block; 96 | width: 100%; 97 | float: left; 98 | margin-top: 8rpx; 99 | padding: 2rpx; 100 | font-size: 0.7rem; 101 | } 102 | 103 | .pdct-right{ 104 | width: 20%; 105 | border-left: 5rpx dashed #eee; 106 | text-align: center; 107 | } 108 | 109 | 110 | .pdct-right-top{ 111 | width: 50rpx; 112 | height: 50rpx; 113 | margin: 0 auto; 114 | margin-top: -30rpx; 115 | border-radius: 50%; 116 | background: #f5f5f5; 117 | } 118 | .pdct-right text:nth-child(2){ 119 | font-size: 1.4rem; 120 | } 121 | .pdct-right text:nth-child(3){ 122 | display: block; 123 | } 124 | .pdct-right text:nth-child(4){ 125 | display: block; 126 | font-size: 35rpx; 127 | line-height: 100rpx; 128 | color: #f48fb1; 129 | } 130 | -------------------------------------------------------------------------------- /conf/api.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | USER: { 3 | ONLOGIN: "/api/login/onLogin", 4 | } 5 | } -------------------------------------------------------------------------------- /conf/const.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | TOKEN: 'TOKEN', 4 | OPENID: 'OPENID', 5 | USER_INFO: 'USER_INFO', 6 | SERVICE_DATA: 'SERVICE_DATA', 7 | PAY_ORDER_GO_BACK_4_RECHARGE: 'PAY_ORDER_GO_BACK_4_RECHARGE' 8 | 9 | }; -------------------------------------------------------------------------------- /images/ddq.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/ddq.jpeg -------------------------------------------------------------------------------- /images/icon_99.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_99.png -------------------------------------------------------------------------------- /images/icon_99_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_99_active.png -------------------------------------------------------------------------------- /images/icon_dongdong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_dongdong.png -------------------------------------------------------------------------------- /images/icon_dongdong_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_dongdong_active.png -------------------------------------------------------------------------------- /images/icon_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_home.png -------------------------------------------------------------------------------- /images/icon_home_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_home_active.png -------------------------------------------------------------------------------- /images/icon_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_profile.png -------------------------------------------------------------------------------- /images/icon_profile_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_profile_active.png -------------------------------------------------------------------------------- /images/icon_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/icon_search.png -------------------------------------------------------------------------------- /images/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnlee17/wx-tbk/cc5bf15dfd3a5e47866559aa323d288d696a98b8/images/share.png -------------------------------------------------------------------------------- /pages/99baoyou/index.js: -------------------------------------------------------------------------------- 1 | // pages/99baoyou/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | tabs: ["选项", "选项", "选项", "选项", "选项", "选项", "选项", "选项", "选项", "选项"], 9 | activeIndex: 0, 10 | sliderOffset: 0, 11 | movableAreaWidth: 0, 12 | movableAreaLeft: 0, 13 | movableViewX: 0, 14 | tabWidth: 100, 15 | 16 | sort: 1, 17 | }, 18 | 19 | /** 20 | * 生命周期函数--监听页面加载 21 | */ 22 | onLoad: function (options) { 23 | var that = this; 24 | wx.getSystemInfo({ 25 | success: function (res) { 26 | that.setData({ 27 | sliderOffset: that.data.tabWidth * that.data.activeIndex, 28 | movableAreaWidth: that.data.tabWidth * that.data.tabs.length * 2 - res.windowWidth * res.pixelRatio, 29 | movableAreaLeft: res.windowWidth * res.pixelRatio - that.data.tabWidth * that.data.tabs.length, 30 | movableViewX: that.data.tabWidth * that.data.tabs.length - res.windowWidth, 31 | }); 32 | } 33 | }); 34 | }, 35 | 36 | tabClick: function (e) { 37 | this.setData({ 38 | sliderOffset: e.currentTarget.offsetLeft, 39 | activeIndex: e.currentTarget.id 40 | }); 41 | }, 42 | sortClick: function (e) { 43 | this.setData({ 44 | sort: e.currentTarget.dataset.id 45 | }); 46 | }, 47 | }) -------------------------------------------------------------------------------- /pages/99baoyou/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "九块九" 3 | } -------------------------------------------------------------------------------- /pages/99baoyou/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{item}} 6 | 7 | 8 | 9 | 10 | 人气 11 | 最新 12 | 销量 13 | 价格 14 | 15 | 16 | 17 | 18 | 19 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 20 | 券后价 21 | ¥35 22 | 现价 ¥45 月销量1000 23 | 24 | 25 | 26 | ¥90 27 | 优惠券 28 | 查看详情 29 | 30 | 31 | 32 | 33 | 34 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 35 | 券后价 36 | ¥35 37 | 现价 ¥45 月销量1000 38 | 39 | 40 | 41 | ¥90 42 | 优惠券 43 | 查看详情 44 | 45 | 46 | 47 | 48 | 49 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 50 | 券后价 51 | ¥35 52 | 现价 ¥45 月销量1000 53 | 54 | 55 | 56 | ¥90 57 | 优惠券 58 | 查看详情 59 | 60 | 61 | 62 | 63 | 64 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 65 | 券后价 66 | ¥35 67 | 现价 ¥45 月销量1000 68 | 69 | 70 | 71 | ¥90 72 | 优惠券 73 | 查看详情 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /pages/99baoyou/index.wxss: -------------------------------------------------------------------------------- 1 | .pdct-sort{ 2 | display: flex; 3 | height: 90rpx; 4 | width: 100%; 5 | border-top: 10rpx solid #f5f5f5; 6 | } 7 | .pdct-sort text{ 8 | display: block; 9 | flex: 1; 10 | line-height: 90rpx; 11 | text-align: center; 12 | } 13 | .pdct-sort .active{ 14 | color: #f48fb1; 15 | } -------------------------------------------------------------------------------- /pages/detail/index.js: -------------------------------------------------------------------------------- 1 | // pages/detail/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | showImageDetail: false, 9 | imgUrls: [ 10 | 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg', 11 | 'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg', 12 | 'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg' 13 | ], 14 | }, 15 | 16 | showDetail: function(){ 17 | this.setData({ 18 | showImageDetail: true 19 | }); 20 | } 21 | }) -------------------------------------------------------------------------------- /pages/detail/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /pages/detail/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ¥120 8 | 券后价 9 | 10 | 11 | 现价 ¥158 12 | 月销量 7800 13 | 14 | 【杰瑞乐咖】秋冬男大童加绒牛津纺衬衫 15 | 16 | 推荐理由 17 | 18 | 经典牛津纺加绒,秋冬搭配,精选优质面料,柔软舒适,亲肌肤透气。 19 | 20 | 21 | 22 | 23 | 24 | 25 | 商品图文详情 26 | 点击查看 > 27 | 28 | 29 | 商品详情 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | ¥120 42 | ¥158 43 | 44 | 45 | 46 | 47 | 48 | 淘口令购买 49 | 50 | -------------------------------------------------------------------------------- /pages/detail/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/index.wxss */ 2 | 3 | .page{ 4 | background: #f5f5f5; 5 | } 6 | 7 | .cover{ 8 | height: 700rpx; 9 | } 10 | 11 | .cover image{ 12 | height: 700rpx; 13 | width: 100%; 14 | } 15 | 16 | .info{ 17 | background: #fff; 18 | } 19 | 20 | .info-pleft{ 21 | width: 50%; 22 | float: left; 23 | padding: 20rpx; 24 | text-align: right; 25 | border-right: 1px solid #f5f5f5; 26 | } 27 | 28 | .info-pright{ 29 | float: left; 30 | width: 50%; 31 | padding: 30rpx; 32 | font-size: 25rpx; 33 | } 34 | 35 | .info-pright text{ 36 | display: block; 37 | } 38 | 39 | .info-qhj{ 40 | display: block; 41 | float: right; 42 | padding: 2rpx; 43 | margin-right: 10rpx; 44 | margin-top: 20rpx; 45 | border: 1rpx solid #f48fb1; 46 | border-radius: 5rpx; 47 | color: #f48fb1; 48 | } 49 | 50 | .info-price{ 51 | display: block; 52 | float: right; 53 | margin-top: 20rpx; 54 | padding: 2rpx; 55 | font-size: 40rpx; 56 | line-height: 50rpx; 57 | color: #f48fb1; 58 | } 59 | 60 | .info-title{ 61 | padding-left: 10rpx; 62 | padding-right: 10rpx; 63 | padding-bottom: 20rpx; 64 | font-size: 40rpx; 65 | color: #757575; 66 | border-bottom: 1rpx dotted #f5f5f5; 67 | } 68 | 69 | .info-recommend{ 70 | padding: 20rpx 10rpx 10rpx 10rpx; 71 | } 72 | 73 | .info-recommend view:nth-child(1){ 74 | margin-bottom: 10rpx; 75 | font-weight: bold; 76 | color: #757575; 77 | } 78 | 79 | .detail{ 80 | height: 100rpx; 81 | background: #f5f5f5; 82 | } 83 | 84 | .detail-btn{ 85 | display: flex; 86 | margin: 10rpx 0; 87 | padding: 20rpx 10rpx; 88 | border: 1rpx solid #f5f5f5; 89 | background: #fff; 90 | } 91 | 92 | .detail-btn text:nth-child(1){ 93 | display: block; 94 | width: 50%; 95 | font-weight: bold; 96 | color: #757575; 97 | } 98 | .detail-btn text:nth-child(2){ 99 | display: block; 100 | width: 50%; 101 | text-align: right; 102 | } 103 | .detail-list image{ 104 | display: block; 105 | width: 100%; 106 | } 107 | .detail-title{ 108 | display: block; 109 | width: 100%; 110 | height: 100rpx; 111 | margin: 10rpx 0; 112 | padding-left: 10rpx; 113 | border-bottom: 1rpx dotted #e0e0e0; 114 | font-weight: bold; 115 | color: #757575; 116 | line-height: 100rpx; 117 | background: #fff; 118 | } 119 | 120 | .buy{ 121 | position: fixed; 122 | bottom: 0; 123 | display: flex; 124 | align-items:center; 125 | width: 100%; 126 | height: 100rpx; 127 | border-top: 1rpx solid #e0e0e0; 128 | background: #fff; 129 | } 130 | .buy-price{ 131 | float: left; 132 | width: 50%; 133 | } 134 | .buy-price text:nth-child(1){ 135 | display: inline-block; 136 | padding: 0 10rpx; 137 | font-size: 40rpx; 138 | color: #f48fb1; 139 | } 140 | .buy-price text:nth-child(2){ 141 | text-decoration: line-through; 142 | } 143 | 144 | .buy-share{ 145 | display: flex; 146 | align-items:center; 147 | float: left; 148 | width: 20%; 149 | height: 100%; 150 | border-left: 1rpx solid #e0e0e0; 151 | border-right: 1rpx solid #e0e0e0; 152 | } 153 | .buy-share image{ 154 | width: 100%; 155 | height: 50%; 156 | } 157 | .buy-go{ 158 | display: flex; 159 | align-items:center; 160 | justify-content:center; 161 | float: left; 162 | width: 30%; 163 | height: 100%; 164 | font-size: 35rpx; 165 | color: #fff; 166 | background: #f48fb1; 167 | } 168 | -------------------------------------------------------------------------------- /pages/dongdong/index.js: -------------------------------------------------------------------------------- 1 | // pages/dongdong/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | currentHour: "zero", 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /pages/dongdong/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "咚咚抢" 3 | } -------------------------------------------------------------------------------- /pages/dongdong/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17:00 6 | 正在疯抢 7 | 8 | 9 | 18:00 10 | 即将开抢 11 | 12 | 13 | 19:00 14 | 即将开抢 15 | 16 | 17 | 20:00 18 | 即将开抢 19 | 20 | 21 | 21:00 22 | 即将开抢 23 | 24 | 25 | 00:00 26 | 即将开抢 27 | 28 | 29 | 08:00 30 | 即将开抢 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 39 | 券后价 40 | ¥35 41 | 现价 ¥45 月销量1000 42 | 43 | 44 | 45 | ¥90 46 | 优惠券 47 | 查看详情 48 | 49 | 50 | 51 | 52 | 53 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 54 | 券后价 55 | ¥35 56 | 现价 ¥45 月销量1000 57 | 58 | 59 | 60 | ¥90 61 | 优惠券 62 | 查看详情 63 | 64 | 65 | 66 | 67 | 68 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 69 | 券后价 70 | ¥35 71 | 现价 ¥45 月销量1000 72 | 73 | 74 | 75 | ¥90 76 | 优惠券 77 | 查看详情 78 | 79 | 80 | 81 | 82 | 83 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 84 | 券后价 85 | ¥35 86 | 现价 ¥45 月销量1000 87 | 88 | 89 | 90 | ¥90 91 | 优惠券 92 | 查看详情 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /pages/dongdong/index.wxss: -------------------------------------------------------------------------------- 1 | .top-img{ 2 | width: 100%; 3 | height: 200rpx; 4 | } 5 | .dd-tab{ 6 | display: flex; 7 | white-space: nowrap; 8 | width: 100%; 9 | height: 120rpx; 10 | background: #333; 11 | } 12 | .dd-tab view{ 13 | display: inline-block; 14 | width: 200rpx; 15 | height: 1020rpx; 16 | padding: 10rpx 0; 17 | text-align: center; 18 | color: #fff; 19 | } 20 | .dd-tab view text:nth-child(1){ 21 | display: block; 22 | height: 50rpx; 23 | line-height: 50rpx; 24 | font-size: 40rpx; 25 | } 26 | .dd-tab view text:nth-child(2){ 27 | display: block; 28 | height: 50rpx; 29 | line-height: 50rpx; 30 | font-size: 25rpx; 31 | color: #999; 32 | } 33 | .dd-tab .active{ 34 | background: #f48fb1; 35 | } 36 | .dd-tab .active text:nth-child(2){ 37 | color: #fff; 38 | } 39 | -------------------------------------------------------------------------------- /pages/index/index.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | Page({ 4 | data: { 5 | tabs: ["选项", "选项", "选项", "选项", "选项", "选项", "选项", "选项", "选项", "选项"], 6 | activeIndex: 0, 7 | 8 | imgUrls: [ 9 | 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg', 10 | 'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg', 11 | 'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg' 12 | ], 13 | indicatorDots: false, 14 | autoplay: false, 15 | interval: 5000, 16 | duration: 1000, 17 | 18 | sort: 1 19 | }, 20 | 21 | tabClick: function (e) { 22 | this.setData({ 23 | activeIndex: e.currentTarget.id 24 | }); 25 | }, 26 | 27 | sortClick: function (e) { 28 | this.setData({ 29 | sort: e.currentTarget.dataset.id 30 | }); 31 | }, 32 | 33 | changeIndicatorDots: function (e) { 34 | this.setData({ 35 | indicatorDots: !this.data.indicatorDots 36 | }) 37 | }, 38 | changeAutoplay: function (e) { 39 | this.setData({ 40 | autoplay: !this.data.autoplay 41 | }) 42 | }, 43 | intervalChange: function (e) { 44 | this.setData({ 45 | interval: e.detail.value 46 | }) 47 | }, 48 | durationChange: function (e) { 49 | this.setData({ 50 | duration: e.detail.value 51 | }) 52 | } 53 | }); -------------------------------------------------------------------------------- /pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{item}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 九块九 31 | 32 | 33 | 券直播 34 | 35 | 36 | 咚咚抢 37 | 38 | 39 | 人气榜 40 | 41 | 42 | 43 | 44 | 人气 45 | 最新 46 | 销量 47 | 价格 48 | 49 | 50 | 51 | 52 | 53 | 54 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 55 | 券后价 56 | ¥35 57 | 现价 ¥45 月销量1000 58 | 59 | 60 | 61 | ¥90 62 | 优惠券 63 | 查看详情 64 | 65 | 66 | 67 | 68 | 69 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 70 | 券后价 71 | ¥35 72 | 现价 ¥45 月销量1000 73 | 74 | 75 | 76 | ¥90 77 | 优惠券 78 | 查看详情 79 | 80 | 81 | 82 | 83 | 84 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 85 | 券后价 86 | ¥35 87 | 现价 ¥45 月销量1000 88 | 89 | 90 | 91 | ¥90 92 | 优惠券 93 | 查看详情 94 | 95 | 96 | 97 | 98 | 99 | 推荐理由:波力旗下品牌,台湾进口优质海苔,轻薄均匀,口感清新,香脆可口,片片鲜香有滋味,搭配寿司/生菜卷风味更佳,给你的味蕾一份大海的记忆! 100 | 券后价 101 | ¥35 102 | 现价 ¥45 月销量1000 103 | 104 | 105 | 106 | ¥90 107 | 优惠券 108 | 查看详情 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | 2 | .pdct-sort{ 3 | display: flex; 4 | height: 100rpx; 5 | width: 100%; 6 | padding: 7rpx 0; 7 | border-top: 15rpx solid #f5f5f5; 8 | } 9 | .pdct-sort text{ 10 | display: block; 11 | flex: 1; 12 | line-height: 70rpx; 13 | text-align: center; 14 | } 15 | .pdct-sort .active{ 16 | color: #f48fb1; 17 | } 18 | 19 | .search { 20 | position: absolute; 21 | top: 100rpx; 22 | z-index: 500; 23 | width: 80%; 24 | margin-left: -40%; 25 | left: 50%; 26 | } 27 | .search .txt-left{ 28 | float: left; 29 | width: 15%; 30 | height: 65rpx; 31 | background-color: #fff; 32 | border-radius:30rpx 0 0 30rpx; 33 | opacity:0.7; 34 | } 35 | .search .txt-left image{ 36 | width: 50rpx; 37 | height: 50rpx; 38 | margin-top: 7rpx; 39 | margin-left: 6px; 40 | } 41 | .search input { 42 | width: 85%; 43 | height: 65rpx; 44 | text-align: left; 45 | background-color: #fff; 46 | border-radius:0 30rpx 30rpx 0; 47 | opacity:0.7; 48 | } 49 | 50 | .circle-area{ 51 | display: flex; 52 | flex-wrap: wrap; 53 | justify-content:space-between; 54 | padding: 40rpx 50rpx; 55 | } 56 | .circle{ 57 | height: 125rpx; 58 | width: 125rpx; 59 | font-size: 1em; 60 | text-align: center; 61 | line-height: 125rpx; 62 | color: #fff; 63 | border-radius: 50%; 64 | } 65 | .circle:nth-child(1){ 66 | background: #f48fb1; 67 | } 68 | .circle:nth-child(2){ 69 | background: #f69988; 70 | } 71 | .circle:nth-child(3){ 72 | background: #91a7ff; 73 | } 74 | .circle:nth-child(4){ 75 | background: #4db6ac; 76 | } -------------------------------------------------------------------------------- /pages/profile/index.js: -------------------------------------------------------------------------------- 1 | // pages/profile/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /pages/profile/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "个人中心" 3 | } -------------------------------------------------------------------------------- /pages/profile/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 当前版本:1.0 7 | 8 | -------------------------------------------------------------------------------- /pages/profile/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/profile/index.wxss */ 2 | 3 | page{ 4 | background: #f5f5f5; 5 | } 6 | 7 | .profile-top{ 8 | width: 100%; 9 | height: 250rpx; 10 | background: #f48fb1; 11 | } 12 | 13 | .profile-row{ 14 | height: 100rpx; 15 | padding: 20rpx; 16 | font-size: 35rpx; 17 | background: #fff; 18 | box-shadow: 0rpx 2rpx 0rpx #ccc; 19 | } -------------------------------------------------------------------------------- /project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件。", 3 | "setting": { 4 | "urlCheck": false, 5 | "es6": true, 6 | "postcss": true, 7 | "minified": true, 8 | "newFeature": true 9 | }, 10 | "compileType": "miniprogram", 11 | "libVersion": "1.6.6", 12 | "appid": "wx9095f54723765908", 13 | "projectname": "%E4%BA%ABE4%BC%98%E6%83%A0", 14 | "condition": { 15 | "search": { 16 | "current": -1, 17 | "list": [] 18 | }, 19 | "conversation": { 20 | "current": -1, 21 | "list": [] 22 | }, 23 | "miniprogram": { 24 | "current": -1, 25 | "list": [] 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /services/restful.js: -------------------------------------------------------------------------------- 1 | 2 | var Http = require('../utils/http'); 3 | var Storage = require('./storage'); 4 | var CONF = require('../conf/conf'); 5 | 6 | class Restful { 7 | 8 | static getHeader() { 9 | return { 10 | 'content-type': 'application/json', 11 | 'token': Storage.getToken() 12 | }; 13 | } 14 | 15 | static normalizeUrl(url) { 16 | return CONF.DEV.DOMAIN + url; 17 | } 18 | 19 | static get(url) { 20 | return new Promise((resolve, reject) => { 21 | Http.get(this.normalizeUrl(url), this.getHeader()) 22 | .then( 23 | res => { 24 | if (res.data.success) { 25 | resolve(res.data.data); 26 | } else { 27 | reject(res.data.err); 28 | } 29 | }, 30 | err => { 31 | reject(err); 32 | } 33 | ); 34 | }); 35 | } 36 | 37 | static post(url, data) { 38 | return new Promise((resolve, reject) => { 39 | Http.post(this.normalizeUrl(url), data, this.getHeader()) 40 | .then( 41 | res => { 42 | if (res.data.success) { 43 | resolve(res.data.data); 44 | } else { 45 | reject(res.data.err); 46 | } 47 | }, 48 | err => { 49 | reject(err); 50 | } 51 | ); 52 | }); 53 | } 54 | 55 | static put(url, data) { 56 | return new Promise((resolve, reject) => { 57 | Http.put(this.normalizeUrl(url), data, this.getHeader()) 58 | .then( 59 | res => { 60 | if (res.data.success) { 61 | resolve(res.data.data); 62 | } else { 63 | reject(res.data.err); 64 | } 65 | }, 66 | err => { 67 | reject(err); 68 | } 69 | ); 70 | }); 71 | } 72 | 73 | static delete(url) { 74 | return new Promise((resolve, reject) => { 75 | Http.delete(this.normalizeUrl(url), this.getHeader()) 76 | .then( 77 | res => { 78 | if (res.data.success) { 79 | resolve(res.data.data); 80 | } else { 81 | reject(res.data.err); 82 | } 83 | }, 84 | err => { 85 | reject(err); 86 | } 87 | ); 88 | }); 89 | } 90 | 91 | } 92 | 93 | module.exports = Restful; -------------------------------------------------------------------------------- /services/storage.js: -------------------------------------------------------------------------------- 1 | 2 | var CONST_CONF = require('../conf/const'); 3 | 4 | class Storage { 5 | 6 | static setData(key, value) { 7 | try { 8 | wx.setStorageSync(key, value); 9 | } catch (e) { 10 | console.error(e); 11 | } 12 | } 13 | 14 | static getData(key) { 15 | try { 16 | return wx.getStorageSync(key); 17 | } catch (e) { 18 | console.error(e); 19 | return undefined; 20 | } 21 | } 22 | 23 | static clear() { 24 | wx.clearStorage(); 25 | } 26 | 27 | static getToken() { 28 | return this.getData(CONST_CONF.TOKEN); 29 | } 30 | 31 | static setToken(token) { 32 | this.setData(CONST_CONF.TOKEN, token); 33 | } 34 | 35 | static getUserInfo() { 36 | return this.getData(CONST_CONF.USER_INFO); 37 | } 38 | 39 | static setUserInfo(user) { 40 | this.setData(CONST_CONF.USER_INFO, user); 41 | } 42 | 43 | static getServiceData() { 44 | return this.getData(CONST_CONF.SERVICE_DATA); 45 | } 46 | 47 | static setServiceData(serviceData) { 48 | this.setData(CONST_CONF.SERVICE_DATA, serviceData); 49 | } 50 | 51 | static clearServiceData() { 52 | this.setData(CONST_CONF.SERVICE_DATA, null); 53 | } 54 | 55 | static setPayOrderGoBackForRecharge(url) { 56 | this.setData(CONST_CONF.PAY_ORDER_GO_BACK_4_RECHARGE, url); 57 | } 58 | 59 | static getPayOrderGoBackForRecharge() { 60 | this.setData(CONST_CONF.PAY_ORDER_GO_BACK_4_RECHARGE); 61 | } 62 | 63 | static getOpenId() { 64 | return this.getData(CONST_CONF.OPENID); 65 | } 66 | 67 | static setOpenid(openid) { 68 | this.setData(CONST_CONF.OPENID, openid); 69 | } 70 | 71 | } 72 | 73 | module.exports = Storage; -------------------------------------------------------------------------------- /services/user.js: -------------------------------------------------------------------------------- 1 | var API = require('../conf/api'); 2 | var Restful = require('./restful'); 3 | 4 | class UserService { 5 | 6 | static login(code) { 7 | return Restful.post(API.USER.ONLOGIN, { code: code }); 8 | } 9 | 10 | } 11 | 12 | module.exports = UserService; -------------------------------------------------------------------------------- /style/base/fn.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/mixin/setArrow.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/mixin/setOnepx.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/mixin/text.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/reset.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | page{line-height:1.6;font-family:-apple-system-font,Helvetica Neue,sans-serif}icon{vertical-align:middle} -------------------------------------------------------------------------------- /style/base/variable/color.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/variable/global.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/variable/weui-button.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/variable/weui-cell.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/variable/weui-dialog.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/variable/weui-grid.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/variable/weui-msg.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/base/variable/weui-progress.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /style/weui.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | page{line-height:1.6;font-family:-apple-system-font,Helvetica Neue,sans-serif}icon{vertical-align:middle}.weui-cells{position:relative;margin-top:1.17647059em;background-color:#fff;line-height:1.41176471;font-size:17px}.weui-cells:before{top:0;border-top:1rpx solid #d9d9d9}.weui-cells:after,.weui-cells:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-cells:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-cells__title{margin-top:.77em;margin-bottom:.3em;padding-left:15px;padding-right:15px;color:#999;font-size:14px}.weui-cells_after-title{margin-top:0}.weui-cells__tips{margin-top:.3em;color:#999;padding-left:15px;padding-right:15px;font-size:14px}.weui-cell{padding:10px 15px;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-cell:first-child:before{display:none}.weui-cell_active{background-color:#ececec}.weui-cell_primary{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.weui-cell__bd{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-cell__ft{text-align:right;color:#999}.weui-cell_access{color:inherit}.weui-cell__ft_in-access{padding-right:13px;position:relative}.weui-cell__ft_in-access:after{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;margin-top:-4px;right:2px}.weui-cell_link{color:#586c94;font-size:14px}.weui-cell_link:active{background-color:#ececec}.weui-cell_link:first-child:before{display:block}.weui-icon-radio{margin-left:3.2px;margin-right:3.2px}.weui-icon-checkbox_circle,.weui-icon-checkbox_success{margin-left:4.6px;margin-right:4.6px}.weui-check__label:active{background-color:#ececec}.weui-check{position:absolute;left:-9999px}.weui-check__hd_in-checkbox{padding-right:.35em}.weui-cell__ft_in-radio{padding-left:.35em}.weui-cell_input{padding-top:0;padding-bottom:0}.weui-label{width:105px;word-wrap:break-word;word-break:break-all}.weui-input{height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em}.weui-toptips{position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);top:0;left:0;right:0;padding:5px;font-size:14px;text-align:center;color:#fff;z-index:5000;word-wrap:break-word;word-break:break-all}.weui-toptips_warn{background-color:#e64340}.weui-textarea{display:block;width:100%}.weui-textarea-counter{color:#b2b2b2;text-align:right}.weui-cell_warn,.weui-textarea-counter_warn{color:#e64340}.weui-form-preview{position:relative;background-color:#fff}.weui-form-preview:before{top:0;border-top:1rpx solid #d9d9d9}.weui-form-preview:after,.weui-form-preview:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-form-preview:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-form-preview__value{font-size:14px}.weui-form-preview__value_in-hd{font-size:26px}.weui-form-preview__hd{position:relative;padding:10px 15px;text-align:right;line-height:2.5em}.weui-form-preview__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-form-preview__bd{padding:10px 15px;font-size:.9em;text-align:right;color:#999;line-height:2}.weui-form-preview__ft{position:relative;line-height:50px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-form-preview__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__item{overflow:hidden}.weui-form-preview__label{float:left;margin-right:1em;min-width:4em;color:#999;text-align:justify;text-align-last:justify}.weui-form-preview__value{display:block;overflow:hidden;word-break:normal;word-wrap:break-word}.weui-form-preview__btn{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3cc51f;text-align:center}.weui-form-preview__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__btn:first-child:after{display:none}.weui-form-preview__btn_active{background-color:#eee}.weui-form-preview__btn_default{color:#999}.weui-form-preview__btn_primary{color:#0bb20c}.weui-cell_select{padding:0}.weui-select{position:relative;padding-left:15px;padding-right:30px;height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em;border-right:1rpx solid #d9d9d9}.weui-select:before{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;right:15px;margin-top:-4px}.weui-select_in-select-after{padding-left:0}.weui-cell__bd_in-select-before,.weui-cell__hd_in-select-after{padding-left:15px}.weui-cell_vcode{padding-right:0}.weui-vcode-btn,.weui-vcode-img{margin-left:5px;height:2.58823529em;vertical-align:middle}.weui-vcode-btn{display:inline-block;padding:0 .6em 0 .7em;border-left:1px solid #e5e5e5;line-height:2.58823529em;font-size:17px;color:#3cc51f;white-space:nowrap}.weui-vcode-btn:active{color:#52a341}.weui-cell_switch{padding-top:6px;padding-bottom:6px}.weui-uploader__hd{display:-webkit-box;display:-webkit-flex;display:flex;padding-bottom:10px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-uploader__title{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-uploader__info{color:#b2b2b2}.weui-uploader__bd{margin-bottom:-4px;margin-right:-9px;overflow:hidden}.weui-uploader__file{float:left;margin-right:9px;margin-bottom:9px}.weui-uploader__img{display:block;width:79px;height:79px}.weui-uploader__file_status{position:relative}.weui-uploader__file_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.5)}.weui-uploader__file-content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff}.weui-uploader__input-box{float:left;position:relative;margin-right:9px;margin-bottom:9px;width:77px;height:77px;border:1px solid #d9d9d9}.weui-uploader__input-box:after,.weui-uploader__input-box:before{content:" ";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#d9d9d9}.weui-uploader__input-box:before{width:2px;height:39.5px}.weui-uploader__input-box:after{width:39.5px;height:2px}.weui-uploader__input-box:active{border-color:#999}.weui-uploader__input-box:active:after,.weui-uploader__input-box:active:before{background-color:#999}.weui-uploader__input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0}.weui-article{padding:20px 15px;font-size:15px}.weui-article__section{margin-bottom:1.5em}.weui-article__h1{font-size:18px;font-weight:400;margin-bottom:.9em}.weui-article__h2{font-size:16px;font-weight:400;margin-bottom:.34em}.weui-article__h3{font-weight:400;font-size:15px;margin-bottom:.34em}.weui-article__p{margin:0 0 .8em}.weui-msg{padding-top:36px;text-align:center}.weui-msg__link{display:inline;color:#586c94}.weui-msg__icon-area{margin-bottom:30px}.weui-msg__text-area{margin-bottom:25px;padding:0 20px}.weui-msg__title{margin-bottom:5px;font-weight:400;font-size:20px}.weui-msg__desc{font-size:14px;color:#999}.weui-msg__opr-area{margin-bottom:25px}.weui-msg__extra-area{margin-bottom:15px;font-size:14px;color:#999}@media screen and (min-height:438px){.weui-msg__extra-area{position:fixed;left:0;bottom:0;width:100%;text-align:center}}.weui-flex{display:-webkit-box;display:-webkit-flex;display:flex}.weui-flex__item{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-btn{margin-top:15px}.weui-btn:first-child{margin-top:0}.weui-btn-area{margin:1.17647059em 15px .3em}.weui-agree{display:block;padding:.5em 15px;font-size:13px}.weui-agree__text{color:#999}.weui-agree__link{display:inline;color:#586c94}.weui-agree__checkbox{position:absolute;left:-9999px}.weui-agree__checkbox-icon{position:relative;top:2px;display:inline-block;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:11px;height:11px}.weui-agree__checkbox-icon-check{position:absolute;top:1px;left:1px}.weui-footer{color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px}.weui-grids{border-top:1rpx solid #d9d9d9;border-left:1rpx solid #d9d9d9;overflow:hidden}.weui-grid{position:relative;float:left;padding:20px 10px;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid #d9d9d9;border-bottom:1rpx solid #d9d9d9}.weui-grid_active{background-color:#ececec}.weui-grid__icon{display:block;width:28px;height:28px;margin:0 auto}.weui-grid__label{margin-top:5px;display:block;text-align:center;color:#000;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.weui-loading{margin:0 5px;width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:a 1s steps(12) infinite;animation:a 1s steps(12) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}.weui-loading.weui-loading_transparent{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E")}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.weui-badge{display:inline-block;padding:.15em .4em;min-width:8px;border-radius:18px;background-color:#e64340;color:#fff;line-height:1.2;text-align:center;font-size:12px;vertical-align:middle}.weui-badge_dot{padding:.4em;min-width:0}.weui-loadmore{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.weui-loadmore__tips{display:inline-block;vertical-align:middle}.weui-loadmore_line{border-top:1px solid #e5e5e5;margin-top:2.4em}.weui-loadmore__tips_in-line{position:relative;top:-.9em;padding:0 .55em;background-color:#fff;color:#999}.weui-loadmore__tips_in-dot{position:relative;padding:0 .16em;width:4px;height:1.6em}.weui-loadmore__tips_in-dot:before{content:" ";position:absolute;top:50%;left:50%;margin-top:-1px;margin-left:-2px;width:4px;height:4px;border-radius:50%;background-color:#e5e5e5}.weui-panel{background-color:#fff;margin-top:10px;position:relative;overflow:hidden}.weui-panel:first-child{margin-top:0}.weui-panel:before{top:0;border-top:1rpx solid #e5e5e5}.weui-panel:after,.weui-panel:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}.weui-panel:after{bottom:0;border-bottom:1rpx solid #e5e5e5}.weui-panel__hd{padding:14px 15px 10px;color:#999;font-size:13px;position:relative}.weui-panel__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}.weui-media-box{padding:15px;position:relative}.weui-media-box:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}.weui-media-box:first-child:before{display:none}.weui-media-box__title{font-weight:400;font-size:17px;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;word-wrap:break-word;word-break:break-all}.weui-media-box__desc{color:#999;font-size:13px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-media-box__info{margin-top:15px;padding-bottom:5px;font-size:13px;color:#cecece;line-height:1em;list-style:none;overflow:hidden}.weui-media-box__info__meta{float:left;padding-right:1em}.weui-media-box__info__meta_extra{padding-left:1em;border-left:1px solid #cecece}.weui-media-box__title_in-text{margin-bottom:8px}.weui-media-box_appmsg{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-media-box__thumb{width:100%;height:100%;vertical-align:top}.weui-media-box__hd_in-appmsg{margin-right:.8em;width:60px;height:60px;line-height:60px;text-align:center}.weui-media-box__bd_in-appmsg{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:0}.weui-media-box_small-appmsg{padding:0}.weui-cells_in-small-appmsg{margin-top:0}.weui-cells_in-small-appmsg:before{display:none}.weui-progress{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-progress__bar{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-progress__opr{margin-left:15px;font-size:0}.weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.weui-tab{position:relative;height:100%}.weui-tab__panel{box-sizing:border-box;height:100%;padding-top:50px;overflow:auto;-webkit-overflow-scrolling:touch}.weui-search-bar{position:relative;padding:8px 10px;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;background-color:#efeff4;border-top:1rpx solid #d7d6dc;border-bottom:1rpx solid #d7d6dc}.weui-icon-search{margin-right:8px;font-size:inherit}.weui-icon-search_in-box{position:absolute;left:10px;top:7px}.weui-search-bar__text{display:inline-block;font-size:14px;vertical-align:middle}.weui-search-bar__form{position:relative;-webkit-box-flex:1;-webkit-flex:auto;flex:auto;border-radius:5px;background:#fff;border:1rpx solid #e6e6ea}.weui-search-bar__box{position:relative;padding-left:30px;padding-right:30px;width:100%;box-sizing:border-box;z-index:1}.weui-search-bar__input{height:28px;line-height:28px;font-size:14px}.weui-icon-clear{position:absolute;top:0;right:0;padding:7px 8px;font-size:0}.weui-search-bar__label{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:3px;text-align:center;color:#9b9b9b;background:#fff;line-height:28px}.weui-search-bar__cancel-btn{margin-left:10px;line-height:28px;color:#09bb07;white-space:nowrap} -------------------------------------------------------------------------------- /style/widget/weui-agree/weui-agree.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-agree{display:block;padding:.5em 15px;font-size:13px}.weui-agree__text{color:#999}.weui-agree__link{display:inline;color:#586c94}.weui-agree__checkbox{position:absolute;left:-9999px}.weui-agree__checkbox-icon{position:relative;top:2px;display:inline-block;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:11px;height:11px}.weui-agree__checkbox-icon-check{position:absolute;top:1px;left:1px} -------------------------------------------------------------------------------- /style/widget/weui-animate/weui-animate.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | @-webkit-keyframes a{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes a{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.weui-animate-slide-up{-webkit-animation:a ease .3s forwards;animation:a ease .3s forwards}@-webkit-keyframes b{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes b{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.weui-animate-slide-down{-webkit-animation:b ease .3s forwards;animation:b ease .3s forwards}@-webkit-keyframes c{0%{opacity:0}to{opacity:1}}@keyframes c{0%{opacity:0}to{opacity:1}}.weui-animate-fade-in{-webkit-animation:c ease .3s forwards;animation:c ease .3s forwards}@-webkit-keyframes d{0%{opacity:1}to{opacity:0}}@keyframes d{0%{opacity:1}to{opacity:0}}.weui-animate-fade-out{-webkit-animation:d ease .3s forwards;animation:d ease .3s forwards} -------------------------------------------------------------------------------- /style/widget/weui-button/weui-button.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-btn{margin-top:15px}.weui-btn:first-child{margin-top:0}.weui-btn-area{margin:1.17647059em 15px .3em} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-access.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_access{color:inherit}.weui-cell__ft_in-access{padding-right:13px;position:relative}.weui-cell__ft_in-access:after{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;margin-top:-4px;right:2px}.weui-cell_link{color:#586c94;font-size:14px}.weui-cell_link:active{background-color:#ececec}.weui-cell_link:first-child:before{display:block} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-cell.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cells{position:relative;margin-top:1.17647059em;background-color:#fff;line-height:1.41176471;font-size:17px}.weui-cells:before{top:0;border-top:1rpx solid #d9d9d9}.weui-cells:after,.weui-cells:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-cells:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-cells__title{margin-top:.77em;margin-bottom:.3em;padding-left:15px;padding-right:15px;color:#999;font-size:14px}.weui-cells_after-title{margin-top:0}.weui-cells__tips{margin-top:.3em;color:#999;padding-left:15px;padding-right:15px;font-size:14px}.weui-cell{padding:10px 15px;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-cell:first-child:before{display:none}.weui-cell_active{background-color:#ececec}.weui-cell_primary{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.weui-cell__bd{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-cell__ft{text-align:right;color:#999} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-check.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-icon-radio{margin-left:3.2px;margin-right:3.2px}.weui-icon-checkbox_circle,.weui-icon-checkbox_success{margin-left:4.6px;margin-right:4.6px}.weui-check__label:active{background-color:#ececec}.weui-check{position:absolute;left:-9999px}.weui-check__hd_in-checkbox{padding-right:.35em}.weui-cell__ft_in-radio{padding-left:.35em} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-form.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_input{padding-top:0;padding-bottom:0}.weui-label{width:105px;word-wrap:break-word;word-break:break-all}.weui-input{height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em}.weui-toptips{position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);top:0;left:0;right:0;padding:5px;font-size:14px;text-align:center;color:#fff;z-index:5000;word-wrap:break-word;word-break:break-all}.weui-toptips_warn{background-color:#e64340}.weui-textarea{display:block;width:100%}.weui-textarea-counter{color:#b2b2b2;text-align:right}.weui-cell_warn,.weui-textarea-counter_warn{color:#e64340}.weui-form-preview{position:relative;background-color:#fff}.weui-form-preview:before{top:0;border-top:1rpx solid #d9d9d9}.weui-form-preview:after,.weui-form-preview:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-form-preview:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-form-preview__value{font-size:14px}.weui-form-preview__value_in-hd{font-size:26px}.weui-form-preview__hd{position:relative;padding:10px 15px;text-align:right;line-height:2.5em}.weui-form-preview__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-form-preview__bd{padding:10px 15px;font-size:.9em;text-align:right;color:#999;line-height:2}.weui-form-preview__ft{position:relative;line-height:50px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-form-preview__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__item{overflow:hidden}.weui-form-preview__label{float:left;margin-right:1em;min-width:4em;color:#999;text-align:justify;text-align-last:justify}.weui-form-preview__value{display:block;overflow:hidden;word-break:normal;word-wrap:break-word}.weui-form-preview__btn{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3cc51f;text-align:center}.weui-form-preview__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__btn:first-child:after{display:none}.weui-form-preview__btn_active{background-color:#eee}.weui-form-preview__btn_default{color:#999}.weui-form-preview__btn_primary{color:#0bb20c}.weui-cell_select{padding:0}.weui-select{position:relative;padding-left:15px;padding-right:30px;height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em;border-right:1rpx solid #d9d9d9}.weui-select:before{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;right:15px;margin-top:-4px}.weui-select_in-select-after{padding-left:0}.weui-cell__bd_in-select-before,.weui-cell__hd_in-select-after{padding-left:15px}.weui-cell_vcode{padding-right:0}.weui-vcode-btn,.weui-vcode-img{margin-left:5px;height:2.58823529em;vertical-align:middle}.weui-vcode-btn{display:inline-block;padding:0 .6em 0 .7em;border-left:1px solid #e5e5e5;line-height:2.58823529em;font-size:17px;color:#3cc51f;white-space:nowrap}.weui-vcode-btn:active{color:#52a341} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-form/weui-form-preview.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-form-preview{position:relative;background-color:#fff}.weui-form-preview:before{top:0;border-top:1rpx solid #d9d9d9}.weui-form-preview:after,.weui-form-preview:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-form-preview:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-form-preview__value{font-size:14px}.weui-form-preview__value_in-hd{font-size:26px}.weui-form-preview__hd{position:relative;padding:10px 15px;text-align:right;line-height:2.5em}.weui-form-preview__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-form-preview__bd{padding:10px 15px;font-size:.9em;text-align:right;color:#999;line-height:2}.weui-form-preview__ft{position:relative;line-height:50px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-form-preview__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__item{overflow:hidden}.weui-form-preview__label{float:left;margin-right:1em;min-width:4em;color:#999;text-align:justify;text-align-last:justify}.weui-form-preview__value{display:block;overflow:hidden;word-break:normal;word-wrap:break-word}.weui-form-preview__btn{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3cc51f;text-align:center}.weui-form-preview__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__btn:first-child:after{display:none}.weui-form-preview__btn_active{background-color:#eee}.weui-form-preview__btn_default{color:#999}.weui-form-preview__btn_primary{color:#0bb20c} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-form/weui-form_common.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_input{padding-top:0;padding-bottom:0}.weui-label{width:105px;word-wrap:break-word;word-break:break-all}.weui-input{height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em}.weui-toptips{position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);top:0;left:0;right:0;padding:5px;font-size:14px;text-align:center;color:#fff;z-index:5000;word-wrap:break-word;word-break:break-all}.weui-toptips_warn{background-color:#e64340}.weui-textarea{display:block;width:100%}.weui-textarea-counter{color:#b2b2b2;text-align:right}.weui-cell_warn,.weui-textarea-counter_warn{color:#e64340} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-form/weui-select.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_select{padding:0}.weui-select{position:relative;padding-left:15px;padding-right:30px;height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em;border-right:1rpx solid #d9d9d9}.weui-select:before{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;right:15px;margin-top:-4px}.weui-select_in-select-after{padding-left:0}.weui-cell__bd_in-select-before,.weui-cell__hd_in-select-after{padding-left:15px} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-form/weui-vcode.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_vcode{padding-right:0}.weui-vcode-btn,.weui-vcode-img{margin-left:5px;height:2.58823529em;vertical-align:middle}.weui-vcode-btn{display:inline-block;padding:0 .6em 0 .7em;border-left:1px solid #e5e5e5;line-height:2.58823529em;font-size:17px;color:#3cc51f;white-space:nowrap}.weui-vcode-btn:active{color:#52a341} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-switch.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_switch{padding-top:6px;padding-bottom:6px} -------------------------------------------------------------------------------- /style/widget/weui-cell/weui-uploader.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-uploader__hd{display:-webkit-box;display:-webkit-flex;display:flex;padding-bottom:10px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-uploader__title{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-uploader__info{color:#b2b2b2}.weui-uploader__bd{margin-bottom:-4px;margin-right:-9px;overflow:hidden}.weui-uploader__file{float:left;margin-right:9px;margin-bottom:9px}.weui-uploader__img{display:block;width:79px;height:79px}.weui-uploader__file_status{position:relative}.weui-uploader__file_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.5)}.weui-uploader__file-content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff}.weui-uploader__input-box{float:left;position:relative;margin-right:9px;margin-bottom:9px;width:77px;height:77px;border:1px solid #d9d9d9}.weui-uploader__input-box:after,.weui-uploader__input-box:before{content:" ";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#d9d9d9}.weui-uploader__input-box:before{width:2px;height:39.5px}.weui-uploader__input-box:after{width:39.5px;height:2px}.weui-uploader__input-box:active{border-color:#999}.weui-uploader__input-box:active:after,.weui-uploader__input-box:active:before{background-color:#999}.weui-uploader__input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0} -------------------------------------------------------------------------------- /style/widget/weui-flex/weui-flex.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-flex{display:-webkit-box;display:-webkit-flex;display:flex}.weui-flex__item{-webkit-box-flex:1;-webkit-flex:1;flex:1} -------------------------------------------------------------------------------- /style/widget/weui-footer/weui-footer.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-footer{color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px} -------------------------------------------------------------------------------- /style/widget/weui-grid/weui-grid.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-grids{border-top:1rpx solid #d9d9d9;border-left:1rpx solid #d9d9d9;overflow:hidden}.weui-grid{position:relative;float:left;padding:20px 10px;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid #d9d9d9;border-bottom:1rpx solid #d9d9d9}.weui-grid_active{background-color:#ececec}.weui-grid__icon{display:block;width:28px;height:28px;margin:0 auto}.weui-grid__label{margin-top:5px;display:block;text-align:center;color:#000;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden} -------------------------------------------------------------------------------- /style/widget/weui-loading/weui-loading.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-loading{margin:0 5px;width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:a 1s steps(12) infinite;animation:a 1s steps(12) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}.weui-loading.weui-loading_transparent{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E")}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} -------------------------------------------------------------------------------- /style/widget/weui-media-box/weui-media-box.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-media-box{padding:15px;position:relative}.weui-media-box:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}.weui-media-box:first-child:before{display:none}.weui-media-box__title{font-weight:400;font-size:17px;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;word-wrap:break-word;word-break:break-all}.weui-media-box__desc{color:#999;font-size:13px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-media-box__info{margin-top:15px;padding-bottom:5px;font-size:13px;color:#cecece;line-height:1em;list-style:none;overflow:hidden}.weui-media-box__info__meta{float:left;padding-right:1em}.weui-media-box__info__meta_extra{padding-left:1em;border-left:1px solid #cecece}.weui-media-box__title_in-text{margin-bottom:8px}.weui-media-box_appmsg{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-media-box__thumb{width:100%;height:100%;vertical-align:top}.weui-media-box__hd_in-appmsg{margin-right:.8em;width:60px;height:60px;line-height:60px;text-align:center}.weui-media-box__bd_in-appmsg{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:0}.weui-media-box_small-appmsg{padding:0}.weui-cells_in-small-appmsg{margin-top:0}.weui-cells_in-small-appmsg:before{display:none} -------------------------------------------------------------------------------- /style/widget/weui-page/weui-article.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-article{padding:20px 15px;font-size:15px}.weui-article__section{margin-bottom:1.5em}.weui-article__h1{font-size:18px;font-weight:400;margin-bottom:.9em}.weui-article__h2{font-size:16px;font-weight:400;margin-bottom:.34em}.weui-article__h3{font-weight:400;font-size:15px;margin-bottom:.34em}.weui-article__p{margin:0 0 .8em} -------------------------------------------------------------------------------- /style/widget/weui-page/weui-msg.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-msg{padding-top:36px;text-align:center}.weui-msg__link{display:inline;color:#586c94}.weui-msg__icon-area{margin-bottom:30px}.weui-msg__text-area{margin-bottom:25px;padding:0 20px}.weui-msg__title{margin-bottom:5px;font-weight:400;font-size:20px}.weui-msg__desc{font-size:14px;color:#999}.weui-msg__opr-area{margin-bottom:25px}.weui-msg__extra-area{margin-bottom:15px;font-size:14px;color:#999}@media screen and (min-height:438px){.weui-msg__extra-area{position:fixed;left:0;bottom:0;width:100%;text-align:center}} -------------------------------------------------------------------------------- /style/widget/weui-panel/weui-panel.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-panel{background-color:#fff;margin-top:10px;position:relative;overflow:hidden}.weui-panel:first-child{margin-top:0}.weui-panel:before{top:0;border-top:1rpx solid #e5e5e5}.weui-panel:after,.weui-panel:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}.weui-panel:after{bottom:0;border-bottom:1rpx solid #e5e5e5}.weui-panel__hd{padding:14px 15px 10px;color:#999;font-size:13px;position:relative}.weui-panel__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #e5e5e5;color:#e5e5e5;left:15px} -------------------------------------------------------------------------------- /style/widget/weui-progress/weui-progress.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-progress{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-progress__bar{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-progress__opr{margin-left:15px;font-size:0} -------------------------------------------------------------------------------- /style/widget/weui-searchbar/weui-searchbar.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-search-bar{position:relative;padding:8px 10px;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;background-color:#efeff4;border-top:1rpx solid #d7d6dc;border-bottom:1rpx solid #d7d6dc}.weui-icon-search{margin-right:8px;font-size:inherit}.weui-icon-search_in-box{position:absolute;left:10px;top:7px}.weui-search-bar__text{display:inline-block;font-size:14px;vertical-align:middle}.weui-search-bar__form{position:relative;-webkit-box-flex:1;-webkit-flex:auto;flex:auto;border-radius:5px;background:#fff;border:1rpx solid #e6e6ea}.weui-search-bar__box{position:relative;padding-left:30px;padding-right:30px;width:100%;box-sizing:border-box;z-index:1}.weui-search-bar__input{height:28px;line-height:28px;font-size:14px}.weui-icon-clear{position:absolute;top:0;right:0;padding:7px 8px;font-size:0}.weui-search-bar__label{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:3px;text-align:center;color:#9b9b9b;background:#fff;line-height:28px}.weui-search-bar__cancel-btn{margin-left:10px;line-height:28px;color:#09bb07;white-space:nowrap} -------------------------------------------------------------------------------- /style/widget/weui-tab/weui-navbar.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal} -------------------------------------------------------------------------------- /style/widget/weui-tab/weui-tab.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.weui-tab{position:relative;height:100%}.weui-tab__panel{box-sizing:border-box;height:100%;padding-top:50px;overflow:auto;-webkit-overflow-scrolling:touch} -------------------------------------------------------------------------------- /style/widget/weui-tips/weui-badge.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-badge{display:inline-block;padding:.15em .4em;min-width:8px;border-radius:18px;background-color:#e64340;color:#fff;line-height:1.2;text-align:center;font-size:12px;vertical-align:middle}.weui-badge_dot{padding:.4em;min-width:0} -------------------------------------------------------------------------------- /style/widget/weui-tips/weui-loadmore.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-loadmore{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.weui-loadmore__tips{display:inline-block;vertical-align:middle}.weui-loadmore_line{border-top:1px solid #e5e5e5;margin-top:2.4em}.weui-loadmore__tips_in-line{position:relative;top:-.9em;padding:0 .55em;background-color:#fff;color:#999}.weui-loadmore__tips_in-dot{position:relative;padding:0 .16em;width:4px;height:1.6em}.weui-loadmore__tips_in-dot:before{content:" ";position:absolute;top:50%;left:50%;margin-top:-1px;margin-left:-2px;width:4px;height:4px;border-radius:50%;background-color:#e5e5e5} -------------------------------------------------------------------------------- /utils/html.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /*3.用正则表达式实现html转码*/ 3 | htmlEncode: function (str) { 4 | var result = ""; 5 | for (var j = 0; j < s.length; j++) { 6 | // Encode 25% of characters 7 | if (Math.random() < 0.25 || s.charAt(j) == ':' || s.charAt(j) == '@' || s.charAt(j) == '.') { 8 | var charCode = s.charCodeAt(j); 9 | result += "&#"; 10 | result += charCode; 11 | result += ";"; 12 | } else { 13 | result += s.charAt(j); 14 | } 15 | } 16 | return result; 17 | }, 18 | /*4.用正则表达式实现html解码*/ 19 | htmlDecode: function (str) { 20 | var map = { "gt": ">", "amp": "&", "lt": "<", "apos": "\'" }; 21 | return str.replace(/&(#(?:x[0-9a-f]+|\d+)|[a-z]+);?/gi, function ($0, $1) { 22 | if ($1[0] === "#") { 23 | return String.fromCharCode($1[1].toLowerCase() === "x" ? parseInt($1.substr(2), 16) : parseInt($1.substr(1), 10)); 24 | } else { 25 | return map.hasOwnProperty($1) ? map[$1] : $0; 26 | } 27 | }); 28 | } 29 | }; -------------------------------------------------------------------------------- /utils/http.js: -------------------------------------------------------------------------------- 1 | 2 | class Http { 3 | 4 | static getDefaultHeader() { 5 | return { 6 | 'content-type': 'application/json' 7 | } 8 | } 9 | 10 | static get(url, header) { 11 | return new Promise((resolve, reject) => { 12 | wx.request({ 13 | url: url, 14 | method: 'GET', 15 | header: header || this.getDefaultHeader(), 16 | success: function (res) { 17 | resolve(res); 18 | }, 19 | fail: function (err) { 20 | reject(err); 21 | } 22 | }) 23 | }); 24 | } 25 | 26 | static post(url, data, header) { 27 | return new Promise((resolve, reject) => { 28 | wx.request({ 29 | url: url, 30 | method: 'POST', 31 | data: data, 32 | header: header || this.getDefaultHeader(), 33 | success: function (res) { 34 | resolve(res); 35 | }, 36 | fail: function (err) { 37 | reject(err); 38 | } 39 | }) 40 | }); 41 | } 42 | 43 | static put(url, data, header) { 44 | return new Promise((resolve, reject) => { 45 | wx.request({ 46 | url: url, 47 | method: 'PUT', 48 | data: data, 49 | header: header || this.getDefaultHeader(), 50 | success: function (res) { 51 | resolve(res); 52 | }, 53 | fail: function (err) { 54 | reject(err); 55 | } 56 | }) 57 | }); 58 | } 59 | 60 | static delete(url, header) { 61 | return new Promise((resolve, reject) => { 62 | wx.request({ 63 | url: url, 64 | method: 'DELETE', 65 | header: header || this.getDefaultHeader(), 66 | success: function (res) { 67 | resolve(res); 68 | }, 69 | fail: function (err) { 70 | reject(err); 71 | } 72 | }) 73 | }); 74 | } 75 | 76 | } 77 | 78 | module.exports = Http; -------------------------------------------------------------------------------- /utils/util.js: -------------------------------------------------------------------------------- 1 | const formatTime = date => { 2 | const year = date.getFullYear() 3 | const month = date.getMonth() + 1 4 | const day = date.getDate() 5 | const hour = date.getHours() 6 | const minute = date.getMinutes() 7 | const second = date.getSeconds() 8 | 9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') 10 | } 11 | 12 | const formatNumber = n => { 13 | n = n.toString() 14 | return n[1] ? n : '0' + n 15 | } 16 | 17 | module.exports = { 18 | formatTime: formatTime 19 | } 20 | --------------------------------------------------------------------------------