作者 wangzhi

源码

正在显示 35 个修改的文件 包含 4531 行增加0 行删除

要显示太多修改。

为保证性能只显示 35 of 35+ 个文件。

database.php
/nbproject/
/runtime/*
/public/uploads/*
.idea
composer.lock
*.log
*.css.map
!.gitkeep
.env
.svn
.vscode
... ...
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
Copyright 2017 Karson
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
... ...
FastAdmin是一款基于ThinkPHP5+Bootstrap的极速后台开发框架。
## 主要特性
* 基于`Auth`验证的权限管理系统
* 支持无限级父子级权限继承,父级的管理员可任意增删改子级管理员及权限设置
* 支持单管理员多角色
* 支持管理子级数据或个人数据
* 强大的一键生成功能
* 一键生成CRUD,包括控制器、模型、视图、JS、语言包、菜单、回收站等
* 一键压缩打包JS和CSS文件,一键CDN静态资源部署
* 一键生成控制器菜单和规则
* 一键生成API接口文档
* 完善的前端功能组件开发
* 基于`AdminLTE`二次开发
* 基于`Bootstrap`开发,自适应手机、平板、PC
* 基于`RequireJS`进行JS模块管理,按需加载
* 基于`Less`进行样式开发
* 强大的插件扩展功能,在线安装卸载升级插件
* 通用的会员模块和API模块
* 共用同一账号体系的Web端会员中心权限验证和API接口会员权限验证
* 二级域名部署支持,同时域名支持绑定到应用插件
* 多语言支持,服务端及客户端支持
* 支持大文件分片上传、剪切板粘贴上传、拖拽上传,进度条显示,图片上传前压缩
* 支持表格固定列、固定表头、跨页选择、Excel导出、模板渲染等功能
* 强大的第三方应用模块支持([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))
* 支持CMS、博客、知识付费问答无缝整合[Xunsearch全文搜索](https://www.fastadmin.net/store/xunsearch.html)
* 第三方小程序支持([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))
* 整合第三方短信接口(阿里云、腾讯云短信)
* 无缝整合第三方云存储(七牛云、阿里云OSS、又拍云)功能,支持云储存分片上传
* 第三方富文本编辑器支持(Summernote、Kindeditor、百度编辑器)
* 第三方登录(QQ、微信、微博)整合
* 第三方支付(微信、支付宝)无缝整合,微信支持PC端扫码支付
* 丰富的插件应用市场
## 安装使用
https://doc.fastadmin.net
## 在线演示
https://demo.fastadmin.net
用户名:admin
密 码:123456
提 示:演示站数据无法进行修改,请下载源码安装体验全部功能
## 界面截图
![控制台](https://images.gitee.com/uploads/images/2020/0929/202947_8db2d281_10933.gif "控制台")
## 问题反馈
在使用中有任何问题,请使用以下联系方式联系我们
交流社区: https://ask.fastadmin.net
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群)
Github: https://github.com/karsonzhang/fastadmin
Gitee: https://gitee.com/karson/fastadmin
## 特别鸣谢
感谢以下的项目,排名不分先后
ThinkPHP:http://www.thinkphp.cn
AdminLTE:https://adminlte.io
Bootstrap:http://getbootstrap.com
jQuery:http://jquery.com
Bootstrap-table:https://github.com/wenzhixin/bootstrap-table
Nice-validator: https://validator.niceue.com
SelectPage: https://github.com/TerryZ/SelectPage
Layer: https://layer.layui.com
DropzoneJS: https://www.dropzonejs.com
## 版权信息
FastAdmin遵循Apache2开源协议发布,并提供免费使用。
本项目包含的第三方源码和二进制文件之版权信息另行标注。
版权所有Copyright © 2017-2020 by FastAdmin (https://www.fastadmin.net)
All rights reserved。
... ...
deny from all
\ No newline at end of file
... ...
{"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"]}
\ No newline at end of file
... ...
<?php
namespace addons\wanlshop;
use app\common\library\Menu;
use think\Addons;
use think\Request;
use think\Console;
use think\Loader;
/**
* 插件
*/
class Wanlshop extends Addons
{
/**
* 插件安装方法
* @return bool
*/
public function install()
{
$menu = include ADDON_PATH . 'wanlshop' . DS . 'data' . DS . 'menu.php';
Menu::create($menu);
return true;
}
/**
* 插件卸载方法
* @return bool
*/
public function uninstall()
{
Menu::delete("wanlshop");
return true;
}
/**
* 插件启用方法
* @return bool
*/
public function enable()
{
Menu::enable("wanlshop");
return true;
}
/**
* 插件禁用方法
* @return bool
*/
public function disable()
{
Menu::disable("wanlshop");
return true;
}
/**
* 插件升级方法
*/
public function upgrade()
{
$menu = include ADDON_PATH . 'wanlshop' . DS . 'data' . DS . 'menu.php';
Menu::upgrade('wanlshop', $menu);
}
/**
* 添加命令行扩展
*/
public function appInit()
{
Console::addDefaultCommands([
'addons\\wanlshop\\library\\command\\Chat',
'addons\\wanlshop\\library\\command\\Order',
]);
// 添加第三方支付
Loader::addNamespace('WanlPay\Yansongda', ADDON_PATH . 'wanlshop' . DS . 'library' . DS . 'WanlPay' . DS . 'Yansongda' . DS);
Loader::addNamespace('WanlPay\Supports', ADDON_PATH . 'wanlshop' . DS . 'library' . DS . 'WanlPay' . DS . 'Supports' . DS);
}
/**
* 会员中心边栏后
* @return mixed
* @throws \Exception
*/
public function userSidenavAfter()
{
$request = Request::instance();
$actionname = strtolower($request->action());
$data = [
'actionname' => $actionname
];
return $this->fetch('view/hook/user_sidenav_after', $data);
}
}
... ...
require.config({
paths: {
'jquery-colorpicker': '../addons/wanlshop/js/jquery.colorpicker.min',
'jquery-autocomplete': '../addons/wanlshop/js/jquery.autocomplete',
'jquery-jqprint': '../addons/wanlshop/js/jquery.jqprint-0.3.min',
'jquery-migrate': '../addons/wanlshop/js/jquery.migrate-1.2.1.min',
'vue': '../addons/wanlshop/js/vue.min',
'chat': '../addons/wanlshop/js/vue.min',
'sortablejs': '../addons/wanlshop/js/Sortable.min',
'vuedraggable': '../addons/wanlshop/js/vuedraggable.umd.min',
},
shim: {
'jquery-colorpicker': {
deps: ['jquery'],
exports: '$.fn.extend'
},
'jquery-autocomplete': {
deps: ['jquery'],
exports: '$.fn.extend'
},
'jquery-jqprint': {
deps: ['jquery'],
exports: '$.fn.extend'
},
'jquery-migrate': {
deps: ['jquery'],
exports: '$.fn.extend'
},
'vue': {
deps: ['jquery'],
exports: '$.fn.extend'
},
'chat': {
deps: ['css!../addons/wanlshop/css/chat.css'],
exports: '$.fn.extend'
},
'sortablejs': {
deps: ['jquery'],
exports: '$.fn.extend'
},
'vuedraggable': {
deps: ['jquery'],
exports: '$.fn.extend'
}
}
});
// 后台全局添加 IM即时通讯
if (Config.modulename == 'admin' && Config.controllername == 'index' && Config.actionname == 'index') {
require(['chat'], function(Vue){
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>`;
$("body").append(html);
var wanlchat = new Vue({
el:"#wanl-chat",
data:{
count: 0, // 未读总数
chatlist: [], // 主列表
chatWindow: false, // 是否开启聊天窗口
isList: true, // 展示列表或按钮 --
isMsg: false, // 是否开启消息弹窗 --
msgData: {
avatar: '',
name: '',
text: ''
}, // 信息内容 --
chatMiniWindow: false, //最小化窗口
wanlchat: [], // 聊天窗口列表
chatSelect: null, // 选中的记录
chatContent: [], //消息内容&历史记录
textarea: '', // 编辑框
shopOnline: 1, // 商家在线状态
isAudio: true, // 消息提示
service: {
nickname: 'IM加载中..'
},
// 表情
emojiList: [],
TabCur: '默认',
showBox: false,
// 操作窗口
screenWidth: (document.body.clientWidth - 800) / 2,
screenHeight: (document.body.clientHeight - 600) / 2,
flags: false,
position: {
x: 0,
y: 0
},
nx: '',
ny: '',
dx: '',
dy: '',
xPum: '',
yPum: '',
isShow: false,
moveBtn: {},
onFull: false
},
mounted() {
this.moveBtn = this.$refs.moveBtn;
// 获取列表
this.loadData();
// 表情数据
this.emojiList = this.emojiData();
},
methods: {
loadData() {
let app = this;
Fast.api.ajax({
url: "wanlshop/service/lists.html",
}, (data, ret) => {
app.chatlist = data.chat;
app.service = data.service;
// 统计总数
app.chatCount();
// 开启即时通讯
// 连接IM服务器
const ws = new WebSocket(data.service.socketurl);
let sendTimmer = null;
let sendCount = 0;
ws.onopen = ()=> {
console.log('IM 启动成功');
// sendCount++;
// ws.send('Hello Server!' + sendCount);
// sendTimmer = setInterval(function () {
// sendCount++;
// ws.send('Hi Server!' + sendCount);
// if (sendCount === 10) {
// ws.close();
// }
// }, 2000);
};
ws.onmessage = (msg)=> {
let data = JSON.parse(msg.data);
if (data.type == 'init') {
console.log('@message_client_id:' + data.client_id);
Fast.api.ajax({
url: "wanlshop/service/bind.html",
data: {client_id: data.client_id}
}, function(data, ret){
app.shopOnline = data;
return false;
}, function(data, ret){
return false;
});
}else if (data.type == 'ping') {
ws.send('{"type":"pong"}');
}else if (data.type == 'service'){
// 更新类型
let updateType = null;
//判断是否开启窗口
if(this.chatWindow){
// 判断是否当前用户
if (data.form.id == this.wanlchat[this.chatSelect].user_id) {
// 更新当前页面消息
this.receiveChat(data);
updateType = 'openinto';
}else{
updateType = 'open';
}
}else{
updateType = 'main';
}
// 全局消息提示
this.onMsg(data, updateType);
// 更新主列表和 wanlchat列表,如果存在+1,如果不存在追加一个列表
this.updateChatList(data, updateType);
}
};
ws.onclose = ()=> {
console.log('IM 已关闭');
// sendTimmer && clearInterval(sendTimmer);
};
ws.onerror = ()=> {
console.log('IM 错误');
};
return false;
});
},
// 发送到服务器
send(data) {
Fast.api.ajax({
url: "wanlshop/service/send.html",
data: data
}, function(data, ret){
return false;
});
},
onList(){
// 如果窗口最小化
if(this.chatMiniWindow){
this.chatMiniWindow = false;
this.chatWindow = true;
this.isList = !this.isList;
}else{
this.isList = !this.isList;
}
},
// 打开主列表中
otChat(data, type){
let chat = type == 'main' ? this.chatlist[data] : {
user_id: data.form.id,
nickname: data.form.name,
avatar: data.form.avatar,
isOnline: 1,
count: 0,
content: this.typeMsg(data)
};
// 打开子窗口
this.onChat(this.addWanlChatList(chat));
// 判断是否最小化,如果最小化关闭,打开窗口
if(this.chatMiniWindow){
this.chatMiniWindow = false;
this.chatWindow = true;
}else{
this.chatWindow = true;
}
this.isList = !this.isList;
},
// 子窗口点击
onChat(index){
this.chatSelect = index;
let chat = this.wanlchat[index];
let app = this;
Fast.api.ajax({
url: "wanlshop/service/history.html",
data: {
id: chat.user_id
}
}, function(data, ret) {
// 替换表情
data.chat.forEach((item) => {
if (item.message.type == 'text') {
item.message.content.text = app.replaceEmoji(item.message.content.text);
}
})
// 写入记录
app.chatContent = data.chat;
// 更新在线状态
chat.isOnline = data.isOnline;
// 更新数据
app.count -= chat.count;
chat.count = 0;
// 更新主列表
app.chatlist[app.addChatList(chat, 'fun')].count = 0;
// 滚动最底部
app.latest();
return false;
});
},
// 更新主列表和 wanlchat列表,如果存在+1,如果不存在追加一个列表
updateChatList(chat, type){
let content = this.typeMsg(chat);
if(type == 'send'){
this.wanlchat[this.chatSelect].content = content;
this.chatlist.forEach((item, index) => {
if(item.user_id == chat.to_id){
item.content = content;
}
});
}else{
let chatlist = this.chatlist[this.addChatList(chat, 'msg')];
let wanlchat = this.wanlchat[this.addWanlChatList(chat, 'msg')];
// 更新在线状态
chatlist.isOnline = 1;
wanlchat.isOnline = 1;
// 已开窗口,确定此消息,更改已读
if(type == 'openinto'){
// 更新主列表
chatlist.content = content;
// 更新子列表
wanlchat.content = content;
// 设置已读
Fast.api.ajax({
url: "wanlshop/service/read.html",
data: {
id: wanlchat.user_id
}
}, function(data, ret) {
return false;
});
}else if(type == 'open'){
// 更新主列表
chatlist.content = content;
chatlist.count += 1;
this.count += 1;
// 更新子列表
wanlchat.content = content;
wanlchat.count += 1;
}else if(type == 'main'){
// 更新主列表
chatlist.content = content;
chatlist.count += 1;
this.count += 1;
}
}
},
// 判断主列表是否存在,不存在新增
addChatList(chat, type){
let data = type == 'msg' ? {
user_id: chat.form.id,
nickname: chat.form.name,
avatar: chat.form.avatar,
content: this.typeMsg(chat),
isOnline: 1,
createtime: chat.createtime
}:{
user_id: chat.user_id,
nickname: chat.nickname,
avatar: chat.avatar,
content: "没有任何消息",
isOnline: chat.isOnline,
createtime: (Date.parse( new Date() ).toString()).substr(0,10)
};
let chatlist = this.chatlist;
let key = null;
chatlist.forEach((item, index) => {
if(item.user_id == data.user_id){
key = index;
}
});
if(key == null){
chatlist.push(data);
key = chatlist.length-1;
}
return key;
},
// 判断wanlshop列表是否存在
addWanlChatList(data, type){
let chat = {};
if(type == 'msg'){
chat = {
user_id: data.form.id,
nickname: data.form.name,
avatar: data.form.avatar,
isOnline: 1,
content: this.typeMsg(data)
};
}else{
chat = data;
}
let wanlchat = this.wanlchat;
let key = null;
wanlchat.forEach((item, index) => {
if(item.user_id == chat.user_id){
key = index;
}
});
if(key == null){
wanlchat.push({
user_id: chat.user_id,
nickname: chat.nickname,
avatar: chat.avatar,
isOnline: chat.isOnline,
count: chat.count,
content: chat.content
});
key = wanlchat.length-1;
}
return key;
},
// 删除窗口,如果只有一个则直接关闭 判断删除的是否当前的,如果是读取第一个,如果不是直接删掉即可
delChat(index){
if(this.wanlchat.length == 1){
this.closeChat();
}else{
// 删除指定键
Vue.delete(this.wanlchat, index);
// 重新读取页面
this.onChat(this.wanlchat.length-1);
}
},
// 关闭窗口
closeChat(){
this.chatWindow = false; // 是否开启聊天窗口
this.wanlchat = []; // 聊天窗口列表
this.chatSelect = null; // 选中的记录
this.chatContent = []; //消息内容&历史记录
},
// 最小化窗口
miniChat(){
this.chatWindow = !this.chatWindow; // 聊天窗口
this.chatMiniWindow = !this.chatMiniWindow; // 是否开启聊天窗口
},
// 点击文本消息
submit() {
if (!this.textarea) {
return;
}
var msg = {
text: this.textarea
};
this.sendMsg(msg, 'text');
this.textarea = ''; //清空输入框
},
// 发送图片消息
chatImage(e){
var files = e.target.files[0];
var formData = new FormData();
var app = this;
formData.append('file', files, files.name);
Fast.api.ajax({
url: "ajax/upload",
data:formData,
processData:false,
contentType:false,
}, function(data, ret){
var theImage = new Image();
theImage.src = data.fullurl;
var msg = {
h: theImage.height,
w: theImage.width,
url: data.fullurl
};
app.sendMsg(msg, 'img');
return false;
});
},
// 发送消息
sendMsg(content, type) {
var data = {
type: 'service',
to_id: this.wanlchat[this.chatSelect].user_id,
form: {
id: this.service.id,
avatar: this.service.avatar,
name: this.service.nickname
},
message: {
type: type,
content: content
},
createtime: parseInt(new Date().getTime() / 1000)
};
// 发送到本地
this.receiveChat(JSON.parse(JSON.stringify(data)));
// 发送消息
this.send(data);
// 更新主列表和 wanlchat列表,如果存在+1,如果不存在追加一个列表
this.updateChatList(data, 'send');
},
// 接受消息
receiveChat(msg) {
if (msg.type == 'service') {
if (msg.message.type == 'text') {
msg.message.content.text = this.replaceEmoji(msg.message.content.text);
}
this.chatContent.push(msg);
}
// 滚动到底
this.latest();
},
// 播放语音
playVoice(url) {
let sound = new Audio();
sound.src = url;
sound.play();
},
//统计数量
chatCount(){
let count = 0;
this.chatlist.forEach((item)=>{
count += item.count;
});
this.count = count;
},
// 消息提示
onMsg(msg, type){
let text = '';
// 文本提示
if(type == 'main'){
text = `新消息:${msg.form.name}${this.typeMsg(msg)}`;
this.msgData = {
avatar: this.cdnurl(msg.form.avatar),
name: msg.form.name,
text: this.typeMsg(msg)
};
this.openMsg();
}
// 语音提示
if(this.isAudio){
this.playAudio(type, text);
}
},
//打开消息弹窗
openMsg(){
this.isMsg = true;
setInterval (()=> {
this.isMsg = false;
}, 5000);
},
// 在线语音合成
playAudio(type, str){
let sound = new Audio();
let url = '';
if(type == 'main'){
url = str ? ('https://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=' + encodeURI(str)):'';
}else if(type == 'openinto'){
url = this.cdnurl('/assets/addons/wanlshop/voice/open.mp3');
}else if(type == 'open'){
url = this.cdnurl('/assets/addons/wanlshop/voice/chat.mp3');
}
sound.src = url;
sound.play();
},
onAudio(){
this.isAudio = !this.isAudio;
this.isAudio ? layer.msg('提示音已开启', {icon: 1}):layer.msg('提示音已关闭', {icon: 2});
},
typeMsg(msg){
let text = '';
if (msg.type == 'system') {
if (msg.msg.type == 'text') {
text = msg.message.content.text;
}
} else if (msg.type == 'service') {
// 用户消息
if (msg.message.type == 'text') {
text = msg.message.content.text;
}else if (msg.message.type == 'voice') {
text = '[语音消息]';
}else if (msg.message.type == 'img') {
text = '[图片消息]';
}else if (msg.message.type == 'goods') {
text = '[商品消息]';
}else if (msg.message.type == 'order') {
text = '[订单消息]';
}else{
text = '[未知类型消息]';
}
}
return text;
},
//替换表情符号为图片
replaceEmoji(text) {
// 这里处理 链接 换行符
let replacedStr = text.replace(/\[([^(\]|\[)]*)\]/g, (item, index) => {
return '<img src="' + this.emojiList.map[item] + '" width="18rpx">';
});
return replacedStr.replace(/(\r\n)|(\n)/g, '<br>');
},
// 表情tab
tabSelect(e) {
this.TabCur = e.currentTarget.dataset.id;
},
//添加表情
addEmoji(em) {
this.textarea += em;
this.toggleBox();
},
// 点击空白区域关闭某个div图层
toggleBox() {
this.showBox = !this.showBox; //通过控制showBox来控制box的显示与隐藏
},
// 滚动底部
latest(){
if(this.chatWindow){
this.$nextTick(() => {
let msg = document.getElementById('talk') // 获取对象
msg.scrollTop = msg.scrollHeight // 滚动高度
})
}
},
cdnurl(url) {
if(url) return Fast.api.cdnurl(url);
},
toFind(type){
var name = '发布';
if(type == 'new'){
name = '发布 上新'
}else if(type == 'want'){
name = '发布 种草'
}else if(type == 'show'){
name = '发布 买家秀'
}
Fast.api.open('/index/wanlshop.find/add.html?type='+type, name);
},
full(){
this.onFull = !this.onFull;
},
// 实现移动端拖拽
down() {
this.flags = true;
var touch;
if (event.touches) {
touch = event.touches[0];
} else {
touch = event;
}
this.position.x = touch.clientX;
this.position.y = touch.clientY;
this.dx = this.moveBtn.offsetLeft;
this.dy = this.moveBtn.offsetTop;
},
move() {
if (this.flags) {
var touch;
if (event.touches) {
touch = event.touches[0];
} else {
touch = event;
}
this.nx = touch.clientX - this.position.x;
this.ny = touch.clientY - this.position.y;
this.xPum = this.dx + this.nx;
this.yPum = this.dy + this.ny;
var clientWidth = document.documentElement.clientWidth;
var clientHeight = document.documentElement.clientHeight;
if (this.xPum > 0 && this.xPum < (clientWidth - this.moveBtn.offsetWidth)) {
this.moveBtn.style.left = this.xPum + "px";
}
if (this.yPum > 0 && this.yPum < (clientHeight - this.moveBtn.offsetHeight)) {
this.moveBtn.style.top = this.yPum + "px";
}
//阻止页面的滑动默认事件
document.addEventListener("touchmove", this.handler, {
passive: false
});
}
},
//鼠标释放时候的函数
end() {
this.flags = false;
document.addEventListener('touchmove', this.handler, {
passive: false
});
},
handler(e) {
if(this.flags){
event.preventDefault();
}else{
return true
}
},
timeFormat(timestamp = null, fmt = 'yyyy-mm-dd'){
// yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
timestamp = parseInt(timestamp);
// 如果为null,则格式化当前时间
if (!timestamp) timestamp = Number(new Date());
// 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位)
if (timestamp.toString().length == 10) timestamp *= 1000;
let date = new Date(timestamp);
let ret;
let opt = {
"y+": date.getFullYear().toString(), // 年
"m+": (date.getMonth() + 1).toString(), // 月
"d+": date.getDate().toString(), // 日
"h+": date.getHours().toString(), // 时
"M+": date.getMinutes().toString(), // 分
"s+": date.getSeconds().toString() // 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
for (let k in opt) {
ret = new RegExp("(" + k + ")").exec(fmt);
if (ret) {
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
};
};
return fmt;
},
timefriendly(timestamp){
if (timestamp == null) timestamp = Number(new Date());
timestamp = parseInt(timestamp);
// 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位)
if (timestamp.toString().length == 10) timestamp *= 1000;
var timer = (new Date()).getTime() - timestamp;
timer = parseInt(timer / 1000);
// 如果小于5分钟,则返回"刚刚",其他以此类推
let tips = '';
switch (true) {
case timer < 86400:
tips = this.timeFormat(timestamp, 'hh:MM');
break;
case timer >= 86400 && timer < 86400 * 7:
var now = new Date(timestamp);
var week = ['日', '一', '二', '三', '四', '五', '六'];
switch (new Date().getDate() - now.getDate()) {
case 1:
tips = this.timeFormat(timestamp, '昨天 hh:MM');
break;
case 2:
tips = this.timeFormat(timestamp, '前天 hh:MM');
break;
default:
tips = '星期' + week[now.getDay()] + this.timeFormat(timestamp, 'hh:MM');
}
break;
case timer >= 86400 * 7:
tips = this.timeFormat(timestamp, 'mm-dd hh:MM');
break;
default:
tips = this.timeFormat(timestamp, 'yyyy-mm-dd hh:MM');
}
return tips;
},
// 表情数据
emojiData() {
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": ""}];
var groups = {},
categories = [],
map = {};
emotions.forEach(emotion => {
var cate = emotion.category.length > 0 ? emotion.category : '默认';
if (!groups[cate]) {
groups[cate] = [];
categories.push(cate);
}
groups[cate].push(emotion);
map[emotion.phrase] = emotion.icon;
});
return {
groups,
categories,
map
};
}
}
});
});
}
\ No newline at end of file
... ...
<?php
return [
// 客户端配置
[
'name' => 'ini',
'title' => '客户端配置',
'type' => 'array',
'value' => [
'name' => '新零售商城', //应用名称
'logo' => '/assets/addons/wanlshop/img/common/logo.png',
'copyright' => '2021 深圳前海万联科技有限公司',
'urlschemes' => 'wanlshop', // wanlshop://
'package_name' => 'com.wanlian.www', //应用包名
// 接口信息
'cdnurl' => 'http://localhost', // CDN 服务器
'appurl' => 'http://localhost/api', // API 服务器
'socketurl' => 'ws://localhost:7272', // 即时通讯 服务器
'debug' => 'N'
],
'rule' => '',
'msg' => '',
'tip' => '客户端参数配置',
'ok' => '',
'extend' => ''
],
// 高德地图SDK-------------------------------------------------------------------------------------------
[
'name' => 'sdk_amap',
'title' => '高德地图SDK配置',
'type' => 'array',
'value' => [
'amapkey_web' => '0a9f67a6f8f7cc3315d30846a0fde88b', // 高德网页秘钥
'amapkey_ios' => 'd8b84cf540bcca9928db69b0119fc152', // 高德IOS秘钥
'amapkey_android' => '6c3f7522aab215e0704225adaad9f73e' // 高德安卓秘钥
],
'rule' => '',
'msg' => '',
'tip' => '高德地图SDK参数配置',
'ok' => '',
'extend' => ''
],
// 腾讯开放SDK
[
'name' => 'sdk_qq',
'title' => '腾讯开放SDK配置',
'type' => 'array',
'value' => [
'qq_appid' => '10******36', // QQ开放平台appid
'gz_appid' => 'wx******************e9', // 公众平台ID
'wx_appid' => 'wx******************88', // 微信开放平台appid
'wx_appsecret' => '22***************************cc', // 微信开放平台appsecret
'wx_universal_links' => 'https://wanlshop.com/', // 微信开放平台通用链接
'mch_id' => '16******75', // 微信支付商户ID
'key' => 'Hr***************************ew',
'notify_url' => '/wanlshop/callback/notify/type/wechat',
'pay_cert' => 0 // 可选, 退款,红包等情况时需要用到
],
'rule' => '',
'msg' => '',
'tip' => '腾讯开放SDK参数配置',
'ok' => '',
'extend' => ''
],
// 支付宝SDK ---
[
'name' => 'sdk_alipay',
'title' => '支付宝SDK配置',
'type' => 'array',
'value' => [
'app_id' => '20************21',
'notify_url' => '/wanlshop/callback/notify/type/alipay',
'return_url' => '/wanlshop/callback/return/type/alipay',
'ali_public_key' => '',
'private_key' => '',
],
'rule' => '',
'msg' => '',
'tip' => '支付宝SDK参数配置',
'ok' => '',
'extend' => ''
],
// 微博开放SDK
[
'name' => 'sdk_weibo',
'title' => '微博开放SDK配置',
'type' => 'array',
'value' => [
'appkey' => '35********94', // 微博开放平台 appkey
'appsecret' => '0a********************************7f', // 微博开放平台 appsecret
'redirect_uri' => '/wanlshop/callback/weibo' // 微博开放平台回调地址
],
'rule' => '',
'msg' => '',
'tip' => '微博开放SDK参数配置',
'ok' => '',
'extend' => ''
],
// 快递100SDK
[
'name' => 'kuaidi',
'title' => '快递100 SDK',
'type' => 'array',
'value' => [
'secretKey' => 'gm********34', // 快递100 Key
'callbackUrl' => '/wanlshop/callback/kuaidi' // 回调地址
],
'rule' => '',
'msg' => '',
'tip' => '快递100 SDK参数配置',
'ok' => '',
'extend' => ''
],
// H5客户端-------------------------------------------------------------------------------------------
[
'name' => 'h5',
'title' => 'H5客户端',
'type' => 'array',
'value' => [
'domain' => 'https://m.wanlshop.com', // 域名
'title' => '新零售电商平台', // 标题
'router_mode' => 'hash', // 路由模式
'router_base' => './', // 运行基础路径
'https' => 'N', // 域名
'qqmap_key' => 'V3JBZ-C7Z36-BL7S6-M67TX-6WORS-2TBMN' // H5腾讯地址key
],
'rule' => '',
'msg' => '',
'tip' => 'H5客户端配置',
'ok' => '',
'extend' => ''
],
// 微信小程序配置
[
'name' => 'mp_weixin',
'title' => '微信小程序',
'type' => 'array',
'value' => [
'appid' => 'wx**********14b', // AppID
'appsecret' => 'e380*************************e037', // AppSecret
'scope_userLocation' => '演示定位能力' //客服初始回复
],
'rule' => '',
'msg' => '',
'tip' => '微信小程序配置',
'ok' => '',
'extend' => ''
],
// 支付宝小程序
[
'name' => 'mp_alipay',
'title' => '支付宝小程序',
'type' => 'array',
'value' => [
'appid' => '20**********76' // AppID
],
'rule' => '',
'msg' => '',
'tip' => '支付宝小程序配置',
'ok' => '',
'extend' => ''
],
// 百度小程序
[
'name' => 'mp_baidu',
'title' => '百度小程序',
'type' => 'array',
'value' => [
'appid' => '', // AppID
'appsecret' => '' // AppSecret
],
'rule' => '',
'msg' => '',
'tip' => '百度小程序配置',
'ok' => '',
'extend' => ''
],
// 头条小程序
[
'name' => 'mp_toutiao',
'title' => '头条小程序',
'type' => 'array',
'value' => [
'appid' => '', // AppID
'appsecret' => '' // AppSecret
],
'rule' => '',
'msg' => '',
'tip' => '头条小程序配置',
'ok' => '',
'extend' => ''
],
// QQ小程序
[
'name' => 'mp_qq',
'title' => 'QQ小程序',
'type' => 'array',
'value' => [
'appid' => '11*****49', // AppID
'appsecret' => 'EV***************HX' // AppSecret
],
'rule' => '',
'msg' => '',
'tip' => 'QQ小程序配置',
'ok' => '',
'extend' => ''
],
// 整体样式-------------------------------------------------------------------------------------------
[
'name' => 'style',
'title' => '样式配置',
'type' => 'array',
'value' => [
'category_style' => '4', // 类目风格
'find_bg_color' => '#f7f7f7', // 发现背景颜色
'find_bg_image' => '/assets/addons/wanlshop/img/find/top_bg.png', // 发现背景图片
'find_font_color' => 'light', // 发现状态栏前景色和字体颜色
'cart_nav_image' => '', // 购物车导航栏图片
'cart_nav_color' => '', // 购物车导航栏颜色
'cart_font_color' => '', // 购物车状态栏前景色和字体颜色
'user_nav_color' => '#ffeccc', // 用户导航栏颜色
'user_nav_image' => '/assets/addons/wanlshop/img/user/top_bg.png', // 用户导航栏图片
'user_bg_color' => '#ffeccc', // 用户背景颜色
'user_bg_image' => '/assets/addons/wanlshop/img/user/user_bg.png', // 用户背景图片
'user_font_color' => '' // 用户页状态栏前景色和字体颜色
],
'rule' => '',
'msg' => '',
'tip' => 'App样式配置',
'ok' => '',
'extend' => ''
],
// 动态配置-------------------------------------------------------------------------------------------
[
'name' => 'config',
'title' => '动态客户端配置',
'type' => 'array',
'value' => [
// 系统配置
'store_audit' => 'Y', //新店铺是否审核
'comment_switch' => 'Y', // 是否开启评论
// 帮助中心
'tel_phone' => '0775-12345678', //联系电话
'working_hours' => '09:00~22:00', //工作时间
//商家中心
'shop_document' => '', // 官方文档
'shop_qun' => '', // 商家交流群
// 文章ID
'user_agreement' => '153', // 用户协议
'privacy_protection' => '154', // 隐私保护
// 分类ID
'help_category' => '1', // 帮助中心类目ID
'new_category' => '2', // 头条新闻类目ID
'sys_category' => '4', // 系统消息类目ID
// 智能客服
'auth_reply' => '欢迎使用在线客服', //自动回复
'not_online' => '[汗] 非工作时间8:00-22:00 或客服繁忙!请稍后再试~', //未在线
'service_initial' => '您好 [微笑] 请用一句话简短描述问题~', //客服初始回复
// 微信小程序ID
'mp_weixin_id' => 'wx***************4b' //微信小程序ID
],
'rule' => '',
'msg' => '',
'tip' => 'App参数配置',
'ok' => '',
'extend' => ''
],
// 订单配置-------------------------------------------------------------------------------------------
[
'name' => 'order',
'title' => '订单配置',
'type' => 'array',
'value' => [
'cancel' => '3', // 取消未支付时间
'receiving' => '7', // 自动收货时间
'comment' => '7',
'customer' => '7', // 订单售后时间
'autoagree' => '3',
'returntime' => '7',
'receivingtime' => '7',
],
'rule' => '',
'msg' => '',
'tip' => '订单参数配置',
'ok' => '',
'extend' => ''
],
// 发现页管理
[
'name' => 'find',
'title' => '直播配置',
'type' => 'array',
'value' => [
'app_switch' => [
'all' => 'all',
'new' => 'new',
'live' => 'live',
'want' => 'want',
'show' => 'show',
],
'mp_switch' => [
'all' => 'all',
'new' => 'new',
'live' => 'live',
'want' => 'want',
'show' => 'show',
],
'h5_switch' => [
'all' => 'all',
'new' => 'new',
'live' => 'live',
'want' => 'want',
'show' => 'show',
]
],
'rule' => '',
'msg' => '',
'tip' => '订单参数配置',
'ok' => '',
'extend' => ''
],
// 阿里直播配置-------------------------------------------------------------------------------------------
[
'name' => 'live',
'title' => '直播配置',
'type' => 'array',
'value' => [
'liveDomain' => 'live.wanlshop.com', // 播域名
'pushDomain' => 'rtmp.wanlshop.com', // 推域名
'builderTime' => '60', // 有效时间分钟
'pushKey' => '0*****v', // 推秘钥
'liveKey' => 'l*****d', // 播秘钥
'liveCnd' => 'https://play.wanlshop.com', // 直播 OSS储存 CND地址
'appName' => 'wanlshop', // 直播项目
'transTemplate' => 'ld' // 转码模板
],
'rule' => '',
'msg' => '',
'tip' => '订单参数配置',
'ok' => '',
'extend' => ''
],
// 提现配置
[
'name' => 'withdraw',
'title' => '提现配置',
'type' => 'array',
'value' => [
'state' => 'Y', // 是否开启提现
'minmoney' => 100, // 最低提现金额
'monthlimit' => 0, // 每月可提现次数
'servicefee' => 6 // 手续费(‰)
],
'rule' => '',
'msg' => '',
'tip' => '商城提现参数配置',
'ok' => '',
'extend' => ''
],
// 温馨提示
[
'name' => '__tips__',
'title' => '温馨提示',
'type' => 'string',
'content' => array(),
'value' => '不需要此处配置任何参数,请在 [多用户商城] - [客户端管理]和[系统管理] 中管理配置',
'rule' => '',
'msg' => '',
'tip' => '',
'ok' => '',
'extend' => '',
]
];
\ No newline at end of file
... ...
<?php
namespace addons\wanlshop\controller;
use think\addons\Controller;
class Index extends Controller
{
public function index()
{
$this->error("当前插件暂无前台页面,商家中心通过前台用户中心进入");
}
}
... ...
<?php
$menu = [
[
'name' => 'wanlshop',
'title' => '多用户商城',
'icon' => 'fa fa-magic',
'sublist' => [
[
'name' => 'wanlshop/dashboard',
'title' => '控制台',
'icon' => 'fa fa-dashboard',
'weigh' => '5000',
'remark' => '商城数据统计',
'sublist' => [
['name' => 'wanlshop/dashboard/getSaleStatisticsData', 'ismenu' => 0, 'title' => '获取订单销量销售额统计数据']
]
],
[
'name' => 'wanlnav/goods',
'title' => '商品管理',
'icon' => 'fa fa-shopping-cart',
'weigh' => '4443',
'sublist' => [
['name' => 'wanlshop/goods', 'title' => '商品列表', 'ismenu' => 1, 'remark' => '仅用户查看平台商品列表,自营店默认为第一个店铺,自营店管理请在前台管理', 'sublist' => [
['name' => 'wanlshop/goods/index', 'title' => '查看'],
['name' => 'wanlshop/goods/edit', 'title' => '修改'],
['name' => 'wanlshop/goods/del', 'title' => '删除'],
['name' => 'wanlshop/goods/multi', 'title' => '批量更新'],
["name" => "wanlshop/goods/recyclebin", "title" => "回收站"],
["name" => "wanlshop/goods/restore", "title" => "还原"],
["name" => "wanlshop/goods/destroy", "title" => "真实删除"],
['name' => 'wanlshop/goods/select', 'title' => '选择']
]],
['name' => 'wanlshop/category/goods', 'title' => '类目管理', 'ismenu' => 1, 'remark' => '用于管理商城类目', 'sublist' => [
['name' => 'wanlshop/category/goods/index', 'title' => '查看'],
['name' => 'wanlshop/category/add', 'title' => '添加'],
['name' => 'wanlshop/category/edit', 'title' => '修改'],
['name' => 'wanlshop/category/del', 'title' => '删除'],
['name' => 'wanlshop/category/multi', 'title' => '批量更新'],
['name' => 'wanlshop/category/create', 'title' => '生成菜单'],
['name' => 'wanlshop/category/select', 'title' => '选择']
]],
['name' => 'wanlshop/attribute', 'title' => '类目属性', 'ismenu' => 1, 'remark' => '用于管理商城类目属性,商家在新增商品的时展示相关表单', 'sublist' => [
['name' => 'wanlshop/attribute/index', 'title' => '查看'],
['name' => 'wanlshop/attribute/add', 'title' => '添加'],
['name' => 'wanlshop/attribute/edit', 'title' => '修改'],
['name' => 'wanlshop/attribute/del', 'title' => '删除'],
['name' => 'wanlshop/attribute/multi', 'title' => '批量更新'],
["name" => "wanlshop/attribute/recyclebin", "title" => "回收站"],
["name" => "wanlshop/attribute/restore", "title" => "还原"],
["name" => "wanlshop/attribute/destroy", "title" => "真实删除"]
]],
['name' => 'wanlshop/shopsort', 'title' => '商家类目管理', 'ismenu' => 1, 'remark' => '仅用于查看商家自建类目', 'sublist' => [
['name' => 'wanlshop/shopsort/index', 'title' => '查看'],
['name' => 'wanlshop/shopsort/add', 'title' => '添加'],
['name' => 'wanlshop/shopsort/edit', 'title' => '修改'],
['name' => 'wanlshop/shopsort/del', 'title' => '删除'],
['name' => 'wanlshop/shopsort/multi', 'title' => '批量更新']
]],
['name' => 'wanlshop/brand', 'title' => '品牌管理', 'ismenu' => 1, 'remark' => '用于管理商城品牌', 'sublist' => [
['name' => 'wanlshop/brand/index', 'title' => '查看'],
['name' => 'wanlshop/brand/add', 'title' => '添加'],
['name' => 'wanlshop/brand/edit', 'title' => '修改'],
['name' => 'wanlshop/brand/del', 'title' => '删除'],
['name' => 'wanlshop/brand/multi', 'title' => '批量更新'],
["name" => "wanlshop/brand/recyclebin", "title" => "回收站"],
["name" => "wanlshop/brand/restore", "title" => "还原"],
["name" => "wanlshop/brand/destroy", "title" => "真实删除"],
["name" => "wanlshop/brand/examine", "title" => "审核品牌"]
]]
]
],
[
'name' => 'wanlnav/order',
'title' => '订单监管',
'icon' => 'fa fa-first-order',
'weigh' => '4442',
'sublist' => [
['name' => 'wanlshop/order', 'title' => '订单列表', 'ismenu' => 1, 'remark' => '仅用户监管商城订单,具体操作请在商家中心管理', 'sublist' => [
['name' => 'wanlshop/order/index', 'title' => '查看'],
['name' => 'wanlshop/order/detail', 'title' => '详情'],
['name' => 'wanlshop/order/relative', 'title' => '快递查询'],
['name' => 'wanlshop/order/add', 'title' => '添加'],
['name' => 'wanlshop/order/edit', 'title' => '修改'],
['name' => 'wanlshop/order/del', 'title' => '删除'],
['name' => 'wanlshop/order/multi', 'title' => '批量更新'],
["name" => "wanlshop/order/recyclebin", "title" => "回收站"],
["name" => "wanlshop/order/restore", "title" => "还原"],
["name" => "wanlshop/order/destroy", "title" => "真实删除"]
]],
['name' => 'wanlshop/comment', 'title' => '评论管理', 'ismenu' => 1, 'remark' => '仅用户监管商城商家评论,具体操作请在商家中心管理', 'sublist' => [
['name' => 'wanlshop/comment/index', 'title' => '查看'],
['name' => 'wanlshop/comment/detail', 'title' => '详情'],
['name' => 'wanlshop/comment/add', 'title' => '添加'],
['name' => 'wanlshop/comment/edit', 'title' => '修改'],
['name' => 'wanlshop/comment/del', 'title' => '删除'],
['name' => 'wanlshop/comment/multi', 'title' => '批量更新'],
["name" => "wanlshop/comment/recyclebin", "title" => "回收站"],
["name" => "wanlshop/comment/restore", "title" => "还原"],
["name" => "wanlshop/comment/destroy", "title" => "真实删除"]
]]
]
],
[
'name' => 'wanlnav/shop',
'title' => '店铺管理',
'icon' => 'fa fa-archive',
'weigh' => '4441',
'sublist' => [
['name' => 'wanlshop/shop', 'title' => '店铺列表', 'ismenu' => 1, 'remark' => '用于管理商城所有商家', 'sublist' => [
['name' => 'wanlshop/shop/index', 'title' => '查看'],
['name' => 'wanlshop/shop/edit', 'title' => '修改'],
['name' => 'wanlshop/shop/del', 'title' => '删除'],
['name' => 'wanlshop/shop/multi', 'title' => '批量更新'],
["name" => "wanlshop/shop/recyclebin", "title" => "回收站"],
["name" => "wanlshop/shop/restore", "title" => "还原"],
["name" => "wanlshop/shop/destroy", "title" => "真实删除"]
]],
['name' => 'wanlshop/auth', 'title' => '新店铺审核', 'ismenu' => 1, 'remark' => '用于管理申请入驻店铺', 'sublist' => [
['name' => 'wanlshop/auth/index', 'title' => '查看'],
['name' => 'wanlshop/auth/edit', 'title' => '修改'],
['name' => 'wanlshop/auth/del', 'title' => '删除'],
['name' => 'wanlshop/auth/multi', 'title' => '批量更新'],
["name" => "wanlshop/auth/recyclebin", "title" => "回收站"],
["name" => "wanlshop/auth/restore", "title" => "还原"],
["name" => "wanlshop/auth/destroy", "title" => "真实删除"],
["name" => "wanlshop/auth/detail", "title" => "查看详情"],
["name" => "wanlshop/auth/agree", "title" => "同意申请"],
["name" => "wanlshop/auth/refuse", "title" => "拒绝申请"]
]],
['name' => 'wanlshop/address', 'title' => '地址管理', 'ismenu' => 1, 'remark' => '用于监管用户地址', 'sublist' => [
['name' => 'wanlshop/address/index', 'title' => '查看'],
['name' => 'wanlshop/address/add', 'title' => '添加'],
['name' => 'wanlshop/address/edit', 'title' => '修改'],
['name' => 'wanlshop/address/del', 'title' => '删除'],
['name' => 'wanlshop/address/multi', 'title' => '批量更新'],
["name" => "wanlshop/address/recyclebin", "title" => "回收站"],
["name" => "wanlshop/address/restore", "title" => "还原"],
["name" => "wanlshop/address/destroy", "title" => "真实删除"]
]],
['name' => 'wanlshop/service', 'title' => '服务管理', 'ismenu' => 1, 'remark' => '用于管理店铺服务项目', 'sublist' => [
['name' => 'wanlshop/service/index', 'title' => '查看'],
['name' => 'wanlshop/service/add', 'title' => '添加'],
['name' => 'wanlshop/service/edit', 'title' => '修改'],
['name' => 'wanlshop/service/del', 'title' => '删除'],
['name' => 'wanlshop/service/multi', 'title' => '批量更新'],
["name" => "wanlshop/service/recyclebin", "title" => "回收站"],
["name" => "wanlshop/service/restore", "title" => "还原"],
["name" => "wanlshop/service/destroy", "title" => "真实删除"],
["name" => "wanlshop/service/chat", "title" => "聊天窗口"],
]],
['name' => 'wanlshop/freight', 'title' => '运费模板', 'ismenu' => 1, 'remark' => '用于查看店铺运费模板,具体操作请在商家中心管理', 'sublist' => [
['name' => 'wanlshop/freight/index', 'title' => '查看'],
['name' => 'wanlshop/freight/del', 'title' => '删除'],
['name' => 'wanlshop/freight/multi', 'title' => '批量更新'],
["name" => "wanlshop/freight/recyclebin", "title" => "回收站"],
["name" => "wanlshop/freight/restore", "title" => "还原"],
["name" => "wanlshop/freight/destroy", "title" => "真实删除"]
]]
]
],
[
'name' => 'wanlnav/page',
'title' => '装修商城',
'icon' => 'fa fa-desktop',
'weigh' => '4440',
'sublist' => [
['name' => 'wanlshop/page', 'title' => '页面管理', 'ismenu' => 1, 'remark' => '用于管理客户端和商家自定义页面', 'sublist' => [
['name' => 'wanlshop/page/index', 'title' => '查看'],
['name' => 'wanlshop/page/add', 'title' => '添加'],
['name' => 'wanlshop/page/edit', 'title' => '修改'],
['name' => 'wanlshop/page/del', 'title' => '删除'],
['name' => 'wanlshop/page/multi', 'title' => '批量更新'],
["name" => "wanlshop/page/recyclebin", "title" => "历史页面"],
["name" => "wanlshop/page/restore", "title" => "恢复历史"],
["name" => "wanlshop/page/destroy", "title" => "真实删除"]
]],
['name' => 'wanlshop/page/style', 'title' => '全局样式', 'ismenu' => 1, 'remark' => '客户端初始风格,也可以在节日、活动时修改'],
['name' => 'wanlshop/link', 'title' => '链接管理', 'ismenu' => 1, 'remark' => '用于自定义页面选择客户端或生成相关链接', 'sublist' => [
['name' => 'wanlshop/link/index', 'title' => '查看'],
['name' => 'wanlshop/link/add', 'title' => '添加'],
['name' => 'wanlshop/link/edit', 'title' => '修改'],
['name' => 'wanlshop/link/del', 'title' => '删除'],
['name' => 'wanlshop/link/multi', 'title' => '批量更新'],
["name" => "wanlshop/link/recyclebin", "title" => "回收站"],
["name" => "wanlshop/link/restore", "title" => "还原"],
["name" => "wanlshop/link/destroy", "title" => "真实删除"],
['name' => 'wanlshop/link/select', 'title' => '选择']
]],
['name' => 'wanlshop/icon', 'title' => '图标管理', 'ismenu' => 1, 'remark' => '用于自定义页面配置图标', 'sublist' => [
['name' => 'wanlshop/icon/index', 'title' => '查看'],
['name' => 'wanlshop/icon/add', 'title' => '添加'],
['name' => 'wanlshop/icon/edit', 'title' => '修改'],
['name' => 'wanlshop/icon/del', 'title' => '删除'],
['name' => 'wanlshop/icon/multi', 'title' => '批量更新'],
["name" => "wanlshop/icon/recyclebin", "title" => "回收站"],
["name" => "wanlshop/icon/restore", "title" => "还原"],
["name" => "wanlshop/icon/destroy", "title" => "真实删除"],
['name' => 'wanlshop/icon/select', 'title' => '选择']
]]
]
],
[
'name' => 'wanlnav/kefu',
'title' => '客服服务',
'icon' => 'fa fa-comments',
'weigh' => '4439',
'sublist' => [
['name' => 'wanlshop/complaint', 'title' => '投诉管理', 'ismenu' => 1, 'remark' => '用于管理用户在客户端发起的用户、商品、店铺举报投诉', 'sublist' => [
['name' => 'wanlshop/complaint/index', 'title' => '查看'],
['name' => 'wanlshop/complaint/detail', 'title' => '详情'],
['name' => 'wanlshop/complaint/del', 'title' => '删除'],
['name' => 'wanlshop/complaint/multi', 'title' => '批量更新'],
["name" => "wanlshop/complaint/recyclebin", "title" => "回收站"],
["name" => "wanlshop/complaint/restore", "title" => "还原"],
["name" => "wanlshop/complaint/destroy", "title" => "真实删除"]
]],
['name' => 'wanlshop/feedback', 'title' => '意见反馈', 'ismenu' => 1, 'remark' => '用户管理用户在客户端提供给平台意见反馈', 'sublist' => [
['name' => 'wanlshop/feedback/index', 'title' => '查看'],
['name' => 'wanlshop/feedback/detail', 'title' => '退款详情'],
['name' => 'wanlshop/feedback/del', 'title' => '删除'],
['name' => 'wanlshop/feedback/multi', 'title' => '批量更新'],
["name" => "wanlshop/feedback/recyclebin", "title" => "回收站"],
["name" => "wanlshop/feedback/restore", "title" => "还原"],
["name" => "wanlshop/feedback/destroy", "title" => "真实删除"]
]],
['name' => 'wanlshop/refund', 'title' => '退款管理', 'ismenu' => 1, 'remark' => '仅用户监管商城退款,具体操作请在商家中心管理', 'sublist' => [
['name' => 'wanlshop/refund/index', 'title' => '查看'],
['name' => 'wanlshop/refund/detail', 'title' => '退款详情'],
['name' => 'wanlshop/refund/agree', 'title' => '同意退款'],
['name' => 'wanlshop/refund/refuse', 'title' => '平台判定拒绝退款'],
['name' => 'wanlshop/refund/del', 'title' => '删除'],
['name' => 'wanlshop/refund/multi', 'title' => '批量更新']
]]
]
],
[
'name' => 'wanlnav/finance',
'title' => '财务管理',
'icon' => 'fa fa-paypal',
'weigh' => '4438',
'sublist' => [
['name' => 'wanlshop/money', 'title' => '资金账单', 'ismenu' => 1, 'remark' => '用于查看平台商品交易、充值、提现、退款', 'sublist' => [
['name' => 'wanlshop/money/index', 'title' => '查看'],
['name' => 'wanlshop/money/detail', 'title' => '详情']
]],
['name' => 'wanlshop/withdraw', 'title' => '用户提现', 'ismenu' => 1, 'remark' => '用于管理用户提现审核、同意、拒绝', 'sublist' => [
['name' => 'wanlshop/withdraw/index', 'title' => '查看'],
['name' => 'wanlshop/withdraw/detail', 'title' => '详情'],
['name' => 'wanlshop/withdraw/agree', 'title' => '同意'],
['name' => 'wanlshop/withdraw/refuse', 'title' => '拒绝'],
['name' => 'wanlshop/withdraw/del', 'title' => '删除'],
['name' => 'wanlshop/withdraw/multi', 'title' => '批量更新']
]]
]
],
[
'name' => 'wanlnav/article',
'title' => '内容管理',
'icon' => 'fa fa-pencil-square',
'weigh' => '4437',
'sublist' => [
['name' => 'wanlshop/article', 'title' => '文章列表', 'ismenu' => 1, 'remark' => '用于管理客户端的新闻、协议、帮助、及智能客服相关解答', 'sublist' => [
['name' => 'wanlshop/article/index', 'title' => '查看'],
['name' => 'wanlshop/article/add', 'title' => '添加'],
['name' => 'wanlshop/article/edit', 'title' => '修改'],
['name' => 'wanlshop/article/del', 'title' => '删除'],
['name' => 'wanlshop/article/multi', 'title' => '批量更新'],
["name" => "wanlshop/article/recyclebin", "title" => "回收站"],
["name" => "wanlshop/article/restore", "title" => "还原"],
["name" => "wanlshop/article/destroy", "title" => "真实删除"],
["name" => "wanlshop/article/select", "title" => "选择"]
]],
['name' => 'wanlshop/category/article', 'title' => '分类管理', 'ismenu' => 1, 'remark' => '用于管理客户端文章类目'],
['name' => 'wanlshop/find', 'title' => '发现动态', 'ismenu' => 1, 'remark' => '仅用于查看商家动态', 'sublist' => [
['name' => 'wanlshop/find/index', 'title' => '查看'],
['name' => 'wanlshop/find/del', 'title' => '删除'],
['name' => 'wanlshop/find/multi', 'title' => '批量更新'],
["name" => "wanlshop/find/recyclebin", "title" => "回收站"],
["name" => "wanlshop/find/restore", "title" => "还原"],
["name" => "wanlshop/find/destroy", "title" => "真实删除"]
]]
]
],
[
'name' => 'wanlnav/client',
'title' => '生成客户端',
'icon' => 'fa fa-cloud',
'weigh' => '4436',
'sublist' => [
['name' => 'wanlshop/client/edit', 'title' => '全局修改配置', 'weigh' => '43991'],
['name' => 'wanlshop/client/download', 'title' => '打包下载', 'weigh' => '4399'],
['name' => 'wanlshop/client/client', 'title' => '客户端配置', 'weigh' => '4398', 'ismenu' => 1, 'remark' => '用于客户端(应用)全局配置'],
['name' => 'wanlshop/client/app', 'title' => 'App管理', 'weigh' => '4397', 'ismenu' => 1, 'remark' => '用于App客户端参数配置和本地一键打包安卓 & 苹果应用'],
['name' => 'wanlshop/client/h5', 'title' => 'H5管理', 'weigh' => '4396', 'ismenu' => 1, 'remark' => '用于H5客户端参数配置和一键本地打包H5客户端'],
['name' => 'wanlshop/client/mpweixin', 'title' => '微信小程序', 'weigh' => '4395', 'ismenu' => 1, 'remark' => '用于微信小程序参数配置和一键本地打包微信小程序'],
['name' => 'wanlshop/client/mpbaidu', 'title' => '百度小程序', 'weigh' => '4394', 'ismenu' => 1, 'remark' => '用于百度小程序参数配置和一键本地打包百度小程序'],
['name' => 'wanlshop/client/mptoutiao', 'title' => '字节跳动小程序', 'weigh' => '4393', 'ismenu' => 1, 'remark' => '用于字节跳动小程序参数配置和一键本地打包字节跳动小程序'],
['name' => 'wanlshop/client/mpalipay', 'title' => '支付宝小程序', 'weigh' => '4392', 'ismenu' => 1, 'remark' => '用于支付宝小程序参数配置和一键本地打包支付宝小程序'],
['name' => 'wanlshop/client/mpqq', 'title' => 'QQ小程序', 'weigh' => '4391', 'ismenu' => 1, 'remark' => '用于QQ小程序参数配置和一键本地打包QQ小程序']
]
],
[
'name' => 'wanlnav/config',
'title' => '系统管理',
'icon' => 'fa fa-cog',
'weigh' => '4435',
'sublist' => [
['name' => 'wanlshop/client/config', 'title' => '系统设置', 'weigh' => '4355', 'ismenu' => 1, 'remark' => '用于电商系统核心配置'],
['name' => 'wanlshop/advert', 'title' => '广告管理', 'weigh' => '4354', 'ismenu' => 1, 'remark' => '用于广告系统在线管理', 'sublist' => [
['name' => 'wanlshop/advert/index', 'title' => '查看'],
['name' => 'wanlshop/advert/add', 'title' => '添加'],
['name' => 'wanlshop/advert/edit', 'title' => '修改'],
['name' => 'wanlshop/advert/del', 'title' => '删除'],
['name' => 'wanlshop/advert/multi', 'title' => '批量更新'],
["name" => "wanlshop/advert/recyclebin", "title" => "回收站"],
["name" => "wanlshop/advert/restore", "title" => "还原"],
["name" => "wanlshop/advert/destroy", "title" => "真实删除"],
["name" => "wanlshop/advert/select", "title" => "选择"]
]],
['name' => 'wanlshop/version', 'title' => 'App热更新', 'weigh' => '4352', 'ismenu' => 1, 'remark' => '仅用于App客户端在线升级配置', 'sublist' => [
['name' => 'wanlshop/version/index', 'title' => '查看'],
['name' => 'wanlshop/version/add', 'title' => '添加'],
['name' => 'wanlshop/version/edit', 'title' => '修改'],
['name' => 'wanlshop/version/del', 'title' => '删除'],
['name' => 'wanlshop/version/multi', 'title' => '批量更新']
]],
['name' => 'wanlshop/search', 'title' => '搜索管理', 'weigh' => '4353', 'ismenu' => 1, 'remark' => '用于查看用户搜索记录和配置热门搜索置顶关键字', 'sublist' => [
['name' => 'wanlshop/search/index', 'title' => '查看'],
['name' => 'wanlshop/search/add', 'title' => '添加'],
['name' => 'wanlshop/search/edit', 'title' => '修改'],
['name' => 'wanlshop/search/del', 'title' => '删除'],
['name' => 'wanlshop/search/multi', 'title' => '批量更新'],
["name" => "wanlshop/search/recyclebin", "title" => "回收站"],
["name" => "wanlshop/search/restore", "title" => "还原"],
["name" => "wanlshop/search/destroy", "title" => "真实删除"]
]],
['name' => 'wanlshop/qrcode', 'title' => '配置二维码', 'weigh' => '4351', 'ismenu' => 1, 'remark' => '用于二维码海报生成配置', 'sublist' => [
['name' => 'wanlshop/qrcode/index', 'title' => '查看'],
['name' => 'wanlshop/qrcode/add', 'title' => '添加'],
['name' => 'wanlshop/qrcode/edit', 'title' => '修改'],
['name' => 'wanlshop/qrcode/del', 'title' => '删除'],
['name' => 'wanlshop/qrcode/multi', 'title' => '批量更新'],
["name" => "wanlshop/qrcode/recyclebin", "title" => "回收站"],
["name" => "wanlshop/qrcode/restore", "title" => "还原"],
["name" => "wanlshop/qrcode/destroy", "title" => "真实删除"]
]]
]
],
[
'name' => 'wanlnav/chat',
'title' => 'IM即时通讯接口',
'icon' => 'fa fa-circle-o',
'weigh' => '4436',
'ismenu' => 0,
'sublist' => [
['name' => 'wanlshop/service/lists', 'title' => '聊天列表', 'ismenu' => 0],
['name' => 'wanlshop/service/bind', 'title' => '绑定', 'ismenu' => 0],
['name' => 'wanlshop/service/history', 'title' => '查询历史记录', 'ismenu' => 0],
['name' => 'wanlshop/service/read', 'title' => '全部已读', 'ismenu' => 0],
['name' => 'wanlshop/service/send', 'title' => '发送', 'ismenu' => 0],
['name' => 'wanlshop/service/close', 'title' => '关闭聊天窗口', 'ismenu' => 0]
]
],
]
]
];
return $menu;
... ...
name = wanlshop
title = 小程序商城 UNIAPP商城 B2B2C多用户 多终端
intro = 多商家自营+入驻、种草社区、全端直播、独立商家后台、即时通讯、前端自定义风格
author = 万联科技
website = https://www.wanlshop.com
version = 1.0.7
versionCode = 107
state = 1
url = /addons/wanlshop
license = regular
licenseto = 10789
... ...
此 diff 太大无法显示。
<?php
namespace addons\wanlshop\library;
final class Alilive
{
private $liveDomain; // 播域名
private $pushDomain; // 推域名
private $builderTime; // 有效时间
private $pushKey; // 推秘钥
private $liveKey; // 播秘钥
private $appName; // 直播项目
private $streamName; //流名
private $shopId; //商家ID
private $transTemplate; // 转码模板
public function __construct($liveDomain, $pushDomain, $builderTime, $pushKey, $liveKey, $appName, $streamName, $shopId, $transTemplate = '')
{
$this->liveDomain = $liveDomain;
$this->pushDomain = $pushDomain;
$this->builderTime = time() + 60 * $builderTime;
$this->pushKey = $pushKey;
$this->liveKey = $liveKey;
$this->appName = $appName;
$this->streamName = $streamName;
$this->shopId = $shopId ? $shopId : 0;
$this->transTemplate = $transTemplate ? '_'.$transTemplate : '';
}
public function urlBuilder()
{
return [
'pushurl' => "rtmp://$this->pushDomain/$this->appName/$this->streamName?auth_key=$this->builderTime-$this->shopId-0-".$this->auth_key('pushurl'),
'rtmpurl' => "rtmp://$this->liveDomain/$this->appName/$this->streamName$this->transTemplate?auth_key=$this->builderTime-$this->shopId-0-".$this->auth_key('rtmpurl'),
'm3u8url' => "https://$this->liveDomain/$this->appName/$this->streamName$this->transTemplate.m3u8?auth_key=$this->builderTime-$this->shopId-0-".$this->auth_key('m3u8url')
];
}
/**
* 生成加密串
* @param {Object}
*/
public function auth_key($type)
{
switch ($type)
{
case 'pushurl':
return md5("/$this->appName/$this->streamName-$this->builderTime-$this->shopId-0-$this->pushKey");
break;
case 'rtmpurl':
return md5("/$this->appName/$this->streamName$this->transTemplate-$this->builderTime-$this->shopId-0-$this->liveKey");
break;
case 'm3u8url':
return md5("/$this->appName/$this->streamName$this->transTemplate.m3u8-$this->builderTime-$this->shopId-0-$this->liveKey");
break;
}
}
}
... ...
/**
* WanlShop 多用户电商系统核心配置项
* @author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
* < 本程序,未经版权所有权人书面许可,不能自行用于商业用途!>
*
* @config socketUrl 即时通讯服务器地址,微信必须使用wss:// 如:wss://chat.wanlshop.com
* @config cdnUrl OSS服务地址 如:https://oss.wanlshop.com 或 https://www.wanlshop.com
* @config appUrl API服务器地址 如:https://api.wanlshop.com 或 https://www.wanlshop.com/api
* @config amapKey 高德网页Key
* @config debug 全局调试
*
* @ 相关文档 https://doc.fastadmin.net/wanlshop/265.html
*
* @version 1.0.3
*/
// @ 重要提示:你可以看到此页面!!!
// 则证明操作不正确,请先【客户端配置】完成配置 【点击更新】再【生成源码】
// 请参考文档
export default {
socketurl: 'wss://chat.wanlshop.com', //如果是ws:// 地址为ws://你服务器IP:7272 如 ws://123.4.56.78:7272,使用wss 后面不需要添加 :7272 端口
cdnurl: 'https://stc.wanlshop.com',
appurl: 'https://api.wanlshop.com', //如二级域名:https://api.wanlshop.com 或不使用二级域名 https://www.wanlshop.com/api
amapkey: '0a9f67a6f8f7cc3315d30846a0fde88b',
versionName: '1.0.3',
versionCode: '103',
debug: false
}
... ...
/**
* WanlShop 多用户电商系统核心配置项
* @author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
* < 本程序,未经版权所有权人书面许可,不能自行用于商业用途!>
*
* @config socketUrl 即时通讯服务器地址,微信必须使用wss:// 如:wss://chat.wanlshop.com
* @config cdnUrl OSS服务地址 如:https://oss.wanlshop.com 或 https://www.wanlshop.com
* @config appUrl API服务器地址 如:https://api.wanlshop.com 或 https://www.wanlshop.com/api
* @config amapKey 高德网页Key
* @config debug 全局调试
*
* @ 相关文档 https://doc.fastadmin.net/wanlshop/265.html
*
* @version 1.0.2
*/
export default {
socketurl: '{socketurl}', //如果是ws:// 地址为ws://你服务器IP:7272 如 ws://123.4.56.78:7272,使用wss 后面不需要添加 :7272 端口
cdnurl: '{cdnurl}',
appurl: '{appurl}', //如二级域名:https://api.wanlshop.com 或不使用二级域名 https://www.wanlshop.com/api
amapkey: '{amapkey}',
versionName: '{versionName}',
versionCode: '{versionCode}',
debug: {debug}
}
\ No newline at end of file
... ...
{
"name" : "{name}",
"appid" : "__UNI__WANLSHOP",
"description" : "© 深圳前海万联科技有限公司",
"versionName" : "{versionName}",
"versionCode" : {versionCode},
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"waiting" : false,
"autoclose" : false,
"delay" : 0
},
"modules" : {
"Payment" : {},
"Push" : {},
"Share" : {},
"Speech" : {},
"VideoPlayer" : {},
"LivePusher" : {},
"OAuth" : {},
"Maps" : {},
"Webview-x5" : {}
},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 1.0.3升级 热更新 添加权限REQUEST_INSTALL_PACKAGES 同时修改了 targetSdkVersion 26 以适配 Android 9.0 */
"android" : {
"packagename": "{package_name}",
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
],
"targetSdkVersion" : "26",
"schemes" : "{urlschemes}",
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
},
/* ios打包配置 */
"ios" : {
"appid": "{package_name}",
"UIBackgroundModes" : [ "audio" ],
"urlschemewhitelist" : [ "baidumap", "iosamap" ],
"idfa" : false,
"urltypes" : "{urlschemes}"
},
/* SDK配置 */
"sdkConfigs" : {
"speech" : {
"ifly" : {}
},
"ad" : {},
"payment" : {
"weixin" : {
"appid" : "{wx_appid}",
"UniversalLinks" : "{wx_universal_links}"
},
"appleiap" : {},
"alipay" : {}
},
"push" : {
"unipush" : {}
},
"oauth" : {
"apple" : {},
"weixin" : {
"appid" : "{wx_appid}",
"appsecret" : "{wx_appsecret}",
"UniversalLinks" : "{wx_universal_links}"
},
"qq" : {
"appid" : "{qq_appid}"
},
"sina" : {
"appkey" : "{appkey}",
"appsecret" : "{appsecret}",
"redirect_uri" : "{redirect_uri}"
}
},
"share" : {
"weixin" : {
"appid" : "{wx_appid}",
"UniversalLinks" : "{wx_universal_links}"
},
"qq" : {
"appid" : "{qq_appid}"
}
},
"maps" : {
"amap" : {
"appkey_ios" : "{amapkey_ios}",
"appkey_android" : "{amapkey_android}"
}
}
},
"orientation" : [ "portrait-primary" ],
"splashscreen" : {
"android" : {
"hdpi" : "",
"xxhdpi" : "",
"xhdpi" : ""
},
"ios" : {
"iphone" : {
"portrait-896h@3x" : "",
"landscape-896h@3x" : ""
}
},
"androidStyle" : "common",
"iosStyle" : "common"
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
},
/* 不使用原生占位 http://ask.dcloud.net.cn/article/35564 */
"safearea" : {
"bottom" : {
"offset" : "none"
}
},
"compilerVersion" : 3,
"nvueLaunchMode" : "fast",
"uniStatistics" : {
"enable" : false
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "{wx_mp_appid}",
"setting" : {
"urlCheck" : true,
"es6" : true,
"minified" : true,
"postcss" : true
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "{wx_mp_scope_userLocation}"
}
},
"uniStatistics" : {
"enable" : false
}
},
"mp-qq" : {
"appid" : "{qq_mp_appid}",
"uniStatistics" : {
"enable" : true
},
"setting" : {
"es6" : true,
"postcss" : true,
"minified" : true,
"urlCheck" : true
},
"permission" : {
"scope.userLocation" : {
"desc" : "商城需要获取当前位置,查询附近商品和完善购物地址"
}
}
},
"mp-alipay" : {
"usingComponents" : true,
"appid" : "{alipay_mp_appid}",
"uniStatistics" : {
"enable" : true
}
},
"mp-baidu" : {
"usingComponents" : true,
"appid" : "{baidu_mp_appid}",
"uniStatistics" : {
"enable" : true
}
},
"mp-toutiao" : {
"usingComponents" : true,
"appid" : "{toutiao_mp_appid}",
"uniStatistics" : {
"enable" : true
}
},
"h5" : {
"template" : "template.h5.html",
"router" : {
"mode" : "{router_mode}",
"base" : "{router_base}"
},
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "{qqmap_key}"
}
}
},
"domain" : "{domain}",
"optimization" : {
"treeShaking" : {
"enable" : true
}
},
"title" : "{title}",
"uniStatistics" : {
"enable" : false
},
"devServer" : {
"https" : {https}
}
},
"uniStatistics" : {
"enable" : false
}
}
... ...
<!-- * WanlShop - App全局模板配置
* @author 深圳前海万联科技有限公司 <wanlshop@i36k.com>
* @link http://www.wanlshop.com
*
* @本程序受法律保护,著作权©软著登记号2020SR0255711 < 未经版权所有权人书面许可,不能用于商业用途!>
*
* @获取许可
* 后台下载:https://www.fastadmin.net/store/wanlshop.html
* 帮助文档:https://doc.fastadmin.net/wanlshop
*
* @stress 本程序仅用作FastAdmin付费插件(WanlShop B2B2C商城)API使用,未经版权所有权人书面许可,不能自行用于商业用途
* @creationtime 2019年9月10日12:52:20
* @lasttime 2020年6月9日09:26:07
* @version 1.0.0
-->
<script>
import Vue from 'vue';
export default {
onLaunch() {
// 检测客户端更新
this.$store.dispatch('update/update');
// 仅首次打开一次性加载数据
this.$store.dispatch('common/init');
// 同步购物车 本地 & 网络
this.$store.dispatch('cart/get');
// 同步 动态数据
this.$store.dispatch('statistics/get');
},
onShow() {
// 启动或重启即时通讯
this.$store.dispatch('chat/start');
},
onHide() {
// 断开即时通讯
this.$store.dispatch('chat/close');
}
};
</script>
<style>
/* #ifndef APP-NVUE */
@import 'static/style/colorui.css';
@import 'static/style/wanlshop.css';
@import 'static/style/iconfont.css';
/* #endif */
</style>
... ...
/**数据验证(表单验证)来自 grace.hcoder.net作者 hcoder 深海*/
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);}}
\ No newline at end of file
... ...
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;
\ No newline at end of file
... ...
module.exports = {
onLoad() {
// 设置默认的转发参数
this.mpShare = {
title: '', // 默认为小程序名称
path: '', // 默认为当前页面路径
imageUrl: '' // 默认为当前页面的截图
}
// #ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
});
// #endif
// #ifdef MP-QQ
qq.showShareMenu({
showShareItems: ['qq', 'qzone', 'wechatFriends', 'wechatMoment']
});
// #endif
},
onShareAppMessage() {
return this.mpShare
},
// #ifdef MP-WEIXIN
onShareTimeline() {
return this.mpShare
}
// #endif
}
\ No newline at end of file
... ...
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;
\ No newline at end of file
... ...
"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;
\ No newline at end of file
... ...
/**
* A Request useing App network request design {@link http://www.wanlshop.com}
* @author 深圳前海万联科技有限公司 <wanlshop@i36k.com> < 本程序仅用作FastAdmin付费插件(多用户分销商城)测试使用,未经版权所有权人书面许可,不能自行用于商业用途!>
* @2019年9月10日12:52:20
* @version 1.0.1
*
**/
class wanlfun {
/**
* 保存聊天记录
* @author 深圳前海万联科技有限公司 <www.wanlshop.com>
*/
setChat(data,send) {
let uid = send == 'send' ? data.to_id : data.form.id;
uni.getStorage({
key: 'wanlchat:message_' + uid,
success: function (res) {
// 储存所有消息
// let arr = res.data;
// 优化,只储存 100条数据,超过100条,通过接口获取历史记录
let arr = res.data.slice(-96);
arr.push(data);
uni.setStorageSync('wanlchat:message_' + uid, arr);
},
fail: function (res) {
uni.setStorageSync('wanlchat:message_' + uid, [data]);
}
});
// 返回原始数据
return data;
}
/**
* 加法精度计算
* @author 深圳前海万联科技有限公司 <www.wanlshop.com>
*
* @param {Object} number 数字
*/
bcadd(a, b){
var c, d, e;
try {
c = a.toString().split(".")[1].length
} catch(f) {
c = 0
}
try {
d = b.toString().split(".")[1].length
} catch(f) {
d = 0
}
return e = Math.pow(10, Math.max(c, d)),(this.bcmul(a, e) + this.bcmul(b, e)) / e
}
/**
* 减法精度计算
* @author 深圳前海万联科技有限公司 <www.wanlshop.com>
*
* @param {Object} number 数字
*/
bcsub(a, b){
var c, d, e;
try {
c = a.toString().split(".")[1].length
} catch(f) {
c = 0
}
try {
d = b.toString().split(".")[1].length
} catch(f) {
d = 0
}
return e = Math.pow(10, Math.max(c, d)),(this.bcmul(a, e) - this.bcmul(b, e)) / e
}
/**
* 乘法精度计算
* @author 深圳前海万联科技有限公司 <www.wanlshop.com>
*
* @param {Object} number 数字
*/
bcmul(a, b){
var c = 0,
d = a.toString(),
e = b.toString();
try {
c += d.split(".")[1].length
} catch(f) {}
try {
c += e.split(".")[1].length
} catch(f) {}
return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c)
}
/**
* 除法精度计算
* @author 深圳前海万联科技有限公司 <www.wanlshop.com>
*
* @param {Object} number 数字
*/
bcdiv(a, b){
var c, d, e = 0,
f = 0;
try {
e = a.toString().split(".")[1].length
} catch(g) {}
try {
f = b.toString().split(".")[1].length
} catch(g) {}
return c = Number(a.toString().replace(".", "")),d = Number(b.toString().replace(".", "")),this.bcmul(c / d, Math.pow(10, f - e))
}
}
export default new wanlfun();
... ...
// #ifdef H5
/*!
* clipboard.js v2.0.4
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
*/
!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}}}])});
// #endif
\ No newline at end of file
... ...
// #ifdef H5
import ClipboardJS from "./clipboard.min.js"
// #endif
const thorui = {
getClipboardData: function(data, callback) {
// #ifdef APP-PLUS || MP
uni.setClipboardData({
data: data,
success(res) {
("function" == typeof callback) && callback(true)
},
fail(res) {
("function" == typeof callback) && callback(false)
}
})
// #endif
// #ifdef H5
let event = window.event || {}
let clipboard = new ClipboardJS("", {
text: () => data
})
clipboard.on('success', (e) => {
("function" == typeof callback) && callback(true)
clipboard.off('success')
clipboard.off('error')
clipboard.destroy()
});
clipboard.on('error', (e) => {
("function" == typeof callback) && callback(false)
clipboard.off('success')
clipboard.off('error')
clipboard.destroy()
});
clipboard.onClick(event)
// #endif
}
};
module.exports = {
getClipboardData: thorui.getClipboardData
};
... ...
/**
* @1900-2100区间内的公历、农历互转
* @charset UTF-8
* @github https://github.com/jjonline/calendar.js
* @Author Jea杨(JJonline@JJonline.Cn)
* @Time 2014-7-21
* @Time 2016-8-13 Fixed 2033hex、Attribution Annals
* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
* @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
* @Version 1.0.3
* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
*/
/* eslint-disable */
var calendar = {
/**
* 农历1900-2100的润大小信息表
* @Array Of Property
* @return Hex
*/
lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909
0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
/** Add By JJonline@JJonline.Cn**/
0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
0x0d520], // 2100
/**
* 公历每个月份的天数普通表
* @Array Of Property
* @return Number
*/
solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
/**
* 天干地支之天干速查表
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
* @return Cn string
*/
Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
/**
* 天干地支之地支速查表
* @Array Of Property
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
* @return Cn string
*/
Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'],
/**
* 天干地支之地支速查表<=>生肖
* @Array Of Property
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
* @return Cn string
*/
Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'],
/**
* 24节气速查表
* @Array Of Property
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
* @return Cn string
*/
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'],
/**
* 1900-2100各年的24节气日期速查表
* @Array Of Property
* @return 0x string For splice
*/
sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f',
'97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
'97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
'97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
'9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
'97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
'97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
'9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
'97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
'97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
'9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
'7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
'9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
'97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
'9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
'9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
'977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
'977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
'7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
'977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
'7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
'7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
'7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
'7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
'7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
'7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
'7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
'7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
'665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
'7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
'7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'],
/**
* 数字转中文速查表
* @Array Of Property
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
* @return Cn string
*/
nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'],
/**
* 日期转农历称呼速查表
* @Array Of Property
* @trans ['初','十','廿','卅']
* @return Cn string
*/
nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
/**
* 月份转农历称呼速查表
* @Array Of Property
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
* @return Cn string
*/
nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'],
/**
* 返回农历y年一整年的总天数
* @param lunar Year
* @return Number
* @eg:var count = calendar.lYearDays(1987) ;//count=387
*/
lYearDays: function (y) {
var i; var sum = 348
for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 }
return (sum + this.leapDays(y))
},
/**
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
* @param lunar Year
* @return Number (0-12)
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
*/
leapMonth: function (y) { // 闰字编码 \u95f0
return (this.lunarInfo[y - 1900] & 0xf)
},
/**
* 返回农历y年闰月的天数 若该年没有闰月则返回0
* @param lunar Year
* @return Number (0、29、30)
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
*/
leapDays: function (y) {
if (this.leapMonth(y)) {
return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
}
return (0)
},
/**
* 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
* @param lunar Year
* @return Number (-1、29、30)
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
*/
monthDays: function (y, m) {
if (m > 12 || m < 1) { return -1 }// 月份参数从1至12,参数错误返回-1
return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
},
/**
* 返回公历(!)y年m月的天数
* @param solar Year
* @return Number (-1、28、29、30、31)
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
*/
solarDays: function (y, m) {
if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
var ms = m - 1
if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
} else {
return (this.solarMonth[ms])
}
},
/**
* 农历年份转换为干支纪年
* @param lYear 农历年的年份数
* @return Cn string
*/
toGanZhiYear: function (lYear) {
var ganKey = (lYear - 3) % 10
var zhiKey = (lYear - 3) % 12
if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干
if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支
return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
},
/**
* 公历月、日判断所属星座
* @param cMonth [description]
* @param cDay [description]
* @return Cn string
*/
toAstro: function (cMonth, cDay) {
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'
var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座
},
/**
* 传入offset偏移量返回干支
* @param offset 相对甲子的偏移量
* @return Cn string
*/
toGanZhi: function (offset) {
return this.Gan[offset % 10] + this.Zhi[offset % 12]
},
/**
* 传入公历(!)y年获得该年第n个节气的公历日期
* @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
* @return day Number
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
*/
getTerm: function (y, n) {
if (y < 1900 || y > 2100) { return -1 }
if (n < 1 || n > 24) { return -1 }
var _table = this.sTermInfo[y - 1900]
var _info = [
parseInt('0x' + _table.substr(0, 5)).toString(),
parseInt('0x' + _table.substr(5, 5)).toString(),
parseInt('0x' + _table.substr(10, 5)).toString(),
parseInt('0x' + _table.substr(15, 5)).toString(),
parseInt('0x' + _table.substr(20, 5)).toString(),
parseInt('0x' + _table.substr(25, 5)).toString()
]
var _calday = [
_info[0].substr(0, 1),
_info[0].substr(1, 2),
_info[0].substr(3, 1),
_info[0].substr(4, 2),
_info[1].substr(0, 1),
_info[1].substr(1, 2),
_info[1].substr(3, 1),
_info[1].substr(4, 2),
_info[2].substr(0, 1),
_info[2].substr(1, 2),
_info[2].substr(3, 1),
_info[2].substr(4, 2),
_info[3].substr(0, 1),
_info[3].substr(1, 2),
_info[3].substr(3, 1),
_info[3].substr(4, 2),
_info[4].substr(0, 1),
_info[4].substr(1, 2),
_info[4].substr(3, 1),
_info[4].substr(4, 2),
_info[5].substr(0, 1),
_info[5].substr(1, 2),
_info[5].substr(3, 1),
_info[5].substr(4, 2)
]
return parseInt(_calday[n - 1])
},
/**
* 传入农历数字月份返回汉语通俗表示法
* @param lunar month
* @return Cn string
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
*/
toChinaMonth: function (m) { // 月 => \u6708
if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
var s = this.nStr3[m - 1]
s += '\u6708'// 加上月字
return s
},
/**
* 传入农历日期数字返回汉字表示法
* @param lunar day
* @return Cn string
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
*/
toChinaDay: function (d) { // 日 => \u65e5
var s
switch (d) {
case 10:
s = '\u521d\u5341'; break
case 20:
s = '\u4e8c\u5341'; break
break
case 30:
s = '\u4e09\u5341'; break
break
default :
s = this.nStr2[Math.floor(d / 10)]
s += this.nStr1[d % 10]
}
return (s)
},
/**
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
* @param y year
* @return Cn string
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
*/
getAnimal: function (y) {
return this.Animals[(y - 4) % 12]
},
/**
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
* @param y solar year
* @param m solar month
* @param d solar day
* @return JSON object
* @eg:console.log(calendar.solar2lunar(1987,11,01));
*/
solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31
// 年份限定、上限
if (y < 1900 || y > 2100) {
return -1// undefined转换为数字变为NaN
}
// 公历传参最下限
if (y == 1900 && m == 1 && d < 31) {
return -1
}
// 未传参 获得当天
if (!y) {
var objDate = new Date()
} else {
var objDate = new Date(y, parseInt(m) - 1, d)
}
var i; var leap = 0; var temp = 0
// 修正ymd参数
var y = objDate.getFullYear()
var m = objDate.getMonth() + 1
var d = objDate.getDate()
var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000
for (i = 1900; i < 2101 && offset > 0; i++) {
temp = this.lYearDays(i)
offset -= temp
}
if (offset < 0) {
offset += temp; i--
}
// 是否今天
var isTodayObj = new Date()
var isToday = false
if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
isToday = true
}
// 星期几
var nWeek = objDate.getDay()
var cWeek = this.nStr1[nWeek]
// 数字表示周几顺应天朝周一开始的惯例
if (nWeek == 0) {
nWeek = 7
}
// 农历年
var year = i
var leap = this.leapMonth(i) // 闰哪个月
var isLeap = false
// 效验闰月
for (i = 1; i < 13 && offset > 0; i++) {
// 闰月
if (leap > 0 && i == (leap + 1) && isLeap == false) {
--i
isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数
} else {
temp = this.monthDays(year, i)// 计算农历普通月天数
}
// 解除闰月
if (isLeap == true && i == (leap + 1)) { isLeap = false }
offset -= temp
}
// 闰月导致数组下标重叠取反
if (offset == 0 && leap > 0 && i == leap + 1) {
if (isLeap) {
isLeap = false
} else {
isLeap = true; --i
}
}
if (offset < 0) {
offset += temp; --i
}
// 农历月
var month = i
// 农历日
var day = offset + 1
// 天干地支处理
var sm = m - 1
var gzY = this.toGanZhiYear(year)
// 当月的两个节气
// bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始
var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始
// 依据12节气修正干支月
var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
if (d >= firstNode) {
gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
}
// 传入的日期的节气与否
var isTerm = false
var Term = null
if (firstNode == d) {
isTerm = true
Term = this.solarTerm[m * 2 - 2]
}
if (secondNode == d) {
isTerm = true
Term = this.solarTerm[m * 2 - 1]
}
// 日柱 当月一日与 1900/1/1 相差天数
var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
var gzD = this.toGanZhi(dayCyclical + d - 1)
// 该日期所属的星座
var astro = this.toAstro(m, d)
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 }
},
/**
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
* @param y lunar year
* @param m lunar month
* @param d lunar day
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
* @return JSON object
* @eg:console.log(calendar.lunar2solar(1987,9,10));
*/
lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
var isLeapMonth = !!isLeapMonth
var leapOffset = 0
var leapMonth = this.leapMonth(y)
var leapDay = this.leapDays(y)
if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值
var day = this.monthDays(y, m)
var _day = day
// bugFix 2016-9-25
// if month is leap, _day use leapDays method
if (isLeapMonth) {
_day = this.leapDays(y, m)
}
if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验
// 计算农历的时间差
var offset = 0
for (var i = 1900; i < y; i++) {
offset += this.lYearDays(i)
}
var leap = 0; var isAdd = false
for (var i = 1; i < m; i++) {
leap = this.leapMonth(y)
if (!isAdd) { // 处理闰月
if (leap <= i && leap > 0) {
offset += this.leapDays(y); isAdd = true
}
}
offset += this.monthDays(y, i)
}
// 转换闰月农历 需补充该年闰月的前一个月的时差
if (isLeapMonth) { offset += day }
// 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
var calObj = new Date((offset + d - 31) * 86400000 + stmap)
var cY = calObj.getUTCFullYear()
var cM = calObj.getUTCMonth() + 1
var cD = calObj.getUTCDate()
return this.solar2lunar(cY, cM, cD)
}
}
export default calendar
... ...
<template>
<view class="uni-calendar-item__weeks-box" :class="{
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':(calendar.fullDate === weeks.fullDate && !weeks.isDay) ,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
}"
@tap="choiceDate(weeks)">
<view class="uni-calendar-item__weeks-box-item">
<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
<text class="uni-calendar-item__weeks-box-text" :class="{
'uni-calendar-item--isDay-text': weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
}">{{weeks.date}}</text>
<text v-if="!lunar&&!weeks.extraInfo && weeks.isDay" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
}">今天</text>
<text v-if="lunar&&!weeks.extraInfo" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
}">{{weeks.isDay?'今天': (weeks.lunar.IDayCn === '初一'?weeks.lunar.IMonthCn:weeks.lunar.IDayCn)}}</text>
<text v-if="weeks.extraInfo&&weeks.extraInfo.info" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--extra':weeks.extraInfo.info,
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
}">{{weeks.extraInfo.info}}</text>
</view>
</view>
</template>
<script>
export default {
props: {
weeks: {
type: Object,
default () {
return {}
}
},
calendar: {
type: Object,
default: () => {
return {}
}
},
selected: {
type: Array,
default: () => {
return []
}
},
lunar: {
type: Boolean,
default: false
}
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
}
}
}
</script>
<style lang="scss" scoped>
.uni-calendar-item__weeks-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
}
.uni-calendar-item__weeks-box-text {
font-size: $uni-font-size-base;
color: $uni-text-color;
}
.uni-calendar-item__weeks-lunar-text {
font-size: $uni-font-size-sm;
color: $uni-text-color;
}
.uni-calendar-item__weeks-box-item {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
width: 100rpx;
height: 100rpx;
}
.uni-calendar-item__weeks-box-circle {
position: absolute;
display: none;
top: 5px;
right: 5px;
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #ffbc00;
}
.uni-calendar-item--disable {
background-color: rgba(249, 249, 249, $uni-opacity-disabled);
color: $uni-text-color-disable;
}
.uni-calendar-item--isDay-text {
color: #ffbc00;
}
// .uni-calendar-item--isDay {
// background-color: $uni-color-primary;
// opacity: 0.6;
// color: #fff;
// }
.uni-calendar-item--extra {
color: #ffbc00;
opacity: 0.8;
}
// .uni-calendar-item--checked {
// background-color: $uni-color-primary;
// color: #fff;
// opacity: 0.1;
// }
.uni-calendar-item--multiple {
background-color: $uni-color-primary;
color: #fff;
opacity: 0.8;
}
.uni-calendar-item--before-checked {
background-color: #ff5a5f;
color: #fff;
}
.uni-calendar-item--after-checked {
background-color: #ff5a5f;
color: #fff;
}
</style>
... ...
<template>
<view class="uni-calendar">
<view v-if="!insert&&show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}" @tap="clean"></view>
<view v-if="insert || show" class="uni-calendar__content" :class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow}">
<view v-if="!insert" class="uni-calendar__header uni-calendar--fixed-top">
<view class="uni-calendar__header-btn-box" @tap="close">
<text class="uni-calendar__header-text uni-calendar--fixed-width">取消</text>
</view>
<view class="uni-calendar__header-btn-box" @tap="confirm">
<text class="uni-calendar__header-text uni-calendar--fixed-width">确定</text>
</view>
</view>
<view class="uni-calendar__header">
<view class="uni-calendar__header-btn-box" @tap.stop="pre">
<view class="uni-calendar__header-btn uni-calendar--left"></view>
</view>
<picker mode="date" :value="date" fields="month" @change="bindDateChange">
<text class="uni-calendar__header-text">{{ (nowDate.year||'') +'年'+( nowDate.month||'') +'月'}}</text>
</picker>
<view class="uni-calendar__header-btn-box" @tap.stop="next">
<view class="uni-calendar__header-btn uni-calendar--right"></view>
</view>
<text v-if="showReturn" class="uni-calendar__backtoday" @tap="backtoday">回到今天</text>
</view>
<view class="uni-calendar__box">
<view v-if="showMonth" class="uni-calendar__box-bg">
<text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
</view>
<view class="uni-calendar__weeks">
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text"></text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text"></text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text"></text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text"></text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text"></text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text"></text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text"></text>
</view>
</view>
<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
<calendar-item :weeks="weeks" :calendar="calendar" :selected="selected" :lunar="lunar" @change="choiceDate"></calendar-item>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import Calendar from './util.js';
import calendarItem from './uni-calendar-item.vue'
/**
* Calendar 日历
* @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
* @tutorial https://ext.dcloud.net.cn/plugin?id=56
* @property {String} date 自定义当前时间,默认为今天
* @property {Boolean} lunar 显示农历
* @property {String} startDate 日期选择范围-开始日期
* @property {String} endDate 日期选择范围-结束日期
* @property {Boolean} range 范围选择
* @property {Boolean} insert = [true|false] 插入模式,默认为false
* @value true 弹窗模式
* @value false 插入模式
* @property {Boolean} clearDate = [true|false] 弹窗模式是否清空上次选择内容
* @property {Array} selected 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]
* @property {Boolean} showMonth 是否选择月份为背景
* @event {Function} change 日期改变,`insert :ture` 时生效
* @event {Function} confirm 确认选择`insert :false` 时生效
* @event {Function} monthSwitch 切换月份时触发
* @example <uni-calendar :insert="true":lunar="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" />
*/
export default {
components: {
calendarItem
},
props: {
date: {
type: String,
default: ''
},
selected: {
type: Array,
default () {
return []
}
},
lunar: {
type: Boolean,
default: false
},
showReturn: {
type: Boolean,
default: true
},
startDate: {
type: String,
default: ''
},
endDate: {
type: String,
default: ''
},
range: {
type: Boolean,
default: false
},
insert: {
type: Boolean,
default: true
},
showMonth: {
type: Boolean,
default: true
},
clearDate: {
type: Boolean,
default: true
}
},
data() {
return {
show: false,
weeks: [],
calendar: {},
nowDate: '',
aniMaskShow: false
}
},
watch: {
date(newVal) {
this.cale.setDate(newVal)
this.init(this.cale.selectDate.fullDate)
},
startDate(val){
this.cale.resetSatrtDate(val)
},
endDate(val){
this.cale.resetEndDate(val)
},
selected(newVal) {
this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
this.weeks = this.cale.weeks
}
},
created() {
// 获取日历方法实例
this.cale = new Calendar({
// date: new Date(),
selected: this.selected,
startDate: this.startDate,
endDate: this.endDate,
range: this.range,
})
// 选中某一天
this.cale.setDate(this.date)
this.init(this.cale.selectDate.fullDate)
// this.setDay
},
methods: {
// 取消穿透
clean() {},
bindDateChange(e) {
const value = e.detail.value + '-1'
console.log(this.cale.getDate(value));
this.cale.setDate(value)
this.init(value)
},
/**
* 初始化日期显示
* @param {Object} date
*/
init(date) {
this.weeks = this.cale.weeks
this.nowDate = this.calendar = this.cale.getInfo(date)
},
/**
* 打开日历弹窗
*/
open() {
// 弹窗模式并且清理数据
if (this.clearDate && !this.insert) {
this.cale.cleanMultipleStatus()
this.cale.setDate(this.date)
this.init(this.cale.selectDate.fullDate)
}
this.show = true
this.$nextTick(() => {
setTimeout(() => {
this.aniMaskShow = true
}, 50)
})
},
/**
* 关闭日历弹窗
*/
close() {
this.aniMaskShow = false
this.$nextTick(() => {
setTimeout(() => {
this.show = false
this.$emit('close')
}, 300)
})
},
/**
* 确认按钮
*/
confirm() {
this.setEmit('confirm')
this.close()
},
/**
* 变化触发
*/
change() {
if (!this.insert) return
this.setEmit('change')
},
/**
* 选择月份触发
*/
monthSwitch() {
let {
year,
month
} = this.nowDate
this.$emit('monthSwitch', {
year,
month: Number(month)
})
},
/**
* 派发事件
* @param {Object} name
*/
setEmit(name) {
let {
year,
month,
date,
fullDate,
lunar,
extraInfo
} = this.calendar
this.$emit(name, {
range: this.cale.multipleStatus,
year,
month,
date,
fulldate: fullDate,
lunar,
extraInfo: extraInfo || {}
})
},
/**
* 选择天触发
* @param {Object} weeks
*/
choiceDate(weeks) {
if (weeks.disable) return
this.calendar = weeks
// 设置多选
this.cale.setMultiple(this.calendar.fullDate)
this.weeks = this.cale.weeks
this.change()
},
/**
* 回到今天
*/
backtoday() {
console.log(this.cale.getDate(new Date()).fullDate);
let date = this.cale.getDate(new Date()).fullDate
this.cale.setDate(date)
this.init(date)
this.change()
},
/**
* 上个月
*/
pre() {
const preDate = this.cale.getDate(this.nowDate.fullDate, -1, 'month').fullDate
this.setDate(preDate)
this.monthSwitch()
},
/**
* 下个月
*/
next() {
const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate
this.setDate(nextDate)
this.monthSwitch()
},
/**
* 设置日期
* @param {Object} date
*/
setDate(date) {
this.cale.setDate(date)
this.weeks = this.cale.weeks
this.nowDate = this.cale.getInfo(date)
}
}
}
</script>
<style lang="scss" scoped>
.uni-calendar {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
}
.uni-calendar__mask {
position: fixed;
bottom: 0;
top: 0;
left: 0;
right: 0;
background-color: $uni-bg-color-mask;
transition-property: opacity;
transition-duration: 0.3s;
opacity: 0;
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
}
.uni-calendar--mask-show {
opacity: 1
}
.uni-calendar--fixed {
position: fixed;
bottom: 0;
left: 0;
right: 0;
transition-property: transform;
transition-duration: 0.3s;
transform: translateY(460px);
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
}
.uni-calendar--ani-show {
transform: translateY(0);
}
.uni-calendar__content {
background-color: #fff;
}
.uni-calendar__header {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: flex-start;
align-items: center;
height: 50px;
border-bottom-color: #f7f7f7;
border-bottom-style: solid;
border-bottom-width: 1px;
}
.uni-calendar--fixed-top {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: space-between;
border-top-color: $uni-border-color;
border-top-style: solid;
border-top-width: 1px;
}
.uni-calendar--fixed-width {
width: 50px;
// padding: 0 15px;
}
.uni-calendar__backtoday {
position: absolute;
right: 0;
top: 25rpx;
padding: 0 5px;
padding-left: 10px;
height: 25px;
line-height: 25px;
font-size: 12px;
border-top-left-radius: 25px;
border-bottom-left-radius: 25px;
color: $uni-text-color;
background-color: $uni-bg-color-hover;
}
.uni-calendar__header-text {
text-align: center;
width: 100px;
font-size: $uni-font-size-base;
color: $uni-text-color;
}
.uni-calendar__header-btn-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
width: 50px;
height: 50px;
}
.uni-calendar__header-btn {
width: 10px;
height: 10px;
border-left-color: $uni-text-color-placeholder;
border-left-style: solid;
border-left-width: 2px;
border-top-color: $uni-color-subtitle;
border-top-style: solid;
border-top-width: 2px;
}
.uni-calendar--left {
transform: rotate(-45deg);
}
.uni-calendar--right {
transform: rotate(135deg);
}
.uni-calendar__weeks {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
}
.uni-calendar__weeks-item {
flex: 1;
}
.uni-calendar__weeks-day {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
height: 45px;
border-bottom-color: #F5F5F5;
border-bottom-style: solid;
border-bottom-width: 1px;
}
.uni-calendar__weeks-day-text {
font-size: 14px;
}
.uni-calendar__box {
position: relative;
}
.uni-calendar__box-bg {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.uni-calendar__box-bg-text {
font-size: 200px;
font-weight: bold;
color: $uni-text-color-grey;
opacity: 0.1;
text-align: center;
/* #ifndef APP-NVUE */
line-height: 1;
/* #endif */
}
</style>
... ...
import CALENDAR from './calendar.js'
class Calendar {
constructor({
date,
selected,
startDate,
endDate,
range
} = {}) {
// 当前日期
this.date = this.getDate(new Date()) // 当前初入日期
// 打点信息
this.selected = selected || [];
// 范围开始
this.startDate = startDate
// 范围结束
this.endDate = endDate
this.range = range
// 多选状态
this.cleanMultipleStatus()
// 每周日期
this.weeks = {}
// this._getWeek(this.date.fullDate)
}
/**
* 设置日期
* @param {Object} date
*/
setDate(date) {
this.selectDate = this.getDate(date)
this._getWeek(this.selectDate.fullDate)
}
/**
* 清理多选状态
*/
cleanMultipleStatus() {
this.multipleStatus = {
before: '',
after: '',
data: []
}
}
/**
* 重置开始日期
*/
resetSatrtDate(startDate) {
// 范围开始
this.startDate = startDate
}
/**
* 重置结束日期
*/
resetEndDate(endDate) {
// 范围结束
this.endDate = endDate
}
/**
* 获取任意时间
*/
getDate(date, AddDayCount = 0, str = 'day') {
if (!date) {
date = new Date()
}
if (typeof date !== 'object') {
date = date.replace(/-/g, '/')
}
const dd = new Date(date)
switch (str) {
case 'day':
dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
break
case 'month':
if (dd.getDate() === 31) {
dd.setDate(dd.getDate() + AddDayCount)
} else {
dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期
}
break
case 'year':
dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期
break
}
const y = dd.getFullYear()
const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
return {
fullDate: y + '-' + m + '-' + d,
year: y,
month: m,
date: d,
day: dd.getDay()
}
}
/**
* 获取上月剩余天数
*/
_getLastMonthDays(firstDay, full) {
let dateArr = []
for (let i = firstDay; i > 0; i--) {
const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()
dateArr.push({
date: beforeDate,
month: full.month - 1,
lunar: this.getlunar(full.year, full.month - 1, beforeDate),
disable: true
})
}
return dateArr
}
/**
* 获取本月天数
*/
_currentMonthDys(dateData, full) {
let dateArr = []
let fullDate = this.date.fullDate
for (let i = 1; i <= dateData; i++) {
let isinfo = false
let nowDate = full.year + '-' + (full.month < 10 ?
full.month : full.month) + '-' + (i < 10 ?
'0' + i : i)
// 是否今天
let isDay = fullDate === nowDate
// 获取打点信息
let info = this.selected && this.selected.find((item) => {
if (this.dateEqual(nowDate, item.date)) {
return item
}
})
// 日期禁用
let disableBefore = true
let disableAfter = true
if (this.startDate) {
let dateCompBefore = this.dateCompare(this.startDate, fullDate)
disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
}
if (this.endDate) {
let dateCompAfter = this.dateCompare(fullDate, this.endDate)
disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
}
let multiples = this.multipleStatus.data
let checked = false
let multiplesStatus = -1
if (this.range) {
if (multiples) {
multiplesStatus = multiples.findIndex((item) => {
return this.dateEqual(item, nowDate)
})
}
if (multiplesStatus !== -1) {
checked = true
}
}
let data = {
fullDate: nowDate,
year: full.year,
date: i,
multiple: this.range ? checked : false,
beforeMultiple: this.dateEqual(this.multipleStatus.before, nowDate),
afterMultiple: this.dateEqual(this.multipleStatus.after, nowDate),
month: full.month,
lunar: this.getlunar(full.year, full.month, i),
disable: !disableBefore || !disableAfter,
isDay
}
if (info) {
data.extraInfo = info
}
dateArr.push(data)
}
return dateArr
}
/**
* 获取下月天数
*/
_getNextMonthDays(surplus, full) {
let dateArr = []
for (let i = 1; i < surplus + 1; i++) {
dateArr.push({
date: i,
month: Number(full.month) + 1,
lunar: this.getlunar(full.year, Number(full.month) + 1, i),
disable: true
})
}
return dateArr
}
/**
* 获取当前日期详情
* @param {Object} date
*/
getInfo(date) {
if (!date) {
date = new Date()
}
const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)
return dateInfo
}
/**
* 比较时间大小
*/
dateCompare(startDate, endDate) {
// 计算截止时间
startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
// 计算详细项的截止时间
endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
if (startDate <= endDate) {
return true
} else {
return false
}
}
/**
* 比较时间是否相等
*/
dateEqual(before, after) {
// 计算截止时间
before = new Date(before.replace('-', '/').replace('-', '/'))
// 计算详细项的截止时间
after = new Date(after.replace('-', '/').replace('-', '/'))
if (before.getTime() - after.getTime() === 0) {
return true
} else {
return false
}
}
/**
* 获取日期范围内所有日期
* @param {Object} begin
* @param {Object} end
*/
geDateAll(begin, end) {
var arr = []
var ab = begin.split('-')
var ae = end.split('-')
var db = new Date()
db.setFullYear(ab[0], ab[1] - 1, ab[2])
var de = new Date()
de.setFullYear(ae[0], ae[1] - 1, ae[2])
var unixDb = db.getTime() - 24 * 60 * 60 * 1000
var unixDe = de.getTime() - 24 * 60 * 60 * 1000
for (var k = unixDb; k <= unixDe;) {
k = k + 24 * 60 * 60 * 1000
arr.push(this.getDate(new Date(parseInt(k))).fullDate)
}
return arr
}
/**
* 计算阴历日期显示
*/
getlunar(year, month, date) {
return CALENDAR.solar2lunar(year, month, date)
}
/**
* 设置打点
*/
setSelectInfo(data, value) {
this.selected = value
this._getWeek(data)
}
/**
* 获取多选状态
*/
setMultiple(fullDate) {
let {
before,
after
} = this.multipleStatus
if (!this.range) return
if (before && after) {
this.multipleStatus.before = ''
this.multipleStatus.after = ''
this.multipleStatus.data = []
} else {
if (!before) {
this.multipleStatus.before = fullDate
} else {
this.multipleStatus.after = fullDate
if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
} else {
this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
}
}
}
this._getWeek(fullDate)
}
/**
* 获取每周数据
* @param {Object} dateData
*/
_getWeek(dateData) {
const {
fullDate,
year,
month,
date,
day
} = this.getDate(dateData)
let firstDay = new Date(year, month - 1, 1).getDay()
let currentDay = new Date(year, month, 0).getDate()
let dates = {
lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
nextMonthDays: [], // 下个月开始几天
weeks: []
}
let canlender = []
const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)
dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))
canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)
let weeks = {}
// 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
for (let i = 0; i < canlender.length; i++) {
if (i % 7 === 0) {
weeks[parseInt(i / 7)] = new Array(7)
}
weeks[parseInt(i / 7)][i % 7] = canlender[i]
}
this.canlender = canlender
this.weeks = weeks
}
//静态方法
// static init(date) {
// if (!this.instance) {
// this.instance = new Calendar(date);
// }
// return this.instance;
// }
}
export default Calendar
... ...
<template>
<view class="uni-countdown">
<text v-if="showDay" :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ d }}</text>
<text v-if="showDay" :style="{ color: splitorColor }" class="uni-countdown__splitor"></text>
<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ h }}</text>
<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '时' }}</text>
<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ i }}</text>
<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '分' }}</text>
<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ s }}</text>
<text v-if="!showColon" :style="{ color: splitorColor }" class="uni-countdown__splitor"></text>
</view>
</template>
<script>
/**
* Countdown 倒计时
* @description 倒计时组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=25
* @property {String} backgroundColor 背景色
* @property {String} color 文字颜色
* @property {Number} day 天数
* @property {Number} hour 小时
* @property {Number} minute 分钟
* @property {Number} second 秒
* @property {Boolean} showDay = [true|false] 是否显示天数
* @property {Boolean} showColon = [true|false] 是否以冒号为分隔符
* @property {String} splitorColor 分割符号颜色
* @event {Function} timeup 倒计时时间到触发事件
* @example <uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown>
*/
export default {
name: 'UniCountdown',
props: {
showDay: {
type: Boolean,
default: true
},
showColon: {
type: Boolean,
default: true
},
backgroundColor: {
type: String,
default: '#FFFFFF'
},
borderColor: {
type: String,
default: '#000000'
},
color: {
type: String,
default: '#000000'
},
splitorColor: {
type: String,
default: '#000000'
},
day: {
type: Number,
default: 0
},
hour: {
type: Number,
default: 0
},
minute: {
type: Number,
default: 0
},
second: {
type: Number,
default: 0
}
},
data() {
return {
timer: null,
syncFlag: false,
d: '00',
h: '00',
i: '00',
s: '00',
leftTime: 0,
seconds: 0
}
},
watch: {
day(val) {
this.changeFlag()
},
hour(val) {
this.changeFlag()
},
minute(val) {
this.changeFlag()
},
second(val) {
this.changeFlag()
}
},
created: function(e) {
this.startData();
},
beforeDestroy() {
clearInterval(this.timer)
},
methods: {
toSeconds(day, hours, minutes, seconds) {
return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds
},
timeUp() {
clearInterval(this.timer)
this.$emit('timeup')
},
countDown() {
let seconds = this.seconds
let [day, hour, minute, second] = [0, 0, 0, 0]
if (seconds > 0) {
day = Math.floor(seconds / (60 * 60 * 24))
hour = Math.floor(seconds / (60 * 60)) - (day * 24)
minute = Math.floor(seconds / 60) - (day * 24 * 60) - (hour * 60)
second = Math.floor(seconds) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60)
} else {
this.timeUp()
}
if (day < 10) {
day = '0' + day
}
if (hour < 10) {
hour = '0' + hour
}
if (minute < 10) {
minute = '0' + minute
}
if (second < 10) {
second = '0' + second
}
this.d = day
this.h = hour
this.i = minute
this.s = second
},
startData() {
this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
if (this.seconds <= 0) {
return
}
this.countDown()
this.timer = setInterval(() => {
this.seconds--
if (this.seconds < 0) {
this.timeUp()
return
}
this.countDown()
}, 1000)
},
changeFlag() {
if (!this.syncFlag) {
this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
this.startData();
this.syncFlag = true;
}
}
}
}
</script>
<style scoped>
.uni-countdown {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: flex-start;
padding: 2rpx 0;
}
.uni-countdown__splitor {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
line-height: 48rpx;
padding: 5rpx;
font-size: 24rpx;
}
.uni-countdown__number {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
width: 52rpx;
height: 48rpx;
line-height: 48rpx;
margin: 5rpx;
text-align: center;
font-size: 24rpx;
}
</style>
\ No newline at end of file
... ...
<template>
<view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer">
<view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close" />
<view class="uni-drawer__content" :style="{width: width}" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer}">
<slot />
</view>
</view>
</template>
<script>
/**
* Drawer 抽屉
* @description 抽屉侧滑菜单
* @tutorial https://ext.dcloud.net.cn/plugin?id=26
* @property {Boolean} visible = [true|false] Drawer的显示状态
* @property {Boolean} mask = [true | false] 是否显示遮罩
* @property {Boolean} mode = [left | right] Drawer 滑出位置
* @value left 从左侧滑出
* @value right 从右侧侧滑出
* @event {Function} close 组件关闭时触发事件
*/
export default {
name: 'UniDrawer',
props: {
/**
* 显示状态
*/
visible: {
type: Boolean,
default: false
},
/**
* 显示模式(左、右),只在初始化生效
*/
mode: {
type: String,
default: ''
},
/**
* 显示模式(左、右),只在初始化生效
*/
width: {
type: String,
default: '72%'
},
/**
* 蒙层显示状态
*/
mask: {
type: Boolean,
default: true
}
},
data() {
return {
visibleSync: false,
showDrawer: false,
rightMode: false,
watchTimer: null
}
},
watch: {
visible(val) {
if (val) {
this.open()
} else {
this.close()
}
}
},
created() {
this.visibleSync = this.visible
setTimeout(() => {
this.showDrawer = this.visible
}, 100)
this.rightMode = this.mode === 'right'
},
methods: {
close() {
this._change('showDrawer', 'visibleSync', false)
},
open() {
this._change('visibleSync', 'showDrawer', true)
},
_change(param1, param2, status) {
this[param1] = status
if (this.watchTimer) {
clearTimeout(this.watchTimer)
}
this.watchTimer = setTimeout(() => {
this[param2] = status
this.$emit(status ? 'open' : 'close')
}, status ? 50 : 300)
}
}
}
</script>
<style scoped>
/* 抽屉宽度
*/
.uni-drawer {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
z-index: 9999;
}
.uni-drawer__content {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: absolute;
top: 0;
bottom: 0;
background-color: #ffffff;
transition: transform 0.3s ease;
}
.uni-drawer--left {
left: 0;
transform: translateX(-320px);
}
.uni-drawer--right {
right: 0;
transform: translateX(320px);
}
.uni-drawer__content--visible {
transform: translateX(0px);
}
.uni-drawer__mask {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
opacity: 0;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.4);
transition: opacity 0.3s;
}
.uni-drawer__mask--visible {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
opacity: 1;
}
</style>
\ No newline at end of file
... ...
<template>
<text class="uni-link" :class="{'uni-link--withline':showUnderLine===true||showUnderLine==='true'}" :style="{color,fontSize:fontSize+'px'}" @tap="openURL">{{text}}</text>
</template>
<script>
/**
* Link 外部网页超链接组件
* @description uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打开新网页
* @property {String} href 点击后打开的外部网页url
* @property {String} text 显示的文字
* @property {Boolean} showUnderLine 是否显示下划线
* @property {String} copyTips 在小程序端复制链接时显示的提示语
* @property {String} color 链接文字颜色
* @property {String} fontSize 链接文字大小
* @example * <uni-link href="https://ext.dcloud.net.cn" text="https://ext.dcloud.net.cn"></uni-link>
*/
export default {
name: 'uniLink',
props: {
href: {
type: String,
default: ''
},
text: {
type: String,
default: ''
},
showUnderLine: {
type: [Boolean, String],
default: true
},
copyTips: {
type: String,
default: '已自动复制网址,请在手机浏览器里粘贴该网址'
},
color: {
type: String,
default: '#999999'
},
fontSize: {
type: [Number, String],
default: 14
}
},
methods: {
openURL() {
// #ifdef APP-PLUS
plus.runtime.openURL(this.href)
// #endif
// #ifdef H5
window.open(this.href)
// #endif
// #ifdef MP
uni.setClipboardData({
data: this.href
});
uni.showModal({
content: this.copyTips,
showCancel: false
});
// #endif
}
}
}
</script>
<style scoped>
.uni-link--withline {
text-decoration: underline;
}
</style>
\ No newline at end of file
... ...