云开发WIFI流量主广告分成小程序,引爆全民流量时代

  • yihaisky
    了解作者
  • vue.js
    开发工具
  • 5.9MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 10 积分
    下载积分
  • 0
    下载次数
  • 2022-12-02 12:41
    上传日期
适用顾客到线下实体店消费时有连接WiFi的需求,传统的方式是商家直接告诉你WiFi密码或者将WiFi密码贴在墙上。 顾客用手机找到商家对应的WiFi输入密码进行连接(这种方式费时费力,密码复杂点的还容易输入错误)。 超便捷:商家使用微云WiFi后,只需将微信小程序生成的WiFi二维码贴在墙上或者餐桌上,用户微信扫码即可连接商户WiFi(无需输入密码,连接简单方便)。 适用范围: WiFi + 餐饮美食、WiFi + 医院 、WiFi + 民宿酒店 、WiFi + 酒吧KTV 、WiFi + 台球室、WiFi + 游乐园、WiFi + 银行 、WiFi + 学校等WiFi + 汽车店、WiFi + 办公培训、WiFi +理发店。 几乎涉及所有场景,覆盖你所能想到的一切线下实体行业。 【体验小程序】 请微信搜索“公共场所共享WIFI”
云开发WIFI流量主广告分成小程序.zip
内容介绍
![XML ⇔ JS/JSON](http://nashwaan.github.io/xml-js/images/logo.svg) Convert XML text to Javascript object / JSON text (and vice versa). [![Build Status](https://ci.appveyor.com/api/projects/status/0ky9f115m0f0r0gf?svg=true)](https://ci.appveyor.com/project/nashwaan/xml-js) [![Build Status](https://travis-ci.org/nashwaan/xml-js.svg?branch=master)](https://travis-ci.org/nashwaan/xml-js) [![Build Status](https://img.shields.io/circleci/project/nashwaan/xml-js.svg)](https://circleci.com/gh/nashwaan/xml-js) <!-- [![pipeline status](https://gitlab.com/nashwaan/xml-js/badges/master/pipeline.svg)](https://gitlab.com/nashwaan/xml-js/commits/master) --> [![Coverage Status](https://coveralls.io/repos/github/nashwaan/xml-js/badge.svg?branch=master)](https://coveralls.io/github/nashwaan/xml-js?branch=master) [![codecov](https://codecov.io/gh/nashwaan/xml-js/branch/master/graph/badge.svg)](https://codecov.io/gh/nashwaan/xml-js) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/f6ed5dd79a5b4041bfd2732963c4d09b)](https://www.codacy.com/app/ysf953/xml-js?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=nashwaan/xml-js&amp;utm_campaign=Badge_Grade) [![Code Climate](https://codeclimate.com/github/nashwaan/xml-js/badges/gpa.svg)](https://codeclimate.com/github/nashwaan/xml-js) [![npm](http://img.shields.io/npm/v/xml-js.svg)](https://www.npmjs.com/package/xml-js) [![License](https://img.shields.io/npm/l/xml-js.svg)](LICENSE) [![Downloads/month](https://img.shields.io/npm/dm/xml-js.svg)](http://www.npmtrends.com/xml-js) [![Dependency Status](https://david-dm.org/nashwaan/xml-js.svg)](https://david-dm.org/nashwaan/xml-js) [![Package Quality](http://npm.packagequality.com/shield/xml-js.svg)](http://packagequality.com/#?package=xml-js) # Synopsis ![Convert XML ↔ JS/JSON as compact or non-compact](http://nashwaan.github.io/xml-js/images/synopsis.svg) <!---![Convert XML ↔ JS/JSON as compact or non-compact](/synopsis.png?raw=true "Synopsis Diagram")--> # Features * **Maintain Order of Elements**: Most libraries will convert `<a/ rel='nofollow' onclick='return false;'><b/><a/ rel='nofollow' onclick='return false;'>` to `{a:[{},{}],b:{}}` which merges any node of same name into an array. This library can create the following to preserve the order of elements: `{"elements":[{"type":"element","name":"a"},{"type":"element","name":"b"},{"type":"element","name":"a"}]}`. This is very important and it is the main reason why this library was created. Read also [Compact vs Non-Compact](#compact-vs-non-compact) for more info. * **Fully XML Compliant**: Can parse: elements, attributes, texts, comments, CData, DOCTYPE, XML declarations, and Processing Instructions. * **Reversible**: Whether converting xml→json or json→xml, the result can be converted back to its original form. * **Minimal Dependencies**: This library depends only on one external npm module. * **Change Property Key Name**: Usually output of XML attributes are stored in `@attr`, `_atrr`, `$attr` or `$` in order to avoid conflicting with name of sub-elements. This library store them in `attributes`, but most importantly, you can change this to whatever you like. * **Support Upwards Traversal**: By setting `{addParent: true}` option, an extra property named `parent` will be generated along each element so that its parent can be referenced. Therefore, anywhere during the traversal of an element, its children **and** its parent can be easily accessed. * **Support Command Line**: To quickly convert xml or json files, this module can be installed globally or locally (i.e. use it as [script](https://docs.npmjs.com/misc/scripts) in package.json). * **Customize Processing using Callback Hooks**: [Custom functions](#options-for-custom-processing-functions) can be supplied to do additional processing for different parts of xml or json (like cdata, comments, elements, attributes ...etc). * **Portable Code**: Written purely in JavaScript which means it can be used in Node environment and **browser** environment (via bundlers like browserify/JSPM/Webpack). * **Typings Info Included**: Support type checking and code suggestion via intellisense. Thanks to the wonderful efforts by [DenisCarriere](https://github.com/DenisCarriere). ## Compact vs Non-Compact Most XML to JSON converters (including online converters) convert `<a/ rel='nofollow' onclick='return false;'>` to some compact output like `{"a":{}}` instead of non-compact output like `{"elements":[{"type":"element","name":"a"}]}`. While compact output might work in most situations, there are cases when elements of different names are mixed inside a parent element. Lets use `<a x="1"/ rel='nofollow' onclick='return false;'><b x="2"/><a x="3"/ rel='nofollow' onclick='return false;'>` as an example. Most converters will produce compact output like this `{a:[{_:{x:"1"}},{_:{x:"3"}}], b:{_:{x:"2"}}}`, which has merged both `<a rel='nofollow' onclick='return false;'>` elements into an array. If you try to convert this back to xml, you will get `<a x="1"/ rel='nofollow' onclick='return false;'><a x="3"/ rel='nofollow' onclick='return false;'><b x="2"/>` which has not preserved the order of elements! The reason behind this behavior is due to the inherent limitation in the compact representation. Because output like `{a:{_:{x:"1"}}, b:{_:{x:"2"}}, a:{_:{x:"3"}}}` is illegal (same property name `a` should not appear twice in an object). This leaves no option but to use array `{a:[{_:{x:"1"}},{_:{x:"3"}}]`. The non-compact output, which is supported by this library, will produce more information and always guarantees the order of the elements as they appeared in the XML file. Another drawback of compact output is the resultant element can be an object or an array and therefore makes the client code a little awkward in terms of the extra check needed on object type before processing. NOTE: Although non-compact output is more accurate representation of original XML than compact version, the non-compact version is verbose and consumes more space. This library provides both options. Use `{compact: false}` if you are not sure because it preserves everything; otherwise use `{compact: true}` if you want to save space and you don't care about mixing elements of same name and losing their order. Tip: You can reduce the output size by using shorter [key names](#options-for-changing-key-names). # Usage ## Installation ``` npm install --save xml-js ``` You can also install it globally to use it as a command line convertor (see [Command Line](#command-line)). ``` npm install --global xml-js ``` ## Quick start ```js var convert = require('xml-js'); var xml = '<?xml version="1.0" encoding="utf-8"?>' + '<note importance="high" logged="true">' + ' <title>Happy</title>' + ' <todo>Work</todo>' + ' <todo>Play</todo>' + '</note>'; var result1 = convert.xml2json(xml, {compact: true, spaces: 4}); var result2 = convert.xml2json(xml, {compact: false, spaces: 4}); console.log(result1, '\n', result2); ``` To see the result of this code, see the output above in [Synopsis](#synopsis) section. Or [run and edit](https://runkit.com/587874e079a2f60013c1f5ac/587874e079a2f60013c1f5ad) this code live in the browser. ## Sample Conversions | XML | JS/JSON compact | JS/JSON non-compact | |:----|:----------------|:--------------------| | `<a/ rel='nofollow' onclick='return false;'>` | `{"a":{}}` | `{"elements":[{"type":"element","name":"a"}]}` | | `<a/ rel='nofollow' onclick='return false;'><b/>` | `{"a":{},"b":{}}` | `{"elements":[{"type":"element","name":"a"},{"type":"element","name":"b"}]}` | | `<a rel='nofollow' onclick='return false;'><b/></a>` | `{"a":{"b":{}}}` | `{"elements":[{"type":"element","name":"a","elements":[{"type":"element","name":"b"}]}]}` | | `<a rel='nofollow' onclick='return false;'> Hi </a>` | `{"a":{"_text":" Hi "}}` | `{"elements":[{"type":"element","name":"a","elements":[{"type":"text","text":" Hi "}]}]}` | | `<a x="1.234" y="It's"/ rel='nofollow' onclick='return false;'>` | `{"a":{"_attributes":{"x":"1.234","y":"It's"}}}` | `{"elements":[{"type":"element","name":"a","attributes":{"x":"1.234","y":"It's"}}]}` | | `<?xml?>` | `{"_declaration":{}}` | `{"declaration":{}}` | | `<?go there?>` | `{"_instruction":{"go":"there"}}` | `{"elements":[{"type":"instruction","name":"go","instruction":"there"}]}` | | `<?xml version="1.0" encoding="utf-8"?>` | `{"_declaration":{"_attributes":{"version":"1.0","encoding":"utf-8"}}}` | `{"declaration":
评论
    相关推荐