diff --git a/uniapp/.gitignore b/uniapp/.gitignore deleted file mode 100644 index 9fd54aa..0000000 --- a/uniapp/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -package-lock.json - - -.hbuilderx -uniCloud-aliyun - -# plugin -/nativeplugins - - -# testing -/coverage - -# production -/build -/unpackage/cache -/unpackage/debug -/unpackage/dist -/unpackage/resources - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# electron output -/dist - -# db -OpenIM_* - -# plugin -/nativeplugins diff --git a/uniapp/.prettierignore b/uniapp/.prettierignore deleted file mode 100644 index 0fd5134..0000000 --- a/uniapp/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules/ -/nativeplugins/ \ No newline at end of file diff --git a/uniapp/App.vue b/uniapp/App.vue deleted file mode 100644 index bbfc99a..0000000 --- a/uniapp/App.vue +++ /dev/null @@ -1,515 +0,0 @@ - - - \ No newline at end of file diff --git a/uniapp/LICENSE b/uniapp/LICENSE deleted file mode 100644 index 0ad25db..0000000 --- a/uniapp/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/uniapp/Readme.md b/uniapp/Readme.md deleted file mode 100644 index 99dc2ed..0000000 --- a/uniapp/Readme.md +++ /dev/null @@ -1,230 +0,0 @@ -

- - - -

- -# OpenIM Uniapp 💬💻 - -

- OpenIM Docs - • - OpenIM Server - • - open-im-sdk-uniapp - • - openim-sdk-core -

-OpenIM 为开发者提供开源即时通讯 SDK,作为 Twilio、Sendbird 等云服务的替代方案。借助 OpenIM,开发者可以构建安全可靠的即时通讯应用,如 WeChat、Zoom、Slack 等。 - -本仓库基于开源版 OpenIM SDK 开发,提供了一款基于 uniapp 的即时通讯应用。您可以使用此应用程序作为 OpenIM SDK 的参考实现。本项目引用了 `openim-uniapp-polyfill`,可以构建安卓程序和 iOS 程序。 - -

- Preview - - Preview -

- -## 授权许可 :page_facing_up: - -本仓库采用 GNU Affero 通用公共许可证第 3 版 (AGPL-3.0) 进行许可,并受以下附加条款的约束。**不允许用于商业用途**。详情请参阅 [此处](./LICENSE)。 - -## 开发环境 - -在开始开发之前,请确保您的系统已安装以下软件: - -- **HBuilderX**:最新版本 -- **Node.js**:版本 ≥ 16.x([手动安装](https://nodejs.org/dist/latest-v20.x/) 或使用 [nvm](https://github.com/nvm-sh/nvm) 进行版本管理) -- **npm**:版本 ≥ 6.x(随 Node.js 一起安装) -- **Git**:用于代码版本控制 - -同时,您需要确保已经[部署](https://docs.openim.io/zh-Hans/guides/gettingStarted/dockerCompose)了最新版本的 OpenIM Server。接下来,您可以编译项目并连接自己的服务端进行测试。 - -## 运行环境 - -本应用支持以下操作系统版本: - -| 浏览器/操作系统 | 版本 | 状态 | -| --------------- | ----------------- | ---- | -| **iOS** | 13.0 及以上 | ✅ | -| **Android** | 24 及以上 | ✅ | - -### 说明 - -- `只支持` Uniapp 打包成 Android/iOS 应用。并且 SDK 也暂未支持 UniappX (开发中)。 -- 暂时 `不支持` 运行到 Web,如果需要移动端的 Web 项目,参考 [H5 demo](https://github.com/openimsdk/openim-h5-demo)。 -- 暂时 `不支持` 运行到小程序端。 -- 暂时 `不支持` 一对一音视频。如果需要使用,可以运行其他仓库的项目。 - -## 快速开始 - -按照以下步骤设置本地开发环境: - -1. 拉取代码 - - ```bash - git clone https://github.com/openimsdk/open-im-uniapp-demo.git - cd open-im-uniapp-demo - ``` - -2. 安装依赖 - - ```bash - npm install - ``` - -3. 修改配置 - - - `common/config.js` - - > 如果没有修改过服务端默认端口,则只需要修改`BASE_HOST`为您的服务器 ip 即可,如需配置域名和 https 访问,可以参考[nginx 配置](https://docs.openim.io/zh-Hans/guides/gettingStarted/nginxDomainConfig),并采用最下方的配置项,并修改`BASE_DOMAIN`为您的域名。 - - ```javascript - const BASE_HOST = 'your-server-ip' - const CHAT_URL = `http://${BASE_HOST}:10008` - const API_URL = `http://${BASE_HOST}:10002` - const WS_URL = `ws://${BASE_HOST}:10001` - - // const BASE_DOMAIN = 'your-server-domain' - // const CHAT_URL = `http://${BASE_DOMAIN}/chat` - // const API_URL = `http://${BASE_DOMAIN}/api` - // const WS_URL = `ws://${BASE_DOMAIN}/msg_gateway` - ``` - -4. 修改为您自己的 AppID - -- 使用 Hbuilder 打开 manifest.json - - ![](./docs/images/appid.png) - -5. 导入原生插件 - -- 使用 Hbuilder 打开 manifest.json - - ![](./docs/images/plugin.png) - -- 选择云插件需要选择您的项目 Appid 和输入 Android 包名称 - - ![](./docs/images/download.png) - -6. 云打包自定义调试基座 - -- 菜单 -> 运行 -> 运行到手机或模拟器 -> 制作自定义调试基座 (使用自己的包名) - - ![](./docs/images/dev.png) - -7. 在真实的机器或模拟器上运行 ( iOS 仅支持在真机调试 ) - -- 菜单 -> 运行 -> 运行到手机或模拟器 -> 运行到Android App基座 - - ![](./docs/images/run_dev.png) - -8. 开始开发测试! 🎉 - -## 音视频通话 - -一对一音视频通话,多人音视频通话、视频会议请联系邮箱 [contact@openim.io](mailto:contact@openim.io) - -## 构建 🚀 - -### 使用原生App 云打包 - -- 菜单 -> 发行 -> 原生App-云打包 - - ![](./docs/images/build.png) - -## 功能列表 - -### 说明 - -| 功能模块 | 功能项 | 状态 | -| ------------------ | --------------------------------------------------------- | ---- | -| **账号功能** | 手机号注册\邮箱注册\验证码登录 | ✅ | -| | 个人信息查看\修改 | ✅ | -| | 修改密码\忘记密码 | ✅ | -| **好友功能** | 查找\申请\搜索\添加\删除好友 | ✅ | -| | 同意\拒绝好友申请 | ✅ | -| | 好友备注 | ✅ | -| | 是否允许添加好友 | ✅ | -| | 好友列表\好友资料实时同步 | ✅ | -| **黑名单功能** | 限制消息 | ✅ | -| | 黑名单列表实时同步 | ✅ | -| | 添加\移出黑名单 | ✅ | -| **群组功能** | 创建\解散群组 | ✅ | -| | 申请加群\邀请加群\退出群组\移除群成员 | ✅ | -| | 群名/群头像更改/群资料变更通知和实时同步 | ✅ | -| | 群成员邀请进群 | ✅ | -| | 群主转让 | ✅ | -| | 群主、管理员同意进群申请 | ✅ | -| | 搜索群成员 | ✅ | -| **消息功能** | 离线消息 | ✅ | -| | 漫游消息 | ✅ | -| | 多端消息 | ✅ | -| | 历史消息 | ✅ | -| | 消息删除 | ✅ | -| | 消息清空 | ✅ | -| | 消息复制 | ✅ | -| | 单聊正在输入 | ✅ | -| | 新消息勿扰 | ✅ | -| | 清空聊天记录 | ✅ | -| | 新成员查看群聊历史消息 | ✅ | -| | 新消息提示 | ✅ | -| | 文本消息 | ✅ | -| | 图片消息 | ✅ | -| | 视频消息 | ✅ | -| | 表情消息 | ✅ | -| | 文件消息 | ✅ | -| | 语音消息 | ✅ | -| | 名片消息 | ✅ | -| | 地理位置消息 | ✅ | -| | 自定义消息 | ✅ | -| **会话功能** | 置顶会话 | ✅ | -| | 会话已读 | ✅ | -| | 会话免打扰 | ✅ | -| **REST API** | 认证管理 | ✅ | -| | 用户管理 | ✅ | -| | 关系链管理 | ✅ | -| | 群组管理 | ✅ | -| | 会话管理 | ✅ | -| | 消息管理 | ✅ | -| **Webhook** | 群组回调 | ✅ | -| | 消息回调 | ✅ | -| | 推送回调 | ✅ | -| | 关系链回调 | ✅ | -| | 用户回调 | ✅ | -| **容量和性能** | 1 万好友 | ✅ | -| | 10 万人大群 | ✅ | -| | 秒级同步 | ✅ | -| | 集群部署 | ✅ | -| | 互踢策略 | ✅ | -| **在线状态** | 所有平台不互踢 | ✅ | -| | 每个平台各只能登录一个设备 | ✅ | -| | PC 端、移动端、Pad 端、Web 端、小程序端各只能登录一个设备 | ✅ | -| | PC 端不互踢,其他平台总计一个设备 | ✅ | -| **文件类对象存储** | 支持私有化部署 minio | ✅ | -| | 支持 COS、OSS、Kodo、S3 公有云 | ✅ | -| **推送** | 消息在线实时推送 | ✅ | -| | 消息离线推送,支持个推,Firebase | ✅ | - -更多高级功能、音视频通话、视频会议 请联系邮箱 [contact@openim.io](mailto:contact@openim.io) - -## 加入社区 :busts_in_silhouette: - -- 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) -- :eyes: [加入我们的微信群](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg) - -## 常见问题 - -1. 直接运行无法使用? - - 答:必须严格按照文档操作,导入原生插件和制作自定义基座才能运行。 - -2. iOS 制作自定义基座失败? - - 答:插件源码不能经过其他操作系统。只能在 MacOS 环境下载插件、制作自定义基座和云打包。 - -3. 如何使用地图、定位? - 答: [参考文档](CONFIGKEY.md) - -4. 如何使用离线推送? - 答: [参考文档](CONFIGKEY.md) diff --git a/uniapp/api/login.js b/uniapp/api/login.js deleted file mode 100644 index 284acfe..0000000 --- a/uniapp/api/login.js +++ /dev/null @@ -1,79 +0,0 @@ -// 登录 -export const businessLogin = (params) => - uni.$u?.http.post("/account/login", JSON.stringify(params)); -export const businessSendSms = (params) => - uni.$u?.http.post("/account/code/send", JSON.stringify(params)); -export const businessVerifyCode = (params) => - uni.$u?.http.post("/account/code/verify", JSON.stringify(params)); -export const businessRegister = (params) => - uni.$u?.http.post("/account/register", JSON.stringify(params)); -export const businessReset = (params) => - uni.$u?.http.post("/account/password/reset", JSON.stringify(params)); - -export const businessModify = (params) => - uni.$u?.http.post( - "/account/password/change", - JSON.stringify({ - ...params, - }), { - header: { - token: uni.getStorageSync("BusinessToken"), - }, - } - ); - -// 用户信息 -export const businessInfoUpdate = (params) => - uni.$u?.http.post( - "/user/update", - JSON.stringify({ - ...params, - }), { - header: { - token: uni.getStorageSync("BusinessToken"), - }, - } - ); -export const businessGetUserInfo = (userID) => - uni.$u?.http.post( - "/user/find/full", - JSON.stringify({ - userIDs: [userID], - }), { - header: { - token: uni.getStorageSync("BusinessToken"), - }, - } - ); - -export const businessSearchUserInfo = (keyword) => - uni.$u?.http.post( - "/user/search/full", - JSON.stringify({ - keyword, - pagination: { - pageNumber: 1, - showNumber: 10, - }, - }), { - header: { - token: uni.getStorageSync("BusinessToken"), - }, - } - ); - -export const businessSearchUser = (keyword) => - uni.$u?.http.post( - "/friend/search", - JSON.stringify({ - keyword, - pagination: { - pageNumber: 1, - showNumber: 99, - }, - }), { - header: { - token: uni.getStorageSync("BusinessToken"), - }, - } - ); \ No newline at end of file diff --git a/uniapp/common/config.js b/uniapp/common/config.js deleted file mode 100644 index d79970b..0000000 --- a/uniapp/common/config.js +++ /dev/null @@ -1,25 +0,0 @@ -// const BASE_HOST = 'your-server-ip' -// const CHAT_URL = `http://${BASE_HOST}:10008` -// const API_URL = `http://${BASE_HOST}:10002` -// const WS_URL = `ws://${BASE_HOST}:10001` - -const BASE_DOMAIN = '156.238.245.175' -// const CHAT_URL = `https://${BASE_DOMAIN}/chat` -// const API_URL = `https://${BASE_DOMAIN}/api` -// const WS_URL = `wss://${BASE_DOMAIN}/msg_gateway` -const CHAT_URL = `http://${BASE_DOMAIN}:10008` -const API_URL = `http://${BASE_DOMAIN}:10002` -const WS_URL = `ws://${BASE_DOMAIN}:10001` - -const version = 'Uniapp-Demo' - -const getRegisterUrl = () => uni.getStorageSync("IMRegisteUrl") || CHAT_URL; -const getApiUrl = () => uni.getStorageSync("IMApiUrl") || API_URL; -const getWsUrl = () => uni.getStorageSync("IMWsUrl") || WS_URL; - -module.exports = { - version, - getRegisterUrl, - getApiUrl, - getWsUrl, -}; diff --git a/uniapp/common/demo.scss b/uniapp/common/demo.scss deleted file mode 100644 index de89c40..0000000 --- a/uniapp/common/demo.scss +++ /dev/null @@ -1,44 +0,0 @@ -.u-block { - padding: 14px; - &__section { - margin-bottom: 10px; - } - &__title { - margin-top: 10px; - font-size: 15px; - color: $u-content-color; - margin-bottom: 10px; - } - &__flex { - /* #ifndef APP-NVUE */ - display: flex; - /* #endif */ - } -} - -// 使用了cell组件的icon图片样式 -.u-cell-icon { - width: 36rpx; - height: 36rpx; - margin-right: 8rpx; -} - -.u-page { - padding: 15px 15px 40px 15px; -} - -.u-demo-block { - flex: 1; - margin-bottom: 23px; - - &__content { - @include flex(column); - } - - &__title { - font-size: 14px; - color: rgb(143, 156, 162); - margin-bottom: 8px; - @include flex; - } -} diff --git a/uniapp/common/emojis.js b/uniapp/common/emojis.js deleted file mode 100644 index 166e6ce..0000000 --- a/uniapp/common/emojis.js +++ /dev/null @@ -1,34 +0,0 @@ -export const emojis = [ - "😀", - "😃", - "😄", - "😁", - "😆", - "😅", - "🤣", - "😂", - "🙂", - "🙃", - "😉", - "😊", - "😇", - "🥰", - "😍", - "🤩", - "😘", - "😗", - "😚", - "😙", - "😋", - "😛", - "😜", - "🤪", - "😝", - "🤑", - "🤗", - "🤭", - "🤫", - "🤔", -]; - -export default emojis; diff --git a/uniapp/common/mixin.js b/uniapp/common/mixin.js deleted file mode 100644 index 90a2a88..0000000 --- a/uniapp/common/mixin.js +++ /dev/null @@ -1,5 +0,0 @@ -export default { - data() { - return {}; - }, -}; diff --git a/uniapp/common/props.js b/uniapp/common/props.js deleted file mode 100644 index b448ffa..0000000 --- a/uniapp/common/props.js +++ /dev/null @@ -1,2 +0,0 @@ -uni.$u.props.gap.bgColor = "#f3f4f6"; -uni.$u.props.gap.height = "10"; diff --git a/uniapp/components/AreaPicker/areaCode.js b/uniapp/components/AreaPicker/areaCode.js deleted file mode 100644 index 7d24c01..0000000 --- a/uniapp/components/AreaPicker/areaCode.js +++ /dev/null @@ -1,120 +0,0 @@ -export const areaCode = [ - { label: "中国", value: "86" }, - { label: "马来西亚", value: "60" }, - { label: "印度尼西亚", value: "62" }, - { label: "菲律宾", value: "63" }, - { label: "新加坡", value: "65" }, - { label: "泰国", value: "66" }, - { label: "文莱", value: "673" }, - { label: "日本", value: "81" }, - { label: "韩国", value: "82" }, - { label: "越南", value: "84" }, - { label: "朝鲜", value: "850" }, - { label: "香港(中国)", value: "852" }, - { label: "澳门(中国)", value: "853" }, - { label: "柬埔寨", value: "855" }, - { label: "老挝", value: "856" }, - { label: "台湾(中国)", value: "886" }, - { label: "孟加拉国", value: "880" }, - { label: "土耳其", value: "90" }, - { label: "印度", value: "91" }, - { label: "巴基斯坦", value: "92" }, - { label: "阿富汗", value: "93" }, - { label: "斯里兰卡", value: "94" }, - { label: "缅甸", value: "95" }, - { label: "马尔代夫", value: "960" }, - { label: "黎巴嫩", value: "961" }, - { label: "约旦", value: "962" }, - { label: "叙利亚", value: "963" }, - { label: "伊拉克", value: "964" }, - { label: "科威特", value: "965" }, - { label: "沙特阿拉伯", value: "966" }, - { label: "阿曼", value: "968" }, - { label: "以色列", value: "972" }, - { label: "巴林", value: "973" }, - { label: "卡塔尔", value: "974" }, - { label: "不丹", value: "975" }, - { label: "蒙古", value: "976" }, - { label: "尼泊尔", value: "977" }, - { label: "伊朗", value: "98" }, - { label: "塞浦路斯", value: "357" }, - { label: "巴勒斯坦", value: "970" }, - { label: "阿联酋", value: "971" }, - { label: "俄罗斯联邦", value: "7" }, - { label: "希腊", value: "30" }, - { label: "荷兰", value: "31" }, - { label: "比利时", value: "32" }, - { label: "法国", value: "33" }, - { label: "西班牙", value: "34" }, - { label: "直布罗陀", value: "350" }, - { label: "葡萄牙", value: "351" }, - { label: "卢森堡", value: "352" }, - { label: "爱尔兰", value: "353" }, - { label: "冰岛", value: "354" }, - { label: "阿尔巴尼亚", value: "355" }, - { label: "马耳他", value: "356" }, - { label: "安道尔", value: "376" }, - { label: "芬兰", value: "358" }, - { label: "保加利亚", value: "359" }, - { label: "匈牙利", value: "36" }, - { label: "德国", value: "49" }, - { label: "南斯拉夫", value: "381" }, - { label: "意大利", value: "39" }, - { label: "圣马力诺", value: "378" }, - { label: "梵蒂冈", value: "3906698" }, - { label: "罗马尼亚", value: "40" }, - { label: "瑞士", value: "41" }, - { label: "列支敦士登", value: "423" }, - { label: "奥地利", value: "43" }, - { label: "英国", value: "44" }, - { label: "丹麦", value: "45" }, - { label: "瑞典", value: "46" }, - { label: "挪威", value: "47" }, - { label: "波兰", value: "48" }, - { label: "捷克", value: "420" }, - { label: "斯洛伐克", value: "421" }, - { label: "摩纳哥", value: "377" }, - { label: "马其顿", value: "389" }, - { label: "科罗地亚", value: "385" }, - { label: "斯洛文尼亚", value: "386" }, - { label: "波斯尼亚和塞哥维那", value: "387" }, - { label: "亚美尼亚共和国", value: "374" }, - { label: "白俄罗斯共和国", value: "375" }, - { label: "格鲁吉亚共和国", value: "995" }, - { label: "哈萨克斯坦共和国", value: "7" }, - { label: "吉尔吉斯坦共和国", value: "996" }, - { label: "乌兹别克斯坦共和国", value: "998" }, - { label: "塔吉克斯坦共和国", value: "992" }, - { label: "土库曼斯坦共和国", value: "993" }, - { label: "乌克兰", value: "380" }, - { label: "立陶宛", value: "370" }, - { label: "拉脱维亚", value: "371" }, - { label: "爱沙尼亚", value: "372" }, - { label: "摩尔多瓦", value: "373" }, - { label: "埃及", value: "20" }, - { label: "摩洛哥", value: "212" }, - { label: "阿尔及利亚", value: "213" }, - { label: "突尼斯", value: "216" }, - { label: "利比亚", value: "218" }, - { label: "冈比亚", value: "220" }, - { label: "塞内加尔", value: "221" }, - { label: "毛里塔尼亚", value: "222" }, - { label: "马里", value: "223" }, - { label: "几内亚", value: "224" }, - { label: "科特迪瓦", value: "225" }, - { label: "布基拉法索", value: "226" }, - { label: "尼日尔", value: "227" }, - { label: "多哥", value: "228" }, - { label: "贝宁", value: "229" }, - { label: "毛里求斯", value: "230" }, - { label: "利比里亚", value: "231" }, - { label: "塞拉利昂", value: "232" }, - { label: "加纳", value: "233" }, - { label: "尼日利亚", value: "234" }, - { label: "乍得", value: "235" }, - { label: "中非", value: "236" }, - { label: "喀麦隆", value: "237" }, - { label: "佛得角", value: "238" }, - { label: "圣多美", value: "239" }, - { label: "普林西比", value: "239" }, -]; diff --git a/uniapp/components/AreaPicker/index.vue b/uniapp/components/AreaPicker/index.vue deleted file mode 100644 index 436889a..0000000 --- a/uniapp/components/AreaPicker/index.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - diff --git a/uniapp/components/ChooseIndexFooter/SelectedMember.vue b/uniapp/components/ChooseIndexFooter/SelectedMember.vue deleted file mode 100644 index e611770..0000000 --- a/uniapp/components/ChooseIndexFooter/SelectedMember.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - - - diff --git a/uniapp/components/ChooseIndexFooter/index.vue b/uniapp/components/ChooseIndexFooter/index.vue deleted file mode 100644 index 30bdb88..0000000 --- a/uniapp/components/ChooseIndexFooter/index.vue +++ /dev/null @@ -1,143 +0,0 @@ - - - - - diff --git a/uniapp/components/ChooseIndexList/index.vue b/uniapp/components/ChooseIndexList/index.vue deleted file mode 100644 index 0340bbe..0000000 --- a/uniapp/components/ChooseIndexList/index.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - diff --git a/uniapp/components/CustomNavBar/index.vue b/uniapp/components/CustomNavBar/index.vue deleted file mode 100644 index cbbbf65..0000000 --- a/uniapp/components/CustomNavBar/index.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - - diff --git a/uniapp/components/MyAvatar/index.vue b/uniapp/components/MyAvatar/index.vue deleted file mode 100644 index 486a94f..0000000 --- a/uniapp/components/MyAvatar/index.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - - - diff --git a/uniapp/components/SettingItem/index.vue b/uniapp/components/SettingItem/index.vue deleted file mode 100644 index 368c22a..0000000 --- a/uniapp/components/SettingItem/index.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/uniapp/components/UserItem/index.vue b/uniapp/components/UserItem/index.vue deleted file mode 100644 index f671fbe..0000000 --- a/uniapp/components/UserItem/index.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseAudio.vue b/uniapp/components/gaoyia-parse/components/wxParseAudio.vue deleted file mode 100644 index 1d3761f..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseAudio.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseImg.vue b/uniapp/components/gaoyia-parse/components/wxParseImg.vue deleted file mode 100644 index fc99b72..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseImg.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTable.vue b/uniapp/components/gaoyia-parse/components/wxParseTable.vue deleted file mode 100644 index a93f43c..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTable.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate0.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate0.vue deleted file mode 100644 index 489ebf4..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate0.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate1.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate1.vue deleted file mode 100644 index f2178bd..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate1.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate10.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate10.vue deleted file mode 100644 index 18c5357..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate10.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate11.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate11.vue deleted file mode 100644 index aa483ad..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate11.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate2.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate2.vue deleted file mode 100644 index 006ae9e..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate2.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate3.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate3.vue deleted file mode 100644 index c94edfd..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate3.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate4.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate4.vue deleted file mode 100644 index bcc6c12..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate4.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate5.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate5.vue deleted file mode 100644 index 4f8ac48..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate5.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate6.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate6.vue deleted file mode 100644 index 00d26c0..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate6.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate7.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate7.vue deleted file mode 100644 index 826ee18..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate7.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate8.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate8.vue deleted file mode 100644 index ada4813..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate8.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseTemplate9.vue b/uniapp/components/gaoyia-parse/components/wxParseTemplate9.vue deleted file mode 100644 index 55a67f0..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseTemplate9.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/components/wxParseVideo.vue b/uniapp/components/gaoyia-parse/components/wxParseVideo.vue deleted file mode 100644 index badec84..0000000 --- a/uniapp/components/gaoyia-parse/components/wxParseVideo.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/uniapp/components/gaoyia-parse/libs/html2json.js b/uniapp/components/gaoyia-parse/libs/html2json.js deleted file mode 100644 index 7f2277f..0000000 --- a/uniapp/components/gaoyia-parse/libs/html2json.js +++ /dev/null @@ -1,266 +0,0 @@ -/** - * html2Json 改造来自: https://github.com/Jxck/html2json - * - * - * author: Di (微信小程序开发工程师) - * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) - * 垂直微信小程序开发交流社区 - * - * github地址: https://github.com/icindy/wxParse - * - * for: 微信小程序富文本解析 - * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 - */ - -import wxDiscode from "./wxDiscode"; -import HTMLParser from "./htmlparser"; - -function makeMap(str) { - const obj = {}; - const items = str.split(","); - for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; - return obj; -} - -// Block Elements - HTML 5 -const block = makeMap( - "br,code,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,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video", -); - -// Inline Elements - HTML 5 -const inline = makeMap( - "a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,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", -); - -// Elements that you can, intentionally, leave open -// (and which close themselves) -const closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); - -function removeDOCTYPE(html) { - const isDocument = /([^]*)<\/body>/.test(html); - return isDocument ? RegExp.$1 : html; -} - -function trimHtml(html) { - return html - .replace(//gi, "") - .replace(/\/\*.*?\*\//gi, "") - .replace(/[ ]+/gi, "") - .replace(//gi, ""); -} - -function getScreenInfo() { - const screen = {}; - wx.getSystemInfo({ - success: (res) => { - screen.width = res.windowWidth; - screen.height = res.windowHeight; - }, - }); - return screen; -} - -function html2json(html, customHandler, imageProp, host) { - // 处理字符串 - html = removeDOCTYPE(html); - html = trimHtml(html); - html = wxDiscode.strDiscode(html); - // 生成node节点 - const bufArray = []; - const results = { - nodes: [], - imageUrls: [], - }; - - const screen = getScreenInfo(); - function Node(tag) { - this.node = "element"; - this.tag = tag; - - this.$screen = screen; - } - - HTMLParser(html, { - start(tag, attrs, unary) { - // node for this element - const node = new Node(tag); - - if (bufArray.length !== 0) { - const parent = bufArray[0]; - if (parent.nodes === undefined) { - parent.nodes = []; - } - } - - if (block[tag]) { - node.tagType = "block"; - } else if (inline[tag]) { - node.tagType = "inline"; - } else if (closeSelf[tag]) { - node.tagType = "closeSelf"; - } - - node.attr = attrs.reduce((pre, attr) => { - const { name } = attr; - let { value } = attr; - if (name === "class") { - node.classStr = value; - } - // has multi attibutes - // make it array of attribute - if (name === "style") { - node.styleStr = value; - } - if (value.match(/ /)) { - value = value.split(" "); - } - - // if attr already exists - // merge it - if (pre[name]) { - if (Array.isArray(pre[name])) { - // already array, push to last - pre[name].push(value); - } else { - // single value, make it array - pre[name] = [pre[name], value]; - } - } else { - // not exist, put it - pre[name] = value; - } - - return pre; - }, {}); - - // 优化样式相关属性 - if (node.classStr) { - node.classStr += ` ${node.tag}`; - } else { - node.classStr = node.tag; - } - if (node.tagType === "inline") { - node.classStr += " inline"; - } - - // 对img添加额外数据 - if (node.tag === "img") { - let imgUrl = node.attr.src; - imgUrl = wxDiscode.urlToHttpUrl(imgUrl, imageProp.domain); - Object.assign(node.attr, imageProp, { - src: imgUrl || "", - }); - if (imgUrl) { - results.imageUrls.push(imgUrl); - } - } - - // 处理a标签属性 - if (node.tag === "a") { - node.attr.href = node.attr.href || ""; - } - - // 处理font标签样式属性 - if (node.tag === "font") { - const fontSize = [ - "x-small", - "small", - "medium", - "large", - "x-large", - "xx-large", - "-webkit-xxx-large", - ]; - const styleAttrs = { - color: "color", - face: "font-family", - size: "font-size", - }; - if (!node.styleStr) node.styleStr = ""; - Object.keys(styleAttrs).forEach((key) => { - if (node.attr[key]) { - const value = - key === "size" ? fontSize[node.attr[key] - 1] : node.attr[key]; - node.styleStr += `${styleAttrs[key]}: ${value};`; - } - }); - } - - // 临时记录source资源 - if (node.tag === "source") { - results.source = node.attr.src; - } - - if (customHandler.start) { - customHandler.start(node, results); - } - - if (unary) { - // if this tag doesn't have end tag - // like - // add to parents - const parent = bufArray[0] || results; - if (parent.nodes === undefined) { - parent.nodes = []; - } - parent.nodes.push(node); - } else { - bufArray.unshift(node); - } - }, - end(tag) { - // merge into parent tag - const node = bufArray.shift(); - if (node.tag !== tag) { - console.error("invalid state: mismatch end tag"); - } - - // 当有缓存source资源时于于video补上src资源 - if (node.tag === "video" && results.source) { - node.attr.src = results.source; - delete results.source; - } - - if (customHandler.end) { - customHandler.end(node, results); - } - - if (bufArray.length === 0) { - results.nodes.push(node); - } else { - const parent = bufArray[0]; - if (!parent.nodes) { - parent.nodes = []; - } - parent.nodes.push(node); - } - }, - chars(text) { - if (!text.trim()) return; - - const node = { - node: "text", - text, - }; - - if (customHandler.chars) { - customHandler.chars(node, results); - } - - if (bufArray.length === 0) { - results.nodes.push(node); - } else { - const parent = bufArray[0]; - if (parent.nodes === undefined) { - parent.nodes = []; - } - parent.nodes.push(node); - } - }, - }); - - return results; -} - -export default html2json; diff --git a/uniapp/components/gaoyia-parse/libs/htmlparser.js b/uniapp/components/gaoyia-parse/libs/htmlparser.js deleted file mode 100644 index ea67f2d..0000000 --- a/uniapp/components/gaoyia-parse/libs/htmlparser.js +++ /dev/null @@ -1,170 +0,0 @@ -/** - * - * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser - * - * author: Di (微信小程序开发工程师) - * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) - * 垂直微信小程序开发交流社区 - * - * github地址: https://github.com/icindy/wxParse - * - * for: 微信小程序富文本解析 - * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 - */ -// Regular Expressions for parsing tags and attributes - -const startTag = - /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; -const endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; -const attr = - /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; - -function makeMap(str) { - const obj = {}; - const items = str.split(","); - for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; - return obj; -} - -// Empty Elements - HTML 5 -const empty = makeMap( - "area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr", -); - -// Block Elements - HTML 5 -const block = makeMap( - "address,code,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,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video", -); - -// Inline Elements - HTML 5 -const inline = makeMap( - "a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,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", -); - -// Elements that you can, intentionally, leave open -// (and which close themselves) -const closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); - -// Attributes that have their values filled in disabled="disabled" -const fillAttrs = makeMap( - "checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected", -); - -function HTMLParser(html, handler) { - let index; - let chars; - let match; - let last = html; - const stack = []; - - stack.last = () => stack[stack.length - 1]; - - function parseEndTag(tag, tagName) { - // If no tag name is provided, clean shop - let pos; - if (!tagName) { - pos = 0; - } else { - // Find the closest opened tag of the same type - tagName = tagName.toLowerCase(); - for (pos = stack.length - 1; pos >= 0; pos -= 1) { - if (stack[pos] === tagName) break; - } - } - if (pos >= 0) { - // Close all the open elements, up the stack - for (let i = stack.length - 1; i >= pos; i -= 1) { - if (handler.end) handler.end(stack[i]); - } - - // Remove the open elements from the stack - stack.length = pos; - } - } - - function parseStartTag(tag, tagName, rest, unary) { - tagName = tagName.toLowerCase(); - - if (block[tagName]) { - while (stack.last() && inline[stack.last()]) { - parseEndTag("", stack.last()); - } - } - - if (closeSelf[tagName] && stack.last() === tagName) { - parseEndTag("", tagName); - } - - unary = empty[tagName] || !!unary; - - if (!unary) stack.push(tagName); - - if (handler.start) { - const attrs = []; - - rest.replace(attr, function genAttr(matches, name) { - const value = - arguments[2] || - arguments[3] || - arguments[4] || - (fillAttrs[name] ? name : ""); - - attrs.push({ - name, - value, - escaped: value.replace(/(^|[^\\])"/g, '$1\\"'), // " - }); - }); - - if (handler.start) { - handler.start(tagName, attrs, unary); - } - } - } - - while (html) { - chars = true; - - if (html.indexOf(" '); - // str = str.replace(/ | | /g, ' '); - // str = str.replace(/"|"|"/g, "\""); - // str = str.replace(/'|'|'/g, "'"); - // str = str.replace(/´|´|´/g, "´"); - // str = str.replace(/×|×|×/g, "×"); - // str = str.replace(/÷|÷|÷/g, "÷"); - // str = str.replace(/&|&|&/g, '&'); - // str = str.replace(/<|<|</g, '<'); - // str = str.replace(/>|>|>/g, '>'); - - str = str.replace(/ | | /g, " "); - str = str.replace( - / | | /g, - "", - ); - str = str.replace(/ | /g, " "); - str = str.replace( - / | | /g, - "", - ); - str = str.replace(/"|"|"/g, '"'); - str = str.replace(/"|'|'/g, "'"); - str = str.replace(/´|´|´/g, "´"); - str = str.replace(/×|×|×/g, "×"); - str = str.replace(/÷|÷|÷/g, "÷"); - str = str.replace(/&|&|&/g, "&"); - str = str.replace(/<|<|</g, "<"); - str = str.replace(/>|>|>/g, ">"); - return str; -} - -// HTML 支持的其他实体 -function strOtherDiscode(str) { - str = str.replace(/Œ|Œ|Œ/g, "Œ"); - str = str.replace(/œ|œ|œ/g, "œ"); - str = str.replace(/Š|Š|Š/g, "Š"); - str = str.replace(/š|š|š/g, "š"); - str = str.replace(/Ÿ|Ÿ|Ÿ/g, "Ÿ"); - str = str.replace(/ƒ|ƒ|ƒ/g, "ƒ"); - str = str.replace(/ˆ|ˆ|ˆ/g, "ˆ"); - str = str.replace(/˜|˜|˜/g, "˜"); - str = str.replace( - / |$#8201;| /g, - "", - ); - str = str.replace( - /‌|‌|‌/g, - "", - ); - str = str.replace( - /‍|$#8205;|‍/g, - "", - ); - str = str.replace( - /‎|$#8206;|‎/g, - "", - ); - str = str.replace( - /‏|‏|‏/g, - "", - ); - str = str.replace(/–|–|–/g, "–"); - str = str.replace(/—|—|—/g, "—"); - str = str.replace(/‘|‘|‘/g, "‘"); - str = str.replace(/’|’|’/g, "’"); - str = str.replace(/‚|‚|‚/g, "‚"); - str = str.replace(/“|“|“/g, "“"); - str = str.replace(/”|”|”/g, "”"); - str = str.replace(/„|„|„/g, "„"); - str = str.replace(/†|†|†/g, "†"); - str = str.replace(/‡|‡|‡/g, "‡"); - str = str.replace(/•|•|•/g, "•"); - str = str.replace(/…|…|…/g, "…"); - str = str.replace(/‰|‰|‰/g, "‰"); - str = str.replace(/′|′|′/g, "′"); - str = str.replace(/″|″|″/g, "″"); - str = str.replace(/‹|‹|‹/g, "‹"); - str = str.replace(/›|›|›/g, "›"); - str = str.replace(/‾|‾|‾/g, "‾"); - str = str.replace(/€|€|€/g, "€"); - str = str.replace(/™|™|™/g, "™"); - str = str.replace(/←|←|←/g, "←"); - str = str.replace(/↑|↑|↑/g, "↑"); - str = str.replace(/→|→|→/g, "→"); - str = str.replace(/↓|↓|↓/g, "↓"); - str = str.replace(/↔|↔|↔/g, "↔"); - str = str.replace(/↵|↵|↵/g, "↵"); - str = str.replace(/⌈|⌈|⌈/g, "⌈"); - str = str.replace(/⌉|⌉|⌉/g, "⌉"); - str = str.replace(/⌊|⌊|⌊/g, "⌊"); - str = str.replace(/⌋|⌋|⌋/g, "⌋"); - str = str.replace(/◊|◊|◊/g, "◊"); - str = str.replace(/♠|♠|♠/g, "♠"); - str = str.replace(/♣|♣|♣/g, "♣"); - str = str.replace(/♥|♥|♥/g, "♥"); - str = str.replace(/♦|♦|♦/g, "♦"); - return str; -} - -function strDiscode(str) { - str = strNumDiscode(str); - str = strGreeceDiscode(str); - str = strcharacterDiscode(str); - str = strOtherDiscode(str); - return str; -} - -function urlToHttpUrl(url, domain) { - if (/^\/\//.test(url)) { - return `https:${url}`; - } else if (/^\//.test(url)) { - return `https://${domain}${url}`; - } - return url; -} - -export default { - strDiscode, - urlToHttpUrl, -}; diff --git a/uniapp/components/gaoyia-parse/parse.css b/uniapp/components/gaoyia-parse/parse.css deleted file mode 100644 index 9a77757..0000000 --- a/uniapp/components/gaoyia-parse/parse.css +++ /dev/null @@ -1,271 +0,0 @@ -/** - * author: Di (微信小程序开发工程师) - * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) - * 垂直微信小程序开发交流社区 - * - * github地址: https://github.com/icindy/wxParse - * - * for: 微信小程序富文本解析 - * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 - */ -/** - * 请在全局下引入该文件,@import '/static/wxParse.css'; - */ -.wxParse { - user-select: none; - width: 100%; - font-family: Helvetica, "PingFangSC", "Microsoft Yahei", "微软雅黑", Arial, - sans-serif; - color: #0c1c33; - line-height: 1.5; - font-size: 1em; - text-align: justify; /* //左右两端对齐 */ -} -.wxParse view, -.wxParse uni-view { - word-break: break-word; -} -.wxParse .p { - padding-bottom: 0.5em; - clear: both; - /* letter-spacing: 0;//字间距 */ -} -.wxParse .inline { - display: inline; - margin: 0; - padding: 0; -} - -.wxParse .div { - margin: 0; - padding: 0; - display: block; -} - -.wxParse .h1 { - font-size: 2em; - line-height: 1.2em; - margin: 0.67em 0; -} -.wxParse .h2 { - font-size: 1.5em; - margin: 0.83em 0; -} -.wxParse .h3 { - font-size: 1.17em; - margin: 1em 0; -} -.wxParse .h4 { - margin: 1.33em 0; -} -.wxParse .h5 { - font-size: 0.83em; - margin: 1.67em 0; -} -.wxParse .h6 { - font-size: 0.83em; - margin: 1.67em 0; -} - -.wxParse .h1, -.wxParse .h2, -.wxParse .h3, -.wxParse .h4, -.wxParse .h5, -.wxParse .h6, -.wxParse .b, -.wxParse .strong { - font-weight: bolder; -} - -.wxParse .i, -.wxParse .cite, -.wxParse .em, -.wxParse .var, -.wxParse .address { - font-style: italic; -} -.wxParse .spaceshow { - white-space: pre; -} -.wxParse .pre, -.wxParse .tt, -.wxParse .code, -.wxParse .kbd, -.wxParse .samp { - font-family: monospace; -} -.wxParse .pre { - overflow: auto; - background: #f5f5f5; - padding: 16upx; - white-space: pre; - margin: 1em 0upx; - font-size: 24upx; -} -.wxParse .code { - overflow: auto; - padding: 16upx; - white-space: pre; - margin: 1em 0upx; - background: #f5f5f5; - font-size: 24upx; -} - -.wxParse .big { - font-size: 1.17em; -} - -.wxParse .small, -.wxParse .sub, -.wxParse .sup { - font-size: 0.83em; -} - -.wxParse .sub { - vertical-align: sub; -} -.wxParse .sup { - vertical-align: super; -} - -.wxParse .s, -.wxParse .strike, -.wxParse .del { - text-decoration: line-through; -} - -.wxParse .strong, -.wxParse .text, -.wxParse .span, -.wxParse .s { - display: inline; -} - -.wxParse .a { - color: deepskyblue; -} - -.wxParse .video { - text-align: center; - margin: 22upx 0; -} - -.wxParse .video-video { - width: 100%; -} -.wxParse .uni-image { - max-width: 100%; -} -.wxParse .img { - display: block; - max-width: 100%; - margin-bottom: 0em; /* //与p标签底部padding同时修改 */ - overflow: hidden; -} - -.wxParse .blockquote { - margin: 10upx 0; - padding: 22upx 0 22upx 22upx; - font-family: Courier, Calibri, "宋体"; - background: #f5f5f5; - border-left: 6upx solid #dbdbdb; -} -.wxParse .blockquote .p { - margin: 0; -} -.wxParse .ul, -.wxParse .ol { - display: block; - margin: 1em 0; - padding-left: 2em; -} -.wxParse .ol { - list-style-type: disc; -} -.wxParse .ol { - list-style-type: decimal; -} -.wxParse .ol > weixin-parse-template, -.wxParse .ul > weixin-parse-template { - display: list-item; - align-items: baseline; - text-align: match-parent; -} - -.wxParse .ol > .li, -.wxParse .ul > .li { - display: list-item; - align-items: baseline; - text-align: match-parent; -} -.wxParse .ul .ul, -.wxParse .ol .ul { - list-style-type: circle; -} -.wxParse .ol .ol .ul, -.wxParse .ol .ul .ul, -.wxParse .ul .ol .ul, -.wxParse .ul .ul .ul { - list-style-type: square; -} - -.wxParse .u { - text-decoration: underline; -} -.wxParse .hide { - display: none; -} -.wxParse .del { - display: inline; -} -.wxParse .figure { - overflow: hidden; -} -.wxParse .tablebox { - overflow: auto; - background-color: #f5f5f5; - background: #f5f5f5; - font-size: 13px; - padding: 8px; -} -.wxParse .table .table, -.wxParse .table { - border-collapse: collapse; - box-sizing: border-box; - /* 内边框 */ - /* width: 100%; */ - overflow: auto; - white-space: pre; -} -.wxParse .tbody { - border-collapse: collapse; - box-sizing: border-box; - /* 内边框 */ - border: 1px solid #dadada; -} -.wxParse .table .thead, -.wxParse .table .tfoot, -.wxParse .table .th { - border-collapse: collapse; - box-sizing: border-box; - background: #ececec; - font-weight: 40; -} -.wxParse .table .tr { - border-collapse: collapse; - box-sizing: border-box; - /* border: 2px solid #F0AD4E; */ - overflow: auto; -} -.wxParse .table .th, -.wxParse .table .td { - border-collapse: collapse; - box-sizing: border-box; - border: 2upx solid #dadada; - overflow: auto; -} -.wxParse .audio, -.wxParse .uni-audio-default { - display: block; -} diff --git a/uniapp/components/gaoyia-parse/parse.vue b/uniapp/components/gaoyia-parse/parse.vue deleted file mode 100644 index 053131e..0000000 --- a/uniapp/components/gaoyia-parse/parse.vue +++ /dev/null @@ -1,226 +0,0 @@ - - - - - diff --git a/uniapp/constant/comp.js b/uniapp/constant/comp.js deleted file mode 100644 index 4419feb..0000000 --- a/uniapp/constant/comp.js +++ /dev/null @@ -1,42 +0,0 @@ -export const ChatingFooterActionTypes = { - Album: "Album", -}; - -export const ContactMenuTypes = { - NewFriend: "NewFriend", - NewGroup: "NewGroup", - MyFriend: "MyFriend", - MyGroup: "MyGroup", -}; - -export const GroupMemberListTypes = { - Preview: "Preview", - Transfer: "Transfer", - Kickout: "Kickout", -}; - -export const ContactChooseTypes = { - Invite: "Invite", - GetList: "GetList", -}; - -export const UpdateMessageTypes = { - Overall: "Overall", - KeyWords: "KeyWords", -}; - -export const SmsUserFor = { - Register: 1, - Reset: 2, - Login: 3, -}; - -export const CustomMessageStatus = { - Success: "success", - Cancel: "cancel", - Canceled: "canceled", - Refuse: "refuse", - Refused: "refused", - Timeout: "timeout", - AccessByOther: "accessByOther", -}; diff --git a/uniapp/constant/event.js b/uniapp/constant/event.js deleted file mode 100644 index 61efe70..0000000 --- a/uniapp/constant/event.js +++ /dev/null @@ -1,5 +0,0 @@ -export const PageEvents = { - GlobalToast: "GlobalToast", - ScrollToBottom: "ScrollToBottom", - RtcCall: "RtcCall" -}; diff --git a/uniapp/constant/im.js b/uniapp/constant/im.js deleted file mode 100644 index 830d2ba..0000000 --- a/uniapp/constant/im.js +++ /dev/null @@ -1,51 +0,0 @@ -import { MessageType } from "openim-uniapp-polyfill"; - -export const CustomType = { - VideoCall: "c100", - VoiceCall: "c101", - Call: 901, - MassMsg: 903, -}; - -export const Platform = { - 1: 'iOS', - 2: 'Android', - 3: 'PC', - 4: 'PC', - 5: 'Web' -}; - -export const noticeMessageTypes = [ - MessageType.RevokeMessage, - MessageType.FriendAdded, - MessageType.GroupCreated, - MessageType.GroupInfoUpdated, - MessageType.MemberQuit, - MessageType.GroupOwnerTransferred, - MessageType.MemberKicked, - MessageType.MemberInvited, - MessageType.MemberEnter, - MessageType.GroupDismissed, - MessageType.GroupMemberMuted, - MessageType.GroupMuted, - MessageType.GroupCancelMuted, - MessageType.GroupMemberCancelMuted, - MessageType.GroupNameUpdated, - MessageType.BurnMessageChange, -]; - -export const GroupSystemMessageTypes = [ - MessageType.GroupCreated, - MessageType.GroupInfoUpdated, - MessageType.MemberQuit, - MessageType.GroupOwnerTransferred, - MessageType.MemberKicked, - MessageType.MemberInvited, - MessageType.MemberEnter, - MessageType.GroupDismissed, - MessageType.GroupMemberMuted, - MessageType.GroupMuted, - MessageType.GroupCancelMuted, - MessageType.GroupMemberCancelMuted, - MessageType.GroupNameUpdated -]; diff --git a/uniapp/constant/index.js b/uniapp/constant/index.js deleted file mode 100644 index b882f69..0000000 --- a/uniapp/constant/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./im"; -export * from "./comp"; -export * from "./event"; diff --git a/uniapp/docs/images/appid.png b/uniapp/docs/images/appid.png deleted file mode 100644 index be822de..0000000 Binary files a/uniapp/docs/images/appid.png and /dev/null differ diff --git a/uniapp/docs/images/build.png b/uniapp/docs/images/build.png deleted file mode 100644 index 086a2ce..0000000 Binary files a/uniapp/docs/images/build.png and /dev/null differ diff --git a/uniapp/docs/images/dev.png b/uniapp/docs/images/dev.png deleted file mode 100644 index 3a0ab0a..0000000 Binary files a/uniapp/docs/images/dev.png and /dev/null differ diff --git a/uniapp/docs/images/download.png b/uniapp/docs/images/download.png deleted file mode 100644 index 9cf4552..0000000 Binary files a/uniapp/docs/images/download.png and /dev/null differ diff --git a/uniapp/docs/images/logo.jpg b/uniapp/docs/images/logo.jpg deleted file mode 100644 index 0849fde..0000000 Binary files a/uniapp/docs/images/logo.jpg and /dev/null differ diff --git a/uniapp/docs/images/map.png b/uniapp/docs/images/map.png deleted file mode 100644 index 633f2e9..0000000 Binary files a/uniapp/docs/images/map.png and /dev/null differ diff --git a/uniapp/docs/images/plugin.png b/uniapp/docs/images/plugin.png deleted file mode 100644 index c7b95c2..0000000 Binary files a/uniapp/docs/images/plugin.png and /dev/null differ diff --git a/uniapp/docs/images/preview1.png b/uniapp/docs/images/preview1.png deleted file mode 100644 index cd97ccd..0000000 Binary files a/uniapp/docs/images/preview1.png and /dev/null differ diff --git a/uniapp/docs/images/preview2.png b/uniapp/docs/images/preview2.png deleted file mode 100644 index cc8b4d0..0000000 Binary files a/uniapp/docs/images/preview2.png and /dev/null differ diff --git a/uniapp/docs/images/push1.png b/uniapp/docs/images/push1.png deleted file mode 100644 index 0cb10fd..0000000 Binary files a/uniapp/docs/images/push1.png and /dev/null differ diff --git a/uniapp/docs/images/push2.png b/uniapp/docs/images/push2.png deleted file mode 100644 index 379a51c..0000000 Binary files a/uniapp/docs/images/push2.png and /dev/null differ diff --git a/uniapp/docs/images/run_dev.png b/uniapp/docs/images/run_dev.png deleted file mode 100644 index 7b1ac00..0000000 Binary files a/uniapp/docs/images/run_dev.png and /dev/null differ diff --git a/uniapp/index.html b/uniapp/index.html deleted file mode 100644 index 7b32615..0000000 --- a/uniapp/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - -
- - - \ No newline at end of file diff --git a/uniapp/main.js b/uniapp/main.js deleted file mode 100644 index c6cb90b..0000000 --- a/uniapp/main.js +++ /dev/null @@ -1,23 +0,0 @@ -import App from "./App"; -import Vue from "vue"; - -// vuex -import store from "./store"; - -// 引入全局uView -import uView from "@/uni_modules/uview-ui"; -Vue.use(uView); - -Vue.prototype.$store = store; - -Vue.config.productionTip = false; -App.mpType = "app"; -const app = new Vue({ - store, - ...App, -}); - -// 引入请求封装 -require("./util/request/index")(app); - -app.$mount(); \ No newline at end of file diff --git a/uniapp/manifest.json b/uniapp/manifest.json deleted file mode 100644 index 3ee7247..0000000 --- a/uniapp/manifest.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "name" : "IM-UCB", - "appid" : "__UNI__F0A946D", - "description" : "", - "versionName" : "3.3.4", - "versionCode" : 334, - "transformPx" : false, - "app-plus" : { - "bounce" : "none", - "usingComponents" : true, - "nvueStyleCompiler" : "uni-app", - "compilerVersion" : 3, - "splashscreen" : { - "alwaysShowBeforeRender" : false, - "waiting" : true, - "autoclose" : false, - "delay" : 0 - }, - "modules" : { - "VideoPlayer" : {}, - "Camera" : {}, - "Record" : {}, - "Geolocation" : {}, - "Maps" : {} - }, - "distribute" : { - "android" : { - "permissions" : [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ], - "minSdkVersion" : 21 - }, - "ios" : { - "dSYMs" : false, - "privacyDescription" : { - "NSPhotoLibraryUsageDescription" : "请求获取读取相册权限", - "NSPhotoLibraryAddUsageDescription" : "请求获取存入相册权限", - "NSCameraUsageDescription" : "请求获取摄像头权限", - "NSMicrophoneUsageDescription" : "请求获取麦克风权限", - "NSLocationWhenInUseUsageDescription" : "请求获取位置权限", - "NSLocationAlwaysAndWhenInUseUsageDescription" : "请求获取位置权限", - "NSLocationAlwaysUsageDescription" : "请求获取位置权限", - "NSBluetoothAlwaysUsageDescription" : "请求获取蓝牙权限" - } - }, - "sdkConfigs" : { - "ad" : {}, - "geolocation" : {}, - "maps" : {}, - "share" : {}, - "statics" : {}, - "speech" : {} - }, - "splashscreen" : { - "androidStyle" : "default", - "iosStyle" : "common", - "android" : { - "hdpi" : "unpackage/res/cover/480_762.9.png", - "xhdpi" : "unpackage/res/cover/720_1242.9.png", - "xxhdpi" : "unpackage/res/cover/1080_1882.9.png" - } - }, - "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" - } - } - } - }, - "nativePlugins" : { - "Tuoyun-OpenIMSDK" : { - "__plugin_info__" : { - "name" : "OpenIM SDK", - "description" : "OpenIM:由IM技术专家打造的基于 Go 实现的即时通讯(IM)项目,从服务端到客户端SDK开源即时通讯(IM)整体解决方案,可以轻松替代第三方IM云服务,打造具备聊天、社交功能的app。", - "platforms" : "Android,iOS", - "url" : "https://ext.dcloud.net.cn/plugin?id=6577", - "android_package_name" : "", - "ios_bundle_id" : "com.tuoyun.uni", - "isCloud" : true, - "bought" : 1, - "pid" : "6577", - "parameters" : {} - } - } - }, - "uniStatistics" : { - "enable" : false - } - }, - /* 快应用特有相关 */ - "quickapp" : {}, - /* 小程序特有相关 */ - "mp-weixin" : { - "appid" : "", - "setting" : { - "urlCheck" : false - }, - "usingComponents" : true - }, - "mp-alipay" : { - "usingComponents" : true - }, - "mp-baidu" : { - "usingComponents" : true - }, - "mp-toutiao" : { - "usingComponents" : true - }, - "uniStatistics" : { - "enable" : false, - "version" : "2" - }, - "vueVersion" : "2", - "h5" : { - "template" : "", - "sdkConfigs" : { - "maps" : {} - }, - "devServer" : { - "port" : 8080, //端口号 - "disableHostCheck" : true, - "proxy" : { - "/apiv2" : { - "target" : "https://www.pgyer.com/", //目标接口域名 - "changeOrigin" : true, //是否跨域 - "secure" : true // 设置支持https协议的代理 - } - } - } - } -} diff --git a/uniapp/package.json b/uniapp/package.json deleted file mode 100644 index 47b6932..0000000 --- a/uniapp/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "dependencies": { - "date-fns": "^2.30.0", - "dayjs": "^1.11.6", - "image-tools": "^1.4.0", - "md5": "^2.3.0", - "@openim/client-sdk": "^0.0.11-ahpha.1", - "openim-uniapp-polyfill": "^1.4.1", - "uuid": "^9.0.0" - } -} diff --git a/uniapp/pages.json b/uniapp/pages.json deleted file mode 100644 index d51abe9..0000000 --- a/uniapp/pages.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "pages": [ - //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - { - "path": "pages/login/index" - }, - { - "path": "pages/login/registerOrForget/index" - }, - { - "path": "pages/login/setSelfInfo/index" - }, - { - "path": "pages/login/setPassword/index" - }, - { - "path": "pages/login/verifyCode/index" - }, - { - "path": "pages/profile/index/index" - }, - { - "path": "pages/conversation/conversationList/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "disableScroll": true, - "app-plus": { - "bounce": "none" - } - } - }, - { - "path": "pages/contact/index/index", - "style": { - "navigationBarTitleText": "", - "disableScroll": true, - "enablePullDownRefresh": false - } - }, - { - "path": "pages/conversation/chating/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "disableScroll": true, - "app-plus": { - "softinputMode": "adjustResize" - } - } - }, - { - "path": "pages/conversation/singleSettings/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/conversation/groupSettings/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/conversation/groupManage/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/conversation/groupMemberList/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/userCard/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/searchUserOrGroup/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/groupCard/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/userCardMore/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/markOrIDPage/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/detailsFileds/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/contactChoose/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "disableScroll": true - } - }, - { - "path": "pages/common/createGroup/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/contact/contactAdd/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/contact/switchJoinGroup/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/contact/friendList/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/contact/groupList/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/contact/searchUserOrGroup/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/contact/applicationList/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/contact/applicationListDetails/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/contact/applicationDetails/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/profile/selfInfo/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/profile/accountSetting/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/profile/blockList/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/conversation/updateGroupOrNickname/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/sendAddRequest/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/common/webviewWrapper/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/profile/about/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/workbench/index/index", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - } - ], - "tabBar": { - "color": "#8E9AB0", - "selectedColor": "#0089FF", - "borderStyle": "black", - "backgroundColor": "#ffffff", - "height": "55px", - "list": [{ - "pagePath": "pages/conversation/conversationList/index", - "iconPath": "./static/images/tabbar_conversation.png", - "selectedIconPath": "static/images/tabbar_conversation_active.png", - "text": "OpenIM" - }, - { - "pagePath": "pages/contact/index/index", - "iconPath": "./static/images/tabbar_contacts.png", - "selectedIconPath": "static/images/tabbar_contacts_active.png", - "text": "通讯录" - }, - { - "pagePath": "pages/workbench/index/index", - "iconPath": "./static/images/tabbar_workbench.png", - "selectedIconPath": "static/images/tabbar_workbench_active.png", - "text": "发现" - }, - { - "pagePath": "pages/profile/index/index", - "iconPath": "./static/images/tabbar_profile.png", - "selectedIconPath": "static/images/tabbar_profile_active.png", - "text": "我的" - } - ] - }, - "globalStyle": { - "navigationStyle": "custom", - "navigationBarTextStyle": "black", - "app-plus": { - "bounce": "none" - } - } -} \ No newline at end of file diff --git a/uniapp/pages/common/contactChoose/index.vue b/uniapp/pages/common/contactChoose/index.vue deleted file mode 100644 index 2bc6e76..0000000 --- a/uniapp/pages/common/contactChoose/index.vue +++ /dev/null @@ -1,281 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/createGroup/index.vue b/uniapp/pages/common/createGroup/index.vue deleted file mode 100644 index 0a958e3..0000000 --- a/uniapp/pages/common/createGroup/index.vue +++ /dev/null @@ -1,213 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/detailsFileds/index.vue b/uniapp/pages/common/detailsFileds/index.vue deleted file mode 100644 index d10f78c..0000000 --- a/uniapp/pages/common/detailsFileds/index.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/groupCard/index.vue b/uniapp/pages/common/groupCard/index.vue deleted file mode 100644 index 981adc9..0000000 --- a/uniapp/pages/common/groupCard/index.vue +++ /dev/null @@ -1,309 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/markOrIDPage/index.vue b/uniapp/pages/common/markOrIDPage/index.vue deleted file mode 100644 index e55c0d7..0000000 --- a/uniapp/pages/common/markOrIDPage/index.vue +++ /dev/null @@ -1,139 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/searchUserOrGroup/index.vue b/uniapp/pages/common/searchUserOrGroup/index.vue deleted file mode 100644 index 90acd5a..0000000 --- a/uniapp/pages/common/searchUserOrGroup/index.vue +++ /dev/null @@ -1,163 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/common/sendAddRequest/index.vue b/uniapp/pages/common/sendAddRequest/index.vue deleted file mode 100644 index 18d3b17..0000000 --- a/uniapp/pages/common/sendAddRequest/index.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/userCard/components/UserInfoRowItem.vue b/uniapp/pages/common/userCard/components/UserInfoRowItem.vue deleted file mode 100644 index 4fb5bba..0000000 --- a/uniapp/pages/common/userCard/components/UserInfoRowItem.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/userCard/index.vue b/uniapp/pages/common/userCard/index.vue deleted file mode 100644 index 5c6b697..0000000 --- a/uniapp/pages/common/userCard/index.vue +++ /dev/null @@ -1,311 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/common/userCardMore/index.vue b/uniapp/pages/common/userCardMore/index.vue deleted file mode 100644 index cb9184e..0000000 --- a/uniapp/pages/common/userCardMore/index.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/webviewWrapper/index.vue b/uniapp/pages/common/webviewWrapper/index.vue deleted file mode 100644 index f3096da..0000000 --- a/uniapp/pages/common/webviewWrapper/index.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/applicationDetails/index.vue b/uniapp/pages/contact/applicationDetails/index.vue deleted file mode 100644 index ba81ec0..0000000 --- a/uniapp/pages/contact/applicationDetails/index.vue +++ /dev/null @@ -1,256 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/applicationList/ApplicationItem.vue b/uniapp/pages/contact/applicationList/ApplicationItem.vue deleted file mode 100644 index f3bf1e4..0000000 --- a/uniapp/pages/contact/applicationList/ApplicationItem.vue +++ /dev/null @@ -1,246 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/applicationList/index.vue b/uniapp/pages/contact/applicationList/index.vue deleted file mode 100644 index e380d9b..0000000 --- a/uniapp/pages/contact/applicationList/index.vue +++ /dev/null @@ -1,173 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/applicationListDetails/index.vue b/uniapp/pages/contact/applicationListDetails/index.vue deleted file mode 100644 index 2f83e5e..0000000 --- a/uniapp/pages/contact/applicationListDetails/index.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/contactAdd/ActionItem.vue b/uniapp/pages/contact/contactAdd/ActionItem.vue deleted file mode 100644 index 4c5cdb1..0000000 --- a/uniapp/pages/contact/contactAdd/ActionItem.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/contactAdd/index.vue b/uniapp/pages/contact/contactAdd/index.vue deleted file mode 100644 index 1dfc3f8..0000000 --- a/uniapp/pages/contact/contactAdd/index.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/friendList/index.vue b/uniapp/pages/contact/friendList/index.vue deleted file mode 100644 index a04efe8..0000000 --- a/uniapp/pages/contact/friendList/index.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/groupList/GroupItem.vue b/uniapp/pages/contact/groupList/GroupItem.vue deleted file mode 100644 index bf0937b..0000000 --- a/uniapp/pages/contact/groupList/GroupItem.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/groupList/index.vue b/uniapp/pages/contact/groupList/index.vue deleted file mode 100644 index 6446d70..0000000 --- a/uniapp/pages/contact/groupList/index.vue +++ /dev/null @@ -1,157 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/index/components/ContactMenus.vue b/uniapp/pages/contact/index/components/ContactMenus.vue deleted file mode 100644 index 60fb15b..0000000 --- a/uniapp/pages/contact/index/components/ContactMenus.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/index/index.vue b/uniapp/pages/contact/index/index.vue deleted file mode 100644 index bed93ad..0000000 --- a/uniapp/pages/contact/index/index.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/contact/searchUserOrGroup/index.vue b/uniapp/pages/contact/searchUserOrGroup/index.vue deleted file mode 100644 index c25e7b7..0000000 --- a/uniapp/pages/contact/searchUserOrGroup/index.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/uniapp/pages/contact/switchJoinGroup/index.vue b/uniapp/pages/contact/switchJoinGroup/index.vue deleted file mode 100644 index aba142c..0000000 --- a/uniapp/pages/contact/switchJoinGroup/index.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/chating/components/ChatingFooter/ChatingActionBar.vue b/uniapp/pages/conversation/chating/components/ChatingFooter/ChatingActionBar.vue deleted file mode 100644 index 1aad331..0000000 --- a/uniapp/pages/conversation/chating/components/ChatingFooter/ChatingActionBar.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/chating/components/ChatingFooter/CustomEditor.vue b/uniapp/pages/conversation/chating/components/ChatingFooter/CustomEditor.vue deleted file mode 100644 index b631af4..0000000 --- a/uniapp/pages/conversation/chating/components/ChatingFooter/CustomEditor.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/chating/components/ChatingFooter/index.vue b/uniapp/pages/conversation/chating/components/ChatingFooter/index.vue deleted file mode 100644 index a52371d..0000000 --- a/uniapp/pages/conversation/chating/components/ChatingFooter/index.vue +++ /dev/null @@ -1,342 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/chating/components/ChatingHeader.vue b/uniapp/pages/conversation/chating/components/ChatingHeader.vue deleted file mode 100644 index 2b24963..0000000 --- a/uniapp/pages/conversation/chating/components/ChatingHeader.vue +++ /dev/null @@ -1,285 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/chating/components/ChatingList.vue b/uniapp/pages/conversation/chating/components/ChatingList.vue deleted file mode 100644 index 0b197db..0000000 --- a/uniapp/pages/conversation/chating/components/ChatingList.vue +++ /dev/null @@ -1,251 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/chating/components/MessageItem/ErrorMessageRender.vue b/uniapp/pages/conversation/chating/components/MessageItem/ErrorMessageRender.vue deleted file mode 100644 index e9bcd74..0000000 --- a/uniapp/pages/conversation/chating/components/MessageItem/ErrorMessageRender.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/chating/components/MessageItem/MediaMessageRender.vue b/uniapp/pages/conversation/chating/components/MessageItem/MediaMessageRender.vue deleted file mode 100644 index 1e6d638..0000000 --- a/uniapp/pages/conversation/chating/components/MessageItem/MediaMessageRender.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/chating/components/MessageItem/TextMessageRender.vue b/uniapp/pages/conversation/chating/components/MessageItem/TextMessageRender.vue deleted file mode 100644 index 5161350..0000000 --- a/uniapp/pages/conversation/chating/components/MessageItem/TextMessageRender.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/chating/components/MessageItem/index.vue b/uniapp/pages/conversation/chating/components/MessageItem/index.vue deleted file mode 100644 index 524f322..0000000 --- a/uniapp/pages/conversation/chating/components/MessageItem/index.vue +++ /dev/null @@ -1,298 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/chating/index.vue b/uniapp/pages/conversation/chating/index.vue deleted file mode 100644 index 27cf36c..0000000 --- a/uniapp/pages/conversation/chating/index.vue +++ /dev/null @@ -1,148 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/conversationList/components/ChatHeader.vue b/uniapp/pages/conversation/conversationList/components/ChatHeader.vue deleted file mode 100644 index 079e63a..0000000 --- a/uniapp/pages/conversation/conversationList/components/ChatHeader.vue +++ /dev/null @@ -1,329 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/conversationList/components/ConversationItem.vue b/uniapp/pages/conversation/conversationList/components/ConversationItem.vue deleted file mode 100644 index 819bbd0..0000000 --- a/uniapp/pages/conversation/conversationList/components/ConversationItem.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/conversationList/index.vue b/uniapp/pages/conversation/conversationList/index.vue deleted file mode 100644 index 4bc9a21..0000000 --- a/uniapp/pages/conversation/conversationList/index.vue +++ /dev/null @@ -1,118 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/groupManage/index.vue b/uniapp/pages/conversation/groupManage/index.vue deleted file mode 100644 index 342e6cf..0000000 --- a/uniapp/pages/conversation/groupManage/index.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/groupMemberList/components/GroupMemberListHeader.vue b/uniapp/pages/conversation/groupMemberList/components/GroupMemberListHeader.vue deleted file mode 100644 index eb3a291..0000000 --- a/uniapp/pages/conversation/groupMemberList/components/GroupMemberListHeader.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/groupMemberList/index.vue b/uniapp/pages/conversation/groupMemberList/index.vue deleted file mode 100644 index cd1fb38..0000000 --- a/uniapp/pages/conversation/groupMemberList/index.vue +++ /dev/null @@ -1,314 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/groupSettings/components/ActionSheet.vue b/uniapp/pages/conversation/groupSettings/components/ActionSheet.vue deleted file mode 100644 index 1c2301f..0000000 --- a/uniapp/pages/conversation/groupSettings/components/ActionSheet.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/groupSettings/components/GroupMemberRow.vue b/uniapp/pages/conversation/groupSettings/components/GroupMemberRow.vue deleted file mode 100644 index 1e1bd71..0000000 --- a/uniapp/pages/conversation/groupSettings/components/GroupMemberRow.vue +++ /dev/null @@ -1,171 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/groupSettings/index.vue b/uniapp/pages/conversation/groupSettings/index.vue deleted file mode 100644 index 3bdd919..0000000 --- a/uniapp/pages/conversation/groupSettings/index.vue +++ /dev/null @@ -1,361 +0,0 @@ - - - - - diff --git a/uniapp/pages/conversation/singleSettings/index.vue b/uniapp/pages/conversation/singleSettings/index.vue deleted file mode 100644 index 0cd946a..0000000 --- a/uniapp/pages/conversation/singleSettings/index.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/conversation/updateGroupOrNickname/index.vue b/uniapp/pages/conversation/updateGroupOrNickname/index.vue deleted file mode 100644 index 9a800dc..0000000 --- a/uniapp/pages/conversation/updateGroupOrNickname/index.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - - diff --git a/uniapp/pages/login/index.vue b/uniapp/pages/login/index.vue deleted file mode 100644 index e57255c..0000000 --- a/uniapp/pages/login/index.vue +++ /dev/null @@ -1,439 +0,0 @@ - - - - diff --git a/uniapp/pages/login/registerOrForget/index.vue b/uniapp/pages/login/registerOrForget/index.vue deleted file mode 100644 index b6971b3..0000000 --- a/uniapp/pages/login/registerOrForget/index.vue +++ /dev/null @@ -1,127 +0,0 @@ - - - - \ No newline at end of file diff --git a/uniapp/pages/login/setPassword/index.vue b/uniapp/pages/login/setPassword/index.vue deleted file mode 100644 index 888ff21..0000000 --- a/uniapp/pages/login/setPassword/index.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - - diff --git a/uniapp/pages/login/setSelfInfo/index.vue b/uniapp/pages/login/setSelfInfo/index.vue deleted file mode 100644 index 66ebe52..0000000 --- a/uniapp/pages/login/setSelfInfo/index.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - - \ No newline at end of file diff --git a/uniapp/pages/login/verifyCode/index.vue b/uniapp/pages/login/verifyCode/index.vue deleted file mode 100644 index 0c36015..0000000 --- a/uniapp/pages/login/verifyCode/index.vue +++ /dev/null @@ -1,163 +0,0 @@ - - - \ No newline at end of file diff --git a/uniapp/pages/profile/about/index.vue b/uniapp/pages/profile/about/index.vue deleted file mode 100644 index f150c0f..0000000 --- a/uniapp/pages/profile/about/index.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - - - diff --git a/uniapp/pages/profile/accountSetting/index.vue b/uniapp/pages/profile/accountSetting/index.vue deleted file mode 100644 index c15d2cd..0000000 --- a/uniapp/pages/profile/accountSetting/index.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - diff --git a/uniapp/pages/profile/blockList/index.vue b/uniapp/pages/profile/blockList/index.vue deleted file mode 100644 index b6d2e60..0000000 --- a/uniapp/pages/profile/blockList/index.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - - diff --git a/uniapp/pages/profile/index/index.vue b/uniapp/pages/profile/index/index.vue deleted file mode 100644 index 5604be0..0000000 --- a/uniapp/pages/profile/index/index.vue +++ /dev/null @@ -1,230 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/profile/selfInfo/InfoItem.vue b/uniapp/pages/profile/selfInfo/InfoItem.vue deleted file mode 100644 index 575846c..0000000 --- a/uniapp/pages/profile/selfInfo/InfoItem.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/uniapp/pages/profile/selfInfo/index.vue b/uniapp/pages/profile/selfInfo/index.vue deleted file mode 100644 index 474e856..0000000 --- a/uniapp/pages/profile/selfInfo/index.vue +++ /dev/null @@ -1,216 +0,0 @@ - - - - - diff --git a/uniapp/pages/workbench/index/index.vue b/uniapp/pages/workbench/index/index.vue deleted file mode 100644 index 171df21..0000000 --- a/uniapp/pages/workbench/index/index.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - diff --git a/uniapp/static/audio/beCalled.mp3 b/uniapp/static/audio/beCalled.mp3 deleted file mode 100644 index d1b73ef..0000000 Binary files a/uniapp/static/audio/beCalled.mp3 and /dev/null differ diff --git a/uniapp/static/audio/calling.wav b/uniapp/static/audio/calling.wav deleted file mode 100644 index 8eae87f..0000000 Binary files a/uniapp/static/audio/calling.wav and /dev/null differ diff --git a/uniapp/static/audio/newMessage.wav b/uniapp/static/audio/newMessage.wav deleted file mode 100644 index adc45dd..0000000 Binary files a/uniapp/static/audio/newMessage.wav and /dev/null differ diff --git a/uniapp/static/images/about_logo.png b/uniapp/static/images/about_logo.png deleted file mode 100644 index cee7520..0000000 Binary files a/uniapp/static/images/about_logo.png and /dev/null differ diff --git a/uniapp/static/images/announcement_close.png b/uniapp/static/images/announcement_close.png deleted file mode 100644 index ef66084..0000000 Binary files a/uniapp/static/images/announcement_close.png and /dev/null differ diff --git a/uniapp/static/images/block_empty.png b/uniapp/static/images/block_empty.png deleted file mode 100644 index 8bbcef7..0000000 Binary files a/uniapp/static/images/block_empty.png and /dev/null differ diff --git a/uniapp/static/images/chating_action_call.png b/uniapp/static/images/chating_action_call.png deleted file mode 100644 index 8badd5d..0000000 Binary files a/uniapp/static/images/chating_action_call.png and /dev/null differ diff --git a/uniapp/static/images/chating_action_camera.png b/uniapp/static/images/chating_action_camera.png deleted file mode 100644 index b28d19b..0000000 Binary files a/uniapp/static/images/chating_action_camera.png and /dev/null differ diff --git a/uniapp/static/images/chating_action_card.png b/uniapp/static/images/chating_action_card.png deleted file mode 100644 index 03fa760..0000000 Binary files a/uniapp/static/images/chating_action_card.png and /dev/null differ diff --git a/uniapp/static/images/chating_action_file.png b/uniapp/static/images/chating_action_file.png deleted file mode 100644 index 3037985..0000000 Binary files a/uniapp/static/images/chating_action_file.png and /dev/null differ diff --git a/uniapp/static/images/chating_action_image.png b/uniapp/static/images/chating_action_image.png deleted file mode 100644 index 7997005..0000000 Binary files a/uniapp/static/images/chating_action_image.png and /dev/null differ diff --git a/uniapp/static/images/chating_action_location.png b/uniapp/static/images/chating_action_location.png deleted file mode 100644 index ed37908..0000000 Binary files a/uniapp/static/images/chating_action_location.png and /dev/null differ diff --git a/uniapp/static/images/chating_footer_add.png b/uniapp/static/images/chating_footer_add.png deleted file mode 100644 index ead5987..0000000 Binary files a/uniapp/static/images/chating_footer_add.png and /dev/null differ diff --git a/uniapp/static/images/chating_footer_audio.png b/uniapp/static/images/chating_footer_audio.png deleted file mode 100644 index dd36a4a..0000000 Binary files a/uniapp/static/images/chating_footer_audio.png and /dev/null differ diff --git a/uniapp/static/images/chating_footer_audio_recording.png b/uniapp/static/images/chating_footer_audio_recording.png deleted file mode 100644 index 7000508..0000000 Binary files a/uniapp/static/images/chating_footer_audio_recording.png and /dev/null differ diff --git a/uniapp/static/images/chating_footer_emoji.png b/uniapp/static/images/chating_footer_emoji.png deleted file mode 100644 index ea1376a..0000000 Binary files a/uniapp/static/images/chating_footer_emoji.png and /dev/null differ diff --git a/uniapp/static/images/chating_footer_quote_close.png b/uniapp/static/images/chating_footer_quote_close.png deleted file mode 100644 index e6040bd..0000000 Binary files a/uniapp/static/images/chating_footer_quote_close.png and /dev/null differ diff --git a/uniapp/static/images/chating_footer_recording.png b/uniapp/static/images/chating_footer_recording.png deleted file mode 100644 index e9e6809..0000000 Binary files a/uniapp/static/images/chating_footer_recording.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_copy.png b/uniapp/static/images/chating_message_copy.png deleted file mode 100644 index ea48d33..0000000 Binary files a/uniapp/static/images/chating_message_copy.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_del.png b/uniapp/static/images/chating_message_del.png deleted file mode 100644 index b413855..0000000 Binary files a/uniapp/static/images/chating_message_del.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_failed.png b/uniapp/static/images/chating_message_failed.png deleted file mode 100644 index 63da913..0000000 Binary files a/uniapp/static/images/chating_message_failed.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_file.png b/uniapp/static/images/chating_message_file.png deleted file mode 100644 index 0c56327..0000000 Binary files a/uniapp/static/images/chating_message_file.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_forward.png b/uniapp/static/images/chating_message_forward.png deleted file mode 100644 index d628382..0000000 Binary files a/uniapp/static/images/chating_message_forward.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_multiple.png b/uniapp/static/images/chating_message_multiple.png deleted file mode 100644 index 4ae2673..0000000 Binary files a/uniapp/static/images/chating_message_multiple.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_notice.png b/uniapp/static/images/chating_message_notice.png deleted file mode 100644 index c3882ea..0000000 Binary files a/uniapp/static/images/chating_message_notice.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_reply.png b/uniapp/static/images/chating_message_reply.png deleted file mode 100644 index 4cc1877..0000000 Binary files a/uniapp/static/images/chating_message_reply.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_revoke.png b/uniapp/static/images/chating_message_revoke.png deleted file mode 100644 index 709d593..0000000 Binary files a/uniapp/static/images/chating_message_revoke.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_video.png b/uniapp/static/images/chating_message_video.png deleted file mode 100644 index b4a5b11..0000000 Binary files a/uniapp/static/images/chating_message_video.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_video_other.png b/uniapp/static/images/chating_message_video_other.png deleted file mode 100644 index a855b36..0000000 Binary files a/uniapp/static/images/chating_message_video_other.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_video_play.png b/uniapp/static/images/chating_message_video_play.png deleted file mode 100644 index 48bdefe..0000000 Binary files a/uniapp/static/images/chating_message_video_play.png and /dev/null differ diff --git a/uniapp/static/images/chating_message_voice.png b/uniapp/static/images/chating_message_voice.png deleted file mode 100644 index 7a5ce4a..0000000 Binary files a/uniapp/static/images/chating_message_voice.png and /dev/null differ diff --git a/uniapp/static/images/common_add.png b/uniapp/static/images/common_add.png deleted file mode 100644 index 0f717a2..0000000 Binary files a/uniapp/static/images/common_add.png and /dev/null differ diff --git a/uniapp/static/images/common_call.png b/uniapp/static/images/common_call.png deleted file mode 100644 index 8fdf6b6..0000000 Binary files a/uniapp/static/images/common_call.png and /dev/null differ diff --git a/uniapp/static/images/common_circle_add.png b/uniapp/static/images/common_circle_add.png deleted file mode 100644 index ea55c51..0000000 Binary files a/uniapp/static/images/common_circle_add.png and /dev/null differ diff --git a/uniapp/static/images/common_db_arrow.png b/uniapp/static/images/common_db_arrow.png deleted file mode 100644 index 4b957e9..0000000 Binary files a/uniapp/static/images/common_db_arrow.png and /dev/null differ diff --git a/uniapp/static/images/common_left_arrow.png b/uniapp/static/images/common_left_arrow.png deleted file mode 100644 index 146df4f..0000000 Binary files a/uniapp/static/images/common_left_arrow.png and /dev/null differ diff --git a/uniapp/static/images/common_more.png b/uniapp/static/images/common_more.png deleted file mode 100644 index c93dc5f..0000000 Binary files a/uniapp/static/images/common_more.png and /dev/null differ diff --git a/uniapp/static/images/common_right.png b/uniapp/static/images/common_right.png deleted file mode 100644 index c387f8d..0000000 Binary files a/uniapp/static/images/common_right.png and /dev/null differ diff --git a/uniapp/static/images/common_search.png b/uniapp/static/images/common_search.png deleted file mode 100644 index 493f71f..0000000 Binary files a/uniapp/static/images/common_search.png and /dev/null differ diff --git a/uniapp/static/images/contact_add_create_group.png b/uniapp/static/images/contact_add_create_group.png deleted file mode 100644 index deabbd8..0000000 Binary files a/uniapp/static/images/contact_add_create_group.png and /dev/null differ diff --git a/uniapp/static/images/contact_add_join_group.png b/uniapp/static/images/contact_add_join_group.png deleted file mode 100644 index 6cdaca9..0000000 Binary files a/uniapp/static/images/contact_add_join_group.png and /dev/null differ diff --git a/uniapp/static/images/contact_add_join_group_fill.png b/uniapp/static/images/contact_add_join_group_fill.png deleted file mode 100644 index b58f05e..0000000 Binary files a/uniapp/static/images/contact_add_join_group_fill.png and /dev/null differ diff --git a/uniapp/static/images/contact_add_qr_user.png b/uniapp/static/images/contact_add_qr_user.png deleted file mode 100644 index 9564059..0000000 Binary files a/uniapp/static/images/contact_add_qr_user.png and /dev/null differ diff --git a/uniapp/static/images/contact_add_search_user.png b/uniapp/static/images/contact_add_search_user.png deleted file mode 100644 index 799d421..0000000 Binary files a/uniapp/static/images/contact_add_search_user.png and /dev/null differ diff --git a/uniapp/static/images/contact_add_search_user_fill.png b/uniapp/static/images/contact_add_search_user_fill.png deleted file mode 100644 index 59ffdbb..0000000 Binary files a/uniapp/static/images/contact_add_search_user_fill.png and /dev/null differ diff --git a/uniapp/static/images/contact_choose_company.png b/uniapp/static/images/contact_choose_company.png deleted file mode 100644 index 4431861..0000000 Binary files a/uniapp/static/images/contact_choose_company.png and /dev/null differ diff --git a/uniapp/static/images/contact_choose_company_active.png b/uniapp/static/images/contact_choose_company_active.png deleted file mode 100644 index 54de10f..0000000 Binary files a/uniapp/static/images/contact_choose_company_active.png and /dev/null differ diff --git a/uniapp/static/images/contact_choose_friend.png b/uniapp/static/images/contact_choose_friend.png deleted file mode 100644 index 2434020..0000000 Binary files a/uniapp/static/images/contact_choose_friend.png and /dev/null differ diff --git a/uniapp/static/images/contact_choose_friend_active.png b/uniapp/static/images/contact_choose_friend_active.png deleted file mode 100644 index 17cf470..0000000 Binary files a/uniapp/static/images/contact_choose_friend_active.png and /dev/null differ diff --git a/uniapp/static/images/contact_choose_group.png b/uniapp/static/images/contact_choose_group.png deleted file mode 100644 index 808bda5..0000000 Binary files a/uniapp/static/images/contact_choose_group.png and /dev/null differ diff --git a/uniapp/static/images/contact_choose_group_active.png b/uniapp/static/images/contact_choose_group_active.png deleted file mode 100644 index 07ecd1a..0000000 Binary files a/uniapp/static/images/contact_choose_group_active.png and /dev/null differ diff --git a/uniapp/static/images/contact_my_friend.png b/uniapp/static/images/contact_my_friend.png deleted file mode 100644 index 0d98b4f..0000000 Binary files a/uniapp/static/images/contact_my_friend.png and /dev/null differ diff --git a/uniapp/static/images/contact_my_group.png b/uniapp/static/images/contact_my_group.png deleted file mode 100644 index 9f22122..0000000 Binary files a/uniapp/static/images/contact_my_group.png and /dev/null differ diff --git a/uniapp/static/images/contact_my_lable.png b/uniapp/static/images/contact_my_lable.png deleted file mode 100644 index c3a2f17..0000000 Binary files a/uniapp/static/images/contact_my_lable.png and /dev/null differ diff --git a/uniapp/static/images/contact_new_friend.png b/uniapp/static/images/contact_new_friend.png deleted file mode 100644 index d1e85d3..0000000 Binary files a/uniapp/static/images/contact_new_friend.png and /dev/null differ diff --git a/uniapp/static/images/contact_new_group.png b/uniapp/static/images/contact_new_group.png deleted file mode 100644 index dc7cce4..0000000 Binary files a/uniapp/static/images/contact_new_group.png and /dev/null differ diff --git a/uniapp/static/images/conversation_not_accept.png b/uniapp/static/images/conversation_not_accept.png deleted file mode 100644 index cde0d9a..0000000 Binary files a/uniapp/static/images/conversation_not_accept.png and /dev/null differ diff --git a/uniapp/static/images/default_notify_icon.png b/uniapp/static/images/default_notify_icon.png deleted file mode 100644 index 9022c6c..0000000 Binary files a/uniapp/static/images/default_notify_icon.png and /dev/null differ diff --git a/uniapp/static/images/empty_lable.png b/uniapp/static/images/empty_lable.png deleted file mode 100644 index be6db62..0000000 Binary files a/uniapp/static/images/empty_lable.png and /dev/null differ diff --git a/uniapp/static/images/file_icon_zip.png b/uniapp/static/images/file_icon_zip.png deleted file mode 100644 index 293d561..0000000 Binary files a/uniapp/static/images/file_icon_zip.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_download.png b/uniapp/static/images/file_message/file_download.png deleted file mode 100644 index 1984474..0000000 Binary files a/uniapp/static/images/file_message/file_download.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_excel.png b/uniapp/static/images/file_message/file_excel.png deleted file mode 100644 index b82172f..0000000 Binary files a/uniapp/static/images/file_message/file_excel.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_image.png b/uniapp/static/images/file_message/file_image.png deleted file mode 100644 index e27ad3f..0000000 Binary files a/uniapp/static/images/file_message/file_image.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_mask.png b/uniapp/static/images/file_message/file_mask.png deleted file mode 100644 index 583a84c..0000000 Binary files a/uniapp/static/images/file_message/file_mask.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_pdf.png b/uniapp/static/images/file_message/file_pdf.png deleted file mode 100644 index a145053..0000000 Binary files a/uniapp/static/images/file_message/file_pdf.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_ppt.png b/uniapp/static/images/file_message/file_ppt.png deleted file mode 100644 index de0677b..0000000 Binary files a/uniapp/static/images/file_message/file_ppt.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_suspend.png b/uniapp/static/images/file_message/file_suspend.png deleted file mode 100644 index cc746d9..0000000 Binary files a/uniapp/static/images/file_message/file_suspend.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_unknown.png b/uniapp/static/images/file_message/file_unknown.png deleted file mode 100644 index dd07a3b..0000000 Binary files a/uniapp/static/images/file_message/file_unknown.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_word.png b/uniapp/static/images/file_message/file_word.png deleted file mode 100644 index 402ad86..0000000 Binary files a/uniapp/static/images/file_message/file_word.png and /dev/null differ diff --git a/uniapp/static/images/file_message/file_zip.png b/uniapp/static/images/file_message/file_zip.png deleted file mode 100644 index dc00c21..0000000 Binary files a/uniapp/static/images/file_message/file_zip.png and /dev/null differ diff --git a/uniapp/static/images/forbidden_footer.png b/uniapp/static/images/forbidden_footer.png deleted file mode 100644 index cdb3533..0000000 Binary files a/uniapp/static/images/forbidden_footer.png and /dev/null differ diff --git a/uniapp/static/images/global_search_empty.png b/uniapp/static/images/global_search_empty.png deleted file mode 100644 index 95399dc..0000000 Binary files a/uniapp/static/images/global_search_empty.png and /dev/null differ diff --git a/uniapp/static/images/group_calling_arrow.png b/uniapp/static/images/group_calling_arrow.png deleted file mode 100644 index f9795e5..0000000 Binary files a/uniapp/static/images/group_calling_arrow.png and /dev/null differ diff --git a/uniapp/static/images/group_calling_icon.png b/uniapp/static/images/group_calling_icon.png deleted file mode 100644 index ac2bb25..0000000 Binary files a/uniapp/static/images/group_calling_icon.png and /dev/null differ diff --git a/uniapp/static/images/group_edit.png b/uniapp/static/images/group_edit.png deleted file mode 100644 index d33dac4..0000000 Binary files a/uniapp/static/images/group_edit.png and /dev/null differ diff --git a/uniapp/static/images/group_setting_edit.png b/uniapp/static/images/group_setting_edit.png deleted file mode 100644 index d96c1b8..0000000 Binary files a/uniapp/static/images/group_setting_edit.png and /dev/null differ diff --git a/uniapp/static/images/group_setting_invite.png b/uniapp/static/images/group_setting_invite.png deleted file mode 100644 index d05411d..0000000 Binary files a/uniapp/static/images/group_setting_invite.png and /dev/null differ diff --git a/uniapp/static/images/group_setting_qrcode.png b/uniapp/static/images/group_setting_qrcode.png deleted file mode 100644 index f683b7d..0000000 Binary files a/uniapp/static/images/group_setting_qrcode.png and /dev/null differ diff --git a/uniapp/static/images/group_setting_remove.png b/uniapp/static/images/group_setting_remove.png deleted file mode 100644 index a4cf4b2..0000000 Binary files a/uniapp/static/images/group_setting_remove.png and /dev/null differ diff --git a/uniapp/static/images/id_copy.png b/uniapp/static/images/id_copy.png deleted file mode 100644 index dde664b..0000000 Binary files a/uniapp/static/images/id_copy.png and /dev/null differ diff --git a/uniapp/static/images/loading.png b/uniapp/static/images/loading.png deleted file mode 100644 index 3dc4b75..0000000 Binary files a/uniapp/static/images/loading.png and /dev/null differ diff --git a/uniapp/static/images/location.png b/uniapp/static/images/location.png deleted file mode 100644 index c195e0a..0000000 Binary files a/uniapp/static/images/location.png and /dev/null differ diff --git a/uniapp/static/images/logo.png b/uniapp/static/images/logo.png deleted file mode 100644 index b4b1f7b..0000000 Binary files a/uniapp/static/images/logo.png and /dev/null differ diff --git a/uniapp/static/images/more_add_friend.png b/uniapp/static/images/more_add_friend.png deleted file mode 100644 index 90eff9f..0000000 Binary files a/uniapp/static/images/more_add_friend.png and /dev/null differ diff --git a/uniapp/static/images/more_add_group.png b/uniapp/static/images/more_add_group.png deleted file mode 100644 index f05ccfd..0000000 Binary files a/uniapp/static/images/more_add_group.png and /dev/null differ diff --git a/uniapp/static/images/more_create_group.png b/uniapp/static/images/more_create_group.png deleted file mode 100644 index 5377442..0000000 Binary files a/uniapp/static/images/more_create_group.png and /dev/null differ diff --git a/uniapp/static/images/more_qr.png b/uniapp/static/images/more_qr.png deleted file mode 100644 index 2f2c8b3..0000000 Binary files a/uniapp/static/images/more_qr.png and /dev/null differ diff --git a/uniapp/static/images/mutiple_batch.png b/uniapp/static/images/mutiple_batch.png deleted file mode 100644 index 759212a..0000000 Binary files a/uniapp/static/images/mutiple_batch.png and /dev/null differ diff --git a/uniapp/static/images/mutiple_delete.png b/uniapp/static/images/mutiple_delete.png deleted file mode 100644 index a6945af..0000000 Binary files a/uniapp/static/images/mutiple_delete.png and /dev/null differ diff --git a/uniapp/static/images/mutiple_merge.png b/uniapp/static/images/mutiple_merge.png deleted file mode 100644 index d70391e..0000000 Binary files a/uniapp/static/images/mutiple_merge.png and /dev/null differ diff --git a/uniapp/static/images/preview_file_icon.png b/uniapp/static/images/preview_file_icon.png deleted file mode 100644 index 10e5de5..0000000 Binary files a/uniapp/static/images/preview_file_icon.png and /dev/null differ diff --git a/uniapp/static/images/profile_menu_about.png b/uniapp/static/images/profile_menu_about.png deleted file mode 100644 index a0c3daa..0000000 Binary files a/uniapp/static/images/profile_menu_about.png and /dev/null differ diff --git a/uniapp/static/images/profile_menu_account.png b/uniapp/static/images/profile_menu_account.png deleted file mode 100644 index 67eee64..0000000 Binary files a/uniapp/static/images/profile_menu_account.png and /dev/null differ diff --git a/uniapp/static/images/profile_menu_info.png b/uniapp/static/images/profile_menu_info.png deleted file mode 100644 index a34f3c0..0000000 Binary files a/uniapp/static/images/profile_menu_info.png and /dev/null differ diff --git a/uniapp/static/images/profile_menu_logout.png b/uniapp/static/images/profile_menu_logout.png deleted file mode 100644 index 4104338..0000000 Binary files a/uniapp/static/images/profile_menu_logout.png and /dev/null differ diff --git a/uniapp/static/images/profile_menu_notice.png b/uniapp/static/images/profile_menu_notice.png deleted file mode 100644 index 3459aac..0000000 Binary files a/uniapp/static/images/profile_menu_notice.png and /dev/null differ diff --git a/uniapp/static/images/profile_top_bg.png b/uniapp/static/images/profile_top_bg.png deleted file mode 100644 index 75f4476..0000000 Binary files a/uniapp/static/images/profile_top_bg.png and /dev/null differ diff --git a/uniapp/static/images/profile_top_qr.png b/uniapp/static/images/profile_top_qr.png deleted file mode 100644 index b2bea71..0000000 Binary files a/uniapp/static/images/profile_top_qr.png and /dev/null differ diff --git a/uniapp/static/images/recorder_cancel.png b/uniapp/static/images/recorder_cancel.png deleted file mode 100644 index 72803ac..0000000 Binary files a/uniapp/static/images/recorder_cancel.png and /dev/null differ diff --git a/uniapp/static/images/search_empty.png b/uniapp/static/images/search_empty.png deleted file mode 100644 index d716ff3..0000000 Binary files a/uniapp/static/images/search_empty.png and /dev/null differ diff --git a/uniapp/static/images/self_info_qr.png b/uniapp/static/images/self_info_qr.png deleted file mode 100644 index f683b7d..0000000 Binary files a/uniapp/static/images/self_info_qr.png and /dev/null differ diff --git a/uniapp/static/images/self_qr_bg.png b/uniapp/static/images/self_qr_bg.png deleted file mode 100644 index 861f5f2..0000000 Binary files a/uniapp/static/images/self_qr_bg.png and /dev/null differ diff --git a/uniapp/static/images/send_btn.png b/uniapp/static/images/send_btn.png deleted file mode 100644 index e91e293..0000000 Binary files a/uniapp/static/images/send_btn.png and /dev/null differ diff --git a/uniapp/static/images/single_setting_add.png b/uniapp/static/images/single_setting_add.png deleted file mode 100644 index 15481a2..0000000 Binary files a/uniapp/static/images/single_setting_add.png and /dev/null differ diff --git a/uniapp/static/images/single_setting_file.png b/uniapp/static/images/single_setting_file.png deleted file mode 100644 index 6b9682a..0000000 Binary files a/uniapp/static/images/single_setting_file.png and /dev/null differ diff --git a/uniapp/static/images/single_setting_image.png b/uniapp/static/images/single_setting_image.png deleted file mode 100644 index 8a66aa6..0000000 Binary files a/uniapp/static/images/single_setting_image.png and /dev/null differ diff --git a/uniapp/static/images/single_setting_text.png b/uniapp/static/images/single_setting_text.png deleted file mode 100644 index a94f57b..0000000 Binary files a/uniapp/static/images/single_setting_text.png and /dev/null differ diff --git a/uniapp/static/images/single_setting_video.png b/uniapp/static/images/single_setting_video.png deleted file mode 100644 index 8789c21..0000000 Binary files a/uniapp/static/images/single_setting_video.png and /dev/null differ diff --git a/uniapp/static/images/switch_join_id.png b/uniapp/static/images/switch_join_id.png deleted file mode 100644 index 199c27b..0000000 Binary files a/uniapp/static/images/switch_join_id.png and /dev/null differ diff --git a/uniapp/static/images/switch_join_qr.png b/uniapp/static/images/switch_join_qr.png deleted file mode 100644 index a9f3bb1..0000000 Binary files a/uniapp/static/images/switch_join_qr.png and /dev/null differ diff --git a/uniapp/static/images/sync_error.png b/uniapp/static/images/sync_error.png deleted file mode 100644 index 1782d7e..0000000 Binary files a/uniapp/static/images/sync_error.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_contacts.png b/uniapp/static/images/tabbar_contacts.png deleted file mode 100644 index 2db033c..0000000 Binary files a/uniapp/static/images/tabbar_contacts.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_contacts_active.png b/uniapp/static/images/tabbar_contacts_active.png deleted file mode 100644 index 565d55e..0000000 Binary files a/uniapp/static/images/tabbar_contacts_active.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_conversation.png b/uniapp/static/images/tabbar_conversation.png deleted file mode 100644 index a840cf4..0000000 Binary files a/uniapp/static/images/tabbar_conversation.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_conversation_active.png b/uniapp/static/images/tabbar_conversation_active.png deleted file mode 100644 index df20387..0000000 Binary files a/uniapp/static/images/tabbar_conversation_active.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_moments.png b/uniapp/static/images/tabbar_moments.png deleted file mode 100644 index 12dba47..0000000 Binary files a/uniapp/static/images/tabbar_moments.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_moments_active.png b/uniapp/static/images/tabbar_moments_active.png deleted file mode 100644 index 604b74c..0000000 Binary files a/uniapp/static/images/tabbar_moments_active.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_profile.png b/uniapp/static/images/tabbar_profile.png deleted file mode 100644 index 694c226..0000000 Binary files a/uniapp/static/images/tabbar_profile.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_profile_active.png b/uniapp/static/images/tabbar_profile_active.png deleted file mode 100644 index 83606a2..0000000 Binary files a/uniapp/static/images/tabbar_profile_active.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_workbench.png b/uniapp/static/images/tabbar_workbench.png deleted file mode 100644 index 303d47e..0000000 Binary files a/uniapp/static/images/tabbar_workbench.png and /dev/null differ diff --git a/uniapp/static/images/tabbar_workbench_active.png b/uniapp/static/images/tabbar_workbench_active.png deleted file mode 100644 index cbb9225..0000000 Binary files a/uniapp/static/images/tabbar_workbench_active.png and /dev/null differ diff --git a/uniapp/static/images/user_card_add.png b/uniapp/static/images/user_card_add.png deleted file mode 100644 index 6b794d4..0000000 Binary files a/uniapp/static/images/user_card_add.png and /dev/null differ diff --git a/uniapp/static/images/user_card_call.png b/uniapp/static/images/user_card_call.png deleted file mode 100644 index 4cfd3d0..0000000 Binary files a/uniapp/static/images/user_card_call.png and /dev/null differ diff --git a/uniapp/static/images/user_card_message.png b/uniapp/static/images/user_card_message.png deleted file mode 100644 index c269959..0000000 Binary files a/uniapp/static/images/user_card_message.png and /dev/null differ diff --git a/uniapp/static/images/video_preview_close.png b/uniapp/static/images/video_preview_close.png deleted file mode 100644 index 9ac7fc4..0000000 Binary files a/uniapp/static/images/video_preview_close.png and /dev/null differ diff --git a/uniapp/static/images/video_preview_download.png b/uniapp/static/images/video_preview_download.png deleted file mode 100644 index 5b4dae6..0000000 Binary files a/uniapp/static/images/video_preview_download.png and /dev/null differ diff --git a/uniapp/static/images/video_preview_pause.png b/uniapp/static/images/video_preview_pause.png deleted file mode 100644 index 8e64299..0000000 Binary files a/uniapp/static/images/video_preview_pause.png and /dev/null differ diff --git a/uniapp/static/images/video_preview_play.png b/uniapp/static/images/video_preview_play.png deleted file mode 100644 index 3aa7690..0000000 Binary files a/uniapp/static/images/video_preview_play.png and /dev/null differ diff --git a/uniapp/static/logo.png b/uniapp/static/logo.png deleted file mode 100644 index b5771e2..0000000 Binary files a/uniapp/static/logo.png and /dev/null differ diff --git a/uniapp/static/wasm_exec.js b/uniapp/static/wasm_exec.js deleted file mode 100644 index d04267e..0000000 --- a/uniapp/static/wasm_exec.js +++ /dev/null @@ -1,743 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// @ts-nocheck - -(() => { - // Map multiple JavaScript environments to a single common API, - // preferring web standards over Node.js API. - // - // Environments considered: - // - Browsers - // - Node.js - // - Electron - // - Parcel - // - Webpack - - if (typeof global !== "undefined") { - // global already exists - } else if (typeof window !== "undefined") { - window.global = window; - } else if (typeof self !== "undefined") { - self.global = self; - } else { - throw new Error( - "cannot export Go (neither global, window nor self is defined)", - ); - } - - if (!global.require && typeof require !== "undefined") { - global.require = require; - } - - if (!global.fs && global.require) { - const fs = require("fs"); - if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) { - global.fs = fs; - } - } - - const enosys = () => { - const err = new Error("not implemented"); - err.code = "ENOSYS"; - return err; - }; - - if (!global.fs) { - let outputBuf = ""; - global.fs = { - constants: { - O_WRONLY: -1, - O_RDWR: -1, - O_CREAT: -1, - O_TRUNC: -1, - O_APPEND: -1, - O_EXCL: -1, - }, // unused - writeSync(fd, buf) { - outputBuf += decoder.decode(buf); - const nl = outputBuf.lastIndexOf("\n"); - if (nl != -1) { - console.log(outputBuf.substr(0, nl)); - outputBuf = outputBuf.substr(nl + 1); - } - return buf.length; - }, - write(fd, buf, offset, length, position, callback) { - if (offset !== 0 || length !== buf.length || position !== null) { - callback(enosys()); - return; - } - const n = this.writeSync(fd, buf); - callback(null, n); - }, - chmod(path, mode, callback) { - callback(enosys()); - }, - chown(path, uid, gid, callback) { - callback(enosys()); - }, - close(fd, callback) { - callback(enosys()); - }, - fchmod(fd, mode, callback) { - callback(enosys()); - }, - fchown(fd, uid, gid, callback) { - callback(enosys()); - }, - fstat(fd, callback) { - callback(enosys()); - }, - fsync(fd, callback) { - callback(null); - }, - ftruncate(fd, length, callback) { - callback(enosys()); - }, - lchown(path, uid, gid, callback) { - callback(enosys()); - }, - link(path, link, callback) { - callback(enosys()); - }, - lstat(path, callback) { - callback(enosys()); - }, - mkdir(path, perm, callback) { - callback(enosys()); - }, - open(path, flags, mode, callback) { - callback(enosys()); - }, - read(fd, buffer, offset, length, position, callback) { - callback(enosys()); - }, - readdir(path, callback) { - callback(enosys()); - }, - readlink(path, callback) { - callback(enosys()); - }, - rename(from, to, callback) { - callback(enosys()); - }, - rmdir(path, callback) { - callback(enosys()); - }, - stat(path, callback) { - callback(enosys()); - }, - symlink(path, link, callback) { - callback(enosys()); - }, - truncate(path, length, callback) { - callback(enosys()); - }, - unlink(path, callback) { - callback(enosys()); - }, - utimes(path, atime, mtime, callback) { - callback(enosys()); - }, - }; - } - - if (!global.process) { - global.process = { - getuid() { - return -1; - }, - getgid() { - return -1; - }, - geteuid() { - return -1; - }, - getegid() { - return -1; - }, - getgroups() { - throw enosys(); - }, - pid: -1, - ppid: -1, - umask() { - throw enosys(); - }, - cwd() { - throw enosys(); - }, - chdir() { - throw enosys(); - }, - }; - } - - if (!global.crypto && global.require) { - const nodeCrypto = require("crypto"); - global.crypto = { - getRandomValues(b) { - nodeCrypto.randomFillSync(b); - }, - }; - } - if (!global.crypto) { - throw new Error( - "global.crypto is not available, polyfill required (getRandomValues only)", - ); - } - - if (!global.performance) { - global.performance = { - now() { - const [sec, nsec] = process.hrtime(); - return sec * 1000 + nsec / 1000000; - }, - }; - } - - if (!global.TextEncoder && global.require) { - global.TextEncoder = require("util").TextEncoder; - } - if (!global.TextEncoder) { - throw new Error("global.TextEncoder is not available, polyfill required"); - } - - if (!global.TextDecoder && global.require) { - global.TextDecoder = require("util").TextDecoder; - } - if (!global.TextDecoder) { - throw new Error("global.TextDecoder is not available, polyfill required"); - } - - // End of polyfills for common API. - - const encoder = new TextEncoder("utf-8"); - const decoder = new TextDecoder("utf-8"); - - global.Go = class { - constructor() { - this.argv = ["js"]; - this.env = {}; - this.exit = (code) => { - if (code !== 0) { - console.warn("exit code:", code); - } - }; - this._exitPromise = new Promise((resolve) => { - this._resolveExitPromise = resolve; - }); - this._pendingEvent = null; - this._scheduledTimeouts = new Map(); - this._nextCallbackTimeoutID = 1; - - const setInt64 = (addr, v) => { - this.mem.setUint32(addr + 0, v, true); - this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true); - }; - - const getInt64 = (addr) => { - const low = this.mem.getUint32(addr + 0, true); - const high = this.mem.getInt32(addr + 4, true); - return low + high * 4294967296; - }; - - const loadValue = (addr) => { - const f = this.mem.getFloat64(addr, true); - if (f === 0) { - return undefined; - } - if (!isNaN(f)) { - return f; - } - - const id = this.mem.getUint32(addr, true); - return this._values[id]; - }; - - const storeValue = (addr, v) => { - const nanHead = 0x7ff80000; - - if (typeof v === "number" && v !== 0) { - if (isNaN(v)) { - this.mem.setUint32(addr + 4, nanHead, true); - this.mem.setUint32(addr, 0, true); - return; - } - this.mem.setFloat64(addr, v, true); - return; - } - - if (v === undefined) { - this.mem.setFloat64(addr, 0, true); - return; - } - - let id = this._ids.get(v); - if (id === undefined) { - id = this._idPool.pop(); - if (id === undefined) { - id = this._values.length; - } - this._values[id] = v; - this._goRefCounts[id] = 0; - this._ids.set(v, id); - } - this._goRefCounts[id]++; - let typeFlag = 0; - switch (typeof v) { - case "object": - if (v !== null) { - typeFlag = 1; - } - break; - case "string": - typeFlag = 2; - break; - case "symbol": - typeFlag = 3; - break; - case "function": - typeFlag = 4; - break; - } - this.mem.setUint32(addr + 4, nanHead | typeFlag, true); - this.mem.setUint32(addr, id, true); - }; - - const loadSlice = (addr) => { - const array = getInt64(addr + 0); - const len = getInt64(addr + 8); - return new Uint8Array(this._inst.exports.mem.buffer, array, len); - }; - - const loadSliceOfValues = (addr) => { - const array = getInt64(addr + 0); - const len = getInt64(addr + 8); - const a = new Array(len); - for (let i = 0; i < len; i++) { - a[i] = loadValue(array + i * 8); - } - return a; - }; - - const loadString = (addr) => { - const saddr = getInt64(addr + 0); - const len = getInt64(addr + 8); - return decoder.decode( - new DataView(this._inst.exports.mem.buffer, saddr, len), - ); - }; - - const timeOrigin = Date.now() - performance.now(); - this.importObject = { - go: { - // Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters) - // may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported - // function. A goroutine can switch to a new stack if the current stack is too small (see morestack function). - // This changes the SP, thus we have to update the SP used by the imported function. - - // func wasmExit(code int32) - "runtime.wasmExit": (sp) => { - sp >>>= 0; - const code = this.mem.getInt32(sp + 8, true); - this.exited = true; - delete this._inst; - delete this._values; - delete this._goRefCounts; - delete this._ids; - delete this._idPool; - this.exit(code); - }, - - // func wasmWrite(fd uintptr, p unsafe.Pointer, n int32) - "runtime.wasmWrite": (sp) => { - sp >>>= 0; - const fd = getInt64(sp + 8); - const p = getInt64(sp + 16); - const n = this.mem.getInt32(sp + 24, true); - fs.writeSync( - fd, - new Uint8Array(this._inst.exports.mem.buffer, p, n), - ); - }, - - // func resetMemoryDataView() - "runtime.resetMemoryDataView": (sp) => { - sp >>>= 0; - this.mem = new DataView(this._inst.exports.mem.buffer); - }, - - // func nanotime1() int64 - "runtime.nanotime1": (sp) => { - sp >>>= 0; - setInt64(sp + 8, (timeOrigin + performance.now()) * 1000000); - }, - - // func walltime() (sec int64, nsec int32) - "runtime.walltime": (sp) => { - sp >>>= 0; - const msec = new Date().getTime(); - setInt64(sp + 8, msec / 1000); - this.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true); - }, - - // func scheduleTimeoutEvent(delay int64) int32 - "runtime.scheduleTimeoutEvent": (sp) => { - sp >>>= 0; - const id = this._nextCallbackTimeoutID; - this._nextCallbackTimeoutID++; - this._scheduledTimeouts.set( - id, - setTimeout( - () => { - this._resume(); - while (this._scheduledTimeouts.has(id)) { - // for some reason Go failed to register the timeout event, log and try again - // (temporary workaround for https://github.com/golang/go/issues/28975) - console.warn("scheduleTimeoutEvent: missed timeout event"); - this._resume(); - } - }, - getInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early - ), - ); - this.mem.setInt32(sp + 16, id, true); - }, - - // func clearTimeoutEvent(id int32) - "runtime.clearTimeoutEvent": (sp) => { - sp >>>= 0; - const id = this.mem.getInt32(sp + 8, true); - clearTimeout(this._scheduledTimeouts.get(id)); - this._scheduledTimeouts.delete(id); - }, - - // func getRandomData(r []byte) - "runtime.getRandomData": (sp) => { - sp >>>= 0; - crypto.getRandomValues(loadSlice(sp + 8)); - }, - - // func finalizeRef(v ref) - "syscall/js.finalizeRef": (sp) => { - sp >>>= 0; - const id = this.mem.getUint32(sp + 8, true); - this._goRefCounts[id]--; - if (this._goRefCounts[id] === 0) { - const v = this._values[id]; - this._values[id] = null; - this._ids.delete(v); - this._idPool.push(id); - } - }, - - // func stringVal(value string) ref - "syscall/js.stringVal": (sp) => { - sp >>>= 0; - storeValue(sp + 24, loadString(sp + 8)); - }, - - // func valueGet(v ref, p string) ref - "syscall/js.valueGet": (sp) => { - sp >>>= 0; - const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16)); - sp = this._inst.exports.getsp() >>> 0; // see comment above - storeValue(sp + 32, result); - }, - - // func valueSet(v ref, p string, x ref) - "syscall/js.valueSet": (sp) => { - sp >>>= 0; - Reflect.set( - loadValue(sp + 8), - loadString(sp + 16), - loadValue(sp + 32), - ); - }, - - // func valueDelete(v ref, p string) - "syscall/js.valueDelete": (sp) => { - sp >>>= 0; - Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16)); - }, - - // func valueIndex(v ref, i int) ref - "syscall/js.valueIndex": (sp) => { - sp >>>= 0; - storeValue( - sp + 24, - Reflect.get(loadValue(sp + 8), getInt64(sp + 16)), - ); - }, - - // valueSetIndex(v ref, i int, x ref) - "syscall/js.valueSetIndex": (sp) => { - sp >>>= 0; - Reflect.set( - loadValue(sp + 8), - getInt64(sp + 16), - loadValue(sp + 24), - ); - }, - - // func valueCall(v ref, m string, args []ref) (ref, bool) - "syscall/js.valueCall": (sp) => { - sp >>>= 0; - try { - const v = loadValue(sp + 8); - const m = Reflect.get(v, loadString(sp + 16)); - const args = loadSliceOfValues(sp + 32); - const result = Reflect.apply(m, v, args); - sp = this._inst.exports.getsp() >>> 0; // see comment above - storeValue(sp + 56, result); - this.mem.setUint8(sp + 64, 1); - } catch (err) { - sp = this._inst.exports.getsp() >>> 0; // see comment above - storeValue(sp + 56, err); - this.mem.setUint8(sp + 64, 0); - } - }, - - // func valueInvoke(v ref, args []ref) (ref, bool) - "syscall/js.valueInvoke": (sp) => { - sp >>>= 0; - try { - const v = loadValue(sp + 8); - const args = loadSliceOfValues(sp + 16); - const result = Reflect.apply(v, undefined, args); - sp = this._inst.exports.getsp() >>> 0; // see comment above - storeValue(sp + 40, result); - this.mem.setUint8(sp + 48, 1); - } catch (err) { - sp = this._inst.exports.getsp() >>> 0; // see comment above - storeValue(sp + 40, err); - this.mem.setUint8(sp + 48, 0); - } - }, - - // func valueNew(v ref, args []ref) (ref, bool) - "syscall/js.valueNew": (sp) => { - sp >>>= 0; - try { - const v = loadValue(sp + 8); - const args = loadSliceOfValues(sp + 16); - const result = Reflect.construct(v, args); - sp = this._inst.exports.getsp() >>> 0; // see comment above - storeValue(sp + 40, result); - this.mem.setUint8(sp + 48, 1); - } catch (err) { - sp = this._inst.exports.getsp() >>> 0; // see comment above - storeValue(sp + 40, err); - this.mem.setUint8(sp + 48, 0); - } - }, - - // func valueLength(v ref) int - "syscall/js.valueLength": (sp) => { - sp >>>= 0; - setInt64(sp + 16, parseInt(loadValue(sp + 8).length)); - }, - - // valuePrepareString(v ref) (ref, int) - "syscall/js.valuePrepareString": (sp) => { - sp >>>= 0; - const str = encoder.encode(String(loadValue(sp + 8))); - storeValue(sp + 16, str); - setInt64(sp + 24, str.length); - }, - - // valueLoadString(v ref, b []byte) - "syscall/js.valueLoadString": (sp) => { - sp >>>= 0; - const str = loadValue(sp + 8); - loadSlice(sp + 16).set(str); - }, - - // func valueInstanceOf(v ref, t ref) bool - "syscall/js.valueInstanceOf": (sp) => { - sp >>>= 0; - this.mem.setUint8( - sp + 24, - loadValue(sp + 8) instanceof loadValue(sp + 16) ? 1 : 0, - ); - }, - - // func copyBytesToGo(dst []byte, src ref) (int, bool) - "syscall/js.copyBytesToGo": (sp) => { - sp >>>= 0; - const dst = loadSlice(sp + 8); - const src = loadValue(sp + 32); - if ( - !(src instanceof Uint8Array || src instanceof Uint8ClampedArray) - ) { - this.mem.setUint8(sp + 48, 0); - return; - } - const toCopy = src.subarray(0, dst.length); - dst.set(toCopy); - setInt64(sp + 40, toCopy.length); - this.mem.setUint8(sp + 48, 1); - }, - - // func copyBytesToJS(dst ref, src []byte) (int, bool) - "syscall/js.copyBytesToJS": (sp) => { - sp >>>= 0; - const dst = loadValue(sp + 8); - const src = loadSlice(sp + 16); - if ( - !(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray) - ) { - this.mem.setUint8(sp + 48, 0); - return; - } - const toCopy = src.subarray(0, dst.length); - dst.set(toCopy); - setInt64(sp + 40, toCopy.length); - this.mem.setUint8(sp + 48, 1); - }, - - debug: (value) => { - console.log(value); - }, - }, - }; - } - - async run(instance) { - if (!(instance instanceof WebAssembly.Instance)) { - throw new Error("Go.run: WebAssembly.Instance expected"); - } - this._inst = instance; - this.mem = new DataView(this._inst.exports.mem.buffer); - this._values = [ - // JS values that Go currently has references to, indexed by reference id - NaN, - 0, - null, - true, - false, - global, - this, - ]; - this._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id - this._ids = new Map([ - // mapping from JS values to reference ids - [0, 1], - [null, 2], - [true, 3], - [false, 4], - [global, 5], - [this, 6], - ]); - this._idPool = []; // unused ids that have been garbage collected - this.exited = false; // whether the Go program has exited - - // Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory. - let offset = 4096; - - const strPtr = (str) => { - const ptr = offset; - const bytes = encoder.encode(str + "\0"); - new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes); - offset += bytes.length; - if (offset % 8 !== 0) { - offset += 8 - (offset % 8); - } - return ptr; - }; - - const argc = this.argv.length; - - const argvPtrs = []; - this.argv.forEach((arg) => { - argvPtrs.push(strPtr(arg)); - }); - argvPtrs.push(0); - - const keys = Object.keys(this.env).sort(); - keys.forEach((key) => { - argvPtrs.push(strPtr(`${key}=${this.env[key]}`)); - }); - argvPtrs.push(0); - - const argv = offset; - argvPtrs.forEach((ptr) => { - this.mem.setUint32(offset, ptr, true); - this.mem.setUint32(offset + 4, 0, true); - offset += 8; - }); - - // The linker guarantees global data starts from at least wasmMinDataAddr. - // Keep in sync with cmd/link/internal/ld/data.go:wasmMinDataAddr. - const wasmMinDataAddr = 4096 + 8192; - if (offset >= wasmMinDataAddr) { - throw new Error( - "total length of command line and environment variables exceeds limit", - ); - } - - this._inst.exports.run(argc, argv); - if (this.exited) { - this._resolveExitPromise(); - } - await this._exitPromise; - } - - _resume() { - if (this.exited) { - throw new Error("Go program has already exited"); - } - this._inst.exports.resume(); - if (this.exited) { - this._resolveExitPromise(); - } - } - - _makeFuncWrapper(id) { - const go = this; - return function () { - const event = { id: id, this: this, args: arguments }; - go._pendingEvent = event; - go._resume(); - return event.result; - }; - } - }; - - if ( - typeof module !== "undefined" && - global.require && - global.require.main === module && - global.process && - global.process.versions && - !global.process.versions.electron - ) { - if (process.argv.length < 3) { - console.error("usage: go_js_wasm_exec [wasm binary] [arguments]"); - process.exit(1); - } - - const go = new Go(); - go.argv = process.argv.slice(2); - go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env); - go.exit = process.exit; - WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject) - .then((result) => { - process.on("exit", (code) => { - // Node.js exits if no event handler is pending - if (code === 0 && !go.exited) { - // deadlock, make Go print error and stack traces - go._pendingEvent = { id: 0 }; - go._resume(); - } - }); - return go.run(result.instance); - }) - .catch((err) => { - console.error(err); - process.exit(1); - }); - } -})(); diff --git a/uniapp/store/getters.js b/uniapp/store/getters.js deleted file mode 100644 index df90596..0000000 --- a/uniapp/store/getters.js +++ /dev/null @@ -1,22 +0,0 @@ -export default { - storeConversationList: (state) => state.conversation.conversationList, - storeCurrentConversation: (state) => state.conversation.currentConversation, - storeUnReadCount: (state) => state.conversation.unReadCount, - storeCurrentGroup: (state) => state.conversation.currentGroup, - storeCurrentMemberInGroup: (state) => state.conversation.currentMemberInGroup, - storeFriendList: (state) => state.contact.friendList, - storeBlackList: (state) => state.contact.blackList, - storeGroupList: (state) => state.contact.groupList, - storeRecvFriendApplications: (state) => state.contact.recvFriendApplications, - storeSentFriendApplications: (state) => state.contact.sentFriendApplications, - storeRecvGroupApplications: (state) => state.contact.recvGroupApplications, - storeSentGroupApplications: (state) => state.contact.sentGroupApplications, - storeHistoryMessageList: (state) => state.message.historyMessageList, - storeHasMoreMessage: (state) => state.message.hasMoreMessage, - storeSelfInfo: (state) => state.user.selfInfo, - storeCurrentUserID: (state) => state.user.selfInfo.userID, - storeIsSyncing: (state) => state.user.isSyncing, - storeReinstall: (state) => state.user.reinstall, - storeProgress: (state) => state.user.progress, - storeAuthData: (state) => state.user.authData, -}; diff --git a/uniapp/store/index.js b/uniapp/store/index.js deleted file mode 100644 index b87355c..0000000 --- a/uniapp/store/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import Vue from "vue"; -import Vuex from "vuex"; -import user from "./modules/user"; -import contact from "./modules/contact"; -import conversation from "./modules/conversation"; -import message from "./modules/message"; -import getters from "./getters"; - -Vue.use(Vuex); - -const store = new Vuex.Store({ - modules: { - user, - contact, - conversation, - message, - }, - getters, -}); - -export default store; diff --git a/uniapp/store/modules/contact.js b/uniapp/store/modules/contact.js deleted file mode 100644 index 779a3e9..0000000 --- a/uniapp/store/modules/contact.js +++ /dev/null @@ -1,320 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import IMSDK from "openim-uniapp-polyfill"; - -const state = { - friendList: [], - blackList: [], - groupList: [], - recvFriendApplications: [], - sentFriendApplications: [], - recvGroupApplications: [], - sentGroupApplications: [], - unHandleFriendApplicationNum: 0, - unHandleGroupApplicationNum: 0, -}; - -const mutations = { - SET_FRIEND_LIST(state, list) { - state.friendList = [...list]; - }, - SET_BLACK_LIST(state, list) { - state.blackList = [...list]; - }, - SET_GROUP_LIST(state, list) { - state.groupList = [...list]; - }, - SET_RECV_FRIEND_APPLICATIONS(state, list) { - state.recvFriendApplications = [...list]; - }, - SET_SENT_FRIEND_APPLICATIONS(state, list) { - state.sentFriendApplications = [...list]; - }, - SET_RECV_GROUP_APPLICATIONS(state, list) { - state.recvGroupApplications = [...list]; - }, - SET_SENT_GROUP_APPLICATIONS(state, list) { - state.sentGroupApplications = [...list]; - }, -}; - -const actions = { - async getFriendList({ commit }) { - let offset = 0; - let friendInfoList = []; - let initialFetch = true; - while (true) { - try { - const count = initialFetch ? 10000 : 1000; - const { data } = await IMSDK.asyncApi("getFriendListPage", uuidv4(), { - offset, - count, - }); - friendInfoList = [ - ...friendInfoList, - ...data, - ]; - offset += count; - if (data.length < count) break; - initialFetch = false; - } catch (error) { - console.error("getFriendListPage error"); - } - } - commit("SET_FRIEND_LIST", friendInfoList); - }, - async getGrouplist({ commit }) { - let offset = 0; - let groupList = []; - while (true) { - try { - const { data } = await IMSDK.asyncApi( - "getJoinedGroupListPage", - uuidv4(), - { - offset, - count: 1000, - } - ); - groupList = [...groupList, ...data]; - offset += 1000; - if (data.length < 1000) break; - } catch (error) { - console.error("getGrouplist error"); - } - } - commit("SET_GROUP_LIST", groupList); - }, - getBlacklist({ commit }) { - IMSDK.asyncApi(IMSDK.IMMethods.GetBlackList, uuidv4()).then(({ data }) => { - commit("SET_BLACK_LIST", data); - }); - }, - getRecvFriendApplications({ commit }) { - IMSDK.asyncApi( - IMSDK.IMMethods.GetFriendApplicationListAsRecipient, - uuidv4(), - ).then(({ data }) => { - commit("SET_RECV_FRIEND_APPLICATIONS", data); - }); - }, - getSentFriendApplications({ commit }) { - IMSDK.asyncApi( - IMSDK.IMMethods.GetFriendApplicationListAsApplicant, - uuidv4(), - ).then(({ data }) => { - commit("SET_SENT_FRIEND_APPLICATIONS", data); - }); - }, - getRecvGroupApplications({ commit }) { - IMSDK.asyncApi( - IMSDK.IMMethods.GetGroupApplicationListAsRecipient, - uuidv4(), - ).then(({ data }) => { - commit("SET_RECV_GROUP_APPLICATIONS", data); - }); - }, - getSentGroupApplications({ commit }) { - IMSDK.asyncApi( - IMSDK.IMMethods.GetGroupApplicationListAsApplicant, - uuidv4(), - ).then(({ data }) => { - commit("SET_SENT_GROUP_APPLICATIONS", data); - }); - }, - pushNewFriend({ commit, state }, friendInfo) { - const tmpList = [...state.friendList]; - const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID); - if (idx === -1) { - commit("SET_FRIEND_LIST", [...tmpList, friendInfo]); - } - }, - updateFriendInfo({ commit, state }, { friendInfo, isRemove = false }) { - const tmpList = [...state.friendList]; - const idx = tmpList.findIndex((item) => item.userID === friendInfo.userID); - - if (idx !== -1) { - if (isRemove) { - tmpList.splice(idx, 1); - } else { - tmpList[idx] = { - ...friendInfo, - }; - } - commit("SET_FRIEND_LIST", tmpList); - } - }, - pushNewBlack({ commit, state }, blackInfo) { - const tmpList = [...state.blackList]; - const idx = tmpList.findIndex((item) => item.userID === blackInfo.userID); - if (idx === -1) { - commit("SET_BLACK_LIST", [...tmpList, blackInfo]); - } - }, - updateBlackInfo({ commit, state }, { blackInfo, isRemove = false }) { - const tmpList = [...state.blackList]; - const idx = tmpList.findIndex((item) => item.userID === blackInfo.userID); - - if (idx !== -1) { - if (isRemove) { - tmpList.splice(idx, 1); - } else { - tmpList[idx] = { - ...blackInfo, - }; - } - commit("SET_BLACK_LIST", tmpList); - } - }, - pushNewGroup({ commit, state }, groupInfo) { - const tmpList = [...state.groupList]; - const idx = tmpList.findIndex((item) => item.groupID === groupInfo.groupID); - if (idx === -1) { - commit("SET_GROUP_LIST", [...tmpList, groupInfo]); - } - }, - updateGroupInfo( - { commit, state, rootState }, - { groupInfo, isRemove = false }, - ) { - const tmpList = [...state.groupList]; - const idx = tmpList.findIndex((item) => item.groupID === groupInfo.groupID); - - if (rootState.conversation.currentGroup.groupID === groupInfo.groupID) { - commit("conversation/SET_CURRENT_GROUP", groupInfo, { root: true }); - } - - if (idx !== -1) { - if (isRemove) { - tmpList.splice(idx, 1); - } else { - tmpList[idx] = { - ...groupInfo, - }; - } - commit("SET_GROUP_LIST", tmpList); - } - }, - pushNewRecvFriendApplition({ commit, state }, application) { - const tmpList = [...state.recvFriendApplications]; - const idx = tmpList.findIndex( - (item) => item.fromUserID === application.fromUserID, - ); - if (idx !== -1) { - tmpList.splice(idx, 1); - } - commit("SET_RECV_FRIEND_APPLICATIONS", [...tmpList, application]); - }, - updateRecvFriendApplition( - { commit, state, rootState }, - { application, isRemove = false }, - ) { - const tmpList = [...state.recvFriendApplications]; - const idx = tmpList.findIndex( - (item) => item.fromUserID === application.fromUserID, - ); - - if (idx !== -1) { - if (isRemove) { - tmpList.splice(idx, 1); - } else { - tmpList[idx] = { - ...application, - }; - } - commit("SET_RECV_FRIEND_APPLICATIONS", tmpList); - } - }, - pushNewSentFriendApplition({ commit, state }, application) { - const tmpList = [...state.sentFriendApplications]; - const idx = tmpList.findIndex( - (item) => item.toUserID === application.toUserID, - ); - if (idx !== -1) { - tmpList.splice(idx, 1); - } - commit("SET_SENT_FRIEND_APPLICATIONS", [...tmpList, application]); - }, - updateSentFriendApplition( - { commit, state, rootState }, - { application, isRemove = false }, - ) { - const tmpList = [...state.sentFriendApplications]; - const idx = tmpList.findIndex( - (item) => item.toUserID === application.toUserID, - ); - - if (idx !== -1) { - if (isRemove) { - tmpList.splice(idx, 1); - } else { - tmpList[idx] = { - ...application, - }; - } - commit("SET_SENT_FRIEND_APPLICATIONS", tmpList); - } - }, - pushNewRecvGroupApplition({ commit, state }, application) { - const tmpList = [...state.recvGroupApplications]; - const idx = tmpList.findIndex((item) => item.userID === application.userID); - if (idx !== -1) { - tmpList.splice(idx, 1); - } - commit("SET_RECV_GROUP_APPLICATIONS", [...tmpList, application]); - }, - updateRecvGroupApplition( - { commit, state, rootState }, - { application, isRemove = false }, - ) { - const tmpList = [...state.recvGroupApplications]; - const idx = tmpList.findIndex((item) => item.userID === application.userID); - - if (idx !== -1) { - if (isRemove) { - tmpList.splice(idx, 1); - } else { - tmpList[idx] = { - ...application, - }; - } - commit("SET_RECV_GROUP_APPLICATIONS", tmpList); - } - }, - pushNewSentGroupApplition({ commit, state }, application) { - const tmpList = [...state.sentGroupApplications]; - const idx = tmpList.findIndex( - (item) => item.groupID === application.groupID, - ); - if (idx !== -1) { - tmpList.splice(idx, 1); - } - commit("SET_SENT_GROUP_APPLICATIONS", [...tmpList, application]); - }, - updateSentGroupApplition( - { commit, state, rootState }, - { application, isRemove = false }, - ) { - const tmpList = [...state.sentGroupApplications]; - const idx = tmpList.findIndex( - (item) => item.groupID === application.groupID, - ); - - if (idx !== -1) { - if (isRemove) { - tmpList.splice(idx, 1); - } else { - tmpList[idx] = { - ...application, - }; - } - commit("SET_SENT_GROUP_APPLICATIONS", tmpList); - } - }, -}; - -export default { - namespaced: true, - state, - mutations, - actions, -}; diff --git a/uniapp/store/modules/conversation.js b/uniapp/store/modules/conversation.js deleted file mode 100644 index a12dbee..0000000 --- a/uniapp/store/modules/conversation.js +++ /dev/null @@ -1,119 +0,0 @@ -import { - v4 as uuidv4 -} from "uuid"; -import IMSDK from "openim-uniapp-polyfill"; - -const state = { - conversationList: [], - currentConversation: {}, - unReadCount: 0, - currentGroup: {}, - currentMemberInGroup: {}, -}; - -const mutations = { - SET_CONVERSATION_LIST(state, list) { - state.conversationList = [...list]; - }, - SET_CURRENT_CONVERSATION(state, conversation) { - state.currentConversation = { - ...conversation, - }; - }, - SET_UNREAD_COUNT(state, count) { - if (count) { - uni.setTabBarBadge({ - index: 0, - text: count < 99 ? count + "" : "99+", - }); - } else { - uni.removeTabBarBadge({ - index: 0, - }); - } - state.unReadCount = count; - }, - SET_CURRENT_GROUP(state, group) { - state.currentGroup = { - ...group, - }; - }, - SET_CURRENT_MEMBER_IN_GROUP(state, member) { - state.currentMemberInGroup = { - ...member, - }; - }, -}; - -const actions = { - async getConversationList({ state, commit }, isFirstPage = true) { - try { - const { - data - } = await IMSDK.asyncApi( - IMSDK.IMMethods.GetConversationListSplit, - uuidv4(), { - offset: isFirstPage ? 0 : state.conversationList.length, - count: 500, - }, - ); - commit("SET_CONVERSATION_LIST", [ - ...(isFirstPage ? [] : state.conversationList), - ...data, - ]); - return [...data]; - } catch (e) { - console.log(e); - commit("SET_CONVERSATION_LIST", []); - return []; - } - }, - getCurrentGroup({ commit }, groupID) { - IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupsInfo, uuidv4(), [ - groupID, - ]).then(({ - data - }) => { - commit("SET_CURRENT_GROUP", data[0] ?? {}); - }); - }, - getCurrentMemberInGroup({ commit, rootState }, groupID) { - IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupMembersInfo, uuidv4(), { - groupID, - userIDList: [rootState.user.selfInfo.userID], - }).then(({ - data - }) => { - commit("SET_CURRENT_MEMBER_IN_GROUP", data[0] ?? {}); - }); - }, - getUnReadCount({ commit }) { - IMSDK.asyncApi(IMSDK.IMMethods.GetTotalUnreadMsgCount, uuidv4()).then( - (res) => { - console.log(res); - commit("SET_UNREAD_COUNT", res.data); - }, - ); - }, - updateCurrentMemberInGroup({ commit, state }, memberInfo) { - console.log(memberInfo); - if ( - memberInfo.groupID === state.currentMemberInGroup.groupID && - memberInfo.userID === state.currentMemberInGroup.userID - ) { - commit("SET_CURRENT_MEMBER_IN_GROUP", memberInfo); - } - }, - resetConversationState({ commit }) { - commit("SET_CURRENT_MEMBER_IN_GROUP", {}); - commit("SET_CURRENT_GROUP", {}); - commit("SET_CURRENT_CONVERSATION", {}); - }, -}; - -export default { - namespaced: true, - state, - mutations, - actions, -}; \ No newline at end of file diff --git a/uniapp/store/modules/message.js b/uniapp/store/modules/message.js deleted file mode 100644 index 3b064ef..0000000 --- a/uniapp/store/modules/message.js +++ /dev/null @@ -1,87 +0,0 @@ -import IMSDK, { MessageStatus, MessageType } from "openim-uniapp-polyfill"; -import { v4 as uuidv4 } from "uuid"; -import { UpdateMessageTypes } from "@/constant"; - -const state = { - historyMessageList: [], - hasMoreMessage: true, -}; - -const mutations = { - SET_HISTORY_MESSAGE_LIST(state, list) { - state.historyMessageList = [...list]; - }, - SET_HAS_MORE_MESSAGE(state, hasMore) { - state.hasMoreMessage = hasMore; - }, -}; - -const actions = { - async getHistoryMesageList({ commit, state }, params) { - let emptyFlag = true; - try { - console.log("getHistoryMesageList:::"); - console.log(params); - const { data } = await IMSDK.asyncApi( - IMSDK.IMMethods.GetAdvancedHistoryMessageList, - uuidv4(), - params, - ); - console.log(data); - const isFistPage = !params.startClientMsgID - const messages = data.messageList ?? []; - emptyFlag = messages.length === 0; - commit("SET_HISTORY_MESSAGE_LIST", [ - ...messages, - ...(isFistPage ? [] : state.historyMessageList), - ]); - commit("SET_HAS_MORE_MESSAGE", !data.isEnd && messages.length === 20); - } catch (e) { - commit("SET_HISTORY_MESSAGE_LIST", []); - } - return { - emptyFlag, - }; - }, - pushNewMessage({ commit, state }, message) { - commit("SET_HISTORY_MESSAGE_LIST", [...state.historyMessageList, message]); - }, - updateOneMessage( - { commit, state }, - { - message, - type = UpdateMessageTypes.Overall, - keyWords = [], - isSuccess = false, - }, - ) { - const tmpList = state.historyMessageList; - const idx = tmpList.findIndex( - (msg) => msg.clientMsgID === message.clientMsgID, - ); - if (idx !== -1) { - if (type === UpdateMessageTypes.Overall) { - tmpList[idx] = { - ...message, - }; - } else if (type === UpdateMessageTypes.KeyWords) { - const updateFields = Array.isArray(keyWords) ? keyWords : [keyWords]; - updateFields.forEach( - (field) => (tmpList[idx][field.key] = field.value), - ); - } - commit("SET_HISTORY_MESSAGE_LIST", tmpList); - } - }, - resetMessageState({ commit }) { - commit("SET_HISTORY_MESSAGE_LIST", []); - commit("SET_HAS_MORE_MESSAGE", true); - }, -}; - -export default { - namespaced: true, - state, - mutations, - actions, -}; diff --git a/uniapp/store/modules/user.js b/uniapp/store/modules/user.js deleted file mode 100644 index a812e7b..0000000 --- a/uniapp/store/modules/user.js +++ /dev/null @@ -1,83 +0,0 @@ -import { v4 as uuidv4} from "uuid"; -import IMSDK from "openim-uniapp-polyfill"; -import { businessGetUserInfo} from "@/api/login"; -import { filterEmptyValue} from "@/util/common"; - -const state = { - selfInfo: {}, - authData: {}, - isSyncing: false, - reinstall: false, - progress: 0, -}; - -const mutations = { - SET_SELF_INFO(state, info) { - state.selfInfo = { - ...info, - }; - }, - SET_AUTH_DATA(state, data) { - state.authData = { - ...data, - }; - }, - SET_IS_SYNCING(state, data) { - state.isSyncing = data; - }, - SET_REINSTALL(state, data) { - state.reinstall = data; - }, - SET_PROGRESS(state, data) { - state.progress = data; - }, -}; - -const actions = { - async getSelfInfo({ commit }) { - try { - const { - data - } = await IMSDK.asyncApi( - IMSDK.IMMethods.GetSelfUserInfo, - uuidv4(), - ); - const {users} = await businessGetUserInfo(data.userID); - console.log(users); - const businessData = users[0] ?? {}; - filterEmptyValue(businessData); - commit("SET_SELF_INFO", { - ...data, - ...businessData, - }); - } catch (e) { - console.log(e); - uni.$u.toast("获取个人信息失败"); - } - }, - async updateBusinessInfo({ - commit, - state - }) { - try { - const { - users - } = await businessGetUserInfo(state.selfInfo.userID); - const businessData = users[0] ?? {}; - filterEmptyValue(businessData); - commit("SET_SELF_INFO", { - ...state.selfInfo, - ...businessData, - }); - } catch (e) { - console.log(e); - } - }, -}; - -export default { - namespaced: true, - state, - mutations, - actions, -}; \ No newline at end of file diff --git a/uniapp/styles/common.scss b/uniapp/styles/common.scss deleted file mode 100644 index 9828046..0000000 --- a/uniapp/styles/common.scss +++ /dev/null @@ -1,39 +0,0 @@ -@mixin colBox($isBtw) { - display: flex; - flex-direction: column; - @if $isBtw { - justify-content: space-between; - } -} - -@mixin centerBox { - display: flex; - justify-content: center; - align-items: center; -} - -@mixin vCenterBox { - display: flex; - align-items: center; -} - -@mixin btwBox { - display: flex; - justify-content: space-between; - align-items: center; -} - -@mixin nomalEllipsis { - overflow: hidden; - text-overflow: ellipsis; - word-break: break-all; - white-space: nowrap; -} - -@mixin ellipsisWithLine($line) { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: $line; - overflow: hidden; - word-break: break-all; -} diff --git a/uniapp/styles/global.scss b/uniapp/styles/global.scss deleted file mode 100644 index 6212f01..0000000 --- a/uniapp/styles/global.scss +++ /dev/null @@ -1,13 +0,0 @@ -.page_container { - display: flex; - flex-direction: column; - height: 100vh; -} - -image { - image-rendering: -moz-crisp-edges; - image-rendering: -o-crisp-edges; - image-rendering: -webkit-optimize-contrast; - image-rendering: crisp-edges; - -ms-interpolation-mode: nearest-neighbor; -} diff --git a/uniapp/styles/login.scss b/uniapp/styles/login.scss deleted file mode 100644 index 54d9d5b..0000000 --- a/uniapp/styles/login.scss +++ /dev/null @@ -1,49 +0,0 @@ -.content_with_back { - padding: 0 64rpx; - - .back_icon { - padding-top: 50rpx; - padding-bottom: 100rpx; - } - - .title { - font-size: 48rpx; - padding-bottom: 90rpx; - } - - .sub_title { - color: $u-primary; - padding-bottom: 48rpx; - } -} - -.phoneNumber_areacode { - display: flex; - align-items: center; - font-size: 36rpx; - border-right: 2rpx solid #d8d8d8; - margin-right: 48rpx; - - .areacode_content { - font-weight: 400; - font-size: 28rpx; - margin-right: 12rpx; - } - - .arrow_down { - margin-right: 12rpx; - } -} - -.agreement { - display: flex; - align-items: flex-start; - flex-wrap: wrap; - margin: 36rpx 24rpx; - - .detail { - font-size: 24rpx; - font-weight: 400; - color: $u-primary; - } -} diff --git a/uniapp/uni.scss b/uniapp/uni.scss deleted file mode 100644 index 54e31bd..0000000 --- a/uniapp/uni.scss +++ /dev/null @@ -1,82 +0,0 @@ -/** - * 这里是uni-app内置的常用样式变量 - * - * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 - * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App - * - */ - -/** - * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 - * - * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 - */ -@import "@/styles/common.scss"; - -/* 颜色变量 */ -@import "@/uni_modules/uview-ui/theme.scss"; - -text { - // line-height: 1.5; -} - -/* 行为相关颜色 */ -$uni-color-primary: #007aff; -$uni-color-success: #4cd964; -$uni-color-warning: #f0ad4e; -$uni-color-error: #dd524d; - -/* 文字基本颜色 */ -$uni-text-color: #0c1c33; //基本色 -$uni-text-color-inverse: #fff; //反色 -$uni-text-color-grey: #999; //辅助灰色,如加载更多的提示信息 -$uni-text-color-placeholder: #808080; -$uni-text-color-disable: #c0c0c0; - -/* 背景颜色 */ -$uni-bg-color: #ffffff; -$uni-bg-color-grey: #f8f8f8; -$uni-bg-color-hover: #f1f1f1; //点击状态颜色 -$uni-bg-color-mask: rgba(0, 0, 0, 0.4); //遮罩颜色 - -/* 边框颜色 */ -$uni-border-color: #c8c7cc; - -/* 尺寸变量 */ - -/* 文字尺寸 */ -$uni-font-size-sm: 12px; -$uni-font-size-base: 14px; -$uni-font-size-lg: 16; - -/* 图片尺寸 */ -$uni-img-size-sm: 20px; -$uni-img-size-base: 26px; -$uni-img-size-lg: 40px; - -/* Border Radius */ -$uni-border-radius-sm: 2px; -$uni-border-radius-base: 3px; -$uni-border-radius-lg: 6px; -$uni-border-radius-circle: 50%; - -/* 水平间距 */ -$uni-spacing-row-sm: 5px; -$uni-spacing-row-base: 10px; -$uni-spacing-row-lg: 15px; - -/* 垂直间距 */ -$uni-spacing-col-sm: 4px; -$uni-spacing-col-base: 8px; -$uni-spacing-col-lg: 12px; - -/* 透明度 */ -$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 - -/* 文章场景相关 */ -$uni-color-title: #2c405a; // 文章标题颜色 -$uni-font-size-title: 20px; -$uni-color-subtitle: #555555; // 二级标题颜色 -$uni-font-size-subtitle: 26px; -$uni-color-paragraph: #3f536e; // 文章段落颜色 -$uni-font-size-paragraph: 15px; diff --git a/uniapp/uni_modules/Sansnn-uQRCode/changelog.md b/uniapp/uni_modules/Sansnn-uQRCode/changelog.md deleted file mode 100644 index 210fc2c..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/changelog.md +++ /dev/null @@ -1,3 +0,0 @@ -## 3.6.5(2022-10-14) -修复组件size值为string类型时,调用toTempFilePath导出临时文件路径失败; -优化组件加载本地图片。 diff --git a/uniapp/uni_modules/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue b/uniapp/uni_modules/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue deleted file mode 100644 index 3116eef..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue +++ /dev/null @@ -1,924 +0,0 @@ - - - - - - diff --git a/uniapp/uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode.vue b/uniapp/uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode.vue deleted file mode 100644 index 3116eef..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/components/uqrcode/uqrcode.vue +++ /dev/null @@ -1,924 +0,0 @@ - - - - - - diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/bridge/bridge-weex.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/bridge/bridge-weex.js deleted file mode 100644 index 27086ec..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/bridge/bridge-weex.js +++ /dev/null @@ -1,241 +0,0 @@ -const isWeex = typeof WXEnvironment !== 'undefined'; -const isWeexIOS = isWeex && /ios/i.test(WXEnvironment.platform); -const isWeexAndroid = isWeex && !isWeexIOS; - -import GLmethod from '../context-webgl/GLmethod'; - -const GCanvasModule = - (typeof weex !== 'undefined' && weex.requireModule) ? (weex.requireModule('gcanvas')) : - (typeof __weex_require__ !== 'undefined') ? (__weex_require__('@weex-module/gcanvas')) : {}; - -let isDebugging = false; - -let isComboDisabled = false; - -const logCommand = (function () { - const methodQuery = []; - Object.keys(GLmethod).forEach(key => { - methodQuery[GLmethod[key]] = key; - }) - const queryMethod = (id) => { - return methodQuery[parseInt(id)] || 'NotFoundMethod'; - } - const logCommand = (id, cmds) => { - const mId = cmds.split(',')[0]; - const mName = queryMethod(mId); - console.log(`=== callNative - componentId:${id}; method: ${mName}; cmds: ${cmds}`); - } - return logCommand; -})(); - -function joinArray(arr, sep) { - let res = ''; - for (let i = 0; i < arr.length; i++) { - if (i !== 0) { - res += sep; - } - res += arr[i]; - } - return res; -} - -const commandsCache = {} - -const GBridge = { - - callEnable: (ref, configArray) => { - - commandsCache[ref] = []; - - return GCanvasModule.enable({ - componentId: ref, - config: configArray - }); - }, - - callEnableDebug: () => { - isDebugging = true; - }, - - callEnableDisableCombo: () => { - isComboDisabled = true; - }, - - callSetContextType: function (componentId, context_type) { - GCanvasModule.setContextType(context_type, componentId); - }, - - callReset: function(id){ - GCanvasModule.resetComponent && canvasModule.resetComponent(componentId); - }, - - render: isWeexIOS ? function (componentId) { - return GCanvasModule.extendCallNative({ - contextId: componentId, - type: 0x60000001 - }); - } : function (componentId) { - return callGCanvasLinkNative(componentId, 0x60000001, 'render'); - }, - - render2d: isWeexIOS ? function (componentId, commands, callback) { - - if (isDebugging) { - console.log('>>> >>> render2d ==='); - console.log('>>> commands: ' + commands); - } - - GCanvasModule.render([commands, callback?true:false], componentId, callback); - - } : function (componentId, commands,callback) { - - if (isDebugging) { - console.log('>>> >>> render2d ==='); - console.log('>>> commands: ' + commands); - } - - callGCanvasLinkNative(componentId, 0x20000001, commands); - if(callback){ - callback(); - } - }, - - callExtendCallNative: isWeexIOS ? function (componentId, cmdArgs) { - - throw 'should not be here anymore ' + cmdArgs; - - } : function (componentId, cmdArgs) { - - throw 'should not be here anymore ' + cmdArgs; - - }, - - - flushNative: isWeexIOS ? function (componentId) { - - const cmdArgs = joinArray(commandsCache[componentId], ';'); - commandsCache[componentId] = []; - - if (isDebugging) { - console.log('>>> >>> flush native ==='); - console.log('>>> commands: ' + cmdArgs); - } - - const result = GCanvasModule.extendCallNative({ - "contextId": componentId, - "type": 0x60000000, - "args": cmdArgs - }); - - const res = result && result.result; - - if (isDebugging) { - console.log('>>> result: ' + res); - } - - return res; - - } : function (componentId) { - - const cmdArgs = joinArray(commandsCache[componentId], ';'); - commandsCache[componentId] = []; - - if (isDebugging) { - console.log('>>> >>> flush native ==='); - console.log('>>> commands: ' + cmdArgs); - } - - const result = callGCanvasLinkNative(componentId, 0x60000000, cmdArgs); - - if (isDebugging) { - console.log('>>> result: ' + result); - } - - return result; - }, - - callNative: function (componentId, cmdArgs, cache) { - - if (isDebugging) { - logCommand(componentId, cmdArgs); - } - - commandsCache[componentId].push(cmdArgs); - - if (!cache || isComboDisabled) { - return GBridge.flushNative(componentId); - } else { - return undefined; - } - }, - - texImage2D(componentId, ...args) { - if (isWeexIOS) { - if (args.length === 6) { - const [target, level, internalformat, format, type, image] = args; - GBridge.callNative( - componentId, - GLmethod.texImage2D + ',' + 6 + ',' + target + ',' + level + ',' + internalformat + ',' + format + ',' + type + ',' + image.src - ) - } else if (args.length === 9) { - const [target, level, internalformat, width, height, border, format, type, image] = args; - GBridge.callNative( - componentId, - GLmethod.texImage2D + ',' + 9 + ',' + target + ',' + level + ',' + internalformat + ',' + width + ',' + height + ',' + border + ',' + - + format + ',' + type + ',' + (image ? image.src : 0) - ) - } - } else if (isWeexAndroid) { - if (args.length === 6) { - const [target, level, internalformat, format, type, image] = args; - GCanvasModule.texImage2D(componentId, target, level, internalformat, format, type, image.src); - } else if (args.length === 9) { - const [target, level, internalformat, width, height, border, format, type, image] = args; - GCanvasModule.texImage2D(componentId, target, level, internalformat, width, height, border, format, type, (image ? image.src : 0)); - } - } - }, - - texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image) { - if (isWeexIOS) { - if (arguments.length === 8) { - GBridge.callNative( - componentId, - GLmethod.texSubImage2D + ',' + 6 + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset, + ',' + format + ',' + type + ',' + image.src - ) - } - } else if (isWeexAndroid) { - GCanvasModule.texSubImage2D(componentId, target, level, xoffset, yoffset, format, type, image.src); - } - }, - - bindImageTexture(componentId, src, imageId) { - GCanvasModule.bindImageTexture([src, imageId], componentId); - }, - - perloadImage([url, id], callback) { - GCanvasModule.preLoadImage([url, id], function (image) { - image.url = url; - image.id = id; - callback(image); - }); - }, - - measureText(text, fontStyle, componentId) { - return GCanvasModule.measureText([text, fontStyle], componentId); - }, - - getImageData (componentId, x, y, w, h, callback) { - GCanvasModule.getImageData([x, y,w,h],componentId,callback); - }, - - putImageData (componentId, data, x, y, w, h, callback) { - GCanvasModule.putImageData([x, y,w,h,data],componentId,callback); - }, - - toTempFilePath(componentId, x, y, width, height, destWidth, destHeight, fileType, quality, callback){ - GCanvasModule.toTempFilePath([x, y, width,height, destWidth, destHeight, fileType, quality], componentId, callback); - } -} - -export default GBridge; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleLinearGradient.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleLinearGradient.js deleted file mode 100644 index 3e7f03a..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleLinearGradient.js +++ /dev/null @@ -1,18 +0,0 @@ -class FillStyleLinearGradient { - - constructor(x0, y0, x1, y1) { - this._start_pos = { _x: x0, _y: y0 }; - this._end_pos = { _x: x1, _y: y1 }; - this._stop_count = 0; - this._stops = [0, 0, 0, 0, 0]; - } - - addColorStop = function (pos, color) { - if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) { - this._stops[this._stop_count] = { _pos: pos, _color: color }; - this._stop_count++; - } - } -} - -export default FillStyleLinearGradient; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStylePattern.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStylePattern.js deleted file mode 100644 index 6e4f646..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStylePattern.js +++ /dev/null @@ -1,8 +0,0 @@ -class FillStylePattern { - constructor(img, pattern) { - this._style = pattern; - this._img = img; - } -} - -export default FillStylePattern; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleRadialGradient.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleRadialGradient.js deleted file mode 100644 index 7790596..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/FillStyleRadialGradient.js +++ /dev/null @@ -1,17 +0,0 @@ -class FillStyleRadialGradient { - constructor(x0, y0, r0, x1, y1, r1) { - this._start_pos = { _x: x0, _y: y0, _r: r0 }; - this._end_pos = { _x: x1, _y: y1, _r: r1 }; - this._stop_count = 0; - this._stops = [0, 0, 0, 0, 0]; - } - - addColorStop(pos, color) { - if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) { - this._stops[this._stop_count] = { _pos: pos, _color: color }; - this._stop_count++; - } - } -} - -export default FillStyleRadialGradient; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/RenderingContext.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/RenderingContext.js deleted file mode 100644 index e6b8f48..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-2d/RenderingContext.js +++ /dev/null @@ -1,666 +0,0 @@ -import FillStylePattern from './FillStylePattern'; -import FillStyleLinearGradient from './FillStyleLinearGradient'; -import FillStyleRadialGradient from './FillStyleRadialGradient'; -import GImage from '../env/image.js'; -import { - ArrayBufferToBase64, - Base64ToUint8ClampedArray -} from '../env/tool.js'; - -export default class CanvasRenderingContext2D { - - _drawCommands = ''; - - _globalAlpha = 1.0; - - _fillStyle = 'rgb(0,0,0)'; - _strokeStyle = 'rgb(0,0,0)'; - - _lineWidth = 1; - _lineCap = 'butt'; - _lineJoin = 'miter'; - - _miterLimit = 10; - - _globalCompositeOperation = 'source-over'; - - _textAlign = 'start'; - _textBaseline = 'alphabetic'; - - _font = '10px sans-serif'; - - _savedGlobalAlpha = []; - - timer = null; - componentId = null; - - _notCommitDrawImageCache = []; - _needRedrawImageCache = []; - _redrawCommands = ''; - _autoSaveContext = true; - // _imageMap = new GHashMap(); - // _textureMap = new GHashMap(); - - constructor() { - this.className = 'CanvasRenderingContext2D'; - //this.save() - } - - setFillStyle(value) { - this.fillStyle = value; - } - - set fillStyle(value) { - this._fillStyle = value; - - if (typeof(value) == 'string') { - this._drawCommands = this._drawCommands.concat("F" + value + ";"); - } else if (value instanceof FillStylePattern) { - const image = value._img; - if (!image.complete) { - image.onload = () => { - var index = this._needRedrawImageCache.indexOf(image); - if (index > -1) { - this._needRedrawImageCache.splice(index, 1); - CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id); - this._redrawflush(true); - } - } - this._notCommitDrawImageCache.push(image); - } else { - CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id); - } - - //CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id); - this._drawCommands = this._drawCommands.concat("G" + image._id + "," + value._style + ";"); - } else if (value instanceof FillStyleLinearGradient) { - var command = "D" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," + - value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," + - value._stop_count; - for (var i = 0; i < value._stop_count; ++i) { - command += ("," + value._stops[i]._pos + "," + value._stops[i]._color); - } - this._drawCommands = this._drawCommands.concat(command + ";"); - } else if (value instanceof FillStyleRadialGradient) { - var command = "H" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," + value._start_pos._r - .toFixed(2) + "," + - value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," + value._end_pos._r.toFixed(2) + "," + - value._stop_count; - for (var i = 0; i < value._stop_count; ++i) { - command += ("," + value._stops[i]._pos + "," + value._stops[i]._color); - } - this._drawCommands = this._drawCommands.concat(command + ";"); - } - } - - get fillStyle() { - return this._fillStyle; - } - - get globalAlpha() { - return this._globalAlpha; - } - - setGlobalAlpha(value) { - this.globalAlpha = value; - } - - set globalAlpha(value) { - this._globalAlpha = value; - this._drawCommands = this._drawCommands.concat("a" + value.toFixed(2) + ";"); - } - - - get strokeStyle() { - return this._strokeStyle; - } - - setStrokeStyle(value) { - this.strokeStyle = value; - } - - set strokeStyle(value) { - - this._strokeStyle = value; - - if (typeof(value) == 'string') { - this._drawCommands = this._drawCommands.concat("S" + value + ";"); - } else if (value instanceof FillStylePattern) { - CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id); - this._drawCommands = this._drawCommands.concat("G" + image._id + "," + value._style + ";"); - } else if (value instanceof FillStyleLinearGradient) { - var command = "D" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," + - value._end_pos._x.toFixed(2) + "," + value._end_pos._y.toFixed(2) + "," + - value._stop_count; - - for (var i = 0; i < value._stop_count; ++i) { - command += ("," + value._stops[i]._pos + "," + value._stops[i]._color); - } - this._drawCommands = this._drawCommands.concat(command + ";"); - } else if (value instanceof FillStyleRadialGradient) { - var command = "H" + value._start_pos._x.toFixed(2) + "," + value._start_pos._y.toFixed(2) + "," + value._start_pos._r - .toFixed(2) + "," + - value._end_pos._x.toFixed(2) + "," + value._end_pos._y + ",".toFixed(2) + value._end_pos._r.toFixed(2) + "," + - value._stop_count; - - for (var i = 0; i < value._stop_count; ++i) { - command += ("," + value._stops[i]._pos + "," + value._stops[i]._color); - } - this._drawCommands = this._drawCommands.concat(command + ";"); - } - } - - get lineWidth() { - return this._lineWidth; - } - - setLineWidth(value) { - this.lineWidth = value; - } - - set lineWidth(value) { - this._lineWidth = value; - this._drawCommands = this._drawCommands.concat("W" + value + ";"); - } - - get lineCap() { - return this._lineCap; - } - - setLineCap(value) { - this.lineCap = value; - } - - set lineCap(value) { - this._lineCap = value; - this._drawCommands = this._drawCommands.concat("C" + value + ";"); - } - - get lineJoin() { - return this._lineJoin; - } - - setLineJoin(value) { - this.lineJoin = value - } - - set lineJoin(value) { - this._lineJoin = value; - this._drawCommands = this._drawCommands.concat("J" + value + ";"); - } - - get miterLimit() { - return this._miterLimit; - } - - setMiterLimit(value) { - this.miterLimit = value - } - - set miterLimit(value) { - this._miterLimit = value; - this._drawCommands = this._drawCommands.concat("M" + value + ";"); - } - - get globalCompositeOperation() { - return this._globalCompositeOperation; - } - - set globalCompositeOperation(value) { - - this._globalCompositeOperation = value; - let mode = 0; - switch (value) { - case "source-over": - mode = 0; - break; - case "source-atop": - mode = 5; - break; - case "source-in": - mode = 0; - break; - case "source-out": - mode = 2; - break; - case "destination-over": - mode = 4; - break; - case "destination-atop": - mode = 4; - break; - case "destination-in": - mode = 4; - break; - case "destination-out": - mode = 3; - break; - case "lighter": - mode = 1; - break; - case "copy": - mode = 2; - break; - case "xor": - mode = 6; - break; - default: - mode = 0; - } - - this._drawCommands = this._drawCommands.concat("B" + mode + ";"); - } - - get textAlign() { - return this._textAlign; - } - - setTextAlign(value) { - this.textAlign = value - } - - set textAlign(value) { - - this._textAlign = value; - let Align = 0; - switch (value) { - case "start": - Align = 0; - break; - case "end": - Align = 1; - break; - case "left": - Align = 2; - break; - case "center": - Align = 3; - break; - case "right": - Align = 4; - break; - default: - Align = 0; - } - - this._drawCommands = this._drawCommands.concat("A" + Align + ";"); - } - - get textBaseline() { - return this._textBaseline; - } - - setTextBaseline(value) { - this.textBaseline = value - } - - set textBaseline(value) { - this._textBaseline = value; - let baseline = 0; - switch (value) { - case "alphabetic": - baseline = 0; - break; - case "middle": - baseline = 1; - break; - case "top": - baseline = 2; - break; - case "hanging": - baseline = 3; - break; - case "bottom": - baseline = 4; - break; - case "ideographic": - baseline = 5; - break; - default: - baseline = 0; - break; - } - - this._drawCommands = this._drawCommands.concat("E" + baseline + ";"); - } - - get font() { - return this._font; - } - - setFontSize(size) { - var str = this._font; - var strs = str.trim().split(/\s+/); - for (var i = 0; i < strs.length; i++) { - var values = ["normal", "italic", "oblique", "normal", "small-caps", "normal", "bold", - "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", - "normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", - "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" - ]; - - if (-1 == values.indexOf(strs[i].trim())) { - if (typeof size === 'string') { - strs[i] = size; - } else if (typeof size === 'number') { - strs[i] = String(size) + 'px'; - } - break; - } - } - this.font = strs.join(" "); - } - - set font(value) { - this._font = value; - this._drawCommands = this._drawCommands.concat("j" + value + ";"); - } - - setTransform(a, b, c, d, tx, ty) { - this._drawCommands = this._drawCommands.concat("t" + - (a === 1 ? "1" : a.toFixed(2)) + "," + - (b === 0 ? "0" : b.toFixed(2)) + "," + - (c === 0 ? "0" : c.toFixed(2)) + "," + - (d === 1 ? "1" : d.toFixed(2)) + "," + tx.toFixed(2) + "," + ty.toFixed(2) + ";"); - } - - transform(a, b, c, d, tx, ty) { - this._drawCommands = this._drawCommands.concat("f" + - (a === 1 ? "1" : a.toFixed(2)) + "," + - (b === 0 ? "0" : b.toFixed(2)) + "," + - (c === 0 ? "0" : c.toFixed(2)) + "," + - (d === 1 ? "1" : d.toFixed(2)) + "," + tx + "," + ty + ";"); - } - - resetTransform() { - this._drawCommands = this._drawCommands.concat("m;"); - } - - scale(a, d) { - this._drawCommands = this._drawCommands.concat("k" + a.toFixed(2) + "," + - d.toFixed(2) + ";"); - } - - rotate(angle) { - this._drawCommands = this._drawCommands - .concat("r" + angle.toFixed(6) + ";"); - } - - translate(tx, ty) { - this._drawCommands = this._drawCommands.concat("l" + tx.toFixed(2) + "," + ty.toFixed(2) + ";"); - } - - save() { - this._savedGlobalAlpha.push(this._globalAlpha); - this._drawCommands = this._drawCommands.concat("v;"); - } - - restore() { - this._drawCommands = this._drawCommands.concat("e;"); - this._globalAlpha = this._savedGlobalAlpha.pop(); - } - - createPattern(img, pattern) { - if (typeof img === 'string') { - var imgObj = new GImage(); - imgObj.src = img; - img = imgObj; - } - return new FillStylePattern(img, pattern); - } - - createLinearGradient(x0, y0, x1, y1) { - return new FillStyleLinearGradient(x0, y0, x1, y1); - } - - createRadialGradient = function(x0, y0, r0, x1, y1, r1) { - return new FillStyleRadialGradient(x0, y0, r0, x1, y1, r1); - }; - - createCircularGradient = function(x0, y0, r0) { - return new FillStyleRadialGradient(x0, y0, 0, x0, y0, r0); - }; - - strokeRect(x, y, w, h) { - this._drawCommands = this._drawCommands.concat("s" + x + "," + y + "," + w + "," + h + ";"); - } - - - clearRect(x, y, w, h) { - this._drawCommands = this._drawCommands.concat("c" + x + "," + y + "," + w + - "," + h + ";"); - } - - clip() { - this._drawCommands = this._drawCommands.concat("p;"); - } - - resetClip() { - this._drawCommands = this._drawCommands.concat("q;"); - } - - closePath() { - this._drawCommands = this._drawCommands.concat("o;"); - } - - moveTo(x, y) { - this._drawCommands = this._drawCommands.concat("g" + x.toFixed(2) + "," + y.toFixed(2) + ";"); - } - - lineTo(x, y) { - this._drawCommands = this._drawCommands.concat("i" + x.toFixed(2) + "," + y.toFixed(2) + ";"); - } - - quadraticCurveTo = function(cpx, cpy, x, y) { - this._drawCommands = this._drawCommands.concat("u" + cpx + "," + cpy + "," + x + "," + y + ";"); - } - - bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y, ) { - this._drawCommands = this._drawCommands.concat( - "z" + cp1x.toFixed(2) + "," + cp1y.toFixed(2) + "," + cp2x.toFixed(2) + "," + cp2y.toFixed(2) + "," + - x.toFixed(2) + "," + y.toFixed(2) + ";"); - } - - arcTo(x1, y1, x2, y2, radius) { - this._drawCommands = this._drawCommands.concat("h" + x1 + "," + y1 + "," + x2 + "," + y2 + "," + radius + ";"); - } - - beginPath() { - this._drawCommands = this._drawCommands.concat("b;"); - } - - - fillRect(x, y, w, h) { - this._drawCommands = this._drawCommands.concat("n" + x + "," + y + "," + w + - "," + h + ";"); - } - - rect(x, y, w, h) { - this._drawCommands = this._drawCommands.concat("w" + x + "," + y + "," + w + "," + h + ";"); - } - - fill() { - this._drawCommands = this._drawCommands.concat("L;"); - } - - stroke(path) { - this._drawCommands = this._drawCommands.concat("x;"); - } - - arc(x, y, radius, startAngle, endAngle, anticlockwise) { - - let ianticlockwise = 0; - if (anticlockwise) { - ianticlockwise = 1; - } - - this._drawCommands = this._drawCommands.concat( - "y" + x.toFixed(2) + "," + y.toFixed(2) + "," + - radius.toFixed(2) + "," + startAngle + "," + endAngle + "," + ianticlockwise + - ";" - ); - } - - fillText(text, x, y) { - let tmptext = text.replace(/!/g, "!!"); - tmptext = tmptext.replace(/,/g, "!,"); - tmptext = tmptext.replace(/;/g, "!;"); - this._drawCommands = this._drawCommands.concat("T" + tmptext + "," + x + "," + y + ",0.0;"); - } - - strokeText = function(text, x, y) { - let tmptext = text.replace(/!/g, "!!"); - tmptext = tmptext.replace(/,/g, "!,"); - tmptext = tmptext.replace(/;/g, "!;"); - this._drawCommands = this._drawCommands.concat("U" + tmptext + "," + x + "," + y + ",0.0;"); - } - - measureText(text) { - return CanvasRenderingContext2D.GBridge.measureText(text, this.font, this.componentId); - } - - isPointInPath = function(x, y) { - throw new Error('GCanvas not supported yet'); - } - - drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) { - if (typeof image === 'string') { - var imgObj = new GImage(); - imgObj.src = image; - image = imgObj; - } - if (image instanceof GImage) { - if (!image.complete) { - imgObj.onload = () => { - var index = this._needRedrawImageCache.indexOf(image); - if (index > -1) { - this._needRedrawImageCache.splice(index, 1); - CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id); - this._redrawflush(true); - } - } - this._notCommitDrawImageCache.push(image); - } else { - CanvasRenderingContext2D.GBridge.bindImageTexture(this.componentId, image.src, image._id); - } - var srcArgs = [image, sx, sy, sw, sh, dx, dy, dw, dh]; - var args = []; - for (var arg in srcArgs) { - if (typeof(srcArgs[arg]) != 'undefined') { - args.push(srcArgs[arg]); - } - } - this.__drawImage.apply(this, args); - //this.__drawImage(image,sx, sy, sw, sh, dx, dy, dw, dh); - } - } - - __drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) { - const numArgs = arguments.length; - - function drawImageCommands() { - - if (numArgs === 3) { - const x = parseFloat(sx) || 0.0; - const y = parseFloat(sy) || 0.0; - - return ("d" + image._id + ",0,0," + - image.width + "," + image.height + "," + - x + "," + y + "," + image.width + "," + image.height + ";"); - } else if (numArgs === 5) { - const x = parseFloat(sx) || 0.0; - const y = parseFloat(sy) || 0.0; - const width = parseInt(sw) || image.width; - const height = parseInt(sh) || image.height; - - return ("d" + image._id + ",0,0," + - image.width + "," + image.height + "," + - x + "," + y + "," + width + "," + height + ";"); - } else if (numArgs === 9) { - sx = parseFloat(sx) || 0.0; - sy = parseFloat(sy) || 0.0; - sw = parseInt(sw) || image.width; - sh = parseInt(sh) || image.height; - dx = parseFloat(dx) || 0.0; - dy = parseFloat(dy) || 0.0; - dw = parseInt(dw) || image.width; - dh = parseInt(dh) || image.height; - - return ("d" + image._id + "," + - sx + "," + sy + "," + sw + "," + sh + "," + - dx + "," + dy + "," + dw + "," + dh + ";"); - } - } - this._drawCommands += drawImageCommands(); - } - - _flush(reserve, callback) { - const commands = this._drawCommands; - this._drawCommands = ''; - CanvasRenderingContext2D.GBridge.render2d(this.componentId, commands, callback); - this._needRender = false; - } - - _redrawflush(reserve, callback) { - const commands = this._redrawCommands; - CanvasRenderingContext2D.GBridge.render2d(this.componentId, commands, callback); - if (this._needRedrawImageCache.length == 0) { - this._redrawCommands = ''; - } - } - - draw(reserve, callback) { - if (!reserve) { - this._globalAlpha = this._savedGlobalAlpha.pop(); - this._savedGlobalAlpha.push(this._globalAlpha); - this._redrawCommands = this._drawCommands; - this._needRedrawImageCache = this._notCommitDrawImageCache; - if (this._autoSaveContext) { - this._drawCommands = ("v;" + this._drawCommands); - this._autoSaveContext = false; - } else { - this._drawCommands = ("e;X;v;" + this._drawCommands); - } - } else { - this._needRedrawImageCache = this._needRedrawImageCache.concat(this._notCommitDrawImageCache); - this._redrawCommands += this._drawCommands; - if (this._autoSaveContext) { - this._drawCommands = ("v;" + this._drawCommands); - this._autoSaveContext = false; - } - } - this._notCommitDrawImageCache = []; - if (this._flush) { - this._flush(reserve, callback); - } - } - - getImageData(x, y, w, h, callback) { - CanvasRenderingContext2D.GBridge.getImageData(this.componentId, x, y, w, h, function(res) { - res.data = Base64ToUint8ClampedArray(res.data); - if (typeof(callback) == 'function') { - callback(res); - } - }); - } - - putImageData(data, x, y, w, h, callback) { - if (data instanceof Uint8ClampedArray) { - data = ArrayBufferToBase64(data); - CanvasRenderingContext2D.GBridge.putImageData(this.componentId, data, x, y, w, h, function(res) { - if (typeof(callback) == 'function') { - callback(res); - } - }); - } - } - - toTempFilePath(x, y, width, height, destWidth, destHeight, fileType, quality, callback) { - CanvasRenderingContext2D.GBridge.toTempFilePath(this.componentId, x, y, width, height, destWidth, destHeight, - fileType, quality, - function(res) { - if (typeof(callback) == 'function') { - callback(res); - } - }); - } -} diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ActiveInfo.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ActiveInfo.js deleted file mode 100644 index b495129..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ActiveInfo.js +++ /dev/null @@ -1,11 +0,0 @@ -export default class WebGLActiveInfo { - className = 'WebGLActiveInfo'; - - constructor({ - type, name, size - }) { - this.type = type; - this.name = name; - this.size = size; - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Buffer.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Buffer.js deleted file mode 100644 index 4800f67..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Buffer.js +++ /dev/null @@ -1,21 +0,0 @@ -import {getTransferedObjectUUID} from './classUtils'; - -const name = 'WebGLBuffer'; - -function uuid(id) { - return getTransferedObjectUUID(name, id); -} - -export default class WebGLBuffer { - className = name; - - constructor(id) { - this.id = id; - } - - static uuid = uuid; - - uuid() { - return uuid(this.id); - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Framebuffer.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Framebuffer.js deleted file mode 100644 index 28b46d3..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Framebuffer.js +++ /dev/null @@ -1,21 +0,0 @@ -import {getTransferedObjectUUID} from './classUtils'; - -const name = 'WebGLFrameBuffer'; - -function uuid(id) { - return getTransferedObjectUUID(name, id); -} - -export default class WebGLFramebuffer { - className = name; - - constructor(id) { - this.id = id; - } - - static uuid = uuid; - - uuid() { - return uuid(this.id); - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLenum.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLenum.js deleted file mode 100644 index ac5544d..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLenum.js +++ /dev/null @@ -1,298 +0,0 @@ -export default { - "DEPTH_BUFFER_BIT": 256, - "STENCIL_BUFFER_BIT": 1024, - "COLOR_BUFFER_BIT": 16384, - "POINTS": 0, - "LINES": 1, - "LINE_LOOP": 2, - "LINE_STRIP": 3, - "TRIANGLES": 4, - "TRIANGLE_STRIP": 5, - "TRIANGLE_FAN": 6, - "ZERO": 0, - "ONE": 1, - "SRC_COLOR": 768, - "ONE_MINUS_SRC_COLOR": 769, - "SRC_ALPHA": 770, - "ONE_MINUS_SRC_ALPHA": 771, - "DST_ALPHA": 772, - "ONE_MINUS_DST_ALPHA": 773, - "DST_COLOR": 774, - "ONE_MINUS_DST_COLOR": 775, - "SRC_ALPHA_SATURATE": 776, - "FUNC_ADD": 32774, - "BLEND_EQUATION": 32777, - "BLEND_EQUATION_RGB": 32777, - "BLEND_EQUATION_ALPHA": 34877, - "FUNC_SUBTRACT": 32778, - "FUNC_REVERSE_SUBTRACT": 32779, - "BLEND_DST_RGB": 32968, - "BLEND_SRC_RGB": 32969, - "BLEND_DST_ALPHA": 32970, - "BLEND_SRC_ALPHA": 32971, - "CONSTANT_COLOR": 32769, - "ONE_MINUS_CONSTANT_COLOR": 32770, - "CONSTANT_ALPHA": 32771, - "ONE_MINUS_CONSTANT_ALPHA": 32772, - "BLEND_COLOR": 32773, - "ARRAY_BUFFER": 34962, - "ELEMENT_ARRAY_BUFFER": 34963, - "ARRAY_BUFFER_BINDING": 34964, - "ELEMENT_ARRAY_BUFFER_BINDING": 34965, - "STREAM_DRAW": 35040, - "STATIC_DRAW": 35044, - "DYNAMIC_DRAW": 35048, - "BUFFER_SIZE": 34660, - "BUFFER_USAGE": 34661, - "CURRENT_VERTEX_ATTRIB": 34342, - "FRONT": 1028, - "BACK": 1029, - "FRONT_AND_BACK": 1032, - "TEXTURE_2D": 3553, - "CULL_FACE": 2884, - "BLEND": 3042, - "DITHER": 3024, - "STENCIL_TEST": 2960, - "DEPTH_TEST": 2929, - "SCISSOR_TEST": 3089, - "POLYGON_OFFSET_FILL": 32823, - "SAMPLE_ALPHA_TO_COVERAGE": 32926, - "SAMPLE_COVERAGE": 32928, - "NO_ERROR": 0, - "INVALID_ENUM": 1280, - "INVALID_VALUE": 1281, - "INVALID_OPERATION": 1282, - "OUT_OF_MEMORY": 1285, - "CW": 2304, - "CCW": 2305, - "LINE_WIDTH": 2849, - "ALIASED_POINT_SIZE_RANGE": 33901, - "ALIASED_LINE_WIDTH_RANGE": 33902, - "CULL_FACE_MODE": 2885, - "FRONT_FACE": 2886, - "DEPTH_RANGE": 2928, - "DEPTH_WRITEMASK": 2930, - "DEPTH_CLEAR_VALUE": 2931, - "DEPTH_FUNC": 2932, - "STENCIL_CLEAR_VALUE": 2961, - "STENCIL_FUNC": 2962, - "STENCIL_FAIL": 2964, - "STENCIL_PASS_DEPTH_FAIL": 2965, - "STENCIL_PASS_DEPTH_PASS": 2966, - "STENCIL_REF": 2967, - "STENCIL_VALUE_MASK": 2963, - "STENCIL_WRITEMASK": 2968, - "STENCIL_BACK_FUNC": 34816, - "STENCIL_BACK_FAIL": 34817, - "STENCIL_BACK_PASS_DEPTH_FAIL": 34818, - "STENCIL_BACK_PASS_DEPTH_PASS": 34819, - "STENCIL_BACK_REF": 36003, - "STENCIL_BACK_VALUE_MASK": 36004, - "STENCIL_BACK_WRITEMASK": 36005, - "VIEWPORT": 2978, - "SCISSOR_BOX": 3088, - "COLOR_CLEAR_VALUE": 3106, - "COLOR_WRITEMASK": 3107, - "UNPACK_ALIGNMENT": 3317, - "PACK_ALIGNMENT": 3333, - "MAX_TEXTURE_SIZE": 3379, - "MAX_VIEWPORT_DIMS": 3386, - "SUBPIXEL_BITS": 3408, - "RED_BITS": 3410, - "GREEN_BITS": 3411, - "BLUE_BITS": 3412, - "ALPHA_BITS": 3413, - "DEPTH_BITS": 3414, - "STENCIL_BITS": 3415, - "POLYGON_OFFSET_UNITS": 10752, - "POLYGON_OFFSET_FACTOR": 32824, - "TEXTURE_BINDING_2D": 32873, - "SAMPLE_BUFFERS": 32936, - "SAMPLES": 32937, - "SAMPLE_COVERAGE_VALUE": 32938, - "SAMPLE_COVERAGE_INVERT": 32939, - "COMPRESSED_TEXTURE_FORMATS": 34467, - "DONT_CARE": 4352, - "FASTEST": 4353, - "NICEST": 4354, - "GENERATE_MIPMAP_HINT": 33170, - "BYTE": 5120, - "UNSIGNED_BYTE": 5121, - "SHORT": 5122, - "UNSIGNED_SHORT": 5123, - "INT": 5124, - "UNSIGNED_INT": 5125, - "FLOAT": 5126, - "DEPTH_COMPONENT": 6402, - "ALPHA": 6406, - "RGB": 6407, - "RGBA": 6408, - "LUMINANCE": 6409, - "LUMINANCE_ALPHA": 6410, - "UNSIGNED_SHORT_4_4_4_4": 32819, - "UNSIGNED_SHORT_5_5_5_1": 32820, - "UNSIGNED_SHORT_5_6_5": 33635, - "FRAGMENT_SHADER": 35632, - "VERTEX_SHADER": 35633, - "MAX_VERTEX_ATTRIBS": 34921, - "MAX_VERTEX_UNIFORM_VECTORS": 36347, - "MAX_VARYING_VECTORS": 36348, - "MAX_COMBINED_TEXTURE_IMAGE_UNITS": 35661, - "MAX_VERTEX_TEXTURE_IMAGE_UNITS": 35660, - "MAX_TEXTURE_IMAGE_UNITS": 34930, - "MAX_FRAGMENT_UNIFORM_VECTORS": 36349, - "SHADER_TYPE": 35663, - "DELETE_STATUS": 35712, - "LINK_STATUS": 35714, - "VALIDATE_STATUS": 35715, - "ATTACHED_SHADERS": 35717, - "ACTIVE_UNIFORMS": 35718, - "ACTIVE_ATTRIBUTES": 35721, - "SHADING_LANGUAGE_VERSION": 35724, - "CURRENT_PROGRAM": 35725, - "NEVER": 512, - "LESS": 513, - "EQUAL": 514, - "LEQUAL": 515, - "GREATER": 516, - "NOTEQUAL": 517, - "GEQUAL": 518, - "ALWAYS": 519, - "KEEP": 7680, - "REPLACE": 7681, - "INCR": 7682, - "DECR": 7683, - "INVERT": 5386, - "INCR_WRAP": 34055, - "DECR_WRAP": 34056, - "VENDOR": 7936, - "RENDERER": 7937, - "VERSION": 7938, - "NEAREST": 9728, - "LINEAR": 9729, - "NEAREST_MIPMAP_NEAREST": 9984, - "LINEAR_MIPMAP_NEAREST": 9985, - "NEAREST_MIPMAP_LINEAR": 9986, - "LINEAR_MIPMAP_LINEAR": 9987, - "TEXTURE_MAG_FILTER": 10240, - "TEXTURE_MIN_FILTER": 10241, - "TEXTURE_WRAP_S": 10242, - "TEXTURE_WRAP_T": 10243, - "TEXTURE": 5890, - "TEXTURE_CUBE_MAP": 34067, - "TEXTURE_BINDING_CUBE_MAP": 34068, - "TEXTURE_CUBE_MAP_POSITIVE_X": 34069, - "TEXTURE_CUBE_MAP_NEGATIVE_X": 34070, - "TEXTURE_CUBE_MAP_POSITIVE_Y": 34071, - "TEXTURE_CUBE_MAP_NEGATIVE_Y": 34072, - "TEXTURE_CUBE_MAP_POSITIVE_Z": 34073, - "TEXTURE_CUBE_MAP_NEGATIVE_Z": 34074, - "MAX_CUBE_MAP_TEXTURE_SIZE": 34076, - "TEXTURE0": 33984, - "TEXTURE1": 33985, - "TEXTURE2": 33986, - "TEXTURE3": 33987, - "TEXTURE4": 33988, - "TEXTURE5": 33989, - "TEXTURE6": 33990, - "TEXTURE7": 33991, - "TEXTURE8": 33992, - "TEXTURE9": 33993, - "TEXTURE10": 33994, - "TEXTURE11": 33995, - "TEXTURE12": 33996, - "TEXTURE13": 33997, - "TEXTURE14": 33998, - "TEXTURE15": 33999, - "TEXTURE16": 34000, - "TEXTURE17": 34001, - "TEXTURE18": 34002, - "TEXTURE19": 34003, - "TEXTURE20": 34004, - "TEXTURE21": 34005, - "TEXTURE22": 34006, - "TEXTURE23": 34007, - "TEXTURE24": 34008, - "TEXTURE25": 34009, - "TEXTURE26": 34010, - "TEXTURE27": 34011, - "TEXTURE28": 34012, - "TEXTURE29": 34013, - "TEXTURE30": 34014, - "TEXTURE31": 34015, - "ACTIVE_TEXTURE": 34016, - "REPEAT": 10497, - "CLAMP_TO_EDGE": 33071, - "MIRRORED_REPEAT": 33648, - "FLOAT_VEC2": 35664, - "FLOAT_VEC3": 35665, - "FLOAT_VEC4": 35666, - "INT_VEC2": 35667, - "INT_VEC3": 35668, - "INT_VEC4": 35669, - "BOOL": 35670, - "BOOL_VEC2": 35671, - "BOOL_VEC3": 35672, - "BOOL_VEC4": 35673, - "FLOAT_MAT2": 35674, - "FLOAT_MAT3": 35675, - "FLOAT_MAT4": 35676, - "SAMPLER_2D": 35678, - "SAMPLER_CUBE": 35680, - "VERTEX_ATTRIB_ARRAY_ENABLED": 34338, - "VERTEX_ATTRIB_ARRAY_SIZE": 34339, - "VERTEX_ATTRIB_ARRAY_STRIDE": 34340, - "VERTEX_ATTRIB_ARRAY_TYPE": 34341, - "VERTEX_ATTRIB_ARRAY_NORMALIZED": 34922, - "VERTEX_ATTRIB_ARRAY_POINTER": 34373, - "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING": 34975, - "IMPLEMENTATION_COLOR_READ_TYPE": 35738, - "IMPLEMENTATION_COLOR_READ_FORMAT": 35739, - "COMPILE_STATUS": 35713, - "LOW_FLOAT": 36336, - "MEDIUM_FLOAT": 36337, - "HIGH_FLOAT": 36338, - "LOW_INT": 36339, - "MEDIUM_INT": 36340, - "HIGH_INT": 36341, - "FRAMEBUFFER": 36160, - "RENDERBUFFER": 36161, - "RGBA4": 32854, - "RGB5_A1": 32855, - "RGB565": 36194, - "DEPTH_COMPONENT16": 33189, - "STENCIL_INDEX8": 36168, - "DEPTH_STENCIL": 34041, - "RENDERBUFFER_WIDTH": 36162, - "RENDERBUFFER_HEIGHT": 36163, - "RENDERBUFFER_INTERNAL_FORMAT": 36164, - "RENDERBUFFER_RED_SIZE": 36176, - "RENDERBUFFER_GREEN_SIZE": 36177, - "RENDERBUFFER_BLUE_SIZE": 36178, - "RENDERBUFFER_ALPHA_SIZE": 36179, - "RENDERBUFFER_DEPTH_SIZE": 36180, - "RENDERBUFFER_STENCIL_SIZE": 36181, - "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE": 36048, - "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME": 36049, - "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL": 36050, - "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE": 36051, - "COLOR_ATTACHMENT0": 36064, - "DEPTH_ATTACHMENT": 36096, - "STENCIL_ATTACHMENT": 36128, - "DEPTH_STENCIL_ATTACHMENT": 33306, - "NONE": 0, - "FRAMEBUFFER_COMPLETE": 36053, - "FRAMEBUFFER_INCOMPLETE_ATTACHMENT": 36054, - "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT": 36055, - "FRAMEBUFFER_INCOMPLETE_DIMENSIONS": 36057, - "FRAMEBUFFER_UNSUPPORTED": 36061, - "FRAMEBUFFER_BINDING": 36006, - "RENDERBUFFER_BINDING": 36007, - "MAX_RENDERBUFFER_SIZE": 34024, - "INVALID_FRAMEBUFFER_OPERATION": 1286, - "UNPACK_FLIP_Y_WEBGL": 37440, - "UNPACK_PREMULTIPLY_ALPHA_WEBGL": 37441, - "CONTEXT_LOST_WEBGL": 37442, - "UNPACK_COLORSPACE_CONVERSION_WEBGL": 37443, - "BROWSER_DEFAULT_WEBGL": 37444 -}; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLmethod.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLmethod.js deleted file mode 100644 index f2659be..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLmethod.js +++ /dev/null @@ -1,142 +0,0 @@ -let i = 1; - -const GLmethod = {}; - -GLmethod.activeTexture = i++; //1 -GLmethod.attachShader = i++; -GLmethod.bindAttribLocation = i++; -GLmethod.bindBuffer = i++; -GLmethod.bindFramebuffer = i++; -GLmethod.bindRenderbuffer = i++; -GLmethod.bindTexture = i++; -GLmethod.blendColor = i++; -GLmethod.blendEquation = i++; -GLmethod.blendEquationSeparate = i++; //10 -GLmethod.blendFunc = i++; -GLmethod.blendFuncSeparate = i++; -GLmethod.bufferData = i++; -GLmethod.bufferSubData = i++; -GLmethod.checkFramebufferStatus = i++; -GLmethod.clear = i++; -GLmethod.clearColor = i++; -GLmethod.clearDepth = i++; -GLmethod.clearStencil = i++; -GLmethod.colorMask = i++; //20 -GLmethod.compileShader = i++; -GLmethod.compressedTexImage2D = i++; -GLmethod.compressedTexSubImage2D = i++; -GLmethod.copyTexImage2D = i++; -GLmethod.copyTexSubImage2D = i++; -GLmethod.createBuffer = i++; -GLmethod.createFramebuffer = i++; -GLmethod.createProgram = i++; -GLmethod.createRenderbuffer = i++; -GLmethod.createShader = i++; //30 -GLmethod.createTexture = i++; -GLmethod.cullFace = i++; -GLmethod.deleteBuffer = i++; -GLmethod.deleteFramebuffer = i++; -GLmethod.deleteProgram = i++; -GLmethod.deleteRenderbuffer = i++; -GLmethod.deleteShader = i++; -GLmethod.deleteTexture = i++; -GLmethod.depthFunc = i++; -GLmethod.depthMask = i++; //40 -GLmethod.depthRange = i++; -GLmethod.detachShader = i++; -GLmethod.disable = i++; -GLmethod.disableVertexAttribArray = i++; -GLmethod.drawArrays = i++; -GLmethod.drawArraysInstancedANGLE = i++; -GLmethod.drawElements = i++; -GLmethod.drawElementsInstancedANGLE = i++; -GLmethod.enable = i++; -GLmethod.enableVertexAttribArray = i++; //50 -GLmethod.flush = i++; -GLmethod.framebufferRenderbuffer = i++; -GLmethod.framebufferTexture2D = i++; -GLmethod.frontFace = i++; -GLmethod.generateMipmap = i++; -GLmethod.getActiveAttrib = i++; -GLmethod.getActiveUniform = i++; -GLmethod.getAttachedShaders = i++; -GLmethod.getAttribLocation = i++; -GLmethod.getBufferParameter = i++; //60 -GLmethod.getContextAttributes = i++; -GLmethod.getError = i++; -GLmethod.getExtension = i++; -GLmethod.getFramebufferAttachmentParameter = i++; -GLmethod.getParameter = i++; -GLmethod.getProgramInfoLog = i++; -GLmethod.getProgramParameter = i++; -GLmethod.getRenderbufferParameter = i++; -GLmethod.getShaderInfoLog = i++; -GLmethod.getShaderParameter = i++; //70 -GLmethod.getShaderPrecisionFormat = i++; -GLmethod.getShaderSource = i++; -GLmethod.getSupportedExtensions = i++; -GLmethod.getTexParameter = i++; -GLmethod.getUniform = i++; -GLmethod.getUniformLocation = i++; -GLmethod.getVertexAttrib = i++; -GLmethod.getVertexAttribOffset = i++; -GLmethod.isBuffer = i++; -GLmethod.isContextLost = i++; //80 -GLmethod.isEnabled = i++; -GLmethod.isFramebuffer = i++; -GLmethod.isProgram = i++; -GLmethod.isRenderbuffer = i++; -GLmethod.isShader = i++; -GLmethod.isTexture = i++; -GLmethod.lineWidth = i++; -GLmethod.linkProgram = i++; -GLmethod.pixelStorei = i++; -GLmethod.polygonOffset = i++; //90 -GLmethod.readPixels = i++; -GLmethod.renderbufferStorage = i++; -GLmethod.sampleCoverage = i++; -GLmethod.scissor = i++; -GLmethod.shaderSource = i++; -GLmethod.stencilFunc = i++; -GLmethod.stencilFuncSeparate = i++; -GLmethod.stencilMask = i++; -GLmethod.stencilMaskSeparate = i++; -GLmethod.stencilOp = i++; //100 -GLmethod.stencilOpSeparate = i++; -GLmethod.texImage2D = i++; -GLmethod.texParameterf = i++; -GLmethod.texParameteri = i++; -GLmethod.texSubImage2D = i++; -GLmethod.uniform1f = i++; -GLmethod.uniform1fv = i++; -GLmethod.uniform1i = i++; -GLmethod.uniform1iv = i++; -GLmethod.uniform2f = i++; //110 -GLmethod.uniform2fv = i++; -GLmethod.uniform2i = i++; -GLmethod.uniform2iv = i++; -GLmethod.uniform3f = i++; -GLmethod.uniform3fv = i++; -GLmethod.uniform3i = i++; -GLmethod.uniform3iv = i++; -GLmethod.uniform4f = i++; -GLmethod.uniform4fv = i++; -GLmethod.uniform4i = i++; //120 -GLmethod.uniform4iv = i++; -GLmethod.uniformMatrix2fv = i++; -GLmethod.uniformMatrix3fv = i++; -GLmethod.uniformMatrix4fv = i++; -GLmethod.useProgram = i++; -GLmethod.validateProgram = i++; -GLmethod.vertexAttrib1f = i++; //new -GLmethod.vertexAttrib2f = i++; //new -GLmethod.vertexAttrib3f = i++; //new -GLmethod.vertexAttrib4f = i++; //new //130 -GLmethod.vertexAttrib1fv = i++; //new -GLmethod.vertexAttrib2fv = i++; //new -GLmethod.vertexAttrib3fv = i++; //new -GLmethod.vertexAttrib4fv = i++; //new -GLmethod.vertexAttribPointer = i++; -GLmethod.viewport = i++; - -export default GLmethod; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLtype.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLtype.js deleted file mode 100644 index 695abcb..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/GLtype.js +++ /dev/null @@ -1,23 +0,0 @@ -const GLtype = {}; - -[ - "GLbitfield", - "GLboolean", - "GLbyte", - "GLclampf", - "GLenum", - "GLfloat", - "GLint", - "GLintptr", - "GLsizei", - "GLsizeiptr", - "GLshort", - "GLubyte", - "GLuint", - "GLushort" -].sort().map((typeName, i) => GLtype[typeName] = 1 >> (i + 1)); - -export default GLtype; - - - diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Program.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Program.js deleted file mode 100644 index 6f5691c..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Program.js +++ /dev/null @@ -1,21 +0,0 @@ -import {getTransferedObjectUUID} from './classUtils'; - -const name = 'WebGLProgram'; - -function uuid(id) { - return getTransferedObjectUUID(name, id); -} - -export default class WebGLProgram { - className = name; - - constructor(id) { - this.id = id; - } - - static uuid = uuid; - - uuid() { - return uuid(this.id); - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Renderbuffer.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Renderbuffer.js deleted file mode 100644 index d3182ae..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Renderbuffer.js +++ /dev/null @@ -1,21 +0,0 @@ -import {getTransferedObjectUUID} from './classUtils'; - -const name = 'WebGLRenderBuffer'; - -function uuid(id) { - return getTransferedObjectUUID(name, id); -} - -export default class WebGLRenderbuffer { - className = name; - - constructor(id) { - this.id = id; - } - - static uuid = uuid; - - uuid() { - return uuid(this.id); - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/RenderingContext.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/RenderingContext.js deleted file mode 100644 index 5f9608f..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/RenderingContext.js +++ /dev/null @@ -1,1191 +0,0 @@ -import GLenum from './GLenum'; -import ActiveInfo from './ActiveInfo'; -import Buffer from './Buffer'; -import Framebuffer from './Framebuffer'; -import Renderbuffer from './Renderbuffer'; -import Texture from './Texture'; -import Program from './Program'; -import Shader from './Shader'; -import ShaderPrecisionFormat from './ShaderPrecisionFormat'; -import UniformLocation from './UniformLocation'; -import GLmethod from './GLmethod'; - -const processArray = (array, checkArrayType = false) => { - - function joinArray(arr, sep) { - let res = ''; - for (let i = 0; i < arr.length; i++) { - if (i !== 0) { - res += sep; - } - res += arr[i]; - } - return res; - } - - let type = 'Float32Array'; - if (checkArrayType) { - if (array instanceof Uint8Array) { - type = 'Uint8Array' - } else if (array instanceof Uint16Array) { - type = 'Uint16Array'; - } else if (array instanceof Uint32Array) { - type = 'Uint32Array'; - } else if (array instanceof Float32Array) { - type = 'Float32Array'; - } else { - throw new Error('Check array type failed. Array type is ' + typeof array); - } - } - - const ArrayTypes = { - Uint8Array: 1, - Uint16Array: 2, - Uint32Array: 4, - Float32Array: 14 - }; - return ArrayTypes[type] + ',' + btoa(joinArray(array, ',')) -} - -export default class WebGLRenderingContext { - - // static GBridge = null; - - className = 'WebGLRenderingContext'; - - constructor(canvas, type, attrs) { - this._canvas = canvas; - this._type = type; - this._version = 'WebGL 1.0'; - this._attrs = attrs; - this._map = new Map(); - - Object.keys(GLenum) - .forEach(name => Object.defineProperty(this, name, { - value: GLenum[name] - })); - } - - get canvas() { - return this._canvas; - } - - activeTexture = function (textureUnit) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.activeTexture + ',' + textureUnit, - true - ); - } - - attachShader = function (progarm, shader) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.attachShader + ',' + progarm.id + ',' + shader.id, - true - ); - } - - bindAttribLocation = function (program, index, name) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.bindAttribLocation + ',' + program.id + ',' + index + ',' + name, - true - ) - } - - bindBuffer = function (target, buffer) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.bindBuffer + ',' + target + ',' + (buffer ? buffer.id : 0), - true - ); - } - - bindFramebuffer = function (target, framebuffer) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.bindFramebuffer + ',' + target + ',' + (framebuffer ? framebuffer.id : 0), - true - ) - } - - bindRenderbuffer = function (target, renderBuffer) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.bindRenderbuffer + ',' + target + ',' + (renderBuffer ? renderBuffer.id : 0), - true - ) - } - - bindTexture = function (target, texture) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.bindTexture + ',' + target + ',' + (texture ? texture.id : 0), - true - ) - } - - blendColor = function (r, g, b, a) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.blendColor + ',' + target + ',' + r + ',' + g + ',' + b + ',' + a, - true - ) - } - - blendEquation = function (mode) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.blendEquation + ',' + mode, - true - ) - } - - blendEquationSeparate = function (modeRGB, modeAlpha) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.blendEquationSeparate + ',' + modeRGB + ',' + modeAlpha, - true - ) - } - - - blendFunc = function (sfactor, dfactor) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.blendFunc + ',' + sfactor + ',' + dfactor, - true - ); - } - - blendFuncSeparate = function (srcRGB, dstRGB, srcAlpha, dstAlpha) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.blendFuncSeparate + ',' + srcRGB + ',' + dstRGB + ',' + srcAlpha + ',' + dstAlpha, - true - ); - } - - bufferData = function (target, data, usage) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.bufferData + ',' + target + ',' + processArray(data, true) + ',' + usage, - true - ) - } - - bufferSubData = function (target, offset, data) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.bufferSubData + ',' + target + ',' + offset + ',' + processArray(data, true), - true - ) - } - - checkFramebufferStatus = function (target) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.checkFramebufferStatus + ',' + target - ); - return Number(result); - } - - clear = function (mask) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.clear + ',' + mask - ); - this._canvas._needRender = true; - } - - clearColor = function (r, g, b, a) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.clearColor + ',' + r + ',' + g + ',' + b, - true - ) - } - - clearDepth = function (depth) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.clearDepth + ',' + depth, - true - ) - } - - clearStencil = function (s) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.clearStencil + ',' + s - ); - } - - colorMask = function (r, g, b, a) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.colorMask + ',' + r + ',' + g + ',' + b + ',' + a - ) - } - - compileShader = function (shader) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.compileShader + ',' + shader.id, - true - ) - } - - compressedTexImage2D = function (target, level, internalformat, width, height, border, pixels) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.compressedTexImage2D + ',' + target + ',' + level + ',' + internalformat + ',' + - width + ',' + height + ',' + border + ',' + processArray(pixels), - true - ) - } - - compressedTexSubImage2D = function (target, level, xoffset, yoffset, width, height, format, pixels) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.compressedTexSubImage2D + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset + ',' + - width + ',' + height + ',' + format + ',' + processArray(pixels), - true - ) - } - - - copyTexImage2D = function (target, level, internalformat, x, y, width, height, border) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.copyTexImage2D + ',' + target + ',' + level + ',' + internalformat + ',' + x + ',' + y + ',' + - width + ',' + height + ',' + border, - true - ); - } - - copyTexSubImage2D = function (target, level, xoffset, yoffset, x, y, width, height) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.copyTexSubImage2D + ',' + target + ',' + level + ',' + xoffset + ',' + yoffset + ',' + x + ',' + y + ',' + - width + ',' + height - ); - } - - createBuffer = function () { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.createBuffer + '' - ); - const buffer = new Buffer(result); - this._map.set(buffer.uuid(), buffer); - return buffer; - } - - createFramebuffer = function () { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.createFramebuffer + '' - ); - const framebuffer = new Framebuffer(result); - this._map.set(framebuffer.uuid(), framebuffer); - return framebuffer; - } - - - createProgram = function () { - const id = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.createProgram + '' - ); - const program = new Program(id); - this._map.set(program.uuid(), program); - return program; - } - - createRenderbuffer = function () { - const id = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.createRenderbuffer + '' - ) - const renderBuffer = new Renderbuffer(id); - this._map.set(renderBuffer.uuid(), renderBuffer); - return renderBuffer; - } - - createShader = function (type) { - const id = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.createShader + ',' + type - ) - const shader = new Shader(id, type); - this._map.set(shader.uuid(), shader); - return shader; - } - - createTexture = function () { - const id = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.createTexture + '' - ); - const texture = new Texture(id); - this._map.set(texture.uuid(), texture); - return texture; - } - - cullFace = function (mode) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.cullFace + ',' + mode, - true - ) - } - - - deleteBuffer = function (buffer) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.deleteBuffer + ',' + buffer.id, - true - ) - } - - deleteFramebuffer = function (framebuffer) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.deleteFramebuffer + ',' + framebuffer.id, - true - ) - } - - deleteProgram = function (program) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.deleteProgram + ',' + program.id, - true - ) - } - - deleteRenderbuffer = function (renderbuffer) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.deleteRenderbuffer + ',' + renderbuffer.id, - true - ) - } - - deleteShader = function (shader) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.deleteShader + ',' + shader.id, - true - ) - } - - deleteTexture = function (texture) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.deleteTexture + ',' + texture.id, - true - ) - } - - depthFunc = function (func) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.depthFunc + ',' + func - ) - } - - depthMask = function (flag) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.depthMask + ',' + Number(flag), - true - ) - } - - depthRange = function (zNear, zFar) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.depthRange + ',' + zNear + ',' + zFar, - true - ) - } - - detachShader = function (program, shader) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.detachShader + ',' + program.id + ',' + shader.id, - true - ) - } - - disable = function (cap) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.disable + ',' + cap, - true - ) - } - - disableVertexAttribArray = function (index) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.disableVertexAttribArray + ',' + index, - true - ); - } - - drawArrays = function (mode, first, count) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.drawArrays + ',' + mode + ',' + first + ',' + count - ) - this._canvas._needRender = true; - } - - drawElements = function (mode, count, type, offset) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.drawElements + ',' + mode + ',' + count + ',' + type + ',' + offset + ';' - ); - this._canvas._needRender = true; - } - - enable = function (cap) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.enable + ',' + cap, - true - ); - } - - enableVertexAttribArray = function (index) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.enableVertexAttribArray + ',' + index, - true - ) - } - - - flush = function () { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.flush + '' - ) - } - - framebufferRenderbuffer = function (target, attachment, textarget, texture, level) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.framebufferRenderbuffer + ',' + target + ',' + attachment + ',' + textarget + ',' + (texture ? texture.id : 0) + ',' + level, - true - ) - } - - framebufferTexture2D = function (target, attachment, textarget, texture, level) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.framebufferTexture2D + ',' + target + ',' + attachment + ',' + textarget + ',' + (texture ? texture.id : 0) + ',' + level, - true - ) - } - - frontFace = function (mode) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.frontFace + ',' + mode, - true - ) - } - - generateMipmap = function (target) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.generateMipmap + ',' + target, - true - ) - } - - getActiveAttrib = function (progarm, index) { - const resultString = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getActiveAttrib + ',' + progarm.id + ',' + index - ) - const [type, size, name] = resultString.split(','); - return new ActiveInfo({ - type: Number(type), - size: Number(size), - name - }); - } - - getActiveUniform = function (progarm, index) { - const resultString = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getActiveUniform + ',' + progarm.id + ',' + index - ); - const [type, size, name] = resultString.split(','); - return new ActiveInfo({ - type: Number(type), - size: Number(size), - name - }) - } - - getAttachedShaders = function (progarm) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getAttachedShaders + ',' + progarm.id - ); - const [type, ...ids] = result; - return ids.map(id => this._map.get(Shader.uuid(id))); - } - - getAttribLocation = function (progarm, name) { - return WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getAttribLocation + ',' + progarm.id + ',' + name - ) - } - - getBufferParameter = function (target, pname) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getBufferParameter + ',' + target + ',' + pname - ); - const [type, res] = getBufferParameter; - return res; - } - - getError = function () { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getError + '' - ) - return result; - } - - getExtension = function (name) { - return null; - } - - getFramebufferAttachmentParameter = function (target, attachment, pname) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getFramebufferAttachmentParameter + ',' + target + ',' + attachment + ',' + pname - ) - switch (pname) { - case GLenum.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: - return this._map.get(Renderbuffer.uuid(result)) || this._map.get(Texture.uuid(result)) || null; - default: - return result; - } - } - - getParameter = function (pname) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getParameter + ',' + pname - ) - switch (pname) { - case GLenum.VERSION: - return this._version; - case GLenum.ARRAY_BUFFER_BINDING: // buffer - case GLenum.ELEMENT_ARRAY_BUFFER_BINDING: // buffer - return this._map.get(Buffer.uuid(result)) || null; - case GLenum.CURRENT_PROGRAM: // program - return this._map.get(Program.uuid(result)) || null; - case GLenum.FRAMEBUFFER_BINDING: // framebuffer - return this._map.get(Framebuffer.uuid(result)) || null; - case GLenum.RENDERBUFFER_BINDING: // renderbuffer - return this._map.get(Renderbuffer.uuid(result)) || null; - case GLenum.TEXTURE_BINDING_2D: // texture - case GLenum.TEXTURE_BINDING_CUBE_MAP: // texture - return this._map.get(Texture.uuid(result)) || null; - case GLenum.ALIASED_LINE_WIDTH_RANGE: // Float32Array - case GLenum.ALIASED_POINT_SIZE_RANGE: // Float32Array - case GLenum.BLEND_COLOR: // Float32Array - case GLenum.COLOR_CLEAR_VALUE: // Float32Array - case GLenum.DEPTH_RANGE: // Float32Array - case GLenum.MAX_VIEWPORT_DIMS: // Int32Array - case GLenum.SCISSOR_BOX: // Int32Array - case GLenum.VIEWPORT: // Int32Array - case GLenum.COMPRESSED_TEXTURE_FORMATS: // Uint32Array - default: - const [type, ...res] = result.split(','); - if (res.length === 1) { - return Number(res[0]); - } else { - return res.map(Number); - } - } - } - - getProgramInfoLog = function (progarm) { - return WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getProgramInfoLog + ',' + progarm.id - ) - } - - getProgramParameter = function (program, pname) { - const res = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getProgramParameter + ',' + program.id + ',' + pname - ); - - const [type, result] = res.split(',').map(i => parseInt(i)); - - if (type === 1) { - return Boolean(result); - } else if (type === 2) { - return result; - } else { - throw new Error('Unrecongized program paramater ' + res + ', type: ' + typeof res); - } - } - - - getRenderbufferParameter = function (target, pname) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getRenderbufferParameter + ',' + target + ',' + pname - ) - return result; - } - - - getShaderInfoLog = function (shader) { - return WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getShaderInfoLog + ',' + shader.id - ); - } - - getShaderParameter = function (shader, pname) { - return WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getShaderParameter + ',' + shader.id + ',' + pname - ) - } - - getShaderPrecisionFormat = function (shaderType, precisionType) { - const [rangeMin, rangeMax, precision] = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getShaderPrecisionFormat + ',' + shaderType + ',' + precisionType - ); - const shaderPrecisionFormat = new ShaderPrecisionFormat({ - rangeMin: Number(rangeMin), - rangeMax: Number(rangeMax), - precision: Number(precision) - }); - return shaderPrecisionFormat; - } - - getShaderSource = function (shader) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getShaderSource + ',' + shader.id - ); - return result; - } - - getSupportedExtensions = function () { - return Object.keys({}); - } - - getTexParameter = function (target, pname) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getTexParameter + ',' + target + ',' + pname - ) - return result; - } - - getUniformLocation = function (program, name) { - const id = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getUniformLocation + ',' + program.id + ',' + name - ); - if (id === -1) { - return null; - } else { - return new UniformLocation(Number(id)); - } - } - - getVertexAttrib = function (index, pname) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getVertexAttrib + ',' + index + ',' + pname - ); - switch (pname) { - case GLenum.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: - return this._map.get(Buffer.uuid(result)) || null; - case GLenum.CURRENT_VERTEX_ATTRIB: // Float32Array - default: - return result; - } - } - - getVertexAttribOffset = function (index, pname) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.getVertexAttribOffset + ',' + index + ',' + pname - ) - return Number(result); - } - - isBuffer = function (buffer) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.isBuffer + ',' + buffer.id - ) - return Boolean(result); - } - - isContextLost = function () { - return false; - } - - isEnabled = function (cap) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.isEnabled + ',' + cap - ) - return Boolean(result); - } - - isFramebuffer = function (framebuffer) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.isFramebuffer + ',' + framebuffer.id - ) - return Boolean(result); - } - - isProgram = function (program) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.isProgram + ',' + program.id - ) - return Boolean(result); - } - - isRenderbuffer = function (renderBuffer) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.isRenderbuffer + ',' + renderbuffer.id - ) - return Boolean(result); - } - - isShader = function (shader) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.isShader + ',' + shader.id - ) - return Boolean(result); - } - - isTexture = function (texture) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.isTexture + ',' + texture.id - ); - return Boolean(result); - } - - lineWidth = function (width) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.lineWidth + ',' + width, - true - ) - } - - linkProgram = function (program) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.linkProgram + ',' + program.id, - true - ); - } - - - pixelStorei = function (pname, param) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.pixelStorei + ',' + pname + ',' + Number(param) - ) - } - - polygonOffset = function (factor, units) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.polygonOffset + ',' + factor + ',' + units - ) - } - - readPixels = function (x, y, width, height, format, type, pixels) { - const result = WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.readPixels + ',' + x + ',' + y + ',' + width + ',' + height + ',' + format + ',' + type - ) - return result; - } - - renderbufferStorage = function (target, internalFormat, width, height) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.renderbufferStorage + ',' + target + ',' + internalFormat + ',' + width + ',' + height, - true - ) - } - - sampleCoverage = function (value, invert) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.sampleCoverage + ',' + value + ',' + Number(invert), - true - ) - } - - scissor = function (x, y, width, height) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.scissor + ',' + x + ',' + y + ',' + width + ',' + height, - true - ) - } - - shaderSource = function (shader, source) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.shaderSource + ',' + shader.id + ',' + source - ) - } - - stencilFunc = function (func, ref, mask) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.stencilFunc + ',' + func + ',' + ref + ',' + mask, - true - ) - } - - stencilFuncSeparate = function (face, func, ref, mask) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.stencilFuncSeparate + ',' + face + ',' + func + ',' + ref + ',' + mask, - true - ) - } - - stencilMask = function (mask) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.stencilMask + ',' + mask, - true - ) - } - - stencilMaskSeparate = function (face, mask) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.stencilMaskSeparate + ',' + face + ',' + mask, - true - ) - } - - stencilOp = function (fail, zfail, zpass) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.stencilOp + ',' + fail + ',' + zfail + ',' + zpass - ) - } - - stencilOpSeparate = function (face, fail, zfail, zpass) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.stencilOp + ',' + face + ',' + fail + ',' + zfail + ',' + zpass, - true - ) - } - - texImage2D = function (...args) { - WebGLRenderingContext.GBridge.texImage2D(this._canvas.id, ...args); - } - - - texParameterf = function (target, pname, param) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.texParameterf + ',' + target + ',' + pname + ',' + param, - true - ) - } - - texParameteri = function (target, pname, param) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.texParameteri + ',' + target + ',' + pname + ',' + param - ) - } - - texSubImage2D = function (...args) { - WebGLRenderingContext.GBridge.texSubImage2D(this._canvas.id, ...args); - } - - uniform1f = function (location, v0) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform1f + ',' + location.id + ',' + v0 - ) - } - - uniform1fv = function (location, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform1fv + ',' + location.id + ',' + processArray(value), - true - ) - } - - uniform1i = function (location, v0) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform1i + ',' + location.id + ',' + v0, - // true - ) - } - - uniform1iv = function (location, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform1iv + ',' + location.id + ',' + processArray(value), - true - ) - } - - uniform2f = function (location, v0, v1) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform2f + ',' + location.id + ',' + v0 + ',' + v1, - true - ) - } - - uniform2fv = function (location, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform2fv + ',' + location.id + ',' + processArray(value), - true - ) - } - - uniform2i = function (location, v0, v1) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform2i + ',' + location.id + ',' + v0 + ',' + v1, - true - ) - } - - uniform2iv = function (location, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform2iv + ',' + location.id + ',' + processArray(value), - true - ) - } - - uniform3f = function (location, v0, v1, v2) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform3f + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2, - true - ) - } - - uniform3fv = function (location, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform3fv + ',' + location.id + ',' + processArray(value), - true - ) - } - - uniform3i = function (location, v0, v1, v2) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform3i + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2, - true - ) - } - - uniform3iv = function (location, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform3iv + ',' + location.id + ',' + processArray(value), - true - ) - } - - uniform4f = function (location, v0, v1, v2, v3) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform4f + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3, - true - ) - } - - uniform4fv = function (location, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform4fv + ',' + location.id + ',' + processArray(value), - true - ) - } - - uniform4i = function (location, v0, v1, v2, v3) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform4i + ',' + location.id + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3, - true - ) - } - - uniform4iv = function (location, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniform4iv + ',' + location.id + ',' + processArray(value, true), - true - ) - } - - uniformMatrix2fv = function (location, transpose, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniformMatrix2fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value), - true - ) - } - - uniformMatrix3fv = function (location, transpose, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniformMatrix3fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value), - true - ) - } - - uniformMatrix4fv = function (location, transpose, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.uniformMatrix4fv + ',' + location.id + ',' + Number(transpose) + ',' + processArray(value), - true - ); - } - - useProgram = function (progarm) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.useProgram + ',' + progarm.id + '', - true - ) - } - - - validateProgram = function (program) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.validateProgram + ',' + program.id, - true - ) - } - - vertexAttrib1f = function (index, v0) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttrib1f + ',' + index + ',' + v0, - true - ) - } - - vertexAttrib2f = function (index, v0, v1) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttrib2f + ',' + index + ',' + v0 + ',' + v1, - true - ) - } - - vertexAttrib3f = function (index, v0, v1, v2) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttrib3f + ',' + index + ',' + v0 + ',' + v1 + ',' + v2, - true - ) - } - - vertexAttrib4f = function (index, v0, v1, v2, v3) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttrib4f + ',' + index + ',' + v0 + ',' + v1 + ',' + v2 + ',' + v3, - true - ) - } - - vertexAttrib1fv = function (index, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttrib1fv + ',' + index + ',' + processArray(value), - true - ) - } - - vertexAttrib2fv = function (index, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttrib2fv + ',' + index + ',' + processArray(value), - true - ) - } - - vertexAttrib3fv = function (index, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttrib3fv + ',' + index + ',' + processArray(value), - true - ) - } - - vertexAttrib4fv = function (index, value) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttrib4fv + ',' + index + ',' + processArray(value), - true - ) - } - - vertexAttribPointer = function (index, size, type, normalized, stride, offset) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.vertexAttribPointer + ',' + index + ',' + size + ',' + type + ',' + Number(normalized) + ',' + stride + ',' + offset, - true - ) - } - - viewport = function (x, y, width, height) { - WebGLRenderingContext.GBridge.callNative( - this._canvas.id, - GLmethod.viewport + ',' + x + ',' + y + ',' + width + ',' + height, - true - ) - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Shader.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Shader.js deleted file mode 100644 index a763886..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Shader.js +++ /dev/null @@ -1,22 +0,0 @@ -import {getTransferedObjectUUID} from './classUtils'; - -const name = 'WebGLShader'; - -function uuid(id) { - return getTransferedObjectUUID(name, id); -} - -export default class WebGLShader { - className = name; - - constructor(id, type) { - this.id = id; - this.type = type; - } - - static uuid = uuid; - - uuid() { - return uuid(this.id); - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ShaderPrecisionFormat.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ShaderPrecisionFormat.js deleted file mode 100644 index 208d6c1..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/ShaderPrecisionFormat.js +++ /dev/null @@ -1,11 +0,0 @@ -export default class WebGLShaderPrecisionFormat { - className = 'WebGLShaderPrecisionFormat'; - - constructor({ - rangeMin, rangeMax, precision - }) { - this.rangeMin = rangeMin; - this.rangeMax = rangeMax; - this.precision = precision; - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Texture.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Texture.js deleted file mode 100644 index de4d806..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/Texture.js +++ /dev/null @@ -1,22 +0,0 @@ -import {getTransferedObjectUUID} from './classUtils'; - -const name = 'WebGLTexture'; - -function uuid(id) { - return getTransferedObjectUUID(name, id); -} - -export default class WebGLTexture { - className = name; - - constructor(id, type) { - this.id = id; - this.type = type; - } - - static uuid = uuid; - - uuid() { - return uuid(this.id); - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/UniformLocation.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/UniformLocation.js deleted file mode 100644 index f5e99dc..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/UniformLocation.js +++ /dev/null @@ -1,22 +0,0 @@ -import {getTransferedObjectUUID} from './classUtils'; - -const name = 'WebGLUniformLocation'; - -function uuid(id) { - return getTransferedObjectUUID(name, id); -} - -export default class WebGLUniformLocation { - className = name; - - constructor(id, type) { - this.id = id; - this.type = type; - } - - static uuid = uuid; - - uuid() { - return uuid(this.id); - } -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/classUtils.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/classUtils.js deleted file mode 100644 index 88716be..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/context-webgl/classUtils.js +++ /dev/null @@ -1,3 +0,0 @@ -export function getTransferedObjectUUID(name, id) { - return `${name.toLowerCase()}-${id}`; -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/canvas.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/canvas.js deleted file mode 100644 index a8d9bb9..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/canvas.js +++ /dev/null @@ -1,74 +0,0 @@ -import GContext2D from '../context-2d/RenderingContext'; -import GContextWebGL from '../context-webgl/RenderingContext'; - -export default class GCanvas { - - // static GBridge = null; - - id = null; - - _needRender = true; - - constructor(id, { disableAutoSwap }) { - this.id = id; - - this._disableAutoSwap = disableAutoSwap; - if (disableAutoSwap) { - this._swapBuffers = () => { - GCanvas.GBridge.render(this.id); - } - } - } - - getContext(type) { - - let context = null; - - if (type.match(/webgl/i)) { - context = new GContextWebGL(this); - - context.componentId = this.id; - - if (!this._disableAutoSwap) { - const render = () => { - if (this._needRender) { - GCanvas.GBridge.render(this.id); - this._needRender = false; - } - } - setInterval(render, 16); - } - - GCanvas.GBridge.callSetContextType(this.id, 1); // 0 for 2d; 1 for webgl - } else if (type.match(/2d/i)) { - context = new GContext2D(this); - - context.componentId = this.id; - -// const render = ( callback ) => { -// -// const commands = context._drawCommands; -// context._drawCommands = ''; -// -// GCanvas.GBridge.render2d(this.id, commands, callback); -// this._needRender = false; -// } -// //draw方法触发 -// context._flush = render; -// //setInterval(render, 16); - - GCanvas.GBridge.callSetContextType(this.id, 0); - } else { - throw new Error('not supported context ' + type); - } - - return context; - - } - - reset() { - GCanvas.GBridge.callReset(this.id); - } - - -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/image.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/image.js deleted file mode 100644 index 9499a51..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/image.js +++ /dev/null @@ -1,96 +0,0 @@ -let incId = 1; - -const noop = function () { }; - -class GImage { - - static GBridge = null; - - constructor() { - this._id = incId++; - this._width = 0; - this._height = 0; - this._src = undefined; - this._onload = noop; - this._onerror = noop; - this.complete = false; - } - - get width() { - return this._width; - } - set width(v) { - this._width = v; - } - - get height() { - return this._height; - } - - set height(v) { - this._height = v; - } - - get src() { - return this._src; - } - - set src(v) { - - if (v.startsWith('//')) { - v = 'http:' + v; - } - - this._src = v; - - GImage.GBridge.perloadImage([this._src, this._id], (data) => { - if (typeof data === 'string') { - data = JSON.parse(data); - } - if (data.error) { - var evt = { type: 'error', target: this }; - this.onerror(evt); - } else { - this.complete = true; - this.width = typeof data.width === 'number' ? data.width : 0; - this.height = typeof data.height === 'number' ? data.height : 0; - var evt = { type: 'load', target: this }; - this.onload(evt); - } - }); - } - - addEventListener(name, listener) { - if (name === 'load') { - this.onload = listener; - } else if (name === 'error') { - this.onerror = listener; - } - } - - removeEventListener(name, listener) { - if (name === 'load') { - this.onload = noop; - } else if (name === 'error') { - this.onerror = noop; - } - } - - get onload() { - return this._onload; - } - - set onload(v) { - this._onload = v; - } - - get onerror() { - return this._onerror; - } - - set onerror(v) { - this._onerror = v; - } -} - -export default GImage; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/tool.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/tool.js deleted file mode 100644 index d3fb398..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/env/tool.js +++ /dev/null @@ -1,24 +0,0 @@ - -export function ArrayBufferToBase64 (buffer) { - var binary = ''; - var bytes = new Uint8ClampedArray(buffer); - for (var len = bytes.byteLength, i = 0; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary); -} - -export function Base64ToUint8ClampedArray(base64String) { - const padding = '='.repeat((4 - base64String.length % 4) % 4); - const base64 = (base64String + padding) - .replace(/\-/g, '+') - .replace(/_/g, '/'); - - const rawData = atob(base64); - const outputArray = new Uint8ClampedArray(rawData.length); - - for (let i = 0; i < rawData.length; ++i) { - outputArray[i] = rawData.charCodeAt(i); - } - return outputArray; -} \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/index.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/index.js deleted file mode 100644 index a34ad58..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/gcanvas/index.js +++ /dev/null @@ -1,39 +0,0 @@ -import GCanvas from './env/canvas'; -import GImage from './env/image'; - -import GWebGLRenderingContext from './context-webgl/RenderingContext'; -import GContext2D from './context-2d/RenderingContext'; - -import GBridgeWeex from './bridge/bridge-weex'; - -export let Image = GImage; - -export let WeexBridge = GBridgeWeex; - -export function enable(el, { bridge, debug, disableAutoSwap, disableComboCommands } = {}) { - - const GBridge = GImage.GBridge = GCanvas.GBridge = GWebGLRenderingContext.GBridge = GContext2D.GBridge = bridge; - - GBridge.callEnable(el.ref, [ - 0, // renderMode: 0--RENDERMODE_WHEN_DIRTY, 1--RENDERMODE_CONTINUOUSLY - -1, // hybridLayerType: 0--LAYER_TYPE_NONE 1--LAYER_TYPE_SOFTWARE 2--LAYER_TYPE_HARDWARE - false, // supportScroll - false, // newCanvasMode - 1, // compatible - 'white',// clearColor - false // sameLevel: newCanvasMode = true && true => GCanvasView and Webview is same level - ]); - - if (debug === true) { - GBridge.callEnableDebug(); - } - if (disableComboCommands) { - GBridge.callEnableDisableCombo(); - } - - var canvas = new GCanvas(el.ref, { disableAutoSwap }); - canvas.width = el.style.width; - canvas.height = el.style.height; - - return canvas; -}; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/package.json b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/package.json deleted file mode 100644 index 53c27a2..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "uqrcode", - "version": "3.6.0", - "description": "", - "main": "uqrcode.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC" -} diff --git a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js b/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js deleted file mode 100644 index 6f83e04..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js +++ /dev/null @@ -1,47 +0,0 @@ -//--------------------------------------------------------------------- -// uQRCode二维码生成插件 v3.6.0 Basic -// -// uQRCode是一款基于Javascript环境开发的二维码生成插件,适用所有Javascript运行环境的前端应用和Node.js。 -// -// Copyright (c) Sansnn uQRCode All rights reserved. -// -// Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// -// github地址: -// https://github.com/Sansnn/uQRCode -// -// npm地址: -// https://www.npmjs.com/package/uqrcodejs -// -// uni-app插件市场地址: -// https://ext.dcloud.net.cn/plugin?id=1287 -// -// 复制使用请保留本段注释,感谢支持开源! -// -//--------------------------------------------------------------------- -//--------------------------------------------------------------------- -// QRCode for JavaScript -// -// Copyright (c) 2009 Kazuhiko Arase -// -// URL: http://www.d-project.com/ -// -// Licensed under the MIT license: -// http://www.opensource.org/licenses/mit-license.php -// -// The word "QR Code" is registered trademark of -// DENSO WAVE INCORPORATED -// http://www.denso-wave.com/qrcode/faqpatent-e.html -// -//--------------------------------------------------------------------- -"use strict";let uQRCode;!function(){function o(o){this.mode=d.MODE_8BIT_BYTE,this.data=o}function e(o,e){this.typeNumber=o,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=new Array}function r(o,e){if(null==o.length)throw new Error(o.length+"/"+e);for(var r=0;r{i(o)}).catch(o=>{n(o)}).finally(()=>{if(e.length){const r=e.shift();o(r.task,r.resolve,r.reject)}else r=!1})}let e=this.waitingQueue=[],r=this.isRunning=!1;this.exec=function(t){return new Promise((i,n)=>{r?e.push({task:t,resolve:i,reject:n}):(r=!0,o(t,i,n))})}}function a(o){this.errMsg=o}function u(o,e){var r=this.data="",t=this.size=200,i=this.typeNumber=-1,n=(this.errorCorrectLevel=s.H,this.useDynamicSize=!1,this.dynamicSize=void 0,this.margin=0),a=(this.backgroundColor="#FFFFFF",this.backgroundImageSrc=void 0,this.backgroundImageWidth=void 0),d=this.backgroundImageHeight=void 0,g=this.backgroundImageX=void 0,l=this.backgroundImageY=void 0,h=(this.backgroundImageAlpha=1,this.backgroundImageBorderRadius=0,this.foregroundColor="#000000",this.foregroundImageSrc=void 0,this.foregroundImageWidth=void 0),c=this.foregroundImageHeight=void 0,m=this.foregroundImageX=void 0,f=this.foregroundImageY=void 0,v=this.foregroundImagePadding=0,C=(this.foregroundImageBackgroundColor="#FFFFFF",this.foregroundImageBorderRadius=0),p=this.foregroundImageShadowOffsetX=0,b=this.foregroundImageShadowOffsetY=0,y=this.foregroundImageShadowBlur=0,k=(this.foregroundImageShadowColor="#808080",this.foregroundPadding=0,this.foregroundRadius=1),I=this.positionProbeBackgroundColor=void 0,w=this.positionProbeForegroundColor=void 0,B=this.separatorColor=void 0,T=this.positionAdjustBackgroundColor=void 0,P=this.positionAdjustForegroundColor=void 0,S=this.timingBackgroundColor=void 0,A=this.timingForegroundColor=void 0,E=this.typeNumberBackgroundColor=void 0,D=this.typeNumberForegroundColor=void 0,N=this.darkBlockColor=void 0,L=(this.style="default",this.patterns=[],this.canvasContext=void 0);this.queue=!1,this.modules=[],this.moduleCount=0,this.drawModules=[];Object.defineProperties(this,{data:{get:()=>(""!==r&&void 0!==r||console.error("[uQRCode]: data must be set!"),r),set(o){r=o}},size:{get:()=>t,set(o){t=Number(o)}},typeNumber:{get:()=>i,set(o){i=Number(o)}},margin:{get:()=>n,set(o){n=Number(o)}},backgroundImageWidth:{get(){return void 0===a?this.dynamicSize:this.useDynamicSize?this.dynamicSize/this.size*a:a},set(o){a=Number(o)}},backgroundImageHeight:{get(){return void 0===d?this.dynamicSize:this.useDynamicSize?this.dynamicSize/this.size*d:d},set(o){d=Number(o)}},backgroundImageX:{get(){return void 0===g?0:this.useDynamicSize?this.dynamicSize/this.size*g:g},set(o){g=Number(o)}},backgroundImageY:{get(){return void 0===l?0:this.useDynamicSize?this.dynamicSize/this.size*l:l},set(o){l=Number(o)}},foregroundImageWidth:{get(){return void 0===h?(this.dynamicSize-2*this.margin)/4:this.useDynamicSize?this.dynamicSize/this.size*h:h},set(o){h=Number(o)}},foregroundImageHeight:{get(){return void 0===c?(this.dynamicSize-2*this.margin)/4:this.useDynamicSize?this.dynamicSize/this.size*c:c},set(o){c=Number(o)}},foregroundImageX:{get(){return void 0===m?this.dynamicSize/2-this.foregroundImageWidth/2:this.useDynamicSize?this.dynamicSize/this.size*m:m},set(o){m=Number(o)}},foregroundImageY:{get(){return void 0===f?this.dynamicSize/2-this.foregroundImageHeight/2:this.useDynamicSize?this.dynamicSize/this.size*f:f},set(o){f=Number(o)}},foregroundImagePadding:{get(){return this.useDynamicSize?this.dynamicSize/this.size*v:v},set(o){v=Number(o)}},foregroundImageBorderRadius:{get(){return this.useDynamicSize?this.dynamicSize/this.size*C:C},set(o){C=Number(o)}},foregroundImageShadowOffsetX:{get(){return this.useDynamicSize?this.dynamicSize/this.size*p:p},set(o){p=Number(o)}},foregroundImageShadowOffsetY:{get(){return this.useDynamicSize?this.dynamicSize/this.size*b:b},set(o){b=Number(o)}},foregroundImageShadowBlur:{get(){return this.useDynamicSize?this.dynamicSize/this.size*y:y},set(o){y=Number(o)}},foregroundRadius:{get:()=>k,set(o){k=o>1?1:o<0?0:o}},positionProbeBackgroundColor:{get(){return I||this.backgroundColor},set(o){I=o}},positionProbeForegroundColor:{get(){return w||this.foregroundColor},set(o){w=o}},separatorColor:{get(){return B||this.backgroundColor},set(o){B=o}},positionAdjustBackgroundColor:{get(){return T||this.backgroundColor},set(o){T=o}},positionAdjustForegroundColor:{get(){return P||this.foregroundColor},set(o){P=o}},timingBackgroundColor:{get(){return S||this.backgroundColor},set(o){S=o}},timingForegroundColor:{get(){return A||this.foregroundColor},set(o){A=o}},typeNumberBackgroundColor:{get(){return E||this.backgroundColor},set(o){E=o}},typeNumberForegroundColor:{get(){return D||this.foregroundColor},set(o){D=o}},darkBlockColor:{get(){return N||this.foregroundColor},set(o){N=o}},canvasContext:{get:()=>(void 0===L&&console.error("[uQRCode]: use drawCanvas, you need to set the canvasContext!"),L),set(o){L=u.getCanvasContext(o)}}}),o&&this.setOptions(o),e&&(this.canvasContext=u.getCanvasContext(e))}o.prototype={getLength:function(o){return this.data.length},write:function(o){for(var e=0;e=7&&this.setupTypeNumber(o),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,r)},setupPositionProbePattern:function(o,e){for(var r=-1;r<=7;r++)if(!(o+r<=-1||this.moduleCount<=o+r))for(var t=-1;t<=7;t++)e+t<=-1||this.moduleCount<=e+t||(this.modules[o+r][e+t]=0<=r&&r<=6&&(0==t||6==t)||0<=t&&t<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=t&&t<=4)},getBestMaskPattern:function(){for(var o=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var t=l.getLostPoint(this);(0==r||o>t)&&(o=t,e=r)}return e},createMovieClip:function(o,e,r){var t=o.createEmptyMovieClip(e,r),i=1;this.make();for(var n=0;n>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=t}for(r=0;r<18;r++){t=!o&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=t}},setupTypeInfo:function(o,e){for(var r=this.errorCorrectLevel<<3|e,t=l.getBCHTypeInfo(r),i=0;i<15;i++){var n=!o&&1==(t>>i&1);i<6?this.modules[i][8]=n:i<8?this.modules[i+1][8]=n:this.modules[this.moduleCount-15+i][8]=n}for(i=0;i<15;i++){n=!o&&1==(t>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=n:i<9?this.modules[8][15-i-1+1]=n:this.modules[8][15-i-1]=n}this.modules[this.moduleCount-8][8]=!o},mapData:function(o,e){for(var r=-1,t=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var u=0;u<2;u++)if(null==this.modules[t][a-u]){var d=!1;n>>i&1));var s=l.getMask(e,t,a-u);s&&(d=!d),this.modules[t][a-u]=d,i--,-1==i&&(n++,i=7)}if(t+=r,t<0||this.moduleCount<=t){t-=r,r=-r;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(o,r,n){for(var a=t.getRSBlocks(o,r),u=new i,d=0;d8*g)throw new Error("code length overflow. ("+u.getLengthInBits()+">"+8*g+")");for(u.getLengthInBits()+4<=8*g&&u.put(0,4);u.getLengthInBits()%8!=0;)u.putBit(!1);for(;!(u.getLengthInBits()>=8*g||(u.put(e.PAD0,8),u.getLengthInBits()>=8*g));)u.put(e.PAD1,8);return e.createBytes(u,a)},e.createBytes=function(o,e){for(var t=0,i=0,n=0,a=new Array(e.length),u=new Array(e.length),d=0;d=0?f.get(v):0}}var C=0;for(h=0;h=0;)e^=l.G15<=0;)e^=l.G18<>>=1;return e},getPatternPosition:function(o){return l.PATTERN_POSITION_TABLE[o-1]},getMask:function(o,e,r){switch(o){case g.PATTERN000:return(e+r)%2==0;case g.PATTERN001:return e%2==0;case g.PATTERN010:return r%3==0;case g.PATTERN011:return(e+r)%3==0;case g.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case g.PATTERN101:return e*r%2+e*r%3==0;case g.PATTERN110:return(e*r%2+e*r%3)%2==0;case g.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+o)}},getErrorCorrectPolynomial:function(o){for(var e=new r([1],0),t=0;t5&&(r+=3+n-5)}for(t=0;t=256;)o-=255;return h.EXP_TABLE[o]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},c=0;c<8;c++)h.EXP_TABLE[c]=1<>>7-o%8&1)},put:function(o,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(o){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),o&&(this.buffer[e]|=128>>>this.length%8),this.length++}},u.errorCorrectLevel=s,u.queue=new n,u.queueLoadImage=new n,u.isQueueLoadImage=!1,u.loadImageCache=[],u.utf16To8=function(o){for(var e,r="",t=0;t=1&&e<=127?r+=o.charAt(t):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},u.deepReplace=function(o={},e={},r=!1){let t;t=r?o:{...o};for(let o in e){var i=e[o];null!=i&&(i.constructor==Object?t[o]=this.deepReplace(t[o],i):i.constructor!=String||i?t[o]=i:t[o]=t[o])}return t},u.getSomePropertyToNewObject=function(o={},e=[]){let r={};return e.forEach(e=>{r[e]=o[e]}),r},u.getCanvasContext=function(o){return o.setFillStyle=o.setFillStyle||function(e){o.fillStyle=e},o.setFontSize=o.setFontSize||function(e){o.font=`${e}px`},o.setTextAlign=o.setTextAlign||function(e){o.textAlign=e},o.setTextBaseline=o.setTextBaseline||function(e){o.textBaseline=e},o.draw=o.draw||function(o,e){e&&e()},o},u.getLoadImage=function(o){return"function"==typeof o?function(e,r=!1){return u.isQueueLoadImage?u.queueLoadImage.exec(()=>new Promise((t,i)=>{setTimeout(()=>{const r=u.loadImageCache.find(o=>o.src==e);r?t(r.img):o(e).then(o=>{u.loadImageCache.push({src:e,img:o}),t(o)}).catch(o=>{i(o)})},r?150:10)})):o(e)}:function(o){return Promise.resolve(o)}};var m=u.loadImage=function(o){return Promise.resolve(o)};Object.defineProperty(u,"loadImage",{get:()=>m,set(o){m=u.getLoadImage(o)}}),u.prototype={setOptions(o){var e,r,t,i,n,a,d,s,g,l,h,c,m,f,v,C,p,b,y,k,I,w,B,T,P,S,A,E,D,N,L,R,z,M,x,_,O,F,H,X,j,Y,Q,G,K,W,q,U,$,J,V,Z,oo,eo,ro,to,io,no,ao;o&&u.deepReplace(this,{data:o.data||o.text,size:o.size,typeNumber:o.typeNumber,errorCorrectLevel:o.errorCorrectLevel,useDynamicSize:o.useDynamicSize,margin:o.margin,backgroundColor:o.backgroundColor||(null===(e=o.background)||void 0===e?void 0:e.color),backgroundImageSrc:o.backgroundImageSrc||(null===(r=o.background)||void 0===r?void 0:null===(t=r.image)||void 0===t?void 0:t.src),backgroundImageWidth:o.backgroundImageWidth||(null===(i=o.background)||void 0===i?void 0:null===(n=i.image)||void 0===n?void 0:n.width),backgroundImageHeight:o.backgroundImageHeight||(null===(a=o.background)||void 0===a?void 0:null===(d=a.image)||void 0===d?void 0:d.height),backgroundImageX:o.backgroundImageX||(null===(s=o.background)||void 0===s?void 0:null===(g=s.image)||void 0===g?void 0:g.x),backgroundImageY:o.backgroundImageY||(null===(l=o.background)||void 0===l?void 0:null===(h=l.image)||void 0===h?void 0:h.y),backgroundImageAlpha:o.backgroundImageAlpha||(null===(c=o.background)||void 0===c?void 0:null===(m=c.image)||void 0===m?void 0:m.alpha),backgroundImageBorderRadius:o.backgroundImageBorderRadius||(null===(f=o.background)||void 0===f?void 0:null===(v=f.image)||void 0===v?void 0:v.borderRadius),foregroundColor:o.foregroundColor||(null===(C=o.foreground)||void 0===C?void 0:C.color),foregroundImageSrc:o.foregroundImageSrc||(null===(p=o.foreground)||void 0===p?void 0:null===(b=p.image)||void 0===b?void 0:b.src),foregroundImageWidth:o.foregroundImageWidth||(null===(y=o.foreground)||void 0===y?void 0:null===(k=y.image)||void 0===k?void 0:k.width),foregroundImageHeight:o.foregroundImageHeight||(null===(I=o.foreground)||void 0===I?void 0:null===(w=I.image)||void 0===w?void 0:w.height),foregroundImageX:o.foregroundImageX||(null===(B=o.foreground)||void 0===B?void 0:null===(T=B.image)||void 0===T?void 0:T.x),foregroundImageY:o.foregroundImageY||(null===(P=o.foreground)||void 0===P?void 0:null===(S=P.image)||void 0===S?void 0:S.y),foregroundImagePadding:o.foregroundImagePadding||(null===(A=o.foreground)||void 0===A?void 0:null===(E=A.image)||void 0===E?void 0:E.padding),foregroundImageBackgroundColor:o.foregroundImageBackgroundColor||(null===(D=o.foreground)||void 0===D?void 0:null===(N=D.image)||void 0===N?void 0:N.backgroundColor),foregroundImageBorderRadius:o.foregroundImageBorderRadius||(null===(L=o.foreground)||void 0===L?void 0:null===(R=L.image)||void 0===R?void 0:R.borderRadius),foregroundImageShadowOffsetX:o.foregroundImageShadowOffsetX||(null===(z=o.foreground)||void 0===z?void 0:null===(M=z.image)||void 0===M?void 0:M.shadowOffsetX),foregroundImageShadowOffsetY:o.foregroundImageShadowOffsetY||(null===(x=o.foreground)||void 0===x?void 0:null===(_=x.image)||void 0===_?void 0:_.shadowOffsetY),foregroundImageShadowBlur:o.foregroundImageShadowBlur||(null===(O=o.foreground)||void 0===O?void 0:null===(F=O.image)||void 0===F?void 0:F.shadowBlur),foregroundImageShadowColor:o.foregroundImageShadowColor||(null===(H=o.foreground)||void 0===H?void 0:null===(X=H.image)||void 0===X?void 0:X.shadowColor),foregroundPadding:o.foregroundPadding,foregroundRadius:o.foregroundRadius,positionProbeBackgroundColor:o.positionProbeBackgroundColor||(null===(j=o.positionProbe)||void 0===j?void 0:j.backgroundColor)||(null===(Y=o.positionDetection)||void 0===Y?void 0:Y.backgroundColor),positionProbeForegroundColor:o.positionProbeForegroundColor||(null===(Q=o.positionProbe)||void 0===Q?void 0:Q.foregroundColor)||(null===(G=o.positionDetection)||void 0===G?void 0:G.foregroundColor),separatorColor:o.separatorColor||(null===(K=o.separator)||void 0===K?void 0:K.color),positionAdjustBackgroundColor:o.positionAdjustBackgroundColor||(null===(W=o.positionAdjust)||void 0===W?void 0:W.backgroundColor)||(null===(q=o.alignment)||void 0===q?void 0:q.backgroundColor),positionAdjustForegroundColor:o.positionAdjustForegroundColor||(null===(U=o.positionAdjust)||void 0===U?void 0:U.foregroundColor)||(null===($=o.alignment)||void 0===$?void 0:$.foregroundColor),timingBackgroundColor:o.timingBackgroundColor||(null===(J=o.timing)||void 0===J?void 0:J.backgroundColor),timingForegroundColor:o.timingForegroundColor||(null===(V=o.timing)||void 0===V?void 0:V.foregroundColor),typeNumberBackgroundColor:o.typeNumberBackgroundColor||(null===(Z=o.typeNumber)||void 0===Z?void 0:Z.backgroundColor)||(null===(oo=o.versionInformation)||void 0===oo?void 0:oo.backgroundColor),typeNumberForegroundColor:o.typeNumberForegroundColor||(null===(eo=o.typeNumber)||void 0===eo?void 0:eo.foregroundColor)||(null===(ro=o.versionInformation)||void 0===ro?void 0:ro.foregroundColor),darkBlockColor:o.darkBlockColor||(null===(to=o.darkBlock)||void 0===to?void 0:to.color),style:o.style,patterns:o.patterns||(null===(io=o.art)||void 0===io?void 0:io.patterns)||(null===(no=o.art)||void 0===no?void 0:null===(ao=no.shape)||void 0===ao?void 0:ao.map(o=>(o.imageSrc=o.image,o))),queue:o.queue},!0)},make(){this.foregroundColor===this.backgroundColor&&console.error("[uQRCode]: foregroundColor and backgroundColor cannot be the same!");var o=new e(this.typeNumber,this.errorCorrectLevel);o.addData(u.utf16To8(this.data.toString())),o.make(),this.typeNumber=o.typeNumber,this.modules=o.modules,this.moduleCount=o.moduleCount;var r=this.size-2*this.margin;this.dynamicSize=Math.ceil(r/o.moduleCount)*o.moduleCount+2*this.margin,this.useDynamicSize||(this.dynamicSize=this.size),this.paintData(),this.paintPositionProbe(),this.paintSeparator(),this.paintTiming(),this.paintPositionAdjust(),this.paintDarkBlock(),this.paintTypeNumber(),this.getDrawModules()},paintData(){let{dynamicSize:o,margin:e,backgroundColor:r,foregroundColor:t,foregroundPadding:i,style:n,modules:a,moduleCount:u}=this,d=(o-2*e)/u,s=d,g=0;i>0&&"liquid"!=n&&"art"!=n&&(g=s*i/2,s-=2*g);for(var l=0;l{var i=o[e[0]][e[1]],a=o[e[0]+n][e[1]],u=o[e[0]][e[1]+n];u.type.push("positionProbe"),a.type.push("positionProbe"),i.type.push("positionProbe"),i.color=1==e[2]?t:r,a.color=1==e[2]?t:r,u.color=1==e[2]?t:r})},paintSeparator(){let{modules:o,moduleCount:e,separatorColor:r}=this;[[7,0],[7,1],[7,2],[7,3],[7,4],[7,5],[7,6],[7,7],[0,7],[1,7],[2,7],[3,7],[4,7],[5,7],[6,7]].forEach(t=>{var i=o[t[0]][t[1]],n=o[e-t[0]-1][t[1]],a=o[t[0]][e-t[1]-1];a.type.push("separator"),n.type.push("separator"),i.type.push("separator"),i.color=r,n.color=r,a.color=r})},paintPositionAdjust(){let{typeNumber:o,modules:e,moduleCount:r,foregroundColor:t,backgroundColor:i,positionAdjustForegroundColor:n,positionAdjustBackgroundColor:a,timingForegroundColor:u,timingBackgroundColor:d}=this;const s=[[],[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]],g=s[o-1];if(g){const o=[[-2,-2,1],[-1,-2,1],[0,-2,1],[1,-2,1],[2,-2,1],[-2,-1,1],[-1,-1,0],[0,-1,0],[1,-1,0],[2,-1,1],[-2,0,1],[-1,0,0],[0,0,1],[1,0,0],[2,0,1],[-2,1,1],[-1,1,0],[0,1,0],[1,1,0],[2,1,1],[-2,2,1],[-1,2,1],[0,2,1],[1,2,1],[2,2,1]],s=g.length;for(let l=0;lr-9-1&&c<9||c>r-9-1&&s<9||o.forEach(o=>{var r=e[s+o[0]][c+o[1]];r.type.push("positionAdjust"),r.type.includes("timing")?1==o[2]?r.color=n==t?u:n:r.color=n==t&&a==i?d:a:r.color=1==o[2]?n:a})}}},paintTiming(){let{modules:o,moduleCount:e,timingForegroundColor:r,timingBackgroundColor:t}=this,i=e-16;for(let e=0;e{var n=e[o[0]][o[1]];n.type.push("typeNumber"),n.color="1"==a[r]?i:t})},getDrawModules(){let o=this.drawModules=[],{modules:e,moduleCount:r,dynamicSize:t,backgroundColor:i,backgroundImageSrc:n,backgroundImageX:a,backgroundImageY:u,backgroundImageWidth:d,backgroundImageHeight:s,backgroundImageAlpha:g,backgroundImageBorderRadius:l,style:h,patterns:c,foregroundImageSrc:m,foregroundImageX:f,foregroundImageY:v,foregroundImageWidth:C,foregroundImageHeight:p,foregroundImagePadding:b,foregroundImageBackgroundColor:y,foregroundImageBorderRadius:k,foregroundImageShadowOffsetX:I,foregroundImageShadowOffsetY:w,foregroundImageShadowBlur:B,foregroundImageShadowColor:T}=this;i&&o.push({name:"background",type:"box",color:i,x:0,y:0,width:t,height:t}),n&&o.push({name:"backgroundImage",type:"image",imageSrc:n,imageSource:"backgroundImageSrc",x:a,y:u,width:d,height:s,alpha:g,borderRadius:l});for(var P=0;Po||0>e||o>=r||e>=r)&&this.modules[o][e].isBlack},drawCanvas(){let{canvasContext:o,foregroundColor:e,backgroundColor:r,queue:t,style:i}=this;if(e===r)return Promise.reject(new a("[uQRCode]: foregroundColor and backgroundColor cannot be the same!"));let n=async(e,r)=>{try{o.draw(!1),await this.styleDefault(),o.draw(!0),setTimeout(e,150)}catch(o){if(!(o instanceof a))throw o;r(o)}};return new Promise((o,e)=>{t?u.queue.exec(()=>new Promise((o,e)=>{n(o,e)})).then(()=>{setTimeout(o,150)}).catch(o=>{e(o)}):n(o,e)})},draw(){return this.drawCanvas()},async styleDefault(){let{drawModules:o,canvasContext:e,backgroundColor:r,margin:t,queue:i}=this;for(var n=0;n0?d.backgroundColor:"rgba(0,0,0,0)"),e.fill(),e.beginPath(),e.moveTo(s+c,g),e.arcTo(s+l,g,s+l,g+h,c),e.arcTo(s+l,g+h,s,g+h,c),e.arcTo(s,g+h,s,g,c),e.arcTo(s,g,s+l,g,c),e.closePath(),e.strokeStyle="rgba(0,0,0,0)",e.stroke(),e.clip();try{m=await u.loadImage(d.imageSrc);e.drawImage(m,d.x,d.y,d.width,d.height)}catch(o){throw console.error(`[uQRCode]: ${d.imageSource} invalid!`),new a(`[uQRCode]: ${d.imageSource} invalid!`)}}}i&&e.draw(!0),e.restore()}}},uQRCode=u,uQRCode.export=function(){var o,e;o="undefined"!=typeof window?window:global,e=uQRCode,"undefined"!=typeof module&&"object"==typeof exports?module.exports=e:"function"==typeof define&&(define.amd||define.cmd)?define(function(){return e}):o.UQRCode=e}}(); -//--------------------------------------------------------------------- -// 默认导出方式,非vite(vue3)使用该方式。 -// ↓ -//--------------------------------------------------------------------- -// uQRCode.export(); -//--------------------------------------------------------------------- -// ES6导出方式,vite(vue3)使用该方式。 -// ↓ -//--------------------------------------------------------------------- -export default uQRCode; \ No newline at end of file diff --git a/uniapp/uni_modules/Sansnn-uQRCode/license.md b/uniapp/uni_modules/Sansnn-uQRCode/license.md deleted file mode 100644 index 261eeb9..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/license.md +++ /dev/null @@ -1,201 +0,0 @@ - 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: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) 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 - - (d) 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 [yyyy] [name of copyright owner] - - 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. diff --git a/uniapp/uni_modules/Sansnn-uQRCode/package.json b/uniapp/uni_modules/Sansnn-uQRCode/package.json deleted file mode 100644 index 39c32ef..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "id": "Sansnn-uQRCode", - "displayName": "uQRCode 全端二维码生成插件 支持nvue 支持nodejs服务端", - "version": "3.6.5", - "description": "uQRCode是一款基于Javascript环境开发的二维码生成插件,适用所有Javascript运行环境的前端应用和Node.js。", - "keywords": [ - "二维码", - "uQRCode", - "qrcode", - "qr" -], - "repository": "https://github.com/Sansnn/uQRCode", - "engines": { - "HBuilderX": "^3.1.0" - }, - "dcloudext": { - "category": [ - "JS SDK", - "通用 SDK" - ], - "sale": { - "regular": { - "price": "0.00" - }, - "sourcecode": { - "price": "0.00" - } - }, - "contact": { - "qq": "" - }, - "declaration": { - "ads": "无", - "data": "无", - "permissions": "无" - }, - "npmurl": "https://www.npmjs.com/package/uqrcodejs" - }, - "uni_modules": { - "dependencies": [], - "encrypt": [], - "platforms": { - "cloud": { - "tcb": "y", - "aliyun": "y" - }, - "client": { - "App": { - "app-vue": "y", - "app-nvue": "y" - }, - "H5-mobile": { - "Safari": "y", - "Android Browser": "y", - "微信浏览器(Android)": "y", - "QQ浏览器(Android)": "y" - }, - "H5-pc": { - "Chrome": "y", - "IE": "y", - "Edge": "y", - "Firefox": "y", - "Safari": "y" - }, - "小程序": { - "微信": "y", - "阿里": "y", - "百度": "y", - "字节跳动": "y", - "QQ": "y" - }, - "快应用": { - "华为": "y", - "联盟": "y" - }, - "Vue": { - "vue2": "y", - "vue3": "y" - } - } - } - } -} diff --git a/uniapp/uni_modules/Sansnn-uQRCode/readme.md b/uniapp/uni_modules/Sansnn-uQRCode/readme.md deleted file mode 100644 index c5c1680..0000000 --- a/uniapp/uni_modules/Sansnn-uQRCode/readme.md +++ /dev/null @@ -1,318 +0,0 @@ -# 介绍 - -`uQRCode`是一款基于`Javascript`环境开发的二维码生成插件,适用所有`Javascript`运行环境的前端应用和`Node.js`应用。 - -`uQRCode`可扩展性高,它支持自定义渲染二维码,可通过`uQRCode API`得到二维码绘制关键信息后,使用`canvas`、`svg`或`js`操作`dom`的方式绘制二维码图案。还可自定义二维码样式,如随机颜色、圆点、方块、块与块之间的间距等。 - -欢迎加入群聊【uQRCode交流群】:[695070434](https://jq.qq.com/?_wv=1027&k=JRjzDqiw)。 - -# 设计器 - -uQRCode发布了配套的可视化设计器,可根据自己喜好在设计器中设计二维码样式,一键生成配置代码复制到项目中,详情请在微信小程序搜索“柚子二维码”,或扫描下方小程序码体验。 - -![uQRCode设计器](https://doc.uqrcode.cn/mp_weixin_code.jpg) - -## 设计器模板示例 - -![uQRCode设计器](https://doc.uqrcode.cn/yz_1.png) -![uQRCode设计器](https://doc.uqrcode.cn/yz_2.png) -![uQRCode设计器](https://doc.uqrcode.cn/yz_3.png) -![uQRCode设计器](https://doc.uqrcode.cn/yz_4.png) -![uQRCode设计器](https://doc.uqrcode.cn/yz_5.png) -![uQRCode设计器](https://doc.uqrcode.cn/yz_6.png) -![uQRCode设计器](https://doc.uqrcode.cn/yz_7.png) -![uQRCode设计器](https://doc.uqrcode.cn/yz_8.png) -![uQRCode设计器](https://doc.uqrcode.cn/yz_9.png) - -# 快速上手 - -> 在`uni-app`中,我们更推荐使用组件方式来生成二维码,组件方式大大提高了页面的可读性以及避开了一些平台容易出问题的地方,当组件无法满足需求的时候,再考虑切换成原生方式。 - -官方文档:[https://doc.uqrcode.cn](https://doc.uqrcode.cn)。 - -github地址:[https://github.com/Sansnn/uQRCode](https://github.com/Sansnn/uQRCode)。 - -npm地址:[https://www.npmjs.com/package/uqrcodejs](https://www.npmjs.com/package/uqrcodejs)。 - -uni-app插件市场地址:[https://ext.dcloud.net.cn/plugin?id=1287](https://ext.dcloud.net.cn/plugin?id=1287)。 - -## 原生方式 - -原生方式仅需要获取`uqrcode.js`文件便可使用。详细配置请移步到:文档 > [原生](https://doc.uqrcode.cn/document/native.html)。 - -### 安装 - -1. 通过`npm`安装,成功后即可使用`import`或`require`进行引用。 -``` bash -# npm安装 -npm install uqrcodejs -# 或者 -npm install @uqrcode/js -``` - -2. 通过项目开源地址获取`uqrcode.js`,下载`uqrcode.js`后,将其复制到您项目指定目录,在页面中引入`uqrcode.js`文件即可开始使用。 - -### 引入 - -- 通过`import`引入。 -``` javascript -// npm安装 -import UQRCode from 'uqrcodejs'; // npm install uqrcodejs -// 或者 -import UQRCode from '@uqrcode/js'; // npm install @uqrcode/js -``` - -- `Node.js`通过`require`引入。 -``` javascript -// npm安装 -const UQRCode = require('uqrcodejs'); // npm install uqrcodejs -// 或者 -const UQRCode = require('@uqrcode/js'); // npm install @uqrcode/js -``` - -- 原生浏览器环境,在js脚本加载时添加到`window`。 -``` html - - -``` - -### 简单用法 - -`uQRCode`基于`Canvas API`封装了一套方法,建议开发者使用`canvas`生成,一键调用,非常方便。以下是示例: - -- HTML部分 -``` html - -``` - -- JS部分 -``` javascript -// 获取uQRCode实例 -var qr = new UQRCode(); -// 设置二维码内容 -qr.data = "https://doc.uqrcode.cn"; -// 设置二维码大小,必须与canvas设置的宽高一致 -qr.size = 200; -// 调用制作二维码方法 -qr.make(); -// 获取canvas元素 -var canvas = document.getElementById("qrcode"); -// 获取canvas上下文 -var canvasContext = canvas.getContext("2d"); -// 设置uQRCode实例的canvas上下文 -qr.canvasContext = canvasContext; -// 调用绘制方法将二维码图案绘制到canvas上 -qr.drawCanvas(); -``` - -### 高级用法 - -考虑到部分平台可能不支持`canvas`,所以`uQRCode`并没有强制要求和`canvas`一起使用,您还可以选择其他方式来生成二维码,例如使用`js`操作`dom`进行绘制或是使用`svg`绘制等。以下是示例: - -- js操作dom -``` html - - - - - uQRCode二维码生成 - - -
- - - - -``` - -- svg -``` html - - - - - uQRCode二维码生成 - - - - - - - -``` - -> 更多用法大家自行探索咯,期待分享哟~ - -### 导出临时文件路径 - -原生方式基于`Canvas`的,请自行参阅各平台`Canvas`的导出方式。以下是部分示例: - -- uni-app -```javascript -// 通过uni.createCanvasContext方式创建绘制上下文的,对应导出API为uni.canvasToTempFilePath -// 调用完ctx.draw()方法后不能第一时间导出,否则会异常,需要有一定的延时 -setTimeout(() => { - uni.canvasToTempFilePath( - { - canvasId: this.canvasId, - fileType: this.fileType, - width: this.canvasWidth, - height: this.canvasHeight, - success: res => { - console.log(res); - }, - fail: err => { - console.log(err); - } - }, - // this // 组件内使用必传当前实例 - ); -}, 300); -``` - -- Canvas2D -```javascript -// 得到base64 -console.log(canvas.toDataURL()); -// 得到buffer -console.log(canvas.toBuffer()); -``` - -### 保存二维码到本地相册 - -必须在导出临时文件路径成功后再执行保存。uni-app通用保存方式(H5除外): -```javascript -uni.saveImageToPhotosAlbum({ - filePath: tempFilePath, - success: res => { - console.log(res); - }, - fail: err => { - console.log(err); - } -}); -``` - -H5可以通过设置``标签`href`属性的方式进行保存: -```javascript -const aEle = document.createElement('a'); -aEle.download = 'uQRCode'; // 设置下载的文件名,默认是'下载' -aEle.href = tempFilePath; -document.body.appendChild(aEle); -aEle.click(); -aEle.remove(); // 下载之后把创建的元素删除 -``` -经过测试,PC端浏览器可以下载,部分安卓自带或第三方浏览器可以下载,安卓微信浏览器不适用,移动端iOS所有浏览器均不适用,差异较大,还是推荐各位导出文件给图片组件显示,然后提示用户通过长按图片进行保存这种方式。 - -## uni-app组件方式 - -### 安装 - -通过uni-app插件市场地址安装:[https://ext.dcloud.net.cn/plugin?id=1287](https://ext.dcloud.net.cn/plugin?id=1287)。详细配置请移步到:文档 > [uni-app组件](https://doc.uqrcode.cn/document/uni-app.html)。 - -### 引入 - -uni-app默认为easycom模式,可直接键入``标签。 - -### 简单用法 - -安装`uqrcode`组件后,在`template`中键入``。设置`ref`属性可使用组件内部方法,`canvas-id`属性为组件内部的canvas组件标识,`value`属性为二维码生成对应内容,`options`为配置选项,可配置二维码样式,绘制Logo等,详见:[options](https://doc.uqrcode.cn/document/uni-app.html#options) 。 - -``` html - -``` - -### 导出临时文件路径 - -为了保证方法调用成功,请在 [complete](https://doc.uqrcode.cn/document/uni-app.html#complete) 事件返回`success=true`后调用。 - -```javascript -// uqrcode为组件的ref名称 -this.$refs.uqrcode.toTempFilePath({ - success: res => { - console.log(res); - } -}); -``` - -### 保存二维码到本地相册 - -为了保证方法调用成功,请在 [complete](https://doc.uqrcode.cn/document/uni-app.html#complete) 事件返回`success=true`后调用。 - -```javascript -// uqrcode为组件的ref名称 -this.$refs.uqrcode.save({ - success: () => { - uni.showToast({ - icon: 'success', - title: '保存成功' - }); - } -}); -``` - -## 更多使用说明请前往官方文档查看:[https://doc.uqrcode.cn](https://doc.uqrcode.cn)。 \ No newline at end of file diff --git a/uniapp/uni_modules/mp-html/README.md b/uniapp/uni_modules/mp-html/README.md deleted file mode 100644 index f825383..0000000 --- a/uniapp/uni_modules/mp-html/README.md +++ /dev/null @@ -1,191 +0,0 @@ -## 为减小组件包的大小,默认组件包中不包含编辑、latex 公式等扩展功能,需要使用扩展功能的请参考下方的 插件扩展 栏的说明 - -## 功能介绍 -- 全端支持(含 `v3、NVUE`) -- 支持丰富的标签(包括 `table`、`video`、`svg` 等) -- 支持丰富的事件效果(自动预览图片、链接处理等) -- 支持设置占位图(加载中、出错时、预览时) -- 支持锚点跳转、长按复制等丰富功能 -- 支持大部分 *html* 实体 -- 丰富的插件(关键词搜索、内容编辑、`latex` 公式等) -- 效率高、容错性强且轻量化 - -查看 [功能介绍](https://jin-yufeng.gitee.io/mp-html/#/overview/feature) 了解更多 - -## 使用方法 -- `uni_modules` 方式 - 1. 点击右上角的 `使用 HBuilder X 导入插件` 按钮直接导入项目或点击 `下载插件 ZIP` 按钮下载插件包并解压到项目的 `uni_modules/mp-html` 目录下 - 2. 在需要使用页面的 `(n)vue` 文件中添加 - ```html - - - ``` - ```javascript - export default { - data() { - return { - html: '
Hello World!
' - } - } - } - ``` - 3. 需要更新版本时在 `HBuilder X` 中右键 `uni_modules/mp-html` 目录选择 `从插件市场更新` 即可 - -- 源码方式 - 1. 从 [github](https://github.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 或 [gitee](https://gitee.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 下载源码 - 插件市场的 **非 uni_modules 版本** 无法更新,不建议从插件市场获取 - 2. 在需要使用页面的 `(n)vue` 文件中添加 - ```html - - ``` - ```javascript - import mpHtml from '@/components/mp-html/mp-html' - export default { - // HBuilderX 2.5.5+ 可以通过 easycom 自动引入 - components: { - mpHtml - }, - data() { - return { - html: '
Hello World!
' - } - } - } - ``` - -- npm 方式 - 1. 在项目根目录下执行 - ```bash - npm install mp-html - ``` - 2. 在需要使用页面的 `(n)vue` 文件中添加 - ```html - - ``` - ```javascript - import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html' - export default { - // 不可省略 - components: { - mpHtml - }, - data() { - return { - html: '
Hello World!
' - } - } - } - ``` - 3. 需要更新版本时执行以下命令即可 - ```bash - npm update mp-html - ``` - - 使用 *cli* 方式运行的项目,通过 *npm* 方式引入时,需要在 *vue.config.js* 中配置 *transpileDependencies*,详情可见 [#330](https://github.com/jin-yufeng/mp-html/issues/330#issuecomment-913617687) - 如果在 **nvue** 中使用还要将 `dist/uni-app/static` 目录下的内容拷贝到项目的 `static` 目录下,否则无法运行 - -查看 [快速开始](https://jin-yufeng.gitee.io/mp-html/#/overview/quickstart) 了解更多 - -## 组件属性 - -| 属性 | 类型 | 默认值 | 说明 | -|:---:|:---:|:---:|---| -| container-style | String | | 容器的样式([2.1.0+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v210)) | -| content | String | | 用于渲染的 html 字符串 | -| copy-link | Boolean | true | 是否允许外部链接被点击时自动复制 | -| domain | String | | 主域名(用于链接拼接) | -| error-img | String | | 图片出错时的占位图链接 | -| lazy-load | Boolean | false | 是否开启图片懒加载 | -| loading-img | String | | 图片加载过程中的占位图链接 | -| pause-video | Boolean | true | 是否在播放一个视频时自动暂停其他视频 | -| preview-img | Boolean | true | 是否允许图片被点击时自动预览 | -| scroll-table | Boolean | false | 是否给每个表格添加一个滚动层使其能单独横向滚动 | -| selectable | Boolean | false | 是否开启文本长按复制 | -| set-title | Boolean | true | 是否将 title 标签的内容设置到页面标题 | -| show-img-menu | Boolean | true | 是否允许图片被长按时显示菜单 | -| tag-style | Object | | 设置标签的默认样式 | -| use-anchor | Boolean | false | 是否使用锚点链接 | - -查看 [属性](https://jin-yufeng.gitee.io/mp-html/#/basic/prop) 了解更多 - -## 组件事件 - -| 名称 | 触发时机 | -|:---:|---| -| load | dom 树加载完毕时 | -| ready | 图片加载完毕时 | -| error | 发生渲染错误时 | -| imgtap | 图片被点击时 | -| linktap | 链接被点击时 | -| play | 音视频播放时 | - -查看 [事件](https://jin-yufeng.gitee.io/mp-html/#/basic/event) 了解更多 - -## api -组件实例上提供了一些 `api` 方法可供调用 - -| 名称 | 作用 | -|:---:|---| -| in | 将锚点跳转的范围限定在一个 scroll-view 内 | -| navigateTo | 锚点跳转 | -| getText | 获取文本内容 | -| getRect | 获取富文本内容的位置和大小 | -| setContent | 设置富文本内容 | -| imgList | 获取所有图片的数组 | -| pauseMedia | 暂停播放音视频([2.2.2+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v222)) | -| setPlaybackRate | 设置音视频播放速率([2.4.0+](https://jin-yufeng.gitee.io/mp-html/#/changelog/changelog#v240)) | - -查看 [api](https://jin-yufeng.gitee.io/mp-html/#/advanced/api) 了解更多 - -## 插件扩展 -除基本功能外,本组件还提供了丰富的扩展,可按照需要选用 - -| 名称 | 作用 | -|:---:|---| -| audio | 音乐播放器 | -| editable | 富文本 **编辑**([示例项目](https://mp-html.oss-cn-hangzhou.aliyuncs.com/editable.zip)) | -| emoji | 解析 emoji | -| highlight | 代码块高亮显示 | -| markdown | 渲染 markdown | -| search | 关键词搜索 | -| style | 匹配 style 标签中的样式 | -| txv-video | 使用腾讯视频 | -| img-cache | 图片缓存 by [@PentaTea](https://github.com/PentaTea) | -| latex | 渲染 latex 公式 by [@Zeng-J](https://github.com/Zeng-J) | - -从插件市场导入的包中 **不含有** 扩展插件,使用插件需通过微信小程序 `富文本插件` 获取或参考以下方法进行打包: -1. 获取完整组件包 - ```bash - npm install mp-html - ``` -2. 编辑 `tools/config.js` 中的 `plugins` 项,选择需要的插件 -3. 生成新的组件包 - 在 `node_modules/mp-html` 目录下执行 - ```bash - npm install - npm run build:uni-app - ``` -4. 拷贝 `dist/uni-app` 中的内容到项目根目录 - -查看 [插件](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin) 了解更多 - -## 关于 nvue -`nvue` 使用原生渲染,不支持部分 `css` 样式,为实现和 `html` 相同的效果,组件内部通过 `web-view` 进行渲染,性能上差于原生,根据 `weex` 官方建议,`web` 标签仅应用在非常规的降级场景。因此,如果通过原生的方式(如 `richtext`)能够满足需要,则不建议使用本组件,如果有较多的富文本内容,则可以直接使用 `vue` 页面 -由于渲染方式与其他端不同,有以下限制: -1. 不支持 `lazy-load` 属性 -2. 视频不支持全屏播放 -3. 如果在 `flex-direction: row` 的容器中使用,需要给组件设置宽度或设置 `flex: 1` 占满剩余宽度 - -纯 `nvue` 模式下,[此问题](https://ask.dcloud.net.cn/question/119678) 修复前,不支持通过 `uni_modules` 引入,需要本地引入(将 [dist/uni-app](https://github.com/jin-yufeng/mp-html/tree/master/dist/uni-app) 中的内容拷贝到项目根目录下) - -## 立即体验 -![富文本插件](https://mp-html.oss-cn-hangzhou.aliyuncs.com/qrcode.jpg) - -## 问题反馈 -遇到问题时,请先查阅 [常见问题](https://jin-yufeng.gitee.io/mp-html/#/question/faq) 和 [issue](https://github.com/jin-yufeng/mp-html/issues) 中是否已有相同的问题 -可通过 [issue](https://github.com/jin-yufeng/mp-html/issues/new/choose) 、插件问答或发送邮件到 [mp_html@126.com](mailto:mp_html@126.com) 提问,不建议在评论区提问(不方便回复) -提问请严格按照 [issue 模板](https://github.com/jin-yufeng/mp-html/issues/new/choose) ,描述清楚使用环境、`html` 内容或可复现的 `demo` 项目以及复现方式,对于 **描述不清**、**无法复现** 或重复的问题将不予回复 - -欢迎加入 `QQ` 交流群:`699734691` - -查看 [问题反馈](https://jin-yufeng.gitee.io/mp-html/#/question/feedback) 了解更多 diff --git a/uniapp/uni_modules/mp-html/changelog.md b/uniapp/uni_modules/mp-html/changelog.md deleted file mode 100644 index b18cda7..0000000 --- a/uniapp/uni_modules/mp-html/changelog.md +++ /dev/null @@ -1,114 +0,0 @@ -## v2.4.0(2022-08-27) -1. `A` 增加了 [setPlaybackRate](https://jin-yufeng.gitee.io/mp-html/#/advanced/api#setPlaybackRate) 的 `api`,可以设置音视频的播放速率 [详细](https://github.com/jin-yufeng/mp-html/issues/452) -2. `A` 示例小程序代码开源 [详细](https://github.com/jin-yufeng/mp-html-demo) -3. `U` 优化 `ready` 事件触发时机,未设置懒加载的情况下基本可以准确触发 [详细](https://github.com/jin-yufeng/mp-html/issues/195) -4. `U` `highlight` 插件在编辑状态下不进行高亮处理,便于编辑 -5. `F` 修复了 `flex` 布局下图片大小可能不正确的问题 -6. `F` 修复了 `selectable` 属性没有设置 `force` 也可能出现渲染异常的问题 -7. `F` 修复了表格中的图片大小可能不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/448) -8. `F` 修复了含有合并单元格的表格可能无法设置竖直对齐的问题 -9. `F` 修复了 `editable` 插件在 `scroll-view` 中使用时工具条位置可能不正确的问题 -10. `F` 修复了 `vue3` 使用 [search](advanced/plugin#search) 插件可能导致错误换行的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/449) -## v2.3.2(2022-08-13) -1. `A` 增加 [latex](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#latex) 插件,可以渲染数学公式 [详细](https://github.com/jin-yufeng/mp-html/pull/447) by [@Zeng-J](https://github.com/Zeng-J) -2. `U` 优化根节点下有很多标签的长内容渲染速度 -3. `U` `highlight` 插件适配 `lang-xxx` 格式 -4. `F` 修复了 `table` 标签设置 `border` 属性后可能无法修改边框样式的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/439) by [@zouxingjie](https://github.com/zouxingjie) -5. `F` 修复了 `editable` 插件输入连续空格无效的问题 -6. `F` 修复了 `vue3` 图片设置 `inline` 会报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/438) -7. `F` 修复了 `vue3` 使用 `table` 可能报错的问题 -## v2.3.1(2022-05-20) -1. `U` `app` 端支持使用本地图片 -2. `U` 优化了微信小程序 `selectable` 属性在 `ios` 端的处理 [详细](https://jin-yufeng.gitee.io/mp-html/#/basic/prop#selectable) -3. `F` 修复了 `editable` 插件不在顶部时 `tooltip` 位置可能错误的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/430) -4. `F` 修复了 `vue3` 运行到微信小程序可能报错丢失内容的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/414) -5. `F` 修复了 `vue3` 部分标签可能被错误换行的问题 -6. `F` 修复了 `editable` 插件 `app` 端插入视频无法预览的问题 -## v2.3.0(2022-04-01) -1. `A` 增加了 `play` 事件,音视频播放时触发,可用于与页面其他音视频进行互斥播放 [详细](basic/event#play) -2. `U` `show-img-menu` 属性支持控制预览时是否长按弹出菜单 -3. `U` 优化 `wxs` 处理,提高渲染性能 [详细](https://developers.weixin.qq.com/community/develop/article/doc/0006cc2b204740f601bd43fa25a413) -4. `U` `video` 标签支持 `object-fit` 属性 -5. `U` 增加支持一些常用实体编码 [详细](https://github.com/jin-yufeng/mp-html/issues/418) -6. `F` 修复了图片仅设置高度可能不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/410) -7. `F` 修复了 `video` 标签高度设置为 `auto` 不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/411) -8. `F` 修复了使用 `grid` 布局时可能样式错误的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/413) -9. `F` 修复了含有合并单元格的表格部分情况下显示异常的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/417) -10. `F` 修复了 `editable` 插件连续插入内容时顺序不正确的问题 -11. `F` 修复了 `uni-app` 包 `vue3` 使用 `audio` 插件报错的问题 -12. `F` 修复了 `uni-app` 包 `highlight` 插件使用自定义的 `prism.min.js` 报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/416) -## v2.2.2(2022-02-26) -1. `A` 增加了 [pauseMedia](https://jin-yufeng.gitee.io/mp-html/#/advanced/api#pauseMedia) 的 `api`,可用于暂停播放音视频 [详细](https://github.com/jin-yufeng/mp-html/issues/317) -2. `U` 优化了长内容的加载速度 -3. `U` 适配 `vue3` [#389](https://github.com/jin-yufeng/mp-html/issues/389)、[#398](https://github.com/jin-yufeng/mp-html/pull/398) by [@zhouhuafei](https://github.com/zhouhuafei)、[#400](https://github.com/jin-yufeng/mp-html/issues/400) -4. `F` 修复了小程序端图片高度设置为百分比时可能不显示的问题 -5. `F` 修复了 `highlight` 插件部分情况下可能显示不完整的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/403) -## v2.2.1(2021-12-24) -1. `A` `editable` 插件增加上下移动标签功能 -2. `U` `editable` 插件支持在文本中间光标处插入内容 -3. `F` 修复了 `nvue` 端设置 `margin` 后可能导致高度不正确的问题 -4. `F` 修复了 `highlight` 插件使用压缩版的 `prism.css` 可能导致背景失效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/367) -5. `F` 修复了编辑状态下使用 `emoji` 插件内容为空时可能报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/371) -6. `F` 修复了使用 `editable` 插件后将 `selectable` 属性设置为 `force` 不生效的问题 -## v2.2.0(2021-10-12) -1. `A` 增加 `customElements` 配置项,便于添加自定义功能性标签 [详细](https://github.com/jin-yufeng/mp-html/issues/350) -2. `A` `editable` 插件增加切换音视频自动播放状态的功能 [详细](https://github.com/jin-yufeng/mp-html/pull/341) by [@leeseett](https://github.com/leeseett) -3. `A` `editable` 插件删除媒体标签时触发 `remove` 事件,便于删除已上传的文件 -4. `U` `editable` 插件 `insertImg` 方法支持同时插入多张图片 [详细](https://github.com/jin-yufeng/mp-html/issues/342) -5. `U` `editable` 插入图片和音视频时支持拼接 `domian` 主域名 -6. `F` 修复了内部链接参数中包含 `://` 时被认为是外部链接的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/356) -7. `F` 修复了部分 `svg` 标签名或属性名大小写不正确时不生效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/351) -8. `F` 修复了 `nvue` 页面运行到非 `app` 平台时可能样式错误的问题 -## v2.1.5(2021-08-13) -1. `A` 增加支持标签的 `dir` 属性 -2. `F` 修复了 `ruby` 标签文字与拼音没有居中对齐的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/325) -3. `F` 修复了音视频标签内有 `a` 标签时可能无法播放的问题 -4. `F` 修复了 `externStyle` 中的 `class` 名包含下划线或数字时可能失效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/326) -5. `F` 修复了 `h5` 端引入 `externStyle` 可能不生效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/326) -## v2.1.4(2021-07-14) -1. `F` 修复了 `rt` 标签无法设置样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/318) -2. `F` 修复了表格中有单元格同时合并行和列时可能显示不正确的问题 -3. `F` 修复了 `app` 端无法关闭图片长按菜单的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/322) -4. `F` 修复了 `editable` 插件只能添加图片链接不能修改的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/312) by [@leeseett](https://github.com/leeseett) -## v2.1.3(2021-06-12) -1. `A` `editable` 插件增加 `insertTable` 方法 -2. `U` `editable` 插件支持编辑表格中的空白单元格 [详细](https://github.com/jin-yufeng/mp-html/issues/310) -3. `F` 修复了 `externStyle` 中使用伪类可能失效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/298) -4. `F` 修复了多个组件同时使用时 `tag-style` 属性时可能互相影响的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/305) by [@woodguoyu](https://github.com/woodguoyu) -5. `F` 修复了包含 `linearGradient` 的 `svg` 可能无法显示的问题 -6. `F` 修复了编译到头条小程序时可能报错的问题 -7. `F` 修复了 `nvue` 端不触发 `click` 事件的问题 -8. `F` 修复了 `editable` 插件尾部插入时无法撤销的问题 -9. `F` 修复了 `editable` 插件的 `insertHtml` 方法只能在末尾插入的问题 -10. `F` 修复了 `editable` 插件插入音频不显示的问题 -## v2.1.2(2021-04-24) -1. `A` 增加了 [img-cache](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#img-cache) 插件,可以在 `app` 端缓存图片 [详细](https://github.com/jin-yufeng/mp-html/issues/292) by [@PentaTea](https://github.com/PentaTea) -2. `U` 支持通过 `container-style` 属性设置 `white-space` 来保留连续空格和换行符 [详细](https://jin-yufeng.gitee.io/mp-html/#/question/faq#space) -3. `U` 代码风格符合 [standard](https://standardjs.com) 标准 -4. `U` `editable` 插件编辑状态下支持预览视频 [详细](https://github.com/jin-yufeng/mp-html/issues/286) -5. `F` 修复了 `svg` 标签内嵌 `svg` 时无法显示的问题 -6. `F` 修复了编译到支付宝和头条小程序时部分区域不可复制的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/291) -## v2.1.1(2021-04-09) -1. 修复了对 `p` 标签设置 `tag-style` 可能不生效的问题 -2. 修复了 `svg` 标签中的文本无法显示的问题 -3. 修复了使用 `editable` 插件编辑表格时可能报错的问题 -4. 修复了使用 `highlight` 插件运行到头条小程序时可能没有样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/280) -5. 修复了使用 `editable` 插件 `editable` 属性为 `false` 时会报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/284) -6. 修复了 `style` 插件连续子选择器失效的问题 -7. 修复了 `editable` 插件无法修改图片和字体大小的问题 -## v2.1.0.2(2021-03-21) -修复了 `nvue` 端使用可能报错的问题 -## v2.1.0(2021-03-20) -1. `A` 增加了 [container-style](https://jin-yufeng.gitee.io/mp-html/#/basic/prop#container-style) 属性 [详细](https://gitee.com/jin-yufeng/mp-html/pulls/1) -2. `A` 增加支持 `strike` 标签 -3. `A` `editable` 插件增加 `placeholder` 属性 [详细](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#editable) -4. `A` `editable` 插件增加 `insertHtml` 方法 [详细](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#editable) -5. `U` 外部样式支持标签名选择器 [详细](https://jin-yufeng.gitee.io/mp-html/#/overview/quickstart#setting) -6. `F` 修复了 `nvue` 端部分情况下可能不显示的问题 -## v2.0.5(2021-03-12) -1. `U` [linktap](https://jin-yufeng.gitee.io/mp-html/#/basic/event#linktap) 事件增加返回内部文本内容 `innerText` [详细](https://github.com/jin-yufeng/mp-html/issues/271) -2. `U` [selectable](https://jin-yufeng.gitee.io/mp-html/#/basic/prop#selectable) 属性设置为 `force` 时能够在微信 `iOS` 端生效(文本块会变成 `inline-block`) [详细](https://github.com/jin-yufeng/mp-html/issues/267) -3. `F` 修复了部分情况下竖向无法滚动的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/182) -4. `F` 修复了多次修改富文本数据时部分内容可能不显示的问题 -5. `F` 修复了 [腾讯视频](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#txv-video) 插件可能无法播放的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/265) -6. `F` 修复了 [highlight](https://jin-yufeng.gitee.io/mp-html/#/advanced/plugin#highlight) 插件没有设置高亮语言时没有应用默认样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/276) by [@fuzui](https://github.com/fuzui) diff --git a/uniapp/uni_modules/mp-html/components/mp-html/mp-html.vue b/uniapp/uni_modules/mp-html/components/mp-html/mp-html.vue deleted file mode 100644 index e88d8eb..0000000 --- a/uniapp/uni_modules/mp-html/components/mp-html/mp-html.vue +++ /dev/null @@ -1,493 +0,0 @@ - - - - - diff --git a/uniapp/uni_modules/mp-html/components/mp-html/node/node.vue b/uniapp/uni_modules/mp-html/components/mp-html/node/node.vue deleted file mode 100644 index ea72b5c..0000000 --- a/uniapp/uni_modules/mp-html/components/mp-html/node/node.vue +++ /dev/null @@ -1,576 +0,0 @@ -