正在显示
35 个修改的文件
包含
4531 行增加
和
0 行删除
.gitignore
0 → 100644
LICENSE
0 → 100755
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, and | ||
10 | +distribution as defined by Sections 1 through 9 of this document. | ||
11 | + | ||
12 | +"Licensor" shall mean the copyright owner or entity authorized by the copyright | ||
13 | +owner that is granting the License. | ||
14 | + | ||
15 | +"Legal Entity" shall mean the union of the acting entity and all other entities | ||
16 | +that control, are controlled by, or are under common control with that entity. | ||
17 | +For the purposes of this definition, "control" means (i) the power, direct or | ||
18 | +indirect, to cause the direction or management of such entity, whether by | ||
19 | +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the | ||
20 | +outstanding shares, or (iii) beneficial ownership of such entity. | ||
21 | + | ||
22 | +"You" (or "Your") shall mean an individual or Legal Entity exercising | ||
23 | +permissions granted by this License. | ||
24 | + | ||
25 | +"Source" form shall mean the preferred form for making modifications, including | ||
26 | +but not limited to software source code, documentation source, and configuration | ||
27 | +files. | ||
28 | + | ||
29 | +"Object" form shall mean any form resulting from mechanical transformation or | ||
30 | +translation of a Source form, including but not limited to compiled object code, | ||
31 | +generated documentation, and conversions to other media types. | ||
32 | + | ||
33 | +"Work" shall mean the work of authorship, whether in Source or Object form, made | ||
34 | +available under the License, as indicated by a copyright notice that is included | ||
35 | +in or attached to the work (an example is provided in the Appendix below). | ||
36 | + | ||
37 | +"Derivative Works" shall mean any work, whether in Source or Object form, that | ||
38 | +is based on (or derived from) the Work and for which the editorial revisions, | ||
39 | +annotations, elaborations, or other modifications represent, as a whole, an | ||
40 | +original work of authorship. For the purposes of this License, Derivative Works | ||
41 | +shall not include works that remain separable from, or merely link (or bind by | ||
42 | +name) to the interfaces of, the Work and Derivative Works thereof. | ||
43 | + | ||
44 | +"Contribution" shall mean any work of authorship, including the original version | ||
45 | +of the Work and any modifications or additions to that Work or Derivative Works | ||
46 | +thereof, that is intentionally submitted to Licensor for inclusion in the Work | ||
47 | +by the copyright owner or by an individual or Legal Entity authorized to submit | ||
48 | +on behalf of the copyright owner. For the purposes of this definition, | ||
49 | +"submitted" means any form of electronic, verbal, or written communication sent | ||
50 | +to the Licensor or its representatives, including but not limited to | ||
51 | +communication on electronic mailing lists, source code control systems, and | ||
52 | +issue tracking systems that are managed by, or on behalf of, the Licensor for | ||
53 | +the purpose of discussing and improving the Work, but excluding communication | ||
54 | +that is conspicuously marked or otherwise designated in writing by the copyright | ||
55 | +owner as "Not a Contribution." | ||
56 | + | ||
57 | +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf | ||
58 | +of whom a Contribution has been received by Licensor and subsequently | ||
59 | +incorporated within the Work. | ||
60 | + | ||
61 | +2. Grant of Copyright License. | ||
62 | + | ||
63 | +Subject to the terms and conditions of this License, each Contributor hereby | ||
64 | +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, | ||
65 | +irrevocable copyright license to reproduce, prepare Derivative Works of, | ||
66 | +publicly display, publicly perform, sublicense, and distribute the Work and such | ||
67 | +Derivative Works in Source or Object form. | ||
68 | + | ||
69 | +3. Grant of Patent License. | ||
70 | + | ||
71 | +Subject to the terms and conditions of this License, each Contributor hereby | ||
72 | +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, | ||
73 | +irrevocable (except as stated in this section) patent license to make, have | ||
74 | +made, use, offer to sell, sell, import, and otherwise transfer the Work, where | ||
75 | +such license applies only to those patent claims licensable by such Contributor | ||
76 | +that are necessarily infringed by their Contribution(s) alone or by combination | ||
77 | +of their Contribution(s) with the Work to which such Contribution(s) was | ||
78 | +submitted. If You institute patent litigation against any entity (including a | ||
79 | +cross-claim or counterclaim in a lawsuit) alleging that the Work or a | ||
80 | +Contribution incorporated within the Work constitutes direct or contributory | ||
81 | +patent infringement, then any patent licenses granted to You under this License | ||
82 | +for that Work shall terminate as of the date such litigation is filed. | ||
83 | + | ||
84 | +4. Redistribution. | ||
85 | + | ||
86 | +You may reproduce and distribute copies of the Work or Derivative Works thereof | ||
87 | +in any medium, with or without modifications, and in Source or Object form, | ||
88 | +provided that You meet the following conditions: | ||
89 | + | ||
90 | +You must give any other recipients of the Work or Derivative Works a copy of | ||
91 | +this License; and | ||
92 | +You must cause any modified files to carry prominent notices stating that You | ||
93 | +changed the files; and | ||
94 | +You must retain, in the Source form of any Derivative Works that You distribute, | ||
95 | +all copyright, patent, trademark, and attribution notices from the Source form | ||
96 | +of the Work, excluding those notices that do not pertain to any part of the | ||
97 | +Derivative Works; and | ||
98 | +If the Work includes a "NOTICE" text file as part of its distribution, then any | ||
99 | +Derivative Works that You distribute must include a readable copy of the | ||
100 | +attribution notices contained within such NOTICE file, excluding those notices | ||
101 | +that do not pertain to any part of the Derivative Works, in at least one of the | ||
102 | +following places: within a NOTICE text file distributed as part of the | ||
103 | +Derivative Works; within the Source form or documentation, if provided along | ||
104 | +with the Derivative Works; or, within a display generated by the Derivative | ||
105 | +Works, if and wherever such third-party notices normally appear. The contents of | ||
106 | +the NOTICE file are for informational purposes only and do not modify the | ||
107 | +License. You may add Your own attribution notices within Derivative Works that | ||
108 | +You distribute, alongside or as an addendum to the NOTICE text from the Work, | ||
109 | +provided that such additional attribution notices cannot be construed as | ||
110 | +modifying the License. | ||
111 | +You may add Your own copyright statement to Your modifications and may provide | ||
112 | +additional or different license terms and conditions for use, reproduction, or | ||
113 | +distribution of Your modifications, or for any such Derivative Works as a whole, | ||
114 | +provided Your use, reproduction, and distribution of the Work otherwise complies | ||
115 | +with the conditions stated in this License. | ||
116 | + | ||
117 | +5. Submission of Contributions. | ||
118 | + | ||
119 | +Unless You explicitly state otherwise, any Contribution intentionally submitted | ||
120 | +for inclusion in the Work by You to the Licensor shall be under the terms and | ||
121 | +conditions of this License, without any additional terms or conditions. | ||
122 | +Notwithstanding the above, nothing herein shall supersede or modify the terms of | ||
123 | +any separate license agreement you may have executed with Licensor regarding | ||
124 | +such Contributions. | ||
125 | + | ||
126 | +6. Trademarks. | ||
127 | + | ||
128 | +This License does not grant permission to use the trade names, trademarks, | ||
129 | +service marks, or product names of the Licensor, except as required for | ||
130 | +reasonable and customary use in describing the origin of the Work and | ||
131 | +reproducing the content of the NOTICE file. | ||
132 | + | ||
133 | +7. Disclaimer of Warranty. | ||
134 | + | ||
135 | +Unless required by applicable law or agreed to in writing, Licensor provides the | ||
136 | +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, | ||
137 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, | ||
138 | +including, without limitation, any warranties or conditions of TITLE, | ||
139 | +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are | ||
140 | +solely responsible for determining the appropriateness of using or | ||
141 | +redistributing the Work and assume any risks associated with Your exercise of | ||
142 | +permissions under this License. | ||
143 | + | ||
144 | +8. Limitation of Liability. | ||
145 | + | ||
146 | +In no event and under no legal theory, whether in tort (including negligence), | ||
147 | +contract, or otherwise, unless required by applicable law (such as deliberate | ||
148 | +and grossly negligent acts) or agreed to in writing, shall any Contributor be | ||
149 | +liable to You for damages, including any direct, indirect, special, incidental, | ||
150 | +or consequential damages of any character arising as a result of this License or | ||
151 | +out of the use or inability to use the Work (including but not limited to | ||
152 | +damages for loss of goodwill, work stoppage, computer failure or malfunction, or | ||
153 | +any and all other commercial damages or losses), even if such Contributor has | ||
154 | +been advised of the possibility of such damages. | ||
155 | + | ||
156 | +9. Accepting Warranty or Additional Liability. | ||
157 | + | ||
158 | +While redistributing the Work or Derivative Works thereof, You may choose to | ||
159 | +offer, and charge a fee for, acceptance of support, warranty, indemnity, or | ||
160 | +other liability obligations and/or rights consistent with this License. However, | ||
161 | +in accepting such obligations, You may act only on Your own behalf and on Your | ||
162 | +sole responsibility, not on behalf of any other Contributor, and only if You | ||
163 | +agree to indemnify, defend, and hold each Contributor harmless for any liability | ||
164 | +incurred by, or claims asserted against, such Contributor by reason of your | ||
165 | +accepting any such warranty or additional liability. | ||
166 | + | ||
167 | +END OF TERMS AND CONDITIONS | ||
168 | + | ||
169 | +APPENDIX: How to apply the Apache License to your work | ||
170 | + | ||
171 | +To apply the Apache License to your work, attach the following boilerplate | ||
172 | +notice, with the fields enclosed by brackets "{}" replaced with your own | ||
173 | +identifying information. (Don't include the brackets!) The text should be | ||
174 | +enclosed in the appropriate comment syntax for the file format. We also | ||
175 | +recommend that a file or class name and description of purpose be included on | ||
176 | +the same "printed page" as the copyright notice for easier identification within | ||
177 | +third-party archives. | ||
178 | + | ||
179 | + Copyright 2017 Karson | ||
180 | + | ||
181 | + Licensed under the Apache License, Version 2.0 (the "License"); | ||
182 | + you may not use this file except in compliance with the License. | ||
183 | + You may obtain a copy of the License at | ||
184 | + | ||
185 | + http://www.apache.org/licenses/LICENSE-2.0 | ||
186 | + | ||
187 | + Unless required by applicable law or agreed to in writing, software | ||
188 | + distributed under the License is distributed on an "AS IS" BASIS, | ||
189 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
190 | + See the License for the specific language governing permissions and | ||
191 | + limitations under the License. |
README.md
0 → 100644
1 | +FastAdmin是一款基于ThinkPHP5+Bootstrap的极速后台开发框架。 | ||
2 | + | ||
3 | + | ||
4 | +## 主要特性 | ||
5 | + | ||
6 | +* 基于`Auth`验证的权限管理系统 | ||
7 | + * 支持无限级父子级权限继承,父级的管理员可任意增删改子级管理员及权限设置 | ||
8 | + * 支持单管理员多角色 | ||
9 | + * 支持管理子级数据或个人数据 | ||
10 | +* 强大的一键生成功能 | ||
11 | + * 一键生成CRUD,包括控制器、模型、视图、JS、语言包、菜单、回收站等 | ||
12 | + * 一键压缩打包JS和CSS文件,一键CDN静态资源部署 | ||
13 | + * 一键生成控制器菜单和规则 | ||
14 | + * 一键生成API接口文档 | ||
15 | +* 完善的前端功能组件开发 | ||
16 | + * 基于`AdminLTE`二次开发 | ||
17 | + * 基于`Bootstrap`开发,自适应手机、平板、PC | ||
18 | + * 基于`RequireJS`进行JS模块管理,按需加载 | ||
19 | + * 基于`Less`进行样式开发 | ||
20 | +* 强大的插件扩展功能,在线安装卸载升级插件 | ||
21 | +* 通用的会员模块和API模块 | ||
22 | +* 共用同一账号体系的Web端会员中心权限验证和API接口会员权限验证 | ||
23 | +* 二级域名部署支持,同时域名支持绑定到应用插件 | ||
24 | +* 多语言支持,服务端及客户端支持 | ||
25 | +* 支持大文件分片上传、剪切板粘贴上传、拖拽上传,进度条显示,图片上传前压缩 | ||
26 | +* 支持表格固定列、固定表头、跨页选择、Excel导出、模板渲染等功能 | ||
27 | +* 强大的第三方应用模块支持([CMS](https://www.fastadmin.net/store/cms.html)、[博客](https://www.fastadmin.net/store/blog.html)、[知识付费问答](https://www.fastadmin.net/store/ask.html)、[在线投票系统](https://www.fastadmin.net/store/vote.html)、[B2C商城](https://www.fastadmin.net/store/shopro.html)、[B2B2C商城](https://www.fastadmin.net/store/wanlshop.html)) | ||
28 | +* 支持CMS、博客、知识付费问答无缝整合[Xunsearch全文搜索](https://www.fastadmin.net/store/xunsearch.html) | ||
29 | +* 第三方小程序支持([CMS小程序](https://www.fastadmin.net/store/cms.html)、[预订小程序](https://www.fastadmin.net/store/ball.html)、[问答小程序](https://www.fastadmin.net/store/ask.html)、[点餐小程序](https://www.fastadmin.net/store/unidrink.html)、[B2C小程序](https://www.fastadmin.net/store/shopro.html)、[B2B2C小程序](https://www.fastadmin.net/store/wanlshop.html)、[博客小程序](https://www.fastadmin.net/store/blog.html)) | ||
30 | +* 整合第三方短信接口(阿里云、腾讯云短信) | ||
31 | +* 无缝整合第三方云存储(七牛云、阿里云OSS、又拍云)功能,支持云储存分片上传 | ||
32 | +* 第三方富文本编辑器支持(Summernote、Kindeditor、百度编辑器) | ||
33 | +* 第三方登录(QQ、微信、微博)整合 | ||
34 | +* 第三方支付(微信、支付宝)无缝整合,微信支持PC端扫码支付 | ||
35 | +* 丰富的插件应用市场 | ||
36 | + | ||
37 | +## 安装使用 | ||
38 | + | ||
39 | +https://doc.fastadmin.net | ||
40 | + | ||
41 | +## 在线演示 | ||
42 | + | ||
43 | +https://demo.fastadmin.net | ||
44 | + | ||
45 | +用户名:admin | ||
46 | + | ||
47 | +密 码:123456 | ||
48 | + | ||
49 | +提 示:演示站数据无法进行修改,请下载源码安装体验全部功能 | ||
50 | + | ||
51 | +## 界面截图 | ||
52 | +![控制台](https://images.gitee.com/uploads/images/2020/0929/202947_8db2d281_10933.gif "控制台") | ||
53 | + | ||
54 | +## 问题反馈 | ||
55 | + | ||
56 | +在使用中有任何问题,请使用以下联系方式联系我们 | ||
57 | + | ||
58 | +交流社区: https://ask.fastadmin.net | ||
59 | + | ||
60 | +QQ群: [636393962](https://jq.qq.com/?_wv=1027&k=487PNBb)(满) [708784003](https://jq.qq.com/?_wv=1027&k=5ObjtwM)(满) [964776039](https://jq.qq.com/?_wv=1027&k=59qjU2P)(3群) [749803490](https://jq.qq.com/?_wv=1027&k=5tczi88)(满) [767103006](https://jq.qq.com/?_wv=1027&k=5Z1U751)(满) [675115483](https://jq.qq.com/?_wv=1027&k=54I6mts)(6群) | ||
61 | + | ||
62 | +Github: https://github.com/karsonzhang/fastadmin | ||
63 | + | ||
64 | +Gitee: https://gitee.com/karson/fastadmin | ||
65 | + | ||
66 | +## 特别鸣谢 | ||
67 | + | ||
68 | +感谢以下的项目,排名不分先后 | ||
69 | + | ||
70 | +ThinkPHP:http://www.thinkphp.cn | ||
71 | + | ||
72 | +AdminLTE:https://adminlte.io | ||
73 | + | ||
74 | +Bootstrap:http://getbootstrap.com | ||
75 | + | ||
76 | +jQuery:http://jquery.com | ||
77 | + | ||
78 | +Bootstrap-table:https://github.com/wenzhixin/bootstrap-table | ||
79 | + | ||
80 | +Nice-validator: https://validator.niceue.com | ||
81 | + | ||
82 | +SelectPage: https://github.com/TerryZ/SelectPage | ||
83 | + | ||
84 | +Layer: https://layer.layui.com | ||
85 | + | ||
86 | +DropzoneJS: https://www.dropzonejs.com | ||
87 | + | ||
88 | + | ||
89 | +## 版权信息 | ||
90 | + | ||
91 | +FastAdmin遵循Apache2开源协议发布,并提供免费使用。 | ||
92 | + | ||
93 | +本项目包含的第三方源码和二进制文件之版权信息另行标注。 | ||
94 | + | ||
95 | +版权所有Copyright © 2017-2020 by FastAdmin (https://www.fastadmin.net) | ||
96 | + | ||
97 | +All rights reserved。 |
addons/.gitkeep
0 → 100644
1 | + |
addons/.htaccess
0 → 100755
1 | +deny from all |
addons/wanlshop/.addonrc
0 → 100644
1 | +{"license":"regular","licenseto":"10789","licensekey":"PRyWrpBMn1ElcqJw LcUJmRViwPfDoIESFRuWvQ==","menus":["wanlshop","wanlshop\/dashboard","wanlshop\/dashboard\/getSaleStatisticsData","wanlnav\/goods","wanlshop\/goods","wanlshop\/goods\/index","wanlshop\/goods\/edit","wanlshop\/goods\/del","wanlshop\/goods\/multi","wanlshop\/goods\/recyclebin","wanlshop\/goods\/restore","wanlshop\/goods\/destroy","wanlshop\/goods\/select","wanlshop\/category\/goods","wanlshop\/category\/goods\/index","wanlshop\/category\/add","wanlshop\/category\/edit","wanlshop\/category\/del","wanlshop\/category\/multi","wanlshop\/category\/create","wanlshop\/category\/select","wanlshop\/attribute","wanlshop\/attribute\/index","wanlshop\/attribute\/add","wanlshop\/attribute\/edit","wanlshop\/attribute\/del","wanlshop\/attribute\/multi","wanlshop\/attribute\/recyclebin","wanlshop\/attribute\/restore","wanlshop\/attribute\/destroy","wanlshop\/shopsort","wanlshop\/shopsort\/index","wanlshop\/shopsort\/add","wanlshop\/shopsort\/edit","wanlshop\/shopsort\/del","wanlshop\/shopsort\/multi","wanlshop\/brand","wanlshop\/brand\/index","wanlshop\/brand\/add","wanlshop\/brand\/edit","wanlshop\/brand\/del","wanlshop\/brand\/multi","wanlshop\/brand\/recyclebin","wanlshop\/brand\/restore","wanlshop\/brand\/destroy","wanlshop\/brand\/examine","wanlnav\/order","wanlshop\/order","wanlshop\/order\/index","wanlshop\/order\/detail","wanlshop\/order\/relative","wanlshop\/order\/add","wanlshop\/order\/edit","wanlshop\/order\/del","wanlshop\/order\/multi","wanlshop\/order\/recyclebin","wanlshop\/order\/restore","wanlshop\/order\/destroy","wanlshop\/comment","wanlshop\/comment\/index","wanlshop\/comment\/detail","wanlshop\/comment\/add","wanlshop\/comment\/edit","wanlshop\/comment\/del","wanlshop\/comment\/multi","wanlshop\/comment\/recyclebin","wanlshop\/comment\/restore","wanlshop\/comment\/destroy","wanlnav\/shop","wanlshop\/shop","wanlshop\/shop\/index","wanlshop\/shop\/edit","wanlshop\/shop\/del","wanlshop\/shop\/multi","wanlshop\/shop\/recyclebin","wanlshop\/shop\/restore","wanlshop\/shop\/destroy","wanlshop\/auth","wanlshop\/auth\/index","wanlshop\/auth\/edit","wanlshop\/auth\/del","wanlshop\/auth\/multi","wanlshop\/auth\/recyclebin","wanlshop\/auth\/restore","wanlshop\/auth\/destroy","wanlshop\/auth\/detail","wanlshop\/auth\/agree","wanlshop\/auth\/refuse","wanlshop\/address","wanlshop\/address\/index","wanlshop\/address\/add","wanlshop\/address\/edit","wanlshop\/address\/del","wanlshop\/address\/multi","wanlshop\/address\/recyclebin","wanlshop\/address\/restore","wanlshop\/address\/destroy","wanlshop\/service","wanlshop\/service\/index","wanlshop\/service\/add","wanlshop\/service\/edit","wanlshop\/service\/del","wanlshop\/service\/multi","wanlshop\/service\/recyclebin","wanlshop\/service\/restore","wanlshop\/service\/destroy","wanlshop\/service\/chat","wanlshop\/freight","wanlshop\/freight\/index","wanlshop\/freight\/del","wanlshop\/freight\/multi","wanlshop\/freight\/recyclebin","wanlshop\/freight\/restore","wanlshop\/freight\/destroy","wanlnav\/page","wanlshop\/page","wanlshop\/page\/index","wanlshop\/page\/add","wanlshop\/page\/edit","wanlshop\/page\/del","wanlshop\/page\/multi","wanlshop\/page\/recyclebin","wanlshop\/page\/restore","wanlshop\/page\/destroy","wanlshop\/page\/style","wanlshop\/link","wanlshop\/link\/index","wanlshop\/link\/add","wanlshop\/link\/edit","wanlshop\/link\/del","wanlshop\/link\/multi","wanlshop\/link\/recyclebin","wanlshop\/link\/restore","wanlshop\/link\/destroy","wanlshop\/link\/select","wanlshop\/icon","wanlshop\/icon\/index","wanlshop\/icon\/add","wanlshop\/icon\/edit","wanlshop\/icon\/del","wanlshop\/icon\/multi","wanlshop\/icon\/recyclebin","wanlshop\/icon\/restore","wanlshop\/icon\/destroy","wanlshop\/icon\/select","wanlnav\/kefu","wanlshop\/complaint","wanlshop\/complaint\/index","wanlshop\/complaint\/detail","wanlshop\/complaint\/del","wanlshop\/complaint\/multi","wanlshop\/complaint\/recyclebin","wanlshop\/complaint\/restore","wanlshop\/complaint\/destroy","wanlshop\/feedback","wanlshop\/feedback\/index","wanlshop\/feedback\/detail","wanlshop\/feedback\/del","wanlshop\/feedback\/multi","wanlshop\/feedback\/recyclebin","wanlshop\/feedback\/restore","wanlshop\/feedback\/destroy","wanlshop\/refund","wanlshop\/refund\/index","wanlshop\/refund\/detail","wanlshop\/refund\/agree","wanlshop\/refund\/refuse","wanlshop\/refund\/del","wanlshop\/refund\/multi","wanlnav\/finance","wanlshop\/money","wanlshop\/money\/index","wanlshop\/money\/detail","wanlshop\/withdraw","wanlshop\/withdraw\/index","wanlshop\/withdraw\/detail","wanlshop\/withdraw\/agree","wanlshop\/withdraw\/refuse","wanlshop\/withdraw\/del","wanlshop\/withdraw\/multi","wanlnav\/article","wanlshop\/article","wanlshop\/article\/index","wanlshop\/article\/add","wanlshop\/article\/edit","wanlshop\/article\/del","wanlshop\/article\/multi","wanlshop\/article\/recyclebin","wanlshop\/article\/restore","wanlshop\/article\/destroy","wanlshop\/article\/select","wanlshop\/category\/article","wanlshop\/find","wanlshop\/find\/index","wanlshop\/find\/del","wanlshop\/find\/multi","wanlshop\/find\/recyclebin","wanlshop\/find\/restore","wanlshop\/find\/destroy","wanlnav\/client","wanlshop\/client\/edit","wanlshop\/client\/download","wanlshop\/client\/client","wanlshop\/client\/app","wanlshop\/client\/h5","wanlshop\/client\/mpweixin","wanlshop\/client\/mpbaidu","wanlshop\/client\/mptoutiao","wanlshop\/client\/mpalipay","wanlshop\/client\/mpqq","wanlnav\/config","wanlshop\/client\/config","wanlshop\/advert","wanlshop\/advert\/index","wanlshop\/advert\/add","wanlshop\/advert\/edit","wanlshop\/advert\/del","wanlshop\/advert\/multi","wanlshop\/advert\/recyclebin","wanlshop\/advert\/restore","wanlshop\/advert\/destroy","wanlshop\/advert\/select","wanlshop\/version","wanlshop\/version\/index","wanlshop\/version\/add","wanlshop\/version\/edit","wanlshop\/version\/del","wanlshop\/version\/multi","wanlshop\/search","wanlshop\/search\/index","wanlshop\/search\/add","wanlshop\/search\/edit","wanlshop\/search\/del","wanlshop\/search\/multi","wanlshop\/search\/recyclebin","wanlshop\/search\/restore","wanlshop\/search\/destroy","wanlshop\/qrcode","wanlshop\/qrcode\/index","wanlshop\/qrcode\/add","wanlshop\/qrcode\/edit","wanlshop\/qrcode\/del","wanlshop\/qrcode\/multi","wanlshop\/qrcode\/recyclebin","wanlshop\/qrcode\/restore","wanlshop\/qrcode\/destroy","wanlnav\/chat","wanlshop\/service\/lists","wanlshop\/service\/bind","wanlshop\/service\/history","wanlshop\/service\/read","wanlshop\/service\/send","wanlshop\/service\/close"],"files":["application\/admin\/validate\/wanlshop\/Category.php","application\/admin\/validate\/wanlshop\/Icon.php","application\/admin\/validate\/wanlshop\/Advert.php","application\/admin\/validate\/wanlshop\/Refund.php","application\/admin\/validate\/wanlshop\/Auth.php","application\/admin\/validate\/wanlshop\/Qrcode.php","application\/admin\/validate\/wanlshop\/Link.php","application\/admin\/validate\/wanlshop\/Order.php","application\/admin\/validate\/wanlshop\/Service.php","application\/admin\/validate\/wanlshop\/Address.php","application\/admin\/validate\/wanlshop\/Goods.php","application\/admin\/validate\/wanlshop\/Shopsort.php","application\/admin\/validate\/wanlshop\/Shop.php","application\/admin\/validate\/wanlshop\/Attribute.php","application\/admin\/validate\/wanlshop\/Search.php","application\/admin\/validate\/wanlshop\/Withdraw.php","application\/admin\/validate\/wanlshop\/Find.php","application\/admin\/validate\/wanlshop\/Complaint.php","application\/admin\/validate\/wanlshop\/Version.php","application\/admin\/validate\/wanlshop\/Money.php","application\/admin\/validate\/wanlshop\/Comment.php","application\/admin\/validate\/wanlshop\/Freight.php","application\/admin\/validate\/wanlshop\/Article.php","application\/admin\/validate\/wanlshop\/Coupon.php","application\/admin\/validate\/wanlshop\/Feedback.php","application\/admin\/validate\/wanlshop\/Brand.php","application\/admin\/controller\/wanlshop\/Category.php","application\/admin\/controller\/wanlshop\/Icon.php","application\/admin\/controller\/wanlshop\/Advert.php","application\/admin\/controller\/wanlshop\/Refund.php","application\/admin\/controller\/wanlshop\/Dashboard.php","application\/admin\/controller\/wanlshop\/Auth.php","application\/admin\/controller\/wanlshop\/Qrcode.php","application\/admin\/controller\/wanlshop\/Link.php","application\/admin\/controller\/wanlshop\/Order.php","application\/admin\/controller\/wanlshop\/Service.php","application\/admin\/controller\/wanlshop\/Address.php","application\/admin\/controller\/wanlshop\/Goods.php","application\/admin\/controller\/wanlshop\/Shopsort.php","application\/admin\/controller\/wanlshop\/Shop.php","application\/admin\/controller\/wanlshop\/Attribute.php","application\/admin\/controller\/wanlshop\/Search.php","application\/admin\/controller\/wanlshop\/Withdraw.php","application\/admin\/controller\/wanlshop\/Find.php","application\/admin\/controller\/wanlshop\/Complaint.php","application\/admin\/controller\/wanlshop\/Version.php","application\/admin\/controller\/wanlshop\/Money.php","application\/admin\/controller\/wanlshop\/Comment.php","application\/admin\/controller\/wanlshop\/Freight.php","application\/admin\/controller\/wanlshop\/Page.php","application\/admin\/controller\/wanlshop\/Article.php","application\/admin\/controller\/wanlshop\/Coupon.php","application\/admin\/controller\/wanlshop\/Feedback.php","application\/admin\/controller\/wanlshop\/Brand.php","application\/admin\/controller\/wanlshop\/Client.php","application\/admin\/lang\/zh-cn\/wanlshop\/category.php","application\/admin\/lang\/zh-cn\/wanlshop\/icon.php","application\/admin\/lang\/zh-cn\/wanlshop\/advert.php","application\/admin\/lang\/zh-cn\/wanlshop\/refund.php","application\/admin\/lang\/zh-cn\/wanlshop\/auth.php","application\/admin\/lang\/zh-cn\/wanlshop\/qrcode.php","application\/admin\/lang\/zh-cn\/wanlshop\/link.php","application\/admin\/lang\/zh-cn\/wanlshop\/order.php","application\/admin\/lang\/zh-cn\/wanlshop\/service.php","application\/admin\/lang\/zh-cn\/wanlshop\/address.php","application\/admin\/lang\/zh-cn\/wanlshop\/goods.php","application\/admin\/lang\/zh-cn\/wanlshop\/shopsort.php","application\/admin\/lang\/zh-cn\/wanlshop\/shop.php","application\/admin\/lang\/zh-cn\/wanlshop\/attribute.php","application\/admin\/lang\/zh-cn\/wanlshop\/search.php","application\/admin\/lang\/zh-cn\/wanlshop\/withdraw.php","application\/admin\/lang\/zh-cn\/wanlshop\/find.php","application\/admin\/lang\/zh-cn\/wanlshop\/complaint.php","application\/admin\/lang\/zh-cn\/wanlshop\/version.php","application\/admin\/lang\/zh-cn\/wanlshop\/money.php","application\/admin\/lang\/zh-cn\/wanlshop\/comment.php","application\/admin\/lang\/zh-cn\/wanlshop\/freight.php","application\/admin\/lang\/zh-cn\/wanlshop\/page.php","application\/admin\/lang\/zh-cn\/wanlshop\/article.php","application\/admin\/lang\/zh-cn\/wanlshop\/coupon.php","application\/admin\/lang\/zh-cn\/wanlshop\/feedback.php","application\/admin\/lang\/zh-cn\/wanlshop\/brand.php","application\/admin\/model\/wanlshop\/RefundLog.php","application\/admin\/model\/wanlshop\/Category.php","application\/admin\/model\/wanlshop\/Icon.php","application\/admin\/model\/wanlshop\/Advert.php","application\/admin\/model\/wanlshop\/Refund.php","application\/admin\/model\/wanlshop\/Auth.php","application\/admin\/model\/wanlshop\/Qrcode.php","application\/admin\/model\/wanlshop\/Link.php","application\/admin\/model\/wanlshop\/Order.php","application\/admin\/model\/wanlshop\/Service.php","application\/admin\/model\/wanlshop\/Address.php","application\/admin\/model\/wanlshop\/Goods.php","application\/admin\/model\/wanlshop\/ShopSort.php","application\/admin\/model\/wanlshop\/Shop.php","application\/admin\/model\/wanlshop\/Attribute.php","application\/admin\/model\/wanlshop\/KuaidiSub.php","application\/admin\/model\/wanlshop\/Search.php","application\/admin\/model\/wanlshop\/Withdraw.php","application\/admin\/model\/wanlshop\/Find.php","application\/admin\/model\/wanlshop\/Complaint.php","application\/admin\/model\/wanlshop\/Version.php","application\/admin\/model\/wanlshop\/Money.php","application\/admin\/model\/wanlshop\/Pay.php","application\/admin\/model\/wanlshop\/Comment.php","application\/admin\/model\/wanlshop\/OrderGoods.php","application\/admin\/model\/wanlshop\/Freight.php","application\/admin\/model\/wanlshop\/Page.php","application\/admin\/model\/wanlshop\/CouponReceive.php","application\/admin\/model\/wanlshop\/Chat.php","application\/admin\/model\/wanlshop\/Article.php","application\/admin\/model\/wanlshop\/Coupon.php","application\/admin\/model\/wanlshop\/Feedback.php","application\/admin\/model\/wanlshop\/Brand.php","application\/admin\/view\/wanlshop\/order\/recyclebin.html","application\/admin\/view\/wanlshop\/order\/index.html","application\/admin\/view\/wanlshop\/order\/relative.html","application\/admin\/view\/wanlshop\/order\/detail.html","application\/admin\/view\/wanlshop\/shopsort\/index.html","application\/admin\/view\/wanlshop\/shopsort\/add.html","application\/admin\/view\/wanlshop\/shopsort\/edit.html","application\/admin\/view\/wanlshop\/page\/recyclebin.html","application\/admin\/view\/wanlshop\/page\/index.html","application\/admin\/view\/wanlshop\/page\/add.html","application\/admin\/view\/wanlshop\/page\/edit.html","application\/admin\/view\/wanlshop\/page\/style.html","application\/admin\/view\/wanlshop\/attribute\/recyclebin.html","application\/admin\/view\/wanlshop\/attribute\/index.html","application\/admin\/view\/wanlshop\/attribute\/add.html","application\/admin\/view\/wanlshop\/attribute\/edit.html","application\/admin\/view\/wanlshop\/category\/select.html","application\/admin\/view\/wanlshop\/category\/index.html","application\/admin\/view\/wanlshop\/category\/goods.html","application\/admin\/view\/wanlshop\/category\/add.html","application\/admin\/view\/wanlshop\/category\/article.html","application\/admin\/view\/wanlshop\/category\/create.html","application\/admin\/view\/wanlshop\/category\/edit.html","application\/admin\/view\/wanlshop\/auth\/recyclebin.html","application\/admin\/view\/wanlshop\/auth\/index.html","application\/admin\/view\/wanlshop\/auth\/refuse.html","application\/admin\/view\/wanlshop\/auth\/detail.html","application\/admin\/view\/wanlshop\/comment\/recyclebin.html","application\/admin\/view\/wanlshop\/comment\/index.html","application\/admin\/view\/wanlshop\/comment\/add.html","application\/admin\/view\/wanlshop\/comment\/edit.html","application\/admin\/view\/wanlshop\/comment\/detail.html","application\/admin\/view\/wanlshop\/advert\/select.html","application\/admin\/view\/wanlshop\/advert\/recyclebin.html","application\/admin\/view\/wanlshop\/advert\/index.html","application\/admin\/view\/wanlshop\/advert\/add.html","application\/admin\/view\/wanlshop\/advert\/edit.html","application\/admin\/view\/wanlshop\/brand\/recyclebin.html","application\/admin\/view\/wanlshop\/brand\/index.html","application\/admin\/view\/wanlshop\/brand\/add.html","application\/admin\/view\/wanlshop\/brand\/edit.html","application\/admin\/view\/wanlshop\/shop\/recyclebin.html","application\/admin\/view\/wanlshop\/shop\/index.html","application\/admin\/view\/wanlshop\/shop\/add.html","application\/admin\/view\/wanlshop\/shop\/edit.html","application\/admin\/view\/wanlshop\/freight\/recyclebin.html","application\/admin\/view\/wanlshop\/freight\/index.html","application\/admin\/view\/wanlshop\/freight\/add.html","application\/admin\/view\/wanlshop\/freight\/edit.html","application\/admin\/view\/wanlshop\/coupon\/recyclebin.html","application\/admin\/view\/wanlshop\/coupon\/index.html","application\/admin\/view\/wanlshop\/coupon\/add.html","application\/admin\/view\/wanlshop\/coupon\/edit.html","application\/admin\/view\/wanlshop\/feedback\/recyclebin.html","application\/admin\/view\/wanlshop\/feedback\/index.html","application\/admin\/view\/wanlshop\/feedback\/detail.html","application\/admin\/view\/wanlshop\/qrcode\/recyclebin.html","application\/admin\/view\/wanlshop\/qrcode\/index.html","application\/admin\/view\/wanlshop\/qrcode\/add.html","application\/admin\/view\/wanlshop\/qrcode\/edit.html","application\/admin\/view\/wanlshop\/search\/recyclebin.html","application\/admin\/view\/wanlshop\/search\/index.html","application\/admin\/view\/wanlshop\/search\/add.html","application\/admin\/view\/wanlshop\/search\/edit.html","application\/admin\/view\/wanlshop\/dashboard\/index.html","application\/admin\/view\/wanlshop\/complaint\/recyclebin.html","application\/admin\/view\/wanlshop\/complaint\/index.html","application\/admin\/view\/wanlshop\/complaint\/detail.html","application\/admin\/view\/wanlshop\/link\/select.html","application\/admin\/view\/wanlshop\/link\/recyclebin.html","application\/admin\/view\/wanlshop\/link\/index.html","application\/admin\/view\/wanlshop\/link\/add.html","application\/admin\/view\/wanlshop\/link\/edit.html","application\/admin\/view\/wanlshop\/version\/index.html","application\/admin\/view\/wanlshop\/version\/add.html","application\/admin\/view\/wanlshop\/version\/edit.html","application\/admin\/view\/wanlshop\/money\/index.html","application\/admin\/view\/wanlshop\/money\/detail.html","application\/admin\/view\/wanlshop\/address\/recyclebin.html","application\/admin\/view\/wanlshop\/address\/index.html","application\/admin\/view\/wanlshop\/address\/add.html","application\/admin\/view\/wanlshop\/address\/edit.html","application\/admin\/view\/wanlshop\/find\/recyclebin.html","application\/admin\/view\/wanlshop\/find\/index.html","application\/admin\/view\/wanlshop\/goods\/select.html","application\/admin\/view\/wanlshop\/goods\/recyclebin.html","application\/admin\/view\/wanlshop\/goods\/index.html","application\/admin\/view\/wanlshop\/goods\/add.html","application\/admin\/view\/wanlshop\/goods\/edit.html","application\/admin\/view\/wanlshop\/article\/select.html","application\/admin\/view\/wanlshop\/article\/recyclebin.html","application\/admin\/view\/wanlshop\/article\/index.html","application\/admin\/view\/wanlshop\/article\/add.html","application\/admin\/view\/wanlshop\/article\/edit.html","application\/admin\/view\/wanlshop\/icon\/select.html","application\/admin\/view\/wanlshop\/icon\/recyclebin.html","application\/admin\/view\/wanlshop\/icon\/index.html","application\/admin\/view\/wanlshop\/icon\/add.html","application\/admin\/view\/wanlshop\/icon\/edit.html","application\/admin\/view\/wanlshop\/service\/recyclebin.html","application\/admin\/view\/wanlshop\/service\/index.html","application\/admin\/view\/wanlshop\/service\/add.html","application\/admin\/view\/wanlshop\/service\/edit.html","application\/admin\/view\/wanlshop\/withdraw\/index.html","application\/admin\/view\/wanlshop\/withdraw\/refuse.html","application\/admin\/view\/wanlshop\/withdraw\/detail.html","application\/admin\/view\/wanlshop\/client\/client.html","application\/admin\/view\/wanlshop\/client\/h5.html","application\/admin\/view\/wanlshop\/client\/mpqq.html","application\/admin\/view\/wanlshop\/client\/config.html","application\/admin\/view\/wanlshop\/client\/mpalipay.html","application\/admin\/view\/wanlshop\/client\/mpweixin.html","application\/admin\/view\/wanlshop\/client\/app.html","application\/admin\/view\/wanlshop\/client\/mpbaidu.html","application\/admin\/view\/wanlshop\/client\/mptoutiao.html","application\/admin\/view\/wanlshop\/refund\/index.html","application\/admin\/view\/wanlshop\/refund\/refuse.html","application\/admin\/view\/wanlshop\/refund\/detail.html","application\/common\/controller\/Wanlshop.php","application\/api\/controller\/wanlshop\/Refund.php","application\/api\/controller\/wanlshop\/Sms.php","application\/api\/controller\/wanlshop\/Cart.php","application\/api\/controller\/wanlshop\/Token.php","application\/api\/controller\/wanlshop\/Product.php","application\/api\/controller\/wanlshop\/Order.php","application\/api\/controller\/wanlshop\/Address.php","application\/api\/controller\/wanlshop\/User.php","application\/api\/controller\/wanlshop\/Shop.php","application\/api\/controller\/wanlshop\/Find.php","application\/api\/controller\/wanlshop\/Complaint.php","application\/api\/controller\/wanlshop\/Pay.php","application\/api\/controller\/wanlshop\/Validate.php","application\/api\/controller\/wanlshop\/Page.php","application\/api\/controller\/wanlshop\/Common.php","application\/api\/controller\/wanlshop\/Notice.php","application\/api\/controller\/wanlshop\/Signin.php","application\/api\/controller\/wanlshop\/Chat.php","application\/api\/controller\/wanlshop\/Article.php","application\/api\/controller\/wanlshop\/Coupon.php","application\/api\/controller\/wanlshop\/Feedback.php","application\/api\/controller\/wanlshop\/Callback.php","application\/api\/controller\/wanlshop\/Live.php","application\/api\/lang\/zh-cn\/wanlshop\/refund.php","application\/api\/lang\/zh-cn\/wanlshop\/product.php","application\/api\/lang\/zh-cn\/wanlshop\/user.php","application\/api\/lang\/zh-cn\/wanlshop\/find.php","application\/api\/lang\/zh-cn\/wanlshop\/complaint.php","application\/api\/lang\/zh-cn\/wanlshop\/common.php","application\/api\/lang\/zh-cn\/wanlshop\/notice.php","application\/api\/lang\/zh-cn\/wanlshop\/article.php","application\/api\/lang\/zh-cn\/wanlshop\/coupon.php","application\/api\/lang\/zh-cn\/wanlshop\/feedback.php","application\/api\/model\/wanlshop\/FindFollow.php","application\/api\/model\/wanlshop\/RefundLog.php","application\/api\/model\/wanlshop\/OrderAddress.php","application\/api\/model\/wanlshop\/Record.php","application\/api\/model\/wanlshop\/GoodsSku.php","application\/api\/model\/wanlshop\/Category.php","application\/api\/model\/wanlshop\/Advert.php","application\/api\/model\/wanlshop\/Refund.php","application\/api\/model\/wanlshop\/RechargeOrder.php","application\/api\/model\/wanlshop\/GoodsComment.php","application\/api\/model\/wanlshop\/Auth.php","application\/api\/model\/wanlshop\/Qrcode.php","application\/api\/model\/wanlshop\/Cart.php","application\/api\/model\/wanlshop\/Order.php","application\/api\/model\/wanlshop\/ShopFollow.php","application\/api\/model\/wanlshop\/Address.php","application\/api\/model\/wanlshop\/Goods.php","application\/api\/model\/wanlshop\/ShopSort.php","application\/api\/model\/wanlshop\/ShopFreight.php","application\/api\/model\/wanlshop\/Shop.php","application\/api\/model\/wanlshop\/Attribute.php","application\/api\/model\/wanlshop\/KuaidiSub.php","application\/api\/model\/wanlshop\/Search.php","application\/api\/model\/wanlshop\/ShopFreightData.php","application\/api\/model\/wanlshop\/Withdraw.php","application\/api\/model\/wanlshop\/ShopConfig.php","application\/api\/model\/wanlshop\/Find.php","application\/api\/model\/wanlshop\/Complaint.php","application\/api\/model\/wanlshop\/Version.php","application\/api\/model\/wanlshop\/GoodsFollow.php","application\/api\/model\/wanlshop\/Pay.php","application\/api\/model\/wanlshop\/OrderGoods.php","application\/api\/model\/wanlshop\/Kuaidi.php","application\/api\/model\/wanlshop\/PayAccount.php","application\/api\/model\/wanlshop\/Page.php","application\/api\/model\/wanlshop\/ShopService.php","application\/api\/model\/wanlshop\/GoodsSpu.php","application\/api\/model\/wanlshop\/Admin.php","application\/api\/model\/wanlshop\/Notice.php","application\/api\/model\/wanlshop\/CouponReceive.php","application\/api\/model\/wanlshop\/Chat.php","application\/api\/model\/wanlshop\/Article.php","application\/api\/model\/wanlshop\/Third.php","application\/api\/model\/wanlshop\/Coupon.php","application\/api\/model\/wanlshop\/Feedback.php","application\/api\/model\/wanlshop\/FindComments.php","application\/api\/model\/wanlshop\/Brand.php","application\/api\/model\/wanlshop\/Live.php","application\/index\/controller\/wanlshop\/Icon.php","application\/index\/controller\/wanlshop\/Refund.php","application\/index\/controller\/wanlshop\/Order.php","application\/index\/controller\/wanlshop\/Logistics.php","application\/index\/controller\/wanlshop\/Goods.php","application\/index\/controller\/wanlshop\/Shopsort.php","application\/index\/controller\/wanlshop\/Shop.php","application\/index\/controller\/wanlshop\/Config.php","application\/index\/controller\/wanlshop\/Entry.php","application\/index\/controller\/wanlshop\/Find.php","application\/index\/controller\/wanlshop\/Console.php","application\/index\/controller\/wanlshop\/Comment.php","application\/index\/controller\/wanlshop\/Freight.php","application\/index\/controller\/wanlshop\/Page.php","application\/index\/controller\/wanlshop\/Attachment.php","application\/index\/controller\/wanlshop\/Chat.php","application\/index\/controller\/wanlshop\/Coupon.php","application\/index\/controller\/wanlshop\/Brand.php","application\/index\/lang\/zh-cn\/wanlshop\/icon.php","application\/index\/lang\/zh-cn\/wanlshop\/refund.php","application\/index\/lang\/zh-cn\/wanlshop\/order.php","application\/index\/lang\/zh-cn\/wanlshop\/logistics.php","application\/index\/lang\/zh-cn\/wanlshop\/goods.php","application\/index\/lang\/zh-cn\/wanlshop\/shopsort.php","application\/index\/lang\/zh-cn\/wanlshop\/shop.php","application\/index\/lang\/zh-cn\/wanlshop\/deal.php","application\/index\/lang\/zh-cn\/wanlshop\/config.php","application\/index\/lang\/zh-cn\/wanlshop\/entry.php","application\/index\/lang\/zh-cn\/wanlshop\/find.php","application\/index\/lang\/zh-cn\/wanlshop\/console.php","application\/index\/lang\/zh-cn\/wanlshop\/comment.php","application\/index\/lang\/zh-cn\/wanlshop\/freight.php","application\/index\/lang\/zh-cn\/wanlshop\/page.php","application\/index\/lang\/zh-cn\/wanlshop\/notice.php","application\/index\/lang\/zh-cn\/wanlshop\/attachment.php","application\/index\/lang\/zh-cn\/wanlshop\/coupon.php","application\/index\/lang\/zh-cn\/wanlshop\/brand.php","application\/index\/model\/wanlshop\/RefundLog.php","application\/index\/model\/wanlshop\/OrderAddress.php","application\/index\/model\/wanlshop\/Record.php","application\/index\/model\/wanlshop\/GoodsSku.php","application\/index\/model\/wanlshop\/Category.php","application\/index\/model\/wanlshop\/Icon.php","application\/index\/model\/wanlshop\/Refund.php","application\/index\/model\/wanlshop\/GoodsComment.php","application\/index\/model\/wanlshop\/Auth.php","application\/index\/model\/wanlshop\/Cart.php","application\/index\/model\/wanlshop\/Order.php","application\/index\/model\/wanlshop\/ShopFollow.php","application\/index\/model\/wanlshop\/Address.php","application\/index\/model\/wanlshop\/Goods.php","application\/index\/model\/wanlshop\/ShopSort.php","application\/index\/model\/wanlshop\/ShopFreight.php","application\/index\/model\/wanlshop\/Shop.php","application\/index\/model\/wanlshop\/Attribute.php","application\/index\/model\/wanlshop\/KuaidiSub.php","application\/index\/model\/wanlshop\/ShopFreightData.php","application\/index\/model\/wanlshop\/ShopConfig.php","application\/index\/model\/wanlshop\/Find.php","application\/index\/model\/wanlshop\/GoodsFollow.php","application\/index\/model\/wanlshop\/Pay.php","application\/index\/model\/wanlshop\/OrderGoods.php","application\/index\/model\/wanlshop\/Kuaidi.php","application\/index\/model\/wanlshop\/Page.php","application\/index\/model\/wanlshop\/ShopService.php","application\/index\/model\/wanlshop\/GoodsSpu.php","application\/index\/model\/wanlshop\/Notice.php","application\/index\/model\/wanlshop\/CouponReceive.php","application\/index\/model\/wanlshop\/Chat.php","application\/index\/model\/wanlshop\/Article.php","application\/index\/model\/wanlshop\/Coupon.php","application\/index\/model\/wanlshop\/Brand.php","application\/index\/view\/layout\/wanlshop.html","application\/index\/view\/wanlshop\/order\/index.html","application\/index\/view\/wanlshop\/order\/invoice.html","application\/index\/view\/wanlshop\/order\/relative.html","application\/index\/view\/wanlshop\/order\/delivery.html","application\/index\/view\/wanlshop\/order\/detail.html","application\/index\/view\/wanlshop\/shopsort\/select.html","application\/index\/view\/wanlshop\/shopsort\/index.html","application\/index\/view\/wanlshop\/shopsort\/add.html","application\/index\/view\/wanlshop\/shopsort\/edit.html","application\/index\/view\/wanlshop\/page\/recyclebin.html","application\/index\/view\/wanlshop\/page\/link.html","application\/index\/view\/wanlshop\/page\/index.html","application\/index\/view\/wanlshop\/page\/add.html","application\/index\/view\/wanlshop\/page\/edit.html","application\/index\/view\/wanlshop\/page\/success.html","application\/index\/view\/wanlshop\/config\/index.html","application\/index\/view\/wanlshop\/entry\/index.html","application\/index\/view\/wanlshop\/entry\/stepfour.html","application\/index\/view\/wanlshop\/entry\/stepthree.html","application\/index\/view\/wanlshop\/comment\/select.html","application\/index\/view\/wanlshop\/comment\/index.html","application\/index\/view\/wanlshop\/comment\/edit.html","application\/index\/view\/wanlshop\/comment\/detail.html","application\/index\/view\/wanlshop\/attachment\/select.html","application\/index\/view\/wanlshop\/attachment\/index.html","application\/index\/view\/wanlshop\/brand\/index.html","application\/index\/view\/wanlshop\/brand\/add.html","application\/index\/view\/wanlshop\/brand\/edit.html","application\/index\/view\/wanlshop\/shop\/profile.html","application\/index\/view\/wanlshop\/freight\/recyclebin.html","application\/index\/view\/wanlshop\/freight\/index.html","application\/index\/view\/wanlshop\/freight\/add.html","application\/index\/view\/wanlshop\/freight\/edit.html","application\/index\/view\/wanlshop\/coupon\/recyclebin.html","application\/index\/view\/wanlshop\/coupon\/index.html","application\/index\/view\/wanlshop\/coupon\/add.html","application\/index\/view\/wanlshop\/coupon\/edit.html","application\/index\/view\/wanlshop\/find\/recyclebin.html","application\/index\/view\/wanlshop\/find\/index.html","application\/index\/view\/wanlshop\/find\/add.html","application\/index\/view\/wanlshop\/goods\/select.html","application\/index\/view\/wanlshop\/goods\/recyclebin.html","application\/index\/view\/wanlshop\/goods\/index.html","application\/index\/view\/wanlshop\/goods\/add.html","application\/index\/view\/wanlshop\/goods\/edit.html","application\/index\/view\/wanlshop\/icon\/select.html","application\/index\/view\/wanlshop\/refund\/index.html","application\/index\/view\/wanlshop\/refund\/refuse.html","application\/index\/view\/wanlshop\/refund\/detail.html","application\/index\/view\/wanlshop\/console\/index.html","application\/index\/view\/common\/wanlnav.html","public\/assets\/js\/require-wanlshop.min.js","public\/assets\/js\/frontend\/wanlshop\/order.js","public\/assets\/js\/frontend\/wanlshop\/coupon.js","public\/assets\/js\/frontend\/wanlshop\/logistics.js","public\/assets\/js\/frontend\/wanlshop\/goods.js","public\/assets\/js\/frontend\/wanlshop\/freight.js","public\/assets\/js\/frontend\/wanlshop\/page.js","public\/assets\/js\/frontend\/wanlshop\/console.js","public\/assets\/js\/frontend\/wanlshop\/icon.js","public\/assets\/js\/frontend\/wanlshop\/config.js","public\/assets\/js\/frontend\/wanlshop\/comment.js","public\/assets\/js\/frontend\/wanlshop\/deal.js","public\/assets\/js\/frontend\/wanlshop\/refund.js","public\/assets\/js\/frontend\/wanlshop\/shop.js","public\/assets\/js\/frontend\/wanlshop\/brand.js","public\/assets\/js\/frontend\/wanlshop\/attachment.js","public\/assets\/js\/frontend\/wanlshop\/operate.js","public\/assets\/js\/frontend\/wanlshop\/find.js","public\/assets\/js\/frontend\/wanlshop\/entry.js","public\/assets\/js\/frontend\/wanlshop\/shopsort.js","public\/assets\/js\/backend\/wanlshop\/order.js","public\/assets\/js\/backend\/wanlshop\/coupon.js","public\/assets\/js\/backend\/wanlshop\/client.js","public\/assets\/js\/backend\/wanlshop\/goods.js","public\/assets\/js\/backend\/wanlshop\/feedback.js","public\/assets\/js\/backend\/wanlshop\/money.js","public\/assets\/js\/backend\/wanlshop\/qrcode.js","public\/assets\/js\/backend\/wanlshop\/freight.js","public\/assets\/js\/backend\/wanlshop\/page.js","public\/assets\/js\/backend\/wanlshop\/service.js","public\/assets\/js\/backend\/wanlshop\/auth.js","public\/assets\/js\/backend\/wanlshop\/address.js","public\/assets\/js\/backend\/wanlshop\/icon.js","public\/assets\/js\/backend\/wanlshop\/link.js","public\/assets\/js\/backend\/wanlshop\/version.js","public\/assets\/js\/backend\/wanlshop\/withdraw.js","public\/assets\/js\/backend\/wanlshop\/comment.js","public\/assets\/js\/backend\/wanlshop\/attribute.js","public\/assets\/js\/backend\/wanlshop\/complaint.js","public\/assets\/js\/backend\/wanlshop\/article.js","public\/assets\/js\/backend\/wanlshop\/category.js","public\/assets\/js\/backend\/wanlshop\/refund.js","public\/assets\/js\/backend\/wanlshop\/shop.js","public\/assets\/js\/backend\/wanlshop\/brand.js","public\/assets\/js\/backend\/wanlshop\/dashboard.js","public\/assets\/js\/backend\/wanlshop\/advert.js","public\/assets\/js\/backend\/wanlshop\/search.js","public\/assets\/js\/backend\/wanlshop\/find.js","public\/assets\/js\/backend\/wanlshop\/shopsort.js","public\/assets\/addons\/wanlshop\/css\/appUI.css","public\/assets\/addons\/wanlshop\/css\/page.min.css","public\/assets\/addons\/wanlshop\/css\/page.css","public\/assets\/addons\/wanlshop\/css\/chat.css","public\/assets\/addons\/wanlshop\/css\/entry.css","public\/assets\/addons\/wanlshop\/css\/sinaEmotion.css","public\/assets\/addons\/wanlshop\/css\/iconfont.css","public\/assets\/addons\/wanlshop\/js\/jquery.jqprint-0.3.min.js","public\/assets\/addons\/wanlshop\/js\/jquery.migrate-1.2.1.min.js","public\/assets\/addons\/wanlshop\/js\/vuedraggable.umd.min.js","public\/assets\/addons\/wanlshop\/js\/jquery.colorpicker.min.js","public\/assets\/addons\/wanlshop\/js\/jquery.autocomplete.js","public\/assets\/addons\/wanlshop\/js\/Sortable.min.js","public\/assets\/addons\/wanlshop\/js\/vue.min.js","public\/assets\/addons\/wanlshop\/img\/order\/img_order_payment3x.png","public\/assets\/addons\/wanlshop\/img\/order\/img_order_signed3x.png","public\/assets\/addons\/wanlshop\/img\/order\/img_detail_bg.png","public\/assets\/addons\/wanlshop\/img\/order\/img_order_send3x.png","public\/assets\/addons\/wanlshop\/img\/order\/img_order_received3x.png","public\/assets\/addons\/wanlshop\/img\/order\/img_order_closed3x.png","public\/assets\/addons\/wanlshop\/img\/page\/article-default.png","public\/assets\/addons\/wanlshop\/img\/page\/category_style_1.jpg","public\/assets\/addons\/wanlshop\/img\/page\/category_style_3.jpg","public\/assets\/addons\/wanlshop\/img\/page\/category_style_2.jpg","public\/assets\/addons\/wanlshop\/img\/page\/category_style_4.jpg","public\/assets\/addons\/wanlshop\/img\/page\/image-default.png","public\/assets\/addons\/wanlshop\/img\/page\/advert-banner.png","public\/assets\/addons\/wanlshop\/img\/page\/video-default.png","public\/assets\/addons\/wanlshop\/img\/page\/iPhone.png","public\/assets\/addons\/wanlshop\/img\/page\/banner-default.png","public\/assets\/addons\/wanlshop\/img\/page\/advert-image.png","public\/assets\/addons\/wanlshop\/img\/page\/bg.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_niuziku3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_shengxian3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_baihuo3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_shipin3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_maonedayi3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_shangzhuang3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_nvku3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_weiyi3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_Txu3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_xiexue3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_xuefangshan3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_banshenqun3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_nvzhuang3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_yurongfu3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_chenshan3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_nanzhuang3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_picao3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_shishangtaozhuang3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_taozhuang3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_mianyimianfu3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_duanwaitao3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_piyi3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_xiuxianku3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_xiangbao3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_majia3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_dadiku3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_nvqun3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_jiadian3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_qipao3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_muying3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_xizhuangku3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_maoyi3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_fengyi3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_meizhuangxihu3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_shoujishuma3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_lianyiqun3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_waitao3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_xizhuang3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_yundongtaozhuang3x.jpg","public\/assets\/addons\/wanlshop\/img\/category\/category_lingshi3x.jpg","public\/assets\/addons\/wanlshop\/img\/show\/start-up-2.png","public\/assets\/addons\/wanlshop\/img\/show\/start-up-3.png","public\/assets\/addons\/wanlshop\/img\/show\/start-up-1.png","public\/assets\/addons\/wanlshop\/img\/show\/open_img.jpg","public\/assets\/addons\/wanlshop\/img\/show\/page_swiper.png","public\/assets\/addons\/wanlshop\/img\/show\/type.txt","public\/assets\/addons\/wanlshop\/img\/show\/page_img.png","public\/assets\/addons\/wanlshop\/img\/show\/category_img.jpg","public\/assets\/addons\/wanlshop\/img\/default\/notice_default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/collect_default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/follow_default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/ticket_default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/address_default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/network_default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/cart_default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/find_default3x.png","public\/assets\/addons\/wanlshop\/img\/default\/aricle_default3x.png","public\/assets\/addons\/wanlshop\/img\/user\/icon_card_bag.png","public\/assets\/addons\/wanlshop\/img\/user\/user_bg.png","public\/assets\/addons\/wanlshop\/img\/user\/ico-arrow-up.png","public\/assets\/addons\/wanlshop\/img\/user\/top_bg.png","public\/assets\/addons\/wanlshop\/img\/user\/icon_super_vip.png","public\/assets\/addons\/wanlshop\/img\/coupon\/img_coupon_failure_3x.png","public\/assets\/addons\/wanlshop\/img\/coupon\/img_couponcentre_received_3x.png","public\/assets\/addons\/wanlshop\/img\/coupon\/bg_coupon_3x.png","public\/assets\/addons\/wanlshop\/img\/coupon\/img_coupon_beused_3x.png","public\/assets\/addons\/wanlshop\/img\/qrcode\/qrcode.png","public\/assets\/addons\/wanlshop\/img\/qrcode\/poster.jpg","public\/assets\/addons\/wanlshop\/img\/qrcode\/logo.png","public\/assets\/addons\/wanlshop\/img\/qrcode\/cover.jpg","public\/assets\/addons\/wanlshop\/img\/common\/img_empty3x.png","public\/assets\/addons\/wanlshop\/img\/common\/update.png","public\/assets\/addons\/wanlshop\/img\/common\/img_down3x.png","public\/assets\/addons\/wanlshop\/img\/common\/mine_def_touxiang_3x.png","public\/assets\/addons\/wanlshop\/img\/common\/img_delete3x.png","public\/assets\/addons\/wanlshop\/img\/common\/cup.png","public\/assets\/addons\/wanlshop\/img\/common\/logo.png","public\/assets\/addons\/wanlshop\/img\/common\/guess_you_like_it.png","public\/assets\/addons\/wanlshop\/img\/common\/wanlian4@2x.png","public\/assets\/addons\/wanlshop\/img\/common\/calendar.png","public\/assets\/addons\/wanlshop\/img\/common\/erweima.png","public\/assets\/addons\/wanlshop\/img\/common\/img_gou3x.png","public\/assets\/addons\/wanlshop\/img\/common\/service_3x.png","public\/assets\/addons\/wanlshop\/img\/common\/chat_mini.png","public\/assets\/addons\/wanlshop\/img\/common\/img_default3x.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/quanfengkuaidi.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/youzheng.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/shunfeng.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/yuantong.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/debang.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/JD.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/zhaijisong.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/ewe.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/shentong.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/huitongkuaidi.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/yunda.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/EMS.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/yousu.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/tiantian.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/spider_search_v4.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/zhongtong.png","public\/assets\/addons\/wanlshop\/img\/kuaidi\/suning.png","public\/assets\/addons\/wanlshop\/img\/find\/top_bg.png","public\/assets\/addons\/wanlshop\/voice\/notice.mp3","public\/assets\/addons\/wanlshop\/voice\/open.mp3","public\/assets\/addons\/wanlshop\/voice\/chat.mp3","public\/assets\/addons\/wanlshop\/voice\/service.mp3","public\/assets\/addons\/wanlshop\/voice\/order.mp3"]} |
addons/wanlshop/Wanlshop.php
0 → 100644
1 | +<?php | ||
2 | + | ||
3 | +namespace addons\wanlshop; | ||
4 | + | ||
5 | +use app\common\library\Menu; | ||
6 | +use think\Addons; | ||
7 | +use think\Request; | ||
8 | +use think\Console; | ||
9 | +use think\Loader; | ||
10 | + | ||
11 | +/** | ||
12 | + * 插件 | ||
13 | + */ | ||
14 | +class Wanlshop extends Addons | ||
15 | +{ | ||
16 | + | ||
17 | + /** | ||
18 | + * 插件安装方法 | ||
19 | + * @return bool | ||
20 | + */ | ||
21 | + public function install() | ||
22 | + { | ||
23 | + $menu = include ADDON_PATH . 'wanlshop' . DS . 'data' . DS . 'menu.php'; | ||
24 | + Menu::create($menu); | ||
25 | + return true; | ||
26 | + } | ||
27 | + | ||
28 | + /** | ||
29 | + * 插件卸载方法 | ||
30 | + * @return bool | ||
31 | + */ | ||
32 | + public function uninstall() | ||
33 | + { | ||
34 | + Menu::delete("wanlshop"); | ||
35 | + return true; | ||
36 | + } | ||
37 | + | ||
38 | + /** | ||
39 | + * 插件启用方法 | ||
40 | + * @return bool | ||
41 | + */ | ||
42 | + public function enable() | ||
43 | + { | ||
44 | + Menu::enable("wanlshop"); | ||
45 | + return true; | ||
46 | + } | ||
47 | + | ||
48 | + /** | ||
49 | + * 插件禁用方法 | ||
50 | + * @return bool | ||
51 | + */ | ||
52 | + public function disable() | ||
53 | + { | ||
54 | + Menu::disable("wanlshop"); | ||
55 | + return true; | ||
56 | + } | ||
57 | + | ||
58 | + /** | ||
59 | + * 插件升级方法 | ||
60 | + */ | ||
61 | + public function upgrade() | ||
62 | + { | ||
63 | + $menu = include ADDON_PATH . 'wanlshop' . DS . 'data' . DS . 'menu.php'; | ||
64 | + Menu::upgrade('wanlshop', $menu); | ||
65 | + } | ||
66 | + | ||
67 | + | ||
68 | + /** | ||
69 | + * 添加命令行扩展 | ||
70 | + */ | ||
71 | + public function appInit() | ||
72 | + { | ||
73 | + Console::addDefaultCommands([ | ||
74 | + 'addons\\wanlshop\\library\\command\\Chat', | ||
75 | + 'addons\\wanlshop\\library\\command\\Order', | ||
76 | + ]); | ||
77 | + // 添加第三方支付 | ||
78 | + Loader::addNamespace('WanlPay\Yansongda', ADDON_PATH . 'wanlshop' . DS . 'library' . DS . 'WanlPay' . DS . 'Yansongda' . DS); | ||
79 | + Loader::addNamespace('WanlPay\Supports', ADDON_PATH . 'wanlshop' . DS . 'library' . DS . 'WanlPay' . DS . 'Supports' . DS); | ||
80 | + } | ||
81 | + | ||
82 | + /** | ||
83 | + * 会员中心边栏后 | ||
84 | + * @return mixed | ||
85 | + * @throws \Exception | ||
86 | + */ | ||
87 | + public function userSidenavAfter() | ||
88 | + { | ||
89 | + $request = Request::instance(); | ||
90 | + $actionname = strtolower($request->action()); | ||
91 | + $data = [ | ||
92 | + 'actionname' => $actionname | ||
93 | + ]; | ||
94 | + return $this->fetch('view/hook/user_sidenav_after', $data); | ||
95 | + } | ||
96 | +} |
addons/wanlshop/bootstrap.js
0 → 100644
1 | +require.config({ | ||
2 | + paths: { | ||
3 | + 'jquery-colorpicker': '../addons/wanlshop/js/jquery.colorpicker.min', | ||
4 | + 'jquery-autocomplete': '../addons/wanlshop/js/jquery.autocomplete', | ||
5 | + 'jquery-jqprint': '../addons/wanlshop/js/jquery.jqprint-0.3.min', | ||
6 | + 'jquery-migrate': '../addons/wanlshop/js/jquery.migrate-1.2.1.min', | ||
7 | + 'vue': '../addons/wanlshop/js/vue.min', | ||
8 | + 'chat': '../addons/wanlshop/js/vue.min', | ||
9 | + 'sortablejs': '../addons/wanlshop/js/Sortable.min', | ||
10 | + 'vuedraggable': '../addons/wanlshop/js/vuedraggable.umd.min', | ||
11 | + }, | ||
12 | + shim: { | ||
13 | + 'jquery-colorpicker': { | ||
14 | + deps: ['jquery'], | ||
15 | + exports: '$.fn.extend' | ||
16 | + }, | ||
17 | + 'jquery-autocomplete': { | ||
18 | + deps: ['jquery'], | ||
19 | + exports: '$.fn.extend' | ||
20 | + }, | ||
21 | + 'jquery-jqprint': { | ||
22 | + deps: ['jquery'], | ||
23 | + exports: '$.fn.extend' | ||
24 | + }, | ||
25 | + 'jquery-migrate': { | ||
26 | + deps: ['jquery'], | ||
27 | + exports: '$.fn.extend' | ||
28 | + }, | ||
29 | + 'vue': { | ||
30 | + deps: ['jquery'], | ||
31 | + exports: '$.fn.extend' | ||
32 | + }, | ||
33 | + 'chat': { | ||
34 | + deps: ['css!../addons/wanlshop/css/chat.css'], | ||
35 | + exports: '$.fn.extend' | ||
36 | + }, | ||
37 | + 'sortablejs': { | ||
38 | + deps: ['jquery'], | ||
39 | + exports: '$.fn.extend' | ||
40 | + }, | ||
41 | + 'vuedraggable': { | ||
42 | + deps: ['jquery'], | ||
43 | + exports: '$.fn.extend' | ||
44 | + } | ||
45 | + } | ||
46 | +}); | ||
47 | +// 后台全局添加 IM即时通讯 | ||
48 | +if (Config.modulename == 'admin' && Config.controllername == 'index' && Config.actionname == 'index') { | ||
49 | + require(['chat'], function(Vue){ | ||
50 | + var html = `<!-- 加载WanlChat 即时通讯 --> <div class="wanl-chat-service" id="wanl-chat" v-cloak> <!-- 消息提示 --> <div class="wanl-chat-mini-msg" v-if="isMsg"><span>{{msgData.name}}:</span> {{msgData.text}}</div> <!-- 全局按钮 --> <div class="wanl-chat-mini" @click="onList" v-if="isList"> <div class="label label-success" v-if="count > 0" v-cloak>{{count}}</div> <div class="water0" :style="{backgroundImage: 'url('+(isMsg ? msgData.avatar : '/assets/addons/wanlshop/img/common/chat_mini.png')+')'}"></div> <div class="water1"></div> <div class="water2"></div> <div class="water3"></div> </div> <!-- IM 右侧列表 --> <div class="wanl-chat-list" v-else> <div class="head"> <div class="title"> <div> <h3>客服:{{service.nickname}}</h3><span v-if="shopOnline == 1"><i class="fa fa-circle text-success margin-r-5"></i> H5在线</span><span v-else><i class="fa fa-circle text-gray margin-r-5"></i> IM连接异常</span> </div> <div style="font-size: 14px;"><span class="active" @click="onAudio" v-if="isAudio"><i class="fa fa-volume-up text-red"></i></span><span v-else @click="onAudio"><i class="fa fa-volume-off link-black"></i></span><span style="margin-left: 10px; font-size: 16px;" @click="onList"><i class="fa fa-close link-black"></i></span></div> </div> </div> <div class="list"> <div class="empty" v-if="chatlist.length == 0"> <div class="main"><img :src="cdnurl('/assets/addons/wanlshop/img/default/find_default3x.png')"> <p>没有找到任何联系人</p> </div> </div> <div class="item" v-for="(item, index) in chatlist" :key="index" @click="otChat(index, 'main')"> <div class="portrait"><img :src="cdnurl(item.avatar)"><span class="online"><i class="fa fa-circle text-success" v-if="item.isOnline == 1"></i><i class="fa fa-circle text-gray" v-else></i></span></div> <div class="main"> <div class="user"><span class="username text-cut">{{item.nickname}}</span><span class="time">{{timefriendly(item.createtime)}}</span></div> <div class="info text-cut"><span v-if="item.count > 0">[未读{{item.count}}条]</span><span v-html="item.content"></span></div> </div> </div> </div> </div><!-- 聊天窗口 --> <div class="wanl-chat" :class="{full: onFull}" :style="{left:screenWidth+'px', top:screenHeight+'px',}" ref="moveBtn" v-show="chatWindow" v-cloak> <div class="list"> <ul> <li v-for="(item, index) in wanlchat" :key="index" :class="{checked: chatSelect == index}" @click="onChat(index)"> <div class="portrait"><img :src="cdnurl(item.avatar)"><span class="badge bg-red" v-if="item.count > 0">{{item.count}}</span></div> <div class="user-msg"> <p>{{item.nickname}}</p> <div class="text-cut" v-html="item.content"></div> </div> <div class="list-close" @click.stop="delChat(index)"> <div class="hover"><span class="fa fa-times-circle"></span></div> </div> </li> </ul> </div> <div class="main" v-if="chatSelect != null"> <div class="msgHead" @mousedown="down" @touchstart="down" @mousemove="move" @touchmove="move" @mouseup="end" @touchend="end" @touchcancel="end"><img :src="cdnurl(wanlchat[chatSelect].avatar)"> <div><span class="name">{{wanlchat[chatSelect].nickname}}</span> <p v-if="wanlchat[chatSelect].isOnline == 1"><i class="fa fa-circle text-success"></i> 在线</p> <p v-else><i class="fa fa-circle text-gray"></i> 离线</p> </div><!-- 窗口操作 --><span class="layui-layer-setwin"> <block v-if="onFull"><a class="layui-layer-ico layui-layer-max layui-layer-maxmin" href="javascript:;" @click="full"></a></block> <block v-else><a class="layui-layer-min" href="javascript:;" @click="miniChat"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;" @click="full"></a></block><a class="layui-layer-ico layui-layer-close layui-layer-close1" href="javascript:;" @click="closeChat"></a> </span> </div> <div class="msgList" id="talk"> <ul> <li :class="{my: item.form.id == service.id}" v-for="(item, index) in chatContent" :key="index"> <div class="chat-user"><img :src="cdnurl(item.form.id == service.id ? service.avatar : item.form.avatar)"><cite><span>{{timefriendly(item.createtime)}}</span></cite></div><!-- 文字消息 --> <div class="chat-text" v-if="item.message.type == 'text'" v-html="item.message.content.text"></div><!-- 语音消息 --> <div class="chat-voice" v-if="item.message.type == 'voice'" @click="playVoice(item.message.content.url)"><span :style="{marginRight: item.message.content.length * 8 +'px'}"></span>{{item.message.content.length}} ”</div><!-- 图片消息 --> <div class="chat-img" v-if="item.message.type == 'img'"><a :href="item.message.content.url" target="_blank"><img :src="cdnurl(item.message.content.url)" data-tips-image></a></div> </li> </ul> </div> <form class="inputBox" id="form"> <div class="tool"><span class="fa fa-smile-o" @click="toggleBox"></span><label for="upImage" class="fa fa-picture-o upImage"></label><input type="file" id="upImage" @change="chatImage" style="display:none"></div> <div class="input"><textarea id="content" placeholder="请输入消息" v-model="textarea" @keyup.ctrl.enter="submit" autofocus></textarea></div> <div class="operation"><button type="button" class="btn btn-danger" @click="submit">发送 Ctrl+Enter</button></div> </form> <div class="box-container" v-if="showBox" @click.self="toggleBox"> </div> <div class="wanl-emoji" v-if="showBox"> <div class="title"> <div> {{TabCur}} </div> </div> <div class="subject" v-for="(emoji, groups) in emojiList.groups" :key="groups" v-if="TabCur == groups"> <div class="item"><span v-for="(item, index) in emoji" :key="index" @click="addEmoji(item.value)"><img :src="item.url"></span></div> </div> <div class="emojiNav"> <div :class="item == TabCur ? 'emojibg' : ''" class="item" v-for="(item, index) in emojiList.categories" :key="index" :data-id="item" @click="tabSelect"><img :src="emojiList.groups[item][0].url"></div> </div> </div> </div> </div> </div>`; | ||
51 | + $("body").append(html); | ||
52 | + var wanlchat = new Vue({ | ||
53 | + el:"#wanl-chat", | ||
54 | + data:{ | ||
55 | + count: 0, // 未读总数 | ||
56 | + chatlist: [], // 主列表 | ||
57 | + chatWindow: false, // 是否开启聊天窗口 | ||
58 | + isList: true, // 展示列表或按钮 -- | ||
59 | + isMsg: false, // 是否开启消息弹窗 -- | ||
60 | + msgData: { | ||
61 | + avatar: '', | ||
62 | + name: '', | ||
63 | + text: '' | ||
64 | + }, // 信息内容 -- | ||
65 | + chatMiniWindow: false, //最小化窗口 | ||
66 | + wanlchat: [], // 聊天窗口列表 | ||
67 | + chatSelect: null, // 选中的记录 | ||
68 | + chatContent: [], //消息内容&历史记录 | ||
69 | + textarea: '', // 编辑框 | ||
70 | + shopOnline: 1, // 商家在线状态 | ||
71 | + isAudio: true, // 消息提示 | ||
72 | + service: { | ||
73 | + nickname: 'IM加载中..' | ||
74 | + }, | ||
75 | + // 表情 | ||
76 | + emojiList: [], | ||
77 | + TabCur: '默认', | ||
78 | + showBox: false, | ||
79 | + // 操作窗口 | ||
80 | + screenWidth: (document.body.clientWidth - 800) / 2, | ||
81 | + screenHeight: (document.body.clientHeight - 600) / 2, | ||
82 | + flags: false, | ||
83 | + position: { | ||
84 | + x: 0, | ||
85 | + y: 0 | ||
86 | + }, | ||
87 | + nx: '', | ||
88 | + ny: '', | ||
89 | + dx: '', | ||
90 | + dy: '', | ||
91 | + xPum: '', | ||
92 | + yPum: '', | ||
93 | + isShow: false, | ||
94 | + moveBtn: {}, | ||
95 | + onFull: false | ||
96 | + }, | ||
97 | + mounted() { | ||
98 | + this.moveBtn = this.$refs.moveBtn; | ||
99 | + // 获取列表 | ||
100 | + this.loadData(); | ||
101 | + // 表情数据 | ||
102 | + this.emojiList = this.emojiData(); | ||
103 | + }, | ||
104 | + methods: { | ||
105 | + loadData() { | ||
106 | + let app = this; | ||
107 | + Fast.api.ajax({ | ||
108 | + url: "wanlshop/service/lists.html", | ||
109 | + }, (data, ret) => { | ||
110 | + app.chatlist = data.chat; | ||
111 | + app.service = data.service; | ||
112 | + // 统计总数 | ||
113 | + app.chatCount(); | ||
114 | + // 开启即时通讯 | ||
115 | + // 连接IM服务器 | ||
116 | + const ws = new WebSocket(data.service.socketurl); | ||
117 | + let sendTimmer = null; | ||
118 | + let sendCount = 0; | ||
119 | + ws.onopen = ()=> { | ||
120 | + console.log('IM 启动成功'); | ||
121 | + // sendCount++; | ||
122 | + // ws.send('Hello Server!' + sendCount); | ||
123 | + // sendTimmer = setInterval(function () { | ||
124 | + // sendCount++; | ||
125 | + // ws.send('Hi Server!' + sendCount); | ||
126 | + // if (sendCount === 10) { | ||
127 | + // ws.close(); | ||
128 | + // } | ||
129 | + // }, 2000); | ||
130 | + }; | ||
131 | + ws.onmessage = (msg)=> { | ||
132 | + let data = JSON.parse(msg.data); | ||
133 | + if (data.type == 'init') { | ||
134 | + console.log('@message_client_id:' + data.client_id); | ||
135 | + Fast.api.ajax({ | ||
136 | + url: "wanlshop/service/bind.html", | ||
137 | + data: {client_id: data.client_id} | ||
138 | + }, function(data, ret){ | ||
139 | + app.shopOnline = data; | ||
140 | + return false; | ||
141 | + }, function(data, ret){ | ||
142 | + return false; | ||
143 | + }); | ||
144 | + }else if (data.type == 'ping') { | ||
145 | + ws.send('{"type":"pong"}'); | ||
146 | + }else if (data.type == 'service'){ | ||
147 | + // 更新类型 | ||
148 | + let updateType = null; | ||
149 | + //判断是否开启窗口 | ||
150 | + if(this.chatWindow){ | ||
151 | + // 判断是否当前用户 | ||
152 | + if (data.form.id == this.wanlchat[this.chatSelect].user_id) { | ||
153 | + // 更新当前页面消息 | ||
154 | + this.receiveChat(data); | ||
155 | + updateType = 'openinto'; | ||
156 | + }else{ | ||
157 | + updateType = 'open'; | ||
158 | + } | ||
159 | + }else{ | ||
160 | + updateType = 'main'; | ||
161 | + } | ||
162 | + // 全局消息提示 | ||
163 | + this.onMsg(data, updateType); | ||
164 | + // 更新主列表和 wanlchat列表,如果存在+1,如果不存在追加一个列表 | ||
165 | + this.updateChatList(data, updateType); | ||
166 | + } | ||
167 | + }; | ||
168 | + ws.onclose = ()=> { | ||
169 | + console.log('IM 已关闭'); | ||
170 | + // sendTimmer && clearInterval(sendTimmer); | ||
171 | + }; | ||
172 | + ws.onerror = ()=> { | ||
173 | + console.log('IM 错误'); | ||
174 | + }; | ||
175 | + return false; | ||
176 | + }); | ||
177 | + }, | ||
178 | + // 发送到服务器 | ||
179 | + send(data) { | ||
180 | + Fast.api.ajax({ | ||
181 | + url: "wanlshop/service/send.html", | ||
182 | + data: data | ||
183 | + }, function(data, ret){ | ||
184 | + return false; | ||
185 | + }); | ||
186 | + }, | ||
187 | + onList(){ | ||
188 | + // 如果窗口最小化 | ||
189 | + if(this.chatMiniWindow){ | ||
190 | + this.chatMiniWindow = false; | ||
191 | + this.chatWindow = true; | ||
192 | + this.isList = !this.isList; | ||
193 | + }else{ | ||
194 | + this.isList = !this.isList; | ||
195 | + } | ||
196 | + }, | ||
197 | + // 打开主列表中 | ||
198 | + otChat(data, type){ | ||
199 | + let chat = type == 'main' ? this.chatlist[data] : { | ||
200 | + user_id: data.form.id, | ||
201 | + nickname: data.form.name, | ||
202 | + avatar: data.form.avatar, | ||
203 | + isOnline: 1, | ||
204 | + count: 0, | ||
205 | + content: this.typeMsg(data) | ||
206 | + }; | ||
207 | + // 打开子窗口 | ||
208 | + this.onChat(this.addWanlChatList(chat)); | ||
209 | + // 判断是否最小化,如果最小化关闭,打开窗口 | ||
210 | + if(this.chatMiniWindow){ | ||
211 | + this.chatMiniWindow = false; | ||
212 | + this.chatWindow = true; | ||
213 | + }else{ | ||
214 | + this.chatWindow = true; | ||
215 | + } | ||
216 | + this.isList = !this.isList; | ||
217 | + }, | ||
218 | + // 子窗口点击 | ||
219 | + onChat(index){ | ||
220 | + this.chatSelect = index; | ||
221 | + let chat = this.wanlchat[index]; | ||
222 | + let app = this; | ||
223 | + Fast.api.ajax({ | ||
224 | + url: "wanlshop/service/history.html", | ||
225 | + data: { | ||
226 | + id: chat.user_id | ||
227 | + } | ||
228 | + }, function(data, ret) { | ||
229 | + // 替换表情 | ||
230 | + data.chat.forEach((item) => { | ||
231 | + if (item.message.type == 'text') { | ||
232 | + item.message.content.text = app.replaceEmoji(item.message.content.text); | ||
233 | + } | ||
234 | + }) | ||
235 | + // 写入记录 | ||
236 | + app.chatContent = data.chat; | ||
237 | + // 更新在线状态 | ||
238 | + chat.isOnline = data.isOnline; | ||
239 | + // 更新数据 | ||
240 | + app.count -= chat.count; | ||
241 | + chat.count = 0; | ||
242 | + // 更新主列表 | ||
243 | + app.chatlist[app.addChatList(chat, 'fun')].count = 0; | ||
244 | + // 滚动最底部 | ||
245 | + app.latest(); | ||
246 | + return false; | ||
247 | + }); | ||
248 | + }, | ||
249 | + // 更新主列表和 wanlchat列表,如果存在+1,如果不存在追加一个列表 | ||
250 | + updateChatList(chat, type){ | ||
251 | + let content = this.typeMsg(chat); | ||
252 | + if(type == 'send'){ | ||
253 | + this.wanlchat[this.chatSelect].content = content; | ||
254 | + this.chatlist.forEach((item, index) => { | ||
255 | + if(item.user_id == chat.to_id){ | ||
256 | + item.content = content; | ||
257 | + } | ||
258 | + }); | ||
259 | + }else{ | ||
260 | + let chatlist = this.chatlist[this.addChatList(chat, 'msg')]; | ||
261 | + let wanlchat = this.wanlchat[this.addWanlChatList(chat, 'msg')]; | ||
262 | + // 更新在线状态 | ||
263 | + chatlist.isOnline = 1; | ||
264 | + wanlchat.isOnline = 1; | ||
265 | + // 已开窗口,确定此消息,更改已读 | ||
266 | + if(type == 'openinto'){ | ||
267 | + // 更新主列表 | ||
268 | + chatlist.content = content; | ||
269 | + // 更新子列表 | ||
270 | + wanlchat.content = content; | ||
271 | + // 设置已读 | ||
272 | + Fast.api.ajax({ | ||
273 | + url: "wanlshop/service/read.html", | ||
274 | + data: { | ||
275 | + id: wanlchat.user_id | ||
276 | + } | ||
277 | + }, function(data, ret) { | ||
278 | + return false; | ||
279 | + }); | ||
280 | + }else if(type == 'open'){ | ||
281 | + // 更新主列表 | ||
282 | + chatlist.content = content; | ||
283 | + chatlist.count += 1; | ||
284 | + this.count += 1; | ||
285 | + // 更新子列表 | ||
286 | + wanlchat.content = content; | ||
287 | + wanlchat.count += 1; | ||
288 | + }else if(type == 'main'){ | ||
289 | + // 更新主列表 | ||
290 | + chatlist.content = content; | ||
291 | + chatlist.count += 1; | ||
292 | + this.count += 1; | ||
293 | + } | ||
294 | + } | ||
295 | + }, | ||
296 | + // 判断主列表是否存在,不存在新增 | ||
297 | + addChatList(chat, type){ | ||
298 | + let data = type == 'msg' ? { | ||
299 | + user_id: chat.form.id, | ||
300 | + nickname: chat.form.name, | ||
301 | + avatar: chat.form.avatar, | ||
302 | + content: this.typeMsg(chat), | ||
303 | + isOnline: 1, | ||
304 | + createtime: chat.createtime | ||
305 | + }:{ | ||
306 | + user_id: chat.user_id, | ||
307 | + nickname: chat.nickname, | ||
308 | + avatar: chat.avatar, | ||
309 | + content: "没有任何消息", | ||
310 | + isOnline: chat.isOnline, | ||
311 | + createtime: (Date.parse( new Date() ).toString()).substr(0,10) | ||
312 | + }; | ||
313 | + let chatlist = this.chatlist; | ||
314 | + let key = null; | ||
315 | + chatlist.forEach((item, index) => { | ||
316 | + if(item.user_id == data.user_id){ | ||
317 | + key = index; | ||
318 | + } | ||
319 | + }); | ||
320 | + if(key == null){ | ||
321 | + chatlist.push(data); | ||
322 | + key = chatlist.length-1; | ||
323 | + } | ||
324 | + return key; | ||
325 | + }, | ||
326 | + // 判断wanlshop列表是否存在 | ||
327 | + addWanlChatList(data, type){ | ||
328 | + let chat = {}; | ||
329 | + if(type == 'msg'){ | ||
330 | + chat = { | ||
331 | + user_id: data.form.id, | ||
332 | + nickname: data.form.name, | ||
333 | + avatar: data.form.avatar, | ||
334 | + isOnline: 1, | ||
335 | + content: this.typeMsg(data) | ||
336 | + }; | ||
337 | + }else{ | ||
338 | + chat = data; | ||
339 | + } | ||
340 | + let wanlchat = this.wanlchat; | ||
341 | + let key = null; | ||
342 | + wanlchat.forEach((item, index) => { | ||
343 | + if(item.user_id == chat.user_id){ | ||
344 | + key = index; | ||
345 | + } | ||
346 | + }); | ||
347 | + if(key == null){ | ||
348 | + wanlchat.push({ | ||
349 | + user_id: chat.user_id, | ||
350 | + nickname: chat.nickname, | ||
351 | + avatar: chat.avatar, | ||
352 | + isOnline: chat.isOnline, | ||
353 | + count: chat.count, | ||
354 | + content: chat.content | ||
355 | + }); | ||
356 | + key = wanlchat.length-1; | ||
357 | + } | ||
358 | + return key; | ||
359 | + }, | ||
360 | + // 删除窗口,如果只有一个则直接关闭 判断删除的是否当前的,如果是读取第一个,如果不是直接删掉即可 | ||
361 | + delChat(index){ | ||
362 | + if(this.wanlchat.length == 1){ | ||
363 | + this.closeChat(); | ||
364 | + }else{ | ||
365 | + // 删除指定键 | ||
366 | + Vue.delete(this.wanlchat, index); | ||
367 | + // 重新读取页面 | ||
368 | + this.onChat(this.wanlchat.length-1); | ||
369 | + } | ||
370 | + }, | ||
371 | + // 关闭窗口 | ||
372 | + closeChat(){ | ||
373 | + this.chatWindow = false; // 是否开启聊天窗口 | ||
374 | + this.wanlchat = []; // 聊天窗口列表 | ||
375 | + this.chatSelect = null; // 选中的记录 | ||
376 | + this.chatContent = []; //消息内容&历史记录 | ||
377 | + }, | ||
378 | + // 最小化窗口 | ||
379 | + miniChat(){ | ||
380 | + this.chatWindow = !this.chatWindow; // 聊天窗口 | ||
381 | + this.chatMiniWindow = !this.chatMiniWindow; // 是否开启聊天窗口 | ||
382 | + }, | ||
383 | + // 点击文本消息 | ||
384 | + submit() { | ||
385 | + if (!this.textarea) { | ||
386 | + return; | ||
387 | + } | ||
388 | + var msg = { | ||
389 | + text: this.textarea | ||
390 | + }; | ||
391 | + this.sendMsg(msg, 'text'); | ||
392 | + this.textarea = ''; //清空输入框 | ||
393 | + }, | ||
394 | + // 发送图片消息 | ||
395 | + chatImage(e){ | ||
396 | + var files = e.target.files[0]; | ||
397 | + var formData = new FormData(); | ||
398 | + var app = this; | ||
399 | + formData.append('file', files, files.name); | ||
400 | + Fast.api.ajax({ | ||
401 | + url: "ajax/upload", | ||
402 | + data:formData, | ||
403 | + processData:false, | ||
404 | + contentType:false, | ||
405 | + }, function(data, ret){ | ||
406 | + var theImage = new Image(); | ||
407 | + theImage.src = data.fullurl; | ||
408 | + var msg = { | ||
409 | + h: theImage.height, | ||
410 | + w: theImage.width, | ||
411 | + url: data.fullurl | ||
412 | + }; | ||
413 | + app.sendMsg(msg, 'img'); | ||
414 | + return false; | ||
415 | + }); | ||
416 | + }, | ||
417 | + // 发送消息 | ||
418 | + sendMsg(content, type) { | ||
419 | + var data = { | ||
420 | + type: 'service', | ||
421 | + to_id: this.wanlchat[this.chatSelect].user_id, | ||
422 | + form: { | ||
423 | + id: this.service.id, | ||
424 | + avatar: this.service.avatar, | ||
425 | + name: this.service.nickname | ||
426 | + }, | ||
427 | + message: { | ||
428 | + type: type, | ||
429 | + content: content | ||
430 | + }, | ||
431 | + createtime: parseInt(new Date().getTime() / 1000) | ||
432 | + }; | ||
433 | + // 发送到本地 | ||
434 | + this.receiveChat(JSON.parse(JSON.stringify(data))); | ||
435 | + // 发送消息 | ||
436 | + this.send(data); | ||
437 | + // 更新主列表和 wanlchat列表,如果存在+1,如果不存在追加一个列表 | ||
438 | + this.updateChatList(data, 'send'); | ||
439 | + }, | ||
440 | + // 接受消息 | ||
441 | + receiveChat(msg) { | ||
442 | + if (msg.type == 'service') { | ||
443 | + if (msg.message.type == 'text') { | ||
444 | + msg.message.content.text = this.replaceEmoji(msg.message.content.text); | ||
445 | + } | ||
446 | + this.chatContent.push(msg); | ||
447 | + } | ||
448 | + // 滚动到底 | ||
449 | + this.latest(); | ||
450 | + }, | ||
451 | + // 播放语音 | ||
452 | + playVoice(url) { | ||
453 | + let sound = new Audio(); | ||
454 | + sound.src = url; | ||
455 | + sound.play(); | ||
456 | + }, | ||
457 | + //统计数量 | ||
458 | + chatCount(){ | ||
459 | + let count = 0; | ||
460 | + this.chatlist.forEach((item)=>{ | ||
461 | + count += item.count; | ||
462 | + }); | ||
463 | + this.count = count; | ||
464 | + }, | ||
465 | + // 消息提示 | ||
466 | + onMsg(msg, type){ | ||
467 | + let text = ''; | ||
468 | + // 文本提示 | ||
469 | + if(type == 'main'){ | ||
470 | + text = `新消息:${msg.form.name},${this.typeMsg(msg)}`; | ||
471 | + this.msgData = { | ||
472 | + avatar: this.cdnurl(msg.form.avatar), | ||
473 | + name: msg.form.name, | ||
474 | + text: this.typeMsg(msg) | ||
475 | + }; | ||
476 | + this.openMsg(); | ||
477 | + } | ||
478 | + // 语音提示 | ||
479 | + if(this.isAudio){ | ||
480 | + this.playAudio(type, text); | ||
481 | + } | ||
482 | + }, | ||
483 | + //打开消息弹窗 | ||
484 | + openMsg(){ | ||
485 | + this.isMsg = true; | ||
486 | + setInterval (()=> { | ||
487 | + this.isMsg = false; | ||
488 | + }, 5000); | ||
489 | + }, | ||
490 | + // 在线语音合成 | ||
491 | + playAudio(type, str){ | ||
492 | + let sound = new Audio(); | ||
493 | + let url = ''; | ||
494 | + if(type == 'main'){ | ||
495 | + url = str ? ('https://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=' + encodeURI(str)):''; | ||
496 | + }else if(type == 'openinto'){ | ||
497 | + url = this.cdnurl('/assets/addons/wanlshop/voice/open.mp3'); | ||
498 | + }else if(type == 'open'){ | ||
499 | + url = this.cdnurl('/assets/addons/wanlshop/voice/chat.mp3'); | ||
500 | + } | ||
501 | + sound.src = url; | ||
502 | + sound.play(); | ||
503 | + }, | ||
504 | + onAudio(){ | ||
505 | + this.isAudio = !this.isAudio; | ||
506 | + this.isAudio ? layer.msg('提示音已开启', {icon: 1}):layer.msg('提示音已关闭', {icon: 2}); | ||
507 | + }, | ||
508 | + typeMsg(msg){ | ||
509 | + let text = ''; | ||
510 | + if (msg.type == 'system') { | ||
511 | + if (msg.msg.type == 'text') { | ||
512 | + text = msg.message.content.text; | ||
513 | + } | ||
514 | + } else if (msg.type == 'service') { | ||
515 | + // 用户消息 | ||
516 | + if (msg.message.type == 'text') { | ||
517 | + text = msg.message.content.text; | ||
518 | + }else if (msg.message.type == 'voice') { | ||
519 | + text = '[语音消息]'; | ||
520 | + }else if (msg.message.type == 'img') { | ||
521 | + text = '[图片消息]'; | ||
522 | + }else if (msg.message.type == 'goods') { | ||
523 | + text = '[商品消息]'; | ||
524 | + }else if (msg.message.type == 'order') { | ||
525 | + text = '[订单消息]'; | ||
526 | + }else{ | ||
527 | + text = '[未知类型消息]'; | ||
528 | + } | ||
529 | + } | ||
530 | + return text; | ||
531 | + }, | ||
532 | + //替换表情符号为图片 | ||
533 | + replaceEmoji(text) { | ||
534 | + // 这里处理 链接 换行符 | ||
535 | + let replacedStr = text.replace(/\[([^(\]|\[)]*)\]/g, (item, index) => { | ||
536 | + return '<img src="' + this.emojiList.map[item] + '" width="18rpx">'; | ||
537 | + }); | ||
538 | + return replacedStr.replace(/(\r\n)|(\n)/g, '<br>'); | ||
539 | + }, | ||
540 | + // 表情tab | ||
541 | + tabSelect(e) { | ||
542 | + this.TabCur = e.currentTarget.dataset.id; | ||
543 | + }, | ||
544 | + //添加表情 | ||
545 | + addEmoji(em) { | ||
546 | + this.textarea += em; | ||
547 | + this.toggleBox(); | ||
548 | + }, | ||
549 | + // 点击空白区域关闭某个div图层 | ||
550 | + toggleBox() { | ||
551 | + this.showBox = !this.showBox; //通过控制showBox来控制box的显示与隐藏 | ||
552 | + }, | ||
553 | + // 滚动底部 | ||
554 | + latest(){ | ||
555 | + if(this.chatWindow){ | ||
556 | + this.$nextTick(() => { | ||
557 | + let msg = document.getElementById('talk') // 获取对象 | ||
558 | + msg.scrollTop = msg.scrollHeight // 滚动高度 | ||
559 | + }) | ||
560 | + } | ||
561 | + }, | ||
562 | + cdnurl(url) { | ||
563 | + if(url) return Fast.api.cdnurl(url); | ||
564 | + }, | ||
565 | + toFind(type){ | ||
566 | + var name = '发布'; | ||
567 | + if(type == 'new'){ | ||
568 | + name = '发布 上新' | ||
569 | + }else if(type == 'want'){ | ||
570 | + name = '发布 种草' | ||
571 | + }else if(type == 'show'){ | ||
572 | + name = '发布 买家秀' | ||
573 | + } | ||
574 | + Fast.api.open('/index/wanlshop.find/add.html?type='+type, name); | ||
575 | + }, | ||
576 | + full(){ | ||
577 | + this.onFull = !this.onFull; | ||
578 | + }, | ||
579 | + // 实现移动端拖拽 | ||
580 | + down() { | ||
581 | + this.flags = true; | ||
582 | + var touch; | ||
583 | + if (event.touches) { | ||
584 | + touch = event.touches[0]; | ||
585 | + } else { | ||
586 | + touch = event; | ||
587 | + } | ||
588 | + this.position.x = touch.clientX; | ||
589 | + this.position.y = touch.clientY; | ||
590 | + this.dx = this.moveBtn.offsetLeft; | ||
591 | + this.dy = this.moveBtn.offsetTop; | ||
592 | + }, | ||
593 | + move() { | ||
594 | + if (this.flags) { | ||
595 | + var touch; | ||
596 | + if (event.touches) { | ||
597 | + touch = event.touches[0]; | ||
598 | + } else { | ||
599 | + touch = event; | ||
600 | + } | ||
601 | + this.nx = touch.clientX - this.position.x; | ||
602 | + this.ny = touch.clientY - this.position.y; | ||
603 | + this.xPum = this.dx + this.nx; | ||
604 | + this.yPum = this.dy + this.ny; | ||
605 | + var clientWidth = document.documentElement.clientWidth; | ||
606 | + var clientHeight = document.documentElement.clientHeight; | ||
607 | + if (this.xPum > 0 && this.xPum < (clientWidth - this.moveBtn.offsetWidth)) { | ||
608 | + this.moveBtn.style.left = this.xPum + "px"; | ||
609 | + } | ||
610 | + if (this.yPum > 0 && this.yPum < (clientHeight - this.moveBtn.offsetHeight)) { | ||
611 | + this.moveBtn.style.top = this.yPum + "px"; | ||
612 | + } | ||
613 | + | ||
614 | + //阻止页面的滑动默认事件 | ||
615 | + document.addEventListener("touchmove", this.handler, { | ||
616 | + passive: false | ||
617 | + }); | ||
618 | + } | ||
619 | + }, | ||
620 | + //鼠标释放时候的函数 | ||
621 | + end() { | ||
622 | + this.flags = false; | ||
623 | + document.addEventListener('touchmove', this.handler, { | ||
624 | + passive: false | ||
625 | + }); | ||
626 | + }, | ||
627 | + handler(e) { | ||
628 | + if(this.flags){ | ||
629 | + event.preventDefault(); | ||
630 | + }else{ | ||
631 | + return true | ||
632 | + } | ||
633 | + }, | ||
634 | + timeFormat(timestamp = null, fmt = 'yyyy-mm-dd'){ | ||
635 | + // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 | ||
636 | + timestamp = parseInt(timestamp); | ||
637 | + // 如果为null,则格式化当前时间 | ||
638 | + if (!timestamp) timestamp = Number(new Date()); | ||
639 | + // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位) | ||
640 | + if (timestamp.toString().length == 10) timestamp *= 1000; | ||
641 | + let date = new Date(timestamp); | ||
642 | + let ret; | ||
643 | + let opt = { | ||
644 | + "y+": date.getFullYear().toString(), // 年 | ||
645 | + "m+": (date.getMonth() + 1).toString(), // 月 | ||
646 | + "d+": date.getDate().toString(), // 日 | ||
647 | + "h+": date.getHours().toString(), // 时 | ||
648 | + "M+": date.getMinutes().toString(), // 分 | ||
649 | + "s+": date.getSeconds().toString() // 秒 | ||
650 | + // 有其他格式化字符需求可以继续添加,必须转化成字符串 | ||
651 | + }; | ||
652 | + for (let k in opt) { | ||
653 | + ret = new RegExp("(" + k + ")").exec(fmt); | ||
654 | + if (ret) { | ||
655 | + fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0"))) | ||
656 | + }; | ||
657 | + }; | ||
658 | + return fmt; | ||
659 | + }, | ||
660 | + timefriendly(timestamp){ | ||
661 | + if (timestamp == null) timestamp = Number(new Date()); | ||
662 | + timestamp = parseInt(timestamp); | ||
663 | + // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位) | ||
664 | + if (timestamp.toString().length == 10) timestamp *= 1000; | ||
665 | + var timer = (new Date()).getTime() - timestamp; | ||
666 | + timer = parseInt(timer / 1000); | ||
667 | + // 如果小于5分钟,则返回"刚刚",其他以此类推 | ||
668 | + let tips = ''; | ||
669 | + switch (true) { | ||
670 | + case timer < 86400: | ||
671 | + tips = this.timeFormat(timestamp, 'hh:MM'); | ||
672 | + break; | ||
673 | + case timer >= 86400 && timer < 86400 * 7: | ||
674 | + var now = new Date(timestamp); | ||
675 | + var week = ['日', '一', '二', '三', '四', '五', '六']; | ||
676 | + switch (new Date().getDate() - now.getDate()) { | ||
677 | + case 1: | ||
678 | + tips = this.timeFormat(timestamp, '昨天 hh:MM'); | ||
679 | + break; | ||
680 | + case 2: | ||
681 | + tips = this.timeFormat(timestamp, '前天 hh:MM'); | ||
682 | + break; | ||
683 | + default: | ||
684 | + tips = '星期' + week[now.getDay()] + this.timeFormat(timestamp, 'hh:MM'); | ||
685 | + } | ||
686 | + break; | ||
687 | + case timer >= 86400 * 7: | ||
688 | + tips = this.timeFormat(timestamp, 'mm-dd hh:MM'); | ||
689 | + break; | ||
690 | + default: | ||
691 | + tips = this.timeFormat(timestamp, 'yyyy-mm-dd hh:MM'); | ||
692 | + } | ||
693 | + return tips; | ||
694 | + }, | ||
695 | + // 表情数据 | ||
696 | + emojiData() { | ||
697 | + let emotions = [{"phrase": "[微笑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e3/2018new_weixioa02_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e3/2018new_weixioa02_org.png","value": "[微笑]","picid": ""}, {"phrase": "[可爱]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/09/2018new_keai_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/09/2018new_keai_org.png","value": "[可爱]","picid": ""}, {"phrase": "[太开心]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1e/2018new_taikaixin_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1e/2018new_taikaixin_org.png","value": "[太开心]","picid": ""}, {"phrase": "[鼓掌]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6e/2018new_guzhang_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6e/2018new_guzhang_thumb.png","value": "[鼓掌]","picid": ""}, {"phrase": "[嘻嘻]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/33/2018new_xixi_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/33/2018new_xixi_thumb.png","value": "[嘻嘻]","picid": ""}, {"phrase": "[哈哈]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8f/2018new_haha_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8f/2018new_haha_thumb.png","value": "[哈哈]","picid": ""}, {"phrase": "[笑cry]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4a/2018new_xiaoku_thumb.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4a/2018new_xiaoku_thumb.png","value": "[笑cry]","picid": ""}, {"phrase": "[挤眼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/43/2018new_jiyan_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/43/2018new_jiyan_org.png","value": "[挤眼]","picid": ""}, {"phrase": "[馋嘴]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fa/2018new_chanzui_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fa/2018new_chanzui_org.png","value": "[馋嘴]","picid": ""}, {"phrase": "[黑线]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a3/2018new_heixian_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a3/2018new_heixian_thumb.png","value": "[黑线]","picid": ""}, {"phrase": "[汗]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/28/2018new_han_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/28/2018new_han_org.png","value": "[汗]","picid": ""}, {"phrase": "[挖鼻]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9a/2018new_wabi_thumb.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9a/2018new_wabi_thumb.png","value": "[挖鼻]","picid": ""}, {"phrase": "[哼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7c/2018new_heng_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7c/2018new_heng_thumb.png","value": "[哼]","picid": ""}, {"phrase": "[怒]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f6/2018new_nu_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f6/2018new_nu_thumb.png","value": "[怒]","picid": ""}, {"phrase": "[委屈]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a5/2018new_weiqu_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a5/2018new_weiqu_thumb.png","value": "[委屈]","picid": ""}, {"phrase": "[可怜]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/96/2018new_kelian_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/96/2018new_kelian_org.png","value": "[可怜]","picid": ""}, {"phrase": "[失望]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/aa/2018new_shiwang_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/aa/2018new_shiwang_thumb.png","value": "[失望]","picid": ""}, {"phrase": "[悲伤]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ee/2018new_beishang_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ee/2018new_beishang_org.png","value": "[悲伤]","picid": ""}, {"phrase": "[泪]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6e/2018new_leimu_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6e/2018new_leimu_org.png","value": "[泪]","picid": ""}, {"phrase": "[允悲]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/83/2018new_kuxiao_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/83/2018new_kuxiao_org.png","value": "[允悲]","picid": ""}, {"phrase": "[害羞]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c1/2018new_haixiu_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c1/2018new_haixiu_org.png","value": "[害羞]","picid": ""}, {"phrase": "[污]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/10/2018new_wu_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/10/2018new_wu_thumb.png","value": "[污]","picid": ""}, {"phrase": "[爱你]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f6/2018new_aini_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f6/2018new_aini_org.png","value": "[爱你]","picid": ""}, {"phrase": "[亲亲]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2c/2018new_qinqin_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2c/2018new_qinqin_thumb.png","value": "[亲亲]","picid": ""}, {"phrase": "[色]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9d/2018new_huaxin_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9d/2018new_huaxin_org.png","value": "[色]","picid": ""}, {"phrase": "[憧憬]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c9/2018new_chongjing_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c9/2018new_chongjing_org.png","value": "[憧憬]","picid": ""}, {"phrase": "[舔屏]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3e/2018new_tianping_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3e/2018new_tianping_thumb.png","value": "[舔屏]","picid": ""}, {"phrase": "[坏笑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4d/2018new_huaixiao_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4d/2018new_huaixiao_org.png","value": "[坏笑]","picid": ""}, {"phrase": "[阴险]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9e/2018new_yinxian_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9e/2018new_yinxian_org.png","value": "[阴险]","picid": ""}, {"phrase": "[笑而不语]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2d/2018new_xiaoerbuyu_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2d/2018new_xiaoerbuyu_org.png","value": "[笑而不语]","picid": ""}, {"phrase": "[偷笑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/71/2018new_touxiao_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/71/2018new_touxiao_org.png","value": "[偷笑]","picid": ""}, {"phrase": "[酷]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c4/2018new_ku_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c4/2018new_ku_org.png","value": "[酷]","picid": ""}, {"phrase": "[并不简单]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/aa/2018new_bingbujiandan_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/aa/2018new_bingbujiandan_thumb.png","value": "[并不简单]","picid": ""}, {"phrase": "[思考]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/30/2018new_sikao_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/30/2018new_sikao_org.png","value": "[思考]","picid": ""}, {"phrase": "[疑问]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b8/2018new_ningwen_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b8/2018new_ningwen_org.png","value": "[疑问]","picid": ""}, {"phrase": "[费解]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2a/2018new_wenhao_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/2a/2018new_wenhao_thumb.png","value": "[费解]","picid": ""}, {"phrase": "[晕]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/07/2018new_yun_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/07/2018new_yun_thumb.png","value": "[晕]","picid": ""}, {"phrase": "[衰]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a2/2018new_shuai_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a2/2018new_shuai_thumb.png","value": "[衰]","picid": ""}, {"phrase": "[骷髅]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a1/2018new_kulou_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a1/2018new_kulou_thumb.png","value": "[骷髅]","picid": ""}, {"phrase": "[嘘]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b0/2018new_xu_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b0/2018new_xu_org.png","value": "[嘘]","picid": ""}, {"phrase": "[闭嘴]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/2018new_bizui_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/2018new_bizui_org.png","value": "[闭嘴]","picid": ""}, {"phrase": "[傻眼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/dd/2018new_shayan_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/dd/2018new_shayan_org.png","value": "[傻眼]","picid": ""}, {"phrase": "[吃惊]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/49/2018new_chijing_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/49/2018new_chijing_org.png","value": "[吃惊]","picid": ""}, {"phrase": "[吐]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/08/2018new_tu_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/08/2018new_tu_org.png","value": "[吐]","picid": ""}, {"phrase": "[感冒]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/2018new_kouzhao_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/2018new_kouzhao_thumb.png","value": "[感冒]","picid": ""}, {"phrase": "[生病]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3b/2018new_shengbing_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3b/2018new_shengbing_thumb.png","value": "[生病]","picid": ""}, {"phrase": "[拜拜]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fd/2018new_baibai_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fd/2018new_baibai_thumb.png","value": "[拜拜]","picid": ""}, {"phrase": "[鄙视]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/da/2018new_bishi_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/da/2018new_bishi_org.png","value": "[鄙视]","picid": ""}, {"phrase": "[白眼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ef/2018new_landelini_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ef/2018new_landelini_org.png","value": "[白眼]","picid": ""}, {"phrase": "[左哼哼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/43/2018new_zuohengheng_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/43/2018new_zuohengheng_thumb.png","value": "[左哼哼]","picid": ""}, {"phrase": "[右哼哼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c1/2018new_youhengheng_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c1/2018new_youhengheng_thumb.png","value": "[右哼哼]","picid": ""}, {"phrase": "[抓狂]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/17/2018new_zhuakuang_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/17/2018new_zhuakuang_org.png","value": "[抓狂]","picid": ""}, {"phrase": "[怒骂]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/87/2018new_zhouma_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/87/2018new_zhouma_thumb.png","value": "[怒骂]","picid": ""}, {"phrase": "[打脸]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cb/2018new_dalian_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cb/2018new_dalian_org.png","value": "[打脸]","picid": ""}, {"phrase": "[顶]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ae/2018new_ding_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ae/2018new_ding_org.png","value": "[顶]","picid": ""}, {"phrase": "[互粉]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/86/2018new_hufen02_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/86/2018new_hufen02_org.png","value": "[互粉]","picid": ""}, {"phrase": "[钱]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a2/2018new_qian_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a2/2018new_qian_thumb.png","value": "[钱]","picid": ""}, {"phrase": "[哈欠]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/55/2018new_dahaqian_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/55/2018new_dahaqian_org.png","value": "[哈欠]","picid": ""}, {"phrase": "[困]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/2018new_kun_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/2018new_kun_thumb.png","value": "[困]","picid": ""}, {"phrase": "[睡]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e2/2018new_shuijiao_thumb.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e2/2018new_shuijiao_thumb.png","value": "[睡]","picid": ""}, {"phrase": "[吃瓜]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/01/2018new_chigua_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/01/2018new_chigua_thumb.png","value": "[吃瓜]","picid": ""}, {"phrase": "[doge]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a1/2018new_doge02_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a1/2018new_doge02_org.png","value": "[doge]","picid": ""}, {"phrase": "[二哈]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/22/2018new_erha_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/22/2018new_erha_org.png","value": "[二哈]","picid": ""}, {"phrase": "[喵喵]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7b/2018new_miaomiao_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7b/2018new_miaomiao_thumb.png","value": "[喵喵]","picid": ""}, {"phrase": "[赞]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e6/2018new_zan_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e6/2018new_zan_org.png","value": "[赞]","picid": ""}, {"phrase": "[good]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8a/2018new_good_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8a/2018new_good_org.png","value": "[good]","picid": ""}, {"phrase": "[ok]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/45/2018new_ok_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/45/2018new_ok_org.png","value": "[ok]","picid": ""}, {"phrase": "[耶]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/29/2018new_ye_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/29/2018new_ye_thumb.png","value": "[耶]","picid": ""}, {"phrase": "[握手]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e9/2018new_woshou_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e9/2018new_woshou_thumb.png","value": "[握手]","picid": ""}, {"phrase": "[作揖]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e7/2018new_zuoyi_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e7/2018new_zuoyi_org.png","value": "[作揖]","picid": ""}, {"phrase": "[来]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/42/2018new_guolai_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/42/2018new_guolai_thumb.png","value": "[来]","picid": ""}, {"phrase": "[拳头]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/86/2018new_quantou_org.png","hot": false,"common": true,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/86/2018new_quantou_thumb.png","value": "[拳头]","picid": ""}, {"phrase": "[点亮橙色]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f3/gongyi_dianliangchengse_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f3/gongyi_dianliangchengse_thumb.png","value": "[点亮橙色]","picid": ""}, {"phrase": "[人人公益节]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/35/huodong_renrengongyi_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/35/huodong_renrengongyi_thumb.png","value": "[人人公益节]","picid": ""}, {"phrase": "[中国赞]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/2018new_zhongguozan_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6d/2018new_zhongguozan_org.png","value": "[中国赞]","picid": ""}, {"phrase": "[锦鲤]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/94/hbf2019_jinli_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/94/hbf2019_jinli_thumb.png","value": "[锦鲤]","picid": ""}, {"phrase": "[抱抱]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/42/2018new_baobao_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/42/2018new_baobao_thumb.png","value": "[抱抱]","picid": ""}, {"phrase": "[摊手]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/2018new_tanshou_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/2018new_tanshou_org.png","value": "[摊手]","picid": ""}, {"phrase": "[跪了]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/75/2018new_gui_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/75/2018new_gui_org.png","value": "[跪了]","picid": ""}, {"phrase": "[酸]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b3/hot_wosuanle_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b3/hot_wosuanle_thumb.png","value": "[酸]","picid": ""}, {"phrase": "[哪吒开心]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/35/nezha_kaixin02_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/35/nezha_kaixin02_thumb.png","value": "[哪吒开心]","picid": ""}, {"phrase": "[冰雪奇缘艾莎]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/11/bingxueqiyuan_aisha_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/11/bingxueqiyuan_aisha_thumb.png","value": "[冰雪奇缘艾莎]","picid": ""}, {"phrase": "[冰雪奇缘安娜]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b3/bingxueqiyuan_anna_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b3/bingxueqiyuan_anna_thumb.png","value": "[冰雪奇缘安娜]","picid": ""}, {"phrase": "[冰雪奇缘雪宝]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/96/bingxueqiyuan_xuebao_org.png","hot": true,"common": false,"category": "","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/96/bingxueqiyuan_xuebao_thumb.png","value": "[冰雪奇缘雪宝]","picid": ""}, {"phrase": "[心]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8a/2018new_xin_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8a/2018new_xin_thumb.png","value": "[心]","picid": ""}, {"phrase": "[伤心]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6c/2018new_xinsui_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6c/2018new_xinsui_thumb.png","value": "[伤心]","picid": ""}, {"phrase": "[鲜花]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d4/2018new_xianhua_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d4/2018new_xianhua_org.png","value": "[鲜花]","picid": ""}, {"phrase": "[男孩儿]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0a/2018new_nanhai_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0a/2018new_nanhai_thumb.png","value": "[男孩儿]","picid": ""}, {"phrase": "[女孩儿]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/39/2018new_nvhai_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/39/2018new_nvhai_thumb.png","value": "[女孩儿]","picid": ""}, {"phrase": "[熊猫]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/aa/2018new_xiongmao_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/aa/2018new_xiongmao_thumb.png","value": "[熊猫]","picid": ""}, {"phrase": "[兔子]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c6/2018new_tuzi_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c6/2018new_tuzi_thumb.png","value": "[兔子]","picid": ""}, {"phrase": "[猪头]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1c/2018new_zhutou_thumb.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1c/2018new_zhutou_thumb.png","value": "[猪头]","picid": ""}, {"phrase": "[草泥马]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3b/2018new_caonima_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3b/2018new_caonima_thumb.png","value": "[草泥马]","picid": ""}, {"phrase": "[奥特曼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c6/2018new_aoteman_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c6/2018new_aoteman_org.png","value": "[奥特曼]","picid": ""}, {"phrase": "[太阳]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cd/2018new_taiyang_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cd/2018new_taiyang_org.png","value": "[太阳]","picid": ""}, {"phrase": "[月亮]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d5/2018new_yueliang_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d5/2018new_yueliang_org.png","value": "[月亮]","picid": ""}, {"phrase": "[浮云]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/61/2018new_yunduo_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/61/2018new_yunduo_thumb.png","value": "[浮云]","picid": ""}, {"phrase": "[下雨]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7e/2018new_yu_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7e/2018new_yu_thumb.png","value": "[下雨]","picid": ""}, {"phrase": "[沙尘暴]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b7/2018new_shachenbao_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b7/2018new_shachenbao_org.png","value": "[沙尘暴]","picid": ""}, {"phrase": "[微风]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c7/2018new_weifeng_thumb.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c7/2018new_weifeng_thumb.png","value": "[微风]","picid": ""}, {"phrase": "[围观]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6c/2018new_weiguan_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/6c/2018new_weiguan_org.png","value": "[围观]","picid": ""}, {"phrase": "[飞机]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4a/2018new_feiji_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4a/2018new_feiji_thumb.png","value": "[飞机]","picid": ""}, {"phrase": "[照相机]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/78/2018new_xiangji_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/78/2018new_xiangji_thumb.png","value": "[照相机]","picid": ""}, {"phrase": "[话筒]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/48/2018new_huatong_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/48/2018new_huatong_org.png","value": "[话筒]","picid": ""}, {"phrase": "[蜡烛]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/16/2018new_lazhu_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/16/2018new_lazhu_org.png","value": "[蜡烛]","picid": ""}, {"phrase": "[音乐]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1f/2018new_yinyue_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1f/2018new_yinyue_org.png","value": "[音乐]","picid": ""}, {"phrase": "[喜]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e0/2018new_xizi_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e0/2018new_xizi_thumb.png","value": "[喜]","picid": ""}, {"phrase": "[给力]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/36/2018new_geili_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/36/2018new_geili_thumb.png","value": "[给力]","picid": ""}, {"phrase": "[威武]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/14/2018new_weiwu_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/14/2018new_weiwu_thumb.png","value": "[威武]","picid": ""}, {"phrase": "[干杯]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/2018new_ganbei_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/2018new_ganbei_org.png","value": "[干杯]","picid": ""}, {"phrase": "[蛋糕]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f9/2018new_dangao_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f9/2018new_dangao_org.png","value": "[蛋糕]","picid": ""}, {"phrase": "[礼物]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0e/2018new_liwu_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0e/2018new_liwu_org.png","value": "[礼物]","picid": ""}, {"phrase": "[钟]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8e/2018new_zhong_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/8e/2018new_zhong_org.png","value": "[钟]","picid": ""}, {"phrase": "[肥皂]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d6/2018new_feizao_thumb.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d6/2018new_feizao_thumb.png","value": "[肥皂]","picid": ""}, {"phrase": "[绿丝带]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cb/2018new_lvsidai_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cb/2018new_lvsidai_thumb.png","value": "[绿丝带]","picid": ""}, {"phrase": "[围脖]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/64/2018new_weibo_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/64/2018new_weibo_org.png","value": "[围脖]","picid": ""}, {"phrase": "[浪]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/46/2018new_xinlang_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/46/2018new_xinlang_thumb.png","value": "[浪]","picid": ""}, {"phrase": "[羞嗒嗒]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/df/lxhxiudada_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/df/lxhxiudada_thumb.gif","value": "[羞嗒嗒]","picid": ""}, {"phrase": "[好爱哦]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/74/lxhainio_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/74/lxhainio_thumb.gif","value": "[好爱哦]","picid": ""}, {"phrase": "[偷乐]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fa/lxhtouxiao_thumb.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fa/lxhtouxiao_thumb.gif","value": "[偷乐]","picid": ""}, {"phrase": "[赞啊]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/00/lxhzan_thumb.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/00/lxhzan_thumb.gif","value": "[赞啊]","picid": ""}, {"phrase": "[笑哈哈]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/32/lxhwahaha_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/32/lxhwahaha_thumb.gif","value": "[笑哈哈]","picid": ""}, {"phrase": "[好喜欢]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d6/lxhlike_thumb.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d6/lxhlike_thumb.gif","value": "[好喜欢]","picid": ""}, {"phrase": "[求关注]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ac/lxhqiuguanzhu_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ac/lxhqiuguanzhu_thumb.gif","value": "[求关注]","picid": ""}, {"phrase": "[胖丁微笑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/68/film_pangdingsmile_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/68/film_pangdingsmile_thumb.png","value": "[胖丁微笑]","picid": ""}, {"phrase": "[弱]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3d/2018new_ruo_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3d/2018new_ruo_org.png","value": "[弱]","picid": ""}, {"phrase": "[NO]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1e/2018new_no_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1e/2018new_no_org.png","value": "[NO]","picid": ""}, {"phrase": "[haha]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1d/2018new_hahashoushi_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1d/2018new_hahashoushi_org.png","value": "[haha]","picid": ""}, {"phrase": "[加油]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9f/2018new_jiayou_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9f/2018new_jiayou_org.png","value": "[加油]","picid": ""}, {"phrase": "[佩奇]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c6/hot_pigpeiqi_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c6/hot_pigpeiqi_thumb.png","value": "[佩奇]","picid": ""}, {"phrase": "[大侦探皮卡丘微笑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b3/pikaqiu_weixiao_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b3/pikaqiu_weixiao_thumb.png","value": "[大侦探皮卡丘微笑]","picid": ""}, {"phrase": "[圣诞老人]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/93/xmax_oldman01_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/93/xmax_oldman01_thumb.png","value": "[圣诞老人]","picid": ""}, {"phrase": "[紫金草]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e5/gongjiri_zijinhua_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e5/gongjiri_zijinhua_thumb.png","value": "[紫金草]","picid": ""}, {"phrase": "[文明遛狗]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/93/gongyi_wenminglgnew_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/93/gongyi_wenminglgnew_thumb.png","value": "[文明遛狗]","picid": ""}, {"phrase": "[神马]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/60/horse2_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/60/horse2_thumb.gif","value": "[神马]","picid": ""}, {"phrase": "[马到成功]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b0/mdcg_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b0/mdcg_thumb.gif","value": "[马到成功]","picid": ""}, {"phrase": "[炸鸡啤酒]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e2/zhajibeer_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e2/zhajibeer_thumb.gif","value": "[炸鸡啤酒]","picid": ""}, {"phrase": "[最右]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/be/remen_zuiyou180605_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/be/remen_zuiyou180605_thumb.png","value": "[最右]","picid": ""}, {"phrase": "[织]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/41/zz2_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/41/zz2_thumb.gif","value": "[织]","picid": ""}, {"phrase": "[五仁月饼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/10/2018zhongqiu_yuebing_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/10/2018zhongqiu_yuebing_thumb.png","value": "[五仁月饼]","picid": ""}, {"phrase": "[给你小心心]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ca/qixi2018_xiaoxinxin_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ca/qixi2018_xiaoxinxin_thumb.png","value": "[给你小心心]","picid": ""}, {"phrase": "[吃狗粮]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/qixi2018_chigouliang_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0b/qixi2018_chigouliang_thumb.png","value": "[吃狗粮]","picid": ""}, {"phrase": "[弗莱见钱眼开]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/83/2018newyear_richdog_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/83/2018newyear_richdog_thumb.gif","value": "[弗莱见钱眼开]","picid": ""}, {"phrase": "[超新星全运会]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f9/huodong_starsports_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f9/huodong_starsports_thumb.png","value": "[超新星全运会]","picid": ""}, {"phrase": "[看涨]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fe/kanzhangv2_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fe/kanzhangv2_thumb.gif","value": "[看涨]","picid": ""}, {"phrase": "[看跌]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c5/kandiev2_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c5/kandiev2_thumb.gif","value": "[看跌]","picid": ""}, {"phrase": "[带着微博去旅行]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ec/eventtravel_org.gif","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ec/eventtravel_thumb.gif","value": "[带着微博去旅行]","picid": ""}, {"phrase": "[星星]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/76/hot_star171109_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/76/hot_star171109_thumb.png","value": "[星星]","picid": ""}, {"phrase": "[半星]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f9/hot_halfstar_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f9/hot_halfstar_thumb.png","value": "[半星]","picid": ""}, {"phrase": "[空星]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ff/hot_blankstar_org.png","hot": false,"common": false,"category": "其他","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ff/hot_blankstar_thumb.png","value": "[空星]","picid": ""}, {"phrase": "[小黄人微笑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f0/xhrnew_weixiao_org.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/f0/xhrnew_weixiao_org.png","value": "[小黄人微笑]","picid": ""}, {"phrase": "[小黄人剪刀手]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/63/xhrnew_jiandaoshou_org.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/63/xhrnew_jiandaoshou_org.png","value": "[小黄人剪刀手]","picid": ""}, {"phrase": "[小黄人不屑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b2/xhrnew_buxie_org.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/b2/xhrnew_buxie_org.png","value": "[小黄人不屑]","picid": ""}, {"phrase": "[小黄人高兴]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/41/xhrnew_gaoxing_org.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/41/xhrnew_gaoxing_org.png","value": "[小黄人高兴]","picid": ""}, {"phrase": "[小黄人惊讶]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fd/xhrnew_jingya_thumb.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fd/xhrnew_jingya_thumb.png","value": "[小黄人惊讶]","picid": ""}, {"phrase": "[小黄人委屈]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/79/xhrnew_weiqu_org.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/79/xhrnew_weiqu_org.png","value": "[小黄人委屈]","picid": ""}, {"phrase": "[小黄人坏笑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/be/xhrnew_huaixiao_thumb.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/be/xhrnew_huaixiao_thumb.png","value": "[小黄人坏笑]","picid": ""}, {"phrase": "[小黄人白眼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e2/xhrnew_baiyan_org.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e2/xhrnew_baiyan_org.png","value": "[小黄人白眼]","picid": ""}, {"phrase": "[小黄人无奈]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/15/xhrnew_wunai_org.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/15/xhrnew_wunai_thumb.png","value": "[小黄人无奈]","picid": ""}, {"phrase": "[小黄人得意]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c8/xhrnew_deyi_org.png","hot": false,"common": false,"category": "小黄人","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/c8/xhrnew_deyi_thumb.png","value": "[小黄人得意]","picid": ""}, {"phrase": "[钢铁侠]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/27/avengers_ironman01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/27/avengers_ironman01_thumb.png","value": "[钢铁侠]","picid": ""}, {"phrase": "[美国队长]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d8/avengers_captain01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d8/avengers_captain01_thumb.png","value": "[美国队长]","picid": ""}, {"phrase": "[雷神]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/avengers_thor01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/avengers_thor01_thumb.png","value": "[雷神]","picid": ""}, {"phrase": "[浩克]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/44/avengers_hulk01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/44/avengers_hulk01_thumb.png","value": "[浩克]","picid": ""}, {"phrase": "[黑寡妇]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0e/avengers_blackwidow01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/0e/avengers_blackwidow01_thumb.png","value": "[黑寡妇]","picid": ""}, {"phrase": "[鹰眼]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/93/avengers_clint01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/93/avengers_clint01_thumb.png","value": "[鹰眼]","picid": ""}, {"phrase": "[惊奇队长]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/44/avengers_captainmarvel01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/44/avengers_captainmarvel01_thumb.png","value": "[惊奇队长]","picid": ""}, {"phrase": "[奥克耶]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/avengers_aokeye01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/62/avengers_aokeye01_thumb.png","value": "[奥克耶]","picid": ""}, {"phrase": "[蚁人]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cc/avengers_antman01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/cc/avengers_antman01_thumb.png","value": "[蚁人]","picid": ""}, {"phrase": "[灭霸]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ce/avengers_thanos01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ce/avengers_thanos01_thumb.png","value": "[灭霸]","picid": ""}, {"phrase": "[蜘蛛侠]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e2/avengers_spiderman01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e2/avengers_spiderman01_thumb.png","value": "[蜘蛛侠]","picid": ""}, {"phrase": "[洛基]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1f/avengers_locki01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/1f/avengers_locki01_thumb.png","value": "[洛基]","picid": ""}, {"phrase": "[奇异博士]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9c/avengers_drstranger01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/9c/avengers_drstranger01_thumb.png","value": "[奇异博士]","picid": ""}, {"phrase": "[冬兵]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/91/avengers_wintersolider01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/91/avengers_wintersolider01_thumb.png","value": "[冬兵]","picid": ""}, {"phrase": "[黑豹]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/86/avengers_panther01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/86/avengers_panther01_thumb.png","value": "[黑豹]","picid": ""}, {"phrase": "[猩红女巫]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a9/avengers_witch01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/a9/avengers_witch01_thumb.png","value": "[猩红女巫]","picid": ""}, {"phrase": "[幻视]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/07/avengers_vision01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/07/avengers_vision01_thumb.png","value": "[幻视]","picid": ""}, {"phrase": "[星爵]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/35/avengers_starlord01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/35/avengers_starlord01_thumb.png","value": "[星爵]","picid": ""}, {"phrase": "[格鲁特]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7a/avengers_gelute01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7a/avengers_gelute01_thumb.png","value": "[格鲁特]","picid": ""}, {"phrase": "[螳螂妹]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7c/avengers_mantis01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/7c/avengers_mantis01_thumb.png","value": "[螳螂妹]","picid": ""}, {"phrase": "[无限手套]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/38/avengers_gauntlet01_org.png","hot": false,"common": false,"category": "复仇者联盟","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/38/avengers_gauntlet01_thumb.png","value": "[无限手套]","picid": ""}, {"phrase": "[大毛略略]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d0/yunying_damaoluelue_org.png","hot": false,"common": false,"category": "雪人奇缘","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/d0/yunying_damaoluelue_thumb.png","value": "[大毛略略]","picid": ""}, {"phrase": "[大毛惊讶]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4d/yunying_damaojingya_org.png","hot": false,"common": false,"category": "雪人奇缘","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4d/yunying_damaojingya_thumb.png","value": "[大毛惊讶]","picid": ""}, {"phrase": "[大毛微笑]","type": "face","url": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/da/yunying_damaoweixiao_org.png","hot": false,"common": false,"category": "雪人奇缘","icon": "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/da/yunying_damaoweixiao_thumb.png","value": "[大毛微笑]","picid": ""}]; | ||
698 | + var groups = {}, | ||
699 | + categories = [], | ||
700 | + map = {}; | ||
701 | + emotions.forEach(emotion => { | ||
702 | + var cate = emotion.category.length > 0 ? emotion.category : '默认'; | ||
703 | + if (!groups[cate]) { | ||
704 | + groups[cate] = []; | ||
705 | + categories.push(cate); | ||
706 | + } | ||
707 | + groups[cate].push(emotion); | ||
708 | + map[emotion.phrase] = emotion.icon; | ||
709 | + }); | ||
710 | + return { | ||
711 | + groups, | ||
712 | + categories, | ||
713 | + map | ||
714 | + }; | ||
715 | + } | ||
716 | + } | ||
717 | + }); | ||
718 | + }); | ||
719 | +} |
addons/wanlshop/certs/cacert.pem
0 → 100644
addons/wanlshop/config.php
0 → 100644
1 | +<?php | ||
2 | +return [ | ||
3 | + // 客户端配置 | ||
4 | + [ | ||
5 | + 'name' => 'ini', | ||
6 | + 'title' => '客户端配置', | ||
7 | + 'type' => 'array', | ||
8 | + 'value' => [ | ||
9 | + 'name' => '新零售商城', //应用名称 | ||
10 | + 'logo' => '/assets/addons/wanlshop/img/common/logo.png', | ||
11 | + 'copyright' => '2021 深圳前海万联科技有限公司', | ||
12 | + 'urlschemes' => 'wanlshop', // wanlshop:// | ||
13 | + 'package_name' => 'com.wanlian.www', //应用包名 | ||
14 | + // 接口信息 | ||
15 | + 'cdnurl' => 'http://localhost', // CDN 服务器 | ||
16 | + 'appurl' => 'http://localhost/api', // API 服务器 | ||
17 | + 'socketurl' => 'ws://localhost:7272', // 即时通讯 服务器 | ||
18 | + 'debug' => 'N' | ||
19 | + ], | ||
20 | + 'rule' => '', | ||
21 | + 'msg' => '', | ||
22 | + 'tip' => '客户端参数配置', | ||
23 | + 'ok' => '', | ||
24 | + 'extend' => '' | ||
25 | + ], | ||
26 | + // 高德地图SDK------------------------------------------------------------------------------------------- | ||
27 | + [ | ||
28 | + 'name' => 'sdk_amap', | ||
29 | + 'title' => '高德地图SDK配置', | ||
30 | + 'type' => 'array', | ||
31 | + 'value' => [ | ||
32 | + 'amapkey_web' => '0a9f67a6f8f7cc3315d30846a0fde88b', // 高德网页秘钥 | ||
33 | + 'amapkey_ios' => 'd8b84cf540bcca9928db69b0119fc152', // 高德IOS秘钥 | ||
34 | + 'amapkey_android' => '6c3f7522aab215e0704225adaad9f73e' // 高德安卓秘钥 | ||
35 | + ], | ||
36 | + 'rule' => '', | ||
37 | + 'msg' => '', | ||
38 | + 'tip' => '高德地图SDK参数配置', | ||
39 | + 'ok' => '', | ||
40 | + 'extend' => '' | ||
41 | + ], | ||
42 | + // 腾讯开放SDK | ||
43 | + [ | ||
44 | + 'name' => 'sdk_qq', | ||
45 | + 'title' => '腾讯开放SDK配置', | ||
46 | + 'type' => 'array', | ||
47 | + 'value' => [ | ||
48 | + 'qq_appid' => '10******36', // QQ开放平台appid | ||
49 | + 'gz_appid' => 'wx******************e9', // 公众平台ID | ||
50 | + 'wx_appid' => 'wx******************88', // 微信开放平台appid | ||
51 | + 'wx_appsecret' => '22***************************cc', // 微信开放平台appsecret | ||
52 | + 'wx_universal_links' => 'https://wanlshop.com/', // 微信开放平台通用链接 | ||
53 | + 'mch_id' => '16******75', // 微信支付商户ID | ||
54 | + 'key' => 'Hr***************************ew', | ||
55 | + 'notify_url' => '/wanlshop/callback/notify/type/wechat', | ||
56 | + 'pay_cert' => 0 // 可选, 退款,红包等情况时需要用到 | ||
57 | + ], | ||
58 | + 'rule' => '', | ||
59 | + 'msg' => '', | ||
60 | + 'tip' => '腾讯开放SDK参数配置', | ||
61 | + 'ok' => '', | ||
62 | + 'extend' => '' | ||
63 | + ], | ||
64 | + // 支付宝SDK --- | ||
65 | + [ | ||
66 | + 'name' => 'sdk_alipay', | ||
67 | + 'title' => '支付宝SDK配置', | ||
68 | + 'type' => 'array', | ||
69 | + 'value' => [ | ||
70 | + 'app_id' => '20************21', | ||
71 | + 'notify_url' => '/wanlshop/callback/notify/type/alipay', | ||
72 | + 'return_url' => '/wanlshop/callback/return/type/alipay', | ||
73 | + 'ali_public_key' => '', | ||
74 | + 'private_key' => '', | ||
75 | + ], | ||
76 | + 'rule' => '', | ||
77 | + 'msg' => '', | ||
78 | + 'tip' => '支付宝SDK参数配置', | ||
79 | + 'ok' => '', | ||
80 | + 'extend' => '' | ||
81 | + ], | ||
82 | + // 微博开放SDK | ||
83 | + [ | ||
84 | + 'name' => 'sdk_weibo', | ||
85 | + 'title' => '微博开放SDK配置', | ||
86 | + 'type' => 'array', | ||
87 | + 'value' => [ | ||
88 | + 'appkey' => '35********94', // 微博开放平台 appkey | ||
89 | + 'appsecret' => '0a********************************7f', // 微博开放平台 appsecret | ||
90 | + 'redirect_uri' => '/wanlshop/callback/weibo' // 微博开放平台回调地址 | ||
91 | + ], | ||
92 | + 'rule' => '', | ||
93 | + 'msg' => '', | ||
94 | + 'tip' => '微博开放SDK参数配置', | ||
95 | + 'ok' => '', | ||
96 | + 'extend' => '' | ||
97 | + ], | ||
98 | + // 快递100SDK | ||
99 | + [ | ||
100 | + 'name' => 'kuaidi', | ||
101 | + 'title' => '快递100 SDK', | ||
102 | + 'type' => 'array', | ||
103 | + 'value' => [ | ||
104 | + 'secretKey' => 'gm********34', // 快递100 Key | ||
105 | + 'callbackUrl' => '/wanlshop/callback/kuaidi' // 回调地址 | ||
106 | + ], | ||
107 | + 'rule' => '', | ||
108 | + 'msg' => '', | ||
109 | + 'tip' => '快递100 SDK参数配置', | ||
110 | + 'ok' => '', | ||
111 | + 'extend' => '' | ||
112 | + ], | ||
113 | + // H5客户端------------------------------------------------------------------------------------------- | ||
114 | + [ | ||
115 | + 'name' => 'h5', | ||
116 | + 'title' => 'H5客户端', | ||
117 | + 'type' => 'array', | ||
118 | + 'value' => [ | ||
119 | + 'domain' => 'https://m.wanlshop.com', // 域名 | ||
120 | + 'title' => '新零售电商平台', // 标题 | ||
121 | + 'router_mode' => 'hash', // 路由模式 | ||
122 | + 'router_base' => './', // 运行基础路径 | ||
123 | + 'https' => 'N', // 域名 | ||
124 | + 'qqmap_key' => 'V3JBZ-C7Z36-BL7S6-M67TX-6WORS-2TBMN' // H5腾讯地址key | ||
125 | + ], | ||
126 | + 'rule' => '', | ||
127 | + 'msg' => '', | ||
128 | + 'tip' => 'H5客户端配置', | ||
129 | + 'ok' => '', | ||
130 | + 'extend' => '' | ||
131 | + ], | ||
132 | + // 微信小程序配置 | ||
133 | + [ | ||
134 | + 'name' => 'mp_weixin', | ||
135 | + 'title' => '微信小程序', | ||
136 | + 'type' => 'array', | ||
137 | + 'value' => [ | ||
138 | + 'appid' => 'wx**********14b', // AppID | ||
139 | + 'appsecret' => 'e380*************************e037', // AppSecret | ||
140 | + 'scope_userLocation' => '演示定位能力' //客服初始回复 | ||
141 | + ], | ||
142 | + 'rule' => '', | ||
143 | + 'msg' => '', | ||
144 | + 'tip' => '微信小程序配置', | ||
145 | + 'ok' => '', | ||
146 | + 'extend' => '' | ||
147 | + ], | ||
148 | + // 支付宝小程序 | ||
149 | + [ | ||
150 | + 'name' => 'mp_alipay', | ||
151 | + 'title' => '支付宝小程序', | ||
152 | + 'type' => 'array', | ||
153 | + 'value' => [ | ||
154 | + 'appid' => '20**********76' // AppID | ||
155 | + ], | ||
156 | + 'rule' => '', | ||
157 | + 'msg' => '', | ||
158 | + 'tip' => '支付宝小程序配置', | ||
159 | + 'ok' => '', | ||
160 | + 'extend' => '' | ||
161 | + ], | ||
162 | + // 百度小程序 | ||
163 | + [ | ||
164 | + 'name' => 'mp_baidu', | ||
165 | + 'title' => '百度小程序', | ||
166 | + 'type' => 'array', | ||
167 | + 'value' => [ | ||
168 | + 'appid' => '', // AppID | ||
169 | + 'appsecret' => '' // AppSecret | ||
170 | + ], | ||
171 | + 'rule' => '', | ||
172 | + 'msg' => '', | ||
173 | + 'tip' => '百度小程序配置', | ||
174 | + 'ok' => '', | ||
175 | + 'extend' => '' | ||
176 | + ], | ||
177 | + // 头条小程序 | ||
178 | + [ | ||
179 | + 'name' => 'mp_toutiao', | ||
180 | + 'title' => '头条小程序', | ||
181 | + 'type' => 'array', | ||
182 | + 'value' => [ | ||
183 | + 'appid' => '', // AppID | ||
184 | + 'appsecret' => '' // AppSecret | ||
185 | + ], | ||
186 | + 'rule' => '', | ||
187 | + 'msg' => '', | ||
188 | + 'tip' => '头条小程序配置', | ||
189 | + 'ok' => '', | ||
190 | + 'extend' => '' | ||
191 | + ], | ||
192 | + // QQ小程序 | ||
193 | + [ | ||
194 | + 'name' => 'mp_qq', | ||
195 | + 'title' => 'QQ小程序', | ||
196 | + 'type' => 'array', | ||
197 | + 'value' => [ | ||
198 | + 'appid' => '11*****49', // AppID | ||
199 | + 'appsecret' => 'EV***************HX' // AppSecret | ||
200 | + ], | ||
201 | + 'rule' => '', | ||
202 | + 'msg' => '', | ||
203 | + 'tip' => 'QQ小程序配置', | ||
204 | + 'ok' => '', | ||
205 | + 'extend' => '' | ||
206 | + ], | ||
207 | + // 整体样式------------------------------------------------------------------------------------------- | ||
208 | + [ | ||
209 | + 'name' => 'style', | ||
210 | + 'title' => '样式配置', | ||
211 | + 'type' => 'array', | ||
212 | + 'value' => [ | ||
213 | + 'category_style' => '4', // 类目风格 | ||
214 | + | ||
215 | + 'find_bg_color' => '#f7f7f7', // 发现背景颜色 | ||
216 | + 'find_bg_image' => '/assets/addons/wanlshop/img/find/top_bg.png', // 发现背景图片 | ||
217 | + 'find_font_color' => 'light', // 发现状态栏前景色和字体颜色 | ||
218 | + | ||
219 | + 'cart_nav_image' => '', // 购物车导航栏图片 | ||
220 | + 'cart_nav_color' => '', // 购物车导航栏颜色 | ||
221 | + 'cart_font_color' => '', // 购物车状态栏前景色和字体颜色 | ||
222 | + | ||
223 | + 'user_nav_color' => '#ffeccc', // 用户导航栏颜色 | ||
224 | + 'user_nav_image' => '/assets/addons/wanlshop/img/user/top_bg.png', // 用户导航栏图片 | ||
225 | + 'user_bg_color' => '#ffeccc', // 用户背景颜色 | ||
226 | + 'user_bg_image' => '/assets/addons/wanlshop/img/user/user_bg.png', // 用户背景图片 | ||
227 | + 'user_font_color' => '' // 用户页状态栏前景色和字体颜色 | ||
228 | + ], | ||
229 | + 'rule' => '', | ||
230 | + 'msg' => '', | ||
231 | + 'tip' => 'App样式配置', | ||
232 | + 'ok' => '', | ||
233 | + 'extend' => '' | ||
234 | + ], | ||
235 | + // 动态配置------------------------------------------------------------------------------------------- | ||
236 | + [ | ||
237 | + 'name' => 'config', | ||
238 | + 'title' => '动态客户端配置', | ||
239 | + 'type' => 'array', | ||
240 | + 'value' => [ | ||
241 | + // 系统配置 | ||
242 | + 'store_audit' => 'Y', //新店铺是否审核 | ||
243 | + 'comment_switch' => 'Y', // 是否开启评论 | ||
244 | + // 帮助中心 | ||
245 | + 'tel_phone' => '0775-12345678', //联系电话 | ||
246 | + 'working_hours' => '09:00~22:00', //工作时间 | ||
247 | + //商家中心 | ||
248 | + 'shop_document' => '', // 官方文档 | ||
249 | + 'shop_qun' => '', // 商家交流群 | ||
250 | + // 文章ID | ||
251 | + 'user_agreement' => '153', // 用户协议 | ||
252 | + 'privacy_protection' => '154', // 隐私保护 | ||
253 | + // 分类ID | ||
254 | + 'help_category' => '1', // 帮助中心类目ID | ||
255 | + 'new_category' => '2', // 头条新闻类目ID | ||
256 | + 'sys_category' => '4', // 系统消息类目ID | ||
257 | + // 智能客服 | ||
258 | + 'auth_reply' => '欢迎使用在线客服', //自动回复 | ||
259 | + 'not_online' => '[汗] 非工作时间8:00-22:00 或客服繁忙!请稍后再试~', //未在线 | ||
260 | + 'service_initial' => '您好 [微笑] 请用一句话简短描述问题~', //客服初始回复 | ||
261 | + // 微信小程序ID | ||
262 | + 'mp_weixin_id' => 'wx***************4b' //微信小程序ID | ||
263 | + ], | ||
264 | + 'rule' => '', | ||
265 | + 'msg' => '', | ||
266 | + 'tip' => 'App参数配置', | ||
267 | + 'ok' => '', | ||
268 | + 'extend' => '' | ||
269 | + ], | ||
270 | + // 订单配置------------------------------------------------------------------------------------------- | ||
271 | + [ | ||
272 | + 'name' => 'order', | ||
273 | + 'title' => '订单配置', | ||
274 | + 'type' => 'array', | ||
275 | + 'value' => [ | ||
276 | + 'cancel' => '3', // 取消未支付时间 | ||
277 | + 'receiving' => '7', // 自动收货时间 | ||
278 | + 'comment' => '7', | ||
279 | + 'customer' => '7', // 订单售后时间 | ||
280 | + 'autoagree' => '3', | ||
281 | + 'returntime' => '7', | ||
282 | + 'receivingtime' => '7', | ||
283 | + ], | ||
284 | + 'rule' => '', | ||
285 | + 'msg' => '', | ||
286 | + 'tip' => '订单参数配置', | ||
287 | + 'ok' => '', | ||
288 | + 'extend' => '' | ||
289 | + ], | ||
290 | + // 发现页管理 | ||
291 | + [ | ||
292 | + 'name' => 'find', | ||
293 | + 'title' => '直播配置', | ||
294 | + 'type' => 'array', | ||
295 | + 'value' => [ | ||
296 | + 'app_switch' => [ | ||
297 | + 'all' => 'all', | ||
298 | + 'new' => 'new', | ||
299 | + 'live' => 'live', | ||
300 | + 'want' => 'want', | ||
301 | + 'show' => 'show', | ||
302 | + ], | ||
303 | + 'mp_switch' => [ | ||
304 | + 'all' => 'all', | ||
305 | + 'new' => 'new', | ||
306 | + 'live' => 'live', | ||
307 | + 'want' => 'want', | ||
308 | + 'show' => 'show', | ||
309 | + ], | ||
310 | + 'h5_switch' => [ | ||
311 | + 'all' => 'all', | ||
312 | + 'new' => 'new', | ||
313 | + 'live' => 'live', | ||
314 | + 'want' => 'want', | ||
315 | + 'show' => 'show', | ||
316 | + ] | ||
317 | + ], | ||
318 | + 'rule' => '', | ||
319 | + 'msg' => '', | ||
320 | + 'tip' => '订单参数配置', | ||
321 | + 'ok' => '', | ||
322 | + 'extend' => '' | ||
323 | + ], | ||
324 | + // 阿里直播配置------------------------------------------------------------------------------------------- | ||
325 | + [ | ||
326 | + 'name' => 'live', | ||
327 | + 'title' => '直播配置', | ||
328 | + 'type' => 'array', | ||
329 | + 'value' => [ | ||
330 | + 'liveDomain' => 'live.wanlshop.com', // 播域名 | ||
331 | + 'pushDomain' => 'rtmp.wanlshop.com', // 推域名 | ||
332 | + 'builderTime' => '60', // 有效时间分钟 | ||
333 | + 'pushKey' => '0*****v', // 推秘钥 | ||
334 | + 'liveKey' => 'l*****d', // 播秘钥 | ||
335 | + 'liveCnd' => 'https://play.wanlshop.com', // 直播 OSS储存 CND地址 | ||
336 | + 'appName' => 'wanlshop', // 直播项目 | ||
337 | + 'transTemplate' => 'ld' // 转码模板 | ||
338 | + ], | ||
339 | + 'rule' => '', | ||
340 | + 'msg' => '', | ||
341 | + 'tip' => '订单参数配置', | ||
342 | + 'ok' => '', | ||
343 | + 'extend' => '' | ||
344 | + ], | ||
345 | + // 提现配置 | ||
346 | + [ | ||
347 | + 'name' => 'withdraw', | ||
348 | + 'title' => '提现配置', | ||
349 | + 'type' => 'array', | ||
350 | + 'value' => [ | ||
351 | + 'state' => 'Y', // 是否开启提现 | ||
352 | + 'minmoney' => 100, // 最低提现金额 | ||
353 | + 'monthlimit' => 0, // 每月可提现次数 | ||
354 | + 'servicefee' => 6 // 手续费(‰) | ||
355 | + ], | ||
356 | + 'rule' => '', | ||
357 | + 'msg' => '', | ||
358 | + 'tip' => '商城提现参数配置', | ||
359 | + 'ok' => '', | ||
360 | + 'extend' => '' | ||
361 | + ], | ||
362 | + // 温馨提示 | ||
363 | + [ | ||
364 | + 'name' => '__tips__', | ||
365 | + 'title' => '温馨提示', | ||
366 | + 'type' => 'string', | ||
367 | + 'content' => array(), | ||
368 | + 'value' => '不需要此处配置任何参数,请在 [多用户商城] - [客户端管理]和[系统管理] 中管理配置', | ||
369 | + 'rule' => '', | ||
370 | + 'msg' => '', | ||
371 | + 'tip' => '', | ||
372 | + 'ok' => '', | ||
373 | + 'extend' => '', | ||
374 | + ] | ||
375 | +]; |
addons/wanlshop/controller/Index.php
0 → 100644
addons/wanlshop/data/menu.php
0 → 100644
1 | +<?php | ||
2 | +$menu = [ | ||
3 | + [ | ||
4 | + 'name' => 'wanlshop', | ||
5 | + 'title' => '多用户商城', | ||
6 | + 'icon' => 'fa fa-magic', | ||
7 | + 'sublist' => [ | ||
8 | + [ | ||
9 | + 'name' => 'wanlshop/dashboard', | ||
10 | + 'title' => '控制台', | ||
11 | + 'icon' => 'fa fa-dashboard', | ||
12 | + 'weigh' => '5000', | ||
13 | + 'remark' => '商城数据统计', | ||
14 | + 'sublist' => [ | ||
15 | + ['name' => 'wanlshop/dashboard/getSaleStatisticsData', 'ismenu' => 0, 'title' => '获取订单销量销售额统计数据'] | ||
16 | + ] | ||
17 | + ], | ||
18 | + [ | ||
19 | + 'name' => 'wanlnav/goods', | ||
20 | + 'title' => '商品管理', | ||
21 | + 'icon' => 'fa fa-shopping-cart', | ||
22 | + 'weigh' => '4443', | ||
23 | + 'sublist' => [ | ||
24 | + ['name' => 'wanlshop/goods', 'title' => '商品列表', 'ismenu' => 1, 'remark' => '仅用户查看平台商品列表,自营店默认为第一个店铺,自营店管理请在前台管理', 'sublist' => [ | ||
25 | + ['name' => 'wanlshop/goods/index', 'title' => '查看'], | ||
26 | + ['name' => 'wanlshop/goods/edit', 'title' => '修改'], | ||
27 | + ['name' => 'wanlshop/goods/del', 'title' => '删除'], | ||
28 | + ['name' => 'wanlshop/goods/multi', 'title' => '批量更新'], | ||
29 | + ["name" => "wanlshop/goods/recyclebin", "title" => "回收站"], | ||
30 | + ["name" => "wanlshop/goods/restore", "title" => "还原"], | ||
31 | + ["name" => "wanlshop/goods/destroy", "title" => "真实删除"], | ||
32 | + ['name' => 'wanlshop/goods/select', 'title' => '选择'] | ||
33 | + ]], | ||
34 | + ['name' => 'wanlshop/category/goods', 'title' => '类目管理', 'ismenu' => 1, 'remark' => '用于管理商城类目', 'sublist' => [ | ||
35 | + ['name' => 'wanlshop/category/goods/index', 'title' => '查看'], | ||
36 | + ['name' => 'wanlshop/category/add', 'title' => '添加'], | ||
37 | + ['name' => 'wanlshop/category/edit', 'title' => '修改'], | ||
38 | + ['name' => 'wanlshop/category/del', 'title' => '删除'], | ||
39 | + ['name' => 'wanlshop/category/multi', 'title' => '批量更新'], | ||
40 | + ['name' => 'wanlshop/category/create', 'title' => '生成菜单'], | ||
41 | + ['name' => 'wanlshop/category/select', 'title' => '选择'] | ||
42 | + ]], | ||
43 | + ['name' => 'wanlshop/attribute', 'title' => '类目属性', 'ismenu' => 1, 'remark' => '用于管理商城类目属性,商家在新增商品的时展示相关表单', 'sublist' => [ | ||
44 | + ['name' => 'wanlshop/attribute/index', 'title' => '查看'], | ||
45 | + ['name' => 'wanlshop/attribute/add', 'title' => '添加'], | ||
46 | + ['name' => 'wanlshop/attribute/edit', 'title' => '修改'], | ||
47 | + ['name' => 'wanlshop/attribute/del', 'title' => '删除'], | ||
48 | + ['name' => 'wanlshop/attribute/multi', 'title' => '批量更新'], | ||
49 | + ["name" => "wanlshop/attribute/recyclebin", "title" => "回收站"], | ||
50 | + ["name" => "wanlshop/attribute/restore", "title" => "还原"], | ||
51 | + ["name" => "wanlshop/attribute/destroy", "title" => "真实删除"] | ||
52 | + ]], | ||
53 | + ['name' => 'wanlshop/shopsort', 'title' => '商家类目管理', 'ismenu' => 1, 'remark' => '仅用于查看商家自建类目', 'sublist' => [ | ||
54 | + ['name' => 'wanlshop/shopsort/index', 'title' => '查看'], | ||
55 | + ['name' => 'wanlshop/shopsort/add', 'title' => '添加'], | ||
56 | + ['name' => 'wanlshop/shopsort/edit', 'title' => '修改'], | ||
57 | + ['name' => 'wanlshop/shopsort/del', 'title' => '删除'], | ||
58 | + ['name' => 'wanlshop/shopsort/multi', 'title' => '批量更新'] | ||
59 | + ]], | ||
60 | + ['name' => 'wanlshop/brand', 'title' => '品牌管理', 'ismenu' => 1, 'remark' => '用于管理商城品牌', 'sublist' => [ | ||
61 | + ['name' => 'wanlshop/brand/index', 'title' => '查看'], | ||
62 | + ['name' => 'wanlshop/brand/add', 'title' => '添加'], | ||
63 | + ['name' => 'wanlshop/brand/edit', 'title' => '修改'], | ||
64 | + ['name' => 'wanlshop/brand/del', 'title' => '删除'], | ||
65 | + ['name' => 'wanlshop/brand/multi', 'title' => '批量更新'], | ||
66 | + ["name" => "wanlshop/brand/recyclebin", "title" => "回收站"], | ||
67 | + ["name" => "wanlshop/brand/restore", "title" => "还原"], | ||
68 | + ["name" => "wanlshop/brand/destroy", "title" => "真实删除"], | ||
69 | + ["name" => "wanlshop/brand/examine", "title" => "审核品牌"] | ||
70 | + ]] | ||
71 | + ] | ||
72 | + ], | ||
73 | + [ | ||
74 | + 'name' => 'wanlnav/order', | ||
75 | + 'title' => '订单监管', | ||
76 | + 'icon' => 'fa fa-first-order', | ||
77 | + 'weigh' => '4442', | ||
78 | + 'sublist' => [ | ||
79 | + ['name' => 'wanlshop/order', 'title' => '订单列表', 'ismenu' => 1, 'remark' => '仅用户监管商城订单,具体操作请在商家中心管理', 'sublist' => [ | ||
80 | + ['name' => 'wanlshop/order/index', 'title' => '查看'], | ||
81 | + ['name' => 'wanlshop/order/detail', 'title' => '详情'], | ||
82 | + ['name' => 'wanlshop/order/relative', 'title' => '快递查询'], | ||
83 | + ['name' => 'wanlshop/order/add', 'title' => '添加'], | ||
84 | + ['name' => 'wanlshop/order/edit', 'title' => '修改'], | ||
85 | + ['name' => 'wanlshop/order/del', 'title' => '删除'], | ||
86 | + ['name' => 'wanlshop/order/multi', 'title' => '批量更新'], | ||
87 | + ["name" => "wanlshop/order/recyclebin", "title" => "回收站"], | ||
88 | + ["name" => "wanlshop/order/restore", "title" => "还原"], | ||
89 | + ["name" => "wanlshop/order/destroy", "title" => "真实删除"] | ||
90 | + ]], | ||
91 | + ['name' => 'wanlshop/comment', 'title' => '评论管理', 'ismenu' => 1, 'remark' => '仅用户监管商城商家评论,具体操作请在商家中心管理', 'sublist' => [ | ||
92 | + ['name' => 'wanlshop/comment/index', 'title' => '查看'], | ||
93 | + ['name' => 'wanlshop/comment/detail', 'title' => '详情'], | ||
94 | + ['name' => 'wanlshop/comment/add', 'title' => '添加'], | ||
95 | + ['name' => 'wanlshop/comment/edit', 'title' => '修改'], | ||
96 | + ['name' => 'wanlshop/comment/del', 'title' => '删除'], | ||
97 | + ['name' => 'wanlshop/comment/multi', 'title' => '批量更新'], | ||
98 | + ["name" => "wanlshop/comment/recyclebin", "title" => "回收站"], | ||
99 | + ["name" => "wanlshop/comment/restore", "title" => "还原"], | ||
100 | + ["name" => "wanlshop/comment/destroy", "title" => "真实删除"] | ||
101 | + ]] | ||
102 | + ] | ||
103 | + ], | ||
104 | + [ | ||
105 | + 'name' => 'wanlnav/shop', | ||
106 | + 'title' => '店铺管理', | ||
107 | + 'icon' => 'fa fa-archive', | ||
108 | + 'weigh' => '4441', | ||
109 | + 'sublist' => [ | ||
110 | + ['name' => 'wanlshop/shop', 'title' => '店铺列表', 'ismenu' => 1, 'remark' => '用于管理商城所有商家', 'sublist' => [ | ||
111 | + ['name' => 'wanlshop/shop/index', 'title' => '查看'], | ||
112 | + ['name' => 'wanlshop/shop/edit', 'title' => '修改'], | ||
113 | + ['name' => 'wanlshop/shop/del', 'title' => '删除'], | ||
114 | + ['name' => 'wanlshop/shop/multi', 'title' => '批量更新'], | ||
115 | + ["name" => "wanlshop/shop/recyclebin", "title" => "回收站"], | ||
116 | + ["name" => "wanlshop/shop/restore", "title" => "还原"], | ||
117 | + ["name" => "wanlshop/shop/destroy", "title" => "真实删除"] | ||
118 | + ]], | ||
119 | + ['name' => 'wanlshop/auth', 'title' => '新店铺审核', 'ismenu' => 1, 'remark' => '用于管理申请入驻店铺', 'sublist' => [ | ||
120 | + ['name' => 'wanlshop/auth/index', 'title' => '查看'], | ||
121 | + ['name' => 'wanlshop/auth/edit', 'title' => '修改'], | ||
122 | + ['name' => 'wanlshop/auth/del', 'title' => '删除'], | ||
123 | + ['name' => 'wanlshop/auth/multi', 'title' => '批量更新'], | ||
124 | + ["name" => "wanlshop/auth/recyclebin", "title" => "回收站"], | ||
125 | + ["name" => "wanlshop/auth/restore", "title" => "还原"], | ||
126 | + ["name" => "wanlshop/auth/destroy", "title" => "真实删除"], | ||
127 | + ["name" => "wanlshop/auth/detail", "title" => "查看详情"], | ||
128 | + ["name" => "wanlshop/auth/agree", "title" => "同意申请"], | ||
129 | + ["name" => "wanlshop/auth/refuse", "title" => "拒绝申请"] | ||
130 | + ]], | ||
131 | + ['name' => 'wanlshop/address', 'title' => '地址管理', 'ismenu' => 1, 'remark' => '用于监管用户地址', 'sublist' => [ | ||
132 | + ['name' => 'wanlshop/address/index', 'title' => '查看'], | ||
133 | + ['name' => 'wanlshop/address/add', 'title' => '添加'], | ||
134 | + ['name' => 'wanlshop/address/edit', 'title' => '修改'], | ||
135 | + ['name' => 'wanlshop/address/del', 'title' => '删除'], | ||
136 | + ['name' => 'wanlshop/address/multi', 'title' => '批量更新'], | ||
137 | + ["name" => "wanlshop/address/recyclebin", "title" => "回收站"], | ||
138 | + ["name" => "wanlshop/address/restore", "title" => "还原"], | ||
139 | + ["name" => "wanlshop/address/destroy", "title" => "真实删除"] | ||
140 | + ]], | ||
141 | + ['name' => 'wanlshop/service', 'title' => '服务管理', 'ismenu' => 1, 'remark' => '用于管理店铺服务项目', 'sublist' => [ | ||
142 | + ['name' => 'wanlshop/service/index', 'title' => '查看'], | ||
143 | + ['name' => 'wanlshop/service/add', 'title' => '添加'], | ||
144 | + ['name' => 'wanlshop/service/edit', 'title' => '修改'], | ||
145 | + ['name' => 'wanlshop/service/del', 'title' => '删除'], | ||
146 | + ['name' => 'wanlshop/service/multi', 'title' => '批量更新'], | ||
147 | + ["name" => "wanlshop/service/recyclebin", "title" => "回收站"], | ||
148 | + ["name" => "wanlshop/service/restore", "title" => "还原"], | ||
149 | + ["name" => "wanlshop/service/destroy", "title" => "真实删除"], | ||
150 | + ["name" => "wanlshop/service/chat", "title" => "聊天窗口"], | ||
151 | + ]], | ||
152 | + ['name' => 'wanlshop/freight', 'title' => '运费模板', 'ismenu' => 1, 'remark' => '用于查看店铺运费模板,具体操作请在商家中心管理', 'sublist' => [ | ||
153 | + ['name' => 'wanlshop/freight/index', 'title' => '查看'], | ||
154 | + ['name' => 'wanlshop/freight/del', 'title' => '删除'], | ||
155 | + ['name' => 'wanlshop/freight/multi', 'title' => '批量更新'], | ||
156 | + ["name" => "wanlshop/freight/recyclebin", "title" => "回收站"], | ||
157 | + ["name" => "wanlshop/freight/restore", "title" => "还原"], | ||
158 | + ["name" => "wanlshop/freight/destroy", "title" => "真实删除"] | ||
159 | + ]] | ||
160 | + ] | ||
161 | + ], | ||
162 | + [ | ||
163 | + 'name' => 'wanlnav/page', | ||
164 | + 'title' => '装修商城', | ||
165 | + 'icon' => 'fa fa-desktop', | ||
166 | + 'weigh' => '4440', | ||
167 | + 'sublist' => [ | ||
168 | + ['name' => 'wanlshop/page', 'title' => '页面管理', 'ismenu' => 1, 'remark' => '用于管理客户端和商家自定义页面', 'sublist' => [ | ||
169 | + ['name' => 'wanlshop/page/index', 'title' => '查看'], | ||
170 | + ['name' => 'wanlshop/page/add', 'title' => '添加'], | ||
171 | + ['name' => 'wanlshop/page/edit', 'title' => '修改'], | ||
172 | + ['name' => 'wanlshop/page/del', 'title' => '删除'], | ||
173 | + ['name' => 'wanlshop/page/multi', 'title' => '批量更新'], | ||
174 | + ["name" => "wanlshop/page/recyclebin", "title" => "历史页面"], | ||
175 | + ["name" => "wanlshop/page/restore", "title" => "恢复历史"], | ||
176 | + ["name" => "wanlshop/page/destroy", "title" => "真实删除"] | ||
177 | + ]], | ||
178 | + ['name' => 'wanlshop/page/style', 'title' => '全局样式', 'ismenu' => 1, 'remark' => '客户端初始风格,也可以在节日、活动时修改'], | ||
179 | + ['name' => 'wanlshop/link', 'title' => '链接管理', 'ismenu' => 1, 'remark' => '用于自定义页面选择客户端或生成相关链接', 'sublist' => [ | ||
180 | + ['name' => 'wanlshop/link/index', 'title' => '查看'], | ||
181 | + ['name' => 'wanlshop/link/add', 'title' => '添加'], | ||
182 | + ['name' => 'wanlshop/link/edit', 'title' => '修改'], | ||
183 | + ['name' => 'wanlshop/link/del', 'title' => '删除'], | ||
184 | + ['name' => 'wanlshop/link/multi', 'title' => '批量更新'], | ||
185 | + ["name" => "wanlshop/link/recyclebin", "title" => "回收站"], | ||
186 | + ["name" => "wanlshop/link/restore", "title" => "还原"], | ||
187 | + ["name" => "wanlshop/link/destroy", "title" => "真实删除"], | ||
188 | + ['name' => 'wanlshop/link/select', 'title' => '选择'] | ||
189 | + ]], | ||
190 | + ['name' => 'wanlshop/icon', 'title' => '图标管理', 'ismenu' => 1, 'remark' => '用于自定义页面配置图标', 'sublist' => [ | ||
191 | + ['name' => 'wanlshop/icon/index', 'title' => '查看'], | ||
192 | + ['name' => 'wanlshop/icon/add', 'title' => '添加'], | ||
193 | + ['name' => 'wanlshop/icon/edit', 'title' => '修改'], | ||
194 | + ['name' => 'wanlshop/icon/del', 'title' => '删除'], | ||
195 | + ['name' => 'wanlshop/icon/multi', 'title' => '批量更新'], | ||
196 | + ["name" => "wanlshop/icon/recyclebin", "title" => "回收站"], | ||
197 | + ["name" => "wanlshop/icon/restore", "title" => "还原"], | ||
198 | + ["name" => "wanlshop/icon/destroy", "title" => "真实删除"], | ||
199 | + ['name' => 'wanlshop/icon/select', 'title' => '选择'] | ||
200 | + ]] | ||
201 | + ] | ||
202 | + ], | ||
203 | + [ | ||
204 | + 'name' => 'wanlnav/kefu', | ||
205 | + 'title' => '客服服务', | ||
206 | + 'icon' => 'fa fa-comments', | ||
207 | + 'weigh' => '4439', | ||
208 | + 'sublist' => [ | ||
209 | + ['name' => 'wanlshop/complaint', 'title' => '投诉管理', 'ismenu' => 1, 'remark' => '用于管理用户在客户端发起的用户、商品、店铺举报投诉', 'sublist' => [ | ||
210 | + ['name' => 'wanlshop/complaint/index', 'title' => '查看'], | ||
211 | + ['name' => 'wanlshop/complaint/detail', 'title' => '详情'], | ||
212 | + ['name' => 'wanlshop/complaint/del', 'title' => '删除'], | ||
213 | + ['name' => 'wanlshop/complaint/multi', 'title' => '批量更新'], | ||
214 | + ["name" => "wanlshop/complaint/recyclebin", "title" => "回收站"], | ||
215 | + ["name" => "wanlshop/complaint/restore", "title" => "还原"], | ||
216 | + ["name" => "wanlshop/complaint/destroy", "title" => "真实删除"] | ||
217 | + ]], | ||
218 | + ['name' => 'wanlshop/feedback', 'title' => '意见反馈', 'ismenu' => 1, 'remark' => '用户管理用户在客户端提供给平台意见反馈', 'sublist' => [ | ||
219 | + ['name' => 'wanlshop/feedback/index', 'title' => '查看'], | ||
220 | + ['name' => 'wanlshop/feedback/detail', 'title' => '退款详情'], | ||
221 | + ['name' => 'wanlshop/feedback/del', 'title' => '删除'], | ||
222 | + ['name' => 'wanlshop/feedback/multi', 'title' => '批量更新'], | ||
223 | + ["name" => "wanlshop/feedback/recyclebin", "title" => "回收站"], | ||
224 | + ["name" => "wanlshop/feedback/restore", "title" => "还原"], | ||
225 | + ["name" => "wanlshop/feedback/destroy", "title" => "真实删除"] | ||
226 | + ]], | ||
227 | + ['name' => 'wanlshop/refund', 'title' => '退款管理', 'ismenu' => 1, 'remark' => '仅用户监管商城退款,具体操作请在商家中心管理', 'sublist' => [ | ||
228 | + ['name' => 'wanlshop/refund/index', 'title' => '查看'], | ||
229 | + ['name' => 'wanlshop/refund/detail', 'title' => '退款详情'], | ||
230 | + ['name' => 'wanlshop/refund/agree', 'title' => '同意退款'], | ||
231 | + ['name' => 'wanlshop/refund/refuse', 'title' => '平台判定拒绝退款'], | ||
232 | + ['name' => 'wanlshop/refund/del', 'title' => '删除'], | ||
233 | + ['name' => 'wanlshop/refund/multi', 'title' => '批量更新'] | ||
234 | + ]] | ||
235 | + ] | ||
236 | + ], | ||
237 | + [ | ||
238 | + 'name' => 'wanlnav/finance', | ||
239 | + 'title' => '财务管理', | ||
240 | + 'icon' => 'fa fa-paypal', | ||
241 | + 'weigh' => '4438', | ||
242 | + 'sublist' => [ | ||
243 | + ['name' => 'wanlshop/money', 'title' => '资金账单', 'ismenu' => 1, 'remark' => '用于查看平台商品交易、充值、提现、退款', 'sublist' => [ | ||
244 | + ['name' => 'wanlshop/money/index', 'title' => '查看'], | ||
245 | + ['name' => 'wanlshop/money/detail', 'title' => '详情'] | ||
246 | + ]], | ||
247 | + ['name' => 'wanlshop/withdraw', 'title' => '用户提现', 'ismenu' => 1, 'remark' => '用于管理用户提现审核、同意、拒绝', 'sublist' => [ | ||
248 | + ['name' => 'wanlshop/withdraw/index', 'title' => '查看'], | ||
249 | + ['name' => 'wanlshop/withdraw/detail', 'title' => '详情'], | ||
250 | + ['name' => 'wanlshop/withdraw/agree', 'title' => '同意'], | ||
251 | + ['name' => 'wanlshop/withdraw/refuse', 'title' => '拒绝'], | ||
252 | + ['name' => 'wanlshop/withdraw/del', 'title' => '删除'], | ||
253 | + ['name' => 'wanlshop/withdraw/multi', 'title' => '批量更新'] | ||
254 | + ]] | ||
255 | + ] | ||
256 | + ], | ||
257 | + [ | ||
258 | + 'name' => 'wanlnav/article', | ||
259 | + 'title' => '内容管理', | ||
260 | + 'icon' => 'fa fa-pencil-square', | ||
261 | + 'weigh' => '4437', | ||
262 | + 'sublist' => [ | ||
263 | + ['name' => 'wanlshop/article', 'title' => '文章列表', 'ismenu' => 1, 'remark' => '用于管理客户端的新闻、协议、帮助、及智能客服相关解答', 'sublist' => [ | ||
264 | + ['name' => 'wanlshop/article/index', 'title' => '查看'], | ||
265 | + ['name' => 'wanlshop/article/add', 'title' => '添加'], | ||
266 | + ['name' => 'wanlshop/article/edit', 'title' => '修改'], | ||
267 | + ['name' => 'wanlshop/article/del', 'title' => '删除'], | ||
268 | + ['name' => 'wanlshop/article/multi', 'title' => '批量更新'], | ||
269 | + ["name" => "wanlshop/article/recyclebin", "title" => "回收站"], | ||
270 | + ["name" => "wanlshop/article/restore", "title" => "还原"], | ||
271 | + ["name" => "wanlshop/article/destroy", "title" => "真实删除"], | ||
272 | + ["name" => "wanlshop/article/select", "title" => "选择"] | ||
273 | + ]], | ||
274 | + ['name' => 'wanlshop/category/article', 'title' => '分类管理', 'ismenu' => 1, 'remark' => '用于管理客户端文章类目'], | ||
275 | + ['name' => 'wanlshop/find', 'title' => '发现动态', 'ismenu' => 1, 'remark' => '仅用于查看商家动态', 'sublist' => [ | ||
276 | + ['name' => 'wanlshop/find/index', 'title' => '查看'], | ||
277 | + ['name' => 'wanlshop/find/del', 'title' => '删除'], | ||
278 | + ['name' => 'wanlshop/find/multi', 'title' => '批量更新'], | ||
279 | + ["name" => "wanlshop/find/recyclebin", "title" => "回收站"], | ||
280 | + ["name" => "wanlshop/find/restore", "title" => "还原"], | ||
281 | + ["name" => "wanlshop/find/destroy", "title" => "真实删除"] | ||
282 | + ]] | ||
283 | + ] | ||
284 | + ], | ||
285 | + [ | ||
286 | + 'name' => 'wanlnav/client', | ||
287 | + 'title' => '生成客户端', | ||
288 | + 'icon' => 'fa fa-cloud', | ||
289 | + 'weigh' => '4436', | ||
290 | + 'sublist' => [ | ||
291 | + ['name' => 'wanlshop/client/edit', 'title' => '全局修改配置', 'weigh' => '43991'], | ||
292 | + ['name' => 'wanlshop/client/download', 'title' => '打包下载', 'weigh' => '4399'], | ||
293 | + ['name' => 'wanlshop/client/client', 'title' => '客户端配置', 'weigh' => '4398', 'ismenu' => 1, 'remark' => '用于客户端(应用)全局配置'], | ||
294 | + ['name' => 'wanlshop/client/app', 'title' => 'App管理', 'weigh' => '4397', 'ismenu' => 1, 'remark' => '用于App客户端参数配置和本地一键打包安卓 & 苹果应用'], | ||
295 | + ['name' => 'wanlshop/client/h5', 'title' => 'H5管理', 'weigh' => '4396', 'ismenu' => 1, 'remark' => '用于H5客户端参数配置和一键本地打包H5客户端'], | ||
296 | + ['name' => 'wanlshop/client/mpweixin', 'title' => '微信小程序', 'weigh' => '4395', 'ismenu' => 1, 'remark' => '用于微信小程序参数配置和一键本地打包微信小程序'], | ||
297 | + ['name' => 'wanlshop/client/mpbaidu', 'title' => '百度小程序', 'weigh' => '4394', 'ismenu' => 1, 'remark' => '用于百度小程序参数配置和一键本地打包百度小程序'], | ||
298 | + ['name' => 'wanlshop/client/mptoutiao', 'title' => '字节跳动小程序', 'weigh' => '4393', 'ismenu' => 1, 'remark' => '用于字节跳动小程序参数配置和一键本地打包字节跳动小程序'], | ||
299 | + ['name' => 'wanlshop/client/mpalipay', 'title' => '支付宝小程序', 'weigh' => '4392', 'ismenu' => 1, 'remark' => '用于支付宝小程序参数配置和一键本地打包支付宝小程序'], | ||
300 | + ['name' => 'wanlshop/client/mpqq', 'title' => 'QQ小程序', 'weigh' => '4391', 'ismenu' => 1, 'remark' => '用于QQ小程序参数配置和一键本地打包QQ小程序'] | ||
301 | + ] | ||
302 | + ], | ||
303 | + [ | ||
304 | + 'name' => 'wanlnav/config', | ||
305 | + 'title' => '系统管理', | ||
306 | + 'icon' => 'fa fa-cog', | ||
307 | + 'weigh' => '4435', | ||
308 | + 'sublist' => [ | ||
309 | + ['name' => 'wanlshop/client/config', 'title' => '系统设置', 'weigh' => '4355', 'ismenu' => 1, 'remark' => '用于电商系统核心配置'], | ||
310 | + ['name' => 'wanlshop/advert', 'title' => '广告管理', 'weigh' => '4354', 'ismenu' => 1, 'remark' => '用于广告系统在线管理', 'sublist' => [ | ||
311 | + ['name' => 'wanlshop/advert/index', 'title' => '查看'], | ||
312 | + ['name' => 'wanlshop/advert/add', 'title' => '添加'], | ||
313 | + ['name' => 'wanlshop/advert/edit', 'title' => '修改'], | ||
314 | + ['name' => 'wanlshop/advert/del', 'title' => '删除'], | ||
315 | + ['name' => 'wanlshop/advert/multi', 'title' => '批量更新'], | ||
316 | + ["name" => "wanlshop/advert/recyclebin", "title" => "回收站"], | ||
317 | + ["name" => "wanlshop/advert/restore", "title" => "还原"], | ||
318 | + ["name" => "wanlshop/advert/destroy", "title" => "真实删除"], | ||
319 | + ["name" => "wanlshop/advert/select", "title" => "选择"] | ||
320 | + ]], | ||
321 | + ['name' => 'wanlshop/version', 'title' => 'App热更新', 'weigh' => '4352', 'ismenu' => 1, 'remark' => '仅用于App客户端在线升级配置', 'sublist' => [ | ||
322 | + ['name' => 'wanlshop/version/index', 'title' => '查看'], | ||
323 | + ['name' => 'wanlshop/version/add', 'title' => '添加'], | ||
324 | + ['name' => 'wanlshop/version/edit', 'title' => '修改'], | ||
325 | + ['name' => 'wanlshop/version/del', 'title' => '删除'], | ||
326 | + ['name' => 'wanlshop/version/multi', 'title' => '批量更新'] | ||
327 | + ]], | ||
328 | + ['name' => 'wanlshop/search', 'title' => '搜索管理', 'weigh' => '4353', 'ismenu' => 1, 'remark' => '用于查看用户搜索记录和配置热门搜索置顶关键字', 'sublist' => [ | ||
329 | + ['name' => 'wanlshop/search/index', 'title' => '查看'], | ||
330 | + ['name' => 'wanlshop/search/add', 'title' => '添加'], | ||
331 | + ['name' => 'wanlshop/search/edit', 'title' => '修改'], | ||
332 | + ['name' => 'wanlshop/search/del', 'title' => '删除'], | ||
333 | + ['name' => 'wanlshop/search/multi', 'title' => '批量更新'], | ||
334 | + ["name" => "wanlshop/search/recyclebin", "title" => "回收站"], | ||
335 | + ["name" => "wanlshop/search/restore", "title" => "还原"], | ||
336 | + ["name" => "wanlshop/search/destroy", "title" => "真实删除"] | ||
337 | + ]], | ||
338 | + ['name' => 'wanlshop/qrcode', 'title' => '配置二维码', 'weigh' => '4351', 'ismenu' => 1, 'remark' => '用于二维码海报生成配置', 'sublist' => [ | ||
339 | + ['name' => 'wanlshop/qrcode/index', 'title' => '查看'], | ||
340 | + ['name' => 'wanlshop/qrcode/add', 'title' => '添加'], | ||
341 | + ['name' => 'wanlshop/qrcode/edit', 'title' => '修改'], | ||
342 | + ['name' => 'wanlshop/qrcode/del', 'title' => '删除'], | ||
343 | + ['name' => 'wanlshop/qrcode/multi', 'title' => '批量更新'], | ||
344 | + ["name" => "wanlshop/qrcode/recyclebin", "title" => "回收站"], | ||
345 | + ["name" => "wanlshop/qrcode/restore", "title" => "还原"], | ||
346 | + ["name" => "wanlshop/qrcode/destroy", "title" => "真实删除"] | ||
347 | + ]] | ||
348 | + ] | ||
349 | + ], | ||
350 | + [ | ||
351 | + 'name' => 'wanlnav/chat', | ||
352 | + 'title' => 'IM即时通讯接口', | ||
353 | + 'icon' => 'fa fa-circle-o', | ||
354 | + 'weigh' => '4436', | ||
355 | + 'ismenu' => 0, | ||
356 | + 'sublist' => [ | ||
357 | + ['name' => 'wanlshop/service/lists', 'title' => '聊天列表', 'ismenu' => 0], | ||
358 | + ['name' => 'wanlshop/service/bind', 'title' => '绑定', 'ismenu' => 0], | ||
359 | + ['name' => 'wanlshop/service/history', 'title' => '查询历史记录', 'ismenu' => 0], | ||
360 | + ['name' => 'wanlshop/service/read', 'title' => '全部已读', 'ismenu' => 0], | ||
361 | + ['name' => 'wanlshop/service/send', 'title' => '发送', 'ismenu' => 0], | ||
362 | + ['name' => 'wanlshop/service/close', 'title' => '关闭聊天窗口', 'ismenu' => 0] | ||
363 | + ] | ||
364 | + ], | ||
365 | + ] | ||
366 | + ] | ||
367 | +]; | ||
368 | +return $menu; |
addons/wanlshop/info.ini
0 → 100644
addons/wanlshop/install.sql
0 → 100644
此 diff 太大无法显示。
addons/wanlshop/library/Alilive.php
0 → 100644
1 | +<?php | ||
2 | +namespace addons\wanlshop\library; | ||
3 | + | ||
4 | +final class Alilive | ||
5 | +{ | ||
6 | + | ||
7 | + private $liveDomain; // 播域名 | ||
8 | + private $pushDomain; // 推域名 | ||
9 | + private $builderTime; // 有效时间 | ||
10 | + private $pushKey; // 推秘钥 | ||
11 | + private $liveKey; // 播秘钥 | ||
12 | + private $appName; // 直播项目 | ||
13 | + private $streamName; //流名 | ||
14 | + private $shopId; //商家ID | ||
15 | + private $transTemplate; // 转码模板 | ||
16 | + | ||
17 | + | ||
18 | + public function __construct($liveDomain, $pushDomain, $builderTime, $pushKey, $liveKey, $appName, $streamName, $shopId, $transTemplate = '') | ||
19 | + { | ||
20 | + $this->liveDomain = $liveDomain; | ||
21 | + $this->pushDomain = $pushDomain; | ||
22 | + $this->builderTime = time() + 60 * $builderTime; | ||
23 | + $this->pushKey = $pushKey; | ||
24 | + $this->liveKey = $liveKey; | ||
25 | + $this->appName = $appName; | ||
26 | + $this->streamName = $streamName; | ||
27 | + $this->shopId = $shopId ? $shopId : 0; | ||
28 | + $this->transTemplate = $transTemplate ? '_'.$transTemplate : ''; | ||
29 | + } | ||
30 | + | ||
31 | + public function urlBuilder() | ||
32 | + { | ||
33 | + return [ | ||
34 | + 'pushurl' => "rtmp://$this->pushDomain/$this->appName/$this->streamName?auth_key=$this->builderTime-$this->shopId-0-".$this->auth_key('pushurl'), | ||
35 | + 'rtmpurl' => "rtmp://$this->liveDomain/$this->appName/$this->streamName$this->transTemplate?auth_key=$this->builderTime-$this->shopId-0-".$this->auth_key('rtmpurl'), | ||
36 | + 'm3u8url' => "https://$this->liveDomain/$this->appName/$this->streamName$this->transTemplate.m3u8?auth_key=$this->builderTime-$this->shopId-0-".$this->auth_key('m3u8url') | ||
37 | + ]; | ||
38 | + } | ||
39 | + | ||
40 | + /** | ||
41 | + * 生成加密串 | ||
42 | + * @param {Object} | ||
43 | + */ | ||
44 | + public function auth_key($type) | ||
45 | + { | ||
46 | + switch ($type) | ||
47 | + { | ||
48 | + case 'pushurl': | ||
49 | + return md5("/$this->appName/$this->streamName-$this->builderTime-$this->shopId-0-$this->pushKey"); | ||
50 | + break; | ||
51 | + case 'rtmpurl': | ||
52 | + return md5("/$this->appName/$this->streamName$this->transTemplate-$this->builderTime-$this->shopId-0-$this->liveKey"); | ||
53 | + break; | ||
54 | + case 'm3u8url': | ||
55 | + return md5("/$this->appName/$this->streamName$this->transTemplate.m3u8-$this->builderTime-$this->shopId-0-$this->liveKey"); | ||
56 | + break; | ||
57 | + } | ||
58 | + } | ||
59 | +} |
1 | +/** | ||
2 | + * WanlShop 多用户电商系统核心配置项 | ||
3 | + * @author 深圳前海万联科技有限公司 <wanlshop@i36k.com> | ||
4 | + * < 本程序,未经版权所有权人书面许可,不能自行用于商业用途!> | ||
5 | + * | ||
6 | + * @config socketUrl 即时通讯服务器地址,微信必须使用wss:// 如:wss://chat.wanlshop.com | ||
7 | + * @config cdnUrl OSS服务地址 如:https://oss.wanlshop.com 或 https://www.wanlshop.com | ||
8 | + * @config appUrl API服务器地址 如:https://api.wanlshop.com 或 https://www.wanlshop.com/api | ||
9 | + * @config amapKey 高德网页Key | ||
10 | + * @config debug 全局调试 | ||
11 | + * | ||
12 | + * @ 相关文档 https://doc.fastadmin.net/wanlshop/265.html | ||
13 | + * | ||
14 | + * @version 1.0.3 | ||
15 | + */ | ||
16 | + | ||
17 | +// @ 重要提示:你可以看到此页面!!! | ||
18 | +// 则证明操作不正确,请先【客户端配置】完成配置 【点击更新】再【生成源码】 | ||
19 | +// 请参考文档 | ||
20 | + | ||
21 | +export default { | ||
22 | + socketurl: 'wss://chat.wanlshop.com', //如果是ws:// 地址为ws://你服务器IP:7272 如 ws://123.4.56.78:7272,使用wss 后面不需要添加 :7272 端口 | ||
23 | + cdnurl: 'https://stc.wanlshop.com', | ||
24 | + appurl: 'https://api.wanlshop.com', //如二级域名:https://api.wanlshop.com 或不使用二级域名 https://www.wanlshop.com/api | ||
25 | + amapkey: '0a9f67a6f8f7cc3315d30846a0fde88b', | ||
26 | + versionName: '1.0.3', | ||
27 | + versionCode: '103', | ||
28 | + debug: false | ||
29 | +} |
1 | +/** | ||
2 | + * WanlShop 多用户电商系统核心配置项 | ||
3 | + * @author 深圳前海万联科技有限公司 <wanlshop@i36k.com> | ||
4 | + * < 本程序,未经版权所有权人书面许可,不能自行用于商业用途!> | ||
5 | + * | ||
6 | + * @config socketUrl 即时通讯服务器地址,微信必须使用wss:// 如:wss://chat.wanlshop.com | ||
7 | + * @config cdnUrl OSS服务地址 如:https://oss.wanlshop.com 或 https://www.wanlshop.com | ||
8 | + * @config appUrl API服务器地址 如:https://api.wanlshop.com 或 https://www.wanlshop.com/api | ||
9 | + * @config amapKey 高德网页Key | ||
10 | + * @config debug 全局调试 | ||
11 | + * | ||
12 | + * @ 相关文档 https://doc.fastadmin.net/wanlshop/265.html | ||
13 | + * | ||
14 | + * @version 1.0.2 | ||
15 | + */ | ||
16 | +export default { | ||
17 | + socketurl: '{socketurl}', //如果是ws:// 地址为ws://你服务器IP:7272 如 ws://123.4.56.78:7272,使用wss 后面不需要添加 :7272 端口 | ||
18 | + cdnurl: '{cdnurl}', | ||
19 | + appurl: '{appurl}', //如二级域名:https://api.wanlshop.com 或不使用二级域名 https://www.wanlshop.com/api | ||
20 | + amapkey: '{amapkey}', | ||
21 | + versionName: '{versionName}', | ||
22 | + versionCode: '{versionCode}', | ||
23 | + debug: {debug} | ||
24 | +} |
1 | +{ | ||
2 | + "name" : "{name}", | ||
3 | + "appid" : "__UNI__WANLSHOP", | ||
4 | + "description" : "© 深圳前海万联科技有限公司", | ||
5 | + "versionName" : "{versionName}", | ||
6 | + "versionCode" : {versionCode}, | ||
7 | + "transformPx" : false, | ||
8 | + /* 5+App特有相关 */ | ||
9 | + "app-plus" : { | ||
10 | + "usingComponents" : true, | ||
11 | + "nvueCompiler" : "uni-app", | ||
12 | + "splashscreen" : { | ||
13 | + "alwaysShowBeforeRender" : false, | ||
14 | + "waiting" : false, | ||
15 | + "autoclose" : false, | ||
16 | + "delay" : 0 | ||
17 | + }, | ||
18 | + "modules" : { | ||
19 | + "Payment" : {}, | ||
20 | + "Push" : {}, | ||
21 | + "Share" : {}, | ||
22 | + "Speech" : {}, | ||
23 | + "VideoPlayer" : {}, | ||
24 | + "LivePusher" : {}, | ||
25 | + "OAuth" : {}, | ||
26 | + "Maps" : {}, | ||
27 | + "Webview-x5" : {} | ||
28 | + }, | ||
29 | + /* 应用发布信息 */ | ||
30 | + "distribute" : { | ||
31 | + /* android打包配置 1.0.3升级 热更新 添加权限REQUEST_INSTALL_PACKAGES 同时修改了 targetSdkVersion 为 26 以适配 Android 9.0 */ | ||
32 | + "android" : { | ||
33 | + "packagename": "{package_name}", | ||
34 | + "permissions" : [ | ||
35 | + "<uses-feature android:name=\"android.hardware.camera\"/>", | ||
36 | + "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", | ||
37 | + "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>", | ||
38 | + "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>", | ||
39 | + "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", | ||
40 | + "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", | ||
41 | + "<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>", | ||
42 | + "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", | ||
43 | + "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", | ||
44 | + "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", | ||
45 | + "<uses-permission android:name=\"android.permission.CAMERA\"/>", | ||
46 | + "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", | ||
47 | + "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", | ||
48 | + "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", | ||
49 | + "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", | ||
50 | + "<uses-permission android:name=\"android.permission.GET_TASKS\"/>", | ||
51 | + "<uses-permission android:name=\"android.permission.INTERNET\"/>", | ||
52 | + "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", | ||
53 | + "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", | ||
54 | + "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", | ||
55 | + "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", | ||
56 | + "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", | ||
57 | + "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>", | ||
58 | + "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", | ||
59 | + "<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>", | ||
60 | + "<uses-permission android:name=\"android.permission.VIBRATE\"/>", | ||
61 | + "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", | ||
62 | + "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", | ||
63 | + "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", | ||
64 | + "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", | ||
65 | + "<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>" | ||
66 | + ], | ||
67 | + "targetSdkVersion" : "26", | ||
68 | + "schemes" : "{urlschemes}", | ||
69 | + "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ] | ||
70 | + }, | ||
71 | + /* ios打包配置 */ | ||
72 | + "ios" : { | ||
73 | + "appid": "{package_name}", | ||
74 | + "UIBackgroundModes" : [ "audio" ], | ||
75 | + "urlschemewhitelist" : [ "baidumap", "iosamap" ], | ||
76 | + "idfa" : false, | ||
77 | + "urltypes" : "{urlschemes}" | ||
78 | + }, | ||
79 | + /* SDK配置 */ | ||
80 | + "sdkConfigs" : { | ||
81 | + "speech" : { | ||
82 | + "ifly" : {} | ||
83 | + }, | ||
84 | + "ad" : {}, | ||
85 | + "payment" : { | ||
86 | + "weixin" : { | ||
87 | + "appid" : "{wx_appid}", | ||
88 | + "UniversalLinks" : "{wx_universal_links}" | ||
89 | + }, | ||
90 | + "appleiap" : {}, | ||
91 | + "alipay" : {} | ||
92 | + }, | ||
93 | + "push" : { | ||
94 | + "unipush" : {} | ||
95 | + }, | ||
96 | + "oauth" : { | ||
97 | + "apple" : {}, | ||
98 | + "weixin" : { | ||
99 | + "appid" : "{wx_appid}", | ||
100 | + "appsecret" : "{wx_appsecret}", | ||
101 | + "UniversalLinks" : "{wx_universal_links}" | ||
102 | + }, | ||
103 | + "qq" : { | ||
104 | + "appid" : "{qq_appid}" | ||
105 | + }, | ||
106 | + "sina" : { | ||
107 | + "appkey" : "{appkey}", | ||
108 | + "appsecret" : "{appsecret}", | ||
109 | + "redirect_uri" : "{redirect_uri}" | ||
110 | + } | ||
111 | + }, | ||
112 | + "share" : { | ||
113 | + "weixin" : { | ||
114 | + "appid" : "{wx_appid}", | ||
115 | + "UniversalLinks" : "{wx_universal_links}" | ||
116 | + }, | ||
117 | + "qq" : { | ||
118 | + "appid" : "{qq_appid}" | ||
119 | + } | ||
120 | + }, | ||
121 | + "maps" : { | ||
122 | + "amap" : { | ||
123 | + "appkey_ios" : "{amapkey_ios}", | ||
124 | + "appkey_android" : "{amapkey_android}" | ||
125 | + } | ||
126 | + } | ||
127 | + }, | ||
128 | + "orientation" : [ "portrait-primary" ], | ||
129 | + "splashscreen" : { | ||
130 | + "android" : { | ||
131 | + "hdpi" : "", | ||
132 | + "xxhdpi" : "", | ||
133 | + "xhdpi" : "" | ||
134 | + }, | ||
135 | + "ios" : { | ||
136 | + "iphone" : { | ||
137 | + "portrait-896h@3x" : "", | ||
138 | + "landscape-896h@3x" : "" | ||
139 | + } | ||
140 | + }, | ||
141 | + "androidStyle" : "common", | ||
142 | + "iosStyle" : "common" | ||
143 | + }, | ||
144 | + "icons" : { | ||
145 | + "android" : { | ||
146 | + "hdpi" : "unpackage/res/icons/72x72.png", | ||
147 | + "xhdpi" : "unpackage/res/icons/96x96.png", | ||
148 | + "xxhdpi" : "unpackage/res/icons/144x144.png", | ||
149 | + "xxxhdpi" : "unpackage/res/icons/192x192.png" | ||
150 | + }, | ||
151 | + "ios" : { | ||
152 | + "appstore" : "unpackage/res/icons/1024x1024.png", | ||
153 | + "ipad" : { | ||
154 | + "app" : "unpackage/res/icons/76x76.png", | ||
155 | + "app@2x" : "unpackage/res/icons/152x152.png", | ||
156 | + "notification" : "unpackage/res/icons/20x20.png", | ||
157 | + "notification@2x" : "unpackage/res/icons/40x40.png", | ||
158 | + "proapp@2x" : "unpackage/res/icons/167x167.png", | ||
159 | + "settings" : "unpackage/res/icons/29x29.png", | ||
160 | + "settings@2x" : "unpackage/res/icons/58x58.png", | ||
161 | + "spotlight" : "unpackage/res/icons/40x40.png", | ||
162 | + "spotlight@2x" : "unpackage/res/icons/80x80.png" | ||
163 | + }, | ||
164 | + "iphone" : { | ||
165 | + "app@2x" : "unpackage/res/icons/120x120.png", | ||
166 | + "app@3x" : "unpackage/res/icons/180x180.png", | ||
167 | + "notification@2x" : "unpackage/res/icons/40x40.png", | ||
168 | + "notification@3x" : "unpackage/res/icons/60x60.png", | ||
169 | + "settings@2x" : "unpackage/res/icons/58x58.png", | ||
170 | + "settings@3x" : "unpackage/res/icons/87x87.png", | ||
171 | + "spotlight@2x" : "unpackage/res/icons/80x80.png", | ||
172 | + "spotlight@3x" : "unpackage/res/icons/120x120.png" | ||
173 | + } | ||
174 | + } | ||
175 | + } | ||
176 | + }, | ||
177 | + /* 不使用原生占位 http://ask.dcloud.net.cn/article/35564 */ | ||
178 | + "safearea" : { | ||
179 | + "bottom" : { | ||
180 | + "offset" : "none" | ||
181 | + } | ||
182 | + }, | ||
183 | + "compilerVersion" : 3, | ||
184 | + "nvueLaunchMode" : "fast", | ||
185 | + "uniStatistics" : { | ||
186 | + "enable" : false | ||
187 | + } | ||
188 | + }, | ||
189 | + /* 快应用特有相关 */ | ||
190 | + "quickapp" : {}, | ||
191 | + /* 小程序特有相关 */ | ||
192 | + "mp-weixin" : { | ||
193 | + "appid" : "{wx_mp_appid}", | ||
194 | + "setting" : { | ||
195 | + "urlCheck" : true, | ||
196 | + "es6" : true, | ||
197 | + "minified" : true, | ||
198 | + "postcss" : true | ||
199 | + }, | ||
200 | + "usingComponents" : true, | ||
201 | + "permission" : { | ||
202 | + "scope.userLocation" : { | ||
203 | + "desc" : "{wx_mp_scope_userLocation}" | ||
204 | + } | ||
205 | + }, | ||
206 | + "uniStatistics" : { | ||
207 | + "enable" : false | ||
208 | + } | ||
209 | + }, | ||
210 | + "mp-qq" : { | ||
211 | + "appid" : "{qq_mp_appid}", | ||
212 | + "uniStatistics" : { | ||
213 | + "enable" : true | ||
214 | + }, | ||
215 | + "setting" : { | ||
216 | + "es6" : true, | ||
217 | + "postcss" : true, | ||
218 | + "minified" : true, | ||
219 | + "urlCheck" : true | ||
220 | + }, | ||
221 | + "permission" : { | ||
222 | + "scope.userLocation" : { | ||
223 | + "desc" : "商城需要获取当前位置,查询附近商品和完善购物地址" | ||
224 | + } | ||
225 | + } | ||
226 | + }, | ||
227 | + "mp-alipay" : { | ||
228 | + "usingComponents" : true, | ||
229 | + "appid" : "{alipay_mp_appid}", | ||
230 | + "uniStatistics" : { | ||
231 | + "enable" : true | ||
232 | + } | ||
233 | + }, | ||
234 | + "mp-baidu" : { | ||
235 | + "usingComponents" : true, | ||
236 | + "appid" : "{baidu_mp_appid}", | ||
237 | + "uniStatistics" : { | ||
238 | + "enable" : true | ||
239 | + } | ||
240 | + }, | ||
241 | + "mp-toutiao" : { | ||
242 | + "usingComponents" : true, | ||
243 | + "appid" : "{toutiao_mp_appid}", | ||
244 | + "uniStatistics" : { | ||
245 | + "enable" : true | ||
246 | + } | ||
247 | + }, | ||
248 | + "h5" : { | ||
249 | + "template" : "template.h5.html", | ||
250 | + "router" : { | ||
251 | + "mode" : "{router_mode}", | ||
252 | + "base" : "{router_base}" | ||
253 | + }, | ||
254 | + "sdkConfigs" : { | ||
255 | + "maps" : { | ||
256 | + "qqmap" : { | ||
257 | + "key" : "{qqmap_key}" | ||
258 | + } | ||
259 | + } | ||
260 | + }, | ||
261 | + "domain" : "{domain}", | ||
262 | + "optimization" : { | ||
263 | + "treeShaking" : { | ||
264 | + "enable" : true | ||
265 | + } | ||
266 | + }, | ||
267 | + "title" : "{title}", | ||
268 | + "uniStatistics" : { | ||
269 | + "enable" : false | ||
270 | + }, | ||
271 | + "devServer" : { | ||
272 | + "https" : {https} | ||
273 | + } | ||
274 | + }, | ||
275 | + "uniStatistics" : { | ||
276 | + "enable" : false | ||
277 | + } | ||
278 | +} |
1 | +<!-- * WanlShop - App全局模板配置 | ||
2 | + * @author 深圳前海万联科技有限公司 <wanlshop@i36k.com> | ||
3 | + * @link http://www.wanlshop.com | ||
4 | + * | ||
5 | + * @本程序受法律保护,著作权©软著登记号2020SR0255711 < 未经版权所有权人书面许可,不能用于商业用途!> | ||
6 | + * | ||
7 | + * @获取许可 | ||
8 | + * 后台下载:https://www.fastadmin.net/store/wanlshop.html | ||
9 | + * 帮助文档:https://doc.fastadmin.net/wanlshop | ||
10 | + * | ||
11 | + * @stress 本程序仅用作FastAdmin付费插件(WanlShop B2B2C商城)API使用,未经版权所有权人书面许可,不能自行用于商业用途 | ||
12 | + * @creationtime 2019年9月10日12:52:20 | ||
13 | + * @lasttime 2020年6月9日09:26:07 | ||
14 | + * @version 1.0.0 | ||
15 | + --> | ||
16 | +<script> | ||
17 | + import Vue from 'vue'; | ||
18 | + export default { | ||
19 | + onLaunch() { | ||
20 | + // 检测客户端更新 | ||
21 | + this.$store.dispatch('update/update'); | ||
22 | + // 仅首次打开一次性加载数据 | ||
23 | + this.$store.dispatch('common/init'); | ||
24 | + // 同步购物车 本地 & 网络 | ||
25 | + this.$store.dispatch('cart/get'); | ||
26 | + // 同步 动态数据 | ||
27 | + this.$store.dispatch('statistics/get'); | ||
28 | + }, | ||
29 | + onShow() { | ||
30 | + // 启动或重启即时通讯 | ||
31 | + this.$store.dispatch('chat/start'); | ||
32 | + }, | ||
33 | + onHide() { | ||
34 | + // 断开即时通讯 | ||
35 | + this.$store.dispatch('chat/close'); | ||
36 | + } | ||
37 | + }; | ||
38 | +</script> | ||
39 | + | ||
40 | +<style> | ||
41 | + /* #ifndef APP-NVUE */ | ||
42 | + @import 'static/style/colorui.css'; | ||
43 | + @import 'static/style/wanlshop.css'; | ||
44 | + @import 'static/style/iconfont.css'; | ||
45 | + /* #endif */ | ||
46 | +</style> |
1 | +/**数据验证(表单验证)来自 grace.hcoder.net作者 hcoder 深海*/ | ||
2 | +module.exports = {error:'',check : function (data, rule){for(var i = 0; i < rule.length; i++){if (!rule[i].checkType){return true;}if (!rule[i].name) {return true;}if (!rule[i].errorMsg) {return true;}if (!data[rule[i].name]) {this.error = rule[i].errorMsg; return false;}switch (rule[i].checkType){case 'string':var reg = new RegExp('^.{' + rule[i].checkRule + '}$');if(!reg.test(data[rule[i].name])) {this.error = rule[i].errorMsg; return false;}break;case 'int':var reg = new RegExp('^(-[1-9]|[1-9])[0-9]{' + rule[i].checkRule + '}$');if(!reg.test(data[rule[i].name])) {this.error = rule[i].errorMsg; return false;}break;break;case 'between':if (!this.isNumber(data[rule[i].name])){this.error = rule[i].errorMsg;return false;}var minMax = rule[i].checkRule.split(',');minMax[0] = Number(minMax[0]);minMax[1] = Number(minMax[1]);if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {this.error = rule[i].errorMsg;return false;}break;case 'betweenD':var reg = /^-?[1-9][0-9]?$/;if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }var minMax = rule[i].checkRule.split(',');minMax[0] = Number(minMax[0]);minMax[1] = Number(minMax[1]);if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {this.error = rule[i].errorMsg;return false;}break;case 'betweenF':var reg = /^-?[0-9][0-9]?.+[0-9]+$/;if (!reg.test(data[rule[i].name])){this.error = rule[i].errorMsg; return false;}var minMax = rule[i].checkRule.split(',');minMax[0] = Number(minMax[0]);minMax[1] = Number(minMax[1]);if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {this.error = rule[i].errorMsg;return false;}break;case 'same':if (data[rule[i].name] != rule[i].checkRule) { this.error = rule[i].errorMsg; return false;}break;case 'notsame':if (data[rule[i].name] == rule[i].checkRule) { this.error = rule[i].errorMsg; return false; }break;case 'email':var reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }break;case 'phoneno':var reg = /^1[0-9]{10,10}$/;if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }break;case 'zipcode':var reg = /^[0-9]{6}$/;if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }break;case 'reg':var reg = new RegExp(rule[i].checkRule);if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }break;case 'in':if(rule[i].checkRule.indexOf(data[rule[i].name]) == -1){this.error = rule[i].errorMsg; return false;}break;case 'notnull':if(data[rule[i].name] == null || data[rule[i].name].length < 1){this.error = rule[i].errorMsg; return false;}break;}}return true;},isNumber : function (checkVal){var reg = /^-?[1-9][0-9]?.?[0-9]*$/;return reg.test(checkVal);}} |
1 | +function HTMLParser(e,t){function r(e,r,n,s){if(r=r.toLowerCase(),block[r])for(;l.last()&&inline[l.last()];)a("",l.last());if(closeSelf[r]&&l.last()==r&&a("",r),s=empty[r]||!!s,s||l.push(r),t.start){var i=[];n.replace(attr,function(e,t){var r=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:fillAttrs[t]?t:"";i.push({name:t,value:r,escaped:r.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(r,i,s)}}function a(e,r){if(r)for(var a=l.length-1;a>=0&&l[a]!=r;a--);else var a=0;if(a>=0){for(var n=l.length-1;n>=a;n--)t.end&&t.end(l[n]);l.length=a}}var n,s,i,l=[],c=e;for(l.last=function(){return this[this.length-1]};e;){if(s=!0,l.last()&&special[l.last()])e=e.replace(new RegExp("([\\s\\S]*?)</"+l.last()+"[^>]*>"),function(e,r){return r=r.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,"$1$2"),t.chars&&t.chars(r),""}),a("",l.last());else if(0==e.indexOf("\x3c!--")?(n=e.indexOf("--\x3e"))>=0&&(t.comment&&t.comment(e.substring(4,n)),e=e.substring(n+3),s=!1):0==e.indexOf("</")?(i=e.match(endTag))&&(e=e.substring(i[0].length),i[0].replace(endTag,a),s=!1):0==e.indexOf("<")&&(i=e.match(startTag))&&(e=e.substring(i[0].length),i[0].replace(startTag,r),s=!1),s){n=e.indexOf("<");var o=n<0?e:e.substring(0,n);e=n<0?"":e.substring(n),t.chars&&t.chars(o)}if(e==c)throw"Parse Error: "+e;c=e}a()}function makeMap(e){for(var t={},r=e.split(","),a=0;a<r.length;a++)t[r[a]]=!0;return t}function removeDOCTYPE(e){return e.replace(/<\?xml.*\?>\n/,"").replace(/<!doctype.*>\n/,"").replace(/<!DOCTYPE.*>\n/,"")}function parseAttrs(e){return e.reduce(function(e,t){var r=t.value,a=t.name;return e[a]?e[a]=e[a]+" "+r:e[a]=r,e},{})}function parseHtml(e){e=removeDOCTYPE(e);var t=[],r={node:"root",children:[]};return HTMLParser(e,{start:function(e,a,n){var s={name:e};if(0!==a.length&&(s.attrs=parseAttrs(a)),n){var i=t[0]||r;i.children||(i.children=[]),i.children.push(s)}else t.unshift(s)},end:function(e){var a=t.shift();if(a.name!==e&&console.error("invalid state: mismatch end tag"),0===t.length)r.children.push(a);else{var n=t[0];n.children||(n.children=[]),n.children.push(a)}},chars:function(e){var a={type:"text",text:e};if(0===t.length)r.children.push(a);else{var n=t[0];n.children||(n.children=[]),n.children.push(a)}},comment:function(e){var r={node:"comment",text:e},a=t[0];a.children||(a.children=[]),a.children.push(r)}}),r.children}Object.defineProperty(exports,"__esModule",{value:!0});var startTag=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag=/^<\/([-A-Za-z0-9_]+)[^>]*>/,attr=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,empty=makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),block=makeMap("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),inline=makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),closeSelf=makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),fillAttrs=makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),special=makeMap("script,style");exports.default=parseHtml; |
1 | +module.exports = { | ||
2 | + onLoad() { | ||
3 | + // 设置默认的转发参数 | ||
4 | + this.mpShare = { | ||
5 | + title: '', // 默认为小程序名称 | ||
6 | + path: '', // 默认为当前页面路径 | ||
7 | + imageUrl: '' // 默认为当前页面的截图 | ||
8 | + } | ||
9 | + // #ifdef MP-WEIXIN | ||
10 | + wx.showShareMenu({ | ||
11 | + withShareTicket: true, | ||
12 | + menus: ['shareAppMessage', 'shareTimeline'] | ||
13 | + }); | ||
14 | + // #endif | ||
15 | + // #ifdef MP-QQ | ||
16 | + qq.showShareMenu({ | ||
17 | + showShareItems: ['qq', 'qzone', 'wechatFriends', 'wechatMoment'] | ||
18 | + }); | ||
19 | + // #endif | ||
20 | + }, | ||
21 | + onShareAppMessage() { | ||
22 | + return this.mpShare | ||
23 | + }, | ||
24 | + // #ifdef MP-WEIXIN | ||
25 | + onShareTimeline() { | ||
26 | + return this.mpShare | ||
27 | + } | ||
28 | + // #endif | ||
29 | +} |
1 | +function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Request=function(){function e(){_classCallCheck(this,e),this.config={baseUrl:"",business:"data"},this.interceptor={request:void 0,response:void 0,fail:void 0},this._success=function(e,t,n,r,o){if(n.statusCode>=200&&n.statusCode<=401){var s=n.data;"file"===t.contentType&&"string"==typeof s&&(void 0===t.dataType||"json"===t.dataType)&&(s=JSON.parse(n.data));var i=t.skipInterceptorResponse;if(e.interceptor.response&&"function"==typeof e.interceptor.response&&!i&&(s=e.interceptor.response(s,t)),i||s.success){var a=t.business?s[t.business]:s;return t.debug&&console.log("response success: ",a),void(t.success?t.success(a):r(a))}}e._fail(e,t,n,r,o)},this._fail=function(e,t,n,r,o){if(t.debug&&console.error("response failure: ",n),"request:fail abort"!==n.errMsg){var s=n;e.interceptor.fail&&"function"==typeof e.interceptor.fail&&(s=e.interceptor.fail(n,t)),t.fail?t.fail(s):o(s)}},this._prepare=function(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).startTime=Date.now(),t.loadingTip&&uni.showLoading({title:t.loadingTip}),"file"===t.contentType&&(void 0!==t.formData&&null!==t.formData||(t.formData=t.data,delete t.data),delete t.header["Content-Type"],delete t.header.Referer,t.method="POST"),t.debug&&console.log("request: ",t)},this._complete=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(r.endTime=Date.now(),t.debug&&console.log("请求用时 "+(r.endTime-r.startTime)+" 毫秒"),t.loadingTip){var o=r.endTime-r.startTime,s=t.loadingDuration||500;o=o<s?s-o:0,setTimeout(function(){uni.hideLoading()},o)}}}return _createClass(e,[{key:"setConfig",value:function(e){this.config=Object.assign(this.config,e)}},{key:"request",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this;void 0===t.data&&(t.data={}),void 0===t.header&&(t.header={});var r=Object.assign({},this.config,t);r=Object.assign(t,r),r.url=e.getUrl(r),r.header["Content-Type"]||(r.header["Content-Type"]=e.getContentType(r));var o=r;n.interceptor.request&&"function"==typeof n.interceptor.request&&(o=n.interceptor.request(r));var s=void 0,i=new Promise(function(e,t){var r={};n._prepare(n,o,r),"file"===o.contentType?(s=uni.uploadFile(_extends({},o,{success:function(r){n._success(n,o,r,e,t)},fail:function(r){n._fail(n,o,r,e,t)},complete:function(e){n._complete(n,o,e,r)}})),o.progress&&"function"==typeof o.progress&&s.onProgressUpdate(function(e){o.progress(e,s)})):s=uni.request(_extends({},o,{timeout:6e3,success:function(r){n._success(n,o,r,e,t)},fail:function(r){n._fail(n,o,r,e,t)},complete:function(e){n._complete(n,o,e,r)}}))});return o.success||o.fail||o.complete?s:i}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.method="GET",this.request(e)}},{key:"post",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.method="POST",this.request(e)}},{key:"upload",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.method="POST",e.contentType="file",this.request(e)}}],[{key:"posUrl",value:function(e){return/(http|https):\/\/([\w.]+\/?)\S*/.test(e)}},{key:"getUrl",value:function(t){var n=t.url||"",r=e.posUrl(n);if(!r){t.slashAbsoluteUrl&&(r=/^\/([\w.]+\/?)\S*/.test(n))}return r?n:t.baseUrl+n}},{key:"getContentType",value:function(e){var t=e.contentType||"json",n=e.encoding||"UTF-8";if("json"===t)return"application/json;charset="+n;if("form"===t)return"application/x-www-form-urlencoded;charset="+n;if("file"===t)return"multipart/form-data;charset="+n;if("text"===t)return"text/plain;charset="+n;if("html"===t)return"text/html;charset="+n;throw new Error("unsupported content type : "+t)}}]),e}(),request=new Request;exports.default=request; |
1 | +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var uQRCode={};!function(){function t(t){this.mode=a.MODE_8BIT_BYTE,this.data=t}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=new Array}function r(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&0==t[r];)r++;this.num=new Array(t.length-r+e);for(var o=0;o<t.length-r;o++)this.num[o]=t[o+r]}function o(t,e){this.totalCount=t,this.dataCount=e}function n(){this.buffer=new Array,this.length=0}function i(t){for(var e,r="",o=0;o<t.length;o++)e=t.charCodeAt(o),e>=1&&e<=127?r+=t.charAt(o):e>2047?(r+=String.fromCharCode(224|e>>12&15),r+=String.fromCharCode(128|e>>6&63),r+=String.fromCharCode(128|e>>0&63)):(r+=String.fromCharCode(192|e>>6&31),r+=String.fromCharCode(128|e>>0&63));return r}t.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}},e.prototype={addData:function(e){var r=new t(e);this.dataList.push(r),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=o.getRSBlocks(t,this.errorCorrectLevel),r=new n,i=0,a=0;a<e.length;a++)i+=e[a].dataCount;for(var a=0;a<this.dataList.length;a++){var s=this.dataList[a];r.put(s.mode,4),r.put(s.getLength(),h.getLengthInBits(s.mode,t)),s.write(r)}if(r.getLengthInBits()<=8*i)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,r){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var o=0;o<this.moduleCount;o++){this.modules[o]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[o][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,r),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,r)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(this.modules[t+r][e+o]=0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var o=h.getLostPoint(this);(0==r||t>o)&&(t=o,e=r)}return e},createMovieClip:function(t,e,r){var o=t.createEmptyMovieClip(e,r);this.make();for(var n=0;n<this.modules.length;n++)for(var i=1*n,a=0;a<this.modules[n].length;a++){var s=1*a,u=this.modules[n][a];u&&(o.beginFill(0,100),o.moveTo(s,i),o.lineTo(s+1,i),o.lineTo(s+1,i+1),o.lineTo(s,i+1),o.endFill())}return o},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=h.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var o=t[e],n=t[r];if(null==this.modules[o][n])for(var i=-2;i<=2;i++)for(var a=-2;a<=2;a++)this.modules[o+i][n+a]=-2==i||2==i||-2==a||2==a||0==i&&0==a}},setupTypeNumber:function(t){for(var e=h.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(var r=0;r<18;r++){var o=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,o=h.getBCHTypeInfo(r),n=0;n<15;n++){var i=!t&&1==(o>>n&1);n<6?this.modules[n][8]=i:n<8?this.modules[n+1][8]=i:this.modules[this.moduleCount-15+n][8]=i}for(var n=0;n<15;n++){var i=!t&&1==(o>>n&1);n<8?this.modules[8][this.moduleCount-n-1]=i:n<9?this.modules[8][15-n-1+1]=i:this.modules[8][15-n-1]=i}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,o=this.moduleCount-1,n=7,i=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[o][a-s]){var u=!1;i<t.length&&(u=1==(t[i]>>>n&1));var l=h.getMask(e,o,a-s);l&&(u=!u),this.modules[o][a-s]=u,n--,-1==n&&(i++,n=7)}if((o+=r)<0||this.moduleCount<=o){o-=r,r=-r;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,r,i){for(var a=o.getRSBlocks(t,r),s=new n,u=0;u<i.length;u++){var l=i[u];s.put(l.mode,4),s.put(l.getLength(),h.getLengthInBits(l.mode,t)),l.write(s)}for(var f=0,u=0;u<a.length;u++)f+=a[u].dataCount;if(s.getLengthInBits()>8*f)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*f+")");for(s.getLengthInBits()+4<=8*f&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;;){if(s.getLengthInBits()>=8*f)break;if(s.put(e.PAD0,8),s.getLengthInBits()>=8*f)break;s.put(e.PAD1,8)}return e.createBytes(s,a)},e.createBytes=function(t,e){for(var o=0,n=0,i=0,a=new Array(e.length),s=new Array(e.length),u=0;u<e.length;u++){var l=e[u].dataCount,f=e[u].totalCount-l;n=Math.max(n,l),i=Math.max(i,f),a[u]=new Array(l);for(var g=0;g<a[u].length;g++)a[u][g]=255&t.buffer[g+o];o+=l;var c=h.getErrorCorrectPolynomial(f),d=new r(a[u],c.getLength()-1),m=d.mod(c);s[u]=new Array(c.getLength()-1);for(var g=0;g<s[u].length;g++){var v=g+m.getLength()-s[u].length;s[u][g]=v>=0?m.get(v):0}}for(var C=0,g=0;g<e.length;g++)C+=e[g].totalCount;for(var T=new Array(C),p=0,g=0;g<n;g++)for(var u=0;u<e.length;u++)g<a[u].length&&(T[p++]=a[u][g]);for(var g=0;g<i;g++)for(var u=0;u<e.length;u++)g<s[u].length&&(T[p++]=s[u][g]);return T};for(var a={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},s={L:1,M:0,Q:3,H:2},u={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},h={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;h.getBCHDigit(e)-h.getBCHDigit(h.G15)>=0;)e^=h.G15<<h.getBCHDigit(e)-h.getBCHDigit(h.G15);return(t<<10|e)^h.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;h.getBCHDigit(e)-h.getBCHDigit(h.G18)>=0;)e^=h.G18<<h.getBCHDigit(e)-h.getBCHDigit(h.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return h.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case u.PATTERN000:return(e+r)%2==0;case u.PATTERN001:return e%2==0;case u.PATTERN010:return r%3==0;case u.PATTERN011:return(e+r)%3==0;case u.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case u.PATTERN101:return e*r%2+e*r%3==0;case u.PATTERN110:return(e*r%2+e*r%3)%2==0;case u.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new r([1],0),o=0;o<t;o++)e=e.multiply(new r([1,l.gexp(o)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case a.MODE_NUMBER:return 10;case a.MODE_ALPHA_NUM:return 9;case a.MODE_8BIT_BYTE:case a.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case a.MODE_NUMBER:return 12;case a.MODE_ALPHA_NUM:return 11;case a.MODE_8BIT_BYTE:return 16;case a.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case a.MODE_NUMBER:return 14;case a.MODE_ALPHA_NUM:return 13;case a.MODE_8BIT_BYTE:return 16;case a.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,o=0;o<e;o++)for(var n=0;n<e;n++){for(var i=0,a=t.isDark(o,n),s=-1;s<=1;s++)if(!(o+s<0||e<=o+s))for(var u=-1;u<=1;u++)n+u<0||e<=n+u||0==s&&0==u||a==t.isDark(o+s,n+u)&&i++;i>5&&(r+=3+i-5)}for(var o=0;o<e-1;o++)for(var n=0;n<e-1;n++){var h=0;t.isDark(o,n)&&h++,t.isDark(o+1,n)&&h++,t.isDark(o,n+1)&&h++,t.isDark(o+1,n+1)&&h++,0!=h&&4!=h||(r+=3)}for(var o=0;o<e;o++)for(var n=0;n<e-6;n++)t.isDark(o,n)&&!t.isDark(o,n+1)&&t.isDark(o,n+2)&&t.isDark(o,n+3)&&t.isDark(o,n+4)&&!t.isDark(o,n+5)&&t.isDark(o,n+6)&&(r+=40);for(var n=0;n<e;n++)for(var o=0;o<e-6;o++)t.isDark(o,n)&&!t.isDark(o+1,n)&&t.isDark(o+2,n)&&t.isDark(o+3,n)&&t.isDark(o+4,n)&&!t.isDark(o+5,n)&&t.isDark(o+6,n)&&(r+=40);for(var l=0,n=0;n<e;n++)for(var o=0;o<e;o++)t.isDark(o,n)&&l++;return r+=Math.abs(100*l/e/e-50)/5*10}},l={glog:function(t){if(t<1)throw new Error("glog("+t+")");return l.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return l.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},f=0;f<8;f++)l.EXP_TABLE[f]=1<<f;for(var f=8;f<256;f++)l.EXP_TABLE[f]=l.EXP_TABLE[f-4]^l.EXP_TABLE[f-5]^l.EXP_TABLE[f-6]^l.EXP_TABLE[f-8];for(var f=0;f<255;f++)l.LOG_TABLE[l.EXP_TABLE[f]]=f;r.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),o=0;o<this.getLength();o++)for(var n=0;n<t.getLength();n++)e[o+n]^=l.gexp(l.glog(this.get(o))+l.glog(t.get(n)));return new r(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=l.glog(this.get(0))-l.glog(t.get(0)),o=new Array(this.getLength()),n=0;n<this.getLength();n++)o[n]=this.get(n);for(var n=0;n<t.getLength();n++)o[n]^=l.gexp(l.glog(t.get(n))+e);return new r(o,0).mod(t)}},o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(t,e){var r=o.getRsBlockTable(t,e);if(void 0==r)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var n=r.length/3,i=new Array,a=0;a<n;a++)for(var s=r[3*a+0],u=r[3*a+1],h=r[3*a+2],l=0;l<s;l++)i.push(new o(u,h));return i},o.getRsBlockTable=function(t,e){switch(e){case s.L:return o.RS_BLOCK_TABLE[4*(t-1)+0];case s.M:return o.RS_BLOCK_TABLE[4*(t-1)+1];case s.Q:return o.RS_BLOCK_TABLE[4*(t-1)+2];case s.H:return o.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},n.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},uQRCode={defaults:{size:258,margin:0,backgroundColor:"#ffffff",foregroundColor:"#000000",fileType:"png",correctLevel:3,typeNumber:-1},make:function(t){var r={canvasId:t.canvasId,componentInstance:t.componentInstance,text:t.text,size:this.defaults.size,margin:this.defaults.margin,backgroundColor:this.defaults.backgroundColor,foregroundColor:this.defaults.foregroundColor,fileType:this.defaults.fileType,correctLevel:this.defaults.correctLevel,typeNumber:this.defaults.typeNumber};if(t)for(var o in t)r[o]=t[o];if(t=r,!t.canvasId)return void console.error("uQRCode: Please set canvasId!");!function(){var r=new e(t.typeNumber,t.correctLevel);r.addData(i(t.text)),r.make();var o=uni.createCanvasContext(t.canvasId,t.componentInstance);o.setFillStyle(t.backgroundColor),o.fillRect(0,0,t.size,t.size);for(var n=(t.size-2*t.margin)/r.getModuleCount(),a=n,s=0;s<r.getModuleCount();s++)for(var u=0;u<r.getModuleCount();u++){var h=r.isDark(s,u)?t.foregroundColor:t.backgroundColor;o.setFillStyle(h);var l=Math.round(u*n)+t.margin,f=Math.round(s*a)+t.margin,g=Math.ceil((u+1)*n)-Math.floor(u*n),c=Math.ceil((s+1)*n)-Math.floor(s*n);o.fillRect(l,f,g,c)}setTimeout(function(){o.draw(!1,function(){setTimeout(function(){uni.canvasToTempFilePath({canvasId:t.canvasId,fileType:t.fileType,width:t.size,height:t.size,destWidth:t.size,destHeight:t.size,success:function(e){t.success&&t.success(e.tempFilePath)},fail:function(e){t.fail&&t.fail(e)},complete:function(e){t.complete&&t.complete(e)}},t.componentInstance)},t.text.length+100)})},150)}()}}}(),exports.default=uQRCode; |
1 | + /** | ||
2 | + * A Request useing App network request design {@link http://www.wanlshop.com} | ||
3 | + * @author 深圳前海万联科技有限公司 <wanlshop@i36k.com> < 本程序仅用作FastAdmin付费插件(多用户分销商城)测试使用,未经版权所有权人书面许可,不能自行用于商业用途!> | ||
4 | + * @2019年9月10日12:52:20 | ||
5 | + * @version 1.0.1 | ||
6 | + * | ||
7 | + **/ | ||
8 | +class wanlfun { | ||
9 | + | ||
10 | + /** | ||
11 | + * 保存聊天记录 | ||
12 | + * @author 深圳前海万联科技有限公司 <www.wanlshop.com> | ||
13 | + */ | ||
14 | + setChat(data,send) { | ||
15 | + let uid = send == 'send' ? data.to_id : data.form.id; | ||
16 | + uni.getStorage({ | ||
17 | + key: 'wanlchat:message_' + uid, | ||
18 | + success: function (res) { | ||
19 | + // 储存所有消息 | ||
20 | + // let arr = res.data; | ||
21 | + // 优化,只储存 100条数据,超过100条,通过接口获取历史记录 | ||
22 | + let arr = res.data.slice(-96); | ||
23 | + arr.push(data); | ||
24 | + uni.setStorageSync('wanlchat:message_' + uid, arr); | ||
25 | + }, | ||
26 | + fail: function (res) { | ||
27 | + uni.setStorageSync('wanlchat:message_' + uid, [data]); | ||
28 | + } | ||
29 | + }); | ||
30 | + // 返回原始数据 | ||
31 | + return data; | ||
32 | + } | ||
33 | + | ||
34 | + /** | ||
35 | + * 加法精度计算 | ||
36 | + * @author 深圳前海万联科技有限公司 <www.wanlshop.com> | ||
37 | + * | ||
38 | + * @param {Object} number 数字 | ||
39 | + */ | ||
40 | + bcadd(a, b){ | ||
41 | + var c, d, e; | ||
42 | + try { | ||
43 | + c = a.toString().split(".")[1].length | ||
44 | + } catch(f) { | ||
45 | + c = 0 | ||
46 | + } | ||
47 | + try { | ||
48 | + d = b.toString().split(".")[1].length | ||
49 | + } catch(f) { | ||
50 | + d = 0 | ||
51 | + } | ||
52 | + return e = Math.pow(10, Math.max(c, d)),(this.bcmul(a, e) + this.bcmul(b, e)) / e | ||
53 | + } | ||
54 | + | ||
55 | + /** | ||
56 | + * 减法精度计算 | ||
57 | + * @author 深圳前海万联科技有限公司 <www.wanlshop.com> | ||
58 | + * | ||
59 | + * @param {Object} number 数字 | ||
60 | + */ | ||
61 | + bcsub(a, b){ | ||
62 | + var c, d, e; | ||
63 | + try { | ||
64 | + c = a.toString().split(".")[1].length | ||
65 | + } catch(f) { | ||
66 | + c = 0 | ||
67 | + } | ||
68 | + try { | ||
69 | + d = b.toString().split(".")[1].length | ||
70 | + } catch(f) { | ||
71 | + d = 0 | ||
72 | + } | ||
73 | + return e = Math.pow(10, Math.max(c, d)),(this.bcmul(a, e) - this.bcmul(b, e)) / e | ||
74 | + } | ||
75 | + | ||
76 | + /** | ||
77 | + * 乘法精度计算 | ||
78 | + * @author 深圳前海万联科技有限公司 <www.wanlshop.com> | ||
79 | + * | ||
80 | + * @param {Object} number 数字 | ||
81 | + */ | ||
82 | + bcmul(a, b){ | ||
83 | + var c = 0, | ||
84 | + d = a.toString(), | ||
85 | + e = b.toString(); | ||
86 | + try { | ||
87 | + c += d.split(".")[1].length | ||
88 | + } catch(f) {} | ||
89 | + try { | ||
90 | + c += e.split(".")[1].length | ||
91 | + } catch(f) {} | ||
92 | + return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c) | ||
93 | + } | ||
94 | + | ||
95 | + /** | ||
96 | + * 除法精度计算 | ||
97 | + * @author 深圳前海万联科技有限公司 <www.wanlshop.com> | ||
98 | + * | ||
99 | + * @param {Object} number 数字 | ||
100 | + */ | ||
101 | + bcdiv(a, b){ | ||
102 | + var c, d, e = 0, | ||
103 | + f = 0; | ||
104 | + try { | ||
105 | + e = a.toString().split(".")[1].length | ||
106 | + } catch(g) {} | ||
107 | + try { | ||
108 | + f = b.toString().split(".")[1].length | ||
109 | + } catch(g) {} | ||
110 | + return c = Number(a.toString().replace(".", "")),d = Number(b.toString().replace(".", "")),this.bcmul(c / d, Math.pow(10, f - e)) | ||
111 | + } | ||
112 | +} | ||
113 | +export default new wanlfun(); |
1 | +// #ifdef H5 | ||
2 | +/*! | ||
3 | + * clipboard.js v2.0.4 | ||
4 | + * https://zenorocha.github.io/clipboard.js | ||
5 | + * | ||
6 | + * Licensed MIT © Zeno Rocha | ||
7 | + */ | ||
8 | +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=o(n(1)),c=o(n(3)),u=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.resolveOptions(e),n.listenClick(t),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,c.default),i(o,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,u.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return s("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),o}();function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=n(2),c=(o=a)&&o.__esModule?o:{default:o};var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return i(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var d=n(5),h=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(l=t).addEventListener(s,f),{destroy:function(){l.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,u=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,u)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,u)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,u,l,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(7);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])}); | ||
9 | +// #endif |
1 | +// #ifdef H5 | ||
2 | +import ClipboardJS from "./clipboard.min.js" | ||
3 | +// #endif | ||
4 | +const thorui = { | ||
5 | + getClipboardData: function(data, callback) { | ||
6 | + // #ifdef APP-PLUS || MP | ||
7 | + uni.setClipboardData({ | ||
8 | + data: data, | ||
9 | + success(res) { | ||
10 | + ("function" == typeof callback) && callback(true) | ||
11 | + }, | ||
12 | + fail(res) { | ||
13 | + ("function" == typeof callback) && callback(false) | ||
14 | + } | ||
15 | + }) | ||
16 | + // #endif | ||
17 | + | ||
18 | + // #ifdef H5 | ||
19 | + let event = window.event || {} | ||
20 | + let clipboard = new ClipboardJS("", { | ||
21 | + text: () => data | ||
22 | + }) | ||
23 | + clipboard.on('success', (e) => { | ||
24 | + ("function" == typeof callback) && callback(true) | ||
25 | + clipboard.off('success') | ||
26 | + clipboard.off('error') | ||
27 | + clipboard.destroy() | ||
28 | + }); | ||
29 | + clipboard.on('error', (e) => { | ||
30 | + ("function" == typeof callback) && callback(false) | ||
31 | + clipboard.off('success') | ||
32 | + clipboard.off('error') | ||
33 | + clipboard.destroy() | ||
34 | + }); | ||
35 | + clipboard.onClick(event) | ||
36 | + // #endif | ||
37 | + } | ||
38 | +}; | ||
39 | + | ||
40 | +module.exports = { | ||
41 | + getClipboardData: thorui.getClipboardData | ||
42 | +}; |
1 | +/** | ||
2 | +* @1900-2100区间内的公历、农历互转 | ||
3 | +* @charset UTF-8 | ||
4 | +* @github https://github.com/jjonline/calendar.js | ||
5 | +* @Author Jea杨(JJonline@JJonline.Cn) | ||
6 | +* @Time 2014-7-21 | ||
7 | +* @Time 2016-8-13 Fixed 2033hex、Attribution Annals | ||
8 | +* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug | ||
9 | +* @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year | ||
10 | +* @Version 1.0.3 | ||
11 | +* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0] | ||
12 | +* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0] | ||
13 | +*/ | ||
14 | +/* eslint-disable */ | ||
15 | +var calendar = { | ||
16 | + | ||
17 | + /** | ||
18 | + * 农历1900-2100的润大小信息表 | ||
19 | + * @Array Of Property | ||
20 | + * @return Hex | ||
21 | + */ | ||
22 | + lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909 | ||
23 | + 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919 | ||
24 | + 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929 | ||
25 | + 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939 | ||
26 | + 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949 | ||
27 | + 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959 | ||
28 | + 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969 | ||
29 | + 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979 | ||
30 | + 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989 | ||
31 | + 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999 | ||
32 | + 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009 | ||
33 | + 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019 | ||
34 | + 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029 | ||
35 | + 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039 | ||
36 | + 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049 | ||
37 | + /** Add By JJonline@JJonline.Cn**/ | ||
38 | + 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059 | ||
39 | + 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069 | ||
40 | + 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079 | ||
41 | + 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089 | ||
42 | + 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099 | ||
43 | + 0x0d520], // 2100 | ||
44 | + | ||
45 | + /** | ||
46 | + * 公历每个月份的天数普通表 | ||
47 | + * @Array Of Property | ||
48 | + * @return Number | ||
49 | + */ | ||
50 | + solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], | ||
51 | + | ||
52 | + /** | ||
53 | + * 天干地支之天干速查表 | ||
54 | + * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"] | ||
55 | + * @return Cn string | ||
56 | + */ | ||
57 | + Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'], | ||
58 | + | ||
59 | + /** | ||
60 | + * 天干地支之地支速查表 | ||
61 | + * @Array Of Property | ||
62 | + * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"] | ||
63 | + * @return Cn string | ||
64 | + */ | ||
65 | + Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'], | ||
66 | + | ||
67 | + /** | ||
68 | + * 天干地支之地支速查表<=>生肖 | ||
69 | + * @Array Of Property | ||
70 | + * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"] | ||
71 | + * @return Cn string | ||
72 | + */ | ||
73 | + Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'], | ||
74 | + | ||
75 | + /** | ||
76 | + * 24节气速查表 | ||
77 | + * @Array Of Property | ||
78 | + * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"] | ||
79 | + * @return Cn string | ||
80 | + */ | ||
81 | + solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206', '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3', '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'], | ||
82 | + | ||
83 | + /** | ||
84 | + * 1900-2100各年的24节气日期速查表 | ||
85 | + * @Array Of Property | ||
86 | + * @return 0x string For splice | ||
87 | + */ | ||
88 | + sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', | ||
89 | + '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', | ||
90 | + '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', | ||
91 | + '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', | ||
92 | + 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f', | ||
93 | + '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa', | ||
94 | + '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', | ||
95 | + '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f', | ||
96 | + '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', | ||
97 | + '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', | ||
98 | + '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', | ||
99 | + '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', | ||
100 | + '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', | ||
101 | + '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', | ||
102 | + '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722', | ||
103 | + '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f', | ||
104 | + '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e', | ||
105 | + '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', | ||
106 | + '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722', | ||
107 | + '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', | ||
108 | + '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', | ||
109 | + '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', | ||
110 | + '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722', | ||
111 | + '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', | ||
112 | + '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', | ||
113 | + '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', | ||
114 | + '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', | ||
115 | + '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e', | ||
116 | + '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', | ||
117 | + '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722', | ||
118 | + '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', | ||
119 | + '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', | ||
120 | + '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', | ||
121 | + '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', | ||
122 | + '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', | ||
123 | + '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa', | ||
124 | + '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', | ||
125 | + '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', | ||
126 | + '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721', | ||
127 | + '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2', | ||
128 | + '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722', | ||
129 | + '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', | ||
130 | + '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd', | ||
131 | + '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', | ||
132 | + '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', | ||
133 | + '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', | ||
134 | + '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', | ||
135 | + '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', | ||
136 | + '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', | ||
137 | + '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721', | ||
138 | + '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5', | ||
139 | + '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722', | ||
140 | + '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', | ||
141 | + '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd', | ||
142 | + '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', | ||
143 | + '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', | ||
144 | + '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721', | ||
145 | + '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd', | ||
146 | + '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35', | ||
147 | + '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', | ||
148 | + '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721', | ||
149 | + '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5', | ||
150 | + '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35', | ||
151 | + '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', | ||
152 | + '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd', | ||
153 | + '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35', | ||
154 | + '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'], | ||
155 | + | ||
156 | + /** | ||
157 | + * 数字转中文速查表 | ||
158 | + * @Array Of Property | ||
159 | + * @trans ['日','一','二','三','四','五','六','七','八','九','十'] | ||
160 | + * @return Cn string | ||
161 | + */ | ||
162 | + nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'], | ||
163 | + | ||
164 | + /** | ||
165 | + * 日期转农历称呼速查表 | ||
166 | + * @Array Of Property | ||
167 | + * @trans ['初','十','廿','卅'] | ||
168 | + * @return Cn string | ||
169 | + */ | ||
170 | + nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'], | ||
171 | + | ||
172 | + /** | ||
173 | + * 月份转农历称呼速查表 | ||
174 | + * @Array Of Property | ||
175 | + * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊'] | ||
176 | + * @return Cn string | ||
177 | + */ | ||
178 | + nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'], | ||
179 | + | ||
180 | + /** | ||
181 | + * 返回农历y年一整年的总天数 | ||
182 | + * @param lunar Year | ||
183 | + * @return Number | ||
184 | + * @eg:var count = calendar.lYearDays(1987) ;//count=387 | ||
185 | + */ | ||
186 | + lYearDays: function (y) { | ||
187 | + var i; var sum = 348 | ||
188 | + for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 } | ||
189 | + return (sum + this.leapDays(y)) | ||
190 | + }, | ||
191 | + | ||
192 | + /** | ||
193 | + * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0 | ||
194 | + * @param lunar Year | ||
195 | + * @return Number (0-12) | ||
196 | + * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6 | ||
197 | + */ | ||
198 | + leapMonth: function (y) { // 闰字编码 \u95f0 | ||
199 | + return (this.lunarInfo[y - 1900] & 0xf) | ||
200 | + }, | ||
201 | + | ||
202 | + /** | ||
203 | + * 返回农历y年闰月的天数 若该年没有闰月则返回0 | ||
204 | + * @param lunar Year | ||
205 | + * @return Number (0、29、30) | ||
206 | + * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29 | ||
207 | + */ | ||
208 | + leapDays: function (y) { | ||
209 | + if (this.leapMonth(y)) { | ||
210 | + return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29) | ||
211 | + } | ||
212 | + return (0) | ||
213 | + }, | ||
214 | + | ||
215 | + /** | ||
216 | + * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法 | ||
217 | + * @param lunar Year | ||
218 | + * @return Number (-1、29、30) | ||
219 | + * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29 | ||
220 | + */ | ||
221 | + monthDays: function (y, m) { | ||
222 | + if (m > 12 || m < 1) { return -1 }// 月份参数从1至12,参数错误返回-1 | ||
223 | + return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29) | ||
224 | + }, | ||
225 | + | ||
226 | + /** | ||
227 | + * 返回公历(!)y年m月的天数 | ||
228 | + * @param solar Year | ||
229 | + * @return Number (-1、28、29、30、31) | ||
230 | + * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30 | ||
231 | + */ | ||
232 | + solarDays: function (y, m) { | ||
233 | + if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1 | ||
234 | + var ms = m - 1 | ||
235 | + if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29 | ||
236 | + return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28) | ||
237 | + } else { | ||
238 | + return (this.solarMonth[ms]) | ||
239 | + } | ||
240 | + }, | ||
241 | + | ||
242 | + /** | ||
243 | + * 农历年份转换为干支纪年 | ||
244 | + * @param lYear 农历年的年份数 | ||
245 | + * @return Cn string | ||
246 | + */ | ||
247 | + toGanZhiYear: function (lYear) { | ||
248 | + var ganKey = (lYear - 3) % 10 | ||
249 | + var zhiKey = (lYear - 3) % 12 | ||
250 | + if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干 | ||
251 | + if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支 | ||
252 | + return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1] | ||
253 | + }, | ||
254 | + | ||
255 | + /** | ||
256 | + * 公历月、日判断所属星座 | ||
257 | + * @param cMonth [description] | ||
258 | + * @param cDay [description] | ||
259 | + * @return Cn string | ||
260 | + */ | ||
261 | + toAstro: function (cMonth, cDay) { | ||
262 | + var s = '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf' | ||
263 | + var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22] | ||
264 | + return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座 | ||
265 | + }, | ||
266 | + | ||
267 | + /** | ||
268 | + * 传入offset偏移量返回干支 | ||
269 | + * @param offset 相对甲子的偏移量 | ||
270 | + * @return Cn string | ||
271 | + */ | ||
272 | + toGanZhi: function (offset) { | ||
273 | + return this.Gan[offset % 10] + this.Zhi[offset % 12] | ||
274 | + }, | ||
275 | + | ||
276 | + /** | ||
277 | + * 传入公历(!)y年获得该年第n个节气的公历日期 | ||
278 | + * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起 | ||
279 | + * @return day Number | ||
280 | + * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春 | ||
281 | + */ | ||
282 | + getTerm: function (y, n) { | ||
283 | + if (y < 1900 || y > 2100) { return -1 } | ||
284 | + if (n < 1 || n > 24) { return -1 } | ||
285 | + var _table = this.sTermInfo[y - 1900] | ||
286 | + var _info = [ | ||
287 | + parseInt('0x' + _table.substr(0, 5)).toString(), | ||
288 | + parseInt('0x' + _table.substr(5, 5)).toString(), | ||
289 | + parseInt('0x' + _table.substr(10, 5)).toString(), | ||
290 | + parseInt('0x' + _table.substr(15, 5)).toString(), | ||
291 | + parseInt('0x' + _table.substr(20, 5)).toString(), | ||
292 | + parseInt('0x' + _table.substr(25, 5)).toString() | ||
293 | + ] | ||
294 | + var _calday = [ | ||
295 | + _info[0].substr(0, 1), | ||
296 | + _info[0].substr(1, 2), | ||
297 | + _info[0].substr(3, 1), | ||
298 | + _info[0].substr(4, 2), | ||
299 | + | ||
300 | + _info[1].substr(0, 1), | ||
301 | + _info[1].substr(1, 2), | ||
302 | + _info[1].substr(3, 1), | ||
303 | + _info[1].substr(4, 2), | ||
304 | + | ||
305 | + _info[2].substr(0, 1), | ||
306 | + _info[2].substr(1, 2), | ||
307 | + _info[2].substr(3, 1), | ||
308 | + _info[2].substr(4, 2), | ||
309 | + | ||
310 | + _info[3].substr(0, 1), | ||
311 | + _info[3].substr(1, 2), | ||
312 | + _info[3].substr(3, 1), | ||
313 | + _info[3].substr(4, 2), | ||
314 | + | ||
315 | + _info[4].substr(0, 1), | ||
316 | + _info[4].substr(1, 2), | ||
317 | + _info[4].substr(3, 1), | ||
318 | + _info[4].substr(4, 2), | ||
319 | + | ||
320 | + _info[5].substr(0, 1), | ||
321 | + _info[5].substr(1, 2), | ||
322 | + _info[5].substr(3, 1), | ||
323 | + _info[5].substr(4, 2) | ||
324 | + ] | ||
325 | + return parseInt(_calday[n - 1]) | ||
326 | + }, | ||
327 | + | ||
328 | + /** | ||
329 | + * 传入农历数字月份返回汉语通俗表示法 | ||
330 | + * @param lunar month | ||
331 | + * @return Cn string | ||
332 | + * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月' | ||
333 | + */ | ||
334 | + toChinaMonth: function (m) { // 月 => \u6708 | ||
335 | + if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1 | ||
336 | + var s = this.nStr3[m - 1] | ||
337 | + s += '\u6708'// 加上月字 | ||
338 | + return s | ||
339 | + }, | ||
340 | + | ||
341 | + /** | ||
342 | + * 传入农历日期数字返回汉字表示法 | ||
343 | + * @param lunar day | ||
344 | + * @return Cn string | ||
345 | + * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一' | ||
346 | + */ | ||
347 | + toChinaDay: function (d) { // 日 => \u65e5 | ||
348 | + var s | ||
349 | + switch (d) { | ||
350 | + case 10: | ||
351 | + s = '\u521d\u5341'; break | ||
352 | + case 20: | ||
353 | + s = '\u4e8c\u5341'; break | ||
354 | + break | ||
355 | + case 30: | ||
356 | + s = '\u4e09\u5341'; break | ||
357 | + break | ||
358 | + default : | ||
359 | + s = this.nStr2[Math.floor(d / 10)] | ||
360 | + s += this.nStr1[d % 10] | ||
361 | + } | ||
362 | + return (s) | ||
363 | + }, | ||
364 | + | ||
365 | + /** | ||
366 | + * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春” | ||
367 | + * @param y year | ||
368 | + * @return Cn string | ||
369 | + * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔' | ||
370 | + */ | ||
371 | + getAnimal: function (y) { | ||
372 | + return this.Animals[(y - 4) % 12] | ||
373 | + }, | ||
374 | + | ||
375 | + /** | ||
376 | + * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON | ||
377 | + * @param y solar year | ||
378 | + * @param m solar month | ||
379 | + * @param d solar day | ||
380 | + * @return JSON object | ||
381 | + * @eg:console.log(calendar.solar2lunar(1987,11,01)); | ||
382 | + */ | ||
383 | + solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31 | ||
384 | + // 年份限定、上限 | ||
385 | + if (y < 1900 || y > 2100) { | ||
386 | + return -1// undefined转换为数字变为NaN | ||
387 | + } | ||
388 | + // 公历传参最下限 | ||
389 | + if (y == 1900 && m == 1 && d < 31) { | ||
390 | + return -1 | ||
391 | + } | ||
392 | + // 未传参 获得当天 | ||
393 | + if (!y) { | ||
394 | + var objDate = new Date() | ||
395 | + } else { | ||
396 | + var objDate = new Date(y, parseInt(m) - 1, d) | ||
397 | + } | ||
398 | + var i; var leap = 0; var temp = 0 | ||
399 | + // 修正ymd参数 | ||
400 | + var y = objDate.getFullYear() | ||
401 | + var m = objDate.getMonth() + 1 | ||
402 | + var d = objDate.getDate() | ||
403 | + var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000 | ||
404 | + for (i = 1900; i < 2101 && offset > 0; i++) { | ||
405 | + temp = this.lYearDays(i) | ||
406 | + offset -= temp | ||
407 | + } | ||
408 | + if (offset < 0) { | ||
409 | + offset += temp; i-- | ||
410 | + } | ||
411 | + | ||
412 | + // 是否今天 | ||
413 | + var isTodayObj = new Date() | ||
414 | + var isToday = false | ||
415 | + if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) { | ||
416 | + isToday = true | ||
417 | + } | ||
418 | + // 星期几 | ||
419 | + var nWeek = objDate.getDay() | ||
420 | + var cWeek = this.nStr1[nWeek] | ||
421 | + // 数字表示周几顺应天朝周一开始的惯例 | ||
422 | + if (nWeek == 0) { | ||
423 | + nWeek = 7 | ||
424 | + } | ||
425 | + // 农历年 | ||
426 | + var year = i | ||
427 | + var leap = this.leapMonth(i) // 闰哪个月 | ||
428 | + var isLeap = false | ||
429 | + | ||
430 | + // 效验闰月 | ||
431 | + for (i = 1; i < 13 && offset > 0; i++) { | ||
432 | + // 闰月 | ||
433 | + if (leap > 0 && i == (leap + 1) && isLeap == false) { | ||
434 | + --i | ||
435 | + isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数 | ||
436 | + } else { | ||
437 | + temp = this.monthDays(year, i)// 计算农历普通月天数 | ||
438 | + } | ||
439 | + // 解除闰月 | ||
440 | + if (isLeap == true && i == (leap + 1)) { isLeap = false } | ||
441 | + offset -= temp | ||
442 | + } | ||
443 | + // 闰月导致数组下标重叠取反 | ||
444 | + if (offset == 0 && leap > 0 && i == leap + 1) { | ||
445 | + if (isLeap) { | ||
446 | + isLeap = false | ||
447 | + } else { | ||
448 | + isLeap = true; --i | ||
449 | + } | ||
450 | + } | ||
451 | + if (offset < 0) { | ||
452 | + offset += temp; --i | ||
453 | + } | ||
454 | + // 农历月 | ||
455 | + var month = i | ||
456 | + // 农历日 | ||
457 | + var day = offset + 1 | ||
458 | + // 天干地支处理 | ||
459 | + var sm = m - 1 | ||
460 | + var gzY = this.toGanZhiYear(year) | ||
461 | + | ||
462 | + // 当月的两个节气 | ||
463 | + // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year` | ||
464 | + var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始 | ||
465 | + var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始 | ||
466 | + | ||
467 | + // 依据12节气修正干支月 | ||
468 | + var gzM = this.toGanZhi((y - 1900) * 12 + m + 11) | ||
469 | + if (d >= firstNode) { | ||
470 | + gzM = this.toGanZhi((y - 1900) * 12 + m + 12) | ||
471 | + } | ||
472 | + | ||
473 | + // 传入的日期的节气与否 | ||
474 | + var isTerm = false | ||
475 | + var Term = null | ||
476 | + if (firstNode == d) { | ||
477 | + isTerm = true | ||
478 | + Term = this.solarTerm[m * 2 - 2] | ||
479 | + } | ||
480 | + if (secondNode == d) { | ||
481 | + isTerm = true | ||
482 | + Term = this.solarTerm[m * 2 - 1] | ||
483 | + } | ||
484 | + // 日柱 当月一日与 1900/1/1 相差天数 | ||
485 | + var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10 | ||
486 | + var gzD = this.toGanZhi(dayCyclical + d - 1) | ||
487 | + // 该日期所属的星座 | ||
488 | + var astro = this.toAstro(m, d) | ||
489 | + | ||
490 | + return { 'lYear': year, 'lMonth': month, 'lDay': day, 'Animal': this.getAnimal(year), 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month), 'IDayCn': this.toChinaDay(day), 'cYear': y, 'cMonth': m, 'cDay': d, 'gzYear': gzY, 'gzMonth': gzM, 'gzDay': gzD, 'isToday': isToday, 'isLeap': isLeap, 'nWeek': nWeek, 'ncWeek': '\u661f\u671f' + cWeek, 'isTerm': isTerm, 'Term': Term, 'astro': astro } | ||
491 | + }, | ||
492 | + | ||
493 | + /** | ||
494 | + * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON | ||
495 | + * @param y lunar year | ||
496 | + * @param m lunar month | ||
497 | + * @param d lunar day | ||
498 | + * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可] | ||
499 | + * @return JSON object | ||
500 | + * @eg:console.log(calendar.lunar2solar(1987,9,10)); | ||
501 | + */ | ||
502 | + lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1 | ||
503 | + var isLeapMonth = !!isLeapMonth | ||
504 | + var leapOffset = 0 | ||
505 | + var leapMonth = this.leapMonth(y) | ||
506 | + var leapDay = this.leapDays(y) | ||
507 | + if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同 | ||
508 | + if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值 | ||
509 | + var day = this.monthDays(y, m) | ||
510 | + var _day = day | ||
511 | + // bugFix 2016-9-25 | ||
512 | + // if month is leap, _day use leapDays method | ||
513 | + if (isLeapMonth) { | ||
514 | + _day = this.leapDays(y, m) | ||
515 | + } | ||
516 | + if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验 | ||
517 | + | ||
518 | + // 计算农历的时间差 | ||
519 | + var offset = 0 | ||
520 | + for (var i = 1900; i < y; i++) { | ||
521 | + offset += this.lYearDays(i) | ||
522 | + } | ||
523 | + var leap = 0; var isAdd = false | ||
524 | + for (var i = 1; i < m; i++) { | ||
525 | + leap = this.leapMonth(y) | ||
526 | + if (!isAdd) { // 处理闰月 | ||
527 | + if (leap <= i && leap > 0) { | ||
528 | + offset += this.leapDays(y); isAdd = true | ||
529 | + } | ||
530 | + } | ||
531 | + offset += this.monthDays(y, i) | ||
532 | + } | ||
533 | + // 转换闰月农历 需补充该年闰月的前一个月的时差 | ||
534 | + if (isLeapMonth) { offset += day } | ||
535 | + // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点) | ||
536 | + var stmap = Date.UTC(1900, 1, 30, 0, 0, 0) | ||
537 | + var calObj = new Date((offset + d - 31) * 86400000 + stmap) | ||
538 | + var cY = calObj.getUTCFullYear() | ||
539 | + var cM = calObj.getUTCMonth() + 1 | ||
540 | + var cD = calObj.getUTCDate() | ||
541 | + | ||
542 | + return this.solar2lunar(cY, cM, cD) | ||
543 | + } | ||
544 | +} | ||
545 | + | ||
546 | +export default calendar |
addons/wanlshop/library/AutoProject/wanlshop/components/uni-calendar/uni-calendar-item.vue
0 → 100644
1 | +<template> | ||
2 | + <view class="uni-calendar-item__weeks-box" :class="{ | ||
3 | + 'uni-calendar-item--disable':weeks.disable, | ||
4 | + 'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, | ||
5 | + 'uni-calendar-item--checked':(calendar.fullDate === weeks.fullDate && !weeks.isDay) , | ||
6 | + 'uni-calendar-item--before-checked':weeks.beforeMultiple, | ||
7 | + 'uni-calendar-item--multiple': weeks.multiple, | ||
8 | + 'uni-calendar-item--after-checked':weeks.afterMultiple, | ||
9 | + }" | ||
10 | + @tap="choiceDate(weeks)"> | ||
11 | + <view class="uni-calendar-item__weeks-box-item"> | ||
12 | + <text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text> | ||
13 | + <text class="uni-calendar-item__weeks-box-text" :class="{ | ||
14 | + 'uni-calendar-item--isDay-text': weeks.isDay, | ||
15 | + 'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, | ||
16 | + 'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay, | ||
17 | + 'uni-calendar-item--before-checked':weeks.beforeMultiple, | ||
18 | + 'uni-calendar-item--multiple': weeks.multiple, | ||
19 | + 'uni-calendar-item--after-checked':weeks.afterMultiple, | ||
20 | + 'uni-calendar-item--disable':weeks.disable, | ||
21 | + }">{{weeks.date}}</text> | ||
22 | + <text v-if="!lunar&&!weeks.extraInfo && weeks.isDay" class="uni-calendar-item__weeks-lunar-text" :class="{ | ||
23 | + 'uni-calendar-item--isDay-text':weeks.isDay, | ||
24 | + 'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, | ||
25 | + 'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay, | ||
26 | + 'uni-calendar-item--before-checked':weeks.beforeMultiple, | ||
27 | + 'uni-calendar-item--multiple': weeks.multiple, | ||
28 | + 'uni-calendar-item--after-checked':weeks.afterMultiple, | ||
29 | + }">今天</text> | ||
30 | + <text v-if="lunar&&!weeks.extraInfo" class="uni-calendar-item__weeks-lunar-text" :class="{ | ||
31 | + 'uni-calendar-item--isDay-text':weeks.isDay, | ||
32 | + 'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, | ||
33 | + 'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay, | ||
34 | + 'uni-calendar-item--before-checked':weeks.beforeMultiple, | ||
35 | + 'uni-calendar-item--multiple': weeks.multiple, | ||
36 | + 'uni-calendar-item--after-checked':weeks.afterMultiple, | ||
37 | + 'uni-calendar-item--disable':weeks.disable, | ||
38 | + }">{{weeks.isDay?'今天': (weeks.lunar.IDayCn === '初一'?weeks.lunar.IMonthCn:weeks.lunar.IDayCn)}}</text> | ||
39 | + <text v-if="weeks.extraInfo&&weeks.extraInfo.info" class="uni-calendar-item__weeks-lunar-text" :class="{ | ||
40 | + 'uni-calendar-item--extra':weeks.extraInfo.info, | ||
41 | + 'uni-calendar-item--isDay-text':weeks.isDay, | ||
42 | + 'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay, | ||
43 | + 'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay, | ||
44 | + 'uni-calendar-item--before-checked':weeks.beforeMultiple, | ||
45 | + 'uni-calendar-item--multiple': weeks.multiple, | ||
46 | + 'uni-calendar-item--after-checked':weeks.afterMultiple, | ||
47 | + 'uni-calendar-item--disable':weeks.disable, | ||
48 | + }">{{weeks.extraInfo.info}}</text> | ||
49 | + </view> | ||
50 | + </view> | ||
51 | +</template> | ||
52 | + | ||
53 | +<script> | ||
54 | + export default { | ||
55 | + props: { | ||
56 | + weeks: { | ||
57 | + type: Object, | ||
58 | + default () { | ||
59 | + return {} | ||
60 | + } | ||
61 | + }, | ||
62 | + calendar: { | ||
63 | + type: Object, | ||
64 | + default: () => { | ||
65 | + return {} | ||
66 | + } | ||
67 | + }, | ||
68 | + selected: { | ||
69 | + type: Array, | ||
70 | + default: () => { | ||
71 | + return [] | ||
72 | + } | ||
73 | + }, | ||
74 | + lunar: { | ||
75 | + type: Boolean, | ||
76 | + default: false | ||
77 | + } | ||
78 | + }, | ||
79 | + methods: { | ||
80 | + choiceDate(weeks) { | ||
81 | + this.$emit('change', weeks) | ||
82 | + } | ||
83 | + } | ||
84 | + } | ||
85 | +</script> | ||
86 | + | ||
87 | +<style lang="scss" scoped> | ||
88 | + .uni-calendar-item__weeks-box { | ||
89 | + flex: 1; | ||
90 | + /* #ifndef APP-NVUE */ | ||
91 | + display: flex; | ||
92 | + /* #endif */ | ||
93 | + flex-direction: column; | ||
94 | + justify-content: center; | ||
95 | + align-items: center; | ||
96 | + } | ||
97 | + | ||
98 | + .uni-calendar-item__weeks-box-text { | ||
99 | + font-size: $uni-font-size-base; | ||
100 | + color: $uni-text-color; | ||
101 | + } | ||
102 | + | ||
103 | + .uni-calendar-item__weeks-lunar-text { | ||
104 | + font-size: $uni-font-size-sm; | ||
105 | + color: $uni-text-color; | ||
106 | + } | ||
107 | + | ||
108 | + .uni-calendar-item__weeks-box-item { | ||
109 | + position: relative; | ||
110 | + /* #ifndef APP-NVUE */ | ||
111 | + display: flex; | ||
112 | + /* #endif */ | ||
113 | + flex-direction: column; | ||
114 | + justify-content: center; | ||
115 | + align-items: center; | ||
116 | + width: 100rpx; | ||
117 | + height: 100rpx; | ||
118 | + } | ||
119 | + | ||
120 | + .uni-calendar-item__weeks-box-circle { | ||
121 | + position: absolute; | ||
122 | + display: none; | ||
123 | + top: 5px; | ||
124 | + right: 5px; | ||
125 | + width: 8px; | ||
126 | + height: 8px; | ||
127 | + border-radius: 8px; | ||
128 | + background-color: #ffbc00; | ||
129 | + | ||
130 | + } | ||
131 | + | ||
132 | + .uni-calendar-item--disable { | ||
133 | + background-color: rgba(249, 249, 249, $uni-opacity-disabled); | ||
134 | + color: $uni-text-color-disable; | ||
135 | + } | ||
136 | + | ||
137 | + .uni-calendar-item--isDay-text { | ||
138 | + color: #ffbc00; | ||
139 | + } | ||
140 | + | ||
141 | + // .uni-calendar-item--isDay { | ||
142 | + // background-color: $uni-color-primary; | ||
143 | + // opacity: 0.6; | ||
144 | + // color: #fff; | ||
145 | + // } | ||
146 | + | ||
147 | + .uni-calendar-item--extra { | ||
148 | + color: #ffbc00; | ||
149 | + opacity: 0.8; | ||
150 | + } | ||
151 | + | ||
152 | + // .uni-calendar-item--checked { | ||
153 | + // background-color: $uni-color-primary; | ||
154 | + // color: #fff; | ||
155 | + // opacity: 0.1; | ||
156 | + // } | ||
157 | + | ||
158 | + .uni-calendar-item--multiple { | ||
159 | + background-color: $uni-color-primary; | ||
160 | + color: #fff; | ||
161 | + opacity: 0.8; | ||
162 | + } | ||
163 | + .uni-calendar-item--before-checked { | ||
164 | + background-color: #ff5a5f; | ||
165 | + color: #fff; | ||
166 | + } | ||
167 | + .uni-calendar-item--after-checked { | ||
168 | + background-color: #ff5a5f; | ||
169 | + color: #fff; | ||
170 | + } | ||
171 | +</style> |
1 | +<template> | ||
2 | + <view class="uni-calendar"> | ||
3 | + <view v-if="!insert&&show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}" @tap="clean"></view> | ||
4 | + <view v-if="insert || show" class="uni-calendar__content" :class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow}"> | ||
5 | + <view v-if="!insert" class="uni-calendar__header uni-calendar--fixed-top"> | ||
6 | + <view class="uni-calendar__header-btn-box" @tap="close"> | ||
7 | + <text class="uni-calendar__header-text uni-calendar--fixed-width">取消</text> | ||
8 | + </view> | ||
9 | + <view class="uni-calendar__header-btn-box" @tap="confirm"> | ||
10 | + <text class="uni-calendar__header-text uni-calendar--fixed-width">确定</text> | ||
11 | + </view> | ||
12 | + </view> | ||
13 | + <view class="uni-calendar__header"> | ||
14 | + <view class="uni-calendar__header-btn-box" @tap.stop="pre"> | ||
15 | + <view class="uni-calendar__header-btn uni-calendar--left"></view> | ||
16 | + </view> | ||
17 | + <picker mode="date" :value="date" fields="month" @change="bindDateChange"> | ||
18 | + <text class="uni-calendar__header-text">{{ (nowDate.year||'') +'年'+( nowDate.month||'') +'月'}}</text> | ||
19 | + </picker> | ||
20 | + <view class="uni-calendar__header-btn-box" @tap.stop="next"> | ||
21 | + <view class="uni-calendar__header-btn uni-calendar--right"></view> | ||
22 | + </view> | ||
23 | + <text v-if="showReturn" class="uni-calendar__backtoday" @tap="backtoday">回到今天</text> | ||
24 | + </view> | ||
25 | + <view class="uni-calendar__box"> | ||
26 | + <view v-if="showMonth" class="uni-calendar__box-bg"> | ||
27 | + <text class="uni-calendar__box-bg-text">{{nowDate.month}}</text> | ||
28 | + </view> | ||
29 | + <view class="uni-calendar__weeks"> | ||
30 | + <view class="uni-calendar__weeks-day"> | ||
31 | + <text class="uni-calendar__weeks-day-text">日</text> | ||
32 | + </view> | ||
33 | + <view class="uni-calendar__weeks-day"> | ||
34 | + <text class="uni-calendar__weeks-day-text">一</text> | ||
35 | + </view> | ||
36 | + <view class="uni-calendar__weeks-day"> | ||
37 | + <text class="uni-calendar__weeks-day-text">二</text> | ||
38 | + </view> | ||
39 | + <view class="uni-calendar__weeks-day"> | ||
40 | + <text class="uni-calendar__weeks-day-text">三</text> | ||
41 | + </view> | ||
42 | + <view class="uni-calendar__weeks-day"> | ||
43 | + <text class="uni-calendar__weeks-day-text">四</text> | ||
44 | + </view> | ||
45 | + <view class="uni-calendar__weeks-day"> | ||
46 | + <text class="uni-calendar__weeks-day-text">五</text> | ||
47 | + </view> | ||
48 | + <view class="uni-calendar__weeks-day"> | ||
49 | + <text class="uni-calendar__weeks-day-text">六</text> | ||
50 | + </view> | ||
51 | + </view> | ||
52 | + <view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex"> | ||
53 | + <view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex"> | ||
54 | + <calendar-item :weeks="weeks" :calendar="calendar" :selected="selected" :lunar="lunar" @change="choiceDate"></calendar-item> | ||
55 | + </view> | ||
56 | + </view> | ||
57 | + </view> | ||
58 | + </view> | ||
59 | + </view> | ||
60 | +</template> | ||
61 | + | ||
62 | +<script> | ||
63 | + import Calendar from './util.js'; | ||
64 | + import calendarItem from './uni-calendar-item.vue' | ||
65 | + /** | ||
66 | + * Calendar 日历 | ||
67 | + * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等 | ||
68 | + * @tutorial https://ext.dcloud.net.cn/plugin?id=56 | ||
69 | + * @property {String} date 自定义当前时间,默认为今天 | ||
70 | + * @property {Boolean} lunar 显示农历 | ||
71 | + * @property {String} startDate 日期选择范围-开始日期 | ||
72 | + * @property {String} endDate 日期选择范围-结束日期 | ||
73 | + * @property {Boolean} range 范围选择 | ||
74 | + * @property {Boolean} insert = [true|false] 插入模式,默认为false | ||
75 | + * @value true 弹窗模式 | ||
76 | + * @value false 插入模式 | ||
77 | + * @property {Boolean} clearDate = [true|false] 弹窗模式是否清空上次选择内容 | ||
78 | + * @property {Array} selected 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}] | ||
79 | + * @property {Boolean} showMonth 是否选择月份为背景 | ||
80 | + * @event {Function} change 日期改变,`insert :ture` 时生效 | ||
81 | + * @event {Function} confirm 确认选择`insert :false` 时生效 | ||
82 | + * @event {Function} monthSwitch 切换月份时触发 | ||
83 | + * @example <uni-calendar :insert="true":lunar="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" /> | ||
84 | + */ | ||
85 | + export default { | ||
86 | + components: { | ||
87 | + calendarItem | ||
88 | + }, | ||
89 | + props: { | ||
90 | + date: { | ||
91 | + type: String, | ||
92 | + default: '' | ||
93 | + }, | ||
94 | + selected: { | ||
95 | + type: Array, | ||
96 | + default () { | ||
97 | + return [] | ||
98 | + } | ||
99 | + }, | ||
100 | + lunar: { | ||
101 | + type: Boolean, | ||
102 | + default: false | ||
103 | + }, | ||
104 | + showReturn: { | ||
105 | + type: Boolean, | ||
106 | + default: true | ||
107 | + }, | ||
108 | + startDate: { | ||
109 | + type: String, | ||
110 | + default: '' | ||
111 | + }, | ||
112 | + endDate: { | ||
113 | + type: String, | ||
114 | + default: '' | ||
115 | + }, | ||
116 | + range: { | ||
117 | + type: Boolean, | ||
118 | + default: false | ||
119 | + }, | ||
120 | + insert: { | ||
121 | + type: Boolean, | ||
122 | + default: true | ||
123 | + }, | ||
124 | + showMonth: { | ||
125 | + type: Boolean, | ||
126 | + default: true | ||
127 | + }, | ||
128 | + clearDate: { | ||
129 | + type: Boolean, | ||
130 | + default: true | ||
131 | + } | ||
132 | + }, | ||
133 | + data() { | ||
134 | + return { | ||
135 | + show: false, | ||
136 | + weeks: [], | ||
137 | + calendar: {}, | ||
138 | + nowDate: '', | ||
139 | + aniMaskShow: false | ||
140 | + } | ||
141 | + }, | ||
142 | + watch: { | ||
143 | + date(newVal) { | ||
144 | + this.cale.setDate(newVal) | ||
145 | + this.init(this.cale.selectDate.fullDate) | ||
146 | + }, | ||
147 | + startDate(val){ | ||
148 | + this.cale.resetSatrtDate(val) | ||
149 | + }, | ||
150 | + endDate(val){ | ||
151 | + this.cale.resetEndDate(val) | ||
152 | + }, | ||
153 | + selected(newVal) { | ||
154 | + this.cale.setSelectInfo(this.nowDate.fullDate, newVal) | ||
155 | + this.weeks = this.cale.weeks | ||
156 | + } | ||
157 | + }, | ||
158 | + created() { | ||
159 | + // 获取日历方法实例 | ||
160 | + this.cale = new Calendar({ | ||
161 | + // date: new Date(), | ||
162 | + selected: this.selected, | ||
163 | + startDate: this.startDate, | ||
164 | + endDate: this.endDate, | ||
165 | + range: this.range, | ||
166 | + }) | ||
167 | + // 选中某一天 | ||
168 | + this.cale.setDate(this.date) | ||
169 | + this.init(this.cale.selectDate.fullDate) | ||
170 | + // this.setDay | ||
171 | + }, | ||
172 | + methods: { | ||
173 | + // 取消穿透 | ||
174 | + clean() {}, | ||
175 | + bindDateChange(e) { | ||
176 | + const value = e.detail.value + '-1' | ||
177 | + console.log(this.cale.getDate(value)); | ||
178 | + this.cale.setDate(value) | ||
179 | + this.init(value) | ||
180 | + }, | ||
181 | + /** | ||
182 | + * 初始化日期显示 | ||
183 | + * @param {Object} date | ||
184 | + */ | ||
185 | + init(date) { | ||
186 | + this.weeks = this.cale.weeks | ||
187 | + this.nowDate = this.calendar = this.cale.getInfo(date) | ||
188 | + }, | ||
189 | + /** | ||
190 | + * 打开日历弹窗 | ||
191 | + */ | ||
192 | + open() { | ||
193 | + // 弹窗模式并且清理数据 | ||
194 | + if (this.clearDate && !this.insert) { | ||
195 | + this.cale.cleanMultipleStatus() | ||
196 | + this.cale.setDate(this.date) | ||
197 | + this.init(this.cale.selectDate.fullDate) | ||
198 | + } | ||
199 | + this.show = true | ||
200 | + this.$nextTick(() => { | ||
201 | + setTimeout(() => { | ||
202 | + this.aniMaskShow = true | ||
203 | + }, 50) | ||
204 | + }) | ||
205 | + }, | ||
206 | + /** | ||
207 | + * 关闭日历弹窗 | ||
208 | + */ | ||
209 | + close() { | ||
210 | + this.aniMaskShow = false | ||
211 | + this.$nextTick(() => { | ||
212 | + setTimeout(() => { | ||
213 | + this.show = false | ||
214 | + this.$emit('close') | ||
215 | + }, 300) | ||
216 | + }) | ||
217 | + }, | ||
218 | + /** | ||
219 | + * 确认按钮 | ||
220 | + */ | ||
221 | + confirm() { | ||
222 | + this.setEmit('confirm') | ||
223 | + this.close() | ||
224 | + }, | ||
225 | + /** | ||
226 | + * 变化触发 | ||
227 | + */ | ||
228 | + change() { | ||
229 | + if (!this.insert) return | ||
230 | + this.setEmit('change') | ||
231 | + }, | ||
232 | + /** | ||
233 | + * 选择月份触发 | ||
234 | + */ | ||
235 | + monthSwitch() { | ||
236 | + let { | ||
237 | + year, | ||
238 | + month | ||
239 | + } = this.nowDate | ||
240 | + this.$emit('monthSwitch', { | ||
241 | + year, | ||
242 | + month: Number(month) | ||
243 | + }) | ||
244 | + }, | ||
245 | + /** | ||
246 | + * 派发事件 | ||
247 | + * @param {Object} name | ||
248 | + */ | ||
249 | + setEmit(name) { | ||
250 | + let { | ||
251 | + year, | ||
252 | + month, | ||
253 | + date, | ||
254 | + fullDate, | ||
255 | + lunar, | ||
256 | + extraInfo | ||
257 | + } = this.calendar | ||
258 | + this.$emit(name, { | ||
259 | + range: this.cale.multipleStatus, | ||
260 | + year, | ||
261 | + month, | ||
262 | + date, | ||
263 | + fulldate: fullDate, | ||
264 | + lunar, | ||
265 | + extraInfo: extraInfo || {} | ||
266 | + }) | ||
267 | + }, | ||
268 | + /** | ||
269 | + * 选择天触发 | ||
270 | + * @param {Object} weeks | ||
271 | + */ | ||
272 | + choiceDate(weeks) { | ||
273 | + if (weeks.disable) return | ||
274 | + this.calendar = weeks | ||
275 | + // 设置多选 | ||
276 | + this.cale.setMultiple(this.calendar.fullDate) | ||
277 | + this.weeks = this.cale.weeks | ||
278 | + this.change() | ||
279 | + }, | ||
280 | + /** | ||
281 | + * 回到今天 | ||
282 | + */ | ||
283 | + backtoday() { | ||
284 | + console.log(this.cale.getDate(new Date()).fullDate); | ||
285 | + let date = this.cale.getDate(new Date()).fullDate | ||
286 | + this.cale.setDate(date) | ||
287 | + this.init(date) | ||
288 | + this.change() | ||
289 | + }, | ||
290 | + /** | ||
291 | + * 上个月 | ||
292 | + */ | ||
293 | + pre() { | ||
294 | + const preDate = this.cale.getDate(this.nowDate.fullDate, -1, 'month').fullDate | ||
295 | + this.setDate(preDate) | ||
296 | + this.monthSwitch() | ||
297 | + | ||
298 | + }, | ||
299 | + /** | ||
300 | + * 下个月 | ||
301 | + */ | ||
302 | + next() { | ||
303 | + const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate | ||
304 | + this.setDate(nextDate) | ||
305 | + this.monthSwitch() | ||
306 | + }, | ||
307 | + /** | ||
308 | + * 设置日期 | ||
309 | + * @param {Object} date | ||
310 | + */ | ||
311 | + setDate(date) { | ||
312 | + this.cale.setDate(date) | ||
313 | + this.weeks = this.cale.weeks | ||
314 | + this.nowDate = this.cale.getInfo(date) | ||
315 | + } | ||
316 | + } | ||
317 | + } | ||
318 | +</script> | ||
319 | + | ||
320 | +<style lang="scss" scoped> | ||
321 | + .uni-calendar { | ||
322 | + /* #ifndef APP-NVUE */ | ||
323 | + display: flex; | ||
324 | + /* #endif */ | ||
325 | + flex-direction: column; | ||
326 | + } | ||
327 | + | ||
328 | + .uni-calendar__mask { | ||
329 | + position: fixed; | ||
330 | + bottom: 0; | ||
331 | + top: 0; | ||
332 | + left: 0; | ||
333 | + right: 0; | ||
334 | + background-color: $uni-bg-color-mask; | ||
335 | + transition-property: opacity; | ||
336 | + transition-duration: 0.3s; | ||
337 | + opacity: 0; | ||
338 | + /* #ifndef APP-NVUE */ | ||
339 | + z-index: 99; | ||
340 | + /* #endif */ | ||
341 | + } | ||
342 | + | ||
343 | + .uni-calendar--mask-show { | ||
344 | + opacity: 1 | ||
345 | + } | ||
346 | + | ||
347 | + .uni-calendar--fixed { | ||
348 | + position: fixed; | ||
349 | + bottom: 0; | ||
350 | + left: 0; | ||
351 | + right: 0; | ||
352 | + transition-property: transform; | ||
353 | + transition-duration: 0.3s; | ||
354 | + transform: translateY(460px); | ||
355 | + /* #ifndef APP-NVUE */ | ||
356 | + z-index: 99; | ||
357 | + /* #endif */ | ||
358 | + } | ||
359 | + | ||
360 | + .uni-calendar--ani-show { | ||
361 | + transform: translateY(0); | ||
362 | + } | ||
363 | + | ||
364 | + .uni-calendar__content { | ||
365 | + background-color: #fff; | ||
366 | + } | ||
367 | + | ||
368 | + .uni-calendar__header { | ||
369 | + position: relative; | ||
370 | + /* #ifndef APP-NVUE */ | ||
371 | + display: flex; | ||
372 | + /* #endif */ | ||
373 | + flex-direction: row; | ||
374 | + justify-content: flex-start; | ||
375 | + align-items: center; | ||
376 | + height: 50px; | ||
377 | + border-bottom-color: #f7f7f7; | ||
378 | + border-bottom-style: solid; | ||
379 | + border-bottom-width: 1px; | ||
380 | + } | ||
381 | + | ||
382 | + .uni-calendar--fixed-top { | ||
383 | + /* #ifndef APP-NVUE */ | ||
384 | + display: flex; | ||
385 | + /* #endif */ | ||
386 | + flex-direction: row; | ||
387 | + justify-content: space-between; | ||
388 | + border-top-color: $uni-border-color; | ||
389 | + border-top-style: solid; | ||
390 | + border-top-width: 1px; | ||
391 | + } | ||
392 | + | ||
393 | + .uni-calendar--fixed-width { | ||
394 | + width: 50px; | ||
395 | + // padding: 0 15px; | ||
396 | + } | ||
397 | + | ||
398 | + .uni-calendar__backtoday { | ||
399 | + position: absolute; | ||
400 | + right: 0; | ||
401 | + top: 25rpx; | ||
402 | + padding: 0 5px; | ||
403 | + padding-left: 10px; | ||
404 | + height: 25px; | ||
405 | + line-height: 25px; | ||
406 | + font-size: 12px; | ||
407 | + border-top-left-radius: 25px; | ||
408 | + border-bottom-left-radius: 25px; | ||
409 | + color: $uni-text-color; | ||
410 | + background-color: $uni-bg-color-hover; | ||
411 | + } | ||
412 | + | ||
413 | + .uni-calendar__header-text { | ||
414 | + text-align: center; | ||
415 | + width: 100px; | ||
416 | + font-size: $uni-font-size-base; | ||
417 | + color: $uni-text-color; | ||
418 | + } | ||
419 | + | ||
420 | + .uni-calendar__header-btn-box { | ||
421 | + /* #ifndef APP-NVUE */ | ||
422 | + display: flex; | ||
423 | + /* #endif */ | ||
424 | + flex-direction: row; | ||
425 | + align-items: center; | ||
426 | + justify-content: center; | ||
427 | + width: 50px; | ||
428 | + height: 50px; | ||
429 | + } | ||
430 | + | ||
431 | + .uni-calendar__header-btn { | ||
432 | + width: 10px; | ||
433 | + height: 10px; | ||
434 | + border-left-color: $uni-text-color-placeholder; | ||
435 | + border-left-style: solid; | ||
436 | + border-left-width: 2px; | ||
437 | + border-top-color: $uni-color-subtitle; | ||
438 | + border-top-style: solid; | ||
439 | + border-top-width: 2px; | ||
440 | + } | ||
441 | + | ||
442 | + .uni-calendar--left { | ||
443 | + transform: rotate(-45deg); | ||
444 | + } | ||
445 | + | ||
446 | + .uni-calendar--right { | ||
447 | + transform: rotate(135deg); | ||
448 | + } | ||
449 | + | ||
450 | + | ||
451 | + .uni-calendar__weeks { | ||
452 | + position: relative; | ||
453 | + /* #ifndef APP-NVUE */ | ||
454 | + display: flex; | ||
455 | + /* #endif */ | ||
456 | + flex-direction: row; | ||
457 | + } | ||
458 | + | ||
459 | + .uni-calendar__weeks-item { | ||
460 | + flex: 1; | ||
461 | + } | ||
462 | + | ||
463 | + .uni-calendar__weeks-day { | ||
464 | + flex: 1; | ||
465 | + /* #ifndef APP-NVUE */ | ||
466 | + display: flex; | ||
467 | + /* #endif */ | ||
468 | + flex-direction: column; | ||
469 | + justify-content: center; | ||
470 | + align-items: center; | ||
471 | + height: 45px; | ||
472 | + border-bottom-color: #F5F5F5; | ||
473 | + border-bottom-style: solid; | ||
474 | + border-bottom-width: 1px; | ||
475 | + } | ||
476 | + | ||
477 | + .uni-calendar__weeks-day-text { | ||
478 | + font-size: 14px; | ||
479 | + } | ||
480 | + | ||
481 | + .uni-calendar__box { | ||
482 | + position: relative; | ||
483 | + } | ||
484 | + | ||
485 | + .uni-calendar__box-bg { | ||
486 | + /* #ifndef APP-NVUE */ | ||
487 | + display: flex; | ||
488 | + /* #endif */ | ||
489 | + justify-content: center; | ||
490 | + align-items: center; | ||
491 | + position: absolute; | ||
492 | + top: 0; | ||
493 | + left: 0; | ||
494 | + right: 0; | ||
495 | + bottom: 0; | ||
496 | + } | ||
497 | + | ||
498 | + .uni-calendar__box-bg-text { | ||
499 | + font-size: 200px; | ||
500 | + font-weight: bold; | ||
501 | + color: $uni-text-color-grey; | ||
502 | + opacity: 0.1; | ||
503 | + text-align: center; | ||
504 | + /* #ifndef APP-NVUE */ | ||
505 | + line-height: 1; | ||
506 | + /* #endif */ | ||
507 | + } | ||
508 | +</style> |
1 | +import CALENDAR from './calendar.js' | ||
2 | + | ||
3 | +class Calendar { | ||
4 | + constructor({ | ||
5 | + date, | ||
6 | + selected, | ||
7 | + startDate, | ||
8 | + endDate, | ||
9 | + range | ||
10 | + } = {}) { | ||
11 | + // 当前日期 | ||
12 | + this.date = this.getDate(new Date()) // 当前初入日期 | ||
13 | + // 打点信息 | ||
14 | + this.selected = selected || []; | ||
15 | + // 范围开始 | ||
16 | + this.startDate = startDate | ||
17 | + // 范围结束 | ||
18 | + this.endDate = endDate | ||
19 | + this.range = range | ||
20 | + // 多选状态 | ||
21 | + this.cleanMultipleStatus() | ||
22 | + // 每周日期 | ||
23 | + this.weeks = {} | ||
24 | + // this._getWeek(this.date.fullDate) | ||
25 | + } | ||
26 | + /** | ||
27 | + * 设置日期 | ||
28 | + * @param {Object} date | ||
29 | + */ | ||
30 | + setDate(date) { | ||
31 | + this.selectDate = this.getDate(date) | ||
32 | + this._getWeek(this.selectDate.fullDate) | ||
33 | + } | ||
34 | + | ||
35 | + /** | ||
36 | + * 清理多选状态 | ||
37 | + */ | ||
38 | + cleanMultipleStatus() { | ||
39 | + this.multipleStatus = { | ||
40 | + before: '', | ||
41 | + after: '', | ||
42 | + data: [] | ||
43 | + } | ||
44 | + } | ||
45 | + | ||
46 | + /** | ||
47 | + * 重置开始日期 | ||
48 | + */ | ||
49 | + resetSatrtDate(startDate) { | ||
50 | + // 范围开始 | ||
51 | + this.startDate = startDate | ||
52 | + | ||
53 | + } | ||
54 | + | ||
55 | + /** | ||
56 | + * 重置结束日期 | ||
57 | + */ | ||
58 | + resetEndDate(endDate) { | ||
59 | + // 范围结束 | ||
60 | + this.endDate = endDate | ||
61 | + } | ||
62 | + | ||
63 | + /** | ||
64 | + * 获取任意时间 | ||
65 | + */ | ||
66 | + getDate(date, AddDayCount = 0, str = 'day') { | ||
67 | + if (!date) { | ||
68 | + date = new Date() | ||
69 | + } | ||
70 | + if (typeof date !== 'object') { | ||
71 | + date = date.replace(/-/g, '/') | ||
72 | + } | ||
73 | + const dd = new Date(date) | ||
74 | + switch (str) { | ||
75 | + case 'day': | ||
76 | + dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期 | ||
77 | + break | ||
78 | + case 'month': | ||
79 | + if (dd.getDate() === 31) { | ||
80 | + dd.setDate(dd.getDate() + AddDayCount) | ||
81 | + } else { | ||
82 | + dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期 | ||
83 | + } | ||
84 | + break | ||
85 | + case 'year': | ||
86 | + dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期 | ||
87 | + break | ||
88 | + } | ||
89 | + const y = dd.getFullYear() | ||
90 | + const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0 | ||
91 | + const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0 | ||
92 | + return { | ||
93 | + fullDate: y + '-' + m + '-' + d, | ||
94 | + year: y, | ||
95 | + month: m, | ||
96 | + date: d, | ||
97 | + day: dd.getDay() | ||
98 | + } | ||
99 | + } | ||
100 | + | ||
101 | + | ||
102 | + /** | ||
103 | + * 获取上月剩余天数 | ||
104 | + */ | ||
105 | + _getLastMonthDays(firstDay, full) { | ||
106 | + let dateArr = [] | ||
107 | + for (let i = firstDay; i > 0; i--) { | ||
108 | + const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate() | ||
109 | + dateArr.push({ | ||
110 | + date: beforeDate, | ||
111 | + month: full.month - 1, | ||
112 | + lunar: this.getlunar(full.year, full.month - 1, beforeDate), | ||
113 | + disable: true | ||
114 | + }) | ||
115 | + } | ||
116 | + return dateArr | ||
117 | + } | ||
118 | + /** | ||
119 | + * 获取本月天数 | ||
120 | + */ | ||
121 | + _currentMonthDys(dateData, full) { | ||
122 | + let dateArr = [] | ||
123 | + let fullDate = this.date.fullDate | ||
124 | + for (let i = 1; i <= dateData; i++) { | ||
125 | + let isinfo = false | ||
126 | + let nowDate = full.year + '-' + (full.month < 10 ? | ||
127 | + full.month : full.month) + '-' + (i < 10 ? | ||
128 | + '0' + i : i) | ||
129 | + // 是否今天 | ||
130 | + let isDay = fullDate === nowDate | ||
131 | + // 获取打点信息 | ||
132 | + let info = this.selected && this.selected.find((item) => { | ||
133 | + if (this.dateEqual(nowDate, item.date)) { | ||
134 | + return item | ||
135 | + } | ||
136 | + }) | ||
137 | + | ||
138 | + // 日期禁用 | ||
139 | + let disableBefore = true | ||
140 | + let disableAfter = true | ||
141 | + if (this.startDate) { | ||
142 | + let dateCompBefore = this.dateCompare(this.startDate, fullDate) | ||
143 | + disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate) | ||
144 | + } | ||
145 | + | ||
146 | + if (this.endDate) { | ||
147 | + let dateCompAfter = this.dateCompare(fullDate, this.endDate) | ||
148 | + disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate) | ||
149 | + } | ||
150 | + let multiples = this.multipleStatus.data | ||
151 | + let checked = false | ||
152 | + let multiplesStatus = -1 | ||
153 | + if (this.range) { | ||
154 | + if (multiples) { | ||
155 | + multiplesStatus = multiples.findIndex((item) => { | ||
156 | + return this.dateEqual(item, nowDate) | ||
157 | + }) | ||
158 | + } | ||
159 | + if (multiplesStatus !== -1) { | ||
160 | + checked = true | ||
161 | + } | ||
162 | + } | ||
163 | + let data = { | ||
164 | + fullDate: nowDate, | ||
165 | + year: full.year, | ||
166 | + date: i, | ||
167 | + multiple: this.range ? checked : false, | ||
168 | + beforeMultiple: this.dateEqual(this.multipleStatus.before, nowDate), | ||
169 | + afterMultiple: this.dateEqual(this.multipleStatus.after, nowDate), | ||
170 | + month: full.month, | ||
171 | + lunar: this.getlunar(full.year, full.month, i), | ||
172 | + disable: !disableBefore || !disableAfter, | ||
173 | + isDay | ||
174 | + } | ||
175 | + if (info) { | ||
176 | + data.extraInfo = info | ||
177 | + } | ||
178 | + | ||
179 | + dateArr.push(data) | ||
180 | + } | ||
181 | + return dateArr | ||
182 | + } | ||
183 | + /** | ||
184 | + * 获取下月天数 | ||
185 | + */ | ||
186 | + _getNextMonthDays(surplus, full) { | ||
187 | + let dateArr = [] | ||
188 | + for (let i = 1; i < surplus + 1; i++) { | ||
189 | + dateArr.push({ | ||
190 | + date: i, | ||
191 | + month: Number(full.month) + 1, | ||
192 | + lunar: this.getlunar(full.year, Number(full.month) + 1, i), | ||
193 | + disable: true | ||
194 | + }) | ||
195 | + } | ||
196 | + return dateArr | ||
197 | + } | ||
198 | + | ||
199 | + /** | ||
200 | + * 获取当前日期详情 | ||
201 | + * @param {Object} date | ||
202 | + */ | ||
203 | + getInfo(date) { | ||
204 | + if (!date) { | ||
205 | + date = new Date() | ||
206 | + } | ||
207 | + const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate) | ||
208 | + return dateInfo | ||
209 | + } | ||
210 | + | ||
211 | + /** | ||
212 | + * 比较时间大小 | ||
213 | + */ | ||
214 | + dateCompare(startDate, endDate) { | ||
215 | + // 计算截止时间 | ||
216 | + startDate = new Date(startDate.replace('-', '/').replace('-', '/')) | ||
217 | + // 计算详细项的截止时间 | ||
218 | + endDate = new Date(endDate.replace('-', '/').replace('-', '/')) | ||
219 | + if (startDate <= endDate) { | ||
220 | + return true | ||
221 | + } else { | ||
222 | + return false | ||
223 | + } | ||
224 | + } | ||
225 | + | ||
226 | + /** | ||
227 | + * 比较时间是否相等 | ||
228 | + */ | ||
229 | + dateEqual(before, after) { | ||
230 | + // 计算截止时间 | ||
231 | + before = new Date(before.replace('-', '/').replace('-', '/')) | ||
232 | + // 计算详细项的截止时间 | ||
233 | + after = new Date(after.replace('-', '/').replace('-', '/')) | ||
234 | + if (before.getTime() - after.getTime() === 0) { | ||
235 | + return true | ||
236 | + } else { | ||
237 | + return false | ||
238 | + } | ||
239 | + } | ||
240 | + | ||
241 | + | ||
242 | + /** | ||
243 | + * 获取日期范围内所有日期 | ||
244 | + * @param {Object} begin | ||
245 | + * @param {Object} end | ||
246 | + */ | ||
247 | + geDateAll(begin, end) { | ||
248 | + var arr = [] | ||
249 | + var ab = begin.split('-') | ||
250 | + var ae = end.split('-') | ||
251 | + var db = new Date() | ||
252 | + db.setFullYear(ab[0], ab[1] - 1, ab[2]) | ||
253 | + var de = new Date() | ||
254 | + de.setFullYear(ae[0], ae[1] - 1, ae[2]) | ||
255 | + var unixDb = db.getTime() - 24 * 60 * 60 * 1000 | ||
256 | + var unixDe = de.getTime() - 24 * 60 * 60 * 1000 | ||
257 | + for (var k = unixDb; k <= unixDe;) { | ||
258 | + k = k + 24 * 60 * 60 * 1000 | ||
259 | + arr.push(this.getDate(new Date(parseInt(k))).fullDate) | ||
260 | + } | ||
261 | + return arr | ||
262 | + } | ||
263 | + /** | ||
264 | + * 计算阴历日期显示 | ||
265 | + */ | ||
266 | + getlunar(year, month, date) { | ||
267 | + return CALENDAR.solar2lunar(year, month, date) | ||
268 | + } | ||
269 | + /** | ||
270 | + * 设置打点 | ||
271 | + */ | ||
272 | + setSelectInfo(data, value) { | ||
273 | + this.selected = value | ||
274 | + this._getWeek(data) | ||
275 | + } | ||
276 | + | ||
277 | + /** | ||
278 | + * 获取多选状态 | ||
279 | + */ | ||
280 | + setMultiple(fullDate) { | ||
281 | + let { | ||
282 | + before, | ||
283 | + after | ||
284 | + } = this.multipleStatus | ||
285 | + | ||
286 | + if (!this.range) return | ||
287 | + if (before && after) { | ||
288 | + this.multipleStatus.before = '' | ||
289 | + this.multipleStatus.after = '' | ||
290 | + this.multipleStatus.data = [] | ||
291 | + } else { | ||
292 | + if (!before) { | ||
293 | + this.multipleStatus.before = fullDate | ||
294 | + } else { | ||
295 | + this.multipleStatus.after = fullDate | ||
296 | + if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { | ||
297 | + this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after); | ||
298 | + } else { | ||
299 | + this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before); | ||
300 | + } | ||
301 | + } | ||
302 | + } | ||
303 | + this._getWeek(fullDate) | ||
304 | + } | ||
305 | + | ||
306 | + /** | ||
307 | + * 获取每周数据 | ||
308 | + * @param {Object} dateData | ||
309 | + */ | ||
310 | + _getWeek(dateData) { | ||
311 | + const { | ||
312 | + fullDate, | ||
313 | + year, | ||
314 | + month, | ||
315 | + date, | ||
316 | + day | ||
317 | + } = this.getDate(dateData) | ||
318 | + let firstDay = new Date(year, month - 1, 1).getDay() | ||
319 | + let currentDay = new Date(year, month, 0).getDate() | ||
320 | + let dates = { | ||
321 | + lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天 | ||
322 | + currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数 | ||
323 | + nextMonthDays: [], // 下个月开始几天 | ||
324 | + weeks: [] | ||
325 | + } | ||
326 | + let canlender = [] | ||
327 | + const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length) | ||
328 | + dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData)) | ||
329 | + canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays) | ||
330 | + let weeks = {} | ||
331 | + // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天 | ||
332 | + for (let i = 0; i < canlender.length; i++) { | ||
333 | + if (i % 7 === 0) { | ||
334 | + weeks[parseInt(i / 7)] = new Array(7) | ||
335 | + } | ||
336 | + weeks[parseInt(i / 7)][i % 7] = canlender[i] | ||
337 | + } | ||
338 | + this.canlender = canlender | ||
339 | + this.weeks = weeks | ||
340 | + } | ||
341 | + | ||
342 | + //静态方法 | ||
343 | + // static init(date) { | ||
344 | + // if (!this.instance) { | ||
345 | + // this.instance = new Calendar(date); | ||
346 | + // } | ||
347 | + // return this.instance; | ||
348 | + // } | ||
349 | +} | ||
350 | + | ||
351 | + | ||
352 | +export default Calendar |
1 | +<template> | ||
2 | + <view class="uni-countdown"> | ||
3 | + <text v-if="showDay" :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ d }}</text> | ||
4 | + <text v-if="showDay" :style="{ color: splitorColor }" class="uni-countdown__splitor">天</text> | ||
5 | + <text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ h }}</text> | ||
6 | + <text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '时' }}</text> | ||
7 | + <text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ i }}</text> | ||
8 | + <text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '分' }}</text> | ||
9 | + <text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ s }}</text> | ||
10 | + <text v-if="!showColon" :style="{ color: splitorColor }" class="uni-countdown__splitor">秒</text> | ||
11 | + </view> | ||
12 | +</template> | ||
13 | +<script> | ||
14 | + /** | ||
15 | + * Countdown 倒计时 | ||
16 | + * @description 倒计时组件 | ||
17 | + * @tutorial https://ext.dcloud.net.cn/plugin?id=25 | ||
18 | + * @property {String} backgroundColor 背景色 | ||
19 | + * @property {String} color 文字颜色 | ||
20 | + * @property {Number} day 天数 | ||
21 | + * @property {Number} hour 小时 | ||
22 | + * @property {Number} minute 分钟 | ||
23 | + * @property {Number} second 秒 | ||
24 | + * @property {Boolean} showDay = [true|false] 是否显示天数 | ||
25 | + * @property {Boolean} showColon = [true|false] 是否以冒号为分隔符 | ||
26 | + * @property {String} splitorColor 分割符号颜色 | ||
27 | + * @event {Function} timeup 倒计时时间到触发事件 | ||
28 | + * @example <uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown> | ||
29 | + */ | ||
30 | + export default { | ||
31 | + name: 'UniCountdown', | ||
32 | + props: { | ||
33 | + showDay: { | ||
34 | + type: Boolean, | ||
35 | + default: true | ||
36 | + }, | ||
37 | + showColon: { | ||
38 | + type: Boolean, | ||
39 | + default: true | ||
40 | + }, | ||
41 | + backgroundColor: { | ||
42 | + type: String, | ||
43 | + default: '#FFFFFF' | ||
44 | + }, | ||
45 | + borderColor: { | ||
46 | + type: String, | ||
47 | + default: '#000000' | ||
48 | + }, | ||
49 | + color: { | ||
50 | + type: String, | ||
51 | + default: '#000000' | ||
52 | + }, | ||
53 | + splitorColor: { | ||
54 | + type: String, | ||
55 | + default: '#000000' | ||
56 | + }, | ||
57 | + day: { | ||
58 | + type: Number, | ||
59 | + default: 0 | ||
60 | + }, | ||
61 | + hour: { | ||
62 | + type: Number, | ||
63 | + default: 0 | ||
64 | + }, | ||
65 | + minute: { | ||
66 | + type: Number, | ||
67 | + default: 0 | ||
68 | + }, | ||
69 | + second: { | ||
70 | + type: Number, | ||
71 | + default: 0 | ||
72 | + } | ||
73 | + }, | ||
74 | + data() { | ||
75 | + return { | ||
76 | + timer: null, | ||
77 | + syncFlag: false, | ||
78 | + d: '00', | ||
79 | + h: '00', | ||
80 | + i: '00', | ||
81 | + s: '00', | ||
82 | + leftTime: 0, | ||
83 | + seconds: 0 | ||
84 | + } | ||
85 | + }, | ||
86 | + watch: { | ||
87 | + day(val) { | ||
88 | + this.changeFlag() | ||
89 | + }, | ||
90 | + hour(val) { | ||
91 | + this.changeFlag() | ||
92 | + }, | ||
93 | + minute(val) { | ||
94 | + this.changeFlag() | ||
95 | + }, | ||
96 | + second(val) { | ||
97 | + this.changeFlag() | ||
98 | + } | ||
99 | + }, | ||
100 | + created: function(e) { | ||
101 | + this.startData(); | ||
102 | + }, | ||
103 | + beforeDestroy() { | ||
104 | + clearInterval(this.timer) | ||
105 | + }, | ||
106 | + methods: { | ||
107 | + toSeconds(day, hours, minutes, seconds) { | ||
108 | + return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds | ||
109 | + }, | ||
110 | + timeUp() { | ||
111 | + clearInterval(this.timer) | ||
112 | + this.$emit('timeup') | ||
113 | + }, | ||
114 | + countDown() { | ||
115 | + let seconds = this.seconds | ||
116 | + let [day, hour, minute, second] = [0, 0, 0, 0] | ||
117 | + if (seconds > 0) { | ||
118 | + day = Math.floor(seconds / (60 * 60 * 24)) | ||
119 | + hour = Math.floor(seconds / (60 * 60)) - (day * 24) | ||
120 | + minute = Math.floor(seconds / 60) - (day * 24 * 60) - (hour * 60) | ||
121 | + second = Math.floor(seconds) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60) | ||
122 | + } else { | ||
123 | + this.timeUp() | ||
124 | + } | ||
125 | + if (day < 10) { | ||
126 | + day = '0' + day | ||
127 | + } | ||
128 | + if (hour < 10) { | ||
129 | + hour = '0' + hour | ||
130 | + } | ||
131 | + if (minute < 10) { | ||
132 | + minute = '0' + minute | ||
133 | + } | ||
134 | + if (second < 10) { | ||
135 | + second = '0' + second | ||
136 | + } | ||
137 | + this.d = day | ||
138 | + this.h = hour | ||
139 | + this.i = minute | ||
140 | + this.s = second | ||
141 | + }, | ||
142 | + startData() { | ||
143 | + this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second) | ||
144 | + if (this.seconds <= 0) { | ||
145 | + return | ||
146 | + } | ||
147 | + this.countDown() | ||
148 | + this.timer = setInterval(() => { | ||
149 | + this.seconds-- | ||
150 | + if (this.seconds < 0) { | ||
151 | + this.timeUp() | ||
152 | + return | ||
153 | + } | ||
154 | + this.countDown() | ||
155 | + }, 1000) | ||
156 | + }, | ||
157 | + changeFlag() { | ||
158 | + if (!this.syncFlag) { | ||
159 | + this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second) | ||
160 | + this.startData(); | ||
161 | + this.syncFlag = true; | ||
162 | + } | ||
163 | + } | ||
164 | + } | ||
165 | + } | ||
166 | +</script> | ||
167 | +<style scoped> | ||
168 | + .uni-countdown { | ||
169 | + /* #ifndef APP-NVUE */ | ||
170 | + display: flex; | ||
171 | + /* #endif */ | ||
172 | + flex-direction: row; | ||
173 | + justify-content: flex-start; | ||
174 | + padding: 2rpx 0; | ||
175 | + } | ||
176 | + | ||
177 | + .uni-countdown__splitor { | ||
178 | + /* #ifndef APP-NVUE */ | ||
179 | + display: flex; | ||
180 | + /* #endif */ | ||
181 | + justify-content: center; | ||
182 | + line-height: 48rpx; | ||
183 | + padding: 5rpx; | ||
184 | + font-size: 24rpx; | ||
185 | + } | ||
186 | + | ||
187 | + .uni-countdown__number { | ||
188 | + /* #ifndef APP-NVUE */ | ||
189 | + display: flex; | ||
190 | + /* #endif */ | ||
191 | + justify-content: center; | ||
192 | + align-items: center; | ||
193 | + width: 52rpx; | ||
194 | + height: 48rpx; | ||
195 | + line-height: 48rpx; | ||
196 | + margin: 5rpx; | ||
197 | + text-align: center; | ||
198 | + font-size: 24rpx; | ||
199 | + } | ||
200 | +</style> |
1 | +<template> | ||
2 | + <view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer"> | ||
3 | + <view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close" /> | ||
4 | + <view class="uni-drawer__content" :style="{width: width}" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer}"> | ||
5 | + <slot /> | ||
6 | + </view> | ||
7 | + </view> | ||
8 | +</template> | ||
9 | + | ||
10 | +<script> | ||
11 | + /** | ||
12 | + * Drawer 抽屉 | ||
13 | + * @description 抽屉侧滑菜单 | ||
14 | + * @tutorial https://ext.dcloud.net.cn/plugin?id=26 | ||
15 | + * @property {Boolean} visible = [true|false] Drawer的显示状态 | ||
16 | + * @property {Boolean} mask = [true | false] 是否显示遮罩 | ||
17 | + * @property {Boolean} mode = [left | right] Drawer 滑出位置 | ||
18 | + * @value left 从左侧滑出 | ||
19 | + * @value right 从右侧侧滑出 | ||
20 | + * @event {Function} close 组件关闭时触发事件 | ||
21 | + */ | ||
22 | + export default { | ||
23 | + name: 'UniDrawer', | ||
24 | + props: { | ||
25 | + /** | ||
26 | + * 显示状态 | ||
27 | + */ | ||
28 | + visible: { | ||
29 | + type: Boolean, | ||
30 | + default: false | ||
31 | + }, | ||
32 | + /** | ||
33 | + * 显示模式(左、右),只在初始化生效 | ||
34 | + */ | ||
35 | + mode: { | ||
36 | + type: String, | ||
37 | + default: '' | ||
38 | + }, | ||
39 | + /** | ||
40 | + * 显示模式(左、右),只在初始化生效 | ||
41 | + */ | ||
42 | + width: { | ||
43 | + type: String, | ||
44 | + default: '72%' | ||
45 | + }, | ||
46 | + /** | ||
47 | + * 蒙层显示状态 | ||
48 | + */ | ||
49 | + mask: { | ||
50 | + type: Boolean, | ||
51 | + default: true | ||
52 | + } | ||
53 | + }, | ||
54 | + data() { | ||
55 | + return { | ||
56 | + visibleSync: false, | ||
57 | + showDrawer: false, | ||
58 | + rightMode: false, | ||
59 | + watchTimer: null | ||
60 | + } | ||
61 | + }, | ||
62 | + watch: { | ||
63 | + visible(val) { | ||
64 | + if (val) { | ||
65 | + this.open() | ||
66 | + } else { | ||
67 | + this.close() | ||
68 | + } | ||
69 | + } | ||
70 | + }, | ||
71 | + created() { | ||
72 | + this.visibleSync = this.visible | ||
73 | + setTimeout(() => { | ||
74 | + this.showDrawer = this.visible | ||
75 | + }, 100) | ||
76 | + this.rightMode = this.mode === 'right' | ||
77 | + }, | ||
78 | + methods: { | ||
79 | + close() { | ||
80 | + this._change('showDrawer', 'visibleSync', false) | ||
81 | + }, | ||
82 | + open() { | ||
83 | + this._change('visibleSync', 'showDrawer', true) | ||
84 | + }, | ||
85 | + _change(param1, param2, status) { | ||
86 | + this[param1] = status | ||
87 | + if (this.watchTimer) { | ||
88 | + clearTimeout(this.watchTimer) | ||
89 | + } | ||
90 | + this.watchTimer = setTimeout(() => { | ||
91 | + this[param2] = status | ||
92 | + this.$emit(status ? 'open' : 'close') | ||
93 | + }, status ? 50 : 300) | ||
94 | + } | ||
95 | + } | ||
96 | + } | ||
97 | +</script> | ||
98 | + | ||
99 | +<style scoped> | ||
100 | + /* 抽屉宽度 | ||
101 | + */ | ||
102 | + .uni-drawer { | ||
103 | + /* #ifndef APP-NVUE */ | ||
104 | + display: block; | ||
105 | + /* #endif */ | ||
106 | + position: fixed; | ||
107 | + top: 0; | ||
108 | + left: 0; | ||
109 | + right: 0; | ||
110 | + bottom: 0; | ||
111 | + overflow: hidden; | ||
112 | + z-index: 9999; | ||
113 | + } | ||
114 | + | ||
115 | + .uni-drawer__content { | ||
116 | + /* #ifndef APP-NVUE */ | ||
117 | + display: block; | ||
118 | + /* #endif */ | ||
119 | + position: absolute; | ||
120 | + top: 0; | ||
121 | + bottom: 0; | ||
122 | + background-color: #ffffff; | ||
123 | + transition: transform 0.3s ease; | ||
124 | + } | ||
125 | + | ||
126 | + .uni-drawer--left { | ||
127 | + left: 0; | ||
128 | + transform: translateX(-320px); | ||
129 | + } | ||
130 | + | ||
131 | + .uni-drawer--right { | ||
132 | + right: 0; | ||
133 | + transform: translateX(320px); | ||
134 | + } | ||
135 | + | ||
136 | + .uni-drawer__content--visible { | ||
137 | + transform: translateX(0px); | ||
138 | + } | ||
139 | + | ||
140 | + | ||
141 | + .uni-drawer__mask { | ||
142 | + /* #ifndef APP-NVUE */ | ||
143 | + display: block; | ||
144 | + /* #endif */ | ||
145 | + opacity: 0; | ||
146 | + position: absolute; | ||
147 | + top: 0; | ||
148 | + left: 0; | ||
149 | + bottom: 0; | ||
150 | + right: 0; | ||
151 | + background-color: rgba(0, 0, 0, 0.4); | ||
152 | + transition: opacity 0.3s; | ||
153 | + } | ||
154 | + | ||
155 | + .uni-drawer__mask--visible { | ||
156 | + /* #ifndef APP-NVUE */ | ||
157 | + display: block; | ||
158 | + /* #endif */ | ||
159 | + opacity: 1; | ||
160 | + } | ||
161 | +</style> |
1 | +<template> | ||
2 | + <text class="uni-link" :class="{'uni-link--withline':showUnderLine===true||showUnderLine==='true'}" :style="{color,fontSize:fontSize+'px'}" @tap="openURL">{{text}}</text> | ||
3 | +</template> | ||
4 | + | ||
5 | +<script> | ||
6 | + /** | ||
7 | + * Link 外部网页超链接组件 | ||
8 | + * @description uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打开新网页 | ||
9 | + * @property {String} href 点击后打开的外部网页url | ||
10 | + * @property {String} text 显示的文字 | ||
11 | + * @property {Boolean} showUnderLine 是否显示下划线 | ||
12 | + * @property {String} copyTips 在小程序端复制链接时显示的提示语 | ||
13 | + * @property {String} color 链接文字颜色 | ||
14 | + * @property {String} fontSize 链接文字大小 | ||
15 | + * @example * <uni-link href="https://ext.dcloud.net.cn" text="https://ext.dcloud.net.cn"></uni-link> | ||
16 | + */ | ||
17 | + export default { | ||
18 | + name: 'uniLink', | ||
19 | + props: { | ||
20 | + href: { | ||
21 | + type: String, | ||
22 | + default: '' | ||
23 | + }, | ||
24 | + text: { | ||
25 | + type: String, | ||
26 | + default: '' | ||
27 | + }, | ||
28 | + showUnderLine: { | ||
29 | + type: [Boolean, String], | ||
30 | + default: true | ||
31 | + }, | ||
32 | + copyTips: { | ||
33 | + type: String, | ||
34 | + default: '已自动复制网址,请在手机浏览器里粘贴该网址' | ||
35 | + }, | ||
36 | + color: { | ||
37 | + type: String, | ||
38 | + default: '#999999' | ||
39 | + }, | ||
40 | + fontSize: { | ||
41 | + type: [Number, String], | ||
42 | + default: 14 | ||
43 | + } | ||
44 | + }, | ||
45 | + methods: { | ||
46 | + openURL() { | ||
47 | + // #ifdef APP-PLUS | ||
48 | + plus.runtime.openURL(this.href) | ||
49 | + // #endif | ||
50 | + // #ifdef H5 | ||
51 | + window.open(this.href) | ||
52 | + // #endif | ||
53 | + // #ifdef MP | ||
54 | + uni.setClipboardData({ | ||
55 | + data: this.href | ||
56 | + }); | ||
57 | + uni.showModal({ | ||
58 | + content: this.copyTips, | ||
59 | + showCancel: false | ||
60 | + }); | ||
61 | + // #endif | ||
62 | + } | ||
63 | + } | ||
64 | + } | ||
65 | +</script> | ||
66 | + | ||
67 | +<style scoped> | ||
68 | + .uni-link--withline { | ||
69 | + text-decoration: underline; | ||
70 | + } | ||
71 | +</style> |
-
请 注册 或 登录 后发表评论