Bladeren bron

第一次

lkg 1 jaar geleden
commit
041d6b0e56
100 gewijzigde bestanden met toevoegingen van 22609 en 0 verwijderingen
  1. 1 0
      .gitignore
  2. 8 0
      .idea/.gitignore
  3. 6 0
      .idea/git_toolbox_blame.xml
  4. 9 0
      .idea/mallstore.iml
  5. 10 0
      .idea/misc.xml
  6. 8 0
      .idea/modules.xml
  7. 0 0
      .idea/sonarlint/issuestore/f/a/fa288d1472d29beccb489a676f68739ad365fc47
  8. 3 0
      .idea/sonarlint/issuestore/index.pb
  9. 0 0
      .idea/sonarlint/securityhotspotstore/f/a/fa288d1472d29beccb489a676f68739ad365fc47
  10. 3 0
      .idea/sonarlint/securityhotspotstore/index.pb
  11. 6 0
      .idea/vcs.xml
  12. 11 0
      .vscode/sftp.json
  13. 51 0
      App.vue
  14. 26 0
      common/api/classification.js
  15. 67 0
      common/api/commerce.js
  16. 163 0
      common/api/common.js
  17. 18 0
      common/api/coupon.js
  18. 25 0
      common/api/feedback.js
  19. 109 0
      common/api/good.js
  20. 14 0
      common/api/home.js
  21. 12 0
      common/api/index.js
  22. 10 0
      common/api/integral.js
  23. 13 0
      common/api/news.js
  24. 80 0
      common/api/order.js
  25. 31 0
      common/api/privateSphere.js
  26. 50 0
      common/api/shoppingCert.js
  27. 74 0
      common/api/task.js
  28. 98 0
      common/api/user.js
  29. 48 0
      common/api/withdrawal.js
  30. 395 0
      common/styles/common.scss
  31. 145 0
      common/styles/theme.less
  32. 12 0
      common/styles/var.scss
  33. 402 0
      common/utils/alloyfinger.js
  34. 48 0
      common/utils/config.js
  35. 199 0
      common/utils/map-utils.js
  36. 685 0
      common/utils/md5.js
  37. 251 0
      common/utils/request.js
  38. 272 0
      common/utils/tools.js
  39. 69 0
      common/utils/util.js
  40. 156 0
      components/AddressItem.vue
  41. 77 0
      components/AfterReson.vue
  42. 172 0
      components/CommercePart.vue
  43. 174 0
      components/CommercePartMs.vue
  44. 189 0
      components/CommercePartRow.vue
  45. 20 0
      components/ConfrimPop.vue
  46. 83 0
      components/Empty/index.vue
  47. 265 0
      components/LoginPop.vue
  48. 0 0
      components/ProvinceCity/config.js
  49. 149 0
      components/ProvinceCity/index.vue
  50. 55 0
      components/base-title/index.vue
  51. 18 0
      components/common/global.js
  52. 2 0
      components/leo-area-select_1.0.0/changelog.md
  53. 13170 0
      components/leo-area-select_1.0.0/citys.json
  54. 195 0
      components/leo-area-select_1.0.0/components/leo-area-select/index.vue
  55. 80 0
      components/leo-area-select_1.0.0/package.json
  56. 27 0
      components/leo-area-select_1.0.0/readme.md
  57. 72 0
      components/m-badge/index.vue
  58. 76 0
      components/m-round-badge/index.vue
  59. 119 0
      components/m-title/index.vue
  60. 98 0
      components/tabbar/tabbar.vue
  61. 191 0
      components/tki-barcode/barcode.js
  62. 17 0
      components/tki-barcode/barcodes/Barcode.js
  63. 167 0
      components/tki-barcode/barcodes/CODE128/CODE128.js
  64. 42 0
      components/tki-barcode/barcodes/CODE128/CODE128A.js
  65. 42 0
      components/tki-barcode/barcodes/CODE128/CODE128B.js
  66. 42 0
      components/tki-barcode/barcodes/CODE128/CODE128C.js
  67. 41 0
      components/tki-barcode/barcodes/CODE128/CODE128_AUTO.js
  68. 73 0
      components/tki-barcode/barcodes/CODE128/auto.js
  69. 54 0
      components/tki-barcode/barcodes/CODE128/constants.js
  70. 29 0
      components/tki-barcode/barcodes/CODE128/index.js
  71. 104 0
      components/tki-barcode/barcodes/CODE39/index.js
  72. 92 0
      components/tki-barcode/barcodes/EAN_UPC/EAN.js
  73. 119 0
      components/tki-barcode/barcodes/EAN_UPC/EAN13.js
  74. 58 0
      components/tki-barcode/barcodes/EAN_UPC/EAN2.js
  75. 65 0
      components/tki-barcode/barcodes/EAN_UPC/EAN5.js
  76. 81 0
      components/tki-barcode/barcodes/EAN_UPC/EAN8.js
  77. 165 0
      components/tki-barcode/barcodes/EAN_UPC/UPC.js
  78. 185 0
      components/tki-barcode/barcodes/EAN_UPC/UPCE.js
  79. 30 0
      components/tki-barcode/barcodes/EAN_UPC/constants.js
  80. 27 0
      components/tki-barcode/barcodes/EAN_UPC/encoder.js
  81. 39 0
      components/tki-barcode/barcodes/EAN_UPC/index.js
  82. 55 0
      components/tki-barcode/barcodes/GenericBarcode/index.js
  83. 69 0
      components/tki-barcode/barcodes/ITF/ITF.js
  84. 55 0
      components/tki-barcode/barcodes/ITF/ITF14.js
  85. 9 0
      components/tki-barcode/barcodes/ITF/constants.js
  86. 19 0
      components/tki-barcode/barcodes/ITF/index.js
  87. 74 0
      components/tki-barcode/barcodes/MSI/MSI.js
  88. 33 0
      components/tki-barcode/barcodes/MSI/MSI10.js
  89. 35 0
      components/tki-barcode/barcodes/MSI/MSI1010.js
  90. 33 0
      components/tki-barcode/barcodes/MSI/MSI11.js
  91. 35 0
      components/tki-barcode/barcodes/MSI/MSI1110.js
  92. 29 0
      components/tki-barcode/barcodes/MSI/checksums.js
  93. 34 0
      components/tki-barcode/barcodes/MSI/index.js
  94. 92 0
      components/tki-barcode/barcodes/codabar/index.js
  95. 34 0
      components/tki-barcode/barcodes/index.js
  96. 73 0
      components/tki-barcode/barcodes/pharmacode/index.js
  97. 206 0
      components/tki-barcode/tki-barcode.vue
  98. 1201 0
      components/tki-qrcode/qrcode.js
  99. 210 0
      components/tki-qrcode/tki-qrcode.vue
  100. 21 0
      components/uview-ui/LICENSE

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+node_modules

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 6 - 0
.idea/git_toolbox_blame.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="GitToolBoxBlameSettings">
+    <option name="version" value="2" />
+  </component>
+</project>

+ 9 - 0
.idea/mallstore.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 10 - 0
.idea/misc.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="MavenRunner">
+    <option name="jreName" value="17" />
+    <option name="vmOptions" value="-DarchetypeCatalog=internal" />
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/mallstore.iml" filepath="$PROJECT_DIR$/.idea/mallstore.iml" />
+    </modules>
+  </component>
+</project>

+ 0 - 0
.idea/sonarlint/issuestore/f/a/fa288d1472d29beccb489a676f68739ad365fc47


+ 3 - 0
.idea/sonarlint/issuestore/index.pb

@@ -0,0 +1,3 @@
+
+A
+package-lock.json,f\a\fa288d1472d29beccb489a676f68739ad365fc47

+ 0 - 0
.idea/sonarlint/securityhotspotstore/f/a/fa288d1472d29beccb489a676f68739ad365fc47


+ 3 - 0
.idea/sonarlint/securityhotspotstore/index.pb

@@ -0,0 +1,3 @@
+
+A
+package-lock.json,f\a\fa288d1472d29beccb489a676f68739ad365fc47

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 11 - 0
.vscode/sftp.json

@@ -0,0 +1,11 @@
+{
+    "name": "My Server",
+    "host": "localhost",
+    "protocol": "sftp",
+    "port": 22,
+    "username": "username",
+    "remotePath": "/",
+    "uploadOnSave": false,
+    "useTempFile": false,
+    "openSsh": false
+}

+ 51 - 0
App.vue

@@ -0,0 +1,51 @@
+<script>
+	import * as api from 'common/api/index.js'
+	import {
+		getConfig
+	} from "@/common/api/common.js";
+	const getConfigData = () => {
+		api.getConfig()
+			.then((res) => {
+				if (res.code == 200) {
+					uni.setStorageSync("configs", res.data)
+					console.log("getConfig=>", res.data);
+				}
+			})
+			.catch((err) => {});
+	}
+	export default {
+		onLaunch: async (options) => {
+			console.log("App Launch");
+			uni.hideTabBar()
+			getConfigData()
+		},
+		onShow: function() {
+			console.log("App Show");
+		},
+		onHide: function() {
+			console.log("App Hide");
+		},
+	};
+</script>
+
+<style lang="scss">
+	@import "@/components/uview-ui/index.scss";
+	@import "./common/styles/common.scss";
+
+	/*每个页面公共css */
+	page {
+		font-family: "PingFang SC";
+		-webkit-font-smoothing: antialiased;
+		-moz-osx-font-smoothing: grayscale;
+		height: 100%;
+		font-size: 28rpx;
+		color: $fontMain;
+		background: #F5F6F8;
+
+		view {
+			display: block;
+			flex-direction: row;
+			// box-sizing: border-box;
+		}
+	}
+</style>

+ 26 - 0
common/api/classification.js

@@ -0,0 +1,26 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+
+// 获取分类列表
+export const getCategoryList = (data) => {
+	return request.get(`/data/api.goods/getCate`, data)
+}
+
+
+// 获取分类下作品列表
+export const getCategoryGoodList = (data) => {
+	return request.get(`/data/api.goods/getGoods`, data)
+}
+
+
+// 获取分类下收藏作品列表
+export const getCollectGoodList = (data) => {
+	return request.get(`/data/api.auth.goods/getCollect`, data)
+}
+
+// 删除收藏作品
+export const delCollect = (data) => {
+	return request.post(`/data/api.auth.goods/delCollect`, data)
+}

+ 67 - 0
common/api/commerce.js

@@ -0,0 +1,67 @@
+// 带货相关接口
+import request from '../utils/request.js'
+
+// 明星流信息列表
+export const getFlowData = data => {
+	return request.post('/data/api.star/index', data)
+}
+
+// 带货列表
+export const getCommerceData = data => {
+	return request.post('/data/api.auth.commerce/index', data)
+}
+//没有token带货列表
+export const getNoCommerceData = data => {
+	return request.post('/data/api.commerce/index', data)
+}
+  
+
+// 获取明星关联商品数据
+export const getFlowRelatedData = data => {
+	return request.post('/data/api.star/goods', data)
+}
+
+// 获取带货详情数据 不带token
+export const getCommerceDetails = data => {
+	return request.post('/data/api.commerce/read', data)
+}
+
+// 普通带货报名
+export const commonGoodsApply = data => {
+	return request.post('/data/api.auth.commerce/enroll', data)
+}
+
+// 普通带货报名修改
+export const commonGoodsApplyUpdate = data => {
+	return request.post('/data/api.auth.commerce/editEnroll', data)
+}
+
+// 明星带货报名
+export const flowGoodsApply = data => {
+	return request.post('/data/api.star/enroll', data)
+}
+
+// 明星带货报名修改
+export const flowGoodsApplyUpdate = data => {
+	return request.post('/data/api.star/editEnroll', data)
+}
+
+// 获取我的带货列表
+export const getMyGoodsEnrollList = data => {
+	return request.post('/data/api.auth.commerce/getEnrolls', data)
+}
+
+// 获取我的带货详情数据
+export const getMyGoodsEnrollDetail = data => {
+	return request.post('/data/api.auth.commerce/getEnroll', data)
+}
+
+// 带货数据任务提交
+export const submitMyGoodsTask = data => {
+	return request.post('/data/api.auth.commerce/submit', data)
+}
+
+// 取消任务
+export const cancelGoodsTask = data => {
+	return request.post('/data/api.auth.commerce/cancel', data)
+}

+ 163 - 0
common/api/common.js

@@ -0,0 +1,163 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+// Base64
+export const uploadBase64File = (data, header) => {
+	return request.post('/wechat/auth.files/image', data, {
+		header
+	})
+}
+
+// 获取配置数据
+export const getConfigData = data => {
+	return request.post('/wechat/data/getDict', data)
+}
+
+// 获取指定数据
+export const getData = (data, header) => {
+	return request.post('/wechat/data/getPage', data, {
+		header
+	})
+}
+
+// 分销
+// 获取分销订单数据
+export const getDistributionData = (data) => {
+	return request.post('/wechat/auth.rebate/index', data)
+}
+
+// 获取小程序码
+export const getQRCode = data => {
+	return request.post('/wechat/wxapp/qrcode', data)
+}
+
+// 获取使用积分信息
+export const getPointsUseData = data => {
+	return request.get('/wechat/auth.Integral/myIntegral', data)
+}
+
+
+// 获取OpenId
+export const getOpenId = data => {
+	return request.get('/prod-api/wechat/openID', data)
+}
+
+// 获取客服列表
+export const getCustomerServiceList = data => {
+	return request.get('/prod-api/website/customer-service', data)
+}
+
+// 上传图片
+export const uploadFile = data => {
+	return request.upload('/data/api.auth.center/image', data)
+}
+
+// Base64
+export const bindFrom = (data, header) => {
+	return request.post('/wechat/auth.center/bindFrom', data, {
+		header
+	})
+}
+
+// 推广中心-推广攻略
+export const getQuestionsList = (data, header) => {
+	return request.post('/data/api.data/questions', data, {
+		header
+	})
+}
+
+// 消息数量
+export const getNewRemindCnt = (data, header) => {
+	return request.post('/data/api.auth.data/newRemindCnt', data, {
+		header
+	})
+}
+
+// 消息中心
+export const getMyRemindsList = (data, header) => {
+	return request.post('/data/api.auth.data/myReminds', data, {
+		header
+	})
+}
+
+
+
+// 添加收货地址
+export const addAddress = data => {
+	return request.post('/wechat/auth.address/create', data)
+}
+
+// 修改收货地址
+export const updateAddress = data => {
+	return request.post('/wechat/auth.address/save', data)
+}
+
+// 修改收货地址状态
+export const updateAddressStatus = data => {
+	return request.post('/data/api.auth.address/state', data)
+}
+
+// 获取收货地址
+export const getAddressList = data => {
+	return request.post('/wechat/auth.address/index', data)
+}
+
+// 获取收货地址详情
+export const getAddressDetail = data => {
+	return request.post('/wechat/auth.address/read', data)
+}
+
+// 删除收货地址
+export const deleteAddress = data => {
+	return request.post('/wechat/auth.address/delete', data)
+}
+
+// 设置默认收货地址 type 地址状态(0普通地址,1默认地址)
+export const setAddress = data => {
+	return request.post('/data/api.auth.address/state', data)
+}
+
+// 获取任务平台
+export const getPlatform = data => {
+	return request.post('/data/api.task/getPlatform', data)
+}
+
+// 获取任务主题
+export const getCate = data => {
+	return request.post('/data/api.task/getCate', data)
+}
+
+// 获取分类数据
+export const getGoodsCate = data => {
+	return request.get('/data/api.goods/getCate', data)
+}
+
+// 获取支付参数数据
+export const getPayChannelData = data => {
+	return request.post('/data/api.star/channel', data)
+}
+
+// 获取订单支付状态
+//如果选余额支付,payment_code = M7829555340105469600 且余额大于支付金额则直接支付成;如果选微信支付M7828696588602553171 则返回支付参数
+export const getOrderPayStatus = data => {
+	return request.post('/data/api.star/payment', data)
+}
+
+export const getNews = data => {
+	return request.post('/data/api.news/getItem', data)
+}
+
+// 获取我邀请的朋友
+export const getMyInviteFriend = data => {
+	return request.post('/wechat/auth.center/getFrom', data)
+}
+
+// 获取系统配置
+export const getConfig = data => {
+	return request.post('/wechat/data/config', data)
+}
+// 获取微信手机号
+export const getUserPhone = data => {
+	return request.post('/wechat/wxapp/userPhone', data)
+}

+ 18 - 0
common/api/coupon.js

@@ -0,0 +1,18 @@
+import request from "../utils/request.js";
+
+import config from "../utils/config";
+
+// 获取优惠券列表
+// 9:全部
+// 0:未领取  /wechat/auth.coupon/index
+// 1:已使用  /wechat/auth.coupon/myUsed
+// 2:未使用 /wechat/auth.coupon/myUses
+// 3:已过期  /wechat/auth.coupon/myExpired
+export const getCouponList = (type, data) => {
+  return request.post(`/wechat/auth.coupon/${type}`, data);
+};
+
+// 领取优惠券 mobile couponId
+export const getCoupon = (data) => {
+  return request.post(`/wechat/auth.coupon/get`, data);
+};

+ 25 - 0
common/api/feedback.js

@@ -0,0 +1,25 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+
+
+// 获取反馈类型
+export const getFeedBackTypeList = (data) => {
+	return request.get(`/prod-api/feedback/type`, data)
+}
+
+// 保存反馈
+export const saveFeedBack = (data) => {
+	return request.post(`/prod-api/feedback/save`, data)
+}
+
+// 添加反馈意见
+export const addFeedbackData = (data) => {
+	return request.post(`/data/api.auth.feedback/add`, data)
+}
+
+// 获取我的反馈意见列表
+export const getMyFeedbackList = (data) => {
+	return request.post(`/data/api.auth.feedback/index`, data)
+}

+ 109 - 0
common/api/good.js

@@ -0,0 +1,109 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+// 获取积分商品列表
+export const getPointsGoodsList = data => {
+	return request.post('/wechat/goods/integrals', data)
+}
+
+
+// 获取满赠商品列表
+export const getGiftGoodsList = data => {
+	return request.post('/wechat/goods/gifts', data)
+}
+
+// 获取满赠商品详情
+export const getGiftGoodsDetail = data => {
+	return request.post('/wechat/goods/gift', data)
+}
+
+// 满赠商品加入购物车
+export const giftAddCart = data => {
+	return request.post('/wechat/auth.gift/addCart', data)
+}
+
+//获取秒杀商品详情
+export const getMsGoodsDetail = data => {
+	return request.post('/wechat/goods/seckillGoods', data)
+}
+
+//获取秒杀商品列表
+export const getMsGoodsList = data => {
+	return request.post('/wechat/goods/seckills', data)
+}
+
+// 秒杀商品下单
+export const msGoodsCreateOrder = data => {
+	return request.post('/wechat/auth.seckill/add', data)
+}
+
+// 获取积分商品详情
+export const getPointsGoodsDetail = data => {
+	return request.post('/wechat/goods/integral', data)
+}
+
+// 获取商品详情
+export const getGoodsDetail = data => {
+	return request.post('/wechat/goods/read', data)
+}
+
+// 通过规格获取价格
+export const getPriceBySuit = data => {
+	return request.post('/wechat/goods/specPrice', data)
+}
+
+// 获取商品列表
+export const getGoodList = data => {
+	return request.post('/wechat/goods/index', data)
+}
+// 获取商品分类
+export const getGoodCate = data => {
+	return request.get('/wechat/goods/getCate', data)
+}
+
+// 添加收藏
+export const addCollect = data => {
+	return request.post('/wechat/auth.goods/addCollect', data)
+}
+
+// 删除收藏
+export const delCollect = data => {
+	return request.post('/wechat/auth.goods/delCollect', data)
+}
+
+// 判断收藏
+export const checkCollect = data => {
+	return request.post('/wechat/auth.goods/getCollect', data)
+}
+
+// 收藏列表
+export const getcollectList = data => {
+	return request.post('/wechat/auth.goods/getCollects', data)
+}
+
+
+// 添加评论
+export const addComment = data => {
+	return request.post('/data/api.auth.goods/addComment', data)
+}
+
+// 添加点赞
+export const addLike = data => {
+	return request.post('/data/api.auth.goods/addLike', data)
+}
+
+// 删除点赞
+export const delLike = data => {
+	return request.post('/data/api.auth.goods/delLike', data)
+}
+
+// 添加评论点赞
+export const reviewLike = data => {
+	return request.post('/data/api.auth.goods/reviewLike', data)
+}
+
+// 删除评论点赞
+export const delComment = data => {
+	return request.post('/data/api.auth.goods/delComment', data)
+}

+ 14 - 0
common/api/home.js

@@ -0,0 +1,14 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+
+// 获取首页各种数据
+export const getBanner = data => {
+	return request.post('/wechat/index/index', data)
+}
+//
+// 获取广告数据
+export const getAdData = data => {
+	return request.post('/wechat/index/pics', data)
+}

+ 12 - 0
common/api/index.js

@@ -0,0 +1,12 @@
+export * from './common.js'
+export * from './shoppingCert'
+export * from './good'
+export * from './order'
+// export * from './user'
+
+
+
+export * from './commerce.js'
+
+export * from './feedback'
+export * from './privateSphere'

+ 10 - 0
common/api/integral.js

@@ -0,0 +1,10 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+
+
+// 获取积分商品列表
+export const getIntegralGoodList = (data) => {
+	return request.get(`/prod-api/integral-goods/list`, data)
+}

+ 13 - 0
common/api/news.js

@@ -0,0 +1,13 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+
+// 文章列表 网站公告 cid=1 使用帮助 cid=2
+export const getNewsList = data => {
+	return request.post('/wechat/news/index', data)
+}
+// 获取广告数据
+export const getNewsRead = data => {
+	return request.post('/wechat/news/read', data)
+}

+ 80 - 0
common/api/order.js

@@ -0,0 +1,80 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+
+// 用户创建订单(直接购买)
+export const createOrder = data => {
+	return request.post('/wechat/auth.order/add', data)
+}
+
+// 订单详情
+export const orderDetail = data => {
+	return request.post('/wechat/auth.order/read', data)
+}
+
+// 根据订单获取用户可用优惠券
+export const getCouponByOrder = data => {
+	return request.post('/wechat/auth.order/getCoupons', data)
+}
+
+// 订单信息确认,选择地址
+export const submitOrderByAdress = data => {
+	return request.post('/wechat/auth.order/perfectByAddr', data)
+}
+
+// 订单信息确认,选择优惠券
+export const submitOrderByCoupon = data => {
+	return request.post('/wechat/auth.order/perfectByCoupon', data)
+}
+
+//获取订单支付参数
+export const getOrderPayData = data => {
+	return request.post('/wechat/auth.order/payment', data)
+}
+
+// 获取订单列表
+export const getOrderList = data => {
+	return request.post('/wechat/auth.order/index', data)
+}
+
+// 用户主动取消未支付的订单
+export const cancelOrder = data => {
+	return request.post('/wechat/auth.order/cancel', data)
+}
+
+// 用户主动删除已取消的订单
+export const deleteOrder = data => {
+	return request.post('/wechat/auth.order/delete', data)
+}
+
+// 已发货订单用户确认收货
+export const confirmOrder = data => {
+	return request.post('/wechat/auth.order/confirm', data)
+}
+
+// 获取订单统计数据
+export const getOrderStatics = data => {
+	return request.get('/wechat/auth.index/order_num', data)
+}
+
+//订单使用积分
+export const orderUserPoints = data => {
+	return request.post('/wechat/auth.order/perfectByIntegral', data)
+}
+
+//申请售后
+export const applyAfterSales = data => {
+	return request.post('/wechat/auth.refund/refund', data)
+}
+
+// 获取售后列表
+export const getAfterSalesList = data => {
+	return request.post('/wechat/auth.order/refunds', data)
+}
+
+// 取消售后
+export const cancelAfterSales = data => {
+	return request.post('/wechat/auth.refund/cancel', data)
+}
+

+ 31 - 0
common/api/privateSphere.js

@@ -0,0 +1,31 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+// 私域模块
+// 获取商品列表
+export const getPSGoodsList = (data) => {
+	return request.post(`/data/api.goods/getGoods`, data)
+}
+
+// 获取商品詳情
+export const getPSGoodsDetail = (data) => {
+	return request.post(`/data/api.auth.goods/getGoods`, data)
+}
+
+// 获取最新推荐列表
+export const getPSNewsetList = (data) => {
+	return request.post(`/data/api.goods/getHomes`, data)
+}
+
+// 获取限时秒杀数据
+export const getPSMsList = (data) => {
+	return request.post(`/data/api.goods/getMs`, data)
+}
+
+
+// 购物车模块
+// 获取我的购物车列表
+export const getShoppingCartList = () => {
+	return request.get(`/data/api.auth.cart/get`)
+}

+ 50 - 0
common/api/shoppingCert.js

@@ -0,0 +1,50 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+
+
+// 获取购物车列表
+export const getShoppingCartData = data => {
+	return request.post('/wechat/auth.cart/index', data)
+}
+
+// 添加购物车
+export const addToShoppingCart = data => {
+	return request.post('/wechat/auth.cart/add', data)
+}
+
+// 减少购物车数量
+export const subShoppingCart = data => {
+	return request.post('/wechat/auth.cart/minusCart', data)
+}
+
+// 增加购物车数量
+export const plusShoppingCart = data => {
+	return request.post('/wechat/auth.cart/plusCart', data)
+}
+
+// 删除购物车商品
+export const deleteShoppingCart = data => {
+	return request.post('/wechat/auth.cart/del', data)
+}
+
+// 购物车下单
+export const createOrderByCart = data => {
+	return request.post('/wechat/auth.cart/order', data)
+}
+
+// 购物车预下单
+export const createPrevOrderByCart = data => {
+	return request.post('/wechat/auth.cart/preOrder', data)
+}
+
+// 获取购物车统计
+export const getCartNumber = data => {
+	return request.get('/wechat/auth.index/cart_num', data)
+}
+
+// 获取预下单商品运费
+export const getPrevCartExpress = data => {
+	return request.post('/wechat/auth.cart/getExpress', data)
+}

+ 74 - 0
common/api/task.js

@@ -0,0 +1,74 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+// 获取任务列表
+export const getTaskList = data => {
+	return request.post('/data/api.task/getTasks', data)
+}
+
+// 获取任务详情
+export const getTaskDetails = data => {
+	return request.post('/data/api.auth.task/getTask', data)
+}
+//生成分享二维码
+
+export const makeErCode = data => {
+	return request.post('/wechat/wxapp/qrcode', data)
+}
+
+
+// 获取任务详情 不带token
+export const getTaskDetailsNoToken = data => {
+	return request.post('/data/api.task/getTask', data)
+}
+
+// 商单任务报名
+export const postTaskEnroll = data => {
+	return request.post('/data/api.auth.task/enroll', data)
+}
+
+
+// 我的商单任务报名
+export const getMyTaskEnrollList = data => {
+	return request.post('/data/api.auth.task/myEnrolls', data)
+}
+
+// 修改我的商单任务报名
+export const postTaskEnrollUpdate = data => {
+	return request.post('/data/api.auth.task/editEnroll', data)
+}
+
+// 获取我的商单任务详情
+export const getMyTaskEnrollDetail = data => {
+	return request.post('/data/api.auth.task/getEnroll', data)
+}
+
+// 我的商单任务交付
+export const submitTask = data => {
+	return request.post('/data/api.auth.task/submit', data)
+}
+
+
+
+// 我的商单任务取消合作
+export const cancelTask = data => {
+	return request.post('/data/api.auth.task/cancel', data)
+}
+
+
+// 提交推广合作
+export const addPeace = data => {
+	return request.post('/data/api.auth.promotion/add', data)
+}
+
+// 足迹-任务
+export const getHistoryOne = data => {
+	return request.post('/data/api.auth.task/getHistory', data)
+}
+
+
+// 足迹-带货
+export const getHistoryTwo = data => {
+	return request.post('/data/api.auth.commerce/getHistory', data)
+}

+ 98 - 0
common/api/user.js

@@ -0,0 +1,98 @@
+import request from '../utils/request.js'
+
+import config from '../utils/config'
+
+
+// login
+// 用户登录
+export const userLogin = data => {
+	return request.post('/wechat/wxapp/session', data)
+}
+
+// 绑定用户昵称和头像
+export const userBindNickname = data => {
+	return request.post('/wechat/auth.center/bindUser', data)
+}
+
+// 用户绑定手机号
+export const userBindPhone = data => {
+	return request.post('/wechat/auth.center/bindPhone', data)
+}
+
+// 获取用户数据
+export const getUserInfo = data => {
+	return request.get('/wechat/auth.center/get', data)
+}
+// 更新用户资料
+export const updateUserInfo = data => {
+	return request.post('/wechat/auth.center/save', data)
+}
+
+// 手机号登录
+export const memberLogin = data => {
+	return request.post('/prod-api/member/login', data)
+}
+
+// 获取用户信息
+export const getMemberInfo = data => {
+	return request.get('/prod-api/member/info', data)
+}
+
+
+// 获取积分记录
+export const getIntegralTrade = data => {
+	return request.get('/prod-api/integral-trade/list', data)
+}
+// 用户注册
+export const userRegister = data => {
+	return request.post('/data/api.auth.center/reg', data)
+}
+
+
+// 获取会员等级
+export const getUserUpgrade = data => {
+	return request.post('/data/api.data/userUpgrade', data)
+}
+
+// 添加订单
+export const addOrder = data => {
+	return request.post('/data/api.auth.order/add', data)
+}
+
+
+// 支付订单
+export const payOrder = data => {
+	return request.post('/data/api.auth.order/payment', data)
+}
+
+
+// 获取我邀请的朋友
+export const getFrom = data => {
+	return request.post('/data/api.auth.center/getFrom', data)
+}
+
+
+
+// 获取我得推广付费记录
+export const getFromVip = data => {
+	return request.post('/data/api.auth.center/getFromOrders', data)
+}
+
+
+// 获取我邀请的用户统计
+export const getFromCnt = data => {
+	return request.post('/data/api.auth.center/getFromCnt', data)
+}
+
+
+// 获取我的认证列表
+export const getAuthenticationList = data => {
+	return request.post('/data/api.auth.cert/index', data)
+}
+
+
+
+// 添加或修改用户认证
+export const saveAuthentication = data => {
+	return request.post('/data/api.auth.cert/save', data)
+}

+ 48 - 0
common/api/withdrawal.js

@@ -0,0 +1,48 @@
+import request from "../utils/request.js";
+
+import config from "../utils/config";
+
+// 获取银行列表
+export const getBanksList = (data) => {
+  return request.get(`/wechat/auth.banks/banks`, data);
+};
+
+// 添加银行卡
+export const addBanks = (data) => {
+  return request.post(`/wechat/auth.banks/set`, data);
+};
+
+// 获取我的银行卡列表
+export const getMyBanks = (data) => {
+  return request.get(`/wechat/auth.banks/get`, data);
+};
+
+// 删除我的银行卡
+export const removeBanks = (data) => {
+  return request.post(`/wechat/auth.banks/delete`, data);
+};
+
+// 设置我的银行卡状态
+export const setBankState = (data) => {
+  return request.post(`/wechat/auth.banks/state`, data);
+};
+
+// 添加提现申请
+export const addWithdrawal = (data) => {
+  return request.post(`/wechat/auth.transfer/add`, data);
+};
+
+// 获取提现申请记录列表
+export const getWithdrawalList = (data) => {
+  return request.post(`/wechat/auth.transfer/index`, data);
+};
+
+// 取消提现申请
+export const cancelWithdrawal = (data) => {
+  return request.post(`/wechat/auth.transfer/cancel`, data);
+};
+
+// 用户确认提现
+export const confirmWithdrawal = (data) => {
+  return request.post(`/wechat/auth.transfer/confirm`, data);
+};

+ 395 - 0
common/styles/common.scss

@@ -0,0 +1,395 @@
+* {
+  margin: 0;
+  padding: 0;
+  border: 0;
+  box-sizing: border-box;
+}
+
+@import "./var.scss";
+
+
+ol, ul {
+  list-style: none;
+}
+
+.mb5 {
+  margin-bottom: 10rpx;
+}
+
+.mb10 {
+  margin-bottom: 20rpx;
+}
+.mb15 {
+	margin-bottom: 30rpx;
+}
+.mb20 {
+	margin-bottom: 40rpx;
+}
+.mb30 {
+	margin-bottom: 60rpx;
+}
+.mr5 {
+  margin-right: 5px;
+}
+.mr10 {
+  margin-right: 10px;
+}
+.mr20 {
+  margin-right: 40rpx;
+}
+.mt10 {
+  margin-top: 10px;
+}
+.mt15 {
+  margin-top: 15px;
+}
+.mt5 {
+  margin-top: 5px;
+}
+.ml10{
+	margin-left: 10px;
+}
+.ml5{
+	margin-left: 10rpx;
+}
+.ml28{
+	margin-left: 56rpx;
+}
+
+.pd10 {
+	padding: 0 20rpx;
+}
+
+.display-flex {
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+}
+.display-flex-common {
+  display: flex;
+}
+.display-flex-center {
+	display: flex;
+	align-items: center;
+}
+.flex-auto-left {
+	margin-left: auto;
+}
+.flex-shrink {
+	flex-shrink: 0;
+}
+.display-flex-end{
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+}
+.display-flex-between {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+.display-flex-content-center {
+	display: flex;
+	align-items: center;
+	justify-content: center
+}
+
+.clearfix:after {
+  display: block;
+  clear: both;
+  content: '';
+  visibility: hidden;
+  height: 0;
+}
+
+.clearfix {
+  zoom: 1;
+}
+
+.text-center {
+  text-align: center;
+}
+
+.float-right {
+	float: right;
+}
+
+
+.text-overflow {
+  overflow : hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+  word-wrap: break-word;
+  word-break: normal;
+}
+
+.text-overflow-single {
+  overflow : hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 1;
+  -webkit-box-orient: vertical;
+  word-wrap: break-word;
+  word-break: normal;
+}
+
+.text-through {
+	text-decoration: line-through;
+}
+.text-inline {
+	// display: inline-flex;
+}
+
+// 文字相关
+
+.bg-white {
+	background-color: #fff;
+}
+.fs9 {
+	font-size: 18rpx;
+}
+.fs10 {
+	font-size: 20rpx;
+}
+.fs12 {
+	font-size: 24rpx;
+}
+.fs13 {
+	font-size: 26rpx;
+}
+.fs14 {
+	font-size: 28rpx;
+}
+.fs15 {
+	font-size: 30rpx;
+}
+.fs16 {
+	font-size: 32rpx;
+}
+.fs18 {
+	font-size: 36rpx;
+}
+.fs20 {
+	font-size: 40rpx;
+}
+.fs26 {
+	font-size: 52rpx;
+}
+.fs30 {
+	font-size: 60rpx;
+}
+.fw700 {
+	font-weight: 700;
+}
+.fw600 {
+	font-weight: 600;
+}
+.fw500 {
+	font-weight: 500;
+}
+.fw400 {
+	font-weight: 400;
+}
+.fw300 {
+	font-weight: 300;
+}
+
+.color-black {
+	color: #000;
+}
+.color-white {
+	color: #fff;
+}
+.color-main-gray {
+	color: #1D161F;
+}
+
+
+.color-2c {
+	color: #2C2C2C;
+}
+.color-23 {
+	color: #232323;
+}
+.color-9 {
+	color: #999;
+}
+
+.color-orange {
+	color: #FF7400;
+}
+
+.color-71 {
+	color: #717171;
+}
+
+.color-7a {
+	color: #7a7a7a;
+}
+
+.color-5f {
+	color: #5F5F5F;
+}
+
+.color-del {
+	color: #FF4E4A;
+}
+
+.color-red {
+	color: #FF424F;
+}
+
+.color-ca{
+	color: #CACACA;
+}
+.color-c8{
+	color: #c8c8c8;
+}
+
+.color-d9{
+	color: #9D9D9D;
+}
+
+.color-4a {
+	color: #4A4A4A;
+}
+.color-3 {
+	color: #333;
+}
+
+.common-card{
+	background: #FFFFFF;
+	border-radius: 15rpx;
+	padding: 24rpx;
+	margin-bottom: 20rpx;
+}
+
+.common-btn {
+	height: 78rpx;
+	line-height: 78rpx;
+	padding: 0 29rpx;
+	color: #fff;
+	background: #F39800;
+	border-radius: 39rpx 39rpx 39rpx 39rpx;
+	font-size: 32rpx;
+	text-align: center;
+	border: 2rpx solid #F39800;
+	&-gray{
+		background: #EEEFF1;
+		color: #1D161F;
+	}
+	&-border {
+		background-color: #fff;
+		color: #F39800;
+		border-color: #D0D0D0;
+	}
+	&-disabled{
+		background: #EEEFF1;
+		color: #1D161F;
+		border-color: #EEEFF1;
+	}
+}
+
+.btn-gray-border {
+	height: 78rpx;
+	line-height: 78rpx;
+	padding: 0 29rpx;
+	color: #1D161F;
+	background: #fff;
+	border: 2rpx solid #D0D0D0;
+	border-radius: 39rpx 39rpx 39rpx 39rpx;
+	font-size: 32rpx;
+	text-align: center;
+}
+.btn-gray {
+	height: 78rpx;
+	line-height: 78rpx;
+	color: #767983;
+	background: #F5F7FB;
+	border-radius: 39rpx 39rpx 39rpx 39rpx;
+	font-size: 32rpx;
+	text-align: center;
+}
+
+.u-btn--default {
+	color: #1D161F;
+	background-color: #EEEFF1;
+	border-color: #EEEFF1;
+}
+
+.new-goods-tag {
+	display: inline-block;
+	padding: 0 6rpx;
+	height: 32rpx;
+	line-height: 32rpx;
+	background-color: #77E2BE;
+	color: #fff;
+	font-size: 22rpx;
+	border-radius: 5rpx;
+}
+
+.search-box {
+	width: 710rpx;
+	margin: 0 auto 20rpx;
+	height: 61rpx;
+	background: #FDFDFD;
+	border-radius: 30rpx;
+	opacity: 1;
+	display: flex;
+	align-items: center;
+	flex-direction: row;
+
+	text {
+		font-size: 24rpx;
+		font-family: PingFang SC-Regular, PingFang SC;
+		font-weight: 400;
+		color: #9D9D9D;
+		line-height: 61rpx;
+		margin-left: 11rpx;
+	}
+}
+
+// tag
+.gray-tag {
+	display: inline-flex;
+	height: 35rpx;
+	line-height: 35rpx;
+	background: #F6F6F6;
+	border-radius: 4rpx;
+	padding: 0 22rpx;
+	color: #232323;
+	font-size: 22rpx;
+}
+
+.common-card-box {
+	width: 710rpx;
+	background: #FFFFFF;
+	border-radius: 15rpx 15rpx 15rpx 15rpx;
+	margin: 0 auto 20rpx auto;
+	display: flex;
+	flex-direction: column;
+}
+
+.bottom-box {
+	position: fixed;
+	bottom: 0;
+	width: 100%;
+	height: 158rpx;
+	left: 0;
+	right: 0;
+	box-sizing: border-box;
+	padding: 27rpx 20rpx;
+	background-color: #fff;
+	z-index: 1000;
+}
+
+
+.tag-red {
+	padding: 4rpx 6rpx;
+	font-size: 22rpx;
+	color: #C9161E;
+	background-color: rgba(#C9161E, 0.08);
+	
+}

+ 145 - 0
common/styles/theme.less

@@ -0,0 +1,145 @@
+// Color Palette
+@black: #000;
+@white: #fff;
+@gray-1: #f7f8fa;
+@gray-2: #f2f3f5;
+@gray-3: #ebedf0;
+@gray-4: #dcdee0;
+@gray-5: #c8c9cc;
+@gray-6: #969799;
+@gray-7: #646566;
+@gray-8: #27282A;
+@red: #FF3959;
+@blue: #3370FF;
+@orange: #FF7426;
+@orange-dark: #ed6a0c;
+@orange-light: #fffbe8;
+@green: #3EC40F;
+@bg-gray-1: #F7F8FA;
+
+// Gradient Colors
+@gradient-red: linear-gradient(to right, #ff6034, #ee0a24);
+@gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);
+
+// Component Colors
+@text-color: @gray-8;
+@active-color: @gray-2;
+@active-opacity: 0.7;
+@disabled-opacity: 0.5;
+@background-color: @gray-1;
+@background-color-light: #fafafa;
+@text-link-color: #576b95;
+
+// Padding
+@padding-base: 2px;
+@padding-xs: @padding-base * 2;
+@padding-sm: @padding-base * 3;
+@padding-md: @padding-base * 4;
+@padding-lg: @padding-base * 6;
+@padding-xl: @padding-base * 8;
+
+// Font
+@font-size-xs: 4px;
+@font-size-sm: 12px;
+@font-size-md: 14px;
+@font-size-lg: 16px;
+@font-weight-bold: 500;
+@line-height-xs: 14px;
+@line-height-sm: 18px;
+@line-height-md: 20px;
+@line-height-lg: 22px;
+@base-font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
+  Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB',
+  'Microsoft Yahei', sans-serif;
+@price-integer-font-family: Avenir-Heavy, PingFang SC, Helvetica Neue, Arial,
+  sans-serif;
+
+// Animation
+@animation-duration-base: 0.3s;
+@animation-duration-fast: 0.2s;
+@animation-timing-function-enter: ease-out;
+@animation-timing-function-leave: ease-in;
+
+// Border
+@border-color: @gray-3;
+@border-width-base: 1px;
+@border-radius-sm: 2px;
+@border-radius-md: 4px;
+@border-radius-lg: 8px;
+@border-radius-common: 28px;
+@border-radius-max: 999px;
+
+
+// button
+@button-primary-background-color: @orange;
+@button-primary-border-color: @orange;
+@button-border-radius: 28px;
+
+// filed
+@field-placeholder-text-color: #999;
+@checkbox-checked-icon-color: @orange;
+
+.van-button {
+  font-size: 16px;
+  .van-button__icon {
+    margin-right: 6px;
+  }
+}
+.van-button--gray {
+  color: #999;
+  background-color: @bg-gray-1;
+  border: @button-border-width solid @bg-gray-1;
+}
+
+.van-button--black {
+  color: #EDCFB3;
+  background-color: #333;
+  border: @button-border-width solid #333;
+  padding: 0 6px;
+  font-size: 12px;
+}
+
+.van-tag {
+  border-radius: 4px;
+}
+.van-tag--primary {
+  background-color: @orange;
+}
+.van-tag--medium {
+  padding: 4px 8px;
+}
+
+//tab
+
+// .u-tabs__wrapper {
+//   height: auto;
+//   .u-tabs__wrapper__nav {
+//     font-size: 16px;
+//     color: #595959;
+//     justify-content: flex-start;
+//     flex: none;
+//     padding: 0 15px;
+//     &:first-child {
+//       padding-left: 20px;
+//     }
+//   }
+//   // .van-tab--active {
+//   //   font-size: 20px;
+//   //   color: #000000;
+//   //   font-weight: 600;
+//   // }
+//   .van-tabs__nav--line {
+//     padding-bottom: 5px;
+//   }
+//   .u-tabs__wrapper__nav__line {
+//     background: linear-gradient(90deg, #EF6E4D 0%, rgba(255, 255, 255, 0) 100%);
+//     border-radius: 13px;
+//     height: 5px;
+//     bottom: 0;
+//     // left: -10px;
+//     transform: translateX(-100%);
+//   }
+// }
+
+
+

+ 12 - 0
common/styles/var.scss

@@ -0,0 +1,12 @@
+
+$colorMain: #815EFA;
+$colorGreen: #3EC40F;
+$colorBlue: #3370FF;
+$gray3: #333;
+$gray9: #999;
+$gray-1: #979797;
+$gray-2: #595959;
+
+$fontMain: #1D161F;
+
+$primary-bg-color: #F5F6F8;

+ 402 - 0
common/utils/alloyfinger.js

@@ -0,0 +1,402 @@
+/* AlloyFinger v0.1.15
+ * By dntzhang
+ * Github: https://github.com/AlloyTeam/AlloyFinger
+ * 监听触摸的工具类
+ */
+(function () {
+  // 获取两点距离
+  function getLen(v) {
+    return Math.sqrt(v.x * v.x + v.y * v.y);
+  }
+
+  function dot(v1, v2) {
+    return v1.x * v2.x + v1.y * v2.y;
+  }
+
+  // 获取角度
+  function getAngle(v1, v2) {
+    var mr = getLen(v1) * getLen(v2);
+    if (mr === 0) return 0;
+    var r = dot(v1, v2) / mr;
+    if (r > 1) r = 1;
+    return Math.acos(r);
+  }
+
+  function cross(v1, v2) {
+    return v1.x * v2.y - v2.x * v1.y;
+  }
+
+  function getRotateAngle(v1, v2) {
+    var angle = getAngle(v1, v2);
+    if (cross(v1, v2) > 0) {
+      angle *= -1;
+    }
+    return (angle * 180) / Math.PI;
+  }
+
+  var HandlerAdmin = function (el) {
+    this.handlers = [];
+    this.el = el;
+  };
+
+  HandlerAdmin.prototype.add = function (handler) {
+    this.handlers.push(handler);
+  };
+
+  HandlerAdmin.prototype.del = function (handler) {
+    if (!handler) this.handlers = [];
+
+    for (var i = this.handlers.length; i >= 0; i--) {
+      if (this.handlers[i] === handler) {
+        this.handlers.splice(i, 1);
+      }
+    }
+  };
+
+  HandlerAdmin.prototype.dispatch = function () {
+    for (var i = 0, len = this.handlers.length; i < len; i++) {
+      var handler = this.handlers[i];
+      if (typeof handler === "function") handler.apply(this.el, arguments);
+    }
+  };
+
+  function wrapFunc(el, handler) {
+    var handlerAdmin = new HandlerAdmin(el);
+    handlerAdmin.add(handler);
+
+    return handlerAdmin;
+  }
+
+  var AlloyFinger = function (el, option) {
+    this.element = typeof el == "string" ? document.querySelector(el) : el;
+
+    this.start = this.start.bind(this);
+    this.move = this.move.bind(this);
+    this.end = this.end.bind(this);
+    this.cancel = this.cancel.bind(this);
+    this.element.addEventListener("touchstart", this.start, false);
+    this.element.addEventListener("touchmove", this.move, false);
+    this.element.addEventListener("touchend", this.end, false);
+    this.element.addEventListener("touchcancel", this.cancel, false);
+
+    this.preV = {
+      x: null,
+      y: null,
+    };
+    this.pinchStartLen = null;
+    this.zoom = 1;
+    this.isDoubleTap = false;
+
+    var noop = function () {};
+
+    this.rotate = wrapFunc(this.element, option.rotate || noop);
+    this.touchStart = wrapFunc(this.element, option.touchStart || noop);
+    this.multipointStart = wrapFunc(
+      this.element,
+      option.multipointStart || noop
+    );
+    this.multipointEnd = wrapFunc(this.element, option.multipointEnd || noop);
+    this.pinch = wrapFunc(this.element, option.pinch || noop);
+    this.swipe = wrapFunc(this.element, option.swipe || noop);
+    this.tap = wrapFunc(this.element, option.tap || noop);
+    this.doubleTap = wrapFunc(this.element, option.doubleTap || noop);
+    this.longTap = wrapFunc(this.element, option.longTap || noop);
+    this.singleTap = wrapFunc(this.element, option.singleTap || noop);
+    this.pressMove = wrapFunc(this.element, option.pressMove || noop);
+    this.twoFingerPressMove = wrapFunc(
+      this.element,
+      option.twoFingerPressMove || noop
+    );
+    this.touchMove = wrapFunc(this.element, option.touchMove || noop);
+    this.touchEnd = wrapFunc(this.element, option.touchEnd || noop);
+    this.touchCancel = wrapFunc(this.element, option.touchCancel || noop);
+
+    this._cancelAllHandler = this.cancelAll.bind(this);
+
+    window.addEventListener("scroll", this._cancelAllHandler);
+
+    this.delta = null;
+    this.last = null;
+    this.now = null;
+    this.tapTimeout = null;
+    this.singleTapTimeout = null;
+    this.longTapTimeout = null;
+    this.swipeTimeout = null;
+    this.x1 = this.x2 = this.y1 = this.y2 = null;
+    this.preTapPosition = {
+      x: null,
+      y: null,
+    };
+  };
+
+  AlloyFinger.prototype = {
+    start: function (evt) {
+      if (!evt.touches) return;
+      this.now = Date.now();
+      this.x1 = evt.touches[0].pageX;
+      this.y1 = evt.touches[0].pageY;
+      this.delta = this.now - (this.last || this.now);
+      this.touchStart.dispatch(evt, this.element);
+      if (this.preTapPosition.x !== null) {
+        this.isDoubleTap =
+          this.delta > 0 &&
+          this.delta <= 250 &&
+          Math.abs(this.preTapPosition.x - this.x1) < 30 &&
+          Math.abs(this.preTapPosition.y - this.y1) < 30;
+        if (this.isDoubleTap) clearTimeout(this.singleTapTimeout);
+      }
+      this.preTapPosition.x = this.x1;
+      this.preTapPosition.y = this.y1;
+      this.last = this.now;
+      var preV = this.preV,
+        len = evt.touches.length;
+      if (len > 1) {
+        this._cancelLongTap();
+        this._cancelSingleTap();
+        var v = {
+          x: evt.touches[1].pageX - this.x1,
+          y: evt.touches[1].pageY - this.y1,
+        };
+        preV.x = v.x;
+        preV.y = v.y;
+        this.pinchStartLen = getLen(preV);
+        this.multipointStart.dispatch(evt, this.element);
+      }
+      this._preventTap = false;
+      this.longTapTimeout = setTimeout(
+        function () {
+          this.longTap.dispatch(evt, this.element);
+          this._preventTap = true;
+        }.bind(this),
+        750
+      );
+    },
+    move: function (evt) {
+      if (!evt.touches) return;
+      var preV = this.preV,
+        len = evt.touches.length,
+        currentX = evt.touches[0].pageX,
+        currentY = evt.touches[0].pageY;
+      this.isDoubleTap = false;
+      if (len > 1) {
+        var sCurrentX = evt.touches[1].pageX,
+          sCurrentY = evt.touches[1].pageY;
+        var v = {
+          x: evt.touches[1].pageX - currentX,
+          y: evt.touches[1].pageY - currentY,
+        };
+
+        if (preV.x !== null) {
+          if (this.pinchStartLen > 0) {
+            evt.zoom = getLen(v) / this.pinchStartLen;
+            this.pinch.dispatch(evt, this.element);
+          }
+
+          evt.angle = getRotateAngle(v, preV);
+          this.rotate.dispatch(evt, this.element);
+        }
+        preV.x = v.x;
+        preV.y = v.y;
+
+        if (this.x2 !== null && this.sx2 !== null) {
+          evt.deltaX = (currentX - this.x2 + sCurrentX - this.sx2) / 2;
+          evt.deltaY = (currentY - this.y2 + sCurrentY - this.sy2) / 2;
+        } else {
+          evt.deltaX = 0;
+          evt.deltaY = 0;
+        }
+        this.twoFingerPressMove.dispatch(evt, this.element);
+
+        this.sx2 = sCurrentX;
+        this.sy2 = sCurrentY;
+      } else {
+        if (this.x2 !== null) {
+          evt.deltaX = currentX - this.x2;
+          evt.deltaY = currentY - this.y2;
+
+          //move事件中添加对当前触摸点到初始触摸点的判断,
+          //如果曾经大于过某个距离(比如10),就认为是移动到某个地方又移回来,应该不再触发tap事件才对。
+          var movedX = Math.abs(this.x1 - this.x2),
+            movedY = Math.abs(this.y1 - this.y2);
+
+          if (movedX > 10 || movedY > 10) {
+            this._preventTap = true;
+          }
+        } else {
+          evt.deltaX = 0;
+          evt.deltaY = 0;
+        }
+
+        this.pressMove.dispatch(evt, this.element);
+      }
+
+      this.touchMove.dispatch(evt, this.element);
+
+      this._cancelLongTap();
+      this.x2 = currentX;
+      this.y2 = currentY;
+
+      if (len > 1) {
+        evt.preventDefault();
+      }
+    },
+    end: function (evt) {
+      if (!evt.changedTouches) return;
+      this._cancelLongTap();
+      var self = this;
+      if (evt.touches.length < 2) {
+        this.multipointEnd.dispatch(evt, this.element);
+        this.sx2 = this.sy2 = null;
+      }
+
+      //swipe
+      if (
+        (this.x2 && Math.abs(this.x1 - this.x2) > 30) ||
+        (this.y2 && Math.abs(this.y1 - this.y2) > 30)
+      ) {
+        evt.direction = this._swipeDirection(
+          this.x1,
+          this.x2,
+          this.y1,
+          this.y2
+        );
+        this.swipeTimeout = setTimeout(function () {
+          self.swipe.dispatch(evt, self.element);
+        }, 0);
+      } else {
+        this.tapTimeout = setTimeout(function () {
+          if (!self._preventTap) {
+            self.tap.dispatch(evt, self.element);
+          }
+          // trigger double tap immediately
+          if (self.isDoubleTap) {
+            self.doubleTap.dispatch(evt, self.element);
+            self.isDoubleTap = false;
+          }
+        }, 0);
+
+        if (!self.isDoubleTap) {
+          self.singleTapTimeout = setTimeout(function () {
+            self.singleTap.dispatch(evt, self.element);
+          }, 250);
+        }
+      }
+
+      this.touchEnd.dispatch(evt, this.element);
+
+      this.preV.x = 0;
+      this.preV.y = 0;
+      this.zoom = 1;
+      this.pinchStartLen = null;
+      this.x1 = this.x2 = this.y1 = this.y2 = null;
+    },
+    cancelAll: function () {
+      this._preventTap = true;
+      clearTimeout(this.singleTapTimeout);
+      clearTimeout(this.tapTimeout);
+      clearTimeout(this.longTapTimeout);
+      clearTimeout(this.swipeTimeout);
+    },
+    cancel: function (evt) {
+      this.cancelAll();
+      this.touchCancel.dispatch(evt, this.element);
+    },
+    _cancelLongTap: function () {
+      clearTimeout(this.longTapTimeout);
+    },
+    _cancelSingleTap: function () {
+      clearTimeout(this.singleTapTimeout);
+    },
+    _swipeDirection: function (x1, x2, y1, y2) {
+      return Math.abs(x1 - x2) >= Math.abs(y1 - y2)
+        ? x1 - x2 > 0
+          ? "Left"
+          : "Right"
+        : y1 - y2 > 0
+        ? "Up"
+        : "Down";
+    },
+
+    on: function (evt, handler) {
+      if (this[evt]) {
+        this[evt].add(handler);
+      }
+    },
+
+    off: function (evt, handler) {
+      if (this[evt]) {
+        this[evt].del(handler);
+      }
+    },
+
+    destroy: function () {
+      if (this.singleTapTimeout) clearTimeout(this.singleTapTimeout);
+      if (this.tapTimeout) clearTimeout(this.tapTimeout);
+      if (this.longTapTimeout) clearTimeout(this.longTapTimeout);
+      if (this.swipeTimeout) clearTimeout(this.swipeTimeout);
+
+      this.element.removeEventListener("touchstart", this.start);
+      this.element.removeEventListener("touchmove", this.move);
+      this.element.removeEventListener("touchend", this.end);
+      this.element.removeEventListener("touchcancel", this.cancel);
+
+      this.rotate.del();
+      this.touchStart.del();
+      this.multipointStart.del();
+      this.multipointEnd.del();
+      this.pinch.del();
+      this.swipe.del();
+      this.tap.del();
+      this.doubleTap.del();
+      this.longTap.del();
+      this.singleTap.del();
+      this.pressMove.del();
+      this.twoFingerPressMove.del();
+      this.touchMove.del();
+      this.touchEnd.del();
+      this.touchCancel.del();
+
+      this.preV =
+        this.pinchStartLen =
+        this.zoom =
+        this.isDoubleTap =
+        this.delta =
+        this.last =
+        this.now =
+        this.tapTimeout =
+        this.singleTapTimeout =
+        this.longTapTimeout =
+        this.swipeTimeout =
+        this.x1 =
+        this.x2 =
+        this.y1 =
+        this.y2 =
+        this.preTapPosition =
+        this.rotate =
+        this.touchStart =
+        this.multipointStart =
+        this.multipointEnd =
+        this.pinch =
+        this.swipe =
+        this.tap =
+        this.doubleTap =
+        this.longTap =
+        this.singleTap =
+        this.pressMove =
+        this.touchMove =
+        this.touchEnd =
+        this.touchCancel =
+        this.twoFingerPressMove =
+          null;
+
+      window.removeEventListener("scroll", this._cancelAllHandler);
+      return null;
+    },
+  };
+
+  if (typeof module !== "undefined" && typeof exports === "object") {
+    module.exports = AlloyFinger;
+  } else {
+    window.AlloyFinger = AlloyFinger;
+  }
+})();

+ 48 - 0
common/utils/config.js

@@ -0,0 +1,48 @@
+let data = {}
+if (process.env.NODE_ENV === 'production') {
+	// data.baseUrl = 'https://mp.hotcrm.cn'
+	//  凌学荟  wx853f2fe562a2d7b2
+	// data.baseUrl = 'https://ling.weiet.com'
+	// data.imageUrl = 'https://ling.weiet.com/static/imgs/'
+	// 舒眠 wx63f79b3d61ba632b
+	data.baseUrl = 'https://clone.somnisix.net'
+	data.imageUrl = 'https://clone.somnisix.net/static/imgs/'
+	// data.baseUrl = 'https://shumian.weiet.com'
+	// data.imageUrl = 'https://shumian.weiet.com/static/imgs/'
+	// 曼普营养 wx86f38b5296f30852 https://work.hkmop.com/work
+	// data.baseUrl = 'https://work.hkmop.com'
+	// data.imageUrl = 'https://work.hkmop.com/static/imgs'
+	// 广州拓普思动物药业有限公司  wxa7a6f0e4096cd6fb
+	// data.baseUrl = 'https://tops.hkmop.com'
+	// data.imageUrl = 'https://tops.hkmop.com/static/imgs/'
+	// data.mpCommonClass = 'mp-common2'
+	// 康顿鲜果 wx08a09227a4c62857
+	// data.baseUrl = 'https://shop.kangdun0531.com'
+	// data.imageUrl = 'https://shop.kangdun0531.com/static/imgs/'
+	// data.mpCommonClass = 'mp-common3'
+} else {
+	// data.baseUrl = 'https://mp.hotcrm.cn'
+
+	//  凌学荟  wx853f2fe562a2d7b2
+	// data.baseUrl = 'https://ling.weiet.com'
+	// data.imageUrl = 'https://ling.weiet.com/static/imgs/'
+	// 舒眠 wx63f79b3d61ba632b
+
+	data.baseUrl = 'https://clone.somnisix.net'
+	data.imageUrl = 'https://clone.somnisix.net/static/imgs/'
+	// data.baseUrl = 'https://shumian.weiet.com'
+	// data.imageUrl = 'https://shumian.weiet.com/static/imgs/'
+	// 广州拓普思动物药业有限公司
+	// data.baseUrl = 'https://tops.hkmop.com'
+	// data.imageUrl = 'https://tops.hkmop.com/static/imgs/'
+	// data.mpCommonClass = 'mp-common2'
+	// 康顿鲜果
+	// data.baseUrl = 'https://shop.kangdun0531.com'
+	// data.imageUrl = 'https://shop.kangdun0531.com/static/imgs/'
+	// data.mpCommonClass = 'mp-common3'
+	// 曼普营养 wx86f38b5296f30852 
+	// data.baseUrl = 'https://work.hkmop.com'
+	// data.imageUrl = 'https://work.hkmop.com/static/imgs'
+}
+
+export default data

+ 199 - 0
common/utils/map-utils.js

@@ -0,0 +1,199 @@
+//坐标转换
+//WGS84:为一种大地坐标系,也是目前广泛使用的GPS全球卫星定位系统使用的坐标系。
+//GCJ02:又称火星坐标系,是由中国国家测绘局制订的地理信息系统的坐标系统。由WGS84坐标系经加密后的坐标系
+//BD09:为百度坐标系,在GCJ02坐标系基础上再次加密。其中bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托米制(mercator)坐标。
+//h5在微信浏览器里、uniapp是使用 gcj02 国测局坐标系
+//WGS84  GCJ02  BD09
+const PI = 3.14159265358979324;
+const x_pi = 3.14159265358979324 * 3000.0 / 180.0;
+const delta = (lat, lon) => {
+    // Krasovsky 1940
+    //
+    // a = 6378245.0, 1/f = 298.3
+    // b = a * (1 - f)
+    // ee = (a^2 - b^2) / a^2;
+    var a = 6378245.0; //  a: 卫星椭球坐标投影到平面地图坐标系的投影因子。
+    var ee = 0.00669342162296594323; //  ee: 椭球的偏心率。
+    var dLat =  transformLat(lon - 105.0, lat - 35.0);
+    var dLon =  transformLon(lon - 105.0, lat - 35.0);
+    var radLat = lat / 180.0 *  PI;
+    var magic = Math.sin(radLat);
+    magic = 1 - ee * magic * magic;
+    var sqrtMagic = Math.sqrt(magic);
+    dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) *  PI);
+    dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) *  PI);
+    return {
+        'lat': dLat,
+        'lon': dLon
+    };
+}
+
+//WGS-84 to GCJ-02
+const gcj_encrypt = (wgsLat, wgsLon) => {
+    if ( outOfChina(wgsLat, wgsLon))
+        return {
+            'lat': wgsLat,
+            'lon': wgsLon
+        };
+
+    var d =  delta(wgsLat, wgsLon);
+    return {
+        'lat': wgsLat + d.lat,
+        'lon': wgsLon + d.lon
+    };
+}
+
+//GCJ-02 to WGS-84
+const gcj_decrypt_To_wgs = (gcjLat, gcjLon) => {
+    if ( outOfChina(gcjLat, gcjLon))
+        return {
+            'lat': gcjLat,
+            'lon': gcjLon
+        };
+
+    var d =  delta(gcjLat, gcjLon);
+    return {
+        'lat': gcjLat - d.lat,
+        'lon': gcjLon - d.lon
+    };
+}
+
+//GCJ-02 to WGS-84 exactly
+const gcj_decrypt_exact = (gcjLat, gcjLon) => {
+    var initDelta = 0.01;
+    var threshold = 0.000000001;
+    var dLat = initDelta,
+        dLon = initDelta;
+    var mLat = gcjLat - dLat,
+        mLon = gcjLon - dLon;
+    var pLat = gcjLat + dLat,
+        pLon = gcjLon + dLon;
+    var wgsLat, wgsLon, i = 0;
+    while (1) {
+        wgsLat = (mLat + pLat) / 2;
+        wgsLon = (mLon + pLon) / 2;
+        var tmp =  gcj_encrypt(wgsLat, wgsLon)
+        dLat = tmp.lat - gcjLat;
+        dLon = tmp.lon - gcjLon;
+        if ((Math.abs(dLat) < threshold) && (Math.abs(dLon) < threshold))
+            break;
+
+        if (dLat > 0) pLat = wgsLat;
+        else mLat = wgsLat;
+        if (dLon > 0) pLon = wgsLon;
+        else mLon = wgsLon;
+
+        if (++i > 10000) break;
+    }
+    //console.log(i);
+    return {
+        'lat': wgsLat,
+        'lon': wgsLon
+    };
+}
+
+//GCJ-02 to BD-09
+const bd_encrypt = (gcjLat, gcjLon) => {
+    var x = gcjLon,
+        y = gcjLat;
+    var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
+    var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
+    bdLon = z * Math.cos(theta) + 0.0065;
+    bdLat = z * Math.sin(theta) + 0.006;
+    return {
+        'lat': bdLat,
+        'lon': bdLon
+    };
+}
+//BD-09 to GCJ-02
+const bd_decrypt_To_gcj = (bdLat, bdLon) => {
+    var x = bdLon - 0.0065,
+        y = bdLat - 0.006;
+    var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
+    var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
+    var gcjLon = z * Math.cos(theta);
+    var gcjLat = z * Math.sin(theta);
+    return {
+        'lat': gcjLat,
+        'lon': gcjLon
+    };
+}
+//WGS-84 to Web mercator
+//mercatorLat -> y mercatorLon -> x
+const mercator_encrypt = (wgsLat, wgsLon) => {
+    var x = wgsLon * 20037508.34 / 180.;
+    var y = Math.log(Math.tan((90. + wgsLat) *  PI / 360.)) / ( PI / 180.);
+    y = y * 20037508.34 / 180.;
+    return {
+        'lat': y,
+        'lon': x
+    };
+    /*
+     if ((Math.abs(wgsLon) > 180 || Math.abs(wgsLat) > 90))
+     return null;
+     var x = 6378137.0 * wgsLon * 0.017453292519943295;
+     var a = wgsLat * 0.017453292519943295;
+     var y = 3189068.5 * Math.log((1.0 + Math.sin(a)) / (1.0 - Math.sin(a)));
+     return {'lat' : y, 'lon' : x};
+     //*/
+}
+// Web mercator to WGS-84
+// mercatorLat -> y mercatorLon -> x
+const mercator_decrypt = (mercatorLat, mercatorLon) => {
+    var x = mercatorLon / 20037508.34 * 180.;
+    var y = mercatorLat / 20037508.34 * 180.;
+    y = 180 /  PI * (2 * Math.atan(Math.exp(y *  PI / 180.)) -  PI / 2);
+    return {
+        'lat': y,
+        'lon': x
+    };
+    /*
+     if (Math.abs(mercatorLon) < 180 && Math.abs(mercatorLat) < 90)
+     return null;
+     if ((Math.abs(mercatorLon) > 20037508.3427892) || (Math.abs(mercatorLat) > 20037508.3427892))
+     return null;
+     var a = mercatorLon / 6378137.0 * 57.295779513082323;
+     var x = a - (Math.floor(((a + 180.0) / 360.0)) * 360.0);
+     var y = (1.5707963267948966 - (2.0 * Math.atan(Math.exp((-1.0 * mercatorLat) / 6378137.0)))) * 57.295779513082323;
+     return {'lat' : y, 'lon' : x};
+     //*/
+}
+// two point's distance
+const distance = (latA, lonA, latB, lonB) => {
+    var earthR = 6371000.;
+    var x = Math.cos(latA *  PI / 180.) * Math.cos(latB *  PI / 180.) * Math.cos((lonA - lonB) *  PI / 180);
+    var y = Math.sin(latA *  PI / 180.) * Math.sin(latB *  PI / 180.);
+    var s = x + y;
+    if (s > 1) s = 1;
+    if (s < -1) s = -1;
+    var alpha = Math.acos(s);
+    var distance = alpha * earthR;
+    return distance;
+}
+const outOfChina = (lat, lon) => {
+    if (lon < 72.004 || lon > 137.8347)
+        return true;
+    if (lat < 0.8293 || lat > 55.8271)
+        return true;
+    return false;
+}
+const transformLat = (x, y) => {
+    var ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
+    ret += (20.0 * Math.sin(6.0 * x *  PI) + 20.0 * Math.sin(2.0 * x *  PI)) * 2.0 / 3.0;
+    ret += (20.0 * Math.sin(y *  PI) + 40.0 * Math.sin(y / 3.0 *  PI)) * 2.0 / 3.0;
+    ret += (160.0 * Math.sin(y / 12.0 *  PI) + 320 * Math.sin(y *  PI / 30.0)) * 2.0 / 3.0;
+    return ret;
+}
+const transformLon = (x, y) => {
+    var ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
+    ret += (20.0 * Math.sin(6.0 * x *  PI) + 20.0 * Math.sin(2.0 * x *  PI)) * 2.0 / 3.0;
+    ret += (20.0 * Math.sin(x *  PI) + 40.0 * Math.sin(x / 3.0 *  PI)) * 2.0 / 3.0;
+    ret += (150.0 * Math.sin(x / 12.0 *  PI) + 300.0 * Math.sin(x / 30.0 *  PI)) * 2.0 / 3.0;
+    return ret;
+}
+
+
+module.exports = {
+    bd_decrypt_To_gcj : bd_decrypt_To_gcj ,
+    gcj_decrypt_To_wgs : gcj_decrypt_To_wgs ,
+}

+ 685 - 0
common/utils/md5.js

@@ -0,0 +1,685 @@
+/**
+ * [js-md5]{@link https://github.com/emn178/js-md5}
+ *
+ * @namespace md5
+ * @version 0.7.3
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
+ * @copyright Chen, Yi-Cyuan 2014-2017
+ * @license MIT
+ */
+(function () {
+  'use strict';
+
+  var ERROR = 'input is invalid type';
+  var WINDOW = typeof window === 'object';
+  var root = WINDOW ? window : {};
+  if (root.JS_MD5_NO_WINDOW) {
+    WINDOW = false;
+  }
+  var WEB_WORKER = !WINDOW && typeof self === 'object';
+  var NODE_JS = !root.JS_MD5_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
+  if (NODE_JS) {
+    root = global;
+  } else if (WEB_WORKER) {
+    root = self;
+  }
+  var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports;
+  var AMD = typeof define === 'function' && define.amd;
+  var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';
+  var HEX_CHARS = '0123456789abcdef'.split('');
+  var EXTRA = [128, 32768, 8388608, -2147483648];
+  var SHIFT = [0, 8, 16, 24];
+  var OUTPUT_TYPES = ['hex', 'array', 'digest', 'buffer', 'arrayBuffer', 'base64'];
+  var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+  var blocks = [], buffer8;
+  if (ARRAY_BUFFER) {
+    var buffer = new ArrayBuffer(68);
+    buffer8 = new Uint8Array(buffer);
+    blocks = new Uint32Array(buffer);
+  }
+
+  if (root.JS_MD5_NO_NODE_JS || !Array.isArray) {
+    Array.isArray = function (obj) {
+      return Object.prototype.toString.call(obj) === '[object Array]';
+    };
+  }
+
+  if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
+    ArrayBuffer.isView = function (obj) {
+      return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;
+    };
+  }
+
+  /**
+   * @method hex
+   * @memberof md5
+   * @description Output hash as hex string
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {String} Hex string
+   * @example
+   * md5.hex('The quick brown fox jumps over the lazy dog');
+   * // equal to
+   * md5('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method digest
+   * @memberof md5
+   * @description Output hash as bytes array
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {Array} Bytes array
+   * @example
+   * md5.digest('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method array
+   * @memberof md5
+   * @description Output hash as bytes array
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {Array} Bytes array
+   * @example
+   * md5.array('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method arrayBuffer
+   * @memberof md5
+   * @description Output hash as ArrayBuffer
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {ArrayBuffer} ArrayBuffer
+   * @example
+   * md5.arrayBuffer('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method buffer
+   * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
+   * @memberof md5
+   * @description Output hash as ArrayBuffer
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {ArrayBuffer} ArrayBuffer
+   * @example
+   * md5.buffer('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method base64
+   * @memberof md5
+   * @description Output hash as base64 string
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {String} base64 string
+   * @example
+   * md5.base64('The quick brown fox jumps over the lazy dog');
+   */
+  var createOutputMethod = function (outputType) {
+    return function (message) {
+      return new Md5(true).update(message)[outputType]();
+    };
+  };
+
+  /**
+   * @method create
+   * @memberof md5
+   * @description Create Md5 object
+   * @returns {Md5} Md5 object.
+   * @example
+   * var hash = md5.create();
+   */
+  /**
+   * @method update
+   * @memberof md5
+   * @description Create and update Md5 object
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {Md5} Md5 object.
+   * @example
+   * var hash = md5.update('The quick brown fox jumps over the lazy dog');
+   * // equal to
+   * var hash = md5.create();
+   * hash.update('The quick brown fox jumps over the lazy dog');
+   */
+  var createMethod = function () {
+    var method = createOutputMethod('hex');
+    if (NODE_JS) {
+      method = nodeWrap(method);
+    }
+    method.create = function () {
+      return new Md5();
+    };
+    method.update = function (message) {
+      return method.create().update(message);
+    };
+    for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
+      var type = OUTPUT_TYPES[i];
+      method[type] = createOutputMethod(type);
+    }
+    return method;
+  };
+
+  var nodeWrap = function (method) {
+    var crypto = eval("require('crypto')");
+    var Buffer = eval("require('buffer').Buffer");
+    var nodeMethod = function (message) {
+      if (typeof message === 'string') {
+        return crypto.createHash('md5').update(message, 'utf8').digest('hex');
+      } else {
+        if (message === null || message === undefined) {
+          throw ERROR;
+        } else if (message.constructor === ArrayBuffer) {
+          message = new Uint8Array(message);
+        }
+      }
+      if (Array.isArray(message) || ArrayBuffer.isView(message) ||
+        message.constructor === Buffer) {
+        return crypto.createHash('md5').update(new Buffer(message)).digest('hex');
+      } else {
+        return method(message);
+      }
+    };
+    return nodeMethod;
+  };
+
+
+
+  /**
+   * Md5 class
+   * @class Md5
+   * @description This is internal class.
+   * @see {@link md5.create}
+   */
+  function Md5(sharedMemory) {
+    if (sharedMemory) {
+      blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+      blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+      blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+      blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+      this.blocks = blocks;
+      this.buffer8 = buffer8;
+    } else {
+      if (ARRAY_BUFFER) {
+        var buffer = new ArrayBuffer(68);
+        this.buffer8 = new Uint8Array(buffer);
+        this.blocks = new Uint32Array(buffer);
+      } else {
+        this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+      }
+    }
+    this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
+    this.finalized = this.hashed = false;
+    this.first = true;
+  }
+
+  /**
+   * @method update
+   * @memberof Md5
+   * @instance
+   * @description Update hash
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {Md5} Md5 object.
+   * @see {@link md5.update}
+   */
+  Md5.prototype.update = function (message) {
+    if (this.finalized) {
+      return;
+    }
+
+    var notString, type = typeof message;
+    if (type !== 'string') {
+      if (type === 'object') {
+        if (message === null) {
+          throw ERROR;
+        } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
+          message = new Uint8Array(message);
+        } else if (!Array.isArray(message)) {
+          if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
+            throw ERROR;
+          }
+        }
+      } else {
+        throw ERROR;
+      }
+      notString = true;
+    }
+    var code, index = 0, i, length = message.length, blocks = this.blocks;
+    var buffer8 = this.buffer8;
+
+    while (index < length) {
+      if (this.hashed) {
+        this.hashed = false;
+        blocks[0] = blocks[16];
+        blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+        blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+        blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+        blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+      }
+
+      if (notString) {
+        if (ARRAY_BUFFER) {
+          for (i = this.start; index < length && i < 64; ++index) {
+            buffer8[i++] = message[index];
+          }
+        } else {
+          for (i = this.start; index < length && i < 64; ++index) {
+            blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
+          }
+        }
+      } else {
+        if (ARRAY_BUFFER) {
+          for (i = this.start; index < length && i < 64; ++index) {
+            code = message.charCodeAt(index);
+            if (code < 0x80) {
+              buffer8[i++] = code;
+            } else if (code < 0x800) {
+              buffer8[i++] = 0xc0 | (code >> 6);
+              buffer8[i++] = 0x80 | (code & 0x3f);
+            } else if (code < 0xd800 || code >= 0xe000) {
+              buffer8[i++] = 0xe0 | (code >> 12);
+              buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
+              buffer8[i++] = 0x80 | (code & 0x3f);
+            } else {
+              code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
+              buffer8[i++] = 0xf0 | (code >> 18);
+              buffer8[i++] = 0x80 | ((code >> 12) & 0x3f);
+              buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
+              buffer8[i++] = 0x80 | (code & 0x3f);
+            }
+          }
+        } else {
+          for (i = this.start; index < length && i < 64; ++index) {
+            code = message.charCodeAt(index);
+            if (code < 0x80) {
+              blocks[i >> 2] |= code << SHIFT[i++ & 3];
+            } else if (code < 0x800) {
+              blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+            } else if (code < 0xd800 || code >= 0xe000) {
+              blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+            } else {
+              code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
+              blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+            }
+          }
+        }
+      }
+      this.lastByteIndex = i;
+      this.bytes += i - this.start;
+      if (i >= 64) {
+        this.start = i - 64;
+        this.hash();
+        this.hashed = true;
+      } else {
+        this.start = i;
+      }
+    }
+    if (this.bytes > 4294967295) {
+      this.hBytes += this.bytes / 4294967296 << 0;
+      this.bytes = this.bytes % 4294967296;
+    }
+    return this;
+  };
+
+  Md5.prototype.finalize = function () {
+    if (this.finalized) {
+      return;
+    }
+    this.finalized = true;
+    var blocks = this.blocks, i = this.lastByteIndex;
+    blocks[i >> 2] |= EXTRA[i & 3];
+    if (i >= 56) {
+      if (!this.hashed) {
+        this.hash();
+      }
+      blocks[0] = blocks[16];
+      blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+      blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+      blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+      blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+    }
+    blocks[14] = this.bytes << 3;
+    blocks[15] = this.hBytes << 3 | this.bytes >>> 29;
+    this.hash();
+  };
+
+  Md5.prototype.hash = function () {
+    var a, b, c, d, bc, da, blocks = this.blocks;
+
+    if (this.first) {
+      a = blocks[0] - 680876937;
+      a = (a << 7 | a >>> 25) - 271733879 << 0;
+      d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708;
+      d = (d << 12 | d >>> 20) + a << 0;
+      c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375;
+      c = (c << 17 | c >>> 15) + d << 0;
+      b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209;
+      b = (b << 22 | b >>> 10) + c << 0;
+    } else {
+      a = this.h0;
+      b = this.h1;
+      c = this.h2;
+      d = this.h3;
+      a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936;
+      a = (a << 7 | a >>> 25) + b << 0;
+      d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586;
+      d = (d << 12 | d >>> 20) + a << 0;
+      c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819;
+      c = (c << 17 | c >>> 15) + d << 0;
+      b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330;
+      b = (b << 22 | b >>> 10) + c << 0;
+    }
+
+    a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897;
+    a = (a << 7 | a >>> 25) + b << 0;
+    d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426;
+    d = (d << 12 | d >>> 20) + a << 0;
+    c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341;
+    c = (c << 17 | c >>> 15) + d << 0;
+    b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983;
+    b = (b << 22 | b >>> 10) + c << 0;
+    a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416;
+    a = (a << 7 | a >>> 25) + b << 0;
+    d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417;
+    d = (d << 12 | d >>> 20) + a << 0;
+    c += (b ^ (d & (a ^ b))) + blocks[10] - 42063;
+    c = (c << 17 | c >>> 15) + d << 0;
+    b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162;
+    b = (b << 22 | b >>> 10) + c << 0;
+    a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682;
+    a = (a << 7 | a >>> 25) + b << 0;
+    d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101;
+    d = (d << 12 | d >>> 20) + a << 0;
+    c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290;
+    c = (c << 17 | c >>> 15) + d << 0;
+    b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329;
+    b = (b << 22 | b >>> 10) + c << 0;
+    a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510;
+    a = (a << 5 | a >>> 27) + b << 0;
+    d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632;
+    d = (d << 9 | d >>> 23) + a << 0;
+    c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713;
+    c = (c << 14 | c >>> 18) + d << 0;
+    b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302;
+    b = (b << 20 | b >>> 12) + c << 0;
+    a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691;
+    a = (a << 5 | a >>> 27) + b << 0;
+    d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083;
+    d = (d << 9 | d >>> 23) + a << 0;
+    c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335;
+    c = (c << 14 | c >>> 18) + d << 0;
+    b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848;
+    b = (b << 20 | b >>> 12) + c << 0;
+    a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438;
+    a = (a << 5 | a >>> 27) + b << 0;
+    d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690;
+    d = (d << 9 | d >>> 23) + a << 0;
+    c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961;
+    c = (c << 14 | c >>> 18) + d << 0;
+    b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501;
+    b = (b << 20 | b >>> 12) + c << 0;
+    a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467;
+    a = (a << 5 | a >>> 27) + b << 0;
+    d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784;
+    d = (d << 9 | d >>> 23) + a << 0;
+    c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473;
+    c = (c << 14 | c >>> 18) + d << 0;
+    b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734;
+    b = (b << 20 | b >>> 12) + c << 0;
+    bc = b ^ c;
+    a += (bc ^ d) + blocks[5] - 378558;
+    a = (a << 4 | a >>> 28) + b << 0;
+    d += (bc ^ a) + blocks[8] - 2022574463;
+    d = (d << 11 | d >>> 21) + a << 0;
+    da = d ^ a;
+    c += (da ^ b) + blocks[11] + 1839030562;
+    c = (c << 16 | c >>> 16) + d << 0;
+    b += (da ^ c) + blocks[14] - 35309556;
+    b = (b << 23 | b >>> 9) + c << 0;
+    bc = b ^ c;
+    a += (bc ^ d) + blocks[1] - 1530992060;
+    a = (a << 4 | a >>> 28) + b << 0;
+    d += (bc ^ a) + blocks[4] + 1272893353;
+    d = (d << 11 | d >>> 21) + a << 0;
+    da = d ^ a;
+    c += (da ^ b) + blocks[7] - 155497632;
+    c = (c << 16 | c >>> 16) + d << 0;
+    b += (da ^ c) + blocks[10] - 1094730640;
+    b = (b << 23 | b >>> 9) + c << 0;
+    bc = b ^ c;
+    a += (bc ^ d) + blocks[13] + 681279174;
+    a = (a << 4 | a >>> 28) + b << 0;
+    d += (bc ^ a) + blocks[0] - 358537222;
+    d = (d << 11 | d >>> 21) + a << 0;
+    da = d ^ a;
+    c += (da ^ b) + blocks[3] - 722521979;
+    c = (c << 16 | c >>> 16) + d << 0;
+    b += (da ^ c) + blocks[6] + 76029189;
+    b = (b << 23 | b >>> 9) + c << 0;
+    bc = b ^ c;
+    a += (bc ^ d) + blocks[9] - 640364487;
+    a = (a << 4 | a >>> 28) + b << 0;
+    d += (bc ^ a) + blocks[12] - 421815835;
+    d = (d << 11 | d >>> 21) + a << 0;
+    da = d ^ a;
+    c += (da ^ b) + blocks[15] + 530742520;
+    c = (c << 16 | c >>> 16) + d << 0;
+    b += (da ^ c) + blocks[2] - 995338651;
+    b = (b << 23 | b >>> 9) + c << 0;
+    a += (c ^ (b | ~d)) + blocks[0] - 198630844;
+    a = (a << 6 | a >>> 26) + b << 0;
+    d += (b ^ (a | ~c)) + blocks[7] + 1126891415;
+    d = (d << 10 | d >>> 22) + a << 0;
+    c += (a ^ (d | ~b)) + blocks[14] - 1416354905;
+    c = (c << 15 | c >>> 17) + d << 0;
+    b += (d ^ (c | ~a)) + blocks[5] - 57434055;
+    b = (b << 21 | b >>> 11) + c << 0;
+    a += (c ^ (b | ~d)) + blocks[12] + 1700485571;
+    a = (a << 6 | a >>> 26) + b << 0;
+    d += (b ^ (a | ~c)) + blocks[3] - 1894986606;
+    d = (d << 10 | d >>> 22) + a << 0;
+    c += (a ^ (d | ~b)) + blocks[10] - 1051523;
+    c = (c << 15 | c >>> 17) + d << 0;
+    b += (d ^ (c | ~a)) + blocks[1] - 2054922799;
+    b = (b << 21 | b >>> 11) + c << 0;
+    a += (c ^ (b | ~d)) + blocks[8] + 1873313359;
+    a = (a << 6 | a >>> 26) + b << 0;
+    d += (b ^ (a | ~c)) + blocks[15] - 30611744;
+    d = (d << 10 | d >>> 22) + a << 0;
+    c += (a ^ (d | ~b)) + blocks[6] - 1560198380;
+    c = (c << 15 | c >>> 17) + d << 0;
+    b += (d ^ (c | ~a)) + blocks[13] + 1309151649;
+    b = (b << 21 | b >>> 11) + c << 0;
+    a += (c ^ (b | ~d)) + blocks[4] - 145523070;
+    a = (a << 6 | a >>> 26) + b << 0;
+    d += (b ^ (a | ~c)) + blocks[11] - 1120210379;
+    d = (d << 10 | d >>> 22) + a << 0;
+    c += (a ^ (d | ~b)) + blocks[2] + 718787259;
+    c = (c << 15 | c >>> 17) + d << 0;
+    b += (d ^ (c | ~a)) + blocks[9] - 343485551;
+    b = (b << 21 | b >>> 11) + c << 0;
+
+    if (this.first) {
+      this.h0 = a + 1732584193 << 0;
+      this.h1 = b - 271733879 << 0;
+      this.h2 = c - 1732584194 << 0;
+      this.h3 = d + 271733878 << 0;
+      this.first = false;
+    } else {
+      this.h0 = this.h0 + a << 0;
+      this.h1 = this.h1 + b << 0;
+      this.h2 = this.h2 + c << 0;
+      this.h3 = this.h3 + d << 0;
+    }
+  };
+
+  /**
+   * @method hex
+   * @memberof Md5
+   * @instance
+   * @description Output hash as hex string
+   * @returns {String} Hex string
+   * @see {@link md5.hex}
+   * @example
+   * hash.hex();
+   */
+  Md5.prototype.hex = function () {
+    this.finalize();
+
+    var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
+
+    return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +
+      HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +
+      HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +
+      HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +
+      HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
+      HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +
+      HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +
+      HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +
+      HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
+      HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +
+      HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +
+      HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +
+      HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
+      HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +
+      HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +
+      HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F];
+  };
+
+  /**
+   * @method toString
+   * @memberof Md5
+   * @instance
+   * @description Output hash as hex string
+   * @returns {String} Hex string
+   * @see {@link md5.hex}
+   * @example
+   * hash.toString();
+   */
+  Md5.prototype.toString = Md5.prototype.hex;
+
+  /**
+   * @method digest
+   * @memberof Md5
+   * @instance
+   * @description Output hash as bytes array
+   * @returns {Array} Bytes array
+   * @see {@link md5.digest}
+   * @example
+   * hash.digest();
+   */
+  Md5.prototype.digest = function () {
+    this.finalize();
+
+    var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
+    return [
+      h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 24) & 0xFF,
+      h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 24) & 0xFF,
+      h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 24) & 0xFF,
+      h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 24) & 0xFF
+    ];
+  };
+
+  /**
+   * @method array
+   * @memberof Md5
+   * @instance
+   * @description Output hash as bytes array
+   * @returns {Array} Bytes array
+   * @see {@link md5.array}
+   * @example
+   * hash.array();
+   */
+  Md5.prototype.array = Md5.prototype.digest;
+
+  /**
+   * @method arrayBuffer
+   * @memberof Md5
+   * @instance
+   * @description Output hash as ArrayBuffer
+   * @returns {ArrayBuffer} ArrayBuffer
+   * @see {@link md5.arrayBuffer}
+   * @example
+   * hash.arrayBuffer();
+   */
+  Md5.prototype.arrayBuffer = function () {
+    this.finalize();
+
+    var buffer = new ArrayBuffer(16);
+    var blocks = new Uint32Array(buffer);
+    blocks[0] = this.h0;
+    blocks[1] = this.h1;
+    blocks[2] = this.h2;
+    blocks[3] = this.h3;
+    return buffer;
+  };
+
+  /**
+   * @method buffer
+   * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
+   * @memberof Md5
+   * @instance
+   * @description Output hash as ArrayBuffer
+   * @returns {ArrayBuffer} ArrayBuffer
+   * @see {@link md5.buffer}
+   * @example
+   * hash.buffer();
+   */
+  Md5.prototype.buffer = Md5.prototype.arrayBuffer;
+
+  /**
+   * @method base64
+   * @memberof Md5
+   * @instance
+   * @description Output hash as base64 string
+   * @returns {String} base64 string
+   * @see {@link md5.base64}
+   * @example
+   * hash.base64();
+   */
+  Md5.prototype.base64 = function () {
+    var v1, v2, v3, base64Str = '', bytes = this.array();
+    for (var i = 0; i < 15;) {
+      v1 = bytes[i++];
+      v2 = bytes[i++];
+      v3 = bytes[i++];
+      base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
+        BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
+        BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
+        BASE64_ENCODE_CHAR[v3 & 63];
+    }
+    v1 = bytes[i];
+    base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
+      BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
+      '==';
+    return base64Str;
+  };
+
+  var exports = createMethod();
+
+  if (COMMON_JS) {
+    module.exports = exports;
+  } else {
+    /**
+     * @method md5
+     * @description Md5 hash function, export to global in browsers.
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {String} md5 hashes
+     * @example
+     * md5(''); // d41d8cd98f00b204e9800998ecf8427e
+     * md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
+     * md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
+     *
+     * // It also supports UTF-8 encoding
+     * md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
+     *
+     * // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
+     * md5([]); // d41d8cd98f00b204e9800998ecf8427e
+     * md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
+     */
+    root.md5 = exports;
+    if (AMD) {
+      define(function () {
+        return exports;
+      });
+    }
+  }
+})();

+ 251 - 0
common/utils/request.js

@@ -0,0 +1,251 @@
+import $C from './config.js'
+import $U from './util.js'
+import { jsonFilterEmpty } from './tools.js'
+
+
+export default {
+	// 全局配置 application/json;
+	common: {
+		baseUrl: $C.baseUrl,
+		header: {
+			// 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
+			'Content-Type': 'application/json;charset=utf-8'
+		},
+		data: {},
+		method: 'GET',
+		dataType: 'json',
+		token: true
+	},
+	// 请求 返回promise
+	request(options = {}) {
+		let _that = this
+		// 组织参数
+		if (options.commonBaseUrl) {
+			options.url = options.commonBaseUrl + options.url
+		} else {
+			options.url = this.common.baseUrl + options.url
+		}
+		options.header = options.header || this.common.header
+		options.data = options.data || this.common.data
+		options.method = options.method || this.common.method
+		options.dataType = options.dataType || this.common.dataType
+		options.header['api-type'] = 'wxapp'
+		if (uni.getStorageSync('token')) {
+			options.header.Authorization = uni.getStorageSync('token')
+			options.header['api-token'] = uni.getStorageSync('token')
+		}
+		options.timeout = 10000
+		console.log('options===', options)
+
+		uni.showLoading()
+		// 请求
+		return new Promise((res, rej) => {
+			// 请求之前检测有没有网络
+			uni.request({
+				...options,
+				success: result => {
+					uni.hideLoading()
+					let {
+						statusCode,
+						data
+					} = result
+					// 返回原始数据
+					if (options.native) {
+						return res(result)
+					}
+					// 成功
+					if (statusCode == 200) {
+						if (data.code === 200) {
+							res(data)
+						} else if (data.code === 401) {
+							console.log('登陆已过期')
+							uni.removeStorageSync('userInfo')
+							uni.removeStorage({
+								key: 'token',
+								success: () => {
+									setTimeout(function() {
+										uni.reLaunch({ url: '/pages/home/dashboard/index', })
+									}, 500)
+								}
+							})
+							return rej(data)
+						} else if (data.code === 403) {
+							console.log('登陆已过期')
+							uni.removeStorageSync('userInfo')
+							uni.removeStorage({
+								key: 'token',
+								success: () => {
+									setTimeout(function() {
+										uni.reLaunch({ url: '/pages/home/dashboard/index', })
+									}, 500)
+								}
+							})
+							return rej(data)
+						} else if (data.code === 500) {
+							uni.showToast({
+								title: data.msg || '',
+								icon: 'none',
+								duration: 2000
+							})
+							return rej(data)
+						} else {
+							uni.hideLoading()
+							uni.showToast({
+								title: data.msg || '返回失败',
+								icon: 'none',
+								duration: 3000
+							})
+							return rej(data)
+						}
+					} else if (statusCode == 401 || statusCode == 403 || statusCode == 204) {
+						console.log('登陆已过期')
+						// uni.removeStorageSync(`userInfo`)
+						// uni.removeStorage({
+						// 	key: `token`,
+						// 	success: () => {
+						// 		setTimeout(function() {
+						// 			uni.reLaunch({
+						// 				url: `/pages/home/dashboard/index`,
+						// 			});
+						// 		}, 500);
+						// 	}
+						// })
+						return rej(data)
+					} else {
+						uni.showToast({
+							title: data.msg || '返回失败',
+							icon: 'none',
+							duration: 3000
+						})
+						return rej(data)
+					}
+				},
+				fail: error => {
+					console.log('error', error)
+					uni.hideLoading()
+					if (error.errMsg && error.errMsg.indexOf('fail timeout') != -1 || error
+						.errMsg && error.errMsg.indexOf('请求超时') != -1) {
+						uni.showToast({
+							title: error.errMsg,
+							icon: 'none',
+							duration: 2500
+						})
+					} else {
+						// uni.showToast({
+						// 	title: '服务维护中,请稍后尝试',
+						// 	icon: 'none',
+						// 	duration: 2500
+						// });
+					}
+					return rej(error)
+				}
+			})
+
+		})
+	},
+	// get请求
+	get(url, data = {}, options = {}, needtoken = true) {
+		options.url = url
+		// 参数是否去空
+		if (data.notFliter) {
+			delete data.notFliter
+			options.data = data
+		} else {
+			options.data = jsonFilterEmpty(data)
+		}
+		options.method = 'GET'
+		options.token = needtoken
+		return this.request(options)
+	},
+	// post请求
+	post(url, data = {}, options = {}, needtoken = true) {
+		options.url = url
+		// 参数是否去空
+		if (data.notFliter) {
+			delete data.notFliter
+			options.data = data
+		} else {
+			options.data = jsonFilterEmpty(data)
+		}
+		options.method = 'POST'
+		options.token = needtoken
+		return this.request(options)
+	},
+	// put请求
+	put(url, data = {}, options = {}, needtoken = true) {
+		options.url = url
+		options.data = data
+		options.method = 'PUT'
+		options.token = needtoken
+		return this.request(options)
+	},
+	// delete请求
+	del(url, data = {}, options = {}, needtoken = true) {
+		options.url = url
+		options.data = data
+		options.method = 'DELETE'
+		options.token = needtoken
+		return this.request(options)
+	},
+	// 上传文件
+	upload(url, data, onProgress = false) {
+		return new Promise((result, reject) => {
+			// 上传
+			let token = uni.getStorageSync('token')
+			if (!token) {
+				uni.showToast({
+					title: '请先登录',
+					icon: 'none'
+				})
+				// token不存在时跳转
+				return uni.reLaunch({ url: '/pages/home/dashboard/index', })
+			}
+			// uni.showLoading({
+			// 	title: '上传中...',
+			// 	mask: true
+			// });
+			const uploadTask = uni.uploadFile({
+				url: $C.baseUrl + url,
+				filePath: data.filePath,
+				name: data.name || 'files',
+				header: {
+					'api-token': token,
+					'api-name': 'wxapp',
+				},
+				success: res => {
+					uni.hideLoading()
+					let message = JSON.parse(res.data)
+					if (res.statusCode === 200) {
+						result(message.data)
+					} else if (res.statusCode === 401) {
+						console.log(res)
+						uni.showToast({
+							title: message.msg,
+							icon: 'none'
+						})
+						uni.reLaunch({ url: '/pages/home/dashboard/index', })
+						reject(message)
+					} else {
+						uni.showToast({
+							title: message.msg,
+							icon: 'none'
+						})
+						result(false)
+					}
+				},
+				fail: err => {
+					console.log(err)
+					uni.hideLoading()
+					reject(err)
+				}
+			})
+
+			uploadTask.onProgressUpdate(res => {
+				if (typeof onProgress === 'function') {
+					onProgress(res.progress)
+				}
+			})
+
+		})
+	}
+}

+ 272 - 0
common/utils/tools.js

@@ -0,0 +1,272 @@
+import moment from 'moment'
+import { getOrderPayData } from '@/common/api'
+
+// 获取微信支付并支付
+export const toWechatPay = (orderNo, remark) => {
+	let sendData = { order_no: orderNo }
+	if (remark) {
+		sendData.order_remark = remark
+	}
+	getOrderPayData(sendData).then(res => {
+		const { appId, nonceStr, paySign, signType, timeStamp } = res.data.param
+		uni.requestPayment({
+			provider: 'wxpay',
+			nonceStr,
+			package: res.data.param.package,
+			paySign,
+			signType,
+			timeStamp,
+			success: function(res) {
+				uni.navigateTo({ url: `/subPages/paySuccess/paySuccess?orderNo=${orderNo}` })
+			},
+			fail: function(err) {
+				uni.navigateTo({ url: `/subPages/orderDetail/orderDetail?orderNo=${orderNo}` })
+			}
+		})
+	})
+}
+
+// 简单对象去空
+export const jsonFilterEmpty = data => {
+	let tempData = {}
+	for (var key in data) {
+		if (data[key] === false || data[key] === 0 || !!data[key]) {
+			tempData[key] = data[key] instanceof Array ? data[key] : data[key]
+		}
+	}
+	return tempData
+}
+
+// 定义一个深拷贝函数  接收目标target参数
+export function deepClone(target) {
+	// 定义一个变量
+	let result
+	// 如果当前需要深拷贝的是一个对象的话
+	if (typeof target === 'object') {
+		// 如果是一个数组的话
+		if (Array.isArray(target)) {
+			result = [] // 将result赋值为一个数组,并且执行遍历
+			for (let i in target) {
+				// 递归克隆数组中的每一项
+				result.push(deepClone(target[i]))
+			}
+			// 判断如果当前的值是null的话;直接赋值为null
+		} else if (target === null) {
+			result = null
+			// 判断如果当前的值是一个RegExp对象的话,直接赋值
+		} else if (target.constructor === RegExp) {
+			result = target
+		} else {
+			// 否则是普通对象,直接for in循环,递归赋值对象的所有值
+			result = {}
+			for (let i in target) {
+				result[i] = deepClone(target[i])
+			}
+		}
+		// 如果不是对象的话,就是基本数据类型,那么直接赋值
+	} else {
+		result = target
+	}
+	// 返回最终结果
+	return result
+}
+
+export function formatDate(data, type) {
+	if (data) {
+		let result = data.slice(0, 10).split('-')
+		if (type) {
+			return result.join(type)
+		} else {
+			return result[0] + '年' + result[1] + '月' + result[2] + '日'
+		}
+
+	} else {
+		return ''
+	}
+}
+
+// 简单对象去null
+export const jsonFilterNull = data => {
+	let tempData = {}
+	for (var key in data) {
+		// if (data[key] === false || data[key] === 0 || !!data[key]) {
+		// 	tempData[key] = data[key] instanceof Array ? data[key] : data[key];
+		// }
+		if (data[key] == null) {
+			if (data[key] instanceof Array) {
+				tempData[key] = []
+			} else {
+				tempData[key] = ''
+			}
+		} else {
+			tempData[key] = data[key]
+		}
+	}
+	return tempData
+}
+
+// 计算生肖
+export const getShengXiao = birth => {
+	birth += ''
+	var len = birth.length
+	if (len < 4 && len != 2) {
+		return ''
+	}
+	if (len == 2) {
+		birth - 0 > 30 ? birth = '19' + birth : birth = '20' + birth
+	}
+	var year = (new Date(birth)).getFullYear()
+	var arr = ['猴', '鸡', '狗', '猪', '鼠', '牛', '虎', '兔', '龙', '蛇', '马', '羊']
+	return /^\d{4}$/.test(year) ? arr[year % 12] : ''
+}
+
+/***************************************************************************
+ * 计算年龄
+ * 
+ * 支持传递["yyyy-MM-dd"]等格式的字符串
+ * 
+ */
+
+// 序列化页面参数
+export const stringPageOptions = data => {
+	let result = '?'
+	if (data) {
+		for (let key in data) {
+			result += `&${key}=${data[key]}`
+		}
+		result = result.replace(/&/, '')
+		return result
+	} else {
+		return ''
+	}
+}
+
+
+// 手机号格式化
+export const string2fourPhone = (data, hideFlag) => {
+	let result = data
+	if (data) {
+		result = data.replace(/s/g, '') //去掉空格
+		if (hideFlag) {
+			result = data.replace(/^(.{3}).*(.{4})/, '$1****$2')
+			console.log(result) // 138****8888
+		} else {
+			result = data.replace(/^(.{3})(.*)(.{4})/, '$1 $2 $3')
+			console.log(result) // 138 8888 8888
+		}
+	}
+	return result || ''
+}
+
+
+// 时间格式化 今天 昨天 年月日
+export const getFormatData = dataStr => {
+	var time = new Date()
+	if (dataStr) {
+		if (dataStr.indexOf('T') != -1) {
+			dataStr = dataStr.replace('T', ' ')
+		}
+		if (dataStr.indexOf('-') != -1) {
+			dataStr = dataStr.replace(/\-/g, '/')
+		}
+		if (dataStr.indexOf('.') != -1) {
+			dataStr = dataStr.substring(0, dataStr.indexOf('.'))
+			console.log(dataStr)
+		}
+		time = new Date(dataStr)
+	} else {
+		return '无'
+	}
+	var nowTime = new Date()
+	var month = ((time.getMonth() + 1) + '').length < 2 ? '0' + (time.getMonth() + 1) : (time.getMonth() + 1)
+	var dates = (time.getDate() + '').length < 2 ? '0' + time.getDate() : time.getDate()
+	var minute = (time.getMinutes() + '').length < 2 ? '0' + time.getMinutes() : time.getMinutes()
+	var hours = (time.getHours() + '').length < 2 ? '0' + time.getHours() : time.getHours()
+	var minute = (time.getMinutes() + '').length < 2 ? '0' + time.getMinutes() : time.getMinutes()
+	var second = (time.getSeconds() + '').length < 2 ? '0' + time.getSeconds() : time.getSeconds()
+	var strTime = time.getFullYear() + '.' + month + '.' + dates + ' ' + hours + ':' + minute
+	if (time.setHours(0, 0, 0, 0) == nowTime.setHours(0, 0, 0, 0)) {
+		strTime = '今天 ' + hours + ':' + minute
+	} else if (time.setHours(0, 0, 0, 0) - nowTime.setHours(0, 0, 0, 0) == -86400000) {
+		strTime = '昨天 ' + hours + ':' + minute
+	} else if (time.setHours(0, 0, 0, 0) - nowTime.setHours(0, 0, 0, 0) == 86400000) {
+		strTime = '明天 ' + hours + ':' + minute
+	}
+
+	return strTime
+}
+
+// 格式化日期
+export const commonFormatDate = date => {
+	if (date && date != 'null') {
+		return moment(date).format('YYYY.MM.DD HH时')
+	} else {
+		return ''
+	}
+}
+
+// 格式化日期
+export const commonFormatDate2 = date => {
+	if (date && date != 'null') {
+		return moment(date).format('YYYY.MM.DD')
+	} else {
+		return ''
+	}
+}
+
+
+// 格式化日期
+export const commonFormatDate3 = date => {
+	if (date && date != 'null') {
+		return moment(date).format('YYYY.MM.DD HH:mm')
+	} else {
+		return ''
+	}
+}
+
+
+export const getWeekforStr = dateStr => {
+	var time = new Date()
+	if (dateStr) {
+		if (dateStr.indexOf('T') != -1) {
+			dateStr = dateStr.replace('T', ' ')
+		}
+		if (dateStr.indexOf('-') != -1) {
+			dateStr = dateStr.replace(/\-/g, '/')
+		}
+		if (dateStr.indexOf('.') != -1) {
+			dateStr = dateStr.substring(0, dateStr.indexOf('.'))
+			console.log(dateStr)
+		}
+		time = new Date(dateStr)
+	}
+	var str = ''
+	var week = time.getDay()
+	if (week == 0) {
+		str = '周日'
+	} else if (week == 1) {
+		str = '周一'
+	} else if (week == 2) {
+		str = '周二'
+	} else if (week == 3) {
+		str = '周三'
+	} else if (week == 4) {
+		str = '周四'
+	} else if (week == 5) {
+		str = '周五'
+	} else if (week == 6) {
+		str = '周六'
+	}
+	return str
+}
+
+// 获取显示地址
+export const getAddressDisplay = data => {
+	const { province = '', city = '', area = '', address = '' } = data
+	return province + city + area + address
+}
+
+// 获取图片baseUrl
+export const getImgBaseUrl = () => {
+	return 'http://wx.ruweitg.com/static/images/'
+}

+ 69 - 0
common/utils/util.js

@@ -0,0 +1,69 @@
+import $C from './config.js'
+const {
+	brandId,
+	branchId
+} = uni.getStorageSync('brandInfo')
+export default {
+	// 获取存储列表数据
+	getStorage(key) {
+		// let data = null;
+		// // #ifdef H5
+		// if($C.env === 'dev'){
+		//     data = window.sessionStorage.getItem(key)
+		// } else {
+		//     data = uni.getStorageSync(key)
+		// }
+		// // #endif
+		//       // #ifndef H5
+		// data = uni.getStorageSync(key)
+		//        // #endif
+		return uni.getStorageSync(key)
+	},
+	// 设置存储
+	setStorage(key, data) {
+		//       // #ifdef H5
+		//       if($C.env === 'dev'){
+		//           return window.sessionStorage.setItem(key,data)
+		//       } else {
+		//           return uni.setStorageSync(key,data)
+		//       }
+		//       // #endif
+		// // #ifndef H5
+		return uni.setStorageSync(key, data)
+		//		// #endif
+	},
+	// 删除存储
+	removeStorage(key) {
+		//       // #ifdef H5
+		//       if($C.env === 'dev'){
+		//           return window.sessionStorage.removeItem(key);
+		//       } else {
+		//           return uni.removeStorageSync(key)
+		//       }
+		//       // #endif
+		// // #ifndef H5
+		return uni.removeStorageSync(key)
+		//		// #endif
+	},
+	setUserInfo(userInfoData) {
+		// console.log(userInfoData);
+		var userInfoStr = uni.setStorageSync("userInfo", JSON.stringify(userInfoData))
+		console.log(userInfoStr);
+	},
+	getUserInfo() {
+		var userInfoData = uni.getStorageSync(`userInfo_${brandId}`);
+		return userInfoData;
+	},
+	getConfigName(data, key, value, nameKey) {
+		if (Array.isArray(data)) {
+			let result = data.find(item => item[key] == value)
+			return result && result[nameKey] || ''
+		}
+	},
+	getDataName(key) {
+		console.log(9000, key, `${key}_${brandId}_${branchId}`)
+		return `${key}_${brandId}_${branchId}`
+	}
+
+
+}

+ 156 - 0
components/AddressItem.vue

@@ -0,0 +1,156 @@
+<template>
+	<view class="address-item" @click="toSaveAddress">
+		<view class="address-item-top display-flex-center">
+			<!-- <image :src="`${$getImgBaseUrl()}icon-address.png`" mode="aspectFill"
+				style="width: 64rpx;height: 64rpx;flex-shrink: 0;margin-right: 24rpx;"></image> -->
+			<view class="top-info">
+				<view class="title color-23 display-flex-center">
+					<u-icon name="account-fill" color="#CACACA" size="15"></u-icon>
+					<text class="fs15 fw600 ml5">{{itemData.name}}</text>
+				</view>
+				<view class="display-flex-center color-23 mt10 mb10">
+					<u-icon name="phone-fill" color="#CACACA" size="15"></u-icon>
+					<text class="ml5">{{itemData.phone}}</text>
+				</view>
+				<view class="fs12 color-5f display-flex">
+					<u-icon name="map-fill" color="#CACACA" size="15"></u-icon>
+					<text class="ml5">{{addressDisplay}}</text>
+				</view>
+			</view>
+		</view>
+		<view class="address-item-bottom display-flex-between">
+			<u-switch @click.stop="" @change="statusChange" :loading="loading" :activeValue="1" :inactiveValue="0"
+				v-model="itemData.type" size="20" active-color="#F39800" inactive-color="#DCDCDC"></u-switch>
+			<view class="operate-item display-flex-center">
+				<view @click.stop="toEdit">
+					<u1-icon name="edit-pen"></u1-icon>
+					<text>编辑</text>
+				</view>
+				<view class="color-del ml28" @click.stop="deleteItem">
+					<u1-icon name="trash" color="#FF4E4A"></u1-icon>
+					<text>删除</text>
+				</view>
+			</view>
+		</view>
+		<!-- 删除确认 -->
+		<u-modal :show="show" showCancelButton @cancel="show= false" @close="show=false" @confirm="confirm"
+			:asyncClose="true" title="删除" content='确认删除吗'></u-modal>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "AddressItem",
+		props: {
+			itemData: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			isBack: {
+				type: Boolean,
+				default: false
+			},
+		},
+		data() {
+			return {
+				loading: false,
+				show: false,
+			};
+		},
+		watch: {
+			'itemData.type'(nv, ov) {
+				console.log(8999, nv, ov)
+				
+			}
+		},
+		computed: {
+			addressDisplay() {
+				const {
+					province,
+					city,
+					area,
+					address
+				} = this.itemData
+				return province + city + area + address || ''
+			}
+		},
+		methods: {
+			statusChange(data) {
+				console.log(8999, data)
+				this.loading = true
+				const {
+					code
+				} = this.itemData
+				this.$api.updateAddress(this.itemData).then(res => {
+					this.loading = false
+					this.$emit('refresh')
+					// if (res.code != 1) {
+					// 	this.itemData.type = nv || 0
+					// }
+				}).catch(() => {
+					// this.loading = false
+					// this.itemData.type = nv || 0
+				})
+			},
+			toSaveAddress() {
+				console.log(1222, this.isBack)
+				if (!this.isBack) {
+					// this.toEdit()
+					return
+				}
+				uni.setStorageSync('selectAddress', JSON.stringify(this.itemData))
+				uni.navigateBack()
+			},
+			toEdit() {
+				uni.navigateTo({
+					url: '/subPages/addAddress/addAddress?code=' + this.itemData.code
+				})
+			},
+			deleteItem() {
+				this.show = true
+			},
+			confirm() {
+				uni.showLoading();
+				this.$api.deleteAddress({
+					code: this.itemData.code
+				}).then(res => {
+					uni.hideLoading()
+					this.show = false
+					if (res.code === 1) {
+						uni.showToast({
+							title: '删除成功'
+						})
+						this.$emit('refresh')
+					} else {
+						uni.showToast({
+							title: '删除失败'
+						})
+					}
+				}).catch(() => {
+					uni.hideLoading()
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.address-item {
+		background: #FFFFFF;
+		border-radius: 15rpx 15rpx 15rpx 15rpx;
+		padding: 15rpx 0 24rpx;
+		margin-bottom: 20rpx;
+
+		&-top {
+			padding: 0 24rpx 24rpx;
+			border-bottom: 2rpx solid #F4F4F4;
+			margin-bottom: 24rpx;
+		}
+
+		&-bottom {
+			padding: 0 34rpx;
+		}
+	}
+</style>

+ 77 - 0
components/AfterReson.vue

@@ -0,0 +1,77 @@
+<template>
+	<u-popup :show="value" :round="10" mode="bottom" @close="close">
+		<view class="pop-content">
+			<view class="text-center ">
+				<text class="color-3 fw700 fs18">请选择原因</text>
+				<view class="float-right" @click="close">
+					<u-icon name="close" color="#8E8E8E" size="30"></u-icon>
+				</view>
+			</view>
+			<view class="fs12 color-9 mb30 mt5">
+				订单一旦取消,无法恢复,金额/积分将原路返还
+			</view>
+			<view class="list-box">
+				<u-radio-group iconPlacement="right" activeColor="#F39800" v-model="checkedReason" placement="column">
+					<u-radio :customStyle="{marginBottom: '20px'}" v-for="(item, index) in reasonList" :key="index"
+						:label="item" :name="item">
+					</u-radio>
+				</u-radio-group>
+			</view>
+			<view class="common-btn" @click="submit">提交</view>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+	export default {
+		name: "AfterReson",
+		props: {
+			value: {
+				type: Boolean,
+				default: true
+			},
+			dictId: {
+				type: [String, Number],
+				default: 15
+			}
+		},
+		data() {
+			return {
+				show: false,
+				checkedReason: '',
+				reasonList: [],
+			};
+		},
+		watch: {
+			value(nv) {
+				if (nv) {
+					this.getReasonList()
+				}
+				// this.show = this.showFlag
+			}
+		},
+		// mounted() {
+		// 	this.getReasonList()
+		// },
+		methods: {
+			close() {
+				this.$emit('input', false)
+			},
+			submit() {
+				this.$emit('input', false)
+				this.$emit('confirm', this.checkedReason)
+			},
+			getReasonList() {
+				this.$api.getConfigData({ dict_id: this.dictId }).then(res => {
+					this.reasonList = res.data
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.pop-content {
+		padding: 36rpx;
+	}
+</style>

+ 172 - 0
components/CommercePart.vue

@@ -0,0 +1,172 @@
+<template>
+	<view class="commerce-part">
+		<view class="main-content">
+			<view v-if="false" class="not-login-box">
+				<u-empty text="暂无搜索内容哦~"> </u-empty>
+			</view>
+			<view v-else class="activity-box">
+				<view class="activity-list" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
+					<image style="width: 100%; height: 344rpx; border-radius: 20rpx 20rpx 0 0" :src="item.cover"
+						mode="aspectFill">
+					</image>
+					<view class="list-content text-overflow2">
+						<view class="text-overflow-single mb10">{{item.goods_name}}</view>
+						<view class="display-flex-between">
+							<text class="fs13 fw600 color-red">¥{{item.price_selling}}</text>
+							<text class="text-through fs12 color-ca">¥{{item.price_market}}</text>
+						</view>
+					</view>
+				</view>
+				<view style="width: 100%">
+					<!-- <u-loadmore :status="status" @loadmore="loadmoreClick" :load-text="loadText" /> -->
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "CommercePart",
+		props: {
+			type: {
+				type: String,
+				default: "common",
+			},
+			data: {
+				type: Array,
+				default: () => {
+					return [];
+				},
+			},
+		},
+		data() {
+			return {
+				imageUrl: this.$C.imageUrl,
+				cateList: [],
+				cateCurrent: "",
+				sortCurrent: "",
+			};
+		},
+		watch: {
+			type: {
+				handler() {
+					if (this.type == "list") {
+						this.getCateList();
+					}
+				},
+				immediate: true,
+			},
+		},
+		mounted() {
+			if (this.$refs.cateItem) {
+				this.$refs.cateItem.top = "50px";
+				this.$refs.sortItem.top = "50px";
+			}
+		},
+		methods: {
+			cateChange(item, key) {
+				this[key] = item.id;
+				this.$refs.cateItem.show = false;
+				this.$refs.cateItem.setContentAnimate(0);
+				this.$refs.sortItem.show = false;
+				this.$refs.sortItem.setContentAnimate(0);
+				this.$emit("filterChange", {
+					cateids: this.cateCurrent,
+					sort: this.sortCurrent,
+				});
+			},
+			getCateList() {
+				uni.showLoading({
+					title: "加载中",
+				});
+				this.$api
+					.getGoodsCate()
+					.then((res) => {
+						uni.hideLoading();
+						if (res.code == 1) {
+							this.cateList = res.data;
+						}
+					})
+					.catch(() => {
+						uni.hideLoading();
+					});
+			},
+			toDetail(item) {
+				uni.navigateTo({
+					url: `../../subPages/goodsDetail/goodsDetail?code=${item.code}&type=${this.type}`
+				});
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.title-box {
+		padding: 30rpx 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.tabs-box {
+		height: 90rpx;
+		background-color: #fff;
+		margin-bottom: 20rpx;
+
+		::v-deep {
+			.u-dropdown__menu__item {
+				justify-content: flex-start;
+			}
+		}
+	}
+
+	.sort-content {
+		.sort-list {
+			height: 82rpx;
+			align-items: center;
+			padding: 0 20rpx;
+			border-top: 1rpx solid #e6e6e6;
+			font-size: 28rpx;
+			color: #595959;
+
+			&-active {
+				color: #7856ff;
+				font-weight: bold;
+			}
+		}
+	}
+
+	.main-content {
+		// height: calc(100vh - 420rpx);
+		// overflow-y: auto;
+		// padding: 0 20rpx;
+
+		.activity-box {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.activity-list {
+				width: calc(50% - 11rpx);
+				background-color: #fff;
+				border-radius: 20rpx;
+				margin-bottom: 22rpx;
+				padding-bottom: 30rpx;
+				font-size: 24rpx;
+
+				.list-title {
+					font-size: 30rpx;
+					padding: 0 16rpx 8rpx;
+				}
+
+				.list-content {
+					color: #2c2c2c;
+					padding: 10rpx 16rpx 0;
+					// display: flex;
+
+				}
+			}
+		}
+	}
+</style>

+ 174 - 0
components/CommercePartMs.vue

@@ -0,0 +1,174 @@
+<template>
+	<view class="commerce-part">
+		<view class="main-content">
+			<view v-if="false" class="not-login-box">
+				<u-empty text="暂无搜索内容哦~"> </u-empty>
+			</view>
+			<view v-else class="activity-box">
+				<view class="activity-list" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
+					<image style="width: 100%; height: 344rpx; border-radius: 20rpx 20rpx 0 0" :src="item.goods.cover"
+						mode="aspectFill">
+					</image>
+					<view class="list-content text-overflow2">
+						<view class="text-overflow-single mb10">{{item.goods_name}}</view>
+						<view class="display-flex-between">
+							<text class="fs13 fw600 color-red">¥{{ item.price_seckill }}</text>
+						</view>
+					</view>
+				</view>
+				<view style="width: 100%">
+					<!-- <u-loadmore :status="status" @loadmore="loadmoreClick" :load-text="loadText" /> -->
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "CommercePart",
+		props: {
+			type: {
+				type: String,
+				default: "common",
+			},
+			data: {
+				type: Array,
+				default: () => {
+					return [];
+				},
+			},
+		},
+		data() {
+			return {
+				imageUrl: this.$C.imageUrl,
+				cateList: [],
+				cateCurrent: "",
+				sortCurrent: "",
+			};
+		},
+		watch: {
+			type: {
+				handler() {
+					if (this.type == "list") {
+						this.getCateList();
+					}
+				},
+				immediate: true,
+			},
+		},
+		mounted() {
+			if (this.$refs.cateItem) {
+				this.$refs.cateItem.top = "50px";
+				this.$refs.sortItem.top = "50px";
+			}
+		},
+		methods: {
+			cateChange(item, key) {
+				this[key] = item.id;
+				this.$refs.cateItem.show = false;
+				this.$refs.cateItem.setContentAnimate(0);
+				this.$refs.sortItem.show = false;
+				this.$refs.sortItem.setContentAnimate(0);
+				this.$emit("filterChange", {
+					cateids: this.cateCurrent,
+					sort: this.sortCurrent,
+				});
+			},
+			getCateList() {
+				uni.showLoading({
+					title: "加载中",
+				});
+				this.$api
+					.getGoodsCate()
+					.then((res) => {
+						uni.hideLoading();
+						if (res.code == 1) {
+							this.cateList = res.data;
+						}
+					})
+					.catch(() => {
+						uni.hideLoading();
+					});
+			},
+			toDetail(item) {
+				uni.navigateTo({
+					url: `/subPages/goodsDetail/goodsDetail?code=${item.id}&type=msGoods`,
+				});
+				// uni.navigateTo({
+				// 	url: `../../subPages/goodsDetail/goodsDetail?code=${item.code}&type=${this.type}`
+				// });
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.title-box {
+		padding: 30rpx 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.tabs-box {
+		height: 90rpx;
+		background-color: #fff;
+		margin-bottom: 20rpx;
+
+		::v-deep {
+			.u-dropdown__menu__item {
+				justify-content: flex-start;
+			}
+		}
+	}
+
+	.sort-content {
+		.sort-list {
+			height: 82rpx;
+			align-items: center;
+			padding: 0 20rpx;
+			border-top: 1rpx solid #e6e6e6;
+			font-size: 28rpx;
+			color: #595959;
+
+			&-active {
+				color: #7856ff;
+				font-weight: bold;
+			}
+		}
+	}
+
+	.main-content {
+		// height: calc(100vh - 420rpx);
+		// overflow-y: auto;
+		// padding: 0 20rpx;
+
+		.activity-box {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.activity-list {
+				width: calc(50% - 11rpx);
+				background-color: #fff;
+				border-radius: 20rpx;
+				margin-bottom: 22rpx;
+				padding-bottom: 30rpx;
+				font-size: 24rpx;
+
+				.list-title {
+					font-size: 30rpx;
+					padding: 0 16rpx 8rpx;
+				}
+
+				.list-content {
+					color: #2c2c2c;
+					padding: 10rpx 16rpx 0;
+					// display: flex;
+
+				}
+			}
+		}
+	}
+</style>

+ 189 - 0
components/CommercePartRow.vue

@@ -0,0 +1,189 @@
+<template>
+	<view class="commerce-part">
+		<view class="main-content">
+			<view v-if="false" class="not-login-box">
+				<u-empty text="暂无搜索内容哦~"> </u-empty>
+			</view>
+			<view v-else class="activity-box">
+				<view class="activity-list" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
+					<image style="width: 100%; height: 344rpx; border-radius: 20rpx 20rpx 0 0" :src="item.pics"
+						mode="aspectFill">
+					</image>
+					<view class="list-content text-overflow2">
+						<view class="mb10 display-flex-between">
+							<view class="text-overflow-single good-name">{{item.goods_name}}</view>
+							<view class="btn-yellow">购物满{{item.limit_money}}元可享</view>
+						</view>
+						<view class="display-flex-between">
+							<view>
+								<text class="fs13 fw600 color-red mr20">¥{{item.price_selling}}</text>
+								<text class="text-through fs12 color-ca">¥{{item.price_market}}</text>
+							</view>
+							<text class="color-d9">{{item.stock_sales}}件售出</text>
+						</view>
+					</view>
+				</view>
+				<view style="width: 100%">
+					<!-- <u-loadmore :status="status" @loadmore="loadmoreClick" :load-text="loadText" /> -->
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "CommercePart",
+		props: {
+			type: {
+				type: String,
+				default: "home",
+			},
+			data: {
+				type: Array,
+				default: () => {
+					return [];
+				},
+			},
+		},
+		data() {
+			return {
+				imageUrl: this.$C.imageUrl,
+				cateList: [],
+				cateCurrent: "",
+				sortCurrent: "",
+			};
+		},
+		watch: {
+			type: {
+				handler() {
+					if (this.type == "list") {
+						this.getCateList();
+					}
+				},
+				immediate: true,
+			},
+		},
+		mounted() {
+			if (this.$refs.cateItem) {
+				this.$refs.cateItem.top = "50px";
+				this.$refs.sortItem.top = "50px";
+			}
+		},
+		methods: {
+			cateChange(item, key) {
+				this[key] = item.id;
+				this.$refs.cateItem.show = false;
+				this.$refs.cateItem.setContentAnimate(0);
+				this.$refs.sortItem.show = false;
+				this.$refs.sortItem.setContentAnimate(0);
+				this.$emit("filterChange", {
+					cateids: this.cateCurrent,
+					sort: this.sortCurrent,
+				});
+			},
+			getCateList() {
+				uni.showLoading({
+					title: "加载中",
+				});
+				this.$api
+					.getGoodsCate()
+					.then((res) => {
+						uni.hideLoading();
+						if (res.code == 1) {
+							this.cateList = res.data;
+						}
+					})
+					.catch(() => {
+						uni.hideLoading();
+					});
+			},
+			toDetail(item) {
+				uni.navigateTo({
+					url: `../../subPages/goodsDetail/goodsDetail?code=${item.code}&type=gift`
+				});
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.title-box {
+		padding: 30rpx 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.tabs-box {
+		height: 90rpx;
+		background-color: #fff;
+		margin-bottom: 20rpx;
+
+		::v-deep {
+			.u-dropdown__menu__item {
+				justify-content: flex-start;
+			}
+		}
+	}
+
+	.sort-content {
+		.sort-list {
+			height: 82rpx;
+			align-items: center;
+			padding: 0 20rpx;
+			border-top: 1rpx solid #e6e6e6;
+			font-size: 28rpx;
+			color: #595959;
+
+			&-active {
+				color: #7856ff;
+				font-weight: bold;
+			}
+		}
+	}
+
+	.main-content {
+		// height: calc(100vh - 420rpx);
+		// overflow-y: auto;
+		// padding: 0 20rpx;
+
+		.activity-box {
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.activity-list {
+				width: 100%;
+				background-color: #fff;
+				border-radius: 20rpx;
+				margin-bottom: 22rpx;
+				padding-bottom: 30rpx;
+				font-size: 24rpx;
+
+				.list-title {
+					font-size: 30rpx;
+					padding: 0 16rpx 8rpx;
+				}
+
+				.list-content {
+					color: #2c2c2c;
+					padding: 10rpx 16rpx 0;
+
+					// display: flex;
+					.btn-yellow {
+						flex-shrink: 0;
+						border-radius: 8rpx;
+						height: 64rpx;
+						line-height: 64rpx;
+						padding: 0 24rpx;
+						background-color: rgba(#F39800, 0.65);
+						color: #fff;
+						font-size: 26rpx;
+						margin-left: 80rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 20 - 0
components/ConfrimPop.vue

@@ -0,0 +1,20 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"ConfrimPop",
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 83 - 0
components/Empty/index.vue

@@ -0,0 +1,83 @@
+<template>
+	<view class="empty-box">
+		<!-- <u--image :src="emptyImg" :width="imgSize" :height="imgSize"></u--image> -->
+		<view>暂无数据</view>
+		<text class="empty-txt" :style="getTitleStyle">{{emptytxt}}</text>
+		<text class="empty-desc" :style="getTitleStyle">换个关键词试试~</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		// 缺省页
+		name: "empty",
+		props: {
+			emptyImg: {
+				type: String,
+				// default: `${this.$getImgBaseUrl()}ic_empty.png`,
+			},
+			emptytxt: {
+				type: String,
+				default: "没有找到内容",
+			},
+			imgSize: {
+				type: String,
+				default: "213rpx",
+			},
+			fontSize: {
+				type: String,
+				default: "28rpx",
+			},
+		},
+		computed: {
+			getTitleStyle() {
+				return "font-size:" + this.fontSize + ";"
+			},
+		},
+		data() {
+			return {
+
+			};
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.empty-box {
+		width: 100%;
+		height: 70vh;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.empty-txt {
+		font-family: 'PingFang SC';
+		font-style: normal;
+		font-weight: 400;
+		display: flex;
+		align-items: center;
+		text-align: center;
+		letter-spacing: 0.02em;
+		margin: 16rpx 0 0 0;
+		/* 输入框默认文字 */
+
+		color: #000000;
+
+	}
+
+	.empty-desc {
+		font-family: 'PingFang SC';
+		font-style: normal;
+		font-weight: 400;
+		display: flex;
+		align-items: center;
+		text-align: center;
+		letter-spacing: 0.02em;
+		/* 输入框默认文字 */
+
+		color: #BBBFC4;
+
+	}
+</style>

+ 265 - 0
components/LoginPop.vue

@@ -0,0 +1,265 @@
+<template>
+	<u-popup :show="value" @close="close" round="18rpx">
+		<form @submit="saveUserData">
+			<view class="m-content-view">
+				<text class="top-view"> {{shopName}} </text>
+				<text class="tips">请您授权头像昵称信息,您授权的信息将受到严格保护,请放心使用。</text>
+				<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"
+					style="border: 0">
+					<u--image v-if="avatarUrl !== defaultAvatarUrl" width="149rpx" height="149rpx" radius="100%"
+						shape="circle" :src="avatarUrl" :fade="true" duration="450" mode="heightFix"></u--image>
+					<view class="v1" v-else>
+						<u--image width="80rpx" height="80rpx" radius="100%" shape="circle" :src="avatarUrl"
+							:fade="true" duration="450" mode="heightFix"></u--image>
+						<text v-if="avatarUrl === defaultAvatarUrl">获取头像</text>
+					</view>
+				</button>
+				<input name="nickname" v-model="userName" type="nickname" class="m-input" placeholder="请输入昵称" />
+				<button class="red-btn" form-type="submit">确认授权</button>
+			</view>
+		</form>
+	</u-popup>
+</template>
+
+<script>
+	import {
+		uploadBase64File,
+		getNewRemindCnt,
+		addAddress,
+	} from "@/common/api/common.js";
+	import {
+		updateUserInfo,
+		getUserInfo,
+		userBindNickname
+	} from "@/common/api/user.js";
+	const defaultAvatarUrl =
+		"https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0";
+	export default {
+		name: "LoginPop",
+		props: {
+			value: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				shopName: "六感熟眠商城",
+				userName: "",
+				userInfo: undefined,
+				defaultAvatarUrl,
+				avatarUrl: defaultAvatarUrl,
+			};
+		},
+		mounted() {
+			const configs = uni.getStorageSync("configs");
+			if (configs) {
+				this.shopName = configs.shop_name
+			}
+		},
+		methods: {
+			close() {
+				this.$emit('input', false)
+			},
+			onChooseAvatar(e) {
+				const {
+					avatarUrl
+				} = e.detail;
+				console.log("成功授权", avatarUrl);
+				this.avatarUrl = avatarUrl;
+			},
+			saveUserData(e) {
+				console.log(e.detail.value.nickname);
+				if (
+					this.avatarUrl === this.defaultAvatarUrl ||
+					!e.detail.value.nickname
+				) {
+					uni.showToast({
+						icon: "none",
+						title: "请先授权完善信息",
+					});
+					return;
+				}
+				this.userName = e.detail.value.nickname;
+				this.close()
+				this.getImageInfo();
+			},
+			getImageInfo() {
+				// 获取当前图片信息
+				uni.getImageInfo({
+					src: this.avatarUrl,
+					success: (image) => {
+						// 做png/jpeg的类型判断————对不同类型的图像添加不同的转换头信息
+						if (image.type == "png" || image.type == "jpeg") {
+							// 对符合类型的图片转换为base64类型
+							uni.getFileSystemManager().readFile({
+								// 【重点来啦】人家自提供的转码API
+								filePath: image.path, // 所需转码图像路径
+								encoding: "base64", // 转码类型
+								success: (res) => {
+									// 生成base64
+									let imageBase64 =
+										"data:image/" + image.type + ";base64," + res.data;
+									console.log("转base64后:", imageBase64);
+									this.uploadBase64File(imageBase64);
+								},
+							});
+						} else {
+							// 友好一点,不是以上类型做出提醒
+							uni.showToast({
+								title: "当前只支持png/jpeg格式",
+								duration: 2500,
+								icon: "none",
+							});
+						}
+					},
+				});
+			},
+			uploadBase64File(imageBase64) {
+				uploadBase64File({
+						base64: imageBase64,
+					}, {
+						"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+					})
+					.then((res) => {
+						console.log("uploadFile==>", res.data.url);
+						this.avatarUrl = res.data.url;
+						this.bindNickname(res.data.url);
+					})
+					.catch(() => {
+						uni.hideLoading();
+					});
+			},
+			bindNickname(url) {
+				// this.isUserRegister = true;
+				// this.showUserRegister = false;
+				const data = {
+					nickname: this.userName,
+					username: this.userName,
+					headimg: url,
+				};
+				userBindNickname(data).then((res) => {
+					console.log("绑定昵称等==>", res.data);
+					if (res.data) {
+						// uni.setStorageSync("token", res.data.token.token);
+						if (!res.data.headimg) {
+							res.data.headimg = url;
+						}
+						uni.setStorageSync("userInfo", JSON.stringify(res.data));
+						this.getUserInfo()
+					}
+				});
+			},
+			async getUserInfo() {
+				const data = {};
+				await getUserInfo(data)
+					.then((res) => {
+						this.close()
+						if (res.data) {
+							this.$emit('updateUserInfo')
+							// uni.clearStorageSync()
+							uni.setStorageSync("token", res.data.token.token);
+							uni.setStorageSync("userInfo", JSON.stringify(res.data));
+							this.userInfo = res.data;
+							console.log("getUserInfo==>", this.userInfo);
+						}
+					})
+					.catch(() => {
+						uni.hideLoading();
+					});
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.m-content-view {
+		width: 100%;
+		display: flex;
+		align-items: center;
+		flex-direction: column;
+		background-color: #f7f7f7;
+		border-radius: 24rpx 24rpx 0 0;
+	}
+
+	.top-view {
+		font-size: 32rpx;
+		font-family: PingFangSC-Medium, PingFang SC;
+		font-weight: 500;
+		color: #1d161f;
+		line-height: 34rpx;
+		text-align: left;
+		margin: 55rpx 49rpx 0;
+		width: calc(100% - 98rpx);
+	}
+
+	.tips {
+		font-size: 26rpx;
+		font-weight: 400;
+		color: #858585;
+		line-height: 34rpx;
+		margin: 21rpx 49rpx 0;
+	}
+
+	.red-btn {
+		color: white;
+		background: #f39800;
+		width: calc(100% - 98rpx);
+		margin-top: 52rpx;
+		margin-bottom: 52rpx;
+		font-size: 32rpx;
+		line-height: 84rpx;
+		border-radius: 40rpx;
+		text-align: center;
+	}
+
+	.red-btn:active {
+		opacity: 0.7;
+	}
+
+	.v1 {
+		height: 149rpx;
+		width: 149rpx;
+		display: flex;
+		flex-direction: column;
+		background: rgba(244, 244, 246, 1);
+		border-radius: 100%;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.avatar-wrapper {
+		margin-top: 26rpx;
+	}
+
+	.avatar-wrapper button::before {
+		padding: 0;
+		border-radius: 20rpx;
+		border: 0;
+	}
+
+	.avatar {
+		height: 100rpx;
+		width: 100rpx;
+	}
+
+	.v1 text {
+		font-size: 22rpx;
+		margin-top: -16rpx;
+	}
+
+	// 去掉烦人的边框
+	button::after {
+		border: 0; // 或者 border: none;
+	}
+
+	.m-input {
+		width: calc(100% - 138rpx);
+		line-height: 117rpx;
+		padding: 0 20rpx;
+		margin-top: 44rpx;
+		background: #ffffff;
+		border-radius: 15rpx;
+		height: 117rpx;
+	}
+</style>

+ 0 - 0
components/ProvinceCity/config.js


+ 149 - 0
components/ProvinceCity/index.vue

@@ -0,0 +1,149 @@
+<template>
+  <u-picker
+    :show="value"
+    ref="uPicker"
+    class="common-pop"
+    :columns="columnsData"
+    keyName="name"
+    :title="title"
+    :defaultIndex="defaultIndex"
+    :closeOnClickOverlay="true"
+    @close="cancel"
+    @confirm="confirm"
+    @change="changeHandler"
+    @cancel="cancel"
+  ></u-picker>
+</template>
+
+<script>
+import { getProvinceCity } from "@/common/api/common";
+export default {
+  props: {
+    value: {
+      type: Boolean,
+      default: false,
+    },
+    defaultData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    level: {
+      type: [String, Number],
+      default: 2,
+    },
+    allFlag: {
+      type: Boolean,
+      default: false,
+    },
+		title: String,
+		default: '选择城市'
+		
+  },
+  data() {
+    return {
+      show: true,
+      columnsData: [[],[],[]],
+      defaultIndex: [0, 0, 0],
+    };
+  },
+  created() {
+    this.getProvinceCity().then((data) => {
+      // this.columnsData.push(data);
+			this.columnsData.splice(0, 1, data)
+      let { province = data[0].code } = this.defaultData || {};
+      this.getProvinceCity(province).then((cityData) => {
+        if (this.allFlag) {
+          // 添加全部选项
+          cityData = [{ parentCode: "", code: "all", name: "全部" }].concat(
+            cityData
+          );
+        }
+        // this.columnsData.push(cityData);
+				// this.columnsData[1] = cityData
+				this.columnsData.splice(1, 1, cityData)
+        let currentP = data.findIndex((item) => item.code == province);
+        let { city = cityData[0].code } = this.defaultData || {};
+        let currentCity = cityData.findIndex((item) => item.code == city);
+        if (this.level == 3) {
+          this.getProvinceCity(city).then((regionData) => {
+            // this.columnsData.push(regionData);
+						// this.columnsData[2] = regionData2
+						this.columnsData.splice(2, 1, regionData)
+            let { region = regionData[0].code } = this.defaultData || {};
+            let currentRegion = regionData.findIndex(
+              (item) => item.code == region
+            );
+            this.defaultIndex = [
+              currentP !== -1 ? currentP : 0,
+              currentCity !== -1 ? currentCity : 0,
+              currentRegion !== -1 ? currentRegion : 0,
+            ];
+          });
+        } else {
+          this.defaultIndex = [
+            currentP !== -1 ? currentP : 0,
+            currentCity !== -1 ? currentCity : 0,
+          ];
+        }
+      });
+    });
+  },
+  methods: {
+    async getProvinceCity(code) {
+      let result = await getProvinceCity(code);
+      return new Promise((res, rej) => {
+        res(result.data);
+      });
+    },
+    async changeHandler(e) {
+      const {
+        columnIndex,
+        value,
+        values, // values为当前变化列的数组内容
+        index,
+				indexs,
+        // 微信小程序无法将picker实例传出来,只能通过ref操作
+        picker = this.$refs.uPicker,
+      } = e;
+      // 当第一列值发生变化时,变化第二列(后一列)对应的选项
+      let code = value[0].code;
+      let cityResult = await this.getProvinceCity(code);
+      if (this.allFlag) {
+        // 添加全部选项
+        cityResult = [{ parentCode: "", code: "all", name: "全部" }].concat(
+          cityResult
+        );
+      }
+      picker.setColumnValues(1, cityResult);
+      if (this.level == 3) {
+        let cityCode = columnIndex === 0 ? cityResult[0].code : value[1].code;
+        this.getProvinceCity(cityCode).then((city) => {
+          picker.setColumnValues(2, city);
+        });
+      }
+    },
+    // 回调参数为包含columnIndex、value、values
+    confirm(e) {
+      let { value } = e;
+      let result = {
+        province: value[0].code,
+        city: value[1].code,
+        region: value[2] ? value[2].code : "",
+      };
+      this.$emit("confirm", {
+        value: result,
+        name:
+          value[0].name + value[1].name + `${value[2] ? value[2].name : ""}`,
+      });
+      this.$emit("input", false);
+    },
+    cancel() {
+      this.$emit("cancel");
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 55 - 0
components/base-title/index.vue

@@ -0,0 +1,55 @@
+<template>
+	<view class="base-title-box">
+		<view class="base-title-line" />
+		<u--text :lines="1" align='left' :size='fontSize' :text="txt" :color="color"></u--text>
+	</view>
+</template>
+
+<script>
+	export default {
+		// BaseTitle
+		name: "base-title",
+		props: {
+			txt: {
+				type: String,
+				default: "",
+			},
+			fontSize: {
+				type: String,
+				default: "28rpx",
+			},
+			color: {
+				type: String,
+				default: "#232323",
+			},
+		},
+		computed: {
+			getTitleStyle() {
+				return "font-size:" + this.fontSize + ";"
+			},
+		},
+		data() {
+			return {
+
+			};
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.base-title-box {
+		width: 100%;
+		height: 80rpx;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+	}
+
+	.base-title-line {
+		margin-left: 20rpx;
+		margin-right: 8rpx;
+		width: 4rpx;
+		height: 24rpx;
+		background: linear-gradient(180deg, #9276FE 0%, rgba(225, 217, 255, 0.85) 93%, rgba(231, 224, 255, 0) 100%);
+	}
+</style>

+ 18 - 0
components/common/global.js

@@ -0,0 +1,18 @@
+import Vue from 'vue'
+
+const requireCom = require.context('.', false, /\.vue$/)
+
+requireCom.keys().forEach(key => {
+  // 字符串首字母大写处理
+  function strUp(str) {
+    return str.charAt(0).toUpperCase() + str.slice(1)
+  }
+  // 获取单个组件内容
+  const _component = requireCom(key)
+  // 获取组件名称
+  const _componentName = strUp(
+    key.replace(/^\.\//, '').replace(/\.\w+$/, ''))
+  // 注册在vue上
+  Vue.component(_componentName, _component.default || _component)
+  
+})

+ 2 - 0
components/leo-area-select_1.0.0/changelog.md

@@ -0,0 +1,2 @@
+## 1.0.0(2021-08-26)
+省市区多级联动,自定义层级。如需支持或有改进意见请联系:563803119@qq.com

+ 13170 - 0
components/leo-area-select_1.0.0/citys.json

@@ -0,0 +1,13170 @@
+[{
+		"code": "110000",
+		"name": "北京市",
+		"children": [{
+			"code": "110000",
+			"name": "北京市",
+			"children": [{
+					"code": "110101",
+					"name": "东城区"
+				},
+				{
+					"code": "110102",
+					"name": "西城区"
+				},
+				{
+					"code": "110105",
+					"name": "朝阳区"
+				},
+				{
+					"code": "110106",
+					"name": "丰台区"
+				},
+				{
+					"code": "110107",
+					"name": "石景山区"
+				},
+				{
+					"code": "110108",
+					"name": "海淀区"
+				},
+				{
+					"code": "110109",
+					"name": "门头沟区"
+				},
+				{
+					"code": "110111",
+					"name": "房山区"
+				},
+				{
+					"code": "110112",
+					"name": "通州区"
+				},
+				{
+					"code": "110113",
+					"name": "顺义区"
+				},
+				{
+					"code": "110114",
+					"name": "昌平区"
+				},
+				{
+					"code": "110115",
+					"name": "大兴区"
+				},
+				{
+					"code": "110116",
+					"name": "怀柔区"
+				},
+				{
+					"code": "110117",
+					"name": "平谷区"
+				},
+				{
+					"code": "110118",
+					"name": "密云区"
+				},
+				{
+					"code": "110119",
+					"name": "延庆区"
+				}
+			]
+		}]
+	},
+	{
+		"code": "120000",
+		"name": "天津市",
+		"children": [{
+			"code": "120000",
+			"name": "天津市",
+			"children": [{
+					"code": "120101",
+					"name": "和平区"
+				},
+				{
+					"code": "120102",
+					"name": "河东区"
+				},
+				{
+					"code": "120103",
+					"name": "河西区"
+				},
+				{
+					"code": "120104",
+					"name": "南开区"
+				},
+				{
+					"code": "120105",
+					"name": "河北区"
+				},
+				{
+					"code": "120106",
+					"name": "红桥区"
+				},
+				{
+					"code": "120110",
+					"name": "东丽区"
+				},
+				{
+					"code": "120111",
+					"name": "西青区"
+				},
+				{
+					"code": "120112",
+					"name": "津南区"
+				},
+				{
+					"code": "120113",
+					"name": "北辰区"
+				},
+				{
+					"code": "120114",
+					"name": "武清区"
+				},
+				{
+					"code": "120115",
+					"name": "宝坻区"
+				},
+				{
+					"code": "120116",
+					"name": "滨海新区"
+				},
+				{
+					"code": "120117",
+					"name": "宁河区"
+				},
+				{
+					"code": "120118",
+					"name": "静海区"
+				},
+				{
+					"code": "120119",
+					"name": "蓟州区"
+				}
+			]
+		}]
+	},
+	{
+		"code": "130000",
+		"name": "河北省",
+		"children": [{
+				"code": "130100",
+				"name": "石家庄市",
+				"children": [{
+						"code": "130102",
+						"name": "长安区"
+					},
+					{
+						"code": "130104",
+						"name": "桥西区"
+					},
+					{
+						"code": "130105",
+						"name": "新华区"
+					},
+					{
+						"code": "130107",
+						"name": "井陉矿区"
+					},
+					{
+						"code": "130108",
+						"name": "裕华区"
+					},
+					{
+						"code": "130109",
+						"name": "藁城区"
+					},
+					{
+						"code": "130110",
+						"name": "鹿泉区"
+					},
+					{
+						"code": "130111",
+						"name": "栾城区"
+					},
+					{
+						"code": "130121",
+						"name": "井陉县"
+					},
+					{
+						"code": "130123",
+						"name": "正定县"
+					},
+					{
+						"code": "130125",
+						"name": "行唐县"
+					},
+					{
+						"code": "130126",
+						"name": "灵寿县"
+					},
+					{
+						"code": "130127",
+						"name": "高邑县"
+					},
+					{
+						"code": "130128",
+						"name": "深泽县"
+					},
+					{
+						"code": "130129",
+						"name": "赞皇县"
+					},
+					{
+						"code": "130130",
+						"name": "无极县"
+					},
+					{
+						"code": "130131",
+						"name": "平山县"
+					},
+					{
+						"code": "130132",
+						"name": "元氏县"
+					},
+					{
+						"code": "130133",
+						"name": "赵县"
+					},
+					{
+						"code": "130181",
+						"name": "辛集市"
+					},
+					{
+						"code": "130183",
+						"name": "晋州市"
+					},
+					{
+						"code": "130184",
+						"name": "新乐市"
+					}
+				]
+			},
+			{
+				"code": "130200",
+				"name": "唐山市",
+				"children": [{
+						"code": "130202",
+						"name": "路南区"
+					},
+					{
+						"code": "130203",
+						"name": "路北区"
+					},
+					{
+						"code": "130204",
+						"name": "古冶区"
+					},
+					{
+						"code": "130205",
+						"name": "开平区"
+					},
+					{
+						"code": "130207",
+						"name": "丰南区"
+					},
+					{
+						"code": "130208",
+						"name": "丰润区"
+					},
+					{
+						"code": "130209",
+						"name": "曹妃甸区"
+					},
+					{
+						"code": "130223",
+						"name": "滦县"
+					},
+					{
+						"code": "130224",
+						"name": "滦南县"
+					},
+					{
+						"code": "130225",
+						"name": "乐亭县"
+					},
+					{
+						"code": "130227",
+						"name": "迁西县"
+					},
+					{
+						"code": "130229",
+						"name": "玉田县"
+					},
+					{
+						"code": "130281",
+						"name": "遵化市"
+					},
+					{
+						"code": "130283",
+						"name": "迁安市"
+					}
+				]
+			},
+			{
+				"code": "130300",
+				"name": "秦皇岛市",
+				"children": [{
+						"code": "130302",
+						"name": "海港区"
+					},
+					{
+						"code": "130303",
+						"name": "山海关区"
+					},
+					{
+						"code": "130304",
+						"name": "北戴河区"
+					},
+					{
+						"code": "130306",
+						"name": "抚宁区"
+					},
+					{
+						"code": "130321",
+						"name": "青龙满族自治县"
+					},
+					{
+						"code": "130322",
+						"name": "昌黎县"
+					},
+					{
+						"code": "130324",
+						"name": "卢龙县"
+					}
+				]
+			},
+			{
+				"code": "130400",
+				"name": "邯郸市",
+				"children": [{
+						"code": "130402",
+						"name": "邯山区"
+					},
+					{
+						"code": "130403",
+						"name": "丛台区"
+					},
+					{
+						"code": "130404",
+						"name": "复兴区"
+					},
+					{
+						"code": "130406",
+						"name": "峰峰矿区"
+					},
+					{
+						"code": "130407",
+						"name": "肥乡区"
+					},
+					{
+						"code": "130408",
+						"name": "永年区"
+					},
+					{
+						"code": "130423",
+						"name": "临漳县"
+					},
+					{
+						"code": "130424",
+						"name": "成安县"
+					},
+					{
+						"code": "130425",
+						"name": "大名县"
+					},
+					{
+						"code": "130426",
+						"name": "涉县"
+					},
+					{
+						"code": "130427",
+						"name": "磁县"
+					},
+					{
+						"code": "130430",
+						"name": "邱县"
+					},
+					{
+						"code": "130431",
+						"name": "鸡泽县"
+					},
+					{
+						"code": "130432",
+						"name": "广平县"
+					},
+					{
+						"code": "130433",
+						"name": "馆陶县"
+					},
+					{
+						"code": "130434",
+						"name": "魏县"
+					},
+					{
+						"code": "130435",
+						"name": "曲周县"
+					},
+					{
+						"code": "130481",
+						"name": "武安市"
+					}
+				]
+			},
+			{
+				"code": "130500",
+				"name": "邢台市",
+				"children": [{
+						"code": "130502",
+						"name": "桥东区"
+					},
+					{
+						"code": "130503",
+						"name": "桥西区"
+					},
+					{
+						"code": "130521",
+						"name": "邢台县"
+					},
+					{
+						"code": "130522",
+						"name": "临城县"
+					},
+					{
+						"code": "130523",
+						"name": "内丘县"
+					},
+					{
+						"code": "130524",
+						"name": "柏乡县"
+					},
+					{
+						"code": "130525",
+						"name": "隆尧县"
+					},
+					{
+						"code": "130526",
+						"name": "任县"
+					},
+					{
+						"code": "130527",
+						"name": "南和县"
+					},
+					{
+						"code": "130528",
+						"name": "宁晋县"
+					},
+					{
+						"code": "130529",
+						"name": "巨鹿县"
+					},
+					{
+						"code": "130530",
+						"name": "新河县"
+					},
+					{
+						"code": "130531",
+						"name": "广宗县"
+					},
+					{
+						"code": "130532",
+						"name": "平乡县"
+					},
+					{
+						"code": "130533",
+						"name": "威县"
+					},
+					{
+						"code": "130534",
+						"name": "清河县"
+					},
+					{
+						"code": "130535",
+						"name": "临西县"
+					},
+					{
+						"code": "130581",
+						"name": "南宫市"
+					},
+					{
+						"code": "130582",
+						"name": "沙河市"
+					}
+				]
+			},
+			{
+				"code": "130600",
+				"name": "保定市",
+				"children": [{
+						"code": "130602",
+						"name": "竞秀区"
+					},
+					{
+						"code": "130606",
+						"name": "莲池区"
+					},
+					{
+						"code": "130607",
+						"name": "满城区"
+					},
+					{
+						"code": "130608",
+						"name": "清苑区"
+					},
+					{
+						"code": "130609",
+						"name": "徐水区"
+					},
+					{
+						"code": "130623",
+						"name": "涞水县"
+					},
+					{
+						"code": "130624",
+						"name": "阜平县"
+					},
+					{
+						"code": "130626",
+						"name": "定兴县"
+					},
+					{
+						"code": "130627",
+						"name": "唐县"
+					},
+					{
+						"code": "130628",
+						"name": "高阳县"
+					},
+					{
+						"code": "130629",
+						"name": "容城县"
+					},
+					{
+						"code": "130630",
+						"name": "涞源县"
+					},
+					{
+						"code": "130631",
+						"name": "望都县"
+					},
+					{
+						"code": "130632",
+						"name": "安新县"
+					},
+					{
+						"code": "130633",
+						"name": "易县"
+					},
+					{
+						"code": "130634",
+						"name": "曲阳县"
+					},
+					{
+						"code": "130635",
+						"name": "蠡县"
+					},
+					{
+						"code": "130636",
+						"name": "顺平县"
+					},
+					{
+						"code": "130637",
+						"name": "博野县"
+					},
+					{
+						"code": "130638",
+						"name": "雄县"
+					},
+					{
+						"code": "130681",
+						"name": "涿州市"
+					},
+					{
+						"code": "130682",
+						"name": "定州市"
+					},
+					{
+						"code": "130683",
+						"name": "安国市"
+					},
+					{
+						"code": "130684",
+						"name": "高碑店市"
+					}
+				]
+			},
+			{
+				"code": "130700",
+				"name": "张家口市",
+				"children": [{
+						"code": "130702",
+						"name": "桥东区"
+					},
+					{
+						"code": "130703",
+						"name": "桥西区"
+					},
+					{
+						"code": "130705",
+						"name": "宣化区"
+					},
+					{
+						"code": "130706",
+						"name": "下花园区"
+					},
+					{
+						"code": "130708",
+						"name": "万全区"
+					},
+					{
+						"code": "130709",
+						"name": "崇礼区"
+					},
+					{
+						"code": "130722",
+						"name": "张北县"
+					},
+					{
+						"code": "130723",
+						"name": "康保县"
+					},
+					{
+						"code": "130724",
+						"name": "沽源县"
+					},
+					{
+						"code": "130725",
+						"name": "尚义县"
+					},
+					{
+						"code": "130726",
+						"name": "蔚县"
+					},
+					{
+						"code": "130727",
+						"name": "阳原县"
+					},
+					{
+						"code": "130728",
+						"name": "怀安县"
+					},
+					{
+						"code": "130730",
+						"name": "怀来县"
+					},
+					{
+						"code": "130731",
+						"name": "涿鹿县"
+					},
+					{
+						"code": "130732",
+						"name": "赤城县"
+					}
+				]
+			},
+			{
+				"code": "130800",
+				"name": "承德市",
+				"children": [{
+						"code": "130802",
+						"name": "双桥区"
+					},
+					{
+						"code": "130803",
+						"name": "双滦区"
+					},
+					{
+						"code": "130804",
+						"name": "鹰手营子矿区"
+					},
+					{
+						"code": "130821",
+						"name": "承德县"
+					},
+					{
+						"code": "130822",
+						"name": "兴隆县"
+					},
+					{
+						"code": "130824",
+						"name": "滦平县"
+					},
+					{
+						"code": "130825",
+						"name": "隆化县"
+					},
+					{
+						"code": "130826",
+						"name": "丰宁满族自治县"
+					},
+					{
+						"code": "130827",
+						"name": "宽城满族自治县"
+					},
+					{
+						"code": "130828",
+						"name": "围场满族蒙古族自治县"
+					},
+					{
+						"code": "130881",
+						"name": "平泉市"
+					}
+				]
+			},
+			{
+				"code": "130900",
+				"name": "沧州市",
+				"children": [{
+						"code": "130902",
+						"name": "新华区"
+					},
+					{
+						"code": "130903",
+						"name": "运河区"
+					},
+					{
+						"code": "130921",
+						"name": "沧县"
+					},
+					{
+						"code": "130922",
+						"name": "青县"
+					},
+					{
+						"code": "130923",
+						"name": "东光县"
+					},
+					{
+						"code": "130924",
+						"name": "海兴县"
+					},
+					{
+						"code": "130925",
+						"name": "盐山县"
+					},
+					{
+						"code": "130926",
+						"name": "肃宁县"
+					},
+					{
+						"code": "130927",
+						"name": "南皮县"
+					},
+					{
+						"code": "130928",
+						"name": "吴桥县"
+					},
+					{
+						"code": "130929",
+						"name": "献县"
+					},
+					{
+						"code": "130930",
+						"name": "孟村回族自治县"
+					},
+					{
+						"code": "130981",
+						"name": "泊头市"
+					},
+					{
+						"code": "130982",
+						"name": "任丘市"
+					},
+					{
+						"code": "130983",
+						"name": "黄骅市"
+					},
+					{
+						"code": "130984",
+						"name": "河间市"
+					}
+				]
+			},
+			{
+				"code": "131000",
+				"name": "廊坊市",
+				"children": [{
+						"code": "131002",
+						"name": "安次区"
+					},
+					{
+						"code": "131003",
+						"name": "广阳区"
+					},
+					{
+						"code": "131022",
+						"name": "固安县"
+					},
+					{
+						"code": "131023",
+						"name": "永清县"
+					},
+					{
+						"code": "131024",
+						"name": "香河县"
+					},
+					{
+						"code": "131025",
+						"name": "大城县"
+					},
+					{
+						"code": "131026",
+						"name": "文安县"
+					},
+					{
+						"code": "131028",
+						"name": "大厂回族自治县"
+					},
+					{
+						"code": "131081",
+						"name": "霸州市"
+					},
+					{
+						"code": "131082",
+						"name": "三河市"
+					}
+				]
+			},
+			{
+				"code": "131100",
+				"name": "衡水市",
+				"children": [{
+						"code": "131102",
+						"name": "桃城区"
+					},
+					{
+						"code": "131103",
+						"name": "冀州区"
+					},
+					{
+						"code": "131121",
+						"name": "枣强县"
+					},
+					{
+						"code": "131122",
+						"name": "武邑县"
+					},
+					{
+						"code": "131123",
+						"name": "武强县"
+					},
+					{
+						"code": "131124",
+						"name": "饶阳县"
+					},
+					{
+						"code": "131125",
+						"name": "安平县"
+					},
+					{
+						"code": "131126",
+						"name": "故城县"
+					},
+					{
+						"code": "131127",
+						"name": "景县"
+					},
+					{
+						"code": "131128",
+						"name": "阜城县"
+					},
+					{
+						"code": "131182",
+						"name": "深州市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "140000",
+		"name": "山西省",
+		"children": [{
+				"code": "140100",
+				"name": "太原市",
+				"children": [{
+						"code": "140105",
+						"name": "小店区"
+					},
+					{
+						"code": "140106",
+						"name": "迎泽区"
+					},
+					{
+						"code": "140107",
+						"name": "杏花岭区"
+					},
+					{
+						"code": "140108",
+						"name": "尖草坪区"
+					},
+					{
+						"code": "140109",
+						"name": "万柏林区"
+					},
+					{
+						"code": "140110",
+						"name": "晋源区"
+					},
+					{
+						"code": "140121",
+						"name": "清徐县"
+					},
+					{
+						"code": "140122",
+						"name": "阳曲县"
+					},
+					{
+						"code": "140123",
+						"name": "娄烦县"
+					},
+					{
+						"code": "140181",
+						"name": "古交市"
+					}
+				]
+			},
+			{
+				"code": "140200",
+				"name": "大同市",
+				"children": [{
+						"code": "140212",
+						"name": "新荣区"
+					},
+					{
+						"code": "140213",
+						"name": "平城区"
+					},
+					{
+						"code": "140214",
+						"name": "云冈区"
+					},
+					{
+						"code": "140215",
+						"name": "云州区"
+					},
+					{
+						"code": "140221",
+						"name": "阳高县"
+					},
+					{
+						"code": "140222",
+						"name": "天镇县"
+					},
+					{
+						"code": "140223",
+						"name": "广灵县"
+					},
+					{
+						"code": "140224",
+						"name": "灵丘县"
+					},
+					{
+						"code": "140225",
+						"name": "浑源县"
+					},
+					{
+						"code": "140226",
+						"name": "左云县"
+					}
+				]
+			},
+			{
+				"code": "140300",
+				"name": "阳泉市",
+				"children": [{
+						"code": "140302",
+						"name": "城区"
+					},
+					{
+						"code": "140303",
+						"name": "矿区"
+					},
+					{
+						"code": "140311",
+						"name": "郊区"
+					},
+					{
+						"code": "140321",
+						"name": "平定县"
+					},
+					{
+						"code": "140322",
+						"name": "盂县"
+					}
+				]
+			},
+			{
+				"code": "140400",
+				"name": "长治市",
+				"children": [{
+						"code": "140402",
+						"name": "城区"
+					},
+					{
+						"code": "140411",
+						"name": "郊区"
+					},
+					{
+						"code": "140421",
+						"name": "长治县"
+					},
+					{
+						"code": "140423",
+						"name": "襄垣县"
+					},
+					{
+						"code": "140424",
+						"name": "屯留县"
+					},
+					{
+						"code": "140425",
+						"name": "平顺县"
+					},
+					{
+						"code": "140426",
+						"name": "黎城县"
+					},
+					{
+						"code": "140427",
+						"name": "壶关县"
+					},
+					{
+						"code": "140428",
+						"name": "长子县"
+					},
+					{
+						"code": "140429",
+						"name": "武乡县"
+					},
+					{
+						"code": "140430",
+						"name": "沁县"
+					},
+					{
+						"code": "140431",
+						"name": "沁源县"
+					},
+					{
+						"code": "140481",
+						"name": "潞城市"
+					}
+				]
+			},
+			{
+				"code": "140500",
+				"name": "晋城市",
+				"children": [{
+						"code": "140502",
+						"name": "城区"
+					},
+					{
+						"code": "140521",
+						"name": "沁水县"
+					},
+					{
+						"code": "140522",
+						"name": "阳城县"
+					},
+					{
+						"code": "140524",
+						"name": "陵川县"
+					},
+					{
+						"code": "140525",
+						"name": "泽州县"
+					},
+					{
+						"code": "140581",
+						"name": "高平市"
+					}
+				]
+			},
+			{
+				"code": "140600",
+				"name": "朔州市",
+				"children": [{
+						"code": "140602",
+						"name": "朔城区"
+					},
+					{
+						"code": "140603",
+						"name": "平鲁区"
+					},
+					{
+						"code": "140621",
+						"name": "山阴县"
+					},
+					{
+						"code": "140622",
+						"name": "应县"
+					},
+					{
+						"code": "140623",
+						"name": "右玉县"
+					},
+					{
+						"code": "140681",
+						"name": "怀仁市"
+					}
+				]
+			},
+			{
+				"code": "140700",
+				"name": "晋中市",
+				"children": [{
+						"code": "140702",
+						"name": "榆次区"
+					},
+					{
+						"code": "140721",
+						"name": "榆社县"
+					},
+					{
+						"code": "140722",
+						"name": "左权县"
+					},
+					{
+						"code": "140723",
+						"name": "和顺县"
+					},
+					{
+						"code": "140724",
+						"name": "昔阳县"
+					},
+					{
+						"code": "140725",
+						"name": "寿阳县"
+					},
+					{
+						"code": "140726",
+						"name": "太谷县"
+					},
+					{
+						"code": "140727",
+						"name": "祁县"
+					},
+					{
+						"code": "140728",
+						"name": "平遥县"
+					},
+					{
+						"code": "140729",
+						"name": "灵石县"
+					},
+					{
+						"code": "140781",
+						"name": "介休市"
+					}
+				]
+			},
+			{
+				"code": "140800",
+				"name": "运城市",
+				"children": [{
+						"code": "140802",
+						"name": "盐湖区"
+					},
+					{
+						"code": "140821",
+						"name": "临猗县"
+					},
+					{
+						"code": "140822",
+						"name": "万荣县"
+					},
+					{
+						"code": "140823",
+						"name": "闻喜县"
+					},
+					{
+						"code": "140824",
+						"name": "稷山县"
+					},
+					{
+						"code": "140825",
+						"name": "新绛县"
+					},
+					{
+						"code": "140826",
+						"name": "绛县"
+					},
+					{
+						"code": "140827",
+						"name": "垣曲县"
+					},
+					{
+						"code": "140828",
+						"name": "夏县"
+					},
+					{
+						"code": "140829",
+						"name": "平陆县"
+					},
+					{
+						"code": "140830",
+						"name": "芮城县"
+					},
+					{
+						"code": "140881",
+						"name": "永济市"
+					},
+					{
+						"code": "140882",
+						"name": "河津市"
+					}
+				]
+			},
+			{
+				"code": "140900",
+				"name": "忻州市",
+				"children": [{
+						"code": "140902",
+						"name": "忻府区"
+					},
+					{
+						"code": "140921",
+						"name": "定襄县"
+					},
+					{
+						"code": "140922",
+						"name": "五台县"
+					},
+					{
+						"code": "140923",
+						"name": "代县"
+					},
+					{
+						"code": "140924",
+						"name": "繁峙县"
+					},
+					{
+						"code": "140925",
+						"name": "宁武县"
+					},
+					{
+						"code": "140926",
+						"name": "静乐县"
+					},
+					{
+						"code": "140927",
+						"name": "神池县"
+					},
+					{
+						"code": "140928",
+						"name": "五寨县"
+					},
+					{
+						"code": "140929",
+						"name": "岢岚县"
+					},
+					{
+						"code": "140930",
+						"name": "河曲县"
+					},
+					{
+						"code": "140931",
+						"name": "保德县"
+					},
+					{
+						"code": "140932",
+						"name": "偏关县"
+					},
+					{
+						"code": "140981",
+						"name": "原平市"
+					}
+				]
+			},
+			{
+				"code": "141000",
+				"name": "临汾市",
+				"children": [{
+						"code": "141002",
+						"name": "尧都区"
+					},
+					{
+						"code": "141021",
+						"name": "曲沃县"
+					},
+					{
+						"code": "141022",
+						"name": "翼城县"
+					},
+					{
+						"code": "141023",
+						"name": "襄汾县"
+					},
+					{
+						"code": "141024",
+						"name": "洪洞县"
+					},
+					{
+						"code": "141025",
+						"name": "古县"
+					},
+					{
+						"code": "141026",
+						"name": "安泽县"
+					},
+					{
+						"code": "141027",
+						"name": "浮山县"
+					},
+					{
+						"code": "141028",
+						"name": "吉县"
+					},
+					{
+						"code": "141029",
+						"name": "乡宁县"
+					},
+					{
+						"code": "141030",
+						"name": "大宁县"
+					},
+					{
+						"code": "141031",
+						"name": "隰县"
+					},
+					{
+						"code": "141032",
+						"name": "永和县"
+					},
+					{
+						"code": "141033",
+						"name": "蒲县"
+					},
+					{
+						"code": "141034",
+						"name": "汾西县"
+					},
+					{
+						"code": "141081",
+						"name": "侯马市"
+					},
+					{
+						"code": "141082",
+						"name": "霍州市"
+					}
+				]
+			},
+			{
+				"code": "141100",
+				"name": "吕梁市",
+				"children": [{
+						"code": "141102",
+						"name": "离石区"
+					},
+					{
+						"code": "141121",
+						"name": "文水县"
+					},
+					{
+						"code": "141122",
+						"name": "交城县"
+					},
+					{
+						"code": "141123",
+						"name": "兴县"
+					},
+					{
+						"code": "141124",
+						"name": "临县"
+					},
+					{
+						"code": "141125",
+						"name": "柳林县"
+					},
+					{
+						"code": "141126",
+						"name": "石楼县"
+					},
+					{
+						"code": "141127",
+						"name": "岚县"
+					},
+					{
+						"code": "141128",
+						"name": "方山县"
+					},
+					{
+						"code": "141129",
+						"name": "中阳县"
+					},
+					{
+						"code": "141130",
+						"name": "交口县"
+					},
+					{
+						"code": "141181",
+						"name": "孝义市"
+					},
+					{
+						"code": "141182",
+						"name": "汾阳市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "150000",
+		"name": "内蒙古自治区",
+		"children": [{
+				"code": "150100",
+				"name": "呼和浩特市",
+				"children": [{
+						"code": "150102",
+						"name": "新城区"
+					},
+					{
+						"code": "150103",
+						"name": "回民区"
+					},
+					{
+						"code": "150104",
+						"name": "玉泉区"
+					},
+					{
+						"code": "150105",
+						"name": "赛罕区"
+					},
+					{
+						"code": "150121",
+						"name": "土默特左旗"
+					},
+					{
+						"code": "150122",
+						"name": "托克托县"
+					},
+					{
+						"code": "150123",
+						"name": "和林格尔县"
+					},
+					{
+						"code": "150124",
+						"name": "清水河县"
+					},
+					{
+						"code": "150125",
+						"name": "武川县"
+					}
+				]
+			},
+			{
+				"code": "150200",
+				"name": "包头市",
+				"children": [{
+						"code": "150202",
+						"name": "东河区"
+					},
+					{
+						"code": "150203",
+						"name": "昆都仑区"
+					},
+					{
+						"code": "150204",
+						"name": "青山区"
+					},
+					{
+						"code": "150205",
+						"name": "石拐区"
+					},
+					{
+						"code": "150206",
+						"name": "白云鄂博矿区"
+					},
+					{
+						"code": "150207",
+						"name": "九原区"
+					},
+					{
+						"code": "150221",
+						"name": "土默特右旗"
+					},
+					{
+						"code": "150222",
+						"name": "固阳县"
+					},
+					{
+						"code": "150223",
+						"name": "达尔罕茂明安联合旗"
+					}
+				]
+			},
+			{
+				"code": "150300",
+				"name": "乌海市",
+				"children": [{
+						"code": "150302",
+						"name": "海勃湾区"
+					},
+					{
+						"code": "150303",
+						"name": "海南区"
+					},
+					{
+						"code": "150304",
+						"name": "乌达区"
+					}
+				]
+			},
+			{
+				"code": "150400",
+				"name": "赤峰市",
+				"children": [{
+						"code": "150402",
+						"name": "红山区"
+					},
+					{
+						"code": "150403",
+						"name": "元宝山区"
+					},
+					{
+						"code": "150404",
+						"name": "松山区"
+					},
+					{
+						"code": "150421",
+						"name": "阿鲁科尔沁旗"
+					},
+					{
+						"code": "150422",
+						"name": "巴林左旗"
+					},
+					{
+						"code": "150423",
+						"name": "巴林右旗"
+					},
+					{
+						"code": "150424",
+						"name": "林西县"
+					},
+					{
+						"code": "150425",
+						"name": "克什克腾旗"
+					},
+					{
+						"code": "150426",
+						"name": "翁牛特旗"
+					},
+					{
+						"code": "150428",
+						"name": "喀喇沁旗"
+					},
+					{
+						"code": "150429",
+						"name": "宁城县"
+					},
+					{
+						"code": "150430",
+						"name": "敖汉旗"
+					}
+				]
+			},
+			{
+				"code": "150500",
+				"name": "通辽市",
+				"children": [{
+						"code": "150502",
+						"name": "科尔沁区"
+					},
+					{
+						"code": "150521",
+						"name": "科尔沁左翼中旗"
+					},
+					{
+						"code": "150522",
+						"name": "科尔沁左翼后旗"
+					},
+					{
+						"code": "150523",
+						"name": "开鲁县"
+					},
+					{
+						"code": "150524",
+						"name": "库伦旗"
+					},
+					{
+						"code": "150525",
+						"name": "奈曼旗"
+					},
+					{
+						"code": "150526",
+						"name": "扎鲁特旗"
+					},
+					{
+						"code": "150581",
+						"name": "霍林郭勒市"
+					}
+				]
+			},
+			{
+				"code": "150600",
+				"name": "鄂尔多斯市",
+				"children": [{
+						"code": "150602",
+						"name": "东胜区"
+					},
+					{
+						"code": "150603",
+						"name": "康巴什区"
+					},
+					{
+						"code": "150621",
+						"name": "达拉特旗"
+					},
+					{
+						"code": "150622",
+						"name": "准格尔旗"
+					},
+					{
+						"code": "150623",
+						"name": "鄂托克前旗"
+					},
+					{
+						"code": "150624",
+						"name": "鄂托克旗"
+					},
+					{
+						"code": "150625",
+						"name": "杭锦旗"
+					},
+					{
+						"code": "150626",
+						"name": "乌审旗"
+					},
+					{
+						"code": "150627",
+						"name": "伊金霍洛旗"
+					}
+				]
+			},
+			{
+				"code": "150700",
+				"name": "呼伦贝尔市",
+				"children": [{
+						"code": "150702",
+						"name": "海拉尔区"
+					},
+					{
+						"code": "150703",
+						"name": "扎赉诺尔区"
+					},
+					{
+						"code": "150721",
+						"name": "阿荣旗"
+					},
+					{
+						"code": "150722",
+						"name": "莫力达瓦达斡尔族自治旗"
+					},
+					{
+						"code": "150723",
+						"name": "鄂伦春自治旗"
+					},
+					{
+						"code": "150724",
+						"name": "鄂温克族自治旗"
+					},
+					{
+						"code": "150725",
+						"name": "陈巴尔虎旗"
+					},
+					{
+						"code": "150726",
+						"name": "新巴尔虎左旗"
+					},
+					{
+						"code": "150727",
+						"name": "新巴尔虎右旗"
+					},
+					{
+						"code": "150781",
+						"name": "满洲里市"
+					},
+					{
+						"code": "150782",
+						"name": "牙克石市"
+					},
+					{
+						"code": "150783",
+						"name": "扎兰屯市"
+					},
+					{
+						"code": "150784",
+						"name": "额尔古纳市"
+					},
+					{
+						"code": "150785",
+						"name": "根河市"
+					}
+				]
+			},
+			{
+				"code": "150800",
+				"name": "巴彦淖尔市",
+				"children": [{
+						"code": "150802",
+						"name": "临河区"
+					},
+					{
+						"code": "150821",
+						"name": "五原县"
+					},
+					{
+						"code": "150822",
+						"name": "磴口县"
+					},
+					{
+						"code": "150823",
+						"name": "乌拉特前旗"
+					},
+					{
+						"code": "150824",
+						"name": "乌拉特中旗"
+					},
+					{
+						"code": "150825",
+						"name": "乌拉特后旗"
+					},
+					{
+						"code": "150826",
+						"name": "杭锦后旗"
+					}
+				]
+			},
+			{
+				"code": "150900",
+				"name": "乌兰察布市",
+				"children": [{
+						"code": "150902",
+						"name": "集宁区"
+					},
+					{
+						"code": "150921",
+						"name": "卓资县"
+					},
+					{
+						"code": "150922",
+						"name": "化德县"
+					},
+					{
+						"code": "150923",
+						"name": "商都县"
+					},
+					{
+						"code": "150924",
+						"name": "兴和县"
+					},
+					{
+						"code": "150925",
+						"name": "凉城县"
+					},
+					{
+						"code": "150926",
+						"name": "察哈尔右翼前旗"
+					},
+					{
+						"code": "150927",
+						"name": "察哈尔右翼中旗"
+					},
+					{
+						"code": "150928",
+						"name": "察哈尔右翼后旗"
+					},
+					{
+						"code": "150929",
+						"name": "四子王旗"
+					},
+					{
+						"code": "150981",
+						"name": "丰镇市"
+					}
+				]
+			},
+			{
+				"code": "152200",
+				"name": "兴安盟",
+				"children": [{
+						"code": "152201",
+						"name": "乌兰浩特市"
+					},
+					{
+						"code": "152202",
+						"name": "阿尔山市"
+					},
+					{
+						"code": "152221",
+						"name": "科尔沁右翼前旗"
+					},
+					{
+						"code": "152222",
+						"name": "科尔沁右翼中旗"
+					},
+					{
+						"code": "152223",
+						"name": "扎赉特旗"
+					},
+					{
+						"code": "152224",
+						"name": "突泉县"
+					}
+				]
+			},
+			{
+				"code": "152500",
+				"name": "锡林郭勒盟",
+				"children": [{
+						"code": "152501",
+						"name": "二连浩特市"
+					},
+					{
+						"code": "152502",
+						"name": "锡林浩特市"
+					},
+					{
+						"code": "152522",
+						"name": "阿巴嘎旗"
+					},
+					{
+						"code": "152523",
+						"name": "苏尼特左旗"
+					},
+					{
+						"code": "152524",
+						"name": "苏尼特右旗"
+					},
+					{
+						"code": "152525",
+						"name": "东乌珠穆沁旗"
+					},
+					{
+						"code": "152526",
+						"name": "西乌珠穆沁旗"
+					},
+					{
+						"code": "152527",
+						"name": "太仆寺旗"
+					},
+					{
+						"code": "152528",
+						"name": "镶黄旗"
+					},
+					{
+						"code": "152529",
+						"name": "正镶白旗"
+					},
+					{
+						"code": "152530",
+						"name": "正蓝旗"
+					},
+					{
+						"code": "152531",
+						"name": "多伦县"
+					}
+				]
+			},
+			{
+				"code": "152900",
+				"name": "阿拉善盟",
+				"children": [{
+						"code": "152921",
+						"name": "阿拉善左旗"
+					},
+					{
+						"code": "152922",
+						"name": "阿拉善右旗"
+					},
+					{
+						"code": "152923",
+						"name": "额济纳旗"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "210000",
+		"name": "辽宁省",
+		"children": [{
+				"code": "210100",
+				"name": "沈阳市",
+				"children": [{
+						"code": "210102",
+						"name": "和平区"
+					},
+					{
+						"code": "210103",
+						"name": "沈河区"
+					},
+					{
+						"code": "210104",
+						"name": "大东区"
+					},
+					{
+						"code": "210105",
+						"name": "皇姑区"
+					},
+					{
+						"code": "210106",
+						"name": "铁西区"
+					},
+					{
+						"code": "210111",
+						"name": "苏家屯区"
+					},
+					{
+						"code": "210112",
+						"name": "浑南区"
+					},
+					{
+						"code": "210113",
+						"name": "沈北新区"
+					},
+					{
+						"code": "210114",
+						"name": "于洪区"
+					},
+					{
+						"code": "210115",
+						"name": "辽中区"
+					},
+					{
+						"code": "210123",
+						"name": "康平县"
+					},
+					{
+						"code": "210124",
+						"name": "法库县"
+					},
+					{
+						"code": "210181",
+						"name": "新民市"
+					}
+				]
+			},
+			{
+				"code": "210200",
+				"name": "大连市",
+				"children": [{
+						"code": "210202",
+						"name": "中山区"
+					},
+					{
+						"code": "210203",
+						"name": "西岗区"
+					},
+					{
+						"code": "210204",
+						"name": "沙河口区"
+					},
+					{
+						"code": "210211",
+						"name": "甘井子区"
+					},
+					{
+						"code": "210212",
+						"name": "旅顺口区"
+					},
+					{
+						"code": "210213",
+						"name": "金州区"
+					},
+					{
+						"code": "210214",
+						"name": "普兰店区"
+					},
+					{
+						"code": "210224",
+						"name": "长海县"
+					},
+					{
+						"code": "210281",
+						"name": "瓦房店市"
+					},
+					{
+						"code": "210283",
+						"name": "庄河市"
+					}
+				]
+			},
+			{
+				"code": "210300",
+				"name": "鞍山市",
+				"children": [{
+						"code": "210302",
+						"name": "铁东区"
+					},
+					{
+						"code": "210303",
+						"name": "铁西区"
+					},
+					{
+						"code": "210304",
+						"name": "立山区"
+					},
+					{
+						"code": "210311",
+						"name": "千山区"
+					},
+					{
+						"code": "210321",
+						"name": "台安县"
+					},
+					{
+						"code": "210323",
+						"name": "岫岩满族自治县"
+					},
+					{
+						"code": "210381",
+						"name": "海城市"
+					}
+				]
+			},
+			{
+				"code": "210400",
+				"name": "抚顺市",
+				"children": [{
+						"code": "210402",
+						"name": "新抚区"
+					},
+					{
+						"code": "210403",
+						"name": "东洲区"
+					},
+					{
+						"code": "210404",
+						"name": "望花区"
+					},
+					{
+						"code": "210411",
+						"name": "顺城区"
+					},
+					{
+						"code": "210421",
+						"name": "抚顺县"
+					},
+					{
+						"code": "210422",
+						"name": "新宾满族自治县"
+					},
+					{
+						"code": "210423",
+						"name": "清原满族自治县"
+					}
+				]
+			},
+			{
+				"code": "210500",
+				"name": "本溪市",
+				"children": [{
+						"code": "210502",
+						"name": "平山区"
+					},
+					{
+						"code": "210503",
+						"name": "溪湖区"
+					},
+					{
+						"code": "210504",
+						"name": "明山区"
+					},
+					{
+						"code": "210505",
+						"name": "南芬区"
+					},
+					{
+						"code": "210521",
+						"name": "本溪满族自治县"
+					},
+					{
+						"code": "210522",
+						"name": "桓仁满族自治县"
+					}
+				]
+			},
+			{
+				"code": "210600",
+				"name": "丹东市",
+				"children": [{
+						"code": "210602",
+						"name": "元宝区"
+					},
+					{
+						"code": "210603",
+						"name": "振兴区"
+					},
+					{
+						"code": "210604",
+						"name": "振安区"
+					},
+					{
+						"code": "210624",
+						"name": "宽甸满族自治县"
+					},
+					{
+						"code": "210681",
+						"name": "东港市"
+					},
+					{
+						"code": "210682",
+						"name": "凤城市"
+					}
+				]
+			},
+			{
+				"code": "210700",
+				"name": "锦州市",
+				"children": [{
+						"code": "210702",
+						"name": "古塔区"
+					},
+					{
+						"code": "210703",
+						"name": "凌河区"
+					},
+					{
+						"code": "210711",
+						"name": "太和区"
+					},
+					{
+						"code": "210726",
+						"name": "黑山县"
+					},
+					{
+						"code": "210727",
+						"name": "义县"
+					},
+					{
+						"code": "210781",
+						"name": "凌海市"
+					},
+					{
+						"code": "210782",
+						"name": "北镇市"
+					}
+				]
+			},
+			{
+				"code": "210800",
+				"name": "营口市",
+				"children": [{
+						"code": "210802",
+						"name": "站前区"
+					},
+					{
+						"code": "210803",
+						"name": "西市区"
+					},
+					{
+						"code": "210804",
+						"name": "鲅鱼圈区"
+					},
+					{
+						"code": "210811",
+						"name": "老边区"
+					},
+					{
+						"code": "210881",
+						"name": "盖州市"
+					},
+					{
+						"code": "210882",
+						"name": "大石桥市"
+					}
+				]
+			},
+			{
+				"code": "210900",
+				"name": "阜新市",
+				"children": [{
+						"code": "210902",
+						"name": "海州区"
+					},
+					{
+						"code": "210903",
+						"name": "新邱区"
+					},
+					{
+						"code": "210904",
+						"name": "太平区"
+					},
+					{
+						"code": "210905",
+						"name": "清河门区"
+					},
+					{
+						"code": "210911",
+						"name": "细河区"
+					},
+					{
+						"code": "210921",
+						"name": "阜新蒙古族自治县"
+					},
+					{
+						"code": "210922",
+						"name": "彰武县"
+					}
+				]
+			},
+			{
+				"code": "211000",
+				"name": "辽阳市",
+				"children": [{
+						"code": "211002",
+						"name": "白塔区"
+					},
+					{
+						"code": "211003",
+						"name": "文圣区"
+					},
+					{
+						"code": "211004",
+						"name": "宏伟区"
+					},
+					{
+						"code": "211005",
+						"name": "弓长岭区"
+					},
+					{
+						"code": "211011",
+						"name": "太子河区"
+					},
+					{
+						"code": "211021",
+						"name": "辽阳县"
+					},
+					{
+						"code": "211081",
+						"name": "灯塔市"
+					}
+				]
+			},
+			{
+				"code": "211100",
+				"name": "盘锦市",
+				"children": [{
+						"code": "211102",
+						"name": "双台子区"
+					},
+					{
+						"code": "211103",
+						"name": "兴隆台区"
+					},
+					{
+						"code": "211104",
+						"name": "大洼区"
+					},
+					{
+						"code": "211122",
+						"name": "盘山县"
+					}
+				]
+			},
+			{
+				"code": "211200",
+				"name": "铁岭市",
+				"children": [{
+						"code": "211202",
+						"name": "银州区"
+					},
+					{
+						"code": "211204",
+						"name": "清河区"
+					},
+					{
+						"code": "211221",
+						"name": "铁岭县"
+					},
+					{
+						"code": "211223",
+						"name": "西丰县"
+					},
+					{
+						"code": "211224",
+						"name": "昌图县"
+					},
+					{
+						"code": "211281",
+						"name": "调兵山市"
+					},
+					{
+						"code": "211282",
+						"name": "开原市"
+					}
+				]
+			},
+			{
+				"code": "211300",
+				"name": "朝阳市",
+				"children": [{
+						"code": "211302",
+						"name": "双塔区"
+					},
+					{
+						"code": "211303",
+						"name": "龙城区"
+					},
+					{
+						"code": "211321",
+						"name": "朝阳县"
+					},
+					{
+						"code": "211322",
+						"name": "建平县"
+					},
+					{
+						"code": "211324",
+						"name": "喀喇沁左翼蒙古族自治县"
+					},
+					{
+						"code": "211381",
+						"name": "北票市"
+					},
+					{
+						"code": "211382",
+						"name": "凌源市"
+					}
+				]
+			},
+			{
+				"code": "211400",
+				"name": "葫芦岛市",
+				"children": [{
+						"code": "211402",
+						"name": "连山区"
+					},
+					{
+						"code": "211403",
+						"name": "龙港区"
+					},
+					{
+						"code": "211404",
+						"name": "南票区"
+					},
+					{
+						"code": "211421",
+						"name": "绥中县"
+					},
+					{
+						"code": "211422",
+						"name": "建昌县"
+					},
+					{
+						"code": "211481",
+						"name": "兴城市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "220000",
+		"name": "吉林省",
+		"children": [{
+				"code": "220100",
+				"name": "长春市",
+				"children": [{
+						"code": "220102",
+						"name": "南关区"
+					},
+					{
+						"code": "220103",
+						"name": "宽城区"
+					},
+					{
+						"code": "220104",
+						"name": "朝阳区"
+					},
+					{
+						"code": "220105",
+						"name": "二道区"
+					},
+					{
+						"code": "220106",
+						"name": "绿园区"
+					},
+					{
+						"code": "220112",
+						"name": "双阳区"
+					},
+					{
+						"code": "220113",
+						"name": "九台区"
+					},
+					{
+						"code": "220122",
+						"name": "农安县"
+					},
+					{
+						"code": "220182",
+						"name": "榆树市"
+					},
+					{
+						"code": "220183",
+						"name": "德惠市"
+					}
+				]
+			},
+			{
+				"code": "220200",
+				"name": "吉林市",
+				"children": [{
+						"code": "220202",
+						"name": "昌邑区"
+					},
+					{
+						"code": "220203",
+						"name": "龙潭区"
+					},
+					{
+						"code": "220204",
+						"name": "船营区"
+					},
+					{
+						"code": "220211",
+						"name": "丰满区"
+					},
+					{
+						"code": "220221",
+						"name": "永吉县"
+					},
+					{
+						"code": "220281",
+						"name": "蛟河市"
+					},
+					{
+						"code": "220282",
+						"name": "桦甸市"
+					},
+					{
+						"code": "220283",
+						"name": "舒兰市"
+					},
+					{
+						"code": "220284",
+						"name": "磐石市"
+					}
+				]
+			},
+			{
+				"code": "220300",
+				"name": "四平市",
+				"children": [{
+						"code": "220302",
+						"name": "铁西区"
+					},
+					{
+						"code": "220303",
+						"name": "铁东区"
+					},
+					{
+						"code": "220322",
+						"name": "梨树县"
+					},
+					{
+						"code": "220323",
+						"name": "伊通满族自治县"
+					},
+					{
+						"code": "220381",
+						"name": "公主岭市"
+					},
+					{
+						"code": "220382",
+						"name": "双辽市"
+					}
+				]
+			},
+			{
+				"code": "220400",
+				"name": "辽源市",
+				"children": [{
+						"code": "220402",
+						"name": "龙山区"
+					},
+					{
+						"code": "220403",
+						"name": "西安区"
+					},
+					{
+						"code": "220421",
+						"name": "东丰县"
+					},
+					{
+						"code": "220422",
+						"name": "东辽县"
+					}
+				]
+			},
+			{
+				"code": "220500",
+				"name": "通化市",
+				"children": [{
+						"code": "220502",
+						"name": "东昌区"
+					},
+					{
+						"code": "220503",
+						"name": "二道江区"
+					},
+					{
+						"code": "220521",
+						"name": "通化县"
+					},
+					{
+						"code": "220523",
+						"name": "辉南县"
+					},
+					{
+						"code": "220524",
+						"name": "柳河县"
+					},
+					{
+						"code": "220581",
+						"name": "梅河口市"
+					},
+					{
+						"code": "220582",
+						"name": "集安市"
+					}
+				]
+			},
+			{
+				"code": "220600",
+				"name": "白山市",
+				"children": [{
+						"code": "220602",
+						"name": "浑江区"
+					},
+					{
+						"code": "220605",
+						"name": "江源区"
+					},
+					{
+						"code": "220621",
+						"name": "抚松县"
+					},
+					{
+						"code": "220622",
+						"name": "靖宇县"
+					},
+					{
+						"code": "220623",
+						"name": "长白朝鲜族自治县"
+					},
+					{
+						"code": "220681",
+						"name": "临江市"
+					}
+				]
+			},
+			{
+				"code": "220700",
+				"name": "松原市",
+				"children": [{
+						"code": "220702",
+						"name": "宁江区"
+					},
+					{
+						"code": "220721",
+						"name": "前郭尔罗斯蒙古族自治县"
+					},
+					{
+						"code": "220722",
+						"name": "长岭县"
+					},
+					{
+						"code": "220723",
+						"name": "乾安县"
+					},
+					{
+						"code": "220781",
+						"name": "扶余市"
+					}
+				]
+			},
+			{
+				"code": "220800",
+				"name": "白城市",
+				"children": [{
+						"code": "220802",
+						"name": "洮北区"
+					},
+					{
+						"code": "220821",
+						"name": "镇赉县"
+					},
+					{
+						"code": "220822",
+						"name": "通榆县"
+					},
+					{
+						"code": "220881",
+						"name": "洮南市"
+					},
+					{
+						"code": "220882",
+						"name": "大安市"
+					}
+				]
+			},
+			{
+				"code": "222400",
+				"name": "延边朝鲜族自治州",
+				"children": [{
+						"code": "222401",
+						"name": "延吉市"
+					},
+					{
+						"code": "222402",
+						"name": "图们市"
+					},
+					{
+						"code": "222403",
+						"name": "敦化市"
+					},
+					{
+						"code": "222404",
+						"name": "珲春市"
+					},
+					{
+						"code": "222405",
+						"name": "龙井市"
+					},
+					{
+						"code": "222406",
+						"name": "和龙市"
+					},
+					{
+						"code": "222424",
+						"name": "汪清县"
+					},
+					{
+						"code": "222426",
+						"name": "安图县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "230000",
+		"name": "黑龙江省",
+		"children": [{
+				"code": "230100",
+				"name": "哈尔滨市",
+				"children": [{
+						"code": "230102",
+						"name": "道里区"
+					},
+					{
+						"code": "230103",
+						"name": "南岗区"
+					},
+					{
+						"code": "230104",
+						"name": "道外区"
+					},
+					{
+						"code": "230108",
+						"name": "平房区"
+					},
+					{
+						"code": "230109",
+						"name": "松北区"
+					},
+					{
+						"code": "230110",
+						"name": "香坊区"
+					},
+					{
+						"code": "230111",
+						"name": "呼兰区"
+					},
+					{
+						"code": "230112",
+						"name": "阿城区"
+					},
+					{
+						"code": "230113",
+						"name": "双城区"
+					},
+					{
+						"code": "230123",
+						"name": "依兰县"
+					},
+					{
+						"code": "230124",
+						"name": "方正县"
+					},
+					{
+						"code": "230125",
+						"name": "宾县"
+					},
+					{
+						"code": "230126",
+						"name": "巴彦县"
+					},
+					{
+						"code": "230127",
+						"name": "木兰县"
+					},
+					{
+						"code": "230128",
+						"name": "通河县"
+					},
+					{
+						"code": "230129",
+						"name": "延寿县"
+					},
+					{
+						"code": "230183",
+						"name": "尚志市"
+					},
+					{
+						"code": "230184",
+						"name": "五常市"
+					}
+				]
+			},
+			{
+				"code": "230200",
+				"name": "齐齐哈尔市",
+				"children": [{
+						"code": "230202",
+						"name": "龙沙区"
+					},
+					{
+						"code": "230203",
+						"name": "建华区"
+					},
+					{
+						"code": "230204",
+						"name": "铁锋区"
+					},
+					{
+						"code": "230205",
+						"name": "昂昂溪区"
+					},
+					{
+						"code": "230206",
+						"name": "富拉尔基区"
+					},
+					{
+						"code": "230207",
+						"name": "碾子山区"
+					},
+					{
+						"code": "230208",
+						"name": "梅里斯达斡尔族区"
+					},
+					{
+						"code": "230221",
+						"name": "龙江县"
+					},
+					{
+						"code": "230223",
+						"name": "依安县"
+					},
+					{
+						"code": "230224",
+						"name": "泰来县"
+					},
+					{
+						"code": "230225",
+						"name": "甘南县"
+					},
+					{
+						"code": "230227",
+						"name": "富裕县"
+					},
+					{
+						"code": "230229",
+						"name": "克山县"
+					},
+					{
+						"code": "230230",
+						"name": "克东县"
+					},
+					{
+						"code": "230231",
+						"name": "拜泉县"
+					},
+					{
+						"code": "230281",
+						"name": "讷河市"
+					}
+				]
+			},
+			{
+				"code": "230300",
+				"name": "鸡西市",
+				"children": [{
+						"code": "230302",
+						"name": "鸡冠区"
+					},
+					{
+						"code": "230303",
+						"name": "恒山区"
+					},
+					{
+						"code": "230304",
+						"name": "滴道区"
+					},
+					{
+						"code": "230305",
+						"name": "梨树区"
+					},
+					{
+						"code": "230306",
+						"name": "城子河区"
+					},
+					{
+						"code": "230307",
+						"name": "麻山区"
+					},
+					{
+						"code": "230321",
+						"name": "鸡东县"
+					},
+					{
+						"code": "230381",
+						"name": "虎林市"
+					},
+					{
+						"code": "230382",
+						"name": "密山市"
+					}
+				]
+			},
+			{
+				"code": "230400",
+				"name": "鹤岗市",
+				"children": [{
+						"code": "230402",
+						"name": "向阳区"
+					},
+					{
+						"code": "230403",
+						"name": "工农区"
+					},
+					{
+						"code": "230404",
+						"name": "南山区"
+					},
+					{
+						"code": "230405",
+						"name": "兴安区"
+					},
+					{
+						"code": "230406",
+						"name": "东山区"
+					},
+					{
+						"code": "230407",
+						"name": "兴山区"
+					},
+					{
+						"code": "230421",
+						"name": "萝北县"
+					},
+					{
+						"code": "230422",
+						"name": "绥滨县"
+					}
+				]
+			},
+			{
+				"code": "230500",
+				"name": "双鸭山市",
+				"children": [{
+						"code": "230502",
+						"name": "尖山区"
+					},
+					{
+						"code": "230503",
+						"name": "岭东区"
+					},
+					{
+						"code": "230505",
+						"name": "四方台区"
+					},
+					{
+						"code": "230506",
+						"name": "宝山区"
+					},
+					{
+						"code": "230521",
+						"name": "集贤县"
+					},
+					{
+						"code": "230522",
+						"name": "友谊县"
+					},
+					{
+						"code": "230523",
+						"name": "宝清县"
+					},
+					{
+						"code": "230524",
+						"name": "饶河县"
+					}
+				]
+			},
+			{
+				"code": "230600",
+				"name": "大庆市",
+				"children": [{
+						"code": "230602",
+						"name": "萨尔图区"
+					},
+					{
+						"code": "230603",
+						"name": "龙凤区"
+					},
+					{
+						"code": "230604",
+						"name": "让胡路区"
+					},
+					{
+						"code": "230605",
+						"name": "红岗区"
+					},
+					{
+						"code": "230606",
+						"name": "大同区"
+					},
+					{
+						"code": "230621",
+						"name": "肇州县"
+					},
+					{
+						"code": "230622",
+						"name": "肇源县"
+					},
+					{
+						"code": "230623",
+						"name": "林甸县"
+					},
+					{
+						"code": "230624",
+						"name": "杜尔伯特蒙古族自治县"
+					}
+				]
+			},
+			{
+				"code": "230700",
+				"name": "伊春市",
+				"children": [{
+						"code": "230702",
+						"name": "伊春区"
+					},
+					{
+						"code": "230703",
+						"name": "南岔区"
+					},
+					{
+						"code": "230704",
+						"name": "友好区"
+					},
+					{
+						"code": "230705",
+						"name": "西林区"
+					},
+					{
+						"code": "230706",
+						"name": "翠峦区"
+					},
+					{
+						"code": "230707",
+						"name": "新青区"
+					},
+					{
+						"code": "230708",
+						"name": "美溪区"
+					},
+					{
+						"code": "230709",
+						"name": "金山屯区"
+					},
+					{
+						"code": "230710",
+						"name": "五营区"
+					},
+					{
+						"code": "230711",
+						"name": "乌马河区"
+					},
+					{
+						"code": "230712",
+						"name": "汤旺河区"
+					},
+					{
+						"code": "230713",
+						"name": "带岭区"
+					},
+					{
+						"code": "230714",
+						"name": "乌伊岭区"
+					},
+					{
+						"code": "230715",
+						"name": "红星区"
+					},
+					{
+						"code": "230716",
+						"name": "上甘岭区"
+					},
+					{
+						"code": "230722",
+						"name": "嘉荫县"
+					},
+					{
+						"code": "230781",
+						"name": "铁力市"
+					}
+				]
+			},
+			{
+				"code": "230800",
+				"name": "佳木斯市",
+				"children": [{
+						"code": "230803",
+						"name": "向阳区"
+					},
+					{
+						"code": "230804",
+						"name": "前进区"
+					},
+					{
+						"code": "230805",
+						"name": "东风区"
+					},
+					{
+						"code": "230811",
+						"name": "郊区"
+					},
+					{
+						"code": "230822",
+						"name": "桦南县"
+					},
+					{
+						"code": "230826",
+						"name": "桦川县"
+					},
+					{
+						"code": "230828",
+						"name": "汤原县"
+					},
+					{
+						"code": "230881",
+						"name": "同江市"
+					},
+					{
+						"code": "230882",
+						"name": "富锦市"
+					},
+					{
+						"code": "230883",
+						"name": "抚远市"
+					}
+				]
+			},
+			{
+				"code": "230900",
+				"name": "七台河市",
+				"children": [{
+						"code": "230902",
+						"name": "新兴区"
+					},
+					{
+						"code": "230903",
+						"name": "桃山区"
+					},
+					{
+						"code": "230904",
+						"name": "茄子河区"
+					},
+					{
+						"code": "230921",
+						"name": "勃利县"
+					}
+				]
+			},
+			{
+				"code": "231000",
+				"name": "牡丹江市",
+				"children": [{
+						"code": "231002",
+						"name": "东安区"
+					},
+					{
+						"code": "231003",
+						"name": "阳明区"
+					},
+					{
+						"code": "231004",
+						"name": "爱民区"
+					},
+					{
+						"code": "231005",
+						"name": "西安区"
+					},
+					{
+						"code": "231025",
+						"name": "林口县"
+					},
+					{
+						"code": "231081",
+						"name": "绥芬河市"
+					},
+					{
+						"code": "231083",
+						"name": "海林市"
+					},
+					{
+						"code": "231084",
+						"name": "宁安市"
+					},
+					{
+						"code": "231085",
+						"name": "穆棱市"
+					},
+					{
+						"code": "231086",
+						"name": "东宁市"
+					}
+				]
+			},
+			{
+				"code": "231100",
+				"name": "黑河市",
+				"children": [{
+						"code": "231102",
+						"name": "爱辉区"
+					},
+					{
+						"code": "231121",
+						"name": "嫩江县"
+					},
+					{
+						"code": "231123",
+						"name": "逊克县"
+					},
+					{
+						"code": "231124",
+						"name": "孙吴县"
+					},
+					{
+						"code": "231181",
+						"name": "北安市"
+					},
+					{
+						"code": "231182",
+						"name": "五大连池市"
+					}
+				]
+			},
+			{
+				"code": "231200",
+				"name": "绥化市",
+				"children": [{
+						"code": "231202",
+						"name": "北林区"
+					},
+					{
+						"code": "231221",
+						"name": "望奎县"
+					},
+					{
+						"code": "231222",
+						"name": "兰西县"
+					},
+					{
+						"code": "231223",
+						"name": "青冈县"
+					},
+					{
+						"code": "231224",
+						"name": "庆安县"
+					},
+					{
+						"code": "231225",
+						"name": "明水县"
+					},
+					{
+						"code": "231226",
+						"name": "绥棱县"
+					},
+					{
+						"code": "231281",
+						"name": "安达市"
+					},
+					{
+						"code": "231282",
+						"name": "肇东市"
+					},
+					{
+						"code": "231283",
+						"name": "海伦市"
+					}
+				]
+			},
+			{
+				"code": "232700",
+				"name": "大兴安岭地区",
+				"children": [{
+						"code": "232701",
+						"name": "漠河市"
+					},
+					{
+						"code": "232721",
+						"name": "呼玛县"
+					},
+					{
+						"code": "232722",
+						"name": "塔河县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "310000",
+		"name": "上海市",
+		"children": [{
+			"code": "310000",
+			"name": "上海市",
+			"children": [{
+					"code": "310101",
+					"name": "黄浦区"
+				},
+				{
+					"code": "310104",
+					"name": "徐汇区"
+				},
+				{
+					"code": "310105",
+					"name": "长宁区"
+				},
+				{
+					"code": "310106",
+					"name": "静安区"
+				},
+				{
+					"code": "310107",
+					"name": "普陀区"
+				},
+				{
+					"code": "310109",
+					"name": "虹口区"
+				},
+				{
+					"code": "310110",
+					"name": "杨浦区"
+				},
+				{
+					"code": "310112",
+					"name": "闵行区"
+				},
+				{
+					"code": "310113",
+					"name": "宝山区"
+				},
+				{
+					"code": "310114",
+					"name": "嘉定区"
+				},
+				{
+					"code": "310115",
+					"name": "浦东新区"
+				},
+				{
+					"code": "310116",
+					"name": "金山区"
+				},
+				{
+					"code": "310117",
+					"name": "松江区"
+				},
+				{
+					"code": "310118",
+					"name": "青浦区"
+				},
+				{
+					"code": "310120",
+					"name": "奉贤区"
+				},
+				{
+					"code": "310151",
+					"name": "崇明区"
+				}
+			]
+		}]
+	},
+	{
+		"code": "320000",
+		"name": "江苏省",
+		"children": [{
+				"code": "320100",
+				"name": "南京市",
+				"children": [{
+						"code": "320102",
+						"name": "玄武区"
+					},
+					{
+						"code": "320104",
+						"name": "秦淮区"
+					},
+					{
+						"code": "320105",
+						"name": "建邺区"
+					},
+					{
+						"code": "320106",
+						"name": "鼓楼区"
+					},
+					{
+						"code": "320111",
+						"name": "浦口区"
+					},
+					{
+						"code": "320113",
+						"name": "栖霞区"
+					},
+					{
+						"code": "320114",
+						"name": "雨花台区"
+					},
+					{
+						"code": "320115",
+						"name": "江宁区"
+					},
+					{
+						"code": "320116",
+						"name": "六合区"
+					},
+					{
+						"code": "320117",
+						"name": "溧水区"
+					},
+					{
+						"code": "320118",
+						"name": "高淳区"
+					}
+				]
+			},
+			{
+				"code": "320200",
+				"name": "无锡市",
+				"children": [{
+						"code": "320205",
+						"name": "锡山区"
+					},
+					{
+						"code": "320206",
+						"name": "惠山区"
+					},
+					{
+						"code": "320211",
+						"name": "滨湖区"
+					},
+					{
+						"code": "320213",
+						"name": "梁溪区"
+					},
+					{
+						"code": "320214",
+						"name": "新吴区"
+					},
+					{
+						"code": "320281",
+						"name": "江阴市"
+					},
+					{
+						"code": "320282",
+						"name": "宜兴市"
+					}
+				]
+			},
+			{
+				"code": "320300",
+				"name": "徐州市",
+				"children": [{
+						"code": "320302",
+						"name": "鼓楼区"
+					},
+					{
+						"code": "320303",
+						"name": "云龙区"
+					},
+					{
+						"code": "320305",
+						"name": "贾汪区"
+					},
+					{
+						"code": "320311",
+						"name": "泉山区"
+					},
+					{
+						"code": "320312",
+						"name": "铜山区"
+					},
+					{
+						"code": "320321",
+						"name": "丰县"
+					},
+					{
+						"code": "320322",
+						"name": "沛县"
+					},
+					{
+						"code": "320324",
+						"name": "睢宁县"
+					},
+					{
+						"code": "320381",
+						"name": "新沂市"
+					},
+					{
+						"code": "320382",
+						"name": "邳州市"
+					}
+				]
+			},
+			{
+				"code": "320400",
+				"name": "常州市",
+				"children": [{
+						"code": "320402",
+						"name": "天宁区"
+					},
+					{
+						"code": "320404",
+						"name": "钟楼区"
+					},
+					{
+						"code": "320411",
+						"name": "新北区"
+					},
+					{
+						"code": "320412",
+						"name": "武进区"
+					},
+					{
+						"code": "320413",
+						"name": "金坛区"
+					},
+					{
+						"code": "320481",
+						"name": "溧阳市"
+					}
+				]
+			},
+			{
+				"code": "320500",
+				"name": "苏州市",
+				"children": [{
+						"code": "320505",
+						"name": "虎丘区"
+					},
+					{
+						"code": "320506",
+						"name": "吴中区"
+					},
+					{
+						"code": "320507",
+						"name": "相城区"
+					},
+					{
+						"code": "320508",
+						"name": "姑苏区"
+					},
+					{
+						"code": "320509",
+						"name": "吴江区"
+					},
+					{
+						"code": "320581",
+						"name": "常熟市"
+					},
+					{
+						"code": "320582",
+						"name": "张家港市"
+					},
+					{
+						"code": "320583",
+						"name": "昆山市"
+					},
+					{
+						"code": "320585",
+						"name": "太仓市"
+					}
+				]
+			},
+			{
+				"code": "320600",
+				"name": "南通市",
+				"children": [{
+						"code": "320602",
+						"name": "崇川区"
+					},
+					{
+						"code": "320611",
+						"name": "港闸区"
+					},
+					{
+						"code": "320612",
+						"name": "通州区"
+					},
+					{
+						"code": "320623",
+						"name": "如东县"
+					},
+					{
+						"code": "320681",
+						"name": "启东市"
+					},
+					{
+						"code": "320682",
+						"name": "如皋市"
+					},
+					{
+						"code": "320684",
+						"name": "海门市"
+					},
+					{
+						"code": "320685",
+						"name": "海安市"
+					}
+				]
+			},
+			{
+				"code": "320700",
+				"name": "连云港市",
+				"children": [{
+						"code": "320703",
+						"name": "连云区"
+					},
+					{
+						"code": "320706",
+						"name": "海州区"
+					},
+					{
+						"code": "320707",
+						"name": "赣榆区"
+					},
+					{
+						"code": "320722",
+						"name": "东海县"
+					},
+					{
+						"code": "320723",
+						"name": "灌云县"
+					},
+					{
+						"code": "320724",
+						"name": "灌南县"
+					}
+				]
+			},
+			{
+				"code": "320800",
+				"name": "淮安市",
+				"children": [{
+						"code": "320803",
+						"name": "淮安区"
+					},
+					{
+						"code": "320804",
+						"name": "淮阴区"
+					},
+					{
+						"code": "320812",
+						"name": "清江浦区"
+					},
+					{
+						"code": "320813",
+						"name": "洪泽区"
+					},
+					{
+						"code": "320826",
+						"name": "涟水县"
+					},
+					{
+						"code": "320830",
+						"name": "盱眙县"
+					},
+					{
+						"code": "320831",
+						"name": "金湖县"
+					}
+				]
+			},
+			{
+				"code": "320900",
+				"name": "盐城市",
+				"children": [{
+						"code": "320902",
+						"name": "亭湖区"
+					},
+					{
+						"code": "320903",
+						"name": "盐都区"
+					},
+					{
+						"code": "320904",
+						"name": "大丰区"
+					},
+					{
+						"code": "320921",
+						"name": "响水县"
+					},
+					{
+						"code": "320922",
+						"name": "滨海县"
+					},
+					{
+						"code": "320923",
+						"name": "阜宁县"
+					},
+					{
+						"code": "320924",
+						"name": "射阳县"
+					},
+					{
+						"code": "320925",
+						"name": "建湖县"
+					},
+					{
+						"code": "320981",
+						"name": "东台市"
+					}
+				]
+			},
+			{
+				"code": "321000",
+				"name": "扬州市",
+				"children": [{
+						"code": "321002",
+						"name": "广陵区"
+					},
+					{
+						"code": "321003",
+						"name": "邗江区"
+					},
+					{
+						"code": "321012",
+						"name": "江都区"
+					},
+					{
+						"code": "321023",
+						"name": "宝应县"
+					},
+					{
+						"code": "321081",
+						"name": "仪征市"
+					},
+					{
+						"code": "321084",
+						"name": "高邮市"
+					}
+				]
+			},
+			{
+				"code": "321100",
+				"name": "镇江市",
+				"children": [{
+						"code": "321102",
+						"name": "京口区"
+					},
+					{
+						"code": "321111",
+						"name": "润州区"
+					},
+					{
+						"code": "321112",
+						"name": "丹徒区"
+					},
+					{
+						"code": "321181",
+						"name": "丹阳市"
+					},
+					{
+						"code": "321182",
+						"name": "扬中市"
+					},
+					{
+						"code": "321183",
+						"name": "句容市"
+					}
+				]
+			},
+			{
+				"code": "321200",
+				"name": "泰州市",
+				"children": [{
+						"code": "321202",
+						"name": "海陵区"
+					},
+					{
+						"code": "321203",
+						"name": "高港区"
+					},
+					{
+						"code": "321204",
+						"name": "姜堰区"
+					},
+					{
+						"code": "321281",
+						"name": "兴化市"
+					},
+					{
+						"code": "321282",
+						"name": "靖江市"
+					},
+					{
+						"code": "321283",
+						"name": "泰兴市"
+					}
+				]
+			},
+			{
+				"code": "321300",
+				"name": "宿迁市",
+				"children": [{
+						"code": "321302",
+						"name": "宿城区"
+					},
+					{
+						"code": "321311",
+						"name": "宿豫区"
+					},
+					{
+						"code": "321322",
+						"name": "沭阳县"
+					},
+					{
+						"code": "321323",
+						"name": "泗阳县"
+					},
+					{
+						"code": "321324",
+						"name": "泗洪县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "330000",
+		"name": "浙江省",
+		"children": [{
+				"code": "330100",
+				"name": "杭州市",
+				"children": [{
+						"code": "330102",
+						"name": "上城区"
+					},
+					{
+						"code": "330103",
+						"name": "下城区"
+					},
+					{
+						"code": "330104",
+						"name": "江干区"
+					},
+					{
+						"code": "330105",
+						"name": "拱墅区"
+					},
+					{
+						"code": "330106",
+						"name": "西湖区"
+					},
+					{
+						"code": "330108",
+						"name": "滨江区"
+					},
+					{
+						"code": "330109",
+						"name": "萧山区"
+					},
+					{
+						"code": "330110",
+						"name": "余杭区"
+					},
+					{
+						"code": "330111",
+						"name": "富阳区"
+					},
+					{
+						"code": "330112",
+						"name": "临安区"
+					},
+					{
+						"code": "330122",
+						"name": "桐庐县"
+					},
+					{
+						"code": "330127",
+						"name": "淳安县"
+					},
+					{
+						"code": "330182",
+						"name": "建德市"
+					}
+				]
+			},
+			{
+				"code": "330200",
+				"name": "宁波市",
+				"children": [{
+						"code": "330203",
+						"name": "海曙区"
+					},
+					{
+						"code": "330205",
+						"name": "江北区"
+					},
+					{
+						"code": "330206",
+						"name": "北仑区"
+					},
+					{
+						"code": "330211",
+						"name": "镇海区"
+					},
+					{
+						"code": "330212",
+						"name": "鄞州区"
+					},
+					{
+						"code": "330213",
+						"name": "奉化区"
+					},
+					{
+						"code": "330225",
+						"name": "象山县"
+					},
+					{
+						"code": "330226",
+						"name": "宁海县"
+					},
+					{
+						"code": "330281",
+						"name": "余姚市"
+					},
+					{
+						"code": "330282",
+						"name": "慈溪市"
+					}
+				]
+			},
+			{
+				"code": "330300",
+				"name": "温州市",
+				"children": [{
+						"code": "330302",
+						"name": "鹿城区"
+					},
+					{
+						"code": "330303",
+						"name": "龙湾区"
+					},
+					{
+						"code": "330304",
+						"name": "瓯海区"
+					},
+					{
+						"code": "330305",
+						"name": "洞头区"
+					},
+					{
+						"code": "330324",
+						"name": "永嘉县"
+					},
+					{
+						"code": "330326",
+						"name": "平阳县"
+					},
+					{
+						"code": "330327",
+						"name": "苍南县"
+					},
+					{
+						"code": "330328",
+						"name": "文成县"
+					},
+					{
+						"code": "330329",
+						"name": "泰顺县"
+					},
+					{
+						"code": "330381",
+						"name": "瑞安市"
+					},
+					{
+						"code": "330382",
+						"name": "乐清市"
+					}
+				]
+			},
+			{
+				"code": "330400",
+				"name": "嘉兴市",
+				"children": [{
+						"code": "330402",
+						"name": "南湖区"
+					},
+					{
+						"code": "330411",
+						"name": "秀洲区"
+					},
+					{
+						"code": "330421",
+						"name": "嘉善县"
+					},
+					{
+						"code": "330424",
+						"name": "海盐县"
+					},
+					{
+						"code": "330481",
+						"name": "海宁市"
+					},
+					{
+						"code": "330482",
+						"name": "平湖市"
+					},
+					{
+						"code": "330483",
+						"name": "桐乡市"
+					}
+				]
+			},
+			{
+				"code": "330500",
+				"name": "湖州市",
+				"children": [{
+						"code": "330502",
+						"name": "吴兴区"
+					},
+					{
+						"code": "330503",
+						"name": "南浔区"
+					},
+					{
+						"code": "330521",
+						"name": "德清县"
+					},
+					{
+						"code": "330522",
+						"name": "长兴县"
+					},
+					{
+						"code": "330523",
+						"name": "安吉县"
+					}
+				]
+			},
+			{
+				"code": "330600",
+				"name": "绍兴市",
+				"children": [{
+						"code": "330602",
+						"name": "越城区"
+					},
+					{
+						"code": "330603",
+						"name": "柯桥区"
+					},
+					{
+						"code": "330604",
+						"name": "上虞区"
+					},
+					{
+						"code": "330624",
+						"name": "新昌县"
+					},
+					{
+						"code": "330681",
+						"name": "诸暨市"
+					},
+					{
+						"code": "330683",
+						"name": "嵊州市"
+					}
+				]
+			},
+			{
+				"code": "330700",
+				"name": "金华市",
+				"children": [{
+						"code": "330702",
+						"name": "婺城区"
+					},
+					{
+						"code": "330703",
+						"name": "金东区"
+					},
+					{
+						"code": "330723",
+						"name": "武义县"
+					},
+					{
+						"code": "330726",
+						"name": "浦江县"
+					},
+					{
+						"code": "330727",
+						"name": "磐安县"
+					},
+					{
+						"code": "330781",
+						"name": "兰溪市"
+					},
+					{
+						"code": "330782",
+						"name": "义乌市"
+					},
+					{
+						"code": "330783",
+						"name": "东阳市"
+					},
+					{
+						"code": "330784",
+						"name": "永康市"
+					}
+				]
+			},
+			{
+				"code": "330800",
+				"name": "衢州市",
+				"children": [{
+						"code": "330802",
+						"name": "柯城区"
+					},
+					{
+						"code": "330803",
+						"name": "衢江区"
+					},
+					{
+						"code": "330822",
+						"name": "常山县"
+					},
+					{
+						"code": "330824",
+						"name": "开化县"
+					},
+					{
+						"code": "330825",
+						"name": "龙游县"
+					},
+					{
+						"code": "330881",
+						"name": "江山市"
+					}
+				]
+			},
+			{
+				"code": "330900",
+				"name": "舟山市",
+				"children": [{
+						"code": "330902",
+						"name": "定海区"
+					},
+					{
+						"code": "330903",
+						"name": "普陀区"
+					},
+					{
+						"code": "330921",
+						"name": "岱山县"
+					},
+					{
+						"code": "330922",
+						"name": "嵊泗县"
+					}
+				]
+			},
+			{
+				"code": "331000",
+				"name": "台州市",
+				"children": [{
+						"code": "331002",
+						"name": "椒江区"
+					},
+					{
+						"code": "331003",
+						"name": "黄岩区"
+					},
+					{
+						"code": "331004",
+						"name": "路桥区"
+					},
+					{
+						"code": "331022",
+						"name": "三门县"
+					},
+					{
+						"code": "331023",
+						"name": "天台县"
+					},
+					{
+						"code": "331024",
+						"name": "仙居县"
+					},
+					{
+						"code": "331081",
+						"name": "温岭市"
+					},
+					{
+						"code": "331082",
+						"name": "临海市"
+					},
+					{
+						"code": "331083",
+						"name": "玉环市"
+					}
+				]
+			},
+			{
+				"code": "331100",
+				"name": "丽水市",
+				"children": [{
+						"code": "331102",
+						"name": "莲都区"
+					},
+					{
+						"code": "331121",
+						"name": "青田县"
+					},
+					{
+						"code": "331122",
+						"name": "缙云县"
+					},
+					{
+						"code": "331123",
+						"name": "遂昌县"
+					},
+					{
+						"code": "331124",
+						"name": "松阳县"
+					},
+					{
+						"code": "331125",
+						"name": "云和县"
+					},
+					{
+						"code": "331126",
+						"name": "庆元县"
+					},
+					{
+						"code": "331127",
+						"name": "景宁畲族自治县"
+					},
+					{
+						"code": "331181",
+						"name": "龙泉市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "340000",
+		"name": "安徽省",
+		"children": [{
+				"code": "340100",
+				"name": "合肥市",
+				"children": [{
+						"code": "340102",
+						"name": "瑶海区"
+					},
+					{
+						"code": "340103",
+						"name": "庐阳区"
+					},
+					{
+						"code": "340104",
+						"name": "蜀山区"
+					},
+					{
+						"code": "340111",
+						"name": "包河区"
+					},
+					{
+						"code": "340121",
+						"name": "长丰县"
+					},
+					{
+						"code": "340122",
+						"name": "肥东县"
+					},
+					{
+						"code": "340123",
+						"name": "肥西县"
+					},
+					{
+						"code": "340124",
+						"name": "庐江县"
+					},
+					{
+						"code": "340181",
+						"name": "巢湖市"
+					}
+				]
+			},
+			{
+				"code": "340200",
+				"name": "芜湖市",
+				"children": [{
+						"code": "340202",
+						"name": "镜湖区"
+					},
+					{
+						"code": "340203",
+						"name": "弋江区"
+					},
+					{
+						"code": "340207",
+						"name": "鸠江区"
+					},
+					{
+						"code": "340208",
+						"name": "三山区"
+					},
+					{
+						"code": "340221",
+						"name": "芜湖县"
+					},
+					{
+						"code": "340222",
+						"name": "繁昌县"
+					},
+					{
+						"code": "340223",
+						"name": "南陵县"
+					},
+					{
+						"code": "340225",
+						"name": "无为县"
+					}
+				]
+			},
+			{
+				"code": "340300",
+				"name": "蚌埠市",
+				"children": [{
+						"code": "340302",
+						"name": "龙子湖区"
+					},
+					{
+						"code": "340303",
+						"name": "蚌山区"
+					},
+					{
+						"code": "340304",
+						"name": "禹会区"
+					},
+					{
+						"code": "340311",
+						"name": "淮上区"
+					},
+					{
+						"code": "340321",
+						"name": "怀远县"
+					},
+					{
+						"code": "340322",
+						"name": "五河县"
+					},
+					{
+						"code": "340323",
+						"name": "固镇县"
+					}
+				]
+			},
+			{
+				"code": "340400",
+				"name": "淮南市",
+				"children": [{
+						"code": "340402",
+						"name": "大通区"
+					},
+					{
+						"code": "340403",
+						"name": "田家庵区"
+					},
+					{
+						"code": "340404",
+						"name": "谢家集区"
+					},
+					{
+						"code": "340405",
+						"name": "八公山区"
+					},
+					{
+						"code": "340406",
+						"name": "潘集区"
+					},
+					{
+						"code": "340421",
+						"name": "凤台县"
+					},
+					{
+						"code": "340422",
+						"name": "寿县"
+					}
+				]
+			},
+			{
+				"code": "340500",
+				"name": "马鞍山市",
+				"children": [{
+						"code": "340503",
+						"name": "花山区"
+					},
+					{
+						"code": "340504",
+						"name": "雨山区"
+					},
+					{
+						"code": "340506",
+						"name": "博望区"
+					},
+					{
+						"code": "340521",
+						"name": "当涂县"
+					},
+					{
+						"code": "340522",
+						"name": "含山县"
+					},
+					{
+						"code": "340523",
+						"name": "和县"
+					}
+				]
+			},
+			{
+				"code": "340600",
+				"name": "淮北市",
+				"children": [{
+						"code": "340602",
+						"name": "杜集区"
+					},
+					{
+						"code": "340603",
+						"name": "相山区"
+					},
+					{
+						"code": "340604",
+						"name": "烈山区"
+					},
+					{
+						"code": "340621",
+						"name": "濉溪县"
+					}
+				]
+			},
+			{
+				"code": "340700",
+				"name": "铜陵市",
+				"children": [{
+						"code": "340705",
+						"name": "铜官区"
+					},
+					{
+						"code": "340706",
+						"name": "义安区"
+					},
+					{
+						"code": "340711",
+						"name": "郊区"
+					},
+					{
+						"code": "340722",
+						"name": "枞阳县"
+					}
+				]
+			},
+			{
+				"code": "340800",
+				"name": "安庆市",
+				"children": [{
+						"code": "340802",
+						"name": "迎江区"
+					},
+					{
+						"code": "340803",
+						"name": "大观区"
+					},
+					{
+						"code": "340811",
+						"name": "宜秀区"
+					},
+					{
+						"code": "340822",
+						"name": "怀宁县"
+					},
+					{
+						"code": "340824",
+						"name": "潜山县"
+					},
+					{
+						"code": "340825",
+						"name": "太湖县"
+					},
+					{
+						"code": "340826",
+						"name": "宿松县"
+					},
+					{
+						"code": "340827",
+						"name": "望江县"
+					},
+					{
+						"code": "340828",
+						"name": "岳西县"
+					},
+					{
+						"code": "340881",
+						"name": "桐城市"
+					}
+				]
+			},
+			{
+				"code": "341000",
+				"name": "黄山市",
+				"children": [{
+						"code": "341002",
+						"name": "屯溪区"
+					},
+					{
+						"code": "341003",
+						"name": "黄山区"
+					},
+					{
+						"code": "341004",
+						"name": "徽州区"
+					},
+					{
+						"code": "341021",
+						"name": "歙县"
+					},
+					{
+						"code": "341022",
+						"name": "休宁县"
+					},
+					{
+						"code": "341023",
+						"name": "黟县"
+					},
+					{
+						"code": "341024",
+						"name": "祁门县"
+					}
+				]
+			},
+			{
+				"code": "341100",
+				"name": "滁州市",
+				"children": [{
+						"code": "341102",
+						"name": "琅琊区"
+					},
+					{
+						"code": "341103",
+						"name": "南谯区"
+					},
+					{
+						"code": "341122",
+						"name": "来安县"
+					},
+					{
+						"code": "341124",
+						"name": "全椒县"
+					},
+					{
+						"code": "341125",
+						"name": "定远县"
+					},
+					{
+						"code": "341126",
+						"name": "凤阳县"
+					},
+					{
+						"code": "341181",
+						"name": "天长市"
+					},
+					{
+						"code": "341182",
+						"name": "明光市"
+					}
+				]
+			},
+			{
+				"code": "341200",
+				"name": "阜阳市",
+				"children": [{
+						"code": "341202",
+						"name": "颍州区"
+					},
+					{
+						"code": "341203",
+						"name": "颍东区"
+					},
+					{
+						"code": "341204",
+						"name": "颍泉区"
+					},
+					{
+						"code": "341221",
+						"name": "临泉县"
+					},
+					{
+						"code": "341222",
+						"name": "太和县"
+					},
+					{
+						"code": "341225",
+						"name": "阜南县"
+					},
+					{
+						"code": "341226",
+						"name": "颍上县"
+					},
+					{
+						"code": "341282",
+						"name": "界首市"
+					}
+				]
+			},
+			{
+				"code": "341300",
+				"name": "宿州市",
+				"children": [{
+						"code": "341302",
+						"name": "埇桥区"
+					},
+					{
+						"code": "341321",
+						"name": "砀山县"
+					},
+					{
+						"code": "341322",
+						"name": "萧县"
+					},
+					{
+						"code": "341323",
+						"name": "灵璧县"
+					},
+					{
+						"code": "341324",
+						"name": "泗县"
+					}
+				]
+			},
+			{
+				"code": "341500",
+				"name": "六安市",
+				"children": [{
+						"code": "341502",
+						"name": "金安区"
+					},
+					{
+						"code": "341503",
+						"name": "裕安区"
+					},
+					{
+						"code": "341504",
+						"name": "叶集区"
+					},
+					{
+						"code": "341522",
+						"name": "霍邱县"
+					},
+					{
+						"code": "341523",
+						"name": "舒城县"
+					},
+					{
+						"code": "341524",
+						"name": "金寨县"
+					},
+					{
+						"code": "341525",
+						"name": "霍山县"
+					}
+				]
+			},
+			{
+				"code": "341600",
+				"name": "亳州市",
+				"children": [{
+						"code": "341602",
+						"name": "谯城区"
+					},
+					{
+						"code": "341621",
+						"name": "涡阳县"
+					},
+					{
+						"code": "341622",
+						"name": "蒙城县"
+					},
+					{
+						"code": "341623",
+						"name": "利辛县"
+					}
+				]
+			},
+			{
+				"code": "341700",
+				"name": "池州市",
+				"children": [{
+						"code": "341702",
+						"name": "贵池区"
+					},
+					{
+						"code": "341721",
+						"name": "东至县"
+					},
+					{
+						"code": "341722",
+						"name": "石台县"
+					},
+					{
+						"code": "341723",
+						"name": "青阳县"
+					}
+				]
+			},
+			{
+				"code": "341800",
+				"name": "宣城市",
+				"children": [{
+						"code": "341802",
+						"name": "宣州区"
+					},
+					{
+						"code": "341821",
+						"name": "郎溪县"
+					},
+					{
+						"code": "341822",
+						"name": "广德县"
+					},
+					{
+						"code": "341823",
+						"name": "泾县"
+					},
+					{
+						"code": "341824",
+						"name": "绩溪县"
+					},
+					{
+						"code": "341825",
+						"name": "旌德县"
+					},
+					{
+						"code": "341881",
+						"name": "宁国市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "350000",
+		"name": "福建省",
+		"children": [{
+				"code": "350100",
+				"name": "福州市",
+				"children": [{
+						"code": "350102",
+						"name": "鼓楼区"
+					},
+					{
+						"code": "350103",
+						"name": "台江区"
+					},
+					{
+						"code": "350104",
+						"name": "仓山区"
+					},
+					{
+						"code": "350105",
+						"name": "马尾区"
+					},
+					{
+						"code": "350111",
+						"name": "晋安区"
+					},
+					{
+						"code": "350112",
+						"name": "长乐区"
+					},
+					{
+						"code": "350121",
+						"name": "闽侯县"
+					},
+					{
+						"code": "350122",
+						"name": "连江县"
+					},
+					{
+						"code": "350123",
+						"name": "罗源县"
+					},
+					{
+						"code": "350124",
+						"name": "闽清县"
+					},
+					{
+						"code": "350125",
+						"name": "永泰县"
+					},
+					{
+						"code": "350128",
+						"name": "平潭县"
+					},
+					{
+						"code": "350181",
+						"name": "福清市"
+					}
+				]
+			},
+			{
+				"code": "350200",
+				"name": "厦门市",
+				"children": [{
+						"code": "350203",
+						"name": "思明区"
+					},
+					{
+						"code": "350205",
+						"name": "海沧区"
+					},
+					{
+						"code": "350206",
+						"name": "湖里区"
+					},
+					{
+						"code": "350211",
+						"name": "集美区"
+					},
+					{
+						"code": "350212",
+						"name": "同安区"
+					},
+					{
+						"code": "350213",
+						"name": "翔安区"
+					}
+				]
+			},
+			{
+				"code": "350300",
+				"name": "莆田市",
+				"children": [{
+						"code": "350302",
+						"name": "城厢区"
+					},
+					{
+						"code": "350303",
+						"name": "涵江区"
+					},
+					{
+						"code": "350304",
+						"name": "荔城区"
+					},
+					{
+						"code": "350305",
+						"name": "秀屿区"
+					},
+					{
+						"code": "350322",
+						"name": "仙游县"
+					}
+				]
+			},
+			{
+				"code": "350400",
+				"name": "三明市",
+				"children": [{
+						"code": "350402",
+						"name": "梅列区"
+					},
+					{
+						"code": "350403",
+						"name": "三元区"
+					},
+					{
+						"code": "350421",
+						"name": "明溪县"
+					},
+					{
+						"code": "350423",
+						"name": "清流县"
+					},
+					{
+						"code": "350424",
+						"name": "宁化县"
+					},
+					{
+						"code": "350425",
+						"name": "大田县"
+					},
+					{
+						"code": "350426",
+						"name": "尤溪县"
+					},
+					{
+						"code": "350427",
+						"name": "沙县"
+					},
+					{
+						"code": "350428",
+						"name": "将乐县"
+					},
+					{
+						"code": "350429",
+						"name": "泰宁县"
+					},
+					{
+						"code": "350430",
+						"name": "建宁县"
+					},
+					{
+						"code": "350481",
+						"name": "永安市"
+					}
+				]
+			},
+			{
+				"code": "350500",
+				"name": "泉州市",
+				"children": [{
+						"code": "350502",
+						"name": "鲤城区"
+					},
+					{
+						"code": "350503",
+						"name": "丰泽区"
+					},
+					{
+						"code": "350504",
+						"name": "洛江区"
+					},
+					{
+						"code": "350505",
+						"name": "泉港区"
+					},
+					{
+						"code": "350521",
+						"name": "惠安县"
+					},
+					{
+						"code": "350524",
+						"name": "安溪县"
+					},
+					{
+						"code": "350525",
+						"name": "永春县"
+					},
+					{
+						"code": "350526",
+						"name": "德化县"
+					},
+					{
+						"code": "350527",
+						"name": "金门县"
+					},
+					{
+						"code": "350581",
+						"name": "石狮市"
+					},
+					{
+						"code": "350582",
+						"name": "晋江市"
+					},
+					{
+						"code": "350583",
+						"name": "南安市"
+					}
+				]
+			},
+			{
+				"code": "350600",
+				"name": "漳州市",
+				"children": [{
+						"code": "350602",
+						"name": "芗城区"
+					},
+					{
+						"code": "350603",
+						"name": "龙文区"
+					},
+					{
+						"code": "350622",
+						"name": "云霄县"
+					},
+					{
+						"code": "350623",
+						"name": "漳浦县"
+					},
+					{
+						"code": "350624",
+						"name": "诏安县"
+					},
+					{
+						"code": "350625",
+						"name": "长泰县"
+					},
+					{
+						"code": "350626",
+						"name": "东山县"
+					},
+					{
+						"code": "350627",
+						"name": "南靖县"
+					},
+					{
+						"code": "350628",
+						"name": "平和县"
+					},
+					{
+						"code": "350629",
+						"name": "华安县"
+					},
+					{
+						"code": "350681",
+						"name": "龙海市"
+					}
+				]
+			},
+			{
+				"code": "350700",
+				"name": "南平市",
+				"children": [{
+						"code": "350702",
+						"name": "延平区"
+					},
+					{
+						"code": "350703",
+						"name": "建阳区"
+					},
+					{
+						"code": "350721",
+						"name": "顺昌县"
+					},
+					{
+						"code": "350722",
+						"name": "浦城县"
+					},
+					{
+						"code": "350723",
+						"name": "光泽县"
+					},
+					{
+						"code": "350724",
+						"name": "松溪县"
+					},
+					{
+						"code": "350725",
+						"name": "政和县"
+					},
+					{
+						"code": "350781",
+						"name": "邵武市"
+					},
+					{
+						"code": "350782",
+						"name": "武夷山市"
+					},
+					{
+						"code": "350783",
+						"name": "建瓯市"
+					}
+				]
+			},
+			{
+				"code": "350800",
+				"name": "龙岩市",
+				"children": [{
+						"code": "350802",
+						"name": "新罗区"
+					},
+					{
+						"code": "350803",
+						"name": "永定区"
+					},
+					{
+						"code": "350821",
+						"name": "长汀县"
+					},
+					{
+						"code": "350823",
+						"name": "上杭县"
+					},
+					{
+						"code": "350824",
+						"name": "武平县"
+					},
+					{
+						"code": "350825",
+						"name": "连城县"
+					},
+					{
+						"code": "350881",
+						"name": "漳平市"
+					}
+				]
+			},
+			{
+				"code": "350900",
+				"name": "宁德市",
+				"children": [{
+						"code": "350902",
+						"name": "蕉城区"
+					},
+					{
+						"code": "350921",
+						"name": "霞浦县"
+					},
+					{
+						"code": "350922",
+						"name": "古田县"
+					},
+					{
+						"code": "350923",
+						"name": "屏南县"
+					},
+					{
+						"code": "350924",
+						"name": "寿宁县"
+					},
+					{
+						"code": "350925",
+						"name": "周宁县"
+					},
+					{
+						"code": "350926",
+						"name": "柘荣县"
+					},
+					{
+						"code": "350981",
+						"name": "福安市"
+					},
+					{
+						"code": "350982",
+						"name": "福鼎市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "360000",
+		"name": "江西省",
+		"children": [{
+				"code": "360100",
+				"name": "南昌市",
+				"children": [{
+						"code": "360102",
+						"name": "东湖区"
+					},
+					{
+						"code": "360103",
+						"name": "西湖区"
+					},
+					{
+						"code": "360104",
+						"name": "青云谱区"
+					},
+					{
+						"code": "360105",
+						"name": "湾里区"
+					},
+					{
+						"code": "360111",
+						"name": "青山湖区"
+					},
+					{
+						"code": "360112",
+						"name": "新建区"
+					},
+					{
+						"code": "360121",
+						"name": "南昌县"
+					},
+					{
+						"code": "360123",
+						"name": "安义县"
+					},
+					{
+						"code": "360124",
+						"name": "进贤县"
+					}
+				]
+			},
+			{
+				"code": "360200",
+				"name": "景德镇市",
+				"children": [{
+						"code": "360202",
+						"name": "昌江区"
+					},
+					{
+						"code": "360203",
+						"name": "珠山区"
+					},
+					{
+						"code": "360222",
+						"name": "浮梁县"
+					},
+					{
+						"code": "360281",
+						"name": "乐平市"
+					}
+				]
+			},
+			{
+				"code": "360300",
+				"name": "萍乡市",
+				"children": [{
+						"code": "360302",
+						"name": "安源区"
+					},
+					{
+						"code": "360313",
+						"name": "湘东区"
+					},
+					{
+						"code": "360321",
+						"name": "莲花县"
+					},
+					{
+						"code": "360322",
+						"name": "上栗县"
+					},
+					{
+						"code": "360323",
+						"name": "芦溪县"
+					}
+				]
+			},
+			{
+				"code": "360400",
+				"name": "九江市",
+				"children": [{
+						"code": "360402",
+						"name": "濂溪区"
+					},
+					{
+						"code": "360403",
+						"name": "浔阳区"
+					},
+					{
+						"code": "360404",
+						"name": "柴桑区"
+					},
+					{
+						"code": "360423",
+						"name": "武宁县"
+					},
+					{
+						"code": "360424",
+						"name": "修水县"
+					},
+					{
+						"code": "360425",
+						"name": "永修县"
+					},
+					{
+						"code": "360426",
+						"name": "德安县"
+					},
+					{
+						"code": "360428",
+						"name": "都昌县"
+					},
+					{
+						"code": "360429",
+						"name": "湖口县"
+					},
+					{
+						"code": "360430",
+						"name": "彭泽县"
+					},
+					{
+						"code": "360481",
+						"name": "瑞昌市"
+					},
+					{
+						"code": "360482",
+						"name": "共青城市"
+					},
+					{
+						"code": "360483",
+						"name": "庐山市"
+					}
+				]
+			},
+			{
+				"code": "360500",
+				"name": "新余市",
+				"children": [{
+						"code": "360502",
+						"name": "渝水区"
+					},
+					{
+						"code": "360521",
+						"name": "分宜县"
+					}
+				]
+			},
+			{
+				"code": "360600",
+				"name": "鹰潭市",
+				"children": [{
+						"code": "360602",
+						"name": "月湖区"
+					},
+					{
+						"code": "360603",
+						"name": "余江区"
+					},
+					{
+						"code": "360681",
+						"name": "贵溪市"
+					}
+				]
+			},
+			{
+				"code": "360700",
+				"name": "赣州市",
+				"children": [{
+						"code": "360702",
+						"name": "章贡区"
+					},
+					{
+						"code": "360703",
+						"name": "南康区"
+					},
+					{
+						"code": "360704",
+						"name": "赣县区"
+					},
+					{
+						"code": "360722",
+						"name": "信丰县"
+					},
+					{
+						"code": "360723",
+						"name": "大余县"
+					},
+					{
+						"code": "360724",
+						"name": "上犹县"
+					},
+					{
+						"code": "360725",
+						"name": "崇义县"
+					},
+					{
+						"code": "360726",
+						"name": "安远县"
+					},
+					{
+						"code": "360727",
+						"name": "龙南县"
+					},
+					{
+						"code": "360728",
+						"name": "定南县"
+					},
+					{
+						"code": "360729",
+						"name": "全南县"
+					},
+					{
+						"code": "360730",
+						"name": "宁都县"
+					},
+					{
+						"code": "360731",
+						"name": "于都县"
+					},
+					{
+						"code": "360732",
+						"name": "兴国县"
+					},
+					{
+						"code": "360733",
+						"name": "会昌县"
+					},
+					{
+						"code": "360734",
+						"name": "寻乌县"
+					},
+					{
+						"code": "360735",
+						"name": "石城县"
+					},
+					{
+						"code": "360781",
+						"name": "瑞金市"
+					}
+				]
+			},
+			{
+				"code": "360800",
+				"name": "吉安市",
+				"children": [{
+						"code": "360802",
+						"name": "吉州区"
+					},
+					{
+						"code": "360803",
+						"name": "青原区"
+					},
+					{
+						"code": "360821",
+						"name": "吉安县"
+					},
+					{
+						"code": "360822",
+						"name": "吉水县"
+					},
+					{
+						"code": "360823",
+						"name": "峡江县"
+					},
+					{
+						"code": "360824",
+						"name": "新干县"
+					},
+					{
+						"code": "360825",
+						"name": "永丰县"
+					},
+					{
+						"code": "360826",
+						"name": "泰和县"
+					},
+					{
+						"code": "360827",
+						"name": "遂川县"
+					},
+					{
+						"code": "360828",
+						"name": "万安县"
+					},
+					{
+						"code": "360829",
+						"name": "安福县"
+					},
+					{
+						"code": "360830",
+						"name": "永新县"
+					},
+					{
+						"code": "360881",
+						"name": "井冈山市"
+					}
+				]
+			},
+			{
+				"code": "360900",
+				"name": "宜春市",
+				"children": [{
+						"code": "360902",
+						"name": "袁州区"
+					},
+					{
+						"code": "360921",
+						"name": "奉新县"
+					},
+					{
+						"code": "360922",
+						"name": "万载县"
+					},
+					{
+						"code": "360923",
+						"name": "上高县"
+					},
+					{
+						"code": "360924",
+						"name": "宜丰县"
+					},
+					{
+						"code": "360925",
+						"name": "靖安县"
+					},
+					{
+						"code": "360926",
+						"name": "铜鼓县"
+					},
+					{
+						"code": "360981",
+						"name": "丰城市"
+					},
+					{
+						"code": "360982",
+						"name": "樟树市"
+					},
+					{
+						"code": "360983",
+						"name": "高安市"
+					}
+				]
+			},
+			{
+				"code": "361000",
+				"name": "抚州市",
+				"children": [{
+						"code": "361002",
+						"name": "临川区"
+					},
+					{
+						"code": "361003",
+						"name": "东乡区"
+					},
+					{
+						"code": "361021",
+						"name": "南城县"
+					},
+					{
+						"code": "361022",
+						"name": "黎川县"
+					},
+					{
+						"code": "361023",
+						"name": "南丰县"
+					},
+					{
+						"code": "361024",
+						"name": "崇仁县"
+					},
+					{
+						"code": "361025",
+						"name": "乐安县"
+					},
+					{
+						"code": "361026",
+						"name": "宜黄县"
+					},
+					{
+						"code": "361027",
+						"name": "金溪县"
+					},
+					{
+						"code": "361028",
+						"name": "资溪县"
+					},
+					{
+						"code": "361030",
+						"name": "广昌县"
+					}
+				]
+			},
+			{
+				"code": "361100",
+				"name": "上饶市",
+				"children": [{
+						"code": "361102",
+						"name": "信州区"
+					},
+					{
+						"code": "361103",
+						"name": "广丰区"
+					},
+					{
+						"code": "361121",
+						"name": "上饶县"
+					},
+					{
+						"code": "361123",
+						"name": "玉山县"
+					},
+					{
+						"code": "361124",
+						"name": "铅山县"
+					},
+					{
+						"code": "361125",
+						"name": "横峰县"
+					},
+					{
+						"code": "361126",
+						"name": "弋阳县"
+					},
+					{
+						"code": "361127",
+						"name": "余干县"
+					},
+					{
+						"code": "361128",
+						"name": "鄱阳县"
+					},
+					{
+						"code": "361129",
+						"name": "万年县"
+					},
+					{
+						"code": "361130",
+						"name": "婺源县"
+					},
+					{
+						"code": "361181",
+						"name": "德兴市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "370000",
+		"name": "山东省",
+		"children": [{
+				"code": "370100",
+				"name": "济南市",
+				"children": [{
+						"code": "370102",
+						"name": "历下区"
+					},
+					{
+						"code": "370103",
+						"name": "市中区"
+					},
+					{
+						"code": "370104",
+						"name": "槐荫区"
+					},
+					{
+						"code": "370105",
+						"name": "天桥区"
+					},
+					{
+						"code": "370112",
+						"name": "历城区"
+					},
+					{
+						"code": "370113",
+						"name": "长清区"
+					},
+					{
+						"code": "370114",
+						"name": "章丘区"
+					},
+					{
+						"code": "370124",
+						"name": "平阴县"
+					},
+					{
+						"code": "370125",
+						"name": "济阳县"
+					},
+					{
+						"code": "370126",
+						"name": "商河县"
+					}
+				]
+			},
+			{
+				"code": "370200",
+				"name": "青岛市",
+				"children": [{
+						"code": "370202",
+						"name": "市南区"
+					},
+					{
+						"code": "370203",
+						"name": "市北区"
+					},
+					{
+						"code": "370211",
+						"name": "黄岛区"
+					},
+					{
+						"code": "370212",
+						"name": "崂山区"
+					},
+					{
+						"code": "370213",
+						"name": "李沧区"
+					},
+					{
+						"code": "370214",
+						"name": "城阳区"
+					},
+					{
+						"code": "370215",
+						"name": "即墨区"
+					},
+					{
+						"code": "370281",
+						"name": "胶州市"
+					},
+					{
+						"code": "370283",
+						"name": "平度市"
+					},
+					{
+						"code": "370285",
+						"name": "莱西市"
+					}
+				]
+			},
+			{
+				"code": "370300",
+				"name": "淄博市",
+				"children": [{
+						"code": "370302",
+						"name": "淄川区"
+					},
+					{
+						"code": "370303",
+						"name": "张店区"
+					},
+					{
+						"code": "370304",
+						"name": "博山区"
+					},
+					{
+						"code": "370305",
+						"name": "临淄区"
+					},
+					{
+						"code": "370306",
+						"name": "周村区"
+					},
+					{
+						"code": "370321",
+						"name": "桓台县"
+					},
+					{
+						"code": "370322",
+						"name": "高青县"
+					},
+					{
+						"code": "370323",
+						"name": "沂源县"
+					}
+				]
+			},
+			{
+				"code": "370400",
+				"name": "枣庄市",
+				"children": [{
+						"code": "370402",
+						"name": "市中区"
+					},
+					{
+						"code": "370403",
+						"name": "薛城区"
+					},
+					{
+						"code": "370404",
+						"name": "峄城区"
+					},
+					{
+						"code": "370405",
+						"name": "台儿庄区"
+					},
+					{
+						"code": "370406",
+						"name": "山亭区"
+					},
+					{
+						"code": "370481",
+						"name": "滕州市"
+					}
+				]
+			},
+			{
+				"code": "370500",
+				"name": "东营市",
+				"children": [{
+						"code": "370502",
+						"name": "东营区"
+					},
+					{
+						"code": "370503",
+						"name": "河口区"
+					},
+					{
+						"code": "370505",
+						"name": "垦利区"
+					},
+					{
+						"code": "370522",
+						"name": "利津县"
+					},
+					{
+						"code": "370523",
+						"name": "广饶县"
+					}
+				]
+			},
+			{
+				"code": "370600",
+				"name": "烟台市",
+				"children": [{
+						"code": "370602",
+						"name": "芝罘区"
+					},
+					{
+						"code": "370611",
+						"name": "福山区"
+					},
+					{
+						"code": "370612",
+						"name": "牟平区"
+					},
+					{
+						"code": "370613",
+						"name": "莱山区"
+					},
+					{
+						"code": "370634",
+						"name": "长岛县"
+					},
+					{
+						"code": "370681",
+						"name": "龙口市"
+					},
+					{
+						"code": "370682",
+						"name": "莱阳市"
+					},
+					{
+						"code": "370683",
+						"name": "莱州市"
+					},
+					{
+						"code": "370684",
+						"name": "蓬莱市"
+					},
+					{
+						"code": "370685",
+						"name": "招远市"
+					},
+					{
+						"code": "370686",
+						"name": "栖霞市"
+					},
+					{
+						"code": "370687",
+						"name": "海阳市"
+					}
+				]
+			},
+			{
+				"code": "370700",
+				"name": "潍坊市",
+				"children": [{
+						"code": "370702",
+						"name": "潍城区"
+					},
+					{
+						"code": "370703",
+						"name": "寒亭区"
+					},
+					{
+						"code": "370704",
+						"name": "坊子区"
+					},
+					{
+						"code": "370705",
+						"name": "奎文区"
+					},
+					{
+						"code": "370724",
+						"name": "临朐县"
+					},
+					{
+						"code": "370725",
+						"name": "昌乐县"
+					},
+					{
+						"code": "370781",
+						"name": "青州市"
+					},
+					{
+						"code": "370782",
+						"name": "诸城市"
+					},
+					{
+						"code": "370783",
+						"name": "寿光市"
+					},
+					{
+						"code": "370784",
+						"name": "安丘市"
+					},
+					{
+						"code": "370785",
+						"name": "高密市"
+					},
+					{
+						"code": "370786",
+						"name": "昌邑市"
+					}
+				]
+			},
+			{
+				"code": "370800",
+				"name": "济宁市",
+				"children": [{
+						"code": "370811",
+						"name": "任城区"
+					},
+					{
+						"code": "370812",
+						"name": "兖州区"
+					},
+					{
+						"code": "370826",
+						"name": "微山县"
+					},
+					{
+						"code": "370827",
+						"name": "鱼台县"
+					},
+					{
+						"code": "370828",
+						"name": "金乡县"
+					},
+					{
+						"code": "370829",
+						"name": "嘉祥县"
+					},
+					{
+						"code": "370830",
+						"name": "汶上县"
+					},
+					{
+						"code": "370831",
+						"name": "泗水县"
+					},
+					{
+						"code": "370832",
+						"name": "梁山县"
+					},
+					{
+						"code": "370881",
+						"name": "曲阜市"
+					},
+					{
+						"code": "370883",
+						"name": "邹城市"
+					}
+				]
+			},
+			{
+				"code": "370900",
+				"name": "泰安市",
+				"children": [{
+						"code": "370902",
+						"name": "泰山区"
+					},
+					{
+						"code": "370911",
+						"name": "岱岳区"
+					},
+					{
+						"code": "370921",
+						"name": "宁阳县"
+					},
+					{
+						"code": "370923",
+						"name": "东平县"
+					},
+					{
+						"code": "370982",
+						"name": "新泰市"
+					},
+					{
+						"code": "370983",
+						"name": "肥城市"
+					}
+				]
+			},
+			{
+				"code": "371000",
+				"name": "威海市",
+				"children": [{
+						"code": "371002",
+						"name": "环翠区"
+					},
+					{
+						"code": "371003",
+						"name": "文登区"
+					},
+					{
+						"code": "371082",
+						"name": "荣成市"
+					},
+					{
+						"code": "371083",
+						"name": "乳山市"
+					}
+				]
+			},
+			{
+				"code": "371100",
+				"name": "日照市",
+				"children": [{
+						"code": "371102",
+						"name": "东港区"
+					},
+					{
+						"code": "371103",
+						"name": "岚山区"
+					},
+					{
+						"code": "371121",
+						"name": "五莲县"
+					},
+					{
+						"code": "371122",
+						"name": "莒县"
+					}
+				]
+			},
+			{
+				"code": "371200",
+				"name": "莱芜市",
+				"children": [{
+						"code": "371202",
+						"name": "莱城区"
+					},
+					{
+						"code": "371203",
+						"name": "钢城区"
+					}
+				]
+			},
+			{
+				"code": "371300",
+				"name": "临沂市",
+				"children": [{
+						"code": "371302",
+						"name": "兰山区"
+					},
+					{
+						"code": "371311",
+						"name": "罗庄区"
+					},
+					{
+						"code": "371312",
+						"name": "河东区"
+					},
+					{
+						"code": "371321",
+						"name": "沂南县"
+					},
+					{
+						"code": "371322",
+						"name": "郯城县"
+					},
+					{
+						"code": "371323",
+						"name": "沂水县"
+					},
+					{
+						"code": "371324",
+						"name": "兰陵县"
+					},
+					{
+						"code": "371325",
+						"name": "费县"
+					},
+					{
+						"code": "371326",
+						"name": "平邑县"
+					},
+					{
+						"code": "371327",
+						"name": "莒南县"
+					},
+					{
+						"code": "371328",
+						"name": "蒙阴县"
+					},
+					{
+						"code": "371329",
+						"name": "临沭县"
+					}
+				]
+			},
+			{
+				"code": "371400",
+				"name": "德州市",
+				"children": [{
+						"code": "371402",
+						"name": "德城区"
+					},
+					{
+						"code": "371403",
+						"name": "陵城区"
+					},
+					{
+						"code": "371422",
+						"name": "宁津县"
+					},
+					{
+						"code": "371423",
+						"name": "庆云县"
+					},
+					{
+						"code": "371424",
+						"name": "临邑县"
+					},
+					{
+						"code": "371425",
+						"name": "齐河县"
+					},
+					{
+						"code": "371426",
+						"name": "平原县"
+					},
+					{
+						"code": "371427",
+						"name": "夏津县"
+					},
+					{
+						"code": "371428",
+						"name": "武城县"
+					},
+					{
+						"code": "371481",
+						"name": "乐陵市"
+					},
+					{
+						"code": "371482",
+						"name": "禹城市"
+					}
+				]
+			},
+			{
+				"code": "371500",
+				"name": "聊城市",
+				"children": [{
+						"code": "371502",
+						"name": "东昌府区"
+					},
+					{
+						"code": "371521",
+						"name": "阳谷县"
+					},
+					{
+						"code": "371522",
+						"name": "莘县"
+					},
+					{
+						"code": "371523",
+						"name": "茌平县"
+					},
+					{
+						"code": "371524",
+						"name": "东阿县"
+					},
+					{
+						"code": "371525",
+						"name": "冠县"
+					},
+					{
+						"code": "371526",
+						"name": "高唐县"
+					},
+					{
+						"code": "371581",
+						"name": "临清市"
+					}
+				]
+			},
+			{
+				"code": "371600",
+				"name": "滨州市",
+				"children": [{
+						"code": "371602",
+						"name": "滨城区"
+					},
+					{
+						"code": "371603",
+						"name": "沾化区"
+					},
+					{
+						"code": "371621",
+						"name": "惠民县"
+					},
+					{
+						"code": "371622",
+						"name": "阳信县"
+					},
+					{
+						"code": "371623",
+						"name": "无棣县"
+					},
+					{
+						"code": "371625",
+						"name": "博兴县"
+					},
+					{
+						"code": "371626",
+						"name": "邹平县"
+					}
+				]
+			},
+			{
+				"code": "371700",
+				"name": "菏泽市",
+				"children": [{
+						"code": "371702",
+						"name": "牡丹区"
+					},
+					{
+						"code": "371703",
+						"name": "定陶区"
+					},
+					{
+						"code": "371721",
+						"name": "曹县"
+					},
+					{
+						"code": "371722",
+						"name": "单县"
+					},
+					{
+						"code": "371723",
+						"name": "成武县"
+					},
+					{
+						"code": "371724",
+						"name": "巨野县"
+					},
+					{
+						"code": "371725",
+						"name": "郓城县"
+					},
+					{
+						"code": "371726",
+						"name": "鄄城县"
+					},
+					{
+						"code": "371728",
+						"name": "东明县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "410000",
+		"name": "河南省",
+		"children": [{
+				"code": "410100",
+				"name": "郑州市",
+				"children": [{
+						"code": "410102",
+						"name": "中原区"
+					},
+					{
+						"code": "410103",
+						"name": "二七区"
+					},
+					{
+						"code": "410104",
+						"name": "管城回族区"
+					},
+					{
+						"code": "410105",
+						"name": "金水区"
+					},
+					{
+						"code": "410106",
+						"name": "上街区"
+					},
+					{
+						"code": "410108",
+						"name": "惠济区"
+					},
+					{
+						"code": "410122",
+						"name": "中牟县"
+					},
+					{
+						"code": "410181",
+						"name": "巩义市"
+					},
+					{
+						"code": "410182",
+						"name": "荥阳市"
+					},
+					{
+						"code": "410183",
+						"name": "新密市"
+					},
+					{
+						"code": "410184",
+						"name": "新郑市"
+					},
+					{
+						"code": "410185",
+						"name": "登封市"
+					}
+				]
+			},
+			{
+				"code": "410200",
+				"name": "开封市",
+				"children": [{
+						"code": "410202",
+						"name": "龙亭区"
+					},
+					{
+						"code": "410203",
+						"name": "顺河回族区"
+					},
+					{
+						"code": "410204",
+						"name": "鼓楼区"
+					},
+					{
+						"code": "410205",
+						"name": "禹王台区"
+					},
+					{
+						"code": "410212",
+						"name": "祥符区"
+					},
+					{
+						"code": "410221",
+						"name": "杞县"
+					},
+					{
+						"code": "410222",
+						"name": "通许县"
+					},
+					{
+						"code": "410223",
+						"name": "尉氏县"
+					},
+					{
+						"code": "410225",
+						"name": "兰考县"
+					}
+				]
+			},
+			{
+				"code": "410300",
+				"name": "洛阳市",
+				"children": [{
+						"code": "410302",
+						"name": "老城区"
+					},
+					{
+						"code": "410303",
+						"name": "西工区"
+					},
+					{
+						"code": "410304",
+						"name": "瀍河回族区"
+					},
+					{
+						"code": "410305",
+						"name": "涧西区"
+					},
+					{
+						"code": "410306",
+						"name": "吉利区"
+					},
+					{
+						"code": "410311",
+						"name": "洛龙区"
+					},
+					{
+						"code": "410322",
+						"name": "孟津县"
+					},
+					{
+						"code": "410323",
+						"name": "新安县"
+					},
+					{
+						"code": "410324",
+						"name": "栾川县"
+					},
+					{
+						"code": "410325",
+						"name": "嵩县"
+					},
+					{
+						"code": "410326",
+						"name": "汝阳县"
+					},
+					{
+						"code": "410327",
+						"name": "宜阳县"
+					},
+					{
+						"code": "410328",
+						"name": "洛宁县"
+					},
+					{
+						"code": "410329",
+						"name": "伊川县"
+					},
+					{
+						"code": "410381",
+						"name": "偃师市"
+					}
+				]
+			},
+			{
+				"code": "410400",
+				"name": "平顶山市",
+				"children": [{
+						"code": "410402",
+						"name": "新华区"
+					},
+					{
+						"code": "410403",
+						"name": "卫东区"
+					},
+					{
+						"code": "410404",
+						"name": "石龙区"
+					},
+					{
+						"code": "410411",
+						"name": "湛河区"
+					},
+					{
+						"code": "410421",
+						"name": "宝丰县"
+					},
+					{
+						"code": "410422",
+						"name": "叶县"
+					},
+					{
+						"code": "410423",
+						"name": "鲁山县"
+					},
+					{
+						"code": "410425",
+						"name": "郏县"
+					},
+					{
+						"code": "410481",
+						"name": "舞钢市"
+					},
+					{
+						"code": "410482",
+						"name": "汝州市"
+					}
+				]
+			},
+			{
+				"code": "410500",
+				"name": "安阳市",
+				"children": [{
+						"code": "410502",
+						"name": "文峰区"
+					},
+					{
+						"code": "410503",
+						"name": "北关区"
+					},
+					{
+						"code": "410505",
+						"name": "殷都区"
+					},
+					{
+						"code": "410506",
+						"name": "龙安区"
+					},
+					{
+						"code": "410522",
+						"name": "安阳县"
+					},
+					{
+						"code": "410523",
+						"name": "汤阴县"
+					},
+					{
+						"code": "410526",
+						"name": "滑县"
+					},
+					{
+						"code": "410527",
+						"name": "内黄县"
+					},
+					{
+						"code": "410581",
+						"name": "林州市"
+					}
+				]
+			},
+			{
+				"code": "410600",
+				"name": "鹤壁市",
+				"children": [{
+						"code": "410602",
+						"name": "鹤山区"
+					},
+					{
+						"code": "410603",
+						"name": "山城区"
+					},
+					{
+						"code": "410611",
+						"name": "淇滨区"
+					},
+					{
+						"code": "410621",
+						"name": "浚县"
+					},
+					{
+						"code": "410622",
+						"name": "淇县"
+					}
+				]
+			},
+			{
+				"code": "410700",
+				"name": "新乡市",
+				"children": [{
+						"code": "410702",
+						"name": "红旗区"
+					},
+					{
+						"code": "410703",
+						"name": "卫滨区"
+					},
+					{
+						"code": "410704",
+						"name": "凤泉区"
+					},
+					{
+						"code": "410711",
+						"name": "牧野区"
+					},
+					{
+						"code": "410721",
+						"name": "新乡县"
+					},
+					{
+						"code": "410724",
+						"name": "获嘉县"
+					},
+					{
+						"code": "410725",
+						"name": "原阳县"
+					},
+					{
+						"code": "410726",
+						"name": "延津县"
+					},
+					{
+						"code": "410727",
+						"name": "封丘县"
+					},
+					{
+						"code": "410728",
+						"name": "长垣县"
+					},
+					{
+						"code": "410781",
+						"name": "卫辉市"
+					},
+					{
+						"code": "410782",
+						"name": "辉县市"
+					}
+				]
+			},
+			{
+				"code": "410800",
+				"name": "焦作市",
+				"children": [{
+						"code": "410802",
+						"name": "解放区"
+					},
+					{
+						"code": "410803",
+						"name": "中站区"
+					},
+					{
+						"code": "410804",
+						"name": "马村区"
+					},
+					{
+						"code": "410811",
+						"name": "山阳区"
+					},
+					{
+						"code": "410821",
+						"name": "修武县"
+					},
+					{
+						"code": "410822",
+						"name": "博爱县"
+					},
+					{
+						"code": "410823",
+						"name": "武陟县"
+					},
+					{
+						"code": "410825",
+						"name": "温县"
+					},
+					{
+						"code": "410882",
+						"name": "沁阳市"
+					},
+					{
+						"code": "410883",
+						"name": "孟州市"
+					}
+				]
+			},
+			{
+				"code": "410900",
+				"name": "濮阳市",
+				"children": [{
+						"code": "410902",
+						"name": "华龙区"
+					},
+					{
+						"code": "410922",
+						"name": "清丰县"
+					},
+					{
+						"code": "410923",
+						"name": "南乐县"
+					},
+					{
+						"code": "410926",
+						"name": "范县"
+					},
+					{
+						"code": "410927",
+						"name": "台前县"
+					},
+					{
+						"code": "410928",
+						"name": "濮阳县"
+					}
+				]
+			},
+			{
+				"code": "411000",
+				"name": "许昌市",
+				"children": [{
+						"code": "411002",
+						"name": "魏都区"
+					},
+					{
+						"code": "411003",
+						"name": "建安区"
+					},
+					{
+						"code": "411024",
+						"name": "鄢陵县"
+					},
+					{
+						"code": "411025",
+						"name": "襄城县"
+					},
+					{
+						"code": "411081",
+						"name": "禹州市"
+					},
+					{
+						"code": "411082",
+						"name": "长葛市"
+					}
+				]
+			},
+			{
+				"code": "411100",
+				"name": "漯河市",
+				"children": [{
+						"code": "411102",
+						"name": "源汇区"
+					},
+					{
+						"code": "411103",
+						"name": "郾城区"
+					},
+					{
+						"code": "411104",
+						"name": "召陵区"
+					},
+					{
+						"code": "411121",
+						"name": "舞阳县"
+					},
+					{
+						"code": "411122",
+						"name": "临颍县"
+					}
+				]
+			},
+			{
+				"code": "411200",
+				"name": "三门峡市",
+				"children": [{
+						"code": "411202",
+						"name": "湖滨区"
+					},
+					{
+						"code": "411203",
+						"name": "陕州区"
+					},
+					{
+						"code": "411221",
+						"name": "渑池县"
+					},
+					{
+						"code": "411224",
+						"name": "卢氏县"
+					},
+					{
+						"code": "411281",
+						"name": "义马市"
+					},
+					{
+						"code": "411282",
+						"name": "灵宝市"
+					}
+				]
+			},
+			{
+				"code": "411300",
+				"name": "南阳市",
+				"children": [{
+						"code": "411302",
+						"name": "宛城区"
+					},
+					{
+						"code": "411303",
+						"name": "卧龙区"
+					},
+					{
+						"code": "411321",
+						"name": "南召县"
+					},
+					{
+						"code": "411322",
+						"name": "方城县"
+					},
+					{
+						"code": "411323",
+						"name": "西峡县"
+					},
+					{
+						"code": "411324",
+						"name": "镇平县"
+					},
+					{
+						"code": "411325",
+						"name": "内乡县"
+					},
+					{
+						"code": "411326",
+						"name": "淅川县"
+					},
+					{
+						"code": "411327",
+						"name": "社旗县"
+					},
+					{
+						"code": "411328",
+						"name": "唐河县"
+					},
+					{
+						"code": "411329",
+						"name": "新野县"
+					},
+					{
+						"code": "411330",
+						"name": "桐柏县"
+					},
+					{
+						"code": "411381",
+						"name": "邓州市"
+					}
+				]
+			},
+			{
+				"code": "411400",
+				"name": "商丘市",
+				"children": [{
+						"code": "411402",
+						"name": "梁园区"
+					},
+					{
+						"code": "411403",
+						"name": "睢阳区"
+					},
+					{
+						"code": "411421",
+						"name": "民权县"
+					},
+					{
+						"code": "411422",
+						"name": "睢县"
+					},
+					{
+						"code": "411423",
+						"name": "宁陵县"
+					},
+					{
+						"code": "411424",
+						"name": "柘城县"
+					},
+					{
+						"code": "411425",
+						"name": "虞城县"
+					},
+					{
+						"code": "411426",
+						"name": "夏邑县"
+					},
+					{
+						"code": "411481",
+						"name": "永城市"
+					}
+				]
+			},
+			{
+				"code": "411500",
+				"name": "信阳市",
+				"children": [{
+						"code": "411502",
+						"name": "浉河区"
+					},
+					{
+						"code": "411503",
+						"name": "平桥区"
+					},
+					{
+						"code": "411521",
+						"name": "罗山县"
+					},
+					{
+						"code": "411522",
+						"name": "光山县"
+					},
+					{
+						"code": "411523",
+						"name": "新县"
+					},
+					{
+						"code": "411524",
+						"name": "商城县"
+					},
+					{
+						"code": "411525",
+						"name": "固始县"
+					},
+					{
+						"code": "411526",
+						"name": "潢川县"
+					},
+					{
+						"code": "411527",
+						"name": "淮滨县"
+					},
+					{
+						"code": "411528",
+						"name": "息县"
+					}
+				]
+			},
+			{
+				"code": "411600",
+				"name": "周口市",
+				"children": [{
+						"code": "411602",
+						"name": "川汇区"
+					},
+					{
+						"code": "411621",
+						"name": "扶沟县"
+					},
+					{
+						"code": "411622",
+						"name": "西华县"
+					},
+					{
+						"code": "411623",
+						"name": "商水县"
+					},
+					{
+						"code": "411624",
+						"name": "沈丘县"
+					},
+					{
+						"code": "411625",
+						"name": "郸城县"
+					},
+					{
+						"code": "411626",
+						"name": "淮阳县"
+					},
+					{
+						"code": "411627",
+						"name": "太康县"
+					},
+					{
+						"code": "411628",
+						"name": "鹿邑县"
+					},
+					{
+						"code": "411681",
+						"name": "项城市"
+					}
+				]
+			},
+			{
+				"code": "411700",
+				"name": "驻马店市",
+				"children": [{
+						"code": "411702",
+						"name": "驿城区"
+					},
+					{
+						"code": "411721",
+						"name": "西平县"
+					},
+					{
+						"code": "411722",
+						"name": "上蔡县"
+					},
+					{
+						"code": "411723",
+						"name": "平舆县"
+					},
+					{
+						"code": "411724",
+						"name": "正阳县"
+					},
+					{
+						"code": "411725",
+						"name": "确山县"
+					},
+					{
+						"code": "411726",
+						"name": "泌阳县"
+					},
+					{
+						"code": "411727",
+						"name": "汝南县"
+					},
+					{
+						"code": "411728",
+						"name": "遂平县"
+					},
+					{
+						"code": "411729",
+						"name": "新蔡县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "420000",
+		"name": "湖北省",
+		"children": [{
+				"code": "420100",
+				"name": "武汉市",
+				"children": [{
+						"code": "420102",
+						"name": "江岸区"
+					},
+					{
+						"code": "420103",
+						"name": "江汉区"
+					},
+					{
+						"code": "420104",
+						"name": "硚口区"
+					},
+					{
+						"code": "420105",
+						"name": "汉阳区"
+					},
+					{
+						"code": "420106",
+						"name": "武昌区"
+					},
+					{
+						"code": "420107",
+						"name": "青山区"
+					},
+					{
+						"code": "420111",
+						"name": "洪山区"
+					},
+					{
+						"code": "420112",
+						"name": "东西湖区"
+					},
+					{
+						"code": "420113",
+						"name": "汉南区"
+					},
+					{
+						"code": "420114",
+						"name": "蔡甸区"
+					},
+					{
+						"code": "420115",
+						"name": "江夏区"
+					},
+					{
+						"code": "420116",
+						"name": "黄陂区"
+					},
+					{
+						"code": "420117",
+						"name": "新洲区"
+					}
+				]
+			},
+			{
+				"code": "420200",
+				"name": "黄石市",
+				"children": [{
+						"code": "420202",
+						"name": "黄石港区"
+					},
+					{
+						"code": "420203",
+						"name": "西塞山区"
+					},
+					{
+						"code": "420204",
+						"name": "下陆区"
+					},
+					{
+						"code": "420205",
+						"name": "铁山区"
+					},
+					{
+						"code": "420222",
+						"name": "阳新县"
+					},
+					{
+						"code": "420281",
+						"name": "大冶市"
+					}
+				]
+			},
+			{
+				"code": "420300",
+				"name": "十堰市",
+				"children": [{
+						"code": "420302",
+						"name": "茅箭区"
+					},
+					{
+						"code": "420303",
+						"name": "张湾区"
+					},
+					{
+						"code": "420304",
+						"name": "郧阳区"
+					},
+					{
+						"code": "420322",
+						"name": "郧西县"
+					},
+					{
+						"code": "420323",
+						"name": "竹山县"
+					},
+					{
+						"code": "420324",
+						"name": "竹溪县"
+					},
+					{
+						"code": "420325",
+						"name": "房县"
+					},
+					{
+						"code": "420381",
+						"name": "丹江口市"
+					}
+				]
+			},
+			{
+				"code": "420500",
+				"name": "宜昌市",
+				"children": [{
+						"code": "420502",
+						"name": "西陵区"
+					},
+					{
+						"code": "420503",
+						"name": "伍家岗区"
+					},
+					{
+						"code": "420504",
+						"name": "点军区"
+					},
+					{
+						"code": "420505",
+						"name": "猇亭区"
+					},
+					{
+						"code": "420506",
+						"name": "夷陵区"
+					},
+					{
+						"code": "420525",
+						"name": "远安县"
+					},
+					{
+						"code": "420526",
+						"name": "兴山县"
+					},
+					{
+						"code": "420527",
+						"name": "秭归县"
+					},
+					{
+						"code": "420528",
+						"name": "长阳土家族自治县"
+					},
+					{
+						"code": "420529",
+						"name": "五峰土家族自治县"
+					},
+					{
+						"code": "420581",
+						"name": "宜都市"
+					},
+					{
+						"code": "420582",
+						"name": "当阳市"
+					},
+					{
+						"code": "420583",
+						"name": "枝江市"
+					}
+				]
+			},
+			{
+				"code": "420600",
+				"name": "襄阳市",
+				"children": [{
+						"code": "420602",
+						"name": "襄城区"
+					},
+					{
+						"code": "420606",
+						"name": "樊城区"
+					},
+					{
+						"code": "420607",
+						"name": "襄州区"
+					},
+					{
+						"code": "420624",
+						"name": "南漳县"
+					},
+					{
+						"code": "420625",
+						"name": "谷城县"
+					},
+					{
+						"code": "420626",
+						"name": "保康县"
+					},
+					{
+						"code": "420682",
+						"name": "老河口市"
+					},
+					{
+						"code": "420683",
+						"name": "枣阳市"
+					},
+					{
+						"code": "420684",
+						"name": "宜城市"
+					}
+				]
+			},
+			{
+				"code": "420700",
+				"name": "鄂州市",
+				"children": [{
+						"code": "420702",
+						"name": "梁子湖区"
+					},
+					{
+						"code": "420703",
+						"name": "华容区"
+					},
+					{
+						"code": "420704",
+						"name": "鄂城区"
+					}
+				]
+			},
+			{
+				"code": "420800",
+				"name": "荆门市",
+				"children": [{
+						"code": "420802",
+						"name": "东宝区"
+					},
+					{
+						"code": "420804",
+						"name": "掇刀区"
+					},
+					{
+						"code": "420822",
+						"name": "沙洋县"
+					},
+					{
+						"code": "420881",
+						"name": "钟祥市"
+					},
+					{
+						"code": "420882",
+						"name": "京山市"
+					}
+				]
+			},
+			{
+				"code": "420900",
+				"name": "孝感市",
+				"children": [{
+						"code": "420902",
+						"name": "孝南区"
+					},
+					{
+						"code": "420921",
+						"name": "孝昌县"
+					},
+					{
+						"code": "420922",
+						"name": "大悟县"
+					},
+					{
+						"code": "420923",
+						"name": "云梦县"
+					},
+					{
+						"code": "420981",
+						"name": "应城市"
+					},
+					{
+						"code": "420982",
+						"name": "安陆市"
+					},
+					{
+						"code": "420984",
+						"name": "汉川市"
+					}
+				]
+			},
+			{
+				"code": "421000",
+				"name": "荆州市",
+				"children": [{
+						"code": "421002",
+						"name": "沙市区"
+					},
+					{
+						"code": "421003",
+						"name": "荆州区"
+					},
+					{
+						"code": "421022",
+						"name": "公安县"
+					},
+					{
+						"code": "421023",
+						"name": "监利县"
+					},
+					{
+						"code": "421024",
+						"name": "江陵县"
+					},
+					{
+						"code": "421081",
+						"name": "石首市"
+					},
+					{
+						"code": "421083",
+						"name": "洪湖市"
+					},
+					{
+						"code": "421087",
+						"name": "松滋市"
+					}
+				]
+			},
+			{
+				"code": "421100",
+				"name": "黄冈市",
+				"children": [{
+						"code": "421102",
+						"name": "黄州区"
+					},
+					{
+						"code": "421121",
+						"name": "团风县"
+					},
+					{
+						"code": "421122",
+						"name": "红安县"
+					},
+					{
+						"code": "421123",
+						"name": "罗田县"
+					},
+					{
+						"code": "421124",
+						"name": "英山县"
+					},
+					{
+						"code": "421125",
+						"name": "浠水县"
+					},
+					{
+						"code": "421126",
+						"name": "蕲春县"
+					},
+					{
+						"code": "421127",
+						"name": "黄梅县"
+					},
+					{
+						"code": "421181",
+						"name": "麻城市"
+					},
+					{
+						"code": "421182",
+						"name": "武穴市"
+					}
+				]
+			},
+			{
+				"code": "421200",
+				"name": "咸宁市",
+				"children": [{
+						"code": "421202",
+						"name": "咸安区"
+					},
+					{
+						"code": "421221",
+						"name": "嘉鱼县"
+					},
+					{
+						"code": "421222",
+						"name": "通城县"
+					},
+					{
+						"code": "421223",
+						"name": "崇阳县"
+					},
+					{
+						"code": "421224",
+						"name": "通山县"
+					},
+					{
+						"code": "421281",
+						"name": "赤壁市"
+					}
+				]
+			},
+			{
+				"code": "421300",
+				"name": "随州市",
+				"children": [{
+						"code": "421303",
+						"name": "曾都区"
+					},
+					{
+						"code": "421321",
+						"name": "随县"
+					},
+					{
+						"code": "421381",
+						"name": "广水市"
+					}
+				]
+			},
+			{
+				"code": "422800",
+				"name": "恩施土家族苗族自治州",
+				"children": [{
+						"code": "422801",
+						"name": "恩施市"
+					},
+					{
+						"code": "422802",
+						"name": "利川市"
+					},
+					{
+						"code": "422822",
+						"name": "建始县"
+					},
+					{
+						"code": "422823",
+						"name": "巴东县"
+					},
+					{
+						"code": "422825",
+						"name": "宣恩县"
+					},
+					{
+						"code": "422826",
+						"name": "咸丰县"
+					},
+					{
+						"code": "422827",
+						"name": "来凤县"
+					},
+					{
+						"code": "422828",
+						"name": "鹤峰县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "430000",
+		"name": "湖南省",
+		"children": [{
+				"code": "430100",
+				"name": "长沙市",
+				"children": [{
+						"code": "430102",
+						"name": "芙蓉区"
+					},
+					{
+						"code": "430103",
+						"name": "天心区"
+					},
+					{
+						"code": "430104",
+						"name": "岳麓区"
+					},
+					{
+						"code": "430105",
+						"name": "开福区"
+					},
+					{
+						"code": "430111",
+						"name": "雨花区"
+					},
+					{
+						"code": "430112",
+						"name": "望城区"
+					},
+					{
+						"code": "430121",
+						"name": "长沙县"
+					},
+					{
+						"code": "430181",
+						"name": "浏阳市"
+					},
+					{
+						"code": "430182",
+						"name": "宁乡市"
+					}
+				]
+			},
+			{
+				"code": "430200",
+				"name": "株洲市",
+				"children": [{
+						"code": "430202",
+						"name": "荷塘区"
+					},
+					{
+						"code": "430203",
+						"name": "芦淞区"
+					},
+					{
+						"code": "430204",
+						"name": "石峰区"
+					},
+					{
+						"code": "430211",
+						"name": "天元区"
+					},
+					{
+						"code": "430212",
+						"name": "渌口区"
+					},
+					{
+						"code": "430223",
+						"name": "攸县"
+					},
+					{
+						"code": "430224",
+						"name": "茶陵县"
+					},
+					{
+						"code": "430225",
+						"name": "炎陵县"
+					},
+					{
+						"code": "430281",
+						"name": "醴陵市"
+					}
+				]
+			},
+			{
+				"code": "430300",
+				"name": "湘潭市",
+				"children": [{
+						"code": "430302",
+						"name": "雨湖区"
+					},
+					{
+						"code": "430304",
+						"name": "岳塘区"
+					},
+					{
+						"code": "430321",
+						"name": "湘潭县"
+					},
+					{
+						"code": "430381",
+						"name": "湘乡市"
+					},
+					{
+						"code": "430382",
+						"name": "韶山市"
+					}
+				]
+			},
+			{
+				"code": "430400",
+				"name": "衡阳市",
+				"children": [{
+						"code": "430405",
+						"name": "珠晖区"
+					},
+					{
+						"code": "430406",
+						"name": "雁峰区"
+					},
+					{
+						"code": "430407",
+						"name": "石鼓区"
+					},
+					{
+						"code": "430408",
+						"name": "蒸湘区"
+					},
+					{
+						"code": "430412",
+						"name": "南岳区"
+					},
+					{
+						"code": "430421",
+						"name": "衡阳县"
+					},
+					{
+						"code": "430422",
+						"name": "衡南县"
+					},
+					{
+						"code": "430423",
+						"name": "衡山县"
+					},
+					{
+						"code": "430424",
+						"name": "衡东县"
+					},
+					{
+						"code": "430426",
+						"name": "祁东县"
+					},
+					{
+						"code": "430481",
+						"name": "耒阳市"
+					},
+					{
+						"code": "430482",
+						"name": "常宁市"
+					}
+				]
+			},
+			{
+				"code": "430500",
+				"name": "邵阳市",
+				"children": [{
+						"code": "430502",
+						"name": "双清区"
+					},
+					{
+						"code": "430503",
+						"name": "大祥区"
+					},
+					{
+						"code": "430511",
+						"name": "北塔区"
+					},
+					{
+						"code": "430521",
+						"name": "邵东县"
+					},
+					{
+						"code": "430522",
+						"name": "新邵县"
+					},
+					{
+						"code": "430523",
+						"name": "邵阳县"
+					},
+					{
+						"code": "430524",
+						"name": "隆回县"
+					},
+					{
+						"code": "430525",
+						"name": "洞口县"
+					},
+					{
+						"code": "430527",
+						"name": "绥宁县"
+					},
+					{
+						"code": "430528",
+						"name": "新宁县"
+					},
+					{
+						"code": "430529",
+						"name": "城步苗族自治县"
+					},
+					{
+						"code": "430581",
+						"name": "武冈市"
+					}
+				]
+			},
+			{
+				"code": "430600",
+				"name": "岳阳市",
+				"children": [{
+						"code": "430602",
+						"name": "岳阳楼区"
+					},
+					{
+						"code": "430603",
+						"name": "云溪区"
+					},
+					{
+						"code": "430611",
+						"name": "君山区"
+					},
+					{
+						"code": "430621",
+						"name": "岳阳县"
+					},
+					{
+						"code": "430623",
+						"name": "华容县"
+					},
+					{
+						"code": "430624",
+						"name": "湘阴县"
+					},
+					{
+						"code": "430626",
+						"name": "平江县"
+					},
+					{
+						"code": "430681",
+						"name": "汨罗市"
+					},
+					{
+						"code": "430682",
+						"name": "临湘市"
+					}
+				]
+			},
+			{
+				"code": "430700",
+				"name": "常德市",
+				"children": [{
+						"code": "430702",
+						"name": "武陵区"
+					},
+					{
+						"code": "430703",
+						"name": "鼎城区"
+					},
+					{
+						"code": "430721",
+						"name": "安乡县"
+					},
+					{
+						"code": "430722",
+						"name": "汉寿县"
+					},
+					{
+						"code": "430723",
+						"name": "澧县"
+					},
+					{
+						"code": "430724",
+						"name": "临澧县"
+					},
+					{
+						"code": "430725",
+						"name": "桃源县"
+					},
+					{
+						"code": "430726",
+						"name": "石门县"
+					},
+					{
+						"code": "430781",
+						"name": "津市市"
+					}
+				]
+			},
+			{
+				"code": "430800",
+				"name": "张家界市",
+				"children": [{
+						"code": "430802",
+						"name": "永定区"
+					},
+					{
+						"code": "430811",
+						"name": "武陵源区"
+					},
+					{
+						"code": "430821",
+						"name": "慈利县"
+					},
+					{
+						"code": "430822",
+						"name": "桑植县"
+					}
+				]
+			},
+			{
+				"code": "430900",
+				"name": "益阳市",
+				"children": [{
+						"code": "430902",
+						"name": "资阳区"
+					},
+					{
+						"code": "430903",
+						"name": "赫山区"
+					},
+					{
+						"code": "430921",
+						"name": "南县"
+					},
+					{
+						"code": "430922",
+						"name": "桃江县"
+					},
+					{
+						"code": "430923",
+						"name": "安化县"
+					},
+					{
+						"code": "430981",
+						"name": "沅江市"
+					}
+				]
+			},
+			{
+				"code": "431000",
+				"name": "郴州市",
+				"children": [{
+						"code": "431002",
+						"name": "北湖区"
+					},
+					{
+						"code": "431003",
+						"name": "苏仙区"
+					},
+					{
+						"code": "431021",
+						"name": "桂阳县"
+					},
+					{
+						"code": "431022",
+						"name": "宜章县"
+					},
+					{
+						"code": "431023",
+						"name": "永兴县"
+					},
+					{
+						"code": "431024",
+						"name": "嘉禾县"
+					},
+					{
+						"code": "431025",
+						"name": "临武县"
+					},
+					{
+						"code": "431026",
+						"name": "汝城县"
+					},
+					{
+						"code": "431027",
+						"name": "桂东县"
+					},
+					{
+						"code": "431028",
+						"name": "安仁县"
+					},
+					{
+						"code": "431081",
+						"name": "资兴市"
+					}
+				]
+			},
+			{
+				"code": "431100",
+				"name": "永州市",
+				"children": [{
+						"code": "431102",
+						"name": "零陵区"
+					},
+					{
+						"code": "431103",
+						"name": "冷水滩区"
+					},
+					{
+						"code": "431121",
+						"name": "祁阳县"
+					},
+					{
+						"code": "431122",
+						"name": "东安县"
+					},
+					{
+						"code": "431123",
+						"name": "双牌县"
+					},
+					{
+						"code": "431124",
+						"name": "道县"
+					},
+					{
+						"code": "431125",
+						"name": "江永县"
+					},
+					{
+						"code": "431126",
+						"name": "宁远县"
+					},
+					{
+						"code": "431127",
+						"name": "蓝山县"
+					},
+					{
+						"code": "431128",
+						"name": "新田县"
+					},
+					{
+						"code": "431129",
+						"name": "江华瑶族自治县"
+					}
+				]
+			},
+			{
+				"code": "431200",
+				"name": "怀化市",
+				"children": [{
+						"code": "431202",
+						"name": "鹤城区"
+					},
+					{
+						"code": "431221",
+						"name": "中方县"
+					},
+					{
+						"code": "431222",
+						"name": "沅陵县"
+					},
+					{
+						"code": "431223",
+						"name": "辰溪县"
+					},
+					{
+						"code": "431224",
+						"name": "溆浦县"
+					},
+					{
+						"code": "431225",
+						"name": "会同县"
+					},
+					{
+						"code": "431226",
+						"name": "麻阳苗族自治县"
+					},
+					{
+						"code": "431227",
+						"name": "新晃侗族自治县"
+					},
+					{
+						"code": "431228",
+						"name": "芷江侗族自治县"
+					},
+					{
+						"code": "431229",
+						"name": "靖州苗族侗族自治县"
+					},
+					{
+						"code": "431230",
+						"name": "通道侗族自治县"
+					},
+					{
+						"code": "431281",
+						"name": "洪江市"
+					}
+				]
+			},
+			{
+				"code": "431300",
+				"name": "娄底市",
+				"children": [{
+						"code": "431302",
+						"name": "娄星区"
+					},
+					{
+						"code": "431321",
+						"name": "双峰县"
+					},
+					{
+						"code": "431322",
+						"name": "新化县"
+					},
+					{
+						"code": "431381",
+						"name": "冷水江市"
+					},
+					{
+						"code": "431382",
+						"name": "涟源市"
+					}
+				]
+			},
+			{
+				"code": "433100",
+				"name": "湘西土家族苗族自治州",
+				"children": [{
+						"code": "433101",
+						"name": "吉首市"
+					},
+					{
+						"code": "433122",
+						"name": "泸溪县"
+					},
+					{
+						"code": "433123",
+						"name": "凤凰县"
+					},
+					{
+						"code": "433124",
+						"name": "花垣县"
+					},
+					{
+						"code": "433125",
+						"name": "保靖县"
+					},
+					{
+						"code": "433126",
+						"name": "古丈县"
+					},
+					{
+						"code": "433127",
+						"name": "永顺县"
+					},
+					{
+						"code": "433130",
+						"name": "龙山县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "440000",
+		"name": "广东省",
+		"children": [{
+				"code": "440100",
+				"name": "广州市",
+				"children": [{
+						"code": "440103",
+						"name": "荔湾区"
+					},
+					{
+						"code": "440104",
+						"name": "越秀区"
+					},
+					{
+						"code": "440105",
+						"name": "海珠区"
+					},
+					{
+						"code": "440106",
+						"name": "天河区"
+					},
+					{
+						"code": "440111",
+						"name": "白云区"
+					},
+					{
+						"code": "440112",
+						"name": "黄埔区"
+					},
+					{
+						"code": "440113",
+						"name": "番禺区"
+					},
+					{
+						"code": "440114",
+						"name": "花都区"
+					},
+					{
+						"code": "440115",
+						"name": "南沙区"
+					},
+					{
+						"code": "440117",
+						"name": "从化区"
+					},
+					{
+						"code": "440118",
+						"name": "增城区"
+					}
+				]
+			},
+			{
+				"code": "440200",
+				"name": "韶关市",
+				"children": [{
+						"code": "440203",
+						"name": "武江区"
+					},
+					{
+						"code": "440204",
+						"name": "浈江区"
+					},
+					{
+						"code": "440205",
+						"name": "曲江区"
+					},
+					{
+						"code": "440222",
+						"name": "始兴县"
+					},
+					{
+						"code": "440224",
+						"name": "仁化县"
+					},
+					{
+						"code": "440229",
+						"name": "翁源县"
+					},
+					{
+						"code": "440232",
+						"name": "乳源瑶族自治县"
+					},
+					{
+						"code": "440233",
+						"name": "新丰县"
+					},
+					{
+						"code": "440281",
+						"name": "乐昌市"
+					},
+					{
+						"code": "440282",
+						"name": "南雄市"
+					}
+				]
+			},
+			{
+				"code": "440300",
+				"name": "深圳市",
+				"children": [{
+						"code": "440303",
+						"name": "罗湖区"
+					},
+					{
+						"code": "440304",
+						"name": "福田区"
+					},
+					{
+						"code": "440305",
+						"name": "南山区"
+					},
+					{
+						"code": "440306",
+						"name": "宝安区"
+					},
+					{
+						"code": "440307",
+						"name": "龙岗区"
+					},
+					{
+						"code": "440308",
+						"name": "盐田区"
+					},
+					{
+						"code": "440309",
+						"name": "龙华区"
+					},
+					{
+						"code": "440310",
+						"name": "坪山区"
+					},
+					{
+						"code": "440311",
+						"name": "光明区"
+					}
+				]
+			},
+			{
+				"code": "440400",
+				"name": "珠海市",
+				"children": [{
+						"code": "440402",
+						"name": "香洲区"
+					},
+					{
+						"code": "440403",
+						"name": "斗门区"
+					},
+					{
+						"code": "440404",
+						"name": "金湾区"
+					}
+				]
+			},
+			{
+				"code": "440500",
+				"name": "汕头市",
+				"children": [{
+						"code": "440507",
+						"name": "龙湖区"
+					},
+					{
+						"code": "440511",
+						"name": "金平区"
+					},
+					{
+						"code": "440512",
+						"name": "濠江区"
+					},
+					{
+						"code": "440513",
+						"name": "潮阳区"
+					},
+					{
+						"code": "440514",
+						"name": "潮南区"
+					},
+					{
+						"code": "440515",
+						"name": "澄海区"
+					},
+					{
+						"code": "440523",
+						"name": "南澳县"
+					}
+				]
+			},
+			{
+				"code": "440600",
+				"name": "佛山市",
+				"children": [{
+						"code": "440604",
+						"name": "禅城区"
+					},
+					{
+						"code": "440605",
+						"name": "南海区"
+					},
+					{
+						"code": "440606",
+						"name": "顺德区"
+					},
+					{
+						"code": "440607",
+						"name": "三水区"
+					},
+					{
+						"code": "440608",
+						"name": "高明区"
+					}
+				]
+			},
+			{
+				"code": "440700",
+				"name": "江门市",
+				"children": [{
+						"code": "440703",
+						"name": "蓬江区"
+					},
+					{
+						"code": "440704",
+						"name": "江海区"
+					},
+					{
+						"code": "440705",
+						"name": "新会区"
+					},
+					{
+						"code": "440781",
+						"name": "台山市"
+					},
+					{
+						"code": "440783",
+						"name": "开平市"
+					},
+					{
+						"code": "440784",
+						"name": "鹤山市"
+					},
+					{
+						"code": "440785",
+						"name": "恩平市"
+					}
+				]
+			},
+			{
+				"code": "440800",
+				"name": "湛江市",
+				"children": [{
+						"code": "440802",
+						"name": "赤坎区"
+					},
+					{
+						"code": "440803",
+						"name": "霞山区"
+					},
+					{
+						"code": "440804",
+						"name": "坡头区"
+					},
+					{
+						"code": "440811",
+						"name": "麻章区"
+					},
+					{
+						"code": "440823",
+						"name": "遂溪县"
+					},
+					{
+						"code": "440825",
+						"name": "徐闻县"
+					},
+					{
+						"code": "440881",
+						"name": "廉江市"
+					},
+					{
+						"code": "440882",
+						"name": "雷州市"
+					},
+					{
+						"code": "440883",
+						"name": "吴川市"
+					}
+				]
+			},
+			{
+				"code": "440900",
+				"name": "茂名市",
+				"children": [{
+						"code": "440902",
+						"name": "茂南区"
+					},
+					{
+						"code": "440904",
+						"name": "电白区"
+					},
+					{
+						"code": "440981",
+						"name": "高州市"
+					},
+					{
+						"code": "440982",
+						"name": "化州市"
+					},
+					{
+						"code": "440983",
+						"name": "信宜市"
+					}
+				]
+			},
+			{
+				"code": "441200",
+				"name": "肇庆市",
+				"children": [{
+						"code": "441202",
+						"name": "端州区"
+					},
+					{
+						"code": "441203",
+						"name": "鼎湖区"
+					},
+					{
+						"code": "441204",
+						"name": "高要区"
+					},
+					{
+						"code": "441223",
+						"name": "广宁县"
+					},
+					{
+						"code": "441224",
+						"name": "怀集县"
+					},
+					{
+						"code": "441225",
+						"name": "封开县"
+					},
+					{
+						"code": "441226",
+						"name": "德庆县"
+					},
+					{
+						"code": "441284",
+						"name": "四会市"
+					}
+				]
+			},
+			{
+				"code": "441300",
+				"name": "惠州市",
+				"children": [{
+						"code": "441302",
+						"name": "惠城区"
+					},
+					{
+						"code": "441303",
+						"name": "惠阳区"
+					},
+					{
+						"code": "441322",
+						"name": "博罗县"
+					},
+					{
+						"code": "441323",
+						"name": "惠东县"
+					},
+					{
+						"code": "441324",
+						"name": "龙门县"
+					}
+				]
+			},
+			{
+				"code": "441400",
+				"name": "梅州市",
+				"children": [{
+						"code": "441402",
+						"name": "梅江区"
+					},
+					{
+						"code": "441403",
+						"name": "梅县区"
+					},
+					{
+						"code": "441422",
+						"name": "大埔县"
+					},
+					{
+						"code": "441423",
+						"name": "丰顺县"
+					},
+					{
+						"code": "441424",
+						"name": "五华县"
+					},
+					{
+						"code": "441426",
+						"name": "平远县"
+					},
+					{
+						"code": "441427",
+						"name": "蕉岭县"
+					},
+					{
+						"code": "441481",
+						"name": "兴宁市"
+					}
+				]
+			},
+			{
+				"code": "441500",
+				"name": "汕尾市",
+				"children": [{
+						"code": "441502",
+						"name": "城区"
+					},
+					{
+						"code": "441521",
+						"name": "海丰县"
+					},
+					{
+						"code": "441523",
+						"name": "陆河县"
+					},
+					{
+						"code": "441581",
+						"name": "陆丰市"
+					}
+				]
+			},
+			{
+				"code": "441600",
+				"name": "河源市",
+				"children": [{
+						"code": "441602",
+						"name": "源城区"
+					},
+					{
+						"code": "441621",
+						"name": "紫金县"
+					},
+					{
+						"code": "441622",
+						"name": "龙川县"
+					},
+					{
+						"code": "441623",
+						"name": "连平县"
+					},
+					{
+						"code": "441624",
+						"name": "和平县"
+					},
+					{
+						"code": "441625",
+						"name": "东源县"
+					}
+				]
+			},
+			{
+				"code": "441700",
+				"name": "阳江市",
+				"children": [{
+						"code": "441702",
+						"name": "江城区"
+					},
+					{
+						"code": "441704",
+						"name": "阳东区"
+					},
+					{
+						"code": "441721",
+						"name": "阳西县"
+					},
+					{
+						"code": "441781",
+						"name": "阳春市"
+					}
+				]
+			},
+			{
+				"code": "441800",
+				"name": "清远市",
+				"children": [{
+						"code": "441802",
+						"name": "清城区"
+					},
+					{
+						"code": "441803",
+						"name": "清新区"
+					},
+					{
+						"code": "441821",
+						"name": "佛冈县"
+					},
+					{
+						"code": "441823",
+						"name": "阳山县"
+					},
+					{
+						"code": "441825",
+						"name": "连山壮族瑶族自治县"
+					},
+					{
+						"code": "441826",
+						"name": "连南瑶族自治县"
+					},
+					{
+						"code": "441881",
+						"name": "英德市"
+					},
+					{
+						"code": "441882",
+						"name": "连州市"
+					}
+				]
+			},
+			{
+				"code": "441900",
+				"name": "东莞市",
+				"children": []
+			},
+			{
+				"code": "442000",
+				"name": "中山市",
+				"children": []
+			},
+			{
+				"code": "445100",
+				"name": "潮州市",
+				"children": [{
+						"code": "445102",
+						"name": "湘桥区"
+					},
+					{
+						"code": "445103",
+						"name": "潮安区"
+					},
+					{
+						"code": "445122",
+						"name": "饶平县"
+					}
+				]
+			},
+			{
+				"code": "445200",
+				"name": "揭阳市",
+				"children": [{
+						"code": "445202",
+						"name": "榕城区"
+					},
+					{
+						"code": "445203",
+						"name": "揭东区"
+					},
+					{
+						"code": "445222",
+						"name": "揭西县"
+					},
+					{
+						"code": "445224",
+						"name": "惠来县"
+					},
+					{
+						"code": "445281",
+						"name": "普宁市"
+					}
+				]
+			},
+			{
+				"code": "445300",
+				"name": "云浮市",
+				"children": [{
+						"code": "445302",
+						"name": "云城区"
+					},
+					{
+						"code": "445303",
+						"name": "云安区"
+					},
+					{
+						"code": "445321",
+						"name": "新兴县"
+					},
+					{
+						"code": "445322",
+						"name": "郁南县"
+					},
+					{
+						"code": "445381",
+						"name": "罗定市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "450000",
+		"name": "广西壮族自治区",
+		"children": [{
+				"code": "450100",
+				"name": "南宁市",
+				"children": [{
+						"code": "450102",
+						"name": "兴宁区"
+					},
+					{
+						"code": "450103",
+						"name": "青秀区"
+					},
+					{
+						"code": "450105",
+						"name": "江南区"
+					},
+					{
+						"code": "450107",
+						"name": "西乡塘区"
+					},
+					{
+						"code": "450108",
+						"name": "良庆区"
+					},
+					{
+						"code": "450109",
+						"name": "邕宁区"
+					},
+					{
+						"code": "450110",
+						"name": "武鸣区"
+					},
+					{
+						"code": "450123",
+						"name": "隆安县"
+					},
+					{
+						"code": "450124",
+						"name": "马山县"
+					},
+					{
+						"code": "450125",
+						"name": "上林县"
+					},
+					{
+						"code": "450126",
+						"name": "宾阳县"
+					},
+					{
+						"code": "450127",
+						"name": "横县"
+					}
+				]
+			},
+			{
+				"code": "450200",
+				"name": "柳州市",
+				"children": [{
+						"code": "450202",
+						"name": "城中区"
+					},
+					{
+						"code": "450203",
+						"name": "鱼峰区"
+					},
+					{
+						"code": "450204",
+						"name": "柳南区"
+					},
+					{
+						"code": "450205",
+						"name": "柳北区"
+					},
+					{
+						"code": "450206",
+						"name": "柳江区"
+					},
+					{
+						"code": "450222",
+						"name": "柳城县"
+					},
+					{
+						"code": "450223",
+						"name": "鹿寨县"
+					},
+					{
+						"code": "450224",
+						"name": "融安县"
+					},
+					{
+						"code": "450225",
+						"name": "融水苗族自治县"
+					},
+					{
+						"code": "450226",
+						"name": "三江侗族自治县"
+					}
+				]
+			},
+			{
+				"code": "450300",
+				"name": "桂林市",
+				"children": [{
+						"code": "450302",
+						"name": "秀峰区"
+					},
+					{
+						"code": "450303",
+						"name": "叠彩区"
+					},
+					{
+						"code": "450304",
+						"name": "象山区"
+					},
+					{
+						"code": "450305",
+						"name": "七星区"
+					},
+					{
+						"code": "450311",
+						"name": "雁山区"
+					},
+					{
+						"code": "450312",
+						"name": "临桂区"
+					},
+					{
+						"code": "450321",
+						"name": "阳朔县"
+					},
+					{
+						"code": "450323",
+						"name": "灵川县"
+					},
+					{
+						"code": "450324",
+						"name": "全州县"
+					},
+					{
+						"code": "450325",
+						"name": "兴安县"
+					},
+					{
+						"code": "450326",
+						"name": "永福县"
+					},
+					{
+						"code": "450327",
+						"name": "灌阳县"
+					},
+					{
+						"code": "450328",
+						"name": "龙胜各族自治县"
+					},
+					{
+						"code": "450329",
+						"name": "资源县"
+					},
+					{
+						"code": "450330",
+						"name": "平乐县"
+					},
+					{
+						"code": "450381",
+						"name": "荔浦市"
+					},
+					{
+						"code": "450332",
+						"name": "恭城瑶族自治县"
+					}
+				]
+			},
+			{
+				"code": "450400",
+				"name": "梧州市",
+				"children": [{
+						"code": "450403",
+						"name": "万秀区"
+					},
+					{
+						"code": "450405",
+						"name": "长洲区"
+					},
+					{
+						"code": "450406",
+						"name": "龙圩区"
+					},
+					{
+						"code": "450421",
+						"name": "苍梧县"
+					},
+					{
+						"code": "450422",
+						"name": "藤县"
+					},
+					{
+						"code": "450423",
+						"name": "蒙山县"
+					},
+					{
+						"code": "450481",
+						"name": "岑溪市"
+					}
+				]
+			},
+			{
+				"code": "450500",
+				"name": "北海市",
+				"children": [{
+						"code": "450502",
+						"name": "海城区"
+					},
+					{
+						"code": "450503",
+						"name": "银海区"
+					},
+					{
+						"code": "450512",
+						"name": "铁山港区"
+					},
+					{
+						"code": "450521",
+						"name": "合浦县"
+					}
+				]
+			},
+			{
+				"code": "450600",
+				"name": "防城港市",
+				"children": [{
+						"code": "450602",
+						"name": "港口区"
+					},
+					{
+						"code": "450603",
+						"name": "防城区"
+					},
+					{
+						"code": "450621",
+						"name": "上思县"
+					},
+					{
+						"code": "450681",
+						"name": "东兴市"
+					}
+				]
+			},
+			{
+				"code": "450700",
+				"name": "钦州市",
+				"children": [{
+						"code": "450702",
+						"name": "钦南区"
+					},
+					{
+						"code": "450703",
+						"name": "钦北区"
+					},
+					{
+						"code": "450721",
+						"name": "灵山县"
+					},
+					{
+						"code": "450722",
+						"name": "浦北县"
+					}
+				]
+			},
+			{
+				"code": "450800",
+				"name": "贵港市",
+				"children": [{
+						"code": "450802",
+						"name": "港北区"
+					},
+					{
+						"code": "450803",
+						"name": "港南区"
+					},
+					{
+						"code": "450804",
+						"name": "覃塘区"
+					},
+					{
+						"code": "450821",
+						"name": "平南县"
+					},
+					{
+						"code": "450881",
+						"name": "桂平市"
+					}
+				]
+			},
+			{
+				"code": "450900",
+				"name": "玉林市",
+				"children": [{
+						"code": "450902",
+						"name": "玉州区"
+					},
+					{
+						"code": "450903",
+						"name": "福绵区"
+					},
+					{
+						"code": "450921",
+						"name": "容县"
+					},
+					{
+						"code": "450922",
+						"name": "陆川县"
+					},
+					{
+						"code": "450923",
+						"name": "博白县"
+					},
+					{
+						"code": "450924",
+						"name": "兴业县"
+					},
+					{
+						"code": "450981",
+						"name": "北流市"
+					}
+				]
+			},
+			{
+				"code": "451000",
+				"name": "百色市",
+				"children": [{
+						"code": "451002",
+						"name": "右江区"
+					},
+					{
+						"code": "451021",
+						"name": "田阳县"
+					},
+					{
+						"code": "451022",
+						"name": "田东县"
+					},
+					{
+						"code": "451023",
+						"name": "平果县"
+					},
+					{
+						"code": "451024",
+						"name": "德保县"
+					},
+					{
+						"code": "451026",
+						"name": "那坡县"
+					},
+					{
+						"code": "451027",
+						"name": "凌云县"
+					},
+					{
+						"code": "451028",
+						"name": "乐业县"
+					},
+					{
+						"code": "451029",
+						"name": "田林县"
+					},
+					{
+						"code": "451030",
+						"name": "西林县"
+					},
+					{
+						"code": "451031",
+						"name": "隆林各族自治县"
+					},
+					{
+						"code": "451081",
+						"name": "靖西市"
+					}
+				]
+			},
+			{
+				"code": "451100",
+				"name": "贺州市",
+				"children": [{
+						"code": "451102",
+						"name": "八步区"
+					},
+					{
+						"code": "451103",
+						"name": "平桂区"
+					},
+					{
+						"code": "451121",
+						"name": "昭平县"
+					},
+					{
+						"code": "451122",
+						"name": "钟山县"
+					},
+					{
+						"code": "451123",
+						"name": "富川瑶族自治县"
+					}
+				]
+			},
+			{
+				"code": "451200",
+				"name": "河池市",
+				"children": [{
+						"code": "451202",
+						"name": "金城江区"
+					},
+					{
+						"code": "451203",
+						"name": "宜州区"
+					},
+					{
+						"code": "451221",
+						"name": "南丹县"
+					},
+					{
+						"code": "451222",
+						"name": "天峨县"
+					},
+					{
+						"code": "451223",
+						"name": "凤山县"
+					},
+					{
+						"code": "451224",
+						"name": "东兰县"
+					},
+					{
+						"code": "451225",
+						"name": "罗城仫佬族自治县"
+					},
+					{
+						"code": "451226",
+						"name": "环江毛南族自治县"
+					},
+					{
+						"code": "451227",
+						"name": "巴马瑶族自治县"
+					},
+					{
+						"code": "451228",
+						"name": "都安瑶族自治县"
+					},
+					{
+						"code": "451229",
+						"name": "大化瑶族自治县"
+					}
+				]
+			},
+			{
+				"code": "451300",
+				"name": "来宾市",
+				"children": [{
+						"code": "451302",
+						"name": "兴宾区"
+					},
+					{
+						"code": "451321",
+						"name": "忻城县"
+					},
+					{
+						"code": "451322",
+						"name": "象州县"
+					},
+					{
+						"code": "451323",
+						"name": "武宣县"
+					},
+					{
+						"code": "451324",
+						"name": "金秀瑶族自治县"
+					},
+					{
+						"code": "451381",
+						"name": "合山市"
+					}
+				]
+			},
+			{
+				"code": "451400",
+				"name": "崇左市",
+				"children": [{
+						"code": "451402",
+						"name": "江州区"
+					},
+					{
+						"code": "451421",
+						"name": "扶绥县"
+					},
+					{
+						"code": "451422",
+						"name": "宁明县"
+					},
+					{
+						"code": "451423",
+						"name": "龙州县"
+					},
+					{
+						"code": "451424",
+						"name": "大新县"
+					},
+					{
+						"code": "451425",
+						"name": "天等县"
+					},
+					{
+						"code": "451481",
+						"name": "凭祥市"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "460000",
+		"name": "海南省",
+		"children": [{
+				"code": "460100",
+				"name": "海口市",
+				"children": [{
+						"code": "460105",
+						"name": "秀英区"
+					},
+					{
+						"code": "460106",
+						"name": "龙华区"
+					},
+					{
+						"code": "460107",
+						"name": "琼山区"
+					},
+					{
+						"code": "460108",
+						"name": "美兰区"
+					}
+				]
+			},
+			{
+				"code": "460200",
+				"name": "三亚市",
+				"children": [{
+						"code": "460202",
+						"name": "海棠区"
+					},
+					{
+						"code": "460203",
+						"name": "吉阳区"
+					},
+					{
+						"code": "460204",
+						"name": "天涯区"
+					},
+					{
+						"code": "460205",
+						"name": "崖州区"
+					}
+				]
+			},
+			{
+				"code": "460300",
+				"name": "三沙市",
+				"children": []
+			},
+			{
+				"code": "460400",
+				"name": "儋州市",
+				"children": []
+			}
+		]
+	},
+	{
+		"code": "500000",
+		"name": "重庆市",
+		"children": [{
+			"code": "500000",
+			"name": "重庆市",
+			"children": [{
+					"code": "500101",
+					"name": "万州区"
+				},
+				{
+					"code": "500102",
+					"name": "涪陵区"
+				},
+				{
+					"code": "500103",
+					"name": "渝中区"
+				},
+				{
+					"code": "500104",
+					"name": "大渡口区"
+				},
+				{
+					"code": "500105",
+					"name": "江北区"
+				},
+				{
+					"code": "500106",
+					"name": "沙坪坝区"
+				},
+				{
+					"code": "500107",
+					"name": "九龙坡区"
+				},
+				{
+					"code": "500108",
+					"name": "南岸区"
+				},
+				{
+					"code": "500109",
+					"name": "北碚区"
+				},
+				{
+					"code": "500110",
+					"name": "綦江区"
+				},
+				{
+					"code": "500111",
+					"name": "大足区"
+				},
+				{
+					"code": "500112",
+					"name": "渝北区"
+				},
+				{
+					"code": "500113",
+					"name": "巴南区"
+				},
+				{
+					"code": "500114",
+					"name": "黔江区"
+				},
+				{
+					"code": "500115",
+					"name": "长寿区"
+				},
+				{
+					"code": "500116",
+					"name": "江津区"
+				},
+				{
+					"code": "500117",
+					"name": "合川区"
+				},
+				{
+					"code": "500118",
+					"name": "永川区"
+				},
+				{
+					"code": "500119",
+					"name": "南川区"
+				},
+				{
+					"code": "500120",
+					"name": "璧山区"
+				},
+				{
+					"code": "500151",
+					"name": "铜梁区"
+				},
+				{
+					"code": "500152",
+					"name": "潼南区"
+				},
+				{
+					"code": "500153",
+					"name": "荣昌区"
+				},
+				{
+					"code": "500154",
+					"name": "开州区"
+				},
+				{
+					"code": "500155",
+					"name": "梁平区"
+				},
+				{
+					"code": "500156",
+					"name": "武隆区"
+				},
+				{
+					"code": "500229",
+					"name": "城口县"
+				},
+				{
+					"code": "500230",
+					"name": "丰都县"
+				},
+				{
+					"code": "500231",
+					"name": "垫江县"
+				},
+				{
+					"code": "500233",
+					"name": "忠县"
+				},
+				{
+					"code": "500235",
+					"name": "云阳县"
+				},
+				{
+					"code": "500236",
+					"name": "奉节县"
+				},
+				{
+					"code": "500237",
+					"name": "巫山县"
+				},
+				{
+					"code": "500238",
+					"name": "巫溪县"
+				},
+				{
+					"code": "500240",
+					"name": "石柱土家族自治县"
+				},
+				{
+					"code": "500241",
+					"name": "秀山土家族苗族自治县"
+				},
+				{
+					"code": "500242",
+					"name": "酉阳土家族苗族自治县"
+				},
+				{
+					"code": "500243",
+					"name": "彭水苗族土家族自治县"
+				}
+			]
+		}]
+	},
+	{
+		"code": "510000",
+		"name": "四川省",
+		"children": [{
+				"code": "510100",
+				"name": "成都市",
+				"children": [{
+						"code": "510104",
+						"name": "锦江区"
+					},
+					{
+						"code": "510105",
+						"name": "青羊区"
+					},
+					{
+						"code": "510106",
+						"name": "金牛区"
+					},
+					{
+						"code": "510107",
+						"name": "武侯区"
+					},
+					{
+						"code": "510108",
+						"name": "成华区"
+					},
+					{
+						"code": "510112",
+						"name": "龙泉驿区"
+					},
+					{
+						"code": "510113",
+						"name": "青白江区"
+					},
+					{
+						"code": "510114",
+						"name": "新都区"
+					},
+					{
+						"code": "510115",
+						"name": "温江区"
+					},
+					{
+						"code": "510116",
+						"name": "双流区"
+					},
+					{
+						"code": "510117",
+						"name": "郫都区"
+					},
+					{
+						"code": "510121",
+						"name": "金堂县"
+					},
+					{
+						"code": "510129",
+						"name": "大邑县"
+					},
+					{
+						"code": "510131",
+						"name": "蒲江县"
+					},
+					{
+						"code": "510132",
+						"name": "新津县"
+					},
+					{
+						"code": "510181",
+						"name": "都江堰市"
+					},
+					{
+						"code": "510182",
+						"name": "彭州市"
+					},
+					{
+						"code": "510183",
+						"name": "邛崃市"
+					},
+					{
+						"code": "510184",
+						"name": "崇州市"
+					},
+					{
+						"code": "510185",
+						"name": "简阳市"
+					}
+				]
+			},
+			{
+				"code": "510300",
+				"name": "自贡市",
+				"children": [{
+						"code": "510302",
+						"name": "自流井区"
+					},
+					{
+						"code": "510303",
+						"name": "贡井区"
+					},
+					{
+						"code": "510304",
+						"name": "大安区"
+					},
+					{
+						"code": "510311",
+						"name": "沿滩区"
+					},
+					{
+						"code": "510321",
+						"name": "荣县"
+					},
+					{
+						"code": "510322",
+						"name": "富顺县"
+					}
+				]
+			},
+			{
+				"code": "510400",
+				"name": "攀枝花市",
+				"children": [{
+						"code": "510402",
+						"name": "东区"
+					},
+					{
+						"code": "510403",
+						"name": "西区"
+					},
+					{
+						"code": "510411",
+						"name": "仁和区"
+					},
+					{
+						"code": "510421",
+						"name": "米易县"
+					},
+					{
+						"code": "510422",
+						"name": "盐边县"
+					}
+				]
+			},
+			{
+				"code": "510500",
+				"name": "泸州市",
+				"children": [{
+						"code": "510502",
+						"name": "江阳区"
+					},
+					{
+						"code": "510503",
+						"name": "纳溪区"
+					},
+					{
+						"code": "510504",
+						"name": "龙马潭区"
+					},
+					{
+						"code": "510521",
+						"name": "泸县"
+					},
+					{
+						"code": "510522",
+						"name": "合江县"
+					},
+					{
+						"code": "510524",
+						"name": "叙永县"
+					},
+					{
+						"code": "510525",
+						"name": "古蔺县"
+					}
+				]
+			},
+			{
+				"code": "510600",
+				"name": "德阳市",
+				"children": [{
+						"code": "510603",
+						"name": "旌阳区"
+					},
+					{
+						"code": "510604",
+						"name": "罗江区"
+					},
+					{
+						"code": "510623",
+						"name": "中江县"
+					},
+					{
+						"code": "510681",
+						"name": "广汉市"
+					},
+					{
+						"code": "510682",
+						"name": "什邡市"
+					},
+					{
+						"code": "510683",
+						"name": "绵竹市"
+					}
+				]
+			},
+			{
+				"code": "510700",
+				"name": "绵阳市",
+				"children": [{
+						"code": "510703",
+						"name": "涪城区"
+					},
+					{
+						"code": "510704",
+						"name": "游仙区"
+					},
+					{
+						"code": "510705",
+						"name": "安州区"
+					},
+					{
+						"code": "510722",
+						"name": "三台县"
+					},
+					{
+						"code": "510723",
+						"name": "盐亭县"
+					},
+					{
+						"code": "510725",
+						"name": "梓潼县"
+					},
+					{
+						"code": "510726",
+						"name": "北川羌族自治县"
+					},
+					{
+						"code": "510727",
+						"name": "平武县"
+					},
+					{
+						"code": "510781",
+						"name": "江油市"
+					}
+				]
+			},
+			{
+				"code": "510800",
+				"name": "广元市",
+				"children": [{
+						"code": "510802",
+						"name": "利州区"
+					},
+					{
+						"code": "510811",
+						"name": "昭化区"
+					},
+					{
+						"code": "510812",
+						"name": "朝天区"
+					},
+					{
+						"code": "510821",
+						"name": "旺苍县"
+					},
+					{
+						"code": "510822",
+						"name": "青川县"
+					},
+					{
+						"code": "510823",
+						"name": "剑阁县"
+					},
+					{
+						"code": "510824",
+						"name": "苍溪县"
+					}
+				]
+			},
+			{
+				"code": "510900",
+				"name": "遂宁市",
+				"children": [{
+						"code": "510903",
+						"name": "船山区"
+					},
+					{
+						"code": "510904",
+						"name": "安居区"
+					},
+					{
+						"code": "510921",
+						"name": "蓬溪县"
+					},
+					{
+						"code": "510922",
+						"name": "射洪县"
+					},
+					{
+						"code": "510923",
+						"name": "大英县"
+					}
+				]
+			},
+			{
+				"code": "511000",
+				"name": "内江市",
+				"children": [{
+						"code": "511002",
+						"name": "市中区"
+					},
+					{
+						"code": "511011",
+						"name": "东兴区"
+					},
+					{
+						"code": "511024",
+						"name": "威远县"
+					},
+					{
+						"code": "511025",
+						"name": "资中县"
+					},
+					{
+						"code": "511083",
+						"name": "隆昌市"
+					}
+				]
+			},
+			{
+				"code": "511100",
+				"name": "乐山市",
+				"children": [{
+						"code": "511102",
+						"name": "市中区"
+					},
+					{
+						"code": "511111",
+						"name": "沙湾区"
+					},
+					{
+						"code": "511112",
+						"name": "五通桥区"
+					},
+					{
+						"code": "511113",
+						"name": "金口河区"
+					},
+					{
+						"code": "511123",
+						"name": "犍为县"
+					},
+					{
+						"code": "511124",
+						"name": "井研县"
+					},
+					{
+						"code": "511126",
+						"name": "夹江县"
+					},
+					{
+						"code": "511129",
+						"name": "沐川县"
+					},
+					{
+						"code": "511132",
+						"name": "峨边彝族自治县"
+					},
+					{
+						"code": "511133",
+						"name": "马边彝族自治县"
+					},
+					{
+						"code": "511181",
+						"name": "峨眉山市"
+					}
+				]
+			},
+			{
+				"code": "511300",
+				"name": "南充市",
+				"children": [{
+						"code": "511302",
+						"name": "顺庆区"
+					},
+					{
+						"code": "511303",
+						"name": "高坪区"
+					},
+					{
+						"code": "511304",
+						"name": "嘉陵区"
+					},
+					{
+						"code": "511321",
+						"name": "南部县"
+					},
+					{
+						"code": "511322",
+						"name": "营山县"
+					},
+					{
+						"code": "511323",
+						"name": "蓬安县"
+					},
+					{
+						"code": "511324",
+						"name": "仪陇县"
+					},
+					{
+						"code": "511325",
+						"name": "西充县"
+					},
+					{
+						"code": "511381",
+						"name": "阆中市"
+					}
+				]
+			},
+			{
+				"code": "511400",
+				"name": "眉山市",
+				"children": [{
+						"code": "511402",
+						"name": "东坡区"
+					},
+					{
+						"code": "511403",
+						"name": "彭山区"
+					},
+					{
+						"code": "511421",
+						"name": "仁寿县"
+					},
+					{
+						"code": "511423",
+						"name": "洪雅县"
+					},
+					{
+						"code": "511424",
+						"name": "丹棱县"
+					},
+					{
+						"code": "511425",
+						"name": "青神县"
+					}
+				]
+			},
+			{
+				"code": "511500",
+				"name": "宜宾市",
+				"children": [{
+						"code": "511502",
+						"name": "翠屏区"
+					},
+					{
+						"code": "511503",
+						"name": "南溪区"
+					},
+					{
+						"code": "511521",
+						"name": "宜宾县"
+					},
+					{
+						"code": "511523",
+						"name": "江安县"
+					},
+					{
+						"code": "511524",
+						"name": "长宁县"
+					},
+					{
+						"code": "511525",
+						"name": "高县"
+					},
+					{
+						"code": "511526",
+						"name": "珙县"
+					},
+					{
+						"code": "511527",
+						"name": "筠连县"
+					},
+					{
+						"code": "511528",
+						"name": "兴文县"
+					},
+					{
+						"code": "511529",
+						"name": "屏山县"
+					}
+				]
+			},
+			{
+				"code": "511600",
+				"name": "广安市",
+				"children": [{
+						"code": "511602",
+						"name": "广安区"
+					},
+					{
+						"code": "511603",
+						"name": "前锋区"
+					},
+					{
+						"code": "511621",
+						"name": "岳池县"
+					},
+					{
+						"code": "511622",
+						"name": "武胜县"
+					},
+					{
+						"code": "511623",
+						"name": "邻水县"
+					},
+					{
+						"code": "511681",
+						"name": "华蓥市"
+					}
+				]
+			},
+			{
+				"code": "511700",
+				"name": "达州市",
+				"children": [{
+						"code": "511702",
+						"name": "通川区"
+					},
+					{
+						"code": "511703",
+						"name": "达川区"
+					},
+					{
+						"code": "511722",
+						"name": "宣汉县"
+					},
+					{
+						"code": "511723",
+						"name": "开江县"
+					},
+					{
+						"code": "511724",
+						"name": "大竹县"
+					},
+					{
+						"code": "511725",
+						"name": "渠县"
+					},
+					{
+						"code": "511781",
+						"name": "万源市"
+					}
+				]
+			},
+			{
+				"code": "511800",
+				"name": "雅安市",
+				"children": [{
+						"code": "511802",
+						"name": "雨城区"
+					},
+					{
+						"code": "511803",
+						"name": "名山区"
+					},
+					{
+						"code": "511822",
+						"name": "荥经县"
+					},
+					{
+						"code": "511823",
+						"name": "汉源县"
+					},
+					{
+						"code": "511824",
+						"name": "石棉县"
+					},
+					{
+						"code": "511825",
+						"name": "天全县"
+					},
+					{
+						"code": "511826",
+						"name": "芦山县"
+					},
+					{
+						"code": "511827",
+						"name": "宝兴县"
+					}
+				]
+			},
+			{
+				"code": "511900",
+				"name": "巴中市",
+				"children": [{
+						"code": "511902",
+						"name": "巴州区"
+					},
+					{
+						"code": "511903",
+						"name": "恩阳区"
+					},
+					{
+						"code": "511921",
+						"name": "通江县"
+					},
+					{
+						"code": "511922",
+						"name": "南江县"
+					},
+					{
+						"code": "511923",
+						"name": "平昌县"
+					}
+				]
+			},
+			{
+				"code": "512000",
+				"name": "资阳市",
+				"children": [{
+						"code": "512002",
+						"name": "雁江区"
+					},
+					{
+						"code": "512021",
+						"name": "安岳县"
+					},
+					{
+						"code": "512022",
+						"name": "乐至县"
+					}
+				]
+			},
+			{
+				"code": "513200",
+				"name": "阿坝藏族羌族自治州",
+				"children": [{
+						"code": "513201",
+						"name": "马尔康市"
+					},
+					{
+						"code": "513221",
+						"name": "汶川县"
+					},
+					{
+						"code": "513222",
+						"name": "理县"
+					},
+					{
+						"code": "513223",
+						"name": "茂县"
+					},
+					{
+						"code": "513224",
+						"name": "松潘县"
+					},
+					{
+						"code": "513225",
+						"name": "九寨沟县"
+					},
+					{
+						"code": "513226",
+						"name": "金川县"
+					},
+					{
+						"code": "513227",
+						"name": "小金县"
+					},
+					{
+						"code": "513228",
+						"name": "黑水县"
+					},
+					{
+						"code": "513230",
+						"name": "壤塘县"
+					},
+					{
+						"code": "513231",
+						"name": "阿坝县"
+					},
+					{
+						"code": "513232",
+						"name": "若尔盖县"
+					},
+					{
+						"code": "513233",
+						"name": "红原县"
+					}
+				]
+			},
+			{
+				"code": "513300",
+				"name": "甘孜藏族自治州",
+				"children": [{
+						"code": "513301",
+						"name": "康定市"
+					},
+					{
+						"code": "513322",
+						"name": "泸定县"
+					},
+					{
+						"code": "513323",
+						"name": "丹巴县"
+					},
+					{
+						"code": "513324",
+						"name": "九龙县"
+					},
+					{
+						"code": "513325",
+						"name": "雅江县"
+					},
+					{
+						"code": "513326",
+						"name": "道孚县"
+					},
+					{
+						"code": "513327",
+						"name": "炉霍县"
+					},
+					{
+						"code": "513328",
+						"name": "甘孜县"
+					},
+					{
+						"code": "513329",
+						"name": "新龙县"
+					},
+					{
+						"code": "513330",
+						"name": "德格县"
+					},
+					{
+						"code": "513331",
+						"name": "白玉县"
+					},
+					{
+						"code": "513332",
+						"name": "石渠县"
+					},
+					{
+						"code": "513333",
+						"name": "色达县"
+					},
+					{
+						"code": "513334",
+						"name": "理塘县"
+					},
+					{
+						"code": "513335",
+						"name": "巴塘县"
+					},
+					{
+						"code": "513336",
+						"name": "乡城县"
+					},
+					{
+						"code": "513337",
+						"name": "稻城县"
+					},
+					{
+						"code": "513338",
+						"name": "得荣县"
+					}
+				]
+			},
+			{
+				"code": "513400",
+				"name": "凉山彝族自治州",
+				"children": [{
+						"code": "513401",
+						"name": "西昌市"
+					},
+					{
+						"code": "513422",
+						"name": "木里藏族自治县"
+					},
+					{
+						"code": "513423",
+						"name": "盐源县"
+					},
+					{
+						"code": "513424",
+						"name": "德昌县"
+					},
+					{
+						"code": "513425",
+						"name": "会理县"
+					},
+					{
+						"code": "513426",
+						"name": "会东县"
+					},
+					{
+						"code": "513427",
+						"name": "宁南县"
+					},
+					{
+						"code": "513428",
+						"name": "普格县"
+					},
+					{
+						"code": "513429",
+						"name": "布拖县"
+					},
+					{
+						"code": "513430",
+						"name": "金阳县"
+					},
+					{
+						"code": "513431",
+						"name": "昭觉县"
+					},
+					{
+						"code": "513432",
+						"name": "喜德县"
+					},
+					{
+						"code": "513433",
+						"name": "冕宁县"
+					},
+					{
+						"code": "513434",
+						"name": "越西县"
+					},
+					{
+						"code": "513435",
+						"name": "甘洛县"
+					},
+					{
+						"code": "513436",
+						"name": "美姑县"
+					},
+					{
+						"code": "513437",
+						"name": "雷波县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "520000",
+		"name": "贵州省",
+		"children": [{
+				"code": "520100",
+				"name": "贵阳市",
+				"children": [{
+						"code": "520102",
+						"name": "南明区"
+					},
+					{
+						"code": "520103",
+						"name": "云岩区"
+					},
+					{
+						"code": "520111",
+						"name": "花溪区"
+					},
+					{
+						"code": "520112",
+						"name": "乌当区"
+					},
+					{
+						"code": "520113",
+						"name": "白云区"
+					},
+					{
+						"code": "520115",
+						"name": "观山湖区"
+					},
+					{
+						"code": "520121",
+						"name": "开阳县"
+					},
+					{
+						"code": "520122",
+						"name": "息烽县"
+					},
+					{
+						"code": "520123",
+						"name": "修文县"
+					},
+					{
+						"code": "520181",
+						"name": "清镇市"
+					}
+				]
+			},
+			{
+				"code": "520200",
+				"name": "六盘水市",
+				"children": [{
+						"code": "520201",
+						"name": "钟山区"
+					},
+					{
+						"code": "520203",
+						"name": "六枝特区"
+					},
+					{
+						"code": "520221",
+						"name": "水城县"
+					},
+					{
+						"code": "520281",
+						"name": "盘州市"
+					}
+				]
+			},
+			{
+				"code": "520300",
+				"name": "遵义市",
+				"children": [{
+						"code": "520302",
+						"name": "红花岗区"
+					},
+					{
+						"code": "520303",
+						"name": "汇川区"
+					},
+					{
+						"code": "520304",
+						"name": "播州区"
+					},
+					{
+						"code": "520322",
+						"name": "桐梓县"
+					},
+					{
+						"code": "520323",
+						"name": "绥阳县"
+					},
+					{
+						"code": "520324",
+						"name": "正安县"
+					},
+					{
+						"code": "520325",
+						"name": "道真仡佬族苗族自治县"
+					},
+					{
+						"code": "520326",
+						"name": "务川仡佬族苗族自治县"
+					},
+					{
+						"code": "520327",
+						"name": "凤冈县"
+					},
+					{
+						"code": "520328",
+						"name": "湄潭县"
+					},
+					{
+						"code": "520329",
+						"name": "余庆县"
+					},
+					{
+						"code": "520330",
+						"name": "习水县"
+					},
+					{
+						"code": "520381",
+						"name": "赤水市"
+					},
+					{
+						"code": "520382",
+						"name": "仁怀市"
+					}
+				]
+			},
+			{
+				"code": "520400",
+				"name": "安顺市",
+				"children": [{
+						"code": "520402",
+						"name": "西秀区"
+					},
+					{
+						"code": "520403",
+						"name": "平坝区"
+					},
+					{
+						"code": "520422",
+						"name": "普定县"
+					},
+					{
+						"code": "520423",
+						"name": "镇宁布依族苗族自治县"
+					},
+					{
+						"code": "520424",
+						"name": "关岭布依族苗族自治县"
+					},
+					{
+						"code": "520425",
+						"name": "紫云苗族布依族自治县"
+					}
+				]
+			},
+			{
+				"code": "520500",
+				"name": "毕节市",
+				"children": [{
+						"code": "520502",
+						"name": "七星关区"
+					},
+					{
+						"code": "520521",
+						"name": "大方县"
+					},
+					{
+						"code": "520522",
+						"name": "黔西县"
+					},
+					{
+						"code": "520523",
+						"name": "金沙县"
+					},
+					{
+						"code": "520524",
+						"name": "织金县"
+					},
+					{
+						"code": "520525",
+						"name": "纳雍县"
+					},
+					{
+						"code": "520526",
+						"name": "威宁彝族回族苗族自治县"
+					},
+					{
+						"code": "520527",
+						"name": "赫章县"
+					}
+				]
+			},
+			{
+				"code": "520600",
+				"name": "铜仁市",
+				"children": [{
+						"code": "520602",
+						"name": "碧江区"
+					},
+					{
+						"code": "520603",
+						"name": "万山区"
+					},
+					{
+						"code": "520621",
+						"name": "江口县"
+					},
+					{
+						"code": "520622",
+						"name": "玉屏侗族自治县"
+					},
+					{
+						"code": "520623",
+						"name": "石阡县"
+					},
+					{
+						"code": "520624",
+						"name": "思南县"
+					},
+					{
+						"code": "520625",
+						"name": "印江土家族苗族自治县"
+					},
+					{
+						"code": "520626",
+						"name": "德江县"
+					},
+					{
+						"code": "520627",
+						"name": "沿河土家族自治县"
+					},
+					{
+						"code": "520628",
+						"name": "松桃苗族自治县"
+					}
+				]
+			},
+			{
+				"code": "522300",
+				"name": "黔西南布依族苗族自治州",
+				"children": [{
+						"code": "522301",
+						"name": "兴义市"
+					},
+					{
+						"code": "522322",
+						"name": "兴仁县"
+					},
+					{
+						"code": "522323",
+						"name": "普安县"
+					},
+					{
+						"code": "522324",
+						"name": "晴隆县"
+					},
+					{
+						"code": "522325",
+						"name": "贞丰县"
+					},
+					{
+						"code": "522326",
+						"name": "望谟县"
+					},
+					{
+						"code": "522327",
+						"name": "册亨县"
+					},
+					{
+						"code": "522328",
+						"name": "安龙县"
+					}
+				]
+			},
+			{
+				"code": "522600",
+				"name": "黔东南苗族侗族自治州",
+				"children": [{
+						"code": "522601",
+						"name": "凯里市"
+					},
+					{
+						"code": "522622",
+						"name": "黄平县"
+					},
+					{
+						"code": "522623",
+						"name": "施秉县"
+					},
+					{
+						"code": "522624",
+						"name": "三穗县"
+					},
+					{
+						"code": "522625",
+						"name": "镇远县"
+					},
+					{
+						"code": "522626",
+						"name": "岑巩县"
+					},
+					{
+						"code": "522627",
+						"name": "天柱县"
+					},
+					{
+						"code": "522628",
+						"name": "锦屏县"
+					},
+					{
+						"code": "522629",
+						"name": "剑河县"
+					},
+					{
+						"code": "522630",
+						"name": "台江县"
+					},
+					{
+						"code": "522631",
+						"name": "黎平县"
+					},
+					{
+						"code": "522632",
+						"name": "榕江县"
+					},
+					{
+						"code": "522633",
+						"name": "从江县"
+					},
+					{
+						"code": "522634",
+						"name": "雷山县"
+					},
+					{
+						"code": "522635",
+						"name": "麻江县"
+					},
+					{
+						"code": "522636",
+						"name": "丹寨县"
+					}
+				]
+			},
+			{
+				"code": "522700",
+				"name": "黔南布依族苗族自治州",
+				"children": [{
+						"code": "522701",
+						"name": "都匀市"
+					},
+					{
+						"code": "522702",
+						"name": "福泉市"
+					},
+					{
+						"code": "522722",
+						"name": "荔波县"
+					},
+					{
+						"code": "522723",
+						"name": "贵定县"
+					},
+					{
+						"code": "522725",
+						"name": "瓮安县"
+					},
+					{
+						"code": "522726",
+						"name": "独山县"
+					},
+					{
+						"code": "522727",
+						"name": "平塘县"
+					},
+					{
+						"code": "522728",
+						"name": "罗甸县"
+					},
+					{
+						"code": "522729",
+						"name": "长顺县"
+					},
+					{
+						"code": "522730",
+						"name": "龙里县"
+					},
+					{
+						"code": "522731",
+						"name": "惠水县"
+					},
+					{
+						"code": "522732",
+						"name": "三都水族自治县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "530000",
+		"name": "云南省",
+		"children": [{
+				"code": "530100",
+				"name": "昆明市",
+				"children": [{
+						"code": "530102",
+						"name": "五华区"
+					},
+					{
+						"code": "530103",
+						"name": "盘龙区"
+					},
+					{
+						"code": "530111",
+						"name": "官渡区"
+					},
+					{
+						"code": "530112",
+						"name": "西山区"
+					},
+					{
+						"code": "530113",
+						"name": "东川区"
+					},
+					{
+						"code": "530114",
+						"name": "呈贡区"
+					},
+					{
+						"code": "530115",
+						"name": "晋宁区"
+					},
+					{
+						"code": "530124",
+						"name": "富民县"
+					},
+					{
+						"code": "530125",
+						"name": "宜良县"
+					},
+					{
+						"code": "530126",
+						"name": "石林彝族自治县"
+					},
+					{
+						"code": "530127",
+						"name": "嵩明县"
+					},
+					{
+						"code": "530128",
+						"name": "禄劝彝族苗族自治县"
+					},
+					{
+						"code": "530129",
+						"name": "寻甸回族彝族自治县"
+					},
+					{
+						"code": "530181",
+						"name": "安宁市"
+					}
+				]
+			},
+			{
+				"code": "530300",
+				"name": "曲靖市",
+				"children": [{
+						"code": "530302",
+						"name": "麒麟区"
+					},
+					{
+						"code": "530303",
+						"name": "沾益区"
+					},
+					{
+						"code": "530304",
+						"name": "马龙区"
+					},
+					{
+						"code": "530322",
+						"name": "陆良县"
+					},
+					{
+						"code": "530323",
+						"name": "师宗县"
+					},
+					{
+						"code": "530324",
+						"name": "罗平县"
+					},
+					{
+						"code": "530325",
+						"name": "富源县"
+					},
+					{
+						"code": "530326",
+						"name": "会泽县"
+					},
+					{
+						"code": "530381",
+						"name": "宣威市"
+					}
+				]
+			},
+			{
+				"code": "530400",
+				"name": "玉溪市",
+				"children": [{
+						"code": "530402",
+						"name": "红塔区"
+					},
+					{
+						"code": "530403",
+						"name": "江川区"
+					},
+					{
+						"code": "530422",
+						"name": "澄江县"
+					},
+					{
+						"code": "530423",
+						"name": "通海县"
+					},
+					{
+						"code": "530424",
+						"name": "华宁县"
+					},
+					{
+						"code": "530425",
+						"name": "易门县"
+					},
+					{
+						"code": "530426",
+						"name": "峨山彝族自治县"
+					},
+					{
+						"code": "530427",
+						"name": "新平彝族傣族自治县"
+					},
+					{
+						"code": "530428",
+						"name": "元江哈尼族彝族傣族自治县"
+					}
+				]
+			},
+			{
+				"code": "530500",
+				"name": "保山市",
+				"children": [{
+						"code": "530502",
+						"name": "隆阳区"
+					},
+					{
+						"code": "530521",
+						"name": "施甸县"
+					},
+					{
+						"code": "530523",
+						"name": "龙陵县"
+					},
+					{
+						"code": "530524",
+						"name": "昌宁县"
+					},
+					{
+						"code": "530581",
+						"name": "腾冲市"
+					}
+				]
+			},
+			{
+				"code": "530600",
+				"name": "昭通市",
+				"children": [{
+						"code": "530602",
+						"name": "昭阳区"
+					},
+					{
+						"code": "530621",
+						"name": "鲁甸县"
+					},
+					{
+						"code": "530622",
+						"name": "巧家县"
+					},
+					{
+						"code": "530623",
+						"name": "盐津县"
+					},
+					{
+						"code": "530624",
+						"name": "大关县"
+					},
+					{
+						"code": "530625",
+						"name": "永善县"
+					},
+					{
+						"code": "530626",
+						"name": "绥江县"
+					},
+					{
+						"code": "530627",
+						"name": "镇雄县"
+					},
+					{
+						"code": "530628",
+						"name": "彝良县"
+					},
+					{
+						"code": "530629",
+						"name": "威信县"
+					},
+					{
+						"code": "530681",
+						"name": "水富市"
+					}
+				]
+			},
+			{
+				"code": "530700",
+				"name": "丽江市",
+				"children": [{
+						"code": "530702",
+						"name": "古城区"
+					},
+					{
+						"code": "530721",
+						"name": "玉龙纳西族自治县"
+					},
+					{
+						"code": "530722",
+						"name": "永胜县"
+					},
+					{
+						"code": "530723",
+						"name": "华坪县"
+					},
+					{
+						"code": "530724",
+						"name": "宁蒗彝族自治县"
+					}
+				]
+			},
+			{
+				"code": "530800",
+				"name": "普洱市",
+				"children": [{
+						"code": "530802",
+						"name": "思茅区"
+					},
+					{
+						"code": "530821",
+						"name": "宁洱哈尼族彝族自治县"
+					},
+					{
+						"code": "530822",
+						"name": "墨江哈尼族自治县"
+					},
+					{
+						"code": "530823",
+						"name": "景东彝族自治县"
+					},
+					{
+						"code": "530824",
+						"name": "景谷傣族彝族自治县"
+					},
+					{
+						"code": "530825",
+						"name": "镇沅彝族哈尼族拉祜族自治县"
+					},
+					{
+						"code": "530826",
+						"name": "江城哈尼族彝族自治县"
+					},
+					{
+						"code": "530827",
+						"name": "孟连傣族拉祜族佤族自治县"
+					},
+					{
+						"code": "530828",
+						"name": "澜沧拉祜族自治县"
+					},
+					{
+						"code": "530829",
+						"name": "西盟佤族自治县"
+					}
+				]
+			},
+			{
+				"code": "530900",
+				"name": "临沧市",
+				"children": [{
+						"code": "530902",
+						"name": "临翔区"
+					},
+					{
+						"code": "530921",
+						"name": "凤庆县"
+					},
+					{
+						"code": "530922",
+						"name": "云县"
+					},
+					{
+						"code": "530923",
+						"name": "永德县"
+					},
+					{
+						"code": "530924",
+						"name": "镇康县"
+					},
+					{
+						"code": "530925",
+						"name": "双江拉祜族佤族布朗族傣族自治县"
+					},
+					{
+						"code": "530926",
+						"name": "耿马傣族佤族自治县"
+					},
+					{
+						"code": "530927",
+						"name": "沧源佤族自治县"
+					}
+				]
+			},
+			{
+				"code": "532300",
+				"name": "楚雄彝族自治州",
+				"children": [{
+						"code": "532301",
+						"name": "楚雄市"
+					},
+					{
+						"code": "532322",
+						"name": "双柏县"
+					},
+					{
+						"code": "532323",
+						"name": "牟定县"
+					},
+					{
+						"code": "532324",
+						"name": "南华县"
+					},
+					{
+						"code": "532325",
+						"name": "姚安县"
+					},
+					{
+						"code": "532326",
+						"name": "大姚县"
+					},
+					{
+						"code": "532327",
+						"name": "永仁县"
+					},
+					{
+						"code": "532328",
+						"name": "元谋县"
+					},
+					{
+						"code": "532329",
+						"name": "武定县"
+					},
+					{
+						"code": "532331",
+						"name": "禄丰县"
+					}
+				]
+			},
+			{
+				"code": "532500",
+				"name": "红河哈尼族彝族自治州",
+				"children": [{
+						"code": "532501",
+						"name": "个旧市"
+					},
+					{
+						"code": "532502",
+						"name": "开远市"
+					},
+					{
+						"code": "532503",
+						"name": "蒙自市"
+					},
+					{
+						"code": "532504",
+						"name": "弥勒市"
+					},
+					{
+						"code": "532523",
+						"name": "屏边苗族自治县"
+					},
+					{
+						"code": "532524",
+						"name": "建水县"
+					},
+					{
+						"code": "532525",
+						"name": "石屏县"
+					},
+					{
+						"code": "532527",
+						"name": "泸西县"
+					},
+					{
+						"code": "532528",
+						"name": "元阳县"
+					},
+					{
+						"code": "532529",
+						"name": "红河县"
+					},
+					{
+						"code": "532530",
+						"name": "金平苗族瑶族傣族自治县"
+					},
+					{
+						"code": "532531",
+						"name": "绿春县"
+					},
+					{
+						"code": "532532",
+						"name": "河口瑶族自治县"
+					}
+				]
+			},
+			{
+				"code": "532600",
+				"name": "文山壮族苗族自治州",
+				"children": [{
+						"code": "532601",
+						"name": "文山市"
+					},
+					{
+						"code": "532622",
+						"name": "砚山县"
+					},
+					{
+						"code": "532623",
+						"name": "西畴县"
+					},
+					{
+						"code": "532624",
+						"name": "麻栗坡县"
+					},
+					{
+						"code": "532625",
+						"name": "马关县"
+					},
+					{
+						"code": "532626",
+						"name": "丘北县"
+					},
+					{
+						"code": "532627",
+						"name": "广南县"
+					},
+					{
+						"code": "532628",
+						"name": "富宁县"
+					}
+				]
+			},
+			{
+				"code": "532800",
+				"name": "西双版纳傣族自治州",
+				"children": [{
+						"code": "532801",
+						"name": "景洪市"
+					},
+					{
+						"code": "532822",
+						"name": "勐海县"
+					},
+					{
+						"code": "532823",
+						"name": "勐腊县"
+					}
+				]
+			},
+			{
+				"code": "532900",
+				"name": "大理白族自治州",
+				"children": [{
+						"code": "532901",
+						"name": "大理市"
+					},
+					{
+						"code": "532922",
+						"name": "漾濞彝族自治县"
+					},
+					{
+						"code": "532923",
+						"name": "祥云县"
+					},
+					{
+						"code": "532924",
+						"name": "宾川县"
+					},
+					{
+						"code": "532925",
+						"name": "弥渡县"
+					},
+					{
+						"code": "532926",
+						"name": "南涧彝族自治县"
+					},
+					{
+						"code": "532927",
+						"name": "巍山彝族回族自治县"
+					},
+					{
+						"code": "532928",
+						"name": "永平县"
+					},
+					{
+						"code": "532929",
+						"name": "云龙县"
+					},
+					{
+						"code": "532930",
+						"name": "洱源县"
+					},
+					{
+						"code": "532931",
+						"name": "剑川县"
+					},
+					{
+						"code": "532932",
+						"name": "鹤庆县"
+					}
+				]
+			},
+			{
+				"code": "533100",
+				"name": "德宏傣族景颇族自治州",
+				"children": [{
+						"code": "533102",
+						"name": "瑞丽市"
+					},
+					{
+						"code": "533103",
+						"name": "芒市"
+					},
+					{
+						"code": "533122",
+						"name": "梁河县"
+					},
+					{
+						"code": "533123",
+						"name": "盈江县"
+					},
+					{
+						"code": "533124",
+						"name": "陇川县"
+					}
+				]
+			},
+			{
+				"code": "533300",
+				"name": "怒江傈僳族自治州",
+				"children": [{
+						"code": "533301",
+						"name": "泸水市"
+					},
+					{
+						"code": "533323",
+						"name": "福贡县"
+					},
+					{
+						"code": "533324",
+						"name": "贡山独龙族怒族自治县"
+					},
+					{
+						"code": "533325",
+						"name": "兰坪白族普米族自治县"
+					}
+				]
+			},
+			{
+				"code": "533400",
+				"name": "迪庆藏族自治州",
+				"children": [{
+						"code": "533401",
+						"name": "香格里拉市"
+					},
+					{
+						"code": "533422",
+						"name": "德钦县"
+					},
+					{
+						"code": "533423",
+						"name": "维西傈僳族自治县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "540000",
+		"name": "西藏自治区",
+		"children": [{
+				"code": "540100",
+				"name": "拉萨市",
+				"children": [{
+						"code": "540102",
+						"name": "城关区"
+					},
+					{
+						"code": "540103",
+						"name": "堆龙德庆区"
+					},
+					{
+						"code": "540104",
+						"name": "达孜区"
+					},
+					{
+						"code": "540121",
+						"name": "林周县"
+					},
+					{
+						"code": "540122",
+						"name": "当雄县"
+					},
+					{
+						"code": "540123",
+						"name": "尼木县"
+					},
+					{
+						"code": "540124",
+						"name": "曲水县"
+					},
+					{
+						"code": "540127",
+						"name": "墨竹工卡县"
+					}
+				]
+			},
+			{
+				"code": "540200",
+				"name": "日喀则市",
+				"children": [{
+						"code": "540202",
+						"name": "桑珠孜区"
+					},
+					{
+						"code": "540221",
+						"name": "南木林县"
+					},
+					{
+						"code": "540222",
+						"name": "江孜县"
+					},
+					{
+						"code": "540223",
+						"name": "定日县"
+					},
+					{
+						"code": "540224",
+						"name": "萨迦县"
+					},
+					{
+						"code": "540225",
+						"name": "拉孜县"
+					},
+					{
+						"code": "540226",
+						"name": "昂仁县"
+					},
+					{
+						"code": "540227",
+						"name": "谢通门县"
+					},
+					{
+						"code": "540228",
+						"name": "白朗县"
+					},
+					{
+						"code": "540229",
+						"name": "仁布县"
+					},
+					{
+						"code": "540230",
+						"name": "康马县"
+					},
+					{
+						"code": "540231",
+						"name": "定结县"
+					},
+					{
+						"code": "540232",
+						"name": "仲巴县"
+					},
+					{
+						"code": "540233",
+						"name": "亚东县"
+					},
+					{
+						"code": "540234",
+						"name": "吉隆县"
+					},
+					{
+						"code": "540235",
+						"name": "聂拉木县"
+					},
+					{
+						"code": "540236",
+						"name": "萨嘎县"
+					},
+					{
+						"code": "540237",
+						"name": "岗巴县"
+					}
+				]
+			},
+			{
+				"code": "540300",
+				"name": "昌都市",
+				"children": [{
+						"code": "540302",
+						"name": "卡若区"
+					},
+					{
+						"code": "540321",
+						"name": "江达县"
+					},
+					{
+						"code": "540322",
+						"name": "贡觉县"
+					},
+					{
+						"code": "540323",
+						"name": "类乌齐县"
+					},
+					{
+						"code": "540324",
+						"name": "丁青县"
+					},
+					{
+						"code": "540325",
+						"name": "察雅县"
+					},
+					{
+						"code": "540326",
+						"name": "八宿县"
+					},
+					{
+						"code": "540327",
+						"name": "左贡县"
+					},
+					{
+						"code": "540328",
+						"name": "芒康县"
+					},
+					{
+						"code": "540329",
+						"name": "洛隆县"
+					},
+					{
+						"code": "540330",
+						"name": "边坝县"
+					}
+				]
+			},
+			{
+				"code": "540400",
+				"name": "林芝市",
+				"children": [{
+						"code": "540402",
+						"name": "巴宜区"
+					},
+					{
+						"code": "540421",
+						"name": "工布江达县"
+					},
+					{
+						"code": "540422",
+						"name": "米林县"
+					},
+					{
+						"code": "540423",
+						"name": "墨脱县"
+					},
+					{
+						"code": "540424",
+						"name": "波密县"
+					},
+					{
+						"code": "540425",
+						"name": "察隅县"
+					},
+					{
+						"code": "540426",
+						"name": "朗县"
+					}
+				]
+			},
+			{
+				"code": "540500",
+				"name": "山南市",
+				"children": [{
+						"code": "540502",
+						"name": "乃东区"
+					},
+					{
+						"code": "540521",
+						"name": "扎囊县"
+					},
+					{
+						"code": "540522",
+						"name": "贡嘎县"
+					},
+					{
+						"code": "540523",
+						"name": "桑日县"
+					},
+					{
+						"code": "540524",
+						"name": "琼结县"
+					},
+					{
+						"code": "540525",
+						"name": "曲松县"
+					},
+					{
+						"code": "540526",
+						"name": "措美县"
+					},
+					{
+						"code": "540527",
+						"name": "洛扎县"
+					},
+					{
+						"code": "540528",
+						"name": "加查县"
+					},
+					{
+						"code": "540529",
+						"name": "隆子县"
+					},
+					{
+						"code": "540530",
+						"name": "错那县"
+					},
+					{
+						"code": "540531",
+						"name": "浪卡子县"
+					}
+				]
+			},
+			{
+				"code": "540600",
+				"name": "那曲市",
+				"children": [{
+						"code": "540602",
+						"name": "色尼区"
+					},
+					{
+						"code": "540621",
+						"name": "嘉黎县"
+					},
+					{
+						"code": "540622",
+						"name": "比如县"
+					},
+					{
+						"code": "540623",
+						"name": "聂荣县"
+					},
+					{
+						"code": "540624",
+						"name": "安多县"
+					},
+					{
+						"code": "540625",
+						"name": "申扎县"
+					},
+					{
+						"code": "540626",
+						"name": "索县"
+					},
+					{
+						"code": "540627",
+						"name": "班戈县"
+					},
+					{
+						"code": "540628",
+						"name": "巴青县"
+					},
+					{
+						"code": "540629",
+						"name": "尼玛县"
+					},
+					{
+						"code": "540630",
+						"name": "双湖县"
+					}
+				]
+			},
+			{
+				"code": "542500",
+				"name": "阿里地区",
+				"children": [{
+						"code": "542521",
+						"name": "普兰县"
+					},
+					{
+						"code": "542522",
+						"name": "札达县"
+					},
+					{
+						"code": "542523",
+						"name": "噶尔县"
+					},
+					{
+						"code": "542524",
+						"name": "日土县"
+					},
+					{
+						"code": "542525",
+						"name": "革吉县"
+					},
+					{
+						"code": "542526",
+						"name": "改则县"
+					},
+					{
+						"code": "542527",
+						"name": "措勤县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "610000",
+		"name": "陕西省",
+		"children": [{
+				"code": "610100",
+				"name": "西安市",
+				"children": [{
+						"code": "610102",
+						"name": "新城区"
+					},
+					{
+						"code": "610103",
+						"name": "碑林区"
+					},
+					{
+						"code": "610104",
+						"name": "莲湖区"
+					},
+					{
+						"code": "610111",
+						"name": "灞桥区"
+					},
+					{
+						"code": "610112",
+						"name": "未央区"
+					},
+					{
+						"code": "610113",
+						"name": "雁塔区"
+					},
+					{
+						"code": "610114",
+						"name": "阎良区"
+					},
+					{
+						"code": "610115",
+						"name": "临潼区"
+					},
+					{
+						"code": "610116",
+						"name": "长安区"
+					},
+					{
+						"code": "610117",
+						"name": "高陵区"
+					},
+					{
+						"code": "610118",
+						"name": "鄠邑区"
+					},
+					{
+						"code": "610122",
+						"name": "蓝田县"
+					},
+					{
+						"code": "610124",
+						"name": "周至县"
+					}
+				]
+			},
+			{
+				"code": "610200",
+				"name": "铜川市",
+				"children": [{
+						"code": "610202",
+						"name": "王益区"
+					},
+					{
+						"code": "610203",
+						"name": "印台区"
+					},
+					{
+						"code": "610204",
+						"name": "耀州区"
+					},
+					{
+						"code": "610222",
+						"name": "宜君县"
+					}
+				]
+			},
+			{
+				"code": "610300",
+				"name": "宝鸡市",
+				"children": [{
+						"code": "610302",
+						"name": "渭滨区"
+					},
+					{
+						"code": "610303",
+						"name": "金台区"
+					},
+					{
+						"code": "610304",
+						"name": "陈仓区"
+					},
+					{
+						"code": "610322",
+						"name": "凤翔县"
+					},
+					{
+						"code": "610323",
+						"name": "岐山县"
+					},
+					{
+						"code": "610324",
+						"name": "扶风县"
+					},
+					{
+						"code": "610326",
+						"name": "眉县"
+					},
+					{
+						"code": "610327",
+						"name": "陇县"
+					},
+					{
+						"code": "610328",
+						"name": "千阳县"
+					},
+					{
+						"code": "610329",
+						"name": "麟游县"
+					},
+					{
+						"code": "610330",
+						"name": "凤县"
+					},
+					{
+						"code": "610331",
+						"name": "太白县"
+					}
+				]
+			},
+			{
+				"code": "610400",
+				"name": "咸阳市",
+				"children": [{
+						"code": "610402",
+						"name": "秦都区"
+					},
+					{
+						"code": "610403",
+						"name": "杨陵区"
+					},
+					{
+						"code": "610404",
+						"name": "渭城区"
+					},
+					{
+						"code": "610422",
+						"name": "三原县"
+					},
+					{
+						"code": "610423",
+						"name": "泾阳县"
+					},
+					{
+						"code": "610424",
+						"name": "乾县"
+					},
+					{
+						"code": "610425",
+						"name": "礼泉县"
+					},
+					{
+						"code": "610426",
+						"name": "永寿县"
+					},
+					{
+						"code": "610428",
+						"name": "长武县"
+					},
+					{
+						"code": "610429",
+						"name": "旬邑县"
+					},
+					{
+						"code": "610430",
+						"name": "淳化县"
+					},
+					{
+						"code": "610431",
+						"name": "武功县"
+					},
+					{
+						"code": "610481",
+						"name": "兴平市"
+					},
+					{
+						"code": "610482",
+						"name": "彬州市"
+					}
+				]
+			},
+			{
+				"code": "610500",
+				"name": "渭南市",
+				"children": [{
+						"code": "610502",
+						"name": "临渭区"
+					},
+					{
+						"code": "610503",
+						"name": "华州区"
+					},
+					{
+						"code": "610522",
+						"name": "潼关县"
+					},
+					{
+						"code": "610523",
+						"name": "大荔县"
+					},
+					{
+						"code": "610524",
+						"name": "合阳县"
+					},
+					{
+						"code": "610525",
+						"name": "澄城县"
+					},
+					{
+						"code": "610526",
+						"name": "蒲城县"
+					},
+					{
+						"code": "610527",
+						"name": "白水县"
+					},
+					{
+						"code": "610528",
+						"name": "富平县"
+					},
+					{
+						"code": "610581",
+						"name": "韩城市"
+					},
+					{
+						"code": "610582",
+						"name": "华阴市"
+					}
+				]
+			},
+			{
+				"code": "610600",
+				"name": "延安市",
+				"children": [{
+						"code": "610602",
+						"name": "宝塔区"
+					},
+					{
+						"code": "610603",
+						"name": "安塞区"
+					},
+					{
+						"code": "610621",
+						"name": "延长县"
+					},
+					{
+						"code": "610622",
+						"name": "延川县"
+					},
+					{
+						"code": "610623",
+						"name": "子长县"
+					},
+					{
+						"code": "610625",
+						"name": "志丹县"
+					},
+					{
+						"code": "610626",
+						"name": "吴起县"
+					},
+					{
+						"code": "610627",
+						"name": "甘泉县"
+					},
+					{
+						"code": "610628",
+						"name": "富县"
+					},
+					{
+						"code": "610629",
+						"name": "洛川县"
+					},
+					{
+						"code": "610630",
+						"name": "宜川县"
+					},
+					{
+						"code": "610631",
+						"name": "黄龙县"
+					},
+					{
+						"code": "610632",
+						"name": "黄陵县"
+					}
+				]
+			},
+			{
+				"code": "610700",
+				"name": "汉中市",
+				"children": [{
+						"code": "610702",
+						"name": "汉台区"
+					},
+					{
+						"code": "610703",
+						"name": "南郑区"
+					},
+					{
+						"code": "610722",
+						"name": "城固县"
+					},
+					{
+						"code": "610723",
+						"name": "洋县"
+					},
+					{
+						"code": "610724",
+						"name": "西乡县"
+					},
+					{
+						"code": "610725",
+						"name": "勉县"
+					},
+					{
+						"code": "610726",
+						"name": "宁强县"
+					},
+					{
+						"code": "610727",
+						"name": "略阳县"
+					},
+					{
+						"code": "610728",
+						"name": "镇巴县"
+					},
+					{
+						"code": "610729",
+						"name": "留坝县"
+					},
+					{
+						"code": "610730",
+						"name": "佛坪县"
+					}
+				]
+			},
+			{
+				"code": "610800",
+				"name": "榆林市",
+				"children": [{
+						"code": "610802",
+						"name": "榆阳区"
+					},
+					{
+						"code": "610803",
+						"name": "横山区"
+					},
+					{
+						"code": "610822",
+						"name": "府谷县"
+					},
+					{
+						"code": "610824",
+						"name": "靖边县"
+					},
+					{
+						"code": "610825",
+						"name": "定边县"
+					},
+					{
+						"code": "610826",
+						"name": "绥德县"
+					},
+					{
+						"code": "610827",
+						"name": "米脂县"
+					},
+					{
+						"code": "610828",
+						"name": "佳县"
+					},
+					{
+						"code": "610829",
+						"name": "吴堡县"
+					},
+					{
+						"code": "610830",
+						"name": "清涧县"
+					},
+					{
+						"code": "610831",
+						"name": "子洲县"
+					},
+					{
+						"code": "610881",
+						"name": "神木市"
+					}
+				]
+			},
+			{
+				"code": "610900",
+				"name": "安康市",
+				"children": [{
+						"code": "610902",
+						"name": "汉滨区"
+					},
+					{
+						"code": "610921",
+						"name": "汉阴县"
+					},
+					{
+						"code": "610922",
+						"name": "石泉县"
+					},
+					{
+						"code": "610923",
+						"name": "宁陕县"
+					},
+					{
+						"code": "610924",
+						"name": "紫阳县"
+					},
+					{
+						"code": "610925",
+						"name": "岚皋县"
+					},
+					{
+						"code": "610926",
+						"name": "平利县"
+					},
+					{
+						"code": "610927",
+						"name": "镇坪县"
+					},
+					{
+						"code": "610928",
+						"name": "旬阳县"
+					},
+					{
+						"code": "610929",
+						"name": "白河县"
+					}
+				]
+			},
+			{
+				"code": "611000",
+				"name": "商洛市",
+				"children": [{
+						"code": "611002",
+						"name": "商州区"
+					},
+					{
+						"code": "611021",
+						"name": "洛南县"
+					},
+					{
+						"code": "611022",
+						"name": "丹凤县"
+					},
+					{
+						"code": "611023",
+						"name": "商南县"
+					},
+					{
+						"code": "611024",
+						"name": "山阳县"
+					},
+					{
+						"code": "611025",
+						"name": "镇安县"
+					},
+					{
+						"code": "611026",
+						"name": "柞水县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "620000",
+		"name": "甘肃省",
+		"children": [{
+				"code": "620100",
+				"name": "兰州市",
+				"children": [{
+						"code": "620102",
+						"name": "城关区"
+					},
+					{
+						"code": "620103",
+						"name": "七里河区"
+					},
+					{
+						"code": "620104",
+						"name": "西固区"
+					},
+					{
+						"code": "620105",
+						"name": "安宁区"
+					},
+					{
+						"code": "620111",
+						"name": "红古区"
+					},
+					{
+						"code": "620121",
+						"name": "永登县"
+					},
+					{
+						"code": "620122",
+						"name": "皋兰县"
+					},
+					{
+						"code": "620123",
+						"name": "榆中县"
+					}
+				]
+			},
+			{
+				"code": "620200",
+				"name": "嘉峪关市",
+				"children": []
+			},
+			{
+				"code": "620300",
+				"name": "金昌市",
+				"children": [{
+						"code": "620302",
+						"name": "金川区"
+					},
+					{
+						"code": "620321",
+						"name": "永昌县"
+					}
+				]
+			},
+			{
+				"code": "620400",
+				"name": "白银市",
+				"children": [{
+						"code": "620402",
+						"name": "白银区"
+					},
+					{
+						"code": "620403",
+						"name": "平川区"
+					},
+					{
+						"code": "620421",
+						"name": "靖远县"
+					},
+					{
+						"code": "620422",
+						"name": "会宁县"
+					},
+					{
+						"code": "620423",
+						"name": "景泰县"
+					}
+				]
+			},
+			{
+				"code": "620500",
+				"name": "天水市",
+				"children": [{
+						"code": "620502",
+						"name": "秦州区"
+					},
+					{
+						"code": "620503",
+						"name": "麦积区"
+					},
+					{
+						"code": "620521",
+						"name": "清水县"
+					},
+					{
+						"code": "620522",
+						"name": "秦安县"
+					},
+					{
+						"code": "620523",
+						"name": "甘谷县"
+					},
+					{
+						"code": "620524",
+						"name": "武山县"
+					},
+					{
+						"code": "620525",
+						"name": "张家川回族自治县"
+					}
+				]
+			},
+			{
+				"code": "620600",
+				"name": "武威市",
+				"children": [{
+						"code": "620602",
+						"name": "凉州区"
+					},
+					{
+						"code": "620621",
+						"name": "民勤县"
+					},
+					{
+						"code": "620622",
+						"name": "古浪县"
+					},
+					{
+						"code": "620623",
+						"name": "天祝藏族自治县"
+					}
+				]
+			},
+			{
+				"code": "620700",
+				"name": "张掖市",
+				"children": [{
+						"code": "620702",
+						"name": "甘州区"
+					},
+					{
+						"code": "620721",
+						"name": "肃南裕固族自治县"
+					},
+					{
+						"code": "620722",
+						"name": "民乐县"
+					},
+					{
+						"code": "620723",
+						"name": "临泽县"
+					},
+					{
+						"code": "620724",
+						"name": "高台县"
+					},
+					{
+						"code": "620725",
+						"name": "山丹县"
+					}
+				]
+			},
+			{
+				"code": "620800",
+				"name": "平凉市",
+				"children": [{
+						"code": "620802",
+						"name": "崆峒区"
+					},
+					{
+						"code": "620821",
+						"name": "泾川县"
+					},
+					{
+						"code": "620822",
+						"name": "灵台县"
+					},
+					{
+						"code": "620823",
+						"name": "崇信县"
+					},
+					{
+						"code": "620825",
+						"name": "庄浪县"
+					},
+					{
+						"code": "620826",
+						"name": "静宁县"
+					},
+					{
+						"code": "620881",
+						"name": "华亭市"
+					}
+				]
+			},
+			{
+				"code": "620900",
+				"name": "酒泉市",
+				"children": [{
+						"code": "620902",
+						"name": "肃州区"
+					},
+					{
+						"code": "620921",
+						"name": "金塔县"
+					},
+					{
+						"code": "620922",
+						"name": "瓜州县"
+					},
+					{
+						"code": "620923",
+						"name": "肃北蒙古族自治县"
+					},
+					{
+						"code": "620924",
+						"name": "阿克塞哈萨克族自治县"
+					},
+					{
+						"code": "620981",
+						"name": "玉门市"
+					},
+					{
+						"code": "620982",
+						"name": "敦煌市"
+					}
+				]
+			},
+			{
+				"code": "621000",
+				"name": "庆阳市",
+				"children": [{
+						"code": "621002",
+						"name": "西峰区"
+					},
+					{
+						"code": "621021",
+						"name": "庆城县"
+					},
+					{
+						"code": "621022",
+						"name": "环县"
+					},
+					{
+						"code": "621023",
+						"name": "华池县"
+					},
+					{
+						"code": "621024",
+						"name": "合水县"
+					},
+					{
+						"code": "621025",
+						"name": "正宁县"
+					},
+					{
+						"code": "621026",
+						"name": "宁县"
+					},
+					{
+						"code": "621027",
+						"name": "镇原县"
+					}
+				]
+			},
+			{
+				"code": "621100",
+				"name": "定西市",
+				"children": [{
+						"code": "621102",
+						"name": "安定区"
+					},
+					{
+						"code": "621121",
+						"name": "通渭县"
+					},
+					{
+						"code": "621122",
+						"name": "陇西县"
+					},
+					{
+						"code": "621123",
+						"name": "渭源县"
+					},
+					{
+						"code": "621124",
+						"name": "临洮县"
+					},
+					{
+						"code": "621125",
+						"name": "漳县"
+					},
+					{
+						"code": "621126",
+						"name": "岷县"
+					}
+				]
+			},
+			{
+				"code": "621200",
+				"name": "陇南市",
+				"children": [{
+						"code": "621202",
+						"name": "武都区"
+					},
+					{
+						"code": "621221",
+						"name": "成县"
+					},
+					{
+						"code": "621222",
+						"name": "文县"
+					},
+					{
+						"code": "621223",
+						"name": "宕昌县"
+					},
+					{
+						"code": "621224",
+						"name": "康县"
+					},
+					{
+						"code": "621225",
+						"name": "西和县"
+					},
+					{
+						"code": "621226",
+						"name": "礼县"
+					},
+					{
+						"code": "621227",
+						"name": "徽县"
+					},
+					{
+						"code": "621228",
+						"name": "两当县"
+					}
+				]
+			},
+			{
+				"code": "622900",
+				"name": "临夏回族自治州",
+				"children": [{
+						"code": "622901",
+						"name": "临夏市"
+					},
+					{
+						"code": "622921",
+						"name": "临夏县"
+					},
+					{
+						"code": "622922",
+						"name": "康乐县"
+					},
+					{
+						"code": "622923",
+						"name": "永靖县"
+					},
+					{
+						"code": "622924",
+						"name": "广河县"
+					},
+					{
+						"code": "622925",
+						"name": "和政县"
+					},
+					{
+						"code": "622926",
+						"name": "东乡族自治县"
+					},
+					{
+						"code": "622927",
+						"name": "积石山保安族东乡族撒拉族自治县"
+					}
+				]
+			},
+			{
+				"code": "623000",
+				"name": "甘南藏族自治州",
+				"children": [{
+						"code": "623001",
+						"name": "合作市"
+					},
+					{
+						"code": "623021",
+						"name": "临潭县"
+					},
+					{
+						"code": "623022",
+						"name": "卓尼县"
+					},
+					{
+						"code": "623023",
+						"name": "舟曲县"
+					},
+					{
+						"code": "623024",
+						"name": "迭部县"
+					},
+					{
+						"code": "623025",
+						"name": "玛曲县"
+					},
+					{
+						"code": "623026",
+						"name": "碌曲县"
+					},
+					{
+						"code": "623027",
+						"name": "夏河县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "630000",
+		"name": "青海省",
+		"children": [{
+				"code": "630100",
+				"name": "西宁市",
+				"children": [{
+						"code": "630102",
+						"name": "城东区"
+					},
+					{
+						"code": "630103",
+						"name": "城中区"
+					},
+					{
+						"code": "630104",
+						"name": "城西区"
+					},
+					{
+						"code": "630105",
+						"name": "城北区"
+					},
+					{
+						"code": "630121",
+						"name": "大通回族土族自治县"
+					},
+					{
+						"code": "630122",
+						"name": "湟中县"
+					},
+					{
+						"code": "630123",
+						"name": "湟源县"
+					}
+				]
+			},
+			{
+				"code": "630200",
+				"name": "海东市",
+				"children": [{
+						"code": "630202",
+						"name": "乐都区"
+					},
+					{
+						"code": "630203",
+						"name": "平安区"
+					},
+					{
+						"code": "630222",
+						"name": "民和回族土族自治县"
+					},
+					{
+						"code": "630223",
+						"name": "互助土族自治县"
+					},
+					{
+						"code": "630224",
+						"name": "化隆回族自治县"
+					},
+					{
+						"code": "630225",
+						"name": "循化撒拉族自治县"
+					}
+				]
+			},
+			{
+				"code": "632200",
+				"name": "海北藏族自治州",
+				"children": [{
+						"code": "632221",
+						"name": "门源回族自治县"
+					},
+					{
+						"code": "632222",
+						"name": "祁连县"
+					},
+					{
+						"code": "632223",
+						"name": "海晏县"
+					},
+					{
+						"code": "632224",
+						"name": "刚察县"
+					}
+				]
+			},
+			{
+				"code": "632300",
+				"name": "黄南藏族自治州",
+				"children": [{
+						"code": "632321",
+						"name": "同仁县"
+					},
+					{
+						"code": "632322",
+						"name": "尖扎县"
+					},
+					{
+						"code": "632323",
+						"name": "泽库县"
+					},
+					{
+						"code": "632324",
+						"name": "河南蒙古族自治县"
+					}
+				]
+			},
+			{
+				"code": "632500",
+				"name": "海南藏族自治州",
+				"children": [{
+						"code": "632521",
+						"name": "共和县"
+					},
+					{
+						"code": "632522",
+						"name": "同德县"
+					},
+					{
+						"code": "632523",
+						"name": "贵德县"
+					},
+					{
+						"code": "632524",
+						"name": "兴海县"
+					},
+					{
+						"code": "632525",
+						"name": "贵南县"
+					}
+				]
+			},
+			{
+				"code": "632600",
+				"name": "果洛藏族自治州",
+				"children": [{
+						"code": "632621",
+						"name": "玛沁县"
+					},
+					{
+						"code": "632622",
+						"name": "班玛县"
+					},
+					{
+						"code": "632623",
+						"name": "甘德县"
+					},
+					{
+						"code": "632624",
+						"name": "达日县"
+					},
+					{
+						"code": "632625",
+						"name": "久治县"
+					},
+					{
+						"code": "632626",
+						"name": "玛多县"
+					}
+				]
+			},
+			{
+				"code": "632700",
+				"name": "玉树藏族自治州",
+				"children": [{
+						"code": "632701",
+						"name": "玉树市"
+					},
+					{
+						"code": "632722",
+						"name": "杂多县"
+					},
+					{
+						"code": "632723",
+						"name": "称多县"
+					},
+					{
+						"code": "632724",
+						"name": "治多县"
+					},
+					{
+						"code": "632725",
+						"name": "囊谦县"
+					},
+					{
+						"code": "632726",
+						"name": "曲麻莱县"
+					}
+				]
+			},
+			{
+				"code": "632800",
+				"name": "海西蒙古族藏族自治州",
+				"children": [{
+						"code": "632801",
+						"name": "格尔木市"
+					},
+					{
+						"code": "632802",
+						"name": "德令哈市"
+					},
+					{
+						"code": "632803",
+						"name": "茫崖市"
+					},
+					{
+						"code": "632821",
+						"name": "乌兰县"
+					},
+					{
+						"code": "632822",
+						"name": "都兰县"
+					},
+					{
+						"code": "632823",
+						"name": "天峻县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "640000",
+		"name": "宁夏回族自治区",
+		"children": [{
+				"code": "640100",
+				"name": "银川市",
+				"children": [{
+						"code": "640104",
+						"name": "兴庆区"
+					},
+					{
+						"code": "640105",
+						"name": "西夏区"
+					},
+					{
+						"code": "640106",
+						"name": "金凤区"
+					},
+					{
+						"code": "640121",
+						"name": "永宁县"
+					},
+					{
+						"code": "640122",
+						"name": "贺兰县"
+					},
+					{
+						"code": "640181",
+						"name": "灵武市"
+					}
+				]
+			},
+			{
+				"code": "640200",
+				"name": "石嘴山市",
+				"children": [{
+						"code": "640202",
+						"name": "大武口区"
+					},
+					{
+						"code": "640205",
+						"name": "惠农区"
+					},
+					{
+						"code": "640221",
+						"name": "平罗县"
+					}
+				]
+			},
+			{
+				"code": "640300",
+				"name": "吴忠市",
+				"children": [{
+						"code": "640302",
+						"name": "利通区"
+					},
+					{
+						"code": "640303",
+						"name": "红寺堡区"
+					},
+					{
+						"code": "640323",
+						"name": "盐池县"
+					},
+					{
+						"code": "640324",
+						"name": "同心县"
+					},
+					{
+						"code": "640381",
+						"name": "青铜峡市"
+					}
+				]
+			},
+			{
+				"code": "640400",
+				"name": "固原市",
+				"children": [{
+						"code": "640402",
+						"name": "原州区"
+					},
+					{
+						"code": "640422",
+						"name": "西吉县"
+					},
+					{
+						"code": "640423",
+						"name": "隆德县"
+					},
+					{
+						"code": "640424",
+						"name": "泾源县"
+					},
+					{
+						"code": "640425",
+						"name": "彭阳县"
+					}
+				]
+			},
+			{
+				"code": "640500",
+				"name": "中卫市",
+				"children": [{
+						"code": "640502",
+						"name": "沙坡头区"
+					},
+					{
+						"code": "640521",
+						"name": "中宁县"
+					},
+					{
+						"code": "640522",
+						"name": "海原县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "650000",
+		"name": "新疆维吾尔自治区",
+		"children": [{
+				"code": "650100",
+				"name": "乌鲁木齐市",
+				"children": [{
+						"code": "650102",
+						"name": "天山区"
+					},
+					{
+						"code": "650103",
+						"name": "沙依巴克区"
+					},
+					{
+						"code": "650104",
+						"name": "新市区"
+					},
+					{
+						"code": "650105",
+						"name": "水磨沟区"
+					},
+					{
+						"code": "650106",
+						"name": "头屯河区"
+					},
+					{
+						"code": "650107",
+						"name": "达坂城区"
+					},
+					{
+						"code": "650109",
+						"name": "米东区"
+					},
+					{
+						"code": "650121",
+						"name": "乌鲁木齐县"
+					}
+				]
+			},
+			{
+				"code": "650200",
+				"name": "克拉玛依市",
+				"children": [{
+						"code": "650202",
+						"name": "独山子区"
+					},
+					{
+						"code": "650203",
+						"name": "克拉玛依区"
+					},
+					{
+						"code": "650204",
+						"name": "白碱滩区"
+					},
+					{
+						"code": "650205",
+						"name": "乌尔禾区"
+					}
+				]
+			},
+			{
+				"code": "650400",
+				"name": "吐鲁番市",
+				"children": [{
+						"code": "650402",
+						"name": "高昌区"
+					},
+					{
+						"code": "650421",
+						"name": "鄯善县"
+					},
+					{
+						"code": "650422",
+						"name": "托克逊县"
+					}
+				]
+			},
+			{
+				"code": "650500",
+				"name": "哈密市",
+				"children": [{
+						"code": "650502",
+						"name": "伊州区"
+					},
+					{
+						"code": "650521",
+						"name": "巴里坤哈萨克自治县"
+					},
+					{
+						"code": "650522",
+						"name": "伊吾县"
+					}
+				]
+			},
+			{
+				"code": "652300",
+				"name": "昌吉回族自治州",
+				"children": [{
+						"code": "652301",
+						"name": "昌吉市"
+					},
+					{
+						"code": "652302",
+						"name": "阜康市"
+					},
+					{
+						"code": "652323",
+						"name": "呼图壁县"
+					},
+					{
+						"code": "652324",
+						"name": "玛纳斯县"
+					},
+					{
+						"code": "652325",
+						"name": "奇台县"
+					},
+					{
+						"code": "652327",
+						"name": "吉木萨尔县"
+					},
+					{
+						"code": "652328",
+						"name": "木垒哈萨克自治县"
+					}
+				]
+			},
+			{
+				"code": "652700",
+				"name": "博尔塔拉蒙古自治州",
+				"children": [{
+						"code": "652701",
+						"name": "博乐市"
+					},
+					{
+						"code": "652702",
+						"name": "阿拉山口市"
+					},
+					{
+						"code": "652722",
+						"name": "精河县"
+					},
+					{
+						"code": "652723",
+						"name": "温泉县"
+					}
+				]
+			},
+			{
+				"code": "652800",
+				"name": "巴音郭楞蒙古自治州",
+				"children": [{
+						"code": "652801",
+						"name": "库尔勒市"
+					},
+					{
+						"code": "652822",
+						"name": "轮台县"
+					},
+					{
+						"code": "652823",
+						"name": "尉犁县"
+					},
+					{
+						"code": "652824",
+						"name": "若羌县"
+					},
+					{
+						"code": "652825",
+						"name": "且末县"
+					},
+					{
+						"code": "652826",
+						"name": "焉耆回族自治县"
+					},
+					{
+						"code": "652827",
+						"name": "和静县"
+					},
+					{
+						"code": "652828",
+						"name": "和硕县"
+					},
+					{
+						"code": "652829",
+						"name": "博湖县"
+					}
+				]
+			},
+			{
+				"code": "652900",
+				"name": "阿克苏地区",
+				"children": [{
+						"code": "652901",
+						"name": "阿克苏市"
+					},
+					{
+						"code": "652922",
+						"name": "温宿县"
+					},
+					{
+						"code": "652923",
+						"name": "库车县"
+					},
+					{
+						"code": "652924",
+						"name": "沙雅县"
+					},
+					{
+						"code": "652925",
+						"name": "新和县"
+					},
+					{
+						"code": "652926",
+						"name": "拜城县"
+					},
+					{
+						"code": "652927",
+						"name": "乌什县"
+					},
+					{
+						"code": "652928",
+						"name": "阿瓦提县"
+					},
+					{
+						"code": "652929",
+						"name": "柯坪县"
+					}
+				]
+			},
+			{
+				"code": "653000",
+				"name": "克孜勒苏柯尔克孜自治州",
+				"children": [{
+						"code": "653001",
+						"name": "阿图什市"
+					},
+					{
+						"code": "653022",
+						"name": "阿克陶县"
+					},
+					{
+						"code": "653023",
+						"name": "阿合奇县"
+					},
+					{
+						"code": "653024",
+						"name": "乌恰县"
+					}
+				]
+			},
+			{
+				"code": "653100",
+				"name": "喀什地区",
+				"children": [{
+						"code": "653101",
+						"name": "喀什市"
+					},
+					{
+						"code": "653121",
+						"name": "疏附县"
+					},
+					{
+						"code": "653122",
+						"name": "疏勒县"
+					},
+					{
+						"code": "653123",
+						"name": "英吉沙县"
+					},
+					{
+						"code": "653124",
+						"name": "泽普县"
+					},
+					{
+						"code": "653125",
+						"name": "莎车县"
+					},
+					{
+						"code": "653126",
+						"name": "叶城县"
+					},
+					{
+						"code": "653127",
+						"name": "麦盖提县"
+					},
+					{
+						"code": "653128",
+						"name": "岳普湖县"
+					},
+					{
+						"code": "653129",
+						"name": "伽师县"
+					},
+					{
+						"code": "653130",
+						"name": "巴楚县"
+					},
+					{
+						"code": "653131",
+						"name": "塔什库尔干塔吉克自治县"
+					}
+				]
+			},
+			{
+				"code": "653200",
+				"name": "和田地区",
+				"children": [{
+						"code": "653201",
+						"name": "和田市"
+					},
+					{
+						"code": "653221",
+						"name": "和田县"
+					},
+					{
+						"code": "653222",
+						"name": "墨玉县"
+					},
+					{
+						"code": "653223",
+						"name": "皮山县"
+					},
+					{
+						"code": "653224",
+						"name": "洛浦县"
+					},
+					{
+						"code": "653225",
+						"name": "策勒县"
+					},
+					{
+						"code": "653226",
+						"name": "于田县"
+					},
+					{
+						"code": "653227",
+						"name": "民丰县"
+					}
+				]
+			},
+			{
+				"code": "654000",
+				"name": "伊犁哈萨克自治州",
+				"children": [{
+						"code": "654002",
+						"name": "伊宁市"
+					},
+					{
+						"code": "654003",
+						"name": "奎屯市"
+					},
+					{
+						"code": "654004",
+						"name": "霍尔果斯市"
+					},
+					{
+						"code": "654021",
+						"name": "伊宁县"
+					},
+					{
+						"code": "654022",
+						"name": "察布查尔锡伯自治县"
+					},
+					{
+						"code": "654023",
+						"name": "霍城县"
+					},
+					{
+						"code": "654024",
+						"name": "巩留县"
+					},
+					{
+						"code": "654025",
+						"name": "新源县"
+					},
+					{
+						"code": "654026",
+						"name": "昭苏县"
+					},
+					{
+						"code": "654027",
+						"name": "特克斯县"
+					},
+					{
+						"code": "654028",
+						"name": "尼勒克县"
+					}
+				]
+			},
+			{
+				"code": "654200",
+				"name": "塔城地区",
+				"children": [{
+						"code": "654201",
+						"name": "塔城市"
+					},
+					{
+						"code": "654202",
+						"name": "乌苏市"
+					},
+					{
+						"code": "654221",
+						"name": "额敏县"
+					},
+					{
+						"code": "654223",
+						"name": "沙湾县"
+					},
+					{
+						"code": "654224",
+						"name": "托里县"
+					},
+					{
+						"code": "654225",
+						"name": "裕民县"
+					},
+					{
+						"code": "654226",
+						"name": "和布克赛尔蒙古自治县"
+					}
+				]
+			},
+			{
+				"code": "654300",
+				"name": "阿勒泰地区",
+				"children": [{
+						"code": "654301",
+						"name": "阿勒泰市"
+					},
+					{
+						"code": "654321",
+						"name": "布尔津县"
+					},
+					{
+						"code": "654322",
+						"name": "富蕴县"
+					},
+					{
+						"code": "654323",
+						"name": "福海县"
+					},
+					{
+						"code": "654324",
+						"name": "哈巴河县"
+					},
+					{
+						"code": "654325",
+						"name": "青河县"
+					},
+					{
+						"code": "654326",
+						"name": "吉木乃县"
+					}
+				]
+			}
+		]
+	},
+	{
+		"code": "710000",
+		"name": "台湾省",
+		"children": [{
+			"code": "710000",
+			"name": "台湾省",
+			"children": [{
+				"code": "710000",
+				"name": "台湾省"
+			}]
+		}]
+	},
+	{
+		"code": "810000",
+		"name": "香港特别行政区",
+		"children": [{
+			"code": "810000",
+			"name": "香港特别行政区",
+			"children": [{
+				"code": "810000",
+				"name": "香港特别行政区"
+			}]
+		}]
+	},
+	{
+		"code": "820000",
+		"name": "澳门特别行政区",
+		"children": [{
+			"code": "820000",
+			"name": "澳门特别行政区",
+			"children": [{
+				"code": "820000",
+				"name": "澳门特别行政区"
+			}]
+		}]
+	}
+]

+ 195 - 0
components/leo-area-select_1.0.0/components/leo-area-select/index.vue

@@ -0,0 +1,195 @@
+<template>
+	<view class="leo-area-select">
+		<scroll-view scroll-y class="list" v-for="(item, index) in allData" :key="index"
+			:ref="'leo-area-select-sc-'+index"
+			:scroll-top="tops[index] ? tops[index] : 0">
+			<view class="list-item" 
+				:class="sindex == actives[index] ? 'active' : ''" 
+				v-for="(sitem, sindex) in item" 
+				:key="sitem[props.id]"
+				@click.stop="changeType(sindex, index)"
+				:ref="'leo-area-select-item-'+index+'-'+sindex">
+				<text class="text">{{sitem[props.name]}}</text>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	const all = require('../../citys.json');
+	export default {
+		props: {
+			level: { // 需要几级
+				type: Number,
+				default: 3
+			},
+			data: { // 数据源 如不设置则使用系统自带省市区数据
+				type: Array,
+				default: () => {
+					return all;
+				}
+			},
+			props: {
+				type: Object,
+				default: () => { // 配置选项,
+					return {
+						id: 'code',
+						name: 'name',
+						children: 'children'
+					}
+				}
+			},
+			activeName: {
+				type: Array,
+				default: () => {
+					return [] // 默认选中的省市区 ['广东省', '深圳市', '宝安区']
+				}
+			}
+		},
+		data() {
+			return {
+				actives: [],
+				allData: [],
+				tops: []
+			}
+		},
+		watch:{
+			data (nval) {
+				this.createLevelData(this.data);
+			},
+			activeName (nval) {
+				this.createActiveForName();
+			}
+		},
+		created() {
+			if (this.activeName.length > 0) {
+				this.createActiveForName();
+			} else {
+				this.createActiveData();
+				this.createLevelData(this.data);
+			}
+			
+		},
+		methods: {
+			createActiveForName() {
+				let arr = [],
+					atd = [];
+				for (let i = 0; i < this.level; i++) {
+					if (i == 0) {
+						atd.push(this.data);
+						arr.push(this.getIndex(this.activeName[i], this.data));
+					} else {
+						atd.push(atd[i-1][arr[i-1]][this.props.children]);
+						arr.push(this.getIndex(this.activeName[i], atd[i]))
+					}
+				}
+				this.actives = arr;
+				this.allData = atd;
+				this.$nextTick(() => {
+					let ts = [];
+					for (let i = 0; i < arr.length; i++) {
+						let target = this.$refs['leo-area-select-item-'+i+'-'+arr[i]][0],
+							sc = this.$refs['leo-area-select-sc-'+i][0];
+						ts.push( target.$el.offsetTop);
+					}
+					this.tops = ts;
+				})
+			},
+			getIndex(name, list) {
+				let index = list.findIndex((e) => e[this.props.name] == name);
+				return index > -1 ? index : 0;
+			},
+			createActiveData() {
+				let arr = [];
+				for (let i = 0; i < this.level; i++) {
+					arr.push(0);
+				}
+				this.actives = arr;
+			},
+			createLevelData(data) {
+				let dts = [];
+				for (let i = 0; i < this.actives.length; i++) {
+					if (i == 0) {
+						dts.push(data);
+					} else {
+						dts.push(this.createSingleData(dts[i-1][this.actives[i-1]][this.props.children]));
+					}
+				}
+				this.allData = dts;
+			},
+			createSingleData(data, key) {
+				return Array.isArray(data) ? data : [];
+			},
+			/**
+			 * 切换选中
+			 * @param {Object} sindex
+			 * @param {Object} index
+			 */
+			changeType(sindex, index){
+				if (this.actives[index] == sindex) return;
+				let arr = JSON.parse(JSON.stringify(this.actives)),
+					ads = JSON.parse(JSON.stringify(this.allData));
+				arr[index] = sindex;
+				for (let i = 0; i < arr.length; i++) {
+					if (i > index) {
+						arr[i] = 0;
+						ads[i] = this.createSingleData(ads[i-1][arr[i-1]][this.props.children])
+					}
+				}
+				this.actives = arr;
+				this.allData = ads;
+				this.getSelectData(arr, ads);
+			},
+			/**
+			 * 组装最终返回的结果
+			 * @param {Object} arr
+			 * @param {Object} ads
+			 */
+			getSelectData(arr, ads) {
+				let result = [];
+				for (let i = 0; i < arr.length; i++) {
+					let t = ads[i][arr[i]];
+					result.push({
+						id: t[this.props.id],
+						name: t[this.props.name]
+					})
+				}
+				this.$emit('change', result);
+			}
+		}
+	}
+</script>
+<style lang="scss">
+	.leo-area-select{
+		display: flex;
+		width: 100%;
+		height: 100%;
+		.list{
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			border-right: 1rpx solid rgba(0,0,0,0.05);
+			overflow: hidden;
+			.list-item{
+				width: 100%;
+				display: flex;
+				flex-direction: column;
+				text-align: center;
+				line-height: 80rpx;
+				font-size: 30rpx;
+				color: #222;
+				overflow: hidden;
+				&.active{
+					background-color: rgba(0,0,0,0.04);
+				}
+				.text{
+					display: inline-block;
+					margin: 0 auto;
+					width: 80%;
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis; 
+				}
+			}
+		}
+	}
+</style>

+ 80 - 0
components/leo-area-select_1.0.0/package.json

@@ -0,0 +1,80 @@
+{
+  "id": "leo-area-select",
+  "displayName": "省市区多级联动",
+  "version": "1.0.0",
+  "description": "省市区多级联动",
+  "keywords": [
+    "省市区,多级联动,三级联动"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+        "前端组件",
+        "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": ""
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "Vue": {
+          "vue2": "y",
+          "vue3": "u"
+        },
+        "App": {
+          "app-vue": "u",
+          "app-nvue": "u"
+        },
+        "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"
+        }
+      }
+    }
+  }
+}

+ 27 - 0
components/leo-area-select_1.0.0/readme.md

@@ -0,0 +1,27 @@
+# leo-area-select
+#### props
+#### level 需要几级联动,默认一级
+#### data 数据源 如不设置则使用系统自带省市区数据
+#### props 配置选项,return { id: 'code', name: 'name', children: 'children' }
+#### activeName  默认选中的省市区,如: ['广东省', '深圳市', '宝安区']
+#### emit 
+#### change 监听选中变化,返回选中的数据组
+#### [{id: "110000", name: "北京市"},{id: "110000", name: "北京市"},{id: "110105", name: "朝阳区"}]
+
+
+### 使用
+#### import areaSelect from 'uni_modules/leo-area-select/components/leo-area-select/index.vue';
+```javascript
+	components:{
+		areaSelect
+	},
+	
+	template
+	<areaSelect @change="changeArea" ></areaSelect>
+	
+	methods
+	changeArea(result) {
+		console.log('area change', result);
+	}
+	
+```

+ 72 - 0
components/m-badge/index.vue

@@ -0,0 +1,72 @@
+<template>
+	<view class="m-badge-box">
+		<text class="m-badge">{{getValue}}</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		// 选项上数量标签
+		name: "m-badge",
+		props: {
+			value: {
+				type: [String, Number],
+				default: 0,
+			},
+		},
+		computed: {
+			getValue(){
+				return  Number(this.value) > Number(this.max) ? this.max + "+" : this.value
+			}
+		},
+		data() {
+			return {
+				max:99
+			};
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.m-badge-box {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		position: absolute;
+		top: 0rpx;
+		box-sizing: border-box;
+		right: 60rpx;
+		background: #FF2923;
+		border: 4rpx solid white;
+		border-radius: 30rpx;
+	}
+
+	.m-badge {
+		font-family: 'PingFang SC';
+		font-style: normal;
+		font-size: 24rpx;
+		max-width: 60rpx;
+		min-width: 30rpx;
+		height: 30rpx;
+		padding: 0 8rpx;
+		font-weight: 500;
+		display: flex;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		text-align: center;
+		color: white;
+		// text-overflow: -o-ellipsis-lastline;
+		// overflow: hidden; //溢出内容隐藏
+		// text-overflow: ellipsis; //文本溢出部分用省略号表示
+		// display: -webkit-box; //特别显示模式
+		// -webkit-line-clamp: 1; //行数
+		// line-clamp: 1;
+		// -webkit-box-orient: vertical; //盒子中内容竖直排列
+
+		white-space: nowrap;
+		// overflow: hidden;
+		// text-overflow: ellipsis;
+	}
+</style>

+ 76 - 0
components/m-round-badge/index.vue

@@ -0,0 +1,76 @@
+<template>
+	<view class="m-badge-box">
+		<text class="m-badge">{{getValue}}</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		// 选项上数量标签
+		name: "m-badge",
+		props: {
+			value: {
+				type: [String, Number],
+				default: 0,
+			},
+		},
+		computed: {
+			getValue(){
+				return  Number(this.value) > Number(this.max) ? this.max + "+" : this.value
+			}
+		},
+		data() {
+			return {
+				max:99
+			};
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.m-badge-box {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		position: absolute;
+		top: 6rpx;
+		box-sizing: border-box;
+		left: 74rpx;
+		line-height: 35rpx;
+		background: #FF2923;
+		border: 4rpx solid white;
+		border-top-left-radius: 20rpx;
+		border-top-right-radius: 20rpx;
+		border-bottom-right-radius: 20rpx;
+		border-bottom-left-radius: 20rpx;
+	}
+
+	.m-badge {
+		font-family: 'PingFang SC';
+		font-style: normal;
+		font-size: 24rpx;
+		min-width: 4rpx;
+		height: 30rpx;
+		font-weight: 500;
+		padding: 0 8rpx;
+		text-align: center;
+		display: flex;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		text-align: center;
+		color: white;
+		// text-overflow: -o-ellipsis-lastline;
+		// overflow: hidden; //溢出内容隐藏
+		// text-overflow: ellipsis; //文本溢出部分用省略号表示
+		// display: -webkit-box; //特别显示模式
+		// -webkit-line-clamp: 1; //行数
+		// line-clamp: 1;
+		// -webkit-box-orient: vertical; //盒子中内容竖直排列
+
+		white-space: nowrap;
+		// overflow: hidden;
+		// text-overflow: ellipsis;
+	}
+</style>

+ 119 - 0
components/m-title/index.vue

@@ -0,0 +1,119 @@
+<template>
+	<view class="m-title-box">
+		<text class="m-title" :style="getTitleStyle">{{title}}</text>
+		<view class="m-title-end-box" @click="commit">
+			<text class="m-subTitle" :style="getSubTitleStyle">{{subTitle}}</text>
+			<image v-show="showRow" class="m-title-row" src="/static/ic_login_right_row.svg" mode="widthFix">
+			</image>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		// 通用title
+		name: "m-title",
+		props: {
+			color: {
+				type: String,
+				default: "#333333"
+			},
+			fontWeight: {
+				type: String,
+				default: "500"
+			},
+			height: {
+				type: String,
+				default: "auto"
+			},
+			titleSize: {
+				type: String,
+				default: "28rpx"
+			},
+			subTitleSize: {
+				type: String,
+				default: "28rpx"
+			},
+			title: {
+				type: String,
+				default: ""
+			},
+			subTitle: {
+				type: String,
+				default: ""
+			},
+			showRow: {
+				type: Boolean,
+				default: true
+			},
+		},
+		computed: {
+			getTitleStyle() {
+				return "height:" + this.height + ";color:" + this.color + ";font-weight:" + this.fontWeight +
+					";font-size:" + this.titleSize + ";"
+			},
+			getSubTitleStyle() {
+				return "font-size:" + this.subTitleSize + ";"
+			},
+		},
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			commit(index) {
+				this.$emit("click", index)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.m-title-box {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+	}
+
+	.m-title {
+		font-family: 'PingFang SC';
+		font-style: normal;
+		line-height: 20px;
+		display: flex;
+		align-items: center;
+		text-align: center;
+		letter-spacing: 0.02em;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+
+	.m-title-end-box {
+		flex: 1;
+		height: 100%;
+		display: flex;
+		align-items: center;
+		flex-direction: row;
+		justify-content: flex-end;
+	}
+
+	.m-subTitle {
+		font-family: 'PingFang SC';
+		font-style: normal;
+		font-weight: 400;
+		text-align: right;
+		letter-spacing: 0.02em;
+		color: #999999;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+
+	.m-title-row {
+		width: 32rpx;
+		height: 32rpx;
+	}
+</style>

+ 98 - 0
components/tabbar/tabbar.vue

@@ -0,0 +1,98 @@
+<template>
+	<view>
+
+		<u-tabbar :value="current?current:1" @change="changeTab" :fixed="true" :safeAreaInsetBottom="true"
+			:border="true" :placeholder="true" activeColor="#0BC3AA" inactiveColor="#AAAFC4">
+			<u-tabbar-item v-for="(item,index) in list" :key="index" :name="item.id" :text="item.text">
+				<image class="u-page__item__slot-icon" slot="active-icon" :src="item.selectedIconPath"></image>
+				<image class="u-page__item__slot-icon-index" slot="inactive-icon" :src="item.iconPath"></image>
+			</u-tabbar-item>
+		</u-tabbar>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "tabbar",
+		data() {
+			return {
+				list: [{
+						id: 1,
+						// 图片更换成自己的哈
+						selectedIconPath: "../../static/index-b.png",
+						iconPath: "../../static/index-a.png",
+						text: '首页',
+						pagePath: "pages/home/index"
+					},
+					{
+						id: 2,
+						selectedIconPath: "../../static/pd-b.png",
+						iconPath: "../../static/pd-a.png",
+						text: '产品',
+						pagePath: "pages/productCenter/productCenter"
+					},
+					{
+						id: 3,
+						selectedIconPath: "../../static/cart-b.png",
+						iconPath: "../../static/cart-a.png",
+						text: '购物车',
+						pagePath: "pages/shoppingCart/shoppingCart"
+					},
+					{
+						id: 4,
+						selectedIconPath: "../../static/mine-b.png",
+						iconPath: "../../static/mine-a.png",
+						text: '我的',
+						pagePath: "pages/mine/index"
+					}
+				],
+			};
+		},
+		props: {
+			current: {
+				type: Number,
+				default: 1
+			}
+		},
+		mounted() {
+
+			const configs = uni.getStorageSync("configs");
+			console.log("getConfigzj=>", configs);
+			if (configs) {
+				this.list[0].selectedIconPath = configs.menu1_on
+				this.list[0].iconPath = configs.menu1_off
+
+				this.list[1].selectedIconPath = configs.menu2_on
+				this.list[1].iconPath = configs.menu2_off
+
+				this.list[2].selectedIconPath = configs.menu3_on
+				this.list[2].iconPath = configs.menu3_off
+
+				this.list[3].selectedIconPath = configs.menu4_on
+				this.list[3].iconPath = configs.menu4_off
+			}
+		},
+		methods: {
+			changeTab(e) {
+				// 用 switchTab 的前提要在 pages.json中 注册好 tabBar
+				//  可以把 switchTab换成其他的跳转(比如:navigateTo) 不过好像页面会闪一下,建议switchTab  
+				uni.switchTab({
+					url: '/' + this.list[e - 1].pagePath,
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.u-page__item__slot-icon {
+		width: 21px !important;
+		height: 21px !important;
+	}
+
+	.u-page__item__slot-icon-index {
+		width: 20px !important;
+		height: 20px !important;
+	}
+</style>

+ 191 - 0
components/tki-barcode/barcode.js

@@ -0,0 +1,191 @@
+const barcodes = require('./barcodes/index.js')['default'];
+let barcode = {};
+(function () {
+    // 初始化
+    barcode = function (cont, ctxid, options, ctxsize, result) {
+        let ops = {}, newOptions, encodings, globaContext, ctx, globaCtxid, cbCanvasSize, cbResult;
+        globaCtxid = ctxid
+        cbCanvasSize = ctxsize
+        cbResult = result
+        newOptions = Object.assign(ops, options);
+        // 修成margin
+        fixMargin(newOptions)
+        // 处理options 数据
+        if (newOptions.text == '' || cont == '') {
+            return false
+        }
+        // 获取ctx
+        globaContext = cont
+        ctx = uni.createCanvasContext(globaCtxid, globaContext)
+        // 获取编码数据
+        encodings = new barcodes[newOptions.format.toUpperCase()](newOptions.text, newOptions).encode()
+        let fixencodings = fixEncodings(encodings, newOptions)
+        // 返回canvas实际大小
+        cbCanvasSize({ width: fixencodings.width, height: fixencodings.height })
+        // 绘制canvas
+        setTimeout(() => {
+            drawCanvas.render(newOptions, fixencodings)
+        }, 50);
+        // 绘制canvas
+        let drawCanvas = {
+            render(options, encoding) {
+                this.prepare(options, encoding)
+                encoding.encodings.forEach((v, i) => {
+                    this.barcode(options, v)
+                    this.text(options, v)
+                    this.move(v)
+                });
+                this.draw(options, encoding)
+            },
+            barcode(options, encoding) {
+                let binary = encoding.data;
+                let yFrom;
+                if (options.textPosition == "top") {
+                    yFrom = options.marginTop + options.fontSize + options.textMargin;
+                } else {
+                    yFrom = options.marginTop;
+                }
+                // 绘制条码
+                ctx.fillStyle = options.lineColor;
+                for (let b = 0; b < binary.length; b++) {
+                    let x = b * options.width + encoding.barcodePadding;
+                    let height = options.height
+                    if (encoding.options) {
+                        if (encoding.options.height != undefined) {
+                            height = encoding.options.height
+                        }
+                    }
+                    if (binary[b] === "1") {
+                        ctx.fillRect(x, yFrom, options.width, height);
+                    } else if (binary[b]) {
+                        ctx.fillRect(x, yFrom, options.width, height * binary[b]);
+                    }
+                }
+            },
+            text(options, encoding) {
+				return
+                if (options.displayValue) {
+                    let x, y, align, size;
+                    if (options.textPosition == "top") {
+                        y = options.marginTop + options.fontSize;
+                    } else {
+                        y = options.height + options.textMargin + options.marginTop + options.fontSize;
+                    }
+                    if (encoding.options) {
+                        if (encoding.options.textAlign != undefined) {
+                            align = encoding.options.textAlign
+                        }
+                        if (encoding.options.fontSize != undefined) {
+                            size = encoding.options.fontSize
+                        }
+                    } else {
+                        align = options.textAlign
+                        size = options.fontSize
+                    }
+                    ctx.setFontSize(size)
+                    if (align == "left" || encoding.barcodePadding > 0) {
+                        x = 0;
+                        ctx.setTextAlign('left')
+                    } else if (align == "right") {
+                        x = encoding.width - 1;
+                        ctx.setTextAlign('right')
+                    }
+                    else {
+                        x = encoding.width / 2;
+                        ctx.setTextAlign('center');
+                    }
+                    ctx.fillStyle = options.fontColor;
+                    if (encoding.text != undefined) {
+                        ctx.fillText(encoding.text, x, y);
+                    }
+                }
+            },
+            move(encoding) {
+                ctx.translate(encoding.width, 0);
+            },
+            prepare(options, encoding) {
+                // 绘制背景
+                if (options.background) {
+                    ctx.fillStyle = options.background;
+                    ctx.fillRect(0, 0, encoding.width, encoding.height);
+                }
+                ctx.translate(options.marginLeft, 0);
+            },
+            draw(options, encoding) {
+                ctx.draw(false, () => {
+                    this.toImgs(options, encoding)
+                })
+            },
+            toImgs(options, encoding) {
+                setTimeout(() => {
+                    uni.canvasToTempFilePath({
+                        width: encoding.width,
+                        height: encoding.height,
+                        destWidth: encoding.width,
+                        destHeight: encoding.height,
+                        canvasId: globaCtxid,
+                        fileType: 'png',
+                        success: function (res) {
+                            cbResult(res.tempFilePath)
+                        },
+                        fail: function (res) {
+                            cbResult(res)
+                        },
+                        complete: function () {
+                            uni.hideLoading();
+                        },
+                    }, globaContext);
+                }, options.text.length + 100);
+            }
+        }
+        // 混入canvas数据
+        function fixEncodings(encoding, options) {
+            let encodingArr = [], width = options.marginLeft + options.marginRight, height;
+            if (!Array.isArray(encoding)) {
+                encodingArr[0] = JSON.parse(JSON.stringify(encoding))
+            } else {
+                encodingArr = [...encoding]
+            }
+            encodingArr.forEach((v, i) => {
+                // 获取文本宽度
+                let textWidth = ctx.measureText(encodingArr[i].text ? encodingArr[i].text : '').width;
+                // 获取条形码宽度
+                let barcodeWidth = encodingArr[i].data.length * options.width;
+                // 获取内边距
+                let barcodePadding = 0;
+                if (options.displayValue && barcodeWidth < textWidth) {
+                    if (options.textAlign == "center") {
+                        barcodePadding = Math.floor((textWidth - barcodeWidth) / 2);
+                    } else if (options.textAlign == "left") {
+                        barcodePadding = 0;
+                    } else if (options.textAlign == "right") {
+                        barcodePadding = Math.floor(textWidth - barcodeWidth);
+                    }
+                }
+                // 混入encodingArr[i]
+                encodingArr[i].barcodePadding = barcodePadding
+                encodingArr[i].width = Math.ceil(Math.max(textWidth, barcodeWidth))
+                width += encodingArr[i].width
+                if (encodingArr[i].options) {
+                    if (encodingArr[i].options.height != undefined) {
+                        encodingArr[i].height = encodingArr[i].options.height + (options.displayValue && (encodingArr[i].text ? encodingArr[i].text : '').length > 0 ? options.fontSize + options.textMargin : 0) + options.marginTop + options.marginBottom;
+                    } else {
+                        encodingArr[i].height = height = options.height + (options.displayValue && (encodingArr[i].text ? encodingArr[i].text : '').length > 0 ? options.fontSize + options.textMargin : 0) + options.marginTop + options.marginBottom;
+                    }
+                } else {
+                    encodingArr[i].height = height = options.height + (options.displayValue && (encodingArr[i].text ? encodingArr[i].text : '').length > 0 ? options.fontSize + options.textMargin : 0) + options.marginTop + options.marginBottom;
+                }
+            });
+            return { encodings: encodingArr, width, height };
+        }
+        // 修正Margin
+        function fixMargin(options) {
+            options.marginTop = options.marginTop == undefined ? options.margin : options.marginTop;
+            options.marginBottom = options.marginBottom == undefined ? options.margin : options.marginBottom;
+            options.marginRight = options.marginRight == undefined ? options.margin : options.marginRight;
+            options.marginLeft = options.marginLeft == undefined ? options.margin : options.marginLeft;
+        }
+    };
+})()
+
+export default barcode

+ 17 - 0
components/tki-barcode/barcodes/Barcode.js

@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Barcode = function Barcode(data, options) {
+	_classCallCheck(this, Barcode);
+
+	this.data = data;
+	this.text = options.text || data;
+	this.options = options;
+};
+
+exports.default = Barcode;

+ 167 - 0
components/tki-barcode/barcodes/CODE128/CODE128.js

@@ -0,0 +1,167 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _Barcode2 = require('../Barcode.js');
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+var _constants = require('./constants');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+// This is the master class,
+// it does require the start code to be included in the string
+var CODE128 = function (_Barcode) {
+	_inherits(CODE128, _Barcode);
+
+	function CODE128(data, options) {
+		_classCallCheck(this, CODE128);
+
+		// Get array of ascii codes from data
+		var _this = _possibleConstructorReturn(this, (CODE128.__proto__ || Object.getPrototypeOf(CODE128)).call(this, data.substring(1), options));
+
+		_this.bytes = data.split('').map(function (char) {
+			return char.charCodeAt(0);
+		});
+		return _this;
+	}
+
+	_createClass(CODE128, [{
+		key: 'valid',
+		value: function valid() {
+			// ASCII value ranges 0-127, 200-211
+			return (/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)
+			);
+		}
+
+		// The public encoding function
+
+	}, {
+		key: 'encode',
+		value: function encode() {
+			var bytes = this.bytes;
+			// Remove the start code from the bytes and set its index
+			var startIndex = bytes.shift() - 105;
+			// Get start set by index
+			var startSet = _constants.SET_BY_CODE[startIndex];
+
+			if (startSet === undefined) {
+				throw new RangeError('The encoding does not start with a start character.');
+			}
+
+			if (this.shouldEncodeAsEan128() === true) {
+				bytes.unshift(_constants.FNC1);
+			}
+
+			// Start encode with the right type
+			var encodingResult = CODE128.next(bytes, 1, startSet);
+
+			return {
+				text: this.text === this.data ? this.text.replace(/[^\x20-\x7E]/g, '') : this.text,
+				data:
+				// Add the start bits
+				CODE128.getBar(startIndex) +
+				// Add the encoded bits
+				encodingResult.result +
+				// Add the checksum
+				CODE128.getBar((encodingResult.checksum + startIndex) % _constants.MODULO) +
+				// Add the end bits
+				CODE128.getBar(_constants.STOP)
+			};
+		}
+
+		// GS1-128/EAN-128
+
+	}, {
+		key: 'shouldEncodeAsEan128',
+		value: function shouldEncodeAsEan128() {
+			var isEAN128 = this.options.ean128 || false;
+			if (typeof isEAN128 === 'string') {
+				isEAN128 = isEAN128.toLowerCase() === 'true';
+			}
+			return isEAN128;
+		}
+
+		// Get a bar symbol by index
+
+	}], [{
+		key: 'getBar',
+		value: function getBar(index) {
+			return _constants.BARS[index] ? _constants.BARS[index].toString() : '';
+		}
+
+		// Correct an index by a set and shift it from the bytes array
+
+	}, {
+		key: 'correctIndex',
+		value: function correctIndex(bytes, set) {
+			if (set === _constants.SET_A) {
+				var charCode = bytes.shift();
+				return charCode < 32 ? charCode + 64 : charCode - 32;
+			} else if (set === _constants.SET_B) {
+				return bytes.shift() - 32;
+			} else {
+				return (bytes.shift() - 48) * 10 + bytes.shift() - 48;
+			}
+		}
+	}, {
+		key: 'next',
+		value: function next(bytes, pos, set) {
+			if (!bytes.length) {
+				return { result: '', checksum: 0 };
+			}
+
+			var nextCode = void 0,
+			    index = void 0;
+
+			// Special characters
+			if (bytes[0] >= 200) {
+				index = bytes.shift() - 105;
+				var nextSet = _constants.SWAP[index];
+
+				// Swap to other set
+				if (nextSet !== undefined) {
+					nextCode = CODE128.next(bytes, pos + 1, nextSet);
+				}
+				// Continue on current set but encode a special character
+				else {
+						// Shift
+						if ((set === _constants.SET_A || set === _constants.SET_B) && index === _constants.SHIFT) {
+							// Convert the next character so that is encoded correctly
+							bytes[0] = set === _constants.SET_A ? bytes[0] > 95 ? bytes[0] - 96 : bytes[0] : bytes[0] < 32 ? bytes[0] + 96 : bytes[0];
+						}
+						nextCode = CODE128.next(bytes, pos + 1, set);
+					}
+			}
+			// Continue encoding
+			else {
+					index = CODE128.correctIndex(bytes, set);
+					nextCode = CODE128.next(bytes, pos + 1, set);
+				}
+
+			// Get the correct binary encoding and calculate the weight
+			var enc = CODE128.getBar(index);
+			var weight = index * pos;
+
+			return {
+				result: enc + nextCode.result,
+				checksum: weight + nextCode.checksum
+			};
+		}
+	}]);
+
+	return CODE128;
+}(_Barcode3.default);
+
+exports.default = CODE128;

+ 42 - 0
components/tki-barcode/barcodes/CODE128/CODE128A.js

@@ -0,0 +1,42 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _CODE2 = require('./CODE128.js');
+
+var _CODE3 = _interopRequireDefault(_CODE2);
+
+var _constants = require('./constants');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var CODE128A = function (_CODE) {
+	_inherits(CODE128A, _CODE);
+
+	function CODE128A(string, options) {
+		_classCallCheck(this, CODE128A);
+
+		return _possibleConstructorReturn(this, (CODE128A.__proto__ || Object.getPrototypeOf(CODE128A)).call(this, _constants.A_START_CHAR + string, options));
+	}
+
+	_createClass(CODE128A, [{
+		key: 'valid',
+		value: function valid() {
+			return new RegExp('^' + _constants.A_CHARS + '+$').test(this.data);
+		}
+	}]);
+
+	return CODE128A;
+}(_CODE3.default);
+
+exports.default = CODE128A;

+ 42 - 0
components/tki-barcode/barcodes/CODE128/CODE128B.js

@@ -0,0 +1,42 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _CODE2 = require('./CODE128.js');
+
+var _CODE3 = _interopRequireDefault(_CODE2);
+
+var _constants = require('./constants');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var CODE128B = function (_CODE) {
+	_inherits(CODE128B, _CODE);
+
+	function CODE128B(string, options) {
+		_classCallCheck(this, CODE128B);
+
+		return _possibleConstructorReturn(this, (CODE128B.__proto__ || Object.getPrototypeOf(CODE128B)).call(this, _constants.B_START_CHAR + string, options));
+	}
+
+	_createClass(CODE128B, [{
+		key: 'valid',
+		value: function valid() {
+			return new RegExp('^' + _constants.B_CHARS + '+$').test(this.data);
+		}
+	}]);
+
+	return CODE128B;
+}(_CODE3.default);
+
+exports.default = CODE128B;

+ 42 - 0
components/tki-barcode/barcodes/CODE128/CODE128C.js

@@ -0,0 +1,42 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _CODE2 = require('./CODE128.js');
+
+var _CODE3 = _interopRequireDefault(_CODE2);
+
+var _constants = require('./constants');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var CODE128C = function (_CODE) {
+	_inherits(CODE128C, _CODE);
+
+	function CODE128C(string, options) {
+		_classCallCheck(this, CODE128C);
+
+		return _possibleConstructorReturn(this, (CODE128C.__proto__ || Object.getPrototypeOf(CODE128C)).call(this, _constants.C_START_CHAR + string, options));
+	}
+
+	_createClass(CODE128C, [{
+		key: 'valid',
+		value: function valid() {
+			return new RegExp('^' + _constants.C_CHARS + '+$').test(this.data);
+		}
+	}]);
+
+	return CODE128C;
+}(_CODE3.default);
+
+exports.default = CODE128C;

+ 41 - 0
components/tki-barcode/barcodes/CODE128/CODE128_AUTO.js

@@ -0,0 +1,41 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _CODE2 = require('./CODE128');
+
+var _CODE3 = _interopRequireDefault(_CODE2);
+
+var _auto = require('./auto');
+
+var _auto2 = _interopRequireDefault(_auto);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var CODE128AUTO = function (_CODE) {
+	_inherits(CODE128AUTO, _CODE);
+
+	function CODE128AUTO(data, options) {
+		_classCallCheck(this, CODE128AUTO);
+
+		// ASCII value ranges 0-127, 200-211
+		if (/^[\x00-\x7F\xC8-\xD3]+$/.test(data)) {
+			var _this = _possibleConstructorReturn(this, (CODE128AUTO.__proto__ || Object.getPrototypeOf(CODE128AUTO)).call(this, (0, _auto2.default)(data), options));
+		} else {
+			var _this = _possibleConstructorReturn(this, (CODE128AUTO.__proto__ || Object.getPrototypeOf(CODE128AUTO)).call(this, data, options));
+		}
+		return _possibleConstructorReturn(_this);
+	}
+
+	return CODE128AUTO;
+}(_CODE3.default);
+
+exports.default = CODE128AUTO;

+ 73 - 0
components/tki-barcode/barcodes/CODE128/auto.js

@@ -0,0 +1,73 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _constants = require('./constants');
+
+// Match Set functions
+var matchSetALength = function matchSetALength(string) {
+	return string.match(new RegExp('^' + _constants.A_CHARS + '*'))[0].length;
+};
+var matchSetBLength = function matchSetBLength(string) {
+	return string.match(new RegExp('^' + _constants.B_CHARS + '*'))[0].length;
+};
+var matchSetC = function matchSetC(string) {
+	return string.match(new RegExp('^' + _constants.C_CHARS + '*'))[0];
+};
+
+// CODE128A or CODE128B
+function autoSelectFromAB(string, isA) {
+	var ranges = isA ? _constants.A_CHARS : _constants.B_CHARS;
+	var untilC = string.match(new RegExp('^(' + ranges + '+?)(([0-9]{2}){2,})([^0-9]|$)'));
+
+	if (untilC) {
+		return untilC[1] + String.fromCharCode(204) + autoSelectFromC(string.substring(untilC[1].length));
+	}
+
+	var chars = string.match(new RegExp('^' + ranges + '+'))[0];
+
+	if (chars.length === string.length) {
+		return string;
+	}
+
+	return chars + String.fromCharCode(isA ? 205 : 206) + autoSelectFromAB(string.substring(chars.length), !isA);
+}
+
+// CODE128C
+function autoSelectFromC(string) {
+	var cMatch = matchSetC(string);
+	var length = cMatch.length;
+
+	if (length === string.length) {
+		return string;
+	}
+
+	string = string.substring(length);
+
+	// Select A/B depending on the longest match
+	var isA = matchSetALength(string) >= matchSetBLength(string);
+	return cMatch + String.fromCharCode(isA ? 206 : 205) + autoSelectFromAB(string, isA);
+}
+
+// Detect Code Set (A, B or C) and format the string
+
+exports.default = function (string) {
+	var newString = void 0;
+	var cLength = matchSetC(string).length;
+
+	// Select 128C if the string start with enough digits
+	if (cLength >= 2) {
+		newString = _constants.C_START_CHAR + autoSelectFromC(string);
+	} else {
+		// Select A/B depending on the longest match
+		var isA = matchSetALength(string) > matchSetBLength(string);
+		newString = (isA ? _constants.A_START_CHAR : _constants.B_START_CHAR) + autoSelectFromAB(string, isA);
+	}
+
+	return newString.replace(/[\xCD\xCE]([^])[\xCD\xCE]/, // Any sequence between 205 and 206 characters
+	function (match, char) {
+		return String.fromCharCode(203) + char;
+	});
+};

+ 54 - 0
components/tki-barcode/barcodes/CODE128/constants.js

@@ -0,0 +1,54 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _SET_BY_CODE;
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+// constants for internal usage
+var SET_A = exports.SET_A = 0;
+var SET_B = exports.SET_B = 1;
+var SET_C = exports.SET_C = 2;
+
+// Special characters
+var SHIFT = exports.SHIFT = 98;
+var START_A = exports.START_A = 103;
+var START_B = exports.START_B = 104;
+var START_C = exports.START_C = 105;
+var MODULO = exports.MODULO = 103;
+var STOP = exports.STOP = 106;
+var FNC1 = exports.FNC1 = 207;
+
+// Get set by start code
+var SET_BY_CODE = exports.SET_BY_CODE = (_SET_BY_CODE = {}, _defineProperty(_SET_BY_CODE, START_A, SET_A), _defineProperty(_SET_BY_CODE, START_B, SET_B), _defineProperty(_SET_BY_CODE, START_C, SET_C), _SET_BY_CODE);
+
+// Get next set by code
+var SWAP = exports.SWAP = {
+	101: SET_A,
+	100: SET_B,
+	99: SET_C
+};
+
+var A_START_CHAR = exports.A_START_CHAR = String.fromCharCode(208); // START_A + 105
+var B_START_CHAR = exports.B_START_CHAR = String.fromCharCode(209); // START_B + 105
+var C_START_CHAR = exports.C_START_CHAR = String.fromCharCode(210); // START_C + 105
+
+// 128A (Code Set A)
+// ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4
+var A_CHARS = exports.A_CHARS = "[\x00-\x5F\xC8-\xCF]";
+
+// 128B (Code Set B)
+// ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4
+var B_CHARS = exports.B_CHARS = "[\x20-\x7F\xC8-\xCF]";
+
+// 128C (Code Set C)
+// 00–99 (encodes two digits with a single code point) and FNC1
+var C_CHARS = exports.C_CHARS = "(\xCF*[0-9]{2}\xCF*)";
+
+// CODE128 includes 107 symbols:
+// 103 data symbols, 3 start symbols (A, B and C), and 1 stop symbol (the last one)
+// Each symbol consist of three black bars (1) and three white spaces (0).
+var BARS = exports.BARS = [11011001100, 11001101100, 11001100110, 10010011000, 10010001100, 10001001100, 10011001000, 10011000100, 10001100100, 11001001000, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011000, 11011000110, 11000110110, 10100011000, 10001011000, 10001000110, 10110001000, 10001101000, 10001100010, 11010001000, 11000101000, 11000100010, 10110111000, 10110001110, 10001101110, 10111011000, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101000, 11011100010, 11011101110, 11101011000, 11101000110, 11100010110, 11101101000, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 10100110000, 10100001100, 10010110000, 10010000110, 10000101100, 10000100110, 10110010000, 10110000100, 10011010000, 10011000010, 10000110100, 10000110010, 11000010010, 11001010000, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111000, 10100011110, 10001011110, 10111101000, 10111100010, 11110101000, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 11010010000, 11010011100, 1100011101011];

+ 29 - 0
components/tki-barcode/barcodes/CODE128/index.js

@@ -0,0 +1,29 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.CODE128C = exports.CODE128B = exports.CODE128A = exports.CODE128 = undefined;
+
+var _CODE128_AUTO = require('./CODE128_AUTO.js');
+
+var _CODE128_AUTO2 = _interopRequireDefault(_CODE128_AUTO);
+
+var _CODE128A = require('./CODE128A.js');
+
+var _CODE128A2 = _interopRequireDefault(_CODE128A);
+
+var _CODE128B = require('./CODE128B.js');
+
+var _CODE128B2 = _interopRequireDefault(_CODE128B);
+
+var _CODE128C = require('./CODE128C.js');
+
+var _CODE128C2 = _interopRequireDefault(_CODE128C);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.CODE128 = _CODE128_AUTO2.default;
+exports.CODE128A = _CODE128A2.default;
+exports.CODE128B = _CODE128B2.default;
+exports.CODE128C = _CODE128C2.default;

+ 104 - 0
components/tki-barcode/barcodes/CODE39/index.js

@@ -0,0 +1,104 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+exports.CODE39 = undefined;
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _Barcode2 = require("../Barcode.js");
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
+// https://en.wikipedia.org/wiki/Code_39#Encoding
+
+var CODE39 = function (_Barcode) {
+	_inherits(CODE39, _Barcode);
+
+	function CODE39(data, options) {
+		_classCallCheck(this, CODE39);
+
+		data = data.toUpperCase();
+
+		// Calculate mod43 checksum if enabled
+		if (options.mod43) {
+			data += getCharacter(mod43checksum(data));
+		}
+
+		return _possibleConstructorReturn(this, (CODE39.__proto__ || Object.getPrototypeOf(CODE39)).call(this, data, options));
+	}
+
+	_createClass(CODE39, [{
+		key: "encode",
+		value: function encode() {
+			// First character is always a *
+			var result = getEncoding("*");
+
+			// Take every character and add the binary representation to the result
+			for (var i = 0; i < this.data.length; i++) {
+				result += getEncoding(this.data[i]) + "0";
+			}
+
+			// Last character is always a *
+			result += getEncoding("*");
+			return {
+				data: result,
+				text: this.text
+			};
+		}
+	}, {
+		key: "valid",
+		value: function valid() {
+			return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
+		}
+	}]);
+
+	return CODE39;
+}(_Barcode3.default);
+
+// All characters. The position in the array is the (checksum) value
+
+
+var characters = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", ".", " ", "$", "/", "+", "%", "*"];
+
+// The decimal representation of the characters, is converted to the
+// corresponding binary with the getEncoding function
+var encodings = [20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981, 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293, 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770];
+
+// Get the binary representation of a character by converting the encodings
+// from decimal to binary
+function getEncoding(character) {
+	return getBinary(characterValue(character));
+}
+
+function getBinary(characterValue) {
+	return encodings[characterValue].toString(2);
+}
+
+function getCharacter(characterValue) {
+	return characters[characterValue];
+}
+
+function characterValue(character) {
+	return characters.indexOf(character);
+}
+
+function mod43checksum(data) {
+	var checksum = 0;
+	for (var i = 0; i < data.length; i++) {
+		checksum += characterValue(data[i]);
+	}
+
+	checksum = checksum % 43;
+	return checksum;
+}
+
+exports.CODE39 = CODE39;

+ 92 - 0
components/tki-barcode/barcodes/EAN_UPC/EAN.js

@@ -0,0 +1,92 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _constants = require('./constants');
+
+var _encoder = require('./encoder');
+
+var _encoder2 = _interopRequireDefault(_encoder);
+
+var _Barcode2 = require('../Barcode');
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+// Base class for EAN8 & EAN13
+var EAN = function (_Barcode) {
+	_inherits(EAN, _Barcode);
+
+	function EAN(data, options) {
+		_classCallCheck(this, EAN);
+
+		// Make sure the font is not bigger than the space between the guard bars
+		var _this = _possibleConstructorReturn(this, (EAN.__proto__ || Object.getPrototypeOf(EAN)).call(this, data, options));
+
+		_this.fontSize = !options.flat && options.fontSize > options.width * 10 ? options.width * 10 : options.fontSize;
+
+		// Make the guard bars go down half the way of the text
+		_this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
+		return _this;
+	}
+
+	_createClass(EAN, [{
+		key: 'encode',
+		value: function encode() {
+			return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
+		}
+	}, {
+		key: 'leftText',
+		value: function leftText(from, to) {
+			return this.text.substr(from, to);
+		}
+	}, {
+		key: 'leftEncode',
+		value: function leftEncode(data, structure) {
+			return (0, _encoder2.default)(data, structure);
+		}
+	}, {
+		key: 'rightText',
+		value: function rightText(from, to) {
+			return this.text.substr(from, to);
+		}
+	}, {
+		key: 'rightEncode',
+		value: function rightEncode(data, structure) {
+			return (0, _encoder2.default)(data, structure);
+		}
+	}, {
+		key: 'encodeGuarded',
+		value: function encodeGuarded() {
+			var textOptions = { fontSize: this.fontSize };
+			var guardOptions = { height: this.guardHeight };
+
+			return [{ data: _constants.SIDE_BIN, options: guardOptions }, { data: this.leftEncode(), text: this.leftText(), options: textOptions }, { data: _constants.MIDDLE_BIN, options: guardOptions }, { data: this.rightEncode(), text: this.rightText(), options: textOptions }, { data: _constants.SIDE_BIN, options: guardOptions }];
+		}
+	}, {
+		key: 'encodeFlat',
+		value: function encodeFlat() {
+			var data = [_constants.SIDE_BIN, this.leftEncode(), _constants.MIDDLE_BIN, this.rightEncode(), _constants.SIDE_BIN];
+
+			return {
+				data: data.join(''),
+				text: this.text
+			};
+		}
+	}]);
+
+	return EAN;
+}(_Barcode3.default);
+
+exports.default = EAN;

+ 119 - 0
components/tki-barcode/barcodes/EAN_UPC/EAN13.js

@@ -0,0 +1,119 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
+
+var _constants = require('./constants');
+
+var _EAN2 = require('./EAN');
+
+var _EAN3 = _interopRequireDefault(_EAN2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
+// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Binary_encoding_of_data_digits_into_EAN-13_barcode
+
+// Calculate the checksum digit
+// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Calculation_of_checksum_digit
+var checksum = function checksum(number) {
+	var res = number.substr(0, 12).split('').map(function (n) {
+		return +n;
+	}).reduce(function (sum, a, idx) {
+		return idx % 2 ? sum + a * 3 : sum + a;
+	}, 0);
+
+	return (10 - res % 10) % 10;
+};
+
+var EAN13 = function (_EAN) {
+	_inherits(EAN13, _EAN);
+
+	function EAN13(data, options) {
+		_classCallCheck(this, EAN13);
+
+		// Add checksum if it does not exist
+		if (data.search(/^[0-9]{12}$/) !== -1) {
+			data += checksum(data);
+		}
+
+		// Adds a last character to the end of the barcode
+		var _this = _possibleConstructorReturn(this, (EAN13.__proto__ || Object.getPrototypeOf(EAN13)).call(this, data, options));
+
+		_this.lastChar = options.lastChar;
+		return _this;
+	}
+
+	_createClass(EAN13, [{
+		key: 'valid',
+		value: function valid() {
+			return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === checksum(this.data);
+		}
+	}, {
+		key: 'leftText',
+		value: function leftText() {
+			return _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'leftText', this).call(this, 1, 6);
+		}
+	}, {
+		key: 'leftEncode',
+		value: function leftEncode() {
+			var data = this.data.substr(1, 6);
+			var structure = _constants.EAN13_STRUCTURE[this.data[0]];
+			return _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'leftEncode', this).call(this, data, structure);
+		}
+	}, {
+		key: 'rightText',
+		value: function rightText() {
+			return _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'rightText', this).call(this, 7, 6);
+		}
+	}, {
+		key: 'rightEncode',
+		value: function rightEncode() {
+			var data = this.data.substr(7, 6);
+			return _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'rightEncode', this).call(this, data, 'RRRRRR');
+		}
+
+		// The "standard" way of printing EAN13 barcodes with guard bars
+
+	}, {
+		key: 'encodeGuarded',
+		value: function encodeGuarded() {
+			var data = _get(EAN13.prototype.__proto__ || Object.getPrototypeOf(EAN13.prototype), 'encodeGuarded', this).call(this);
+
+			// Extend data with left digit & last character
+			if (this.options.displayValue) {
+				data.unshift({
+					data: '000000000000',
+					text: this.text.substr(0, 1),
+					options: { textAlign: 'left', fontSize: this.fontSize }
+				});
+
+				if (this.options.lastChar) {
+					data.push({
+						data: '00'
+					});
+					data.push({
+						data: '00000',
+						text: this.options.lastChar,
+						options: { fontSize: this.fontSize }
+					});
+				}
+			}
+
+			return data;
+		}
+	}]);
+
+	return EAN13;
+}(_EAN3.default);
+
+exports.default = EAN13;

+ 58 - 0
components/tki-barcode/barcodes/EAN_UPC/EAN2.js

@@ -0,0 +1,58 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _constants = require('./constants');
+
+var _encoder = require('./encoder');
+
+var _encoder2 = _interopRequireDefault(_encoder);
+
+var _Barcode2 = require('../Barcode');
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
+// https://en.wikipedia.org/wiki/EAN_2#Encoding
+
+var EAN2 = function (_Barcode) {
+	_inherits(EAN2, _Barcode);
+
+	function EAN2(data, options) {
+		_classCallCheck(this, EAN2);
+
+		return _possibleConstructorReturn(this, (EAN2.__proto__ || Object.getPrototypeOf(EAN2)).call(this, data, options));
+	}
+
+	_createClass(EAN2, [{
+		key: 'valid',
+		value: function valid() {
+			return this.data.search(/^[0-9]{2}$/) !== -1;
+		}
+	}, {
+		key: 'encode',
+		value: function encode() {
+			// Choose the structure based on the number mod 4
+			var structure = _constants.EAN2_STRUCTURE[parseInt(this.data) % 4];
+			return {
+				// Start bits + Encode the two digits with 01 in between
+				data: '1011' + (0, _encoder2.default)(this.data, structure, '01'),
+				text: this.text
+			};
+		}
+	}]);
+
+	return EAN2;
+}(_Barcode3.default);
+
+exports.default = EAN2;

+ 65 - 0
components/tki-barcode/barcodes/EAN_UPC/EAN5.js

@@ -0,0 +1,65 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _constants = require('./constants');
+
+var _encoder = require('./encoder');
+
+var _encoder2 = _interopRequireDefault(_encoder);
+
+var _Barcode2 = require('../Barcode');
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
+// https://en.wikipedia.org/wiki/EAN_5#Encoding
+
+var checksum = function checksum(data) {
+	var result = data.split('').map(function (n) {
+		return +n;
+	}).reduce(function (sum, a, idx) {
+		return idx % 2 ? sum + a * 9 : sum + a * 3;
+	}, 0);
+	return result % 10;
+};
+
+var EAN5 = function (_Barcode) {
+	_inherits(EAN5, _Barcode);
+
+	function EAN5(data, options) {
+		_classCallCheck(this, EAN5);
+
+		return _possibleConstructorReturn(this, (EAN5.__proto__ || Object.getPrototypeOf(EAN5)).call(this, data, options));
+	}
+
+	_createClass(EAN5, [{
+		key: 'valid',
+		value: function valid() {
+			return this.data.search(/^[0-9]{5}$/) !== -1;
+		}
+	}, {
+		key: 'encode',
+		value: function encode() {
+			var structure = _constants.EAN5_STRUCTURE[checksum(this.data)];
+			return {
+				data: '1011' + (0, _encoder2.default)(this.data, structure, '01'),
+				text: this.text
+			};
+		}
+	}]);
+
+	return EAN5;
+}(_Barcode3.default);
+
+exports.default = EAN5;

+ 81 - 0
components/tki-barcode/barcodes/EAN_UPC/EAN8.js

@@ -0,0 +1,81 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
+
+var _EAN2 = require('./EAN');
+
+var _EAN3 = _interopRequireDefault(_EAN2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
+// http://www.barcodeisland.com/ean8.phtml
+
+// Calculate the checksum digit
+var checksum = function checksum(number) {
+	var res = number.substr(0, 7).split('').map(function (n) {
+		return +n;
+	}).reduce(function (sum, a, idx) {
+		return idx % 2 ? sum + a : sum + a * 3;
+	}, 0);
+
+	return (10 - res % 10) % 10;
+};
+
+var EAN8 = function (_EAN) {
+	_inherits(EAN8, _EAN);
+
+	function EAN8(data, options) {
+		_classCallCheck(this, EAN8);
+
+		// Add checksum if it does not exist
+		if (data.search(/^[0-9]{7}$/) !== -1) {
+			data += checksum(data);
+		}
+
+		return _possibleConstructorReturn(this, (EAN8.__proto__ || Object.getPrototypeOf(EAN8)).call(this, data, options));
+	}
+
+	_createClass(EAN8, [{
+		key: 'valid',
+		value: function valid() {
+			return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === checksum(this.data);
+		}
+	}, {
+		key: 'leftText',
+		value: function leftText() {
+			return _get(EAN8.prototype.__proto__ || Object.getPrototypeOf(EAN8.prototype), 'leftText', this).call(this, 0, 4);
+		}
+	}, {
+		key: 'leftEncode',
+		value: function leftEncode() {
+			var data = this.data.substr(0, 4);
+			return _get(EAN8.prototype.__proto__ || Object.getPrototypeOf(EAN8.prototype), 'leftEncode', this).call(this, data, 'LLLL');
+		}
+	}, {
+		key: 'rightText',
+		value: function rightText() {
+			return _get(EAN8.prototype.__proto__ || Object.getPrototypeOf(EAN8.prototype), 'rightText', this).call(this, 4, 4);
+		}
+	}, {
+		key: 'rightEncode',
+		value: function rightEncode() {
+			var data = this.data.substr(4, 4);
+			return _get(EAN8.prototype.__proto__ || Object.getPrototypeOf(EAN8.prototype), 'rightEncode', this).call(this, data, 'RRRR');
+		}
+	}]);
+
+	return EAN8;
+}(_EAN3.default);
+
+exports.default = EAN8;

+ 165 - 0
components/tki-barcode/barcodes/EAN_UPC/UPC.js

@@ -0,0 +1,165 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+exports.checksum = checksum;
+
+var _encoder = require("./encoder");
+
+var _encoder2 = _interopRequireDefault(_encoder);
+
+var _Barcode2 = require("../Barcode.js");
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
+// https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding
+
+var UPC = function (_Barcode) {
+	_inherits(UPC, _Barcode);
+
+	function UPC(data, options) {
+		_classCallCheck(this, UPC);
+
+		// Add checksum if it does not exist
+		if (data.search(/^[0-9]{11}$/) !== -1) {
+			data += checksum(data);
+		}
+
+		var _this = _possibleConstructorReturn(this, (UPC.__proto__ || Object.getPrototypeOf(UPC)).call(this, data, options));
+
+		_this.displayValue = options.displayValue;
+
+		// Make sure the font is not bigger than the space between the guard bars
+		if (options.fontSize > options.width * 10) {
+			_this.fontSize = options.width * 10;
+		} else {
+			_this.fontSize = options.fontSize;
+		}
+
+		// Make the guard bars go down half the way of the text
+		_this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
+		return _this;
+	}
+
+	_createClass(UPC, [{
+		key: "valid",
+		value: function valid() {
+			return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == checksum(this.data);
+		}
+	}, {
+		key: "encode",
+		value: function encode() {
+			if (this.options.flat) {
+				return this.flatEncoding();
+			} else {
+				return this.guardedEncoding();
+			}
+		}
+	}, {
+		key: "flatEncoding",
+		value: function flatEncoding() {
+			var result = "";
+
+			result += "101";
+			result += (0, _encoder2.default)(this.data.substr(0, 6), "LLLLLL");
+			result += "01010";
+			result += (0, _encoder2.default)(this.data.substr(6, 6), "RRRRRR");
+			result += "101";
+
+			return {
+				data: result,
+				text: this.text
+			};
+		}
+	}, {
+		key: "guardedEncoding",
+		value: function guardedEncoding() {
+			var result = [];
+
+			// Add the first digit
+			if (this.displayValue) {
+				result.push({
+					data: "00000000",
+					text: this.text.substr(0, 1),
+					options: { textAlign: "left", fontSize: this.fontSize }
+				});
+			}
+
+			// Add the guard bars
+			result.push({
+				data: "101" + (0, _encoder2.default)(this.data[0], "L"),
+				options: { height: this.guardHeight }
+			});
+
+			// Add the left side
+			result.push({
+				data: (0, _encoder2.default)(this.data.substr(1, 5), "LLLLL"),
+				text: this.text.substr(1, 5),
+				options: { fontSize: this.fontSize }
+			});
+
+			// Add the middle bits
+			result.push({
+				data: "01010",
+				options: { height: this.guardHeight }
+			});
+
+			// Add the right side
+			result.push({
+				data: (0, _encoder2.default)(this.data.substr(6, 5), "RRRRR"),
+				text: this.text.substr(6, 5),
+				options: { fontSize: this.fontSize }
+			});
+
+			// Add the end bits
+			result.push({
+				data: (0, _encoder2.default)(this.data[11], "R") + "101",
+				options: { height: this.guardHeight }
+			});
+
+			// Add the last digit
+			if (this.displayValue) {
+				result.push({
+					data: "00000000",
+					text: this.text.substr(11, 1),
+					options: { textAlign: "right", fontSize: this.fontSize }
+				});
+			}
+
+			return result;
+		}
+	}]);
+
+	return UPC;
+}(_Barcode3.default);
+
+// Calulate the checksum digit
+// https://en.wikipedia.org/wiki/International_Article_Number_(EAN)#Calculation_of_checksum_digit
+
+
+function checksum(number) {
+	var result = 0;
+
+	var i;
+	for (i = 1; i < 11; i += 2) {
+		result += parseInt(number[i]);
+	}
+	for (i = 0; i < 11; i += 2) {
+		result += parseInt(number[i]) * 3;
+	}
+
+	return (10 - result % 10) % 10;
+}
+
+exports.default = UPC;

+ 185 - 0
components/tki-barcode/barcodes/EAN_UPC/UPCE.js

@@ -0,0 +1,185 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _encoder = require('./encoder');
+
+var _encoder2 = _interopRequireDefault(_encoder);
+
+var _Barcode2 = require('../Barcode.js');
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+var _UPC = require('./UPC.js');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation:
+// https://en.wikipedia.org/wiki/Universal_Product_Code#Encoding
+//
+// UPC-E documentation:
+// https://en.wikipedia.org/wiki/Universal_Product_Code#UPC-E
+
+var EXPANSIONS = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX00000X", "XXXXX00005", "XXXXX00006", "XXXXX00007", "XXXXX00008", "XXXXX00009"];
+
+var PARITIES = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]];
+
+var UPCE = function (_Barcode) {
+	_inherits(UPCE, _Barcode);
+
+	function UPCE(data, options) {
+		_classCallCheck(this, UPCE);
+
+		var _this = _possibleConstructorReturn(this, (UPCE.__proto__ || Object.getPrototypeOf(UPCE)).call(this, data, options));
+		// Code may be 6 or 8 digits;
+		// A 7 digit code is ambiguous as to whether the extra digit
+		// is a UPC-A check or number system digit.
+
+
+		_this.isValid = false;
+		if (data.search(/^[0-9]{6}$/) !== -1) {
+			_this.middleDigits = data;
+			_this.upcA = expandToUPCA(data, "0");
+			_this.text = options.text || '' + _this.upcA[0] + data + _this.upcA[_this.upcA.length - 1];
+			_this.isValid = true;
+		} else if (data.search(/^[01][0-9]{7}$/) !== -1) {
+			_this.middleDigits = data.substring(1, data.length - 1);
+			_this.upcA = expandToUPCA(_this.middleDigits, data[0]);
+
+			if (_this.upcA[_this.upcA.length - 1] === data[data.length - 1]) {
+				_this.isValid = true;
+			} else {
+				// checksum mismatch
+				return _possibleConstructorReturn(_this);
+			}
+		} else {
+			return _possibleConstructorReturn(_this);
+		}
+
+		_this.displayValue = options.displayValue;
+
+		// Make sure the font is not bigger than the space between the guard bars
+		if (options.fontSize > options.width * 10) {
+			_this.fontSize = options.width * 10;
+		} else {
+			_this.fontSize = options.fontSize;
+		}
+
+		// Make the guard bars go down half the way of the text
+		_this.guardHeight = options.height + _this.fontSize / 2 + options.textMargin;
+		return _this;
+	}
+
+	_createClass(UPCE, [{
+		key: 'valid',
+		value: function valid() {
+			return this.isValid;
+		}
+	}, {
+		key: 'encode',
+		value: function encode() {
+			if (this.options.flat) {
+				return this.flatEncoding();
+			} else {
+				return this.guardedEncoding();
+			}
+		}
+	}, {
+		key: 'flatEncoding',
+		value: function flatEncoding() {
+			var result = "";
+
+			result += "101";
+			result += this.encodeMiddleDigits();
+			result += "010101";
+
+			return {
+				data: result,
+				text: this.text
+			};
+		}
+	}, {
+		key: 'guardedEncoding',
+		value: function guardedEncoding() {
+			var result = [];
+
+			// Add the UPC-A number system digit beneath the quiet zone
+			if (this.displayValue) {
+				result.push({
+					data: "00000000",
+					text: this.text[0],
+					options: { textAlign: "left", fontSize: this.fontSize }
+				});
+			}
+
+			// Add the guard bars
+			result.push({
+				data: "101",
+				options: { height: this.guardHeight }
+			});
+
+			// Add the 6 UPC-E digits
+			result.push({
+				data: this.encodeMiddleDigits(),
+				text: this.text.substring(1, 7),
+				options: { fontSize: this.fontSize }
+			});
+
+			// Add the end bits
+			result.push({
+				data: "010101",
+				options: { height: this.guardHeight }
+			});
+
+			// Add the UPC-A check digit beneath the quiet zone
+			if (this.displayValue) {
+				result.push({
+					data: "00000000",
+					text: this.text[7],
+					options: { textAlign: "right", fontSize: this.fontSize }
+				});
+			}
+
+			return result;
+		}
+	}, {
+		key: 'encodeMiddleDigits',
+		value: function encodeMiddleDigits() {
+			var numberSystem = this.upcA[0];
+			var checkDigit = this.upcA[this.upcA.length - 1];
+			var parity = PARITIES[parseInt(checkDigit)][parseInt(numberSystem)];
+			return (0, _encoder2.default)(this.middleDigits, parity);
+		}
+	}]);
+
+	return UPCE;
+}(_Barcode3.default);
+
+function expandToUPCA(middleDigits, numberSystem) {
+	var lastUpcE = parseInt(middleDigits[middleDigits.length - 1]);
+	var expansion = EXPANSIONS[lastUpcE];
+
+	var result = "";
+	var digitIndex = 0;
+	for (var i = 0; i < expansion.length; i++) {
+		var c = expansion[i];
+		if (c === 'X') {
+			result += middleDigits[digitIndex++];
+		} else {
+			result += c;
+		}
+	}
+
+	result = '' + numberSystem + result;
+	return '' + result + (0, _UPC.checksum)(result);
+}
+
+exports.default = UPCE;

+ 30 - 0
components/tki-barcode/barcodes/EAN_UPC/constants.js

@@ -0,0 +1,30 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+// Standard start end and middle bits
+var SIDE_BIN = exports.SIDE_BIN = '101';
+var MIDDLE_BIN = exports.MIDDLE_BIN = '01010';
+
+var BINARIES = exports.BINARIES = {
+	'L': [// The L (left) type of encoding
+	'0001101', '0011001', '0010011', '0111101', '0100011', '0110001', '0101111', '0111011', '0110111', '0001011'],
+	'G': [// The G type of encoding
+	'0100111', '0110011', '0011011', '0100001', '0011101', '0111001', '0000101', '0010001', '0001001', '0010111'],
+	'R': [// The R (right) type of encoding
+	'1110010', '1100110', '1101100', '1000010', '1011100', '1001110', '1010000', '1000100', '1001000', '1110100'],
+	'O': [// The O (odd) encoding for UPC-E
+	'0001101', '0011001', '0010011', '0111101', '0100011', '0110001', '0101111', '0111011', '0110111', '0001011'],
+	'E': [// The E (even) encoding for UPC-E
+	'0100111', '0110011', '0011011', '0100001', '0011101', '0111001', '0000101', '0010001', '0001001', '0010111']
+};
+
+// Define the EAN-2 structure
+var EAN2_STRUCTURE = exports.EAN2_STRUCTURE = ['LL', 'LG', 'GL', 'GG'];
+
+// Define the EAN-5 structure
+var EAN5_STRUCTURE = exports.EAN5_STRUCTURE = ['GGLLL', 'GLGLL', 'GLLGL', 'GLLLG', 'LGGLL', 'LLGGL', 'LLLGG', 'LGLGL', 'LGLLG', 'LLGLG'];
+
+// Define the EAN-13 structure
+var EAN13_STRUCTURE = exports.EAN13_STRUCTURE = ['LLLLLL', 'LLGLGG', 'LLGGLG', 'LLGGGL', 'LGLLGG', 'LGGLLG', 'LGGGLL', 'LGLGLG', 'LGLGGL', 'LGGLGL'];

+ 27 - 0
components/tki-barcode/barcodes/EAN_UPC/encoder.js

@@ -0,0 +1,27 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _constants = require('./constants');
+
+// Encode data string
+var encode = function encode(data, structure, separator) {
+	var encoded = data.split('').map(function (val, idx) {
+		return _constants.BINARIES[structure[idx]];
+	}).map(function (val, idx) {
+		return val ? val[data[idx]] : '';
+	});
+
+	if (separator) {
+		var last = data.length - 1;
+		encoded = encoded.map(function (val, idx) {
+			return idx < last ? val + separator : val;
+		});
+	}
+
+	return encoded.join('');
+};
+
+exports.default = encode;

+ 39 - 0
components/tki-barcode/barcodes/EAN_UPC/index.js

@@ -0,0 +1,39 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.UPCE = exports.UPC = exports.EAN2 = exports.EAN5 = exports.EAN8 = exports.EAN13 = undefined;
+
+var _EAN = require('./EAN13.js');
+
+var _EAN2 = _interopRequireDefault(_EAN);
+
+var _EAN3 = require('./EAN8.js');
+
+var _EAN4 = _interopRequireDefault(_EAN3);
+
+var _EAN5 = require('./EAN5.js');
+
+var _EAN6 = _interopRequireDefault(_EAN5);
+
+var _EAN7 = require('./EAN2.js');
+
+var _EAN8 = _interopRequireDefault(_EAN7);
+
+var _UPC = require('./UPC.js');
+
+var _UPC2 = _interopRequireDefault(_UPC);
+
+var _UPCE = require('./UPCE.js');
+
+var _UPCE2 = _interopRequireDefault(_UPCE);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.EAN13 = _EAN2.default;
+exports.EAN8 = _EAN4.default;
+exports.EAN5 = _EAN6.default;
+exports.EAN2 = _EAN8.default;
+exports.UPC = _UPC2.default;
+exports.UPCE = _UPCE2.default;

+ 55 - 0
components/tki-barcode/barcodes/GenericBarcode/index.js

@@ -0,0 +1,55 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+exports.GenericBarcode = undefined;
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _Barcode2 = require("../Barcode.js");
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var GenericBarcode = function (_Barcode) {
+	_inherits(GenericBarcode, _Barcode);
+
+	function GenericBarcode(data, options) {
+		_classCallCheck(this, GenericBarcode);
+
+		return _possibleConstructorReturn(this, (GenericBarcode.__proto__ || Object.getPrototypeOf(GenericBarcode)).call(this, data, options)); // Sets this.data and this.text
+	}
+
+	// Return the corresponding binary numbers for the data provided
+
+
+	_createClass(GenericBarcode, [{
+		key: "encode",
+		value: function encode() {
+			return {
+				data: "10101010101010101010101010101010101010101",
+				text: this.text
+			};
+		}
+
+		// Resturn true/false if the string provided is valid for this encoder
+
+	}, {
+		key: "valid",
+		value: function valid() {
+			return true;
+		}
+	}]);
+
+	return GenericBarcode;
+}(_Barcode3.default);
+
+exports.GenericBarcode = GenericBarcode;

+ 69 - 0
components/tki-barcode/barcodes/ITF/ITF.js

@@ -0,0 +1,69 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _constants = require('./constants');
+
+var _Barcode2 = require('../Barcode');
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var ITF = function (_Barcode) {
+	_inherits(ITF, _Barcode);
+
+	function ITF() {
+		_classCallCheck(this, ITF);
+
+		return _possibleConstructorReturn(this, (ITF.__proto__ || Object.getPrototypeOf(ITF)).apply(this, arguments));
+	}
+
+	_createClass(ITF, [{
+		key: 'valid',
+		value: function valid() {
+			return this.data.search(/^([0-9]{2})+$/) !== -1;
+		}
+	}, {
+		key: 'encode',
+		value: function encode() {
+			var _this2 = this;
+
+			// Calculate all the digit pairs
+			var encoded = this.data.match(/.{2}/g).map(function (pair) {
+				return _this2.encodePair(pair);
+			}).join('');
+
+			return {
+				data: _constants.START_BIN + encoded + _constants.END_BIN,
+				text: this.text
+			};
+		}
+
+		// Calculate the data of a number pair
+
+	}, {
+		key: 'encodePair',
+		value: function encodePair(pair) {
+			var second = _constants.BINARIES[pair[1]];
+
+			return _constants.BINARIES[pair[0]].split('').map(function (first, idx) {
+				return (first === '1' ? '111' : '1') + (second[idx] === '1' ? '000' : '0');
+			}).join('');
+		}
+	}]);
+
+	return ITF;
+}(_Barcode3.default);
+
+exports.default = ITF;

+ 55 - 0
components/tki-barcode/barcodes/ITF/ITF14.js

@@ -0,0 +1,55 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _ITF2 = require('./ITF');
+
+var _ITF3 = _interopRequireDefault(_ITF2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+// Calculate the checksum digit
+var checksum = function checksum(data) {
+	var res = data.substr(0, 13).split('').map(function (num) {
+		return parseInt(num, 10);
+	}).reduce(function (sum, n, idx) {
+		return sum + n * (3 - idx % 2 * 2);
+	}, 0);
+
+	return Math.ceil(res / 10) * 10 - res;
+};
+
+var ITF14 = function (_ITF) {
+	_inherits(ITF14, _ITF);
+
+	function ITF14(data, options) {
+		_classCallCheck(this, ITF14);
+
+		// Add checksum if it does not exist
+		if (data.search(/^[0-9]{13}$/) !== -1) {
+			data += checksum(data);
+		}
+		return _possibleConstructorReturn(this, (ITF14.__proto__ || Object.getPrototypeOf(ITF14)).call(this, data, options));
+	}
+
+	_createClass(ITF14, [{
+		key: 'valid',
+		value: function valid() {
+			return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === checksum(this.data);
+		}
+	}]);
+
+	return ITF14;
+}(_ITF3.default);
+
+exports.default = ITF14;

+ 9 - 0
components/tki-barcode/barcodes/ITF/constants.js

@@ -0,0 +1,9 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+var START_BIN = exports.START_BIN = '1010';
+var END_BIN = exports.END_BIN = '11101';
+
+var BINARIES = exports.BINARIES = ['00110', '10001', '01001', '11000', '00101', '10100', '01100', '00011', '10010', '01010'];

+ 19 - 0
components/tki-barcode/barcodes/ITF/index.js

@@ -0,0 +1,19 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.ITF14 = exports.ITF = undefined;
+
+var _ITF = require('./ITF');
+
+var _ITF2 = _interopRequireDefault(_ITF);
+
+var _ITF3 = require('./ITF14');
+
+var _ITF4 = _interopRequireDefault(_ITF3);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.ITF = _ITF2.default;
+exports.ITF14 = _ITF4.default;

+ 74 - 0
components/tki-barcode/barcodes/MSI/MSI.js

@@ -0,0 +1,74 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _Barcode2 = require("../Barcode.js");
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
+// https://en.wikipedia.org/wiki/MSI_Barcode#Character_set_and_binary_lookup
+
+var MSI = function (_Barcode) {
+	_inherits(MSI, _Barcode);
+
+	function MSI(data, options) {
+		_classCallCheck(this, MSI);
+
+		return _possibleConstructorReturn(this, (MSI.__proto__ || Object.getPrototypeOf(MSI)).call(this, data, options));
+	}
+
+	_createClass(MSI, [{
+		key: "encode",
+		value: function encode() {
+			// Start bits
+			var ret = "110";
+
+			for (var i = 0; i < this.data.length; i++) {
+				// Convert the character to binary (always 4 binary digits)
+				var digit = parseInt(this.data[i]);
+				var bin = digit.toString(2);
+				bin = addZeroes(bin, 4 - bin.length);
+
+				// Add 100 for every zero and 110 for every 1
+				for (var b = 0; b < bin.length; b++) {
+					ret += bin[b] == "0" ? "100" : "110";
+				}
+			}
+
+			// End bits
+			ret += "1001";
+
+			return {
+				data: ret,
+				text: this.text
+			};
+		}
+	}, {
+		key: "valid",
+		value: function valid() {
+			return this.data.search(/^[0-9]+$/) !== -1;
+		}
+	}]);
+
+	return MSI;
+}(_Barcode3.default);
+
+function addZeroes(number, n) {
+	for (var i = 0; i < n; i++) {
+		number = "0" + number;
+	}
+	return number;
+}
+
+exports.default = MSI;

+ 33 - 0
components/tki-barcode/barcodes/MSI/MSI10.js

@@ -0,0 +1,33 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _MSI2 = require('./MSI.js');
+
+var _MSI3 = _interopRequireDefault(_MSI2);
+
+var _checksums = require('./checksums.js');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var MSI10 = function (_MSI) {
+	_inherits(MSI10, _MSI);
+
+	function MSI10(data, options) {
+		_classCallCheck(this, MSI10);
+
+		return _possibleConstructorReturn(this, (MSI10.__proto__ || Object.getPrototypeOf(MSI10)).call(this, data + (0, _checksums.mod10)(data), options));
+	}
+
+	return MSI10;
+}(_MSI3.default);
+
+exports.default = MSI10;

+ 35 - 0
components/tki-barcode/barcodes/MSI/MSI1010.js

@@ -0,0 +1,35 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _MSI2 = require('./MSI.js');
+
+var _MSI3 = _interopRequireDefault(_MSI2);
+
+var _checksums = require('./checksums.js');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var MSI1010 = function (_MSI) {
+	_inherits(MSI1010, _MSI);
+
+	function MSI1010(data, options) {
+		_classCallCheck(this, MSI1010);
+
+		data += (0, _checksums.mod10)(data);
+		data += (0, _checksums.mod10)(data);
+		return _possibleConstructorReturn(this, (MSI1010.__proto__ || Object.getPrototypeOf(MSI1010)).call(this, data, options));
+	}
+
+	return MSI1010;
+}(_MSI3.default);
+
+exports.default = MSI1010;

+ 33 - 0
components/tki-barcode/barcodes/MSI/MSI11.js

@@ -0,0 +1,33 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _MSI2 = require('./MSI.js');
+
+var _MSI3 = _interopRequireDefault(_MSI2);
+
+var _checksums = require('./checksums.js');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var MSI11 = function (_MSI) {
+	_inherits(MSI11, _MSI);
+
+	function MSI11(data, options) {
+		_classCallCheck(this, MSI11);
+
+		return _possibleConstructorReturn(this, (MSI11.__proto__ || Object.getPrototypeOf(MSI11)).call(this, data + (0, _checksums.mod11)(data), options));
+	}
+
+	return MSI11;
+}(_MSI3.default);
+
+exports.default = MSI11;

+ 35 - 0
components/tki-barcode/barcodes/MSI/MSI1110.js

@@ -0,0 +1,35 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _MSI2 = require('./MSI.js');
+
+var _MSI3 = _interopRequireDefault(_MSI2);
+
+var _checksums = require('./checksums.js');
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var MSI1110 = function (_MSI) {
+	_inherits(MSI1110, _MSI);
+
+	function MSI1110(data, options) {
+		_classCallCheck(this, MSI1110);
+
+		data += (0, _checksums.mod11)(data);
+		data += (0, _checksums.mod10)(data);
+		return _possibleConstructorReturn(this, (MSI1110.__proto__ || Object.getPrototypeOf(MSI1110)).call(this, data, options));
+	}
+
+	return MSI1110;
+}(_MSI3.default);
+
+exports.default = MSI1110;

+ 29 - 0
components/tki-barcode/barcodes/MSI/checksums.js

@@ -0,0 +1,29 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+exports.mod10 = mod10;
+exports.mod11 = mod11;
+function mod10(number) {
+	var sum = 0;
+	for (var i = 0; i < number.length; i++) {
+		var n = parseInt(number[i]);
+		if ((i + number.length) % 2 === 0) {
+			sum += n;
+		} else {
+			sum += n * 2 % 10 + Math.floor(n * 2 / 10);
+		}
+	}
+	return (10 - sum % 10) % 10;
+}
+
+function mod11(number) {
+	var sum = 0;
+	var weights = [2, 3, 4, 5, 6, 7];
+	for (var i = 0; i < number.length; i++) {
+		var n = parseInt(number[number.length - 1 - i]);
+		sum += weights[i % weights.length] * n;
+	}
+	return (11 - sum % 11) % 11;
+}

+ 34 - 0
components/tki-barcode/barcodes/MSI/index.js

@@ -0,0 +1,34 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.MSI1110 = exports.MSI1010 = exports.MSI11 = exports.MSI10 = exports.MSI = undefined;
+
+var _MSI = require('./MSI.js');
+
+var _MSI2 = _interopRequireDefault(_MSI);
+
+var _MSI3 = require('./MSI10.js');
+
+var _MSI4 = _interopRequireDefault(_MSI3);
+
+var _MSI5 = require('./MSI11.js');
+
+var _MSI6 = _interopRequireDefault(_MSI5);
+
+var _MSI7 = require('./MSI1010.js');
+
+var _MSI8 = _interopRequireDefault(_MSI7);
+
+var _MSI9 = require('./MSI1110.js');
+
+var _MSI10 = _interopRequireDefault(_MSI9);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.MSI = _MSI2.default;
+exports.MSI10 = _MSI4.default;
+exports.MSI11 = _MSI6.default;
+exports.MSI1010 = _MSI8.default;
+exports.MSI1110 = _MSI10.default;

+ 92 - 0
components/tki-barcode/barcodes/codabar/index.js

@@ -0,0 +1,92 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+exports.codabar = undefined;
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _Barcode2 = require("../Barcode.js");
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding specification:
+// http://www.barcodeisland.com/codabar.phtml
+
+var codabar = function (_Barcode) {
+	_inherits(codabar, _Barcode);
+
+	function codabar(data, options) {
+		_classCallCheck(this, codabar);
+
+		if (data.search(/^[0-9\-\$\:\.\+\/]+$/) === 0) {
+			data = "A" + data + "A";
+		}
+
+		var _this = _possibleConstructorReturn(this, (codabar.__proto__ || Object.getPrototypeOf(codabar)).call(this, data.toUpperCase(), options));
+
+		_this.text = _this.options.text || _this.text.replace(/[A-D]/g, '');
+		return _this;
+	}
+
+	_createClass(codabar, [{
+		key: "valid",
+		value: function valid() {
+			return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1;
+		}
+	}, {
+		key: "encode",
+		value: function encode() {
+			var result = [];
+			var encodings = this.getEncodings();
+			for (var i = 0; i < this.data.length; i++) {
+				result.push(encodings[this.data.charAt(i)]);
+				// for all characters except the last, append a narrow-space ("0")
+				if (i !== this.data.length - 1) {
+					result.push("0");
+				}
+			}
+			return {
+				text: this.text,
+				data: result.join('')
+			};
+		}
+	}, {
+		key: "getEncodings",
+		value: function getEncodings() {
+			return {
+				"0": "101010011",
+				"1": "101011001",
+				"2": "101001011",
+				"3": "110010101",
+				"4": "101101001",
+				"5": "110101001",
+				"6": "100101011",
+				"7": "100101101",
+				"8": "100110101",
+				"9": "110100101",
+				"-": "101001101",
+				"$": "101100101",
+				":": "1101011011",
+				"/": "1101101011",
+				".": "1101101101",
+				"+": "101100110011",
+				"A": "1011001001",
+				"B": "1001001011",
+				"C": "1010010011",
+				"D": "1010011001"
+			};
+		}
+	}]);
+
+	return codabar;
+}(_Barcode3.default);
+
+exports.codabar = codabar;

+ 34 - 0
components/tki-barcode/barcodes/index.js

@@ -0,0 +1,34 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+
+var _CODE = require('./CODE39/');
+
+var _CODE2 = require('./CODE128/');
+
+var _EAN_UPC = require('./EAN_UPC/');
+
+var _ITF = require('./ITF/');
+
+var _MSI = require('./MSI/');
+
+var _pharmacode = require('./pharmacode/');
+
+var _codabar = require('./codabar');
+
+var _GenericBarcode = require('./GenericBarcode/');
+
+exports.default = {
+	CODE39: _CODE.CODE39,
+	CODE128: _CODE2.CODE128, CODE128A: _CODE2.CODE128A, CODE128B: _CODE2.CODE128B, CODE128C: _CODE2.CODE128C,
+	EAN13: _EAN_UPC.EAN13, EAN8: _EAN_UPC.EAN8, EAN5: _EAN_UPC.EAN5, EAN2: _EAN_UPC.EAN2, 
+	UPC: _EAN_UPC.UPC, UPCE: _EAN_UPC.UPCE,
+	ITF14: _ITF.ITF14,
+	ITF: _ITF.ITF,
+	MSI: _MSI.MSI, MSI10: _MSI.MSI10, MSI11: _MSI.MSI11, MSI1010: _MSI.MSI1010, MSI1110: _MSI.MSI1110,
+	PHARMACODE: _pharmacode.pharmacode,
+	CODABAR: _codabar.codabar,
+	GENERICBARCODE: _GenericBarcode.GenericBarcode
+};

+ 73 - 0
components/tki-barcode/barcodes/pharmacode/index.js

@@ -0,0 +1,73 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+	value: true
+});
+exports.pharmacode = undefined;
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _Barcode2 = require("../Barcode.js");
+
+var _Barcode3 = _interopRequireDefault(_Barcode2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Encoding documentation
+// http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdf
+
+var pharmacode = function (_Barcode) {
+	_inherits(pharmacode, _Barcode);
+
+	function pharmacode(data, options) {
+		_classCallCheck(this, pharmacode);
+
+		var _this = _possibleConstructorReturn(this, (pharmacode.__proto__ || Object.getPrototypeOf(pharmacode)).call(this, data, options));
+
+		_this.number = parseInt(data, 10);
+		return _this;
+	}
+
+	_createClass(pharmacode, [{
+		key: "encode",
+		value: function encode() {
+			var z = this.number;
+			var result = "";
+
+			// http://i.imgur.com/RMm4UDJ.png
+			// (source: http://www.gomaro.ch/ftproot/Laetus_PHARMA-CODE.pdf, page: 34)
+			while (!isNaN(z) && z != 0) {
+				if (z % 2 === 0) {
+					// Even
+					result = "11100" + result;
+					z = (z - 2) / 2;
+				} else {
+					// Odd
+					result = "100" + result;
+					z = (z - 1) / 2;
+				}
+			}
+
+			// Remove the two last zeroes
+			result = result.slice(0, -2);
+
+			return {
+				data: result,
+				text: this.text
+			};
+		}
+	}, {
+		key: "valid",
+		value: function valid() {
+			return this.number >= 3 && this.number <= 131070;
+		}
+	}]);
+
+	return pharmacode;
+}(_Barcode3.default);
+
+exports.pharmacode = pharmacode;

+ 206 - 0
components/tki-barcode/tki-barcode.vue

@@ -0,0 +1,206 @@
+<template xlang="wxml" minapp="mpvue">
+	<view class="tki-barcode">
+		<!-- #ifndef MP-ALIPAY -->
+		<canvas class="tki-barcode-canvas" :canvas-id="cid" :style="{width:canvasWidth+'px',height:canvasHeight+'px'}" />
+		<!-- #endif -->
+		<!-- #ifdef MP-ALIPAY -->
+		<canvas :id="cid" :width="canvasWidth" :height="canvasHeight" class="tki-barcode-canvas" />
+		<!-- #endif -->
+		<image v-show="show" :src="result" :style="{width:canvasWidth+'px',height:canvasHeight+'px'}" />
+	</view>
+</template>
+
+<script>
+// const barcode = require('./barcode.js');
+import barCode from "./barcode.js"
+const opations = {
+	// format: "CODE128",//选择要使用的条形码类型 微信支持的条码类型有 code128\code39\ena13\ean8\upc\itf14\
+	width: 12,//设置条之间的宽度
+	height: 180,//高度
+	displayValue: true,//是否在条形码下方显示文字
+	// text: "1234567890",//覆盖显示的文本
+	textAlign: "center",//设置文本的水平对齐方式
+	textPosition: "bottom",//设置文本的垂直位置
+	textMargin: 8,//设置条形码和文本之间的间距
+	fontSize: 32,//设置文本的大小
+	fontColor: "#000000",//设置文本的颜色
+	lineColor: "#000000",//设置条形码的颜色
+	background: "#FFFFFF",//设置条形码的背景色
+	margin: 0,//设置条形码周围的空白边距
+	marginTop: 40,//设置条形码周围的上边距
+	marginBottom: 60,//设置条形码周围的下边距
+	marginLeft: undefined,//设置条形码周围的左边距
+	marginRight: undefined,//设置条形码周围的右边距
+}
+export default {
+	name: "tkiBarcode",
+	props: {
+		show: {
+			type: Boolean,
+			default: true
+		},
+		cid: {
+			type: String,
+			default: 'tki-barcode-canvas'
+		},
+		unit: {
+			type: String,
+			default: 'upx'
+		},
+		val: {
+			type: String,
+			default: '1234567890128'
+		},
+		format: {
+			type: String,
+			default: 'CODE128'
+		},
+		opations: {
+			type: Object,
+			default: function () {
+				return {}
+			}
+		},
+		onval: {
+			type: Boolean,
+			default: false
+		},
+		loadMake: {
+			type: Boolean,
+			default: true
+		},
+	},
+	data() {
+		return {
+			result: '',
+			canvasWidth: 0,
+			canvasHeight: 0,
+			defaultOpations: Object.assign({}, opations)
+		}
+	},
+	onUnload: function () {
+	},
+	methods: {
+		_makeCode() {
+			let that = this
+			// 合并参数
+			Object.assign(this.defaultOpations, this.opations)
+			if (that.unit == "upx") {
+				if (that.defaultOpations.width) {
+					that.defaultOpations.width = uni.upx2px(that.defaultOpations.width)
+				}
+				if (that.defaultOpations.height) {
+					that.defaultOpations.height = uni.upx2px(that.defaultOpations.height)
+				}
+				if (that.defaultOpations.fontSize) {
+					that.defaultOpations.fontSize = uni.upx2px(that.defaultOpations.fontSize)
+				}
+			}
+			if (that._empty(that.defaultOpations.text)) {
+				that.defaultOpations.text = that.val
+			}
+			if (that._empty(that.defaultOpations.format)) {
+				that.defaultOpations.format = that.format
+			}
+			// console.log(JSON.stringify(that.defaultOpations))
+			new barCode(that, that.cid, that.defaultOpations,
+				function (res) { // 生成条形码款高回调
+					that.canvasWidth = res.width
+					that.canvasHeight = res.height
+				},
+				function (res) { // 生成条形码的回调
+					// 返回值
+					that._result(res)
+					// 重置默认参数
+					that.defaultOpations = opations
+				},
+			);
+		},
+		_clearCode() {
+			this._result('')
+		},
+		_saveCode() {
+			let that = this;
+			if (this.result != "") {
+				uni.saveImageToPhotosAlbum({
+					filePath: that.result,
+					success: function () {
+						uni.showToast({
+							title: '条形码保存成功',
+							icon: 'success',
+							duration: 2000
+						});
+					}
+				});
+			}
+		},
+		_result(res) {
+			this.result = res;
+			this.$emit('result', res)
+		},
+		_result(res) {
+			this.result = res;
+			this.$emit('result', res)
+		},
+		_empty(v) {
+			let tp = typeof v,
+				rt = false;
+			if (tp == "number" && String(v) == "") {
+				rt = true
+			} else if (tp == "undefined") {
+				rt = true
+			} else if (tp == "object") {
+				if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+			} else if (tp == "string") {
+				if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+			} else if (tp == "function") {
+				rt = false
+			}
+			return rt
+		}
+	},
+	watch: {
+		val(n, o) {
+			if (this.onval) {
+				if (n != o && !this._empty(n)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 0);
+				}
+			}
+		},
+		opations: {
+			handler(n,o){
+				if (this.onval) {
+					if (!this._empty(n)) {
+						setTimeout(() => {
+							this._makeCode()
+						}, 0);
+					}
+				}
+			},
+			deep: true
+		}
+	},
+	mounted: function () {
+		if (this.loadMake) {
+			if (!this._empty(this.val)) {
+				setTimeout(() => {
+					this._makeCode()
+				}, 0);
+			}
+		}
+	},
+}
+</script>
+<style>
+.tki-barcode {
+	position: relative;
+}
+.tki-barcode-canvas {
+	position: fixed;
+	top: -99999upx;
+	left: -99999upx;
+	z-index: -99999;
+}
+</style>

+ 1201 - 0
components/tki-qrcode/qrcode.js

@@ -0,0 +1,1201 @@
+let QRCode = {};
+(function () {
+    /**
+     * 获取单个字符的utf8编码
+     * unicode BMP平面约65535个字符
+     * @param {num} code
+     * return {array}
+     */
+    function unicodeFormat8(code) {
+        // 1 byte
+        var c0, c1, c2;
+        if (code < 128) {
+            return [code];
+            // 2 bytes
+        } else if (code < 2048) {
+            c0 = 192 + (code >> 6);
+            c1 = 128 + (code & 63);
+            return [c0, c1];
+            // 3 bytes
+        } else {
+            c0 = 224 + (code >> 12);
+            c1 = 128 + (code >> 6 & 63);
+            c2 = 128 + (code & 63);
+            return [c0, c1, c2];
+        }
+    }
+    /**
+     * 获取字符串的utf8编码字节串
+     * @param {string} string
+     * @return {array}
+     */
+    function getUTF8Bytes(string) {
+        var utf8codes = [];
+        for (var i = 0; i < string.length; i++) {
+            var code = string.charCodeAt(i);
+            var utf8 = unicodeFormat8(code);
+            for (var j = 0; j < utf8.length; j++) {
+                utf8codes.push(utf8[j]);
+            }
+        }
+        return utf8codes;
+    }
+    /**
+     * 二维码算法实现
+     * @param {string} data              要编码的信息字符串
+     * @param {num} errorCorrectLevel 纠错等级
+     */
+    function QRCodeAlg(data, errorCorrectLevel) {
+        this.typeNumber = -1; //版本
+        this.errorCorrectLevel = errorCorrectLevel;
+        this.modules = null; //二维矩阵,存放最终结果
+        this.moduleCount = 0; //矩阵大小
+        this.dataCache = null; //数据缓存
+        this.rsBlocks = null; //版本数据信息
+        this.totalDataCount = -1; //可使用的数据量
+        this.data = data;
+        this.utf8bytes = getUTF8Bytes(data);
+        this.make();
+    }
+    QRCodeAlg.prototype = {
+        constructor: QRCodeAlg,
+        /**
+         * 获取二维码矩阵大小
+         * @return {num} 矩阵大小
+         */
+        getModuleCount: function () {
+            return this.moduleCount;
+        },
+        /**
+         * 编码
+         */
+        make: function () {
+            this.getRightType();
+            this.dataCache = this.createData();
+            this.createQrcode();
+        },
+        /**
+         * 设置二位矩阵功能图形
+         * @param  {bool} test 表示是否在寻找最好掩膜阶段
+         * @param  {num} maskPattern 掩膜的版本
+         */
+        makeImpl: function (maskPattern) {
+            this.moduleCount = this.typeNumber * 4 + 17;
+            this.modules = new Array(this.moduleCount);
+            for (var row = 0; row < this.moduleCount; row++) {
+                this.modules[row] = new Array(this.moduleCount);
+            }
+            this.setupPositionProbePattern(0, 0);
+            this.setupPositionProbePattern(this.moduleCount - 7, 0);
+            this.setupPositionProbePattern(0, this.moduleCount - 7);
+            this.setupPositionAdjustPattern();
+            this.setupTimingPattern();
+            this.setupTypeInfo(true, maskPattern);
+            if (this.typeNumber >= 7) {
+                this.setupTypeNumber(true);
+            }
+            this.mapData(this.dataCache, maskPattern);
+        },
+        /**
+         * 设置二维码的位置探测图形
+         * @param  {num} row 探测图形的中心横坐标
+         * @param  {num} col 探测图形的中心纵坐标
+         */
+        setupPositionProbePattern: function (row, col) {
+            for (var r = -1; r <= 7; r++) {
+                if (row + r <= -1 || this.moduleCount <= row + r) continue;
+                for (var c = -1; c <= 7; c++) {
+                    if (col + c <= -1 || this.moduleCount <= col + c) continue;
+                    if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || (0 <= c && c <= 6 && (r == 0 || r == 6)) || (2 <= r && r <= 4 && 2 <= c && c <= 4)) {
+                        this.modules[row + r][col + c] = true;
+                    } else {
+                        this.modules[row + r][col + c] = false;
+                    }
+                }
+            }
+        },
+        /**
+         * 创建二维码
+         * @return {[type]} [description]
+         */
+        createQrcode: function () {
+            var minLostPoint = 0;
+            var pattern = 0;
+            var bestModules = null;
+            for (var i = 0; i < 8; i++) {
+                this.makeImpl(i);
+                var lostPoint = QRUtil.getLostPoint(this);
+                if (i == 0 || minLostPoint > lostPoint) {
+                    minLostPoint = lostPoint;
+                    pattern = i;
+                    bestModules = this.modules;
+                }
+            }
+            this.modules = bestModules;
+            this.setupTypeInfo(false, pattern);
+            if (this.typeNumber >= 7) {
+                this.setupTypeNumber(false);
+            }
+        },
+        /**
+         * 设置定位图形
+         * @return {[type]} [description]
+         */
+        setupTimingPattern: function () {
+            for (var r = 8; r < this.moduleCount - 8; r++) {
+                if (this.modules[r][6] != null) {
+                    continue;
+                }
+                this.modules[r][6] = (r % 2 == 0);
+                if (this.modules[6][r] != null) {
+                    continue;
+                }
+                this.modules[6][r] = (r % 2 == 0);
+            }
+        },
+        /**
+         * 设置矫正图形
+         * @return {[type]} [description]
+         */
+        setupPositionAdjustPattern: function () {
+            var pos = QRUtil.getPatternPosition(this.typeNumber);
+            for (var i = 0; i < pos.length; i++) {
+                for (var j = 0; j < pos.length; j++) {
+                    var row = pos[i];
+                    var col = pos[j];
+                    if (this.modules[row][col] != null) {
+                        continue;
+                    }
+                    for (var r = -2; r <= 2; r++) {
+                        for (var c = -2; c <= 2; c++) {
+                            if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) {
+                                this.modules[row + r][col + c] = true;
+                            } else {
+                                this.modules[row + r][col + c] = false;
+                            }
+                        }
+                    }
+                }
+            }
+        },
+        /**
+         * 设置版本信息(7以上版本才有)
+         * @param  {bool} test 是否处于判断最佳掩膜阶段
+         * @return {[type]}      [description]
+         */
+        setupTypeNumber: function (test) {
+            var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
+            for (var i = 0; i < 18; i++) {
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
+                this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
+            }
+        },
+        /**
+         * 设置格式信息(纠错等级和掩膜版本)
+         * @param  {bool} test
+         * @param  {num} maskPattern 掩膜版本
+         * @return {}
+         */
+        setupTypeInfo: function (test, maskPattern) {
+            var data = (QRErrorCorrectLevel[this.errorCorrectLevel] << 3) | maskPattern;
+            var bits = QRUtil.getBCHTypeInfo(data);
+            // vertical
+            for (var i = 0; i < 15; i++) {
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                if (i < 6) {
+                    this.modules[i][8] = mod;
+                } else if (i < 8) {
+                    this.modules[i + 1][8] = mod;
+                } else {
+                    this.modules[this.moduleCount - 15 + i][8] = mod;
+                }
+                // horizontal
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                if (i < 8) {
+                    this.modules[8][this.moduleCount - i - 1] = mod;
+                } else if (i < 9) {
+                    this.modules[8][15 - i - 1 + 1] = mod;
+                } else {
+                    this.modules[8][15 - i - 1] = mod;
+                }
+            }
+            // fixed module
+            this.modules[this.moduleCount - 8][8] = (!test);
+        },
+        /**
+         * 数据编码
+         * @return {[type]} [description]
+         */
+        createData: function () {
+            var buffer = new QRBitBuffer();
+            var lengthBits = this.typeNumber > 9 ? 16 : 8;
+            buffer.put(4, 4); //添加模式
+            buffer.put(this.utf8bytes.length, lengthBits);
+            for (var i = 0, l = this.utf8bytes.length; i < l; i++) {
+                buffer.put(this.utf8bytes[i], 8);
+            }
+            if (buffer.length + 4 <= this.totalDataCount * 8) {
+                buffer.put(0, 4);
+            }
+            // padding
+            while (buffer.length % 8 != 0) {
+                buffer.putBit(false);
+            }
+            // padding
+            while (true) {
+                if (buffer.length >= this.totalDataCount * 8) {
+                    break;
+                }
+                buffer.put(QRCodeAlg.PAD0, 8);
+                if (buffer.length >= this.totalDataCount * 8) {
+                    break;
+                }
+                buffer.put(QRCodeAlg.PAD1, 8);
+            }
+            return this.createBytes(buffer);
+        },
+        /**
+         * 纠错码编码
+         * @param  {buffer} buffer 数据编码
+         * @return {[type]}
+         */
+        createBytes: function (buffer) {
+            var offset = 0;
+            var maxDcCount = 0;
+            var maxEcCount = 0;
+            var length = this.rsBlock.length / 3;
+            var rsBlocks = new Array();
+            for (var i = 0; i < length; i++) {
+                var count = this.rsBlock[i * 3 + 0];
+                var totalCount = this.rsBlock[i * 3 + 1];
+                var dataCount = this.rsBlock[i * 3 + 2];
+                for (var j = 0; j < count; j++) {
+                    rsBlocks.push([dataCount, totalCount]);
+                }
+            }
+            var dcdata = new Array(rsBlocks.length);
+            var ecdata = new Array(rsBlocks.length);
+            for (var r = 0; r < rsBlocks.length; r++) {
+                var dcCount = rsBlocks[r][0];
+                var ecCount = rsBlocks[r][1] - dcCount;
+                maxDcCount = Math.max(maxDcCount, dcCount);
+                maxEcCount = Math.max(maxEcCount, ecCount);
+                dcdata[r] = new Array(dcCount);
+                for (var i = 0; i < dcdata[r].length; i++) {
+                    dcdata[r][i] = 0xff & buffer.buffer[i + offset];
+                }
+                offset += dcCount;
+                var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
+                var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
+                var modPoly = rawPoly.mod(rsPoly);
+                ecdata[r] = new Array(rsPoly.getLength() - 1);
+                for (var i = 0; i < ecdata[r].length; i++) {
+                    var modIndex = i + modPoly.getLength() - ecdata[r].length;
+                    ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0;
+                }
+            }
+            var data = new Array(this.totalDataCount);
+            var index = 0;
+            for (var i = 0; i < maxDcCount; i++) {
+                for (var r = 0; r < rsBlocks.length; r++) {
+                    if (i < dcdata[r].length) {
+                        data[index++] = dcdata[r][i];
+                    }
+                }
+            }
+            for (var i = 0; i < maxEcCount; i++) {
+                for (var r = 0; r < rsBlocks.length; r++) {
+                    if (i < ecdata[r].length) {
+                        data[index++] = ecdata[r][i];
+                    }
+                }
+            }
+            return data;
+
+        },
+        /**
+         * 布置模块,构建最终信息
+         * @param  {} data
+         * @param  {} maskPattern
+         * @return {}
+         */
+        mapData: function (data, maskPattern) {
+            var inc = -1;
+            var row = this.moduleCount - 1;
+            var bitIndex = 7;
+            var byteIndex = 0;
+            for (var col = this.moduleCount - 1; col > 0; col -= 2) {
+                if (col == 6) col--;
+                while (true) {
+                    for (var c = 0; c < 2; c++) {
+                        if (this.modules[row][col - c] == null) {
+                            var dark = false;
+                            if (byteIndex < data.length) {
+                                dark = (((data[byteIndex] >>> bitIndex) & 1) == 1);
+                            }
+                            var mask = QRUtil.getMask(maskPattern, row, col - c);
+                            if (mask) {
+                                dark = !dark;
+                            }
+                            this.modules[row][col - c] = dark;
+                            bitIndex--;
+                            if (bitIndex == -1) {
+                                byteIndex++;
+                                bitIndex = 7;
+                            }
+                        }
+                    }
+                    row += inc;
+                    if (row < 0 || this.moduleCount <= row) {
+                        row -= inc;
+                        inc = -inc;
+                        break;
+                    }
+                }
+            }
+        }
+    };
+    /**
+     * 填充字段
+     */
+    QRCodeAlg.PAD0 = 0xEC;
+    QRCodeAlg.PAD1 = 0x11;
+    //---------------------------------------------------------------------
+    // 纠错等级对应的编码
+    //---------------------------------------------------------------------
+    var QRErrorCorrectLevel = [1, 0, 3, 2];
+    //---------------------------------------------------------------------
+    // 掩膜版本
+    //---------------------------------------------------------------------
+    var QRMaskPattern = {
+        PATTERN000: 0,
+        PATTERN001: 1,
+        PATTERN010: 2,
+        PATTERN011: 3,
+        PATTERN100: 4,
+        PATTERN101: 5,
+        PATTERN110: 6,
+        PATTERN111: 7
+    };
+    //---------------------------------------------------------------------
+    // 工具类
+    //---------------------------------------------------------------------
+    var QRUtil = {
+        /*
+        每个版本矫正图形的位置
+         */
+        PATTERN_POSITION_TABLE: [
+            [],
+            [6, 18],
+            [6, 22],
+            [6, 26],
+            [6, 30],
+            [6, 34],
+            [6, 22, 38],
+            [6, 24, 42],
+            [6, 26, 46],
+            [6, 28, 50],
+            [6, 30, 54],
+            [6, 32, 58],
+            [6, 34, 62],
+            [6, 26, 46, 66],
+            [6, 26, 48, 70],
+            [6, 26, 50, 74],
+            [6, 30, 54, 78],
+            [6, 30, 56, 82],
+            [6, 30, 58, 86],
+            [6, 34, 62, 90],
+            [6, 28, 50, 72, 94],
+            [6, 26, 50, 74, 98],
+            [6, 30, 54, 78, 102],
+            [6, 28, 54, 80, 106],
+            [6, 32, 58, 84, 110],
+            [6, 30, 58, 86, 114],
+            [6, 34, 62, 90, 118],
+            [6, 26, 50, 74, 98, 122],
+            [6, 30, 54, 78, 102, 126],
+            [6, 26, 52, 78, 104, 130],
+            [6, 30, 56, 82, 108, 134],
+            [6, 34, 60, 86, 112, 138],
+            [6, 30, 58, 86, 114, 142],
+            [6, 34, 62, 90, 118, 146],
+            [6, 30, 54, 78, 102, 126, 150],
+            [6, 24, 50, 76, 102, 128, 154],
+            [6, 28, 54, 80, 106, 132, 158],
+            [6, 32, 58, 84, 110, 136, 162],
+            [6, 26, 54, 82, 110, 138, 166],
+            [6, 30, 58, 86, 114, 142, 170]
+        ],
+        G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
+        G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
+        G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),
+        /*
+        BCH编码格式信息
+         */
+        getBCHTypeInfo: function (data) {
+            var d = data << 10;
+            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
+                d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15)));
+            }
+            return ((data << 10) | d) ^ QRUtil.G15_MASK;
+        },
+        /*
+        BCH编码版本信息
+         */
+        getBCHTypeNumber: function (data) {
+            var d = data << 12;
+            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
+                d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18)));
+            }
+            return (data << 12) | d;
+        },
+        /*
+        获取BCH位信息
+         */
+        getBCHDigit: function (data) {
+            var digit = 0;
+            while (data != 0) {
+                digit++;
+                data >>>= 1;
+            }
+            return digit;
+        },
+        /*
+        获取版本对应的矫正图形位置
+         */
+        getPatternPosition: function (typeNumber) {
+            return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
+        },
+        /*
+        掩膜算法
+         */
+        getMask: function (maskPattern, i, j) {
+            switch (maskPattern) {
+                case QRMaskPattern.PATTERN000:
+                    return (i + j) % 2 == 0;
+                case QRMaskPattern.PATTERN001:
+                    return i % 2 == 0;
+                case QRMaskPattern.PATTERN010:
+                    return j % 3 == 0;
+                case QRMaskPattern.PATTERN011:
+                    return (i + j) % 3 == 0;
+                case QRMaskPattern.PATTERN100:
+                    return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
+                case QRMaskPattern.PATTERN101:
+                    return (i * j) % 2 + (i * j) % 3 == 0;
+                case QRMaskPattern.PATTERN110:
+                    return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
+                case QRMaskPattern.PATTERN111:
+                    return ((i * j) % 3 + (i + j) % 2) % 2 == 0;
+                default:
+                    throw new Error("bad maskPattern:" + maskPattern);
+            }
+        },
+        /*
+        获取RS的纠错多项式
+         */
+        getErrorCorrectPolynomial: function (errorCorrectLength) {
+            var a = new QRPolynomial([1], 0);
+            for (var i = 0; i < errorCorrectLength; i++) {
+                a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
+            }
+            return a;
+        },
+        /*
+        获取评价
+         */
+        getLostPoint: function (qrCode) {
+            var moduleCount = qrCode.getModuleCount(),
+                lostPoint = 0,
+                darkCount = 0;
+            for (var row = 0; row < moduleCount; row++) {
+                var sameCount = 0;
+                var head = qrCode.modules[row][0];
+                for (var col = 0; col < moduleCount; col++) {
+                    var current = qrCode.modules[row][col];
+                    //level 3 评价
+                    if (col < moduleCount - 6) {
+                        if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) {
+                            if (col < moduleCount - 10) {
+                                if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) {
+                                    lostPoint += 40;
+                                }
+                            } else if (col > 3) {
+                                if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) {
+                                    lostPoint += 40;
+                                }
+                            }
+                        }
+                    }
+                    //level 2 评价
+                    if ((row < moduleCount - 1) && (col < moduleCount - 1)) {
+                        var count = 0;
+                        if (current) count++;
+                        if (qrCode.modules[row + 1][col]) count++;
+                        if (qrCode.modules[row][col + 1]) count++;
+                        if (qrCode.modules[row + 1][col + 1]) count++;
+                        if (count == 0 || count == 4) {
+                            lostPoint += 3;
+                        }
+                    }
+                    //level 1 评价
+                    if (head ^ current) {
+                        sameCount++;
+                    } else {
+                        head = current;
+                        if (sameCount >= 5) {
+                            lostPoint += (3 + sameCount - 5);
+                        }
+                        sameCount = 1;
+                    }
+                    //level 4 评价
+                    if (current) {
+                        darkCount++;
+                    }
+                }
+            }
+            for (var col = 0; col < moduleCount; col++) {
+                var sameCount = 0;
+                var head = qrCode.modules[0][col];
+                for (var row = 0; row < moduleCount; row++) {
+                    var current = qrCode.modules[row][col];
+                    //level 3 评价
+                    if (row < moduleCount - 6) {
+                        if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) {
+                            if (row < moduleCount - 10) {
+                                if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) {
+                                    lostPoint += 40;
+                                }
+                            } else if (row > 3) {
+                                if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) {
+                                    lostPoint += 40;
+                                }
+                            }
+                        }
+                    }
+                    //level 1 评价
+                    if (head ^ current) {
+                        sameCount++;
+                    } else {
+                        head = current;
+                        if (sameCount >= 5) {
+                            lostPoint += (3 + sameCount - 5);
+                        }
+                        sameCount = 1;
+                    }
+                }
+            }
+            // LEVEL4
+            var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
+            lostPoint += ratio * 10;
+            return lostPoint;
+        }
+
+    };
+    //---------------------------------------------------------------------
+    // QRMath使用的数学工具
+    //---------------------------------------------------------------------
+    var QRMath = {
+        /*
+        将n转化为a^m
+         */
+        glog: function (n) {
+            if (n < 1) {
+                throw new Error("glog(" + n + ")");
+            }
+            return QRMath.LOG_TABLE[n];
+        },
+        /*
+        将a^m转化为n
+         */
+        gexp: function (n) {
+            while (n < 0) {
+                n += 255;
+            }
+            while (n >= 256) {
+                n -= 255;
+            }
+            return QRMath.EXP_TABLE[n];
+        },
+        EXP_TABLE: new Array(256),
+        LOG_TABLE: new Array(256)
+
+    };
+    for (var i = 0; i < 8; i++) {
+        QRMath.EXP_TABLE[i] = 1 << i;
+    }
+    for (var i = 8; i < 256; i++) {
+        QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];
+    }
+    for (var i = 0; i < 255; i++) {
+        QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
+    }
+    //---------------------------------------------------------------------
+    // QRPolynomial 多项式
+    //---------------------------------------------------------------------
+    /**
+     * 多项式类
+     * @param {Array} num   系数
+     * @param {num} shift a^shift
+     */
+    function QRPolynomial(num, shift) {
+        if (num.length == undefined) {
+            throw new Error(num.length + "/" + shift);
+        }
+        var offset = 0;
+        while (offset < num.length && num[offset] == 0) {
+            offset++;
+        }
+        this.num = new Array(num.length - offset + shift);
+        for (var i = 0; i < num.length - offset; i++) {
+            this.num[i] = num[i + offset];
+        }
+    }
+    QRPolynomial.prototype = {
+        get: function (index) {
+            return this.num[index];
+        },
+        getLength: function () {
+            return this.num.length;
+        },
+        /**
+         * 多项式乘法
+         * @param  {QRPolynomial} e 被乘多项式
+         * @return {[type]}   [description]
+         */
+        multiply: function (e) {
+            var num = new Array(this.getLength() + e.getLength() - 1);
+            for (var i = 0; i < this.getLength(); i++) {
+                for (var j = 0; j < e.getLength(); j++) {
+                    num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
+                }
+            }
+            return new QRPolynomial(num, 0);
+        },
+        /**
+         * 多项式模运算
+         * @param  {QRPolynomial} e 模多项式
+         * @return {}
+         */
+        mod: function (e) {
+            var tl = this.getLength(),
+                el = e.getLength();
+            if (tl - el < 0) {
+                return this;
+            }
+            var num = new Array(tl);
+            for (var i = 0; i < tl; i++) {
+                num[i] = this.get(i);
+            }
+            while (num.length >= el) {
+                var ratio = QRMath.glog(num[0]) - QRMath.glog(e.get(0));
+
+                for (var i = 0; i < e.getLength(); i++) {
+                    num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
+                }
+                while (num[0] == 0) {
+                    num.shift();
+                }
+            }
+            return new QRPolynomial(num, 0);
+        }
+    };
+
+    //---------------------------------------------------------------------
+    // RS_BLOCK_TABLE
+    //---------------------------------------------------------------------
+    /*
+    二维码各个版本信息[块数, 每块中的数据块数, 每块中的信息块数]
+     */
+    var RS_BLOCK_TABLE = [
+        // L
+        // M
+        // Q
+        // H
+        // 1
+        [1, 26, 19],
+        [1, 26, 16],
+        [1, 26, 13],
+        [1, 26, 9],
+
+        // 2
+        [1, 44, 34],
+        [1, 44, 28],
+        [1, 44, 22],
+        [1, 44, 16],
+
+        // 3
+        [1, 70, 55],
+        [1, 70, 44],
+        [2, 35, 17],
+        [2, 35, 13],
+
+        // 4
+        [1, 100, 80],
+        [2, 50, 32],
+        [2, 50, 24],
+        [4, 25, 9],
+
+        // 5
+        [1, 134, 108],
+        [2, 67, 43],
+        [2, 33, 15, 2, 34, 16],
+        [2, 33, 11, 2, 34, 12],
+
+        // 6
+        [2, 86, 68],
+        [4, 43, 27],
+        [4, 43, 19],
+        [4, 43, 15],
+
+        // 7
+        [2, 98, 78],
+        [4, 49, 31],
+        [2, 32, 14, 4, 33, 15],
+        [4, 39, 13, 1, 40, 14],
+
+        // 8
+        [2, 121, 97],
+        [2, 60, 38, 2, 61, 39],
+        [4, 40, 18, 2, 41, 19],
+        [4, 40, 14, 2, 41, 15],
+
+        // 9
+        [2, 146, 116],
+        [3, 58, 36, 2, 59, 37],
+        [4, 36, 16, 4, 37, 17],
+        [4, 36, 12, 4, 37, 13],
+
+        // 10
+        [2, 86, 68, 2, 87, 69],
+        [4, 69, 43, 1, 70, 44],
+        [6, 43, 19, 2, 44, 20],
+        [6, 43, 15, 2, 44, 16],
+
+        // 11
+        [4, 101, 81],
+        [1, 80, 50, 4, 81, 51],
+        [4, 50, 22, 4, 51, 23],
+        [3, 36, 12, 8, 37, 13],
+
+        // 12
+        [2, 116, 92, 2, 117, 93],
+        [6, 58, 36, 2, 59, 37],
+        [4, 46, 20, 6, 47, 21],
+        [7, 42, 14, 4, 43, 15],
+
+        // 13
+        [4, 133, 107],
+        [8, 59, 37, 1, 60, 38],
+        [8, 44, 20, 4, 45, 21],
+        [12, 33, 11, 4, 34, 12],
+
+        // 14
+        [3, 145, 115, 1, 146, 116],
+        [4, 64, 40, 5, 65, 41],
+        [11, 36, 16, 5, 37, 17],
+        [11, 36, 12, 5, 37, 13],
+
+        // 15
+        [5, 109, 87, 1, 110, 88],
+        [5, 65, 41, 5, 66, 42],
+        [5, 54, 24, 7, 55, 25],
+        [11, 36, 12],
+
+        // 16
+        [5, 122, 98, 1, 123, 99],
+        [7, 73, 45, 3, 74, 46],
+        [15, 43, 19, 2, 44, 20],
+        [3, 45, 15, 13, 46, 16],
+
+        // 17
+        [1, 135, 107, 5, 136, 108],
+        [10, 74, 46, 1, 75, 47],
+        [1, 50, 22, 15, 51, 23],
+        [2, 42, 14, 17, 43, 15],
+
+        // 18
+        [5, 150, 120, 1, 151, 121],
+        [9, 69, 43, 4, 70, 44],
+        [17, 50, 22, 1, 51, 23],
+        [2, 42, 14, 19, 43, 15],
+
+        // 19
+        [3, 141, 113, 4, 142, 114],
+        [3, 70, 44, 11, 71, 45],
+        [17, 47, 21, 4, 48, 22],
+        [9, 39, 13, 16, 40, 14],
+
+        // 20
+        [3, 135, 107, 5, 136, 108],
+        [3, 67, 41, 13, 68, 42],
+        [15, 54, 24, 5, 55, 25],
+        [15, 43, 15, 10, 44, 16],
+
+        // 21
+        [4, 144, 116, 4, 145, 117],
+        [17, 68, 42],
+        [17, 50, 22, 6, 51, 23],
+        [19, 46, 16, 6, 47, 17],
+
+        // 22
+        [2, 139, 111, 7, 140, 112],
+        [17, 74, 46],
+        [7, 54, 24, 16, 55, 25],
+        [34, 37, 13],
+
+        // 23
+        [4, 151, 121, 5, 152, 122],
+        [4, 75, 47, 14, 76, 48],
+        [11, 54, 24, 14, 55, 25],
+        [16, 45, 15, 14, 46, 16],
+
+        // 24
+        [6, 147, 117, 4, 148, 118],
+        [6, 73, 45, 14, 74, 46],
+        [11, 54, 24, 16, 55, 25],
+        [30, 46, 16, 2, 47, 17],
+
+        // 25
+        [8, 132, 106, 4, 133, 107],
+        [8, 75, 47, 13, 76, 48],
+        [7, 54, 24, 22, 55, 25],
+        [22, 45, 15, 13, 46, 16],
+
+        // 26
+        [10, 142, 114, 2, 143, 115],
+        [19, 74, 46, 4, 75, 47],
+        [28, 50, 22, 6, 51, 23],
+        [33, 46, 16, 4, 47, 17],
+
+        // 27
+        [8, 152, 122, 4, 153, 123],
+        [22, 73, 45, 3, 74, 46],
+        [8, 53, 23, 26, 54, 24],
+        [12, 45, 15, 28, 46, 16],
+
+        // 28
+        [3, 147, 117, 10, 148, 118],
+        [3, 73, 45, 23, 74, 46],
+        [4, 54, 24, 31, 55, 25],
+        [11, 45, 15, 31, 46, 16],
+
+        // 29
+        [7, 146, 116, 7, 147, 117],
+        [21, 73, 45, 7, 74, 46],
+        [1, 53, 23, 37, 54, 24],
+        [19, 45, 15, 26, 46, 16],
+
+        // 30
+        [5, 145, 115, 10, 146, 116],
+        [19, 75, 47, 10, 76, 48],
+        [15, 54, 24, 25, 55, 25],
+        [23, 45, 15, 25, 46, 16],
+
+        // 31
+        [13, 145, 115, 3, 146, 116],
+        [2, 74, 46, 29, 75, 47],
+        [42, 54, 24, 1, 55, 25],
+        [23, 45, 15, 28, 46, 16],
+
+        // 32
+        [17, 145, 115],
+        [10, 74, 46, 23, 75, 47],
+        [10, 54, 24, 35, 55, 25],
+        [19, 45, 15, 35, 46, 16],
+
+        // 33
+        [17, 145, 115, 1, 146, 116],
+        [14, 74, 46, 21, 75, 47],
+        [29, 54, 24, 19, 55, 25],
+        [11, 45, 15, 46, 46, 16],
+
+        // 34
+        [13, 145, 115, 6, 146, 116],
+        [14, 74, 46, 23, 75, 47],
+        [44, 54, 24, 7, 55, 25],
+        [59, 46, 16, 1, 47, 17],
+
+        // 35
+        [12, 151, 121, 7, 152, 122],
+        [12, 75, 47, 26, 76, 48],
+        [39, 54, 24, 14, 55, 25],
+        [22, 45, 15, 41, 46, 16],
+
+        // 36
+        [6, 151, 121, 14, 152, 122],
+        [6, 75, 47, 34, 76, 48],
+        [46, 54, 24, 10, 55, 25],
+        [2, 45, 15, 64, 46, 16],
+
+        // 37
+        [17, 152, 122, 4, 153, 123],
+        [29, 74, 46, 14, 75, 47],
+        [49, 54, 24, 10, 55, 25],
+        [24, 45, 15, 46, 46, 16],
+
+        // 38
+        [4, 152, 122, 18, 153, 123],
+        [13, 74, 46, 32, 75, 47],
+        [48, 54, 24, 14, 55, 25],
+        [42, 45, 15, 32, 46, 16],
+
+        // 39
+        [20, 147, 117, 4, 148, 118],
+        [40, 75, 47, 7, 76, 48],
+        [43, 54, 24, 22, 55, 25],
+        [10, 45, 15, 67, 46, 16],
+
+        // 40
+        [19, 148, 118, 6, 149, 119],
+        [18, 75, 47, 31, 76, 48],
+        [34, 54, 24, 34, 55, 25],
+        [20, 45, 15, 61, 46, 16]
+    ];
+
+    /**
+     * 根据数据获取对应版本
+     * @return {[type]} [description]
+     */
+    QRCodeAlg.prototype.getRightType = function () {
+        for (var typeNumber = 1; typeNumber < 41; typeNumber++) {
+            var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel];
+            if (rsBlock == undefined) {
+                throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel);
+            }
+            var length = rsBlock.length / 3;
+            var totalDataCount = 0;
+            for (var i = 0; i < length; i++) {
+                var count = rsBlock[i * 3 + 0];
+                var dataCount = rsBlock[i * 3 + 2];
+                totalDataCount += dataCount * count;
+            }
+            var lengthBytes = typeNumber > 9 ? 2 : 1;
+            if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) {
+                this.typeNumber = typeNumber;
+                this.rsBlock = rsBlock;
+                this.totalDataCount = totalDataCount;
+                break;
+            }
+        }
+    };
+
+    //---------------------------------------------------------------------
+    // QRBitBuffer
+    //---------------------------------------------------------------------
+    function QRBitBuffer() {
+        this.buffer = new Array();
+        this.length = 0;
+    }
+    QRBitBuffer.prototype = {
+        get: function (index) {
+            var bufIndex = Math.floor(index / 8);
+            return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1);
+        },
+        put: function (num, length) {
+            for (var i = 0; i < length; i++) {
+                this.putBit(((num >>> (length - i - 1)) & 1));
+            }
+        },
+        putBit: function (bit) {
+            var bufIndex = Math.floor(this.length / 8);
+            if (this.buffer.length <= bufIndex) {
+                this.buffer.push(0);
+            }
+            if (bit) {
+                this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
+            }
+            this.length++;
+        }
+    };
+
+
+
+    // xzedit
+    let qrcodeAlgObjCache = [];
+    /**
+     * 二维码构造函数,主要用于绘制
+     * @param  {参数列表} opt 传递参数
+     * @return {}
+     */
+    QRCode = function (opt) {
+        //设置默认参数
+        this.options = {
+            text: '',
+            size: 256,
+            correctLevel: 3,
+            background: '#ffffff',
+            foreground: '#000000',
+            pdground: '#000000',
+            image: '',
+            imageSize: 30,
+            canvasId: opt.canvasId,
+            context: opt.context,
+            usingComponents: opt.usingComponents,
+            showLoading: opt.showLoading,
+            loadingText: opt.loadingText,
+        };
+        if (typeof opt === 'string') { // 只编码ASCII字符串
+            opt = {
+                text: opt
+            };
+        }
+        if (opt) {
+            for (var i in opt) {
+                this.options[i] = opt[i];
+            }
+        }
+        //使用QRCodeAlg创建二维码结构
+        var qrCodeAlg = null;
+        for (var i = 0, l = qrcodeAlgObjCache.length; i < l; i++) {
+            if (qrcodeAlgObjCache[i].text == this.options.text && qrcodeAlgObjCache[i].text.correctLevel == this.options.correctLevel) {
+                qrCodeAlg = qrcodeAlgObjCache[i].obj;
+                break;
+            }
+        }
+        if (i == l) {
+            qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel);
+            qrcodeAlgObjCache.push({
+                text: this.options.text,
+                correctLevel: this.options.correctLevel,
+                obj: qrCodeAlg
+            });
+        }
+        /**
+         * 计算矩阵点的前景色
+         * @param {Obj} config
+         * @param {Number} config.row 点x坐标
+         * @param {Number} config.col 点y坐标
+         * @param {Number} config.count 矩阵大小
+         * @param {Number} config.options 组件的options
+         * @return {String}
+         */
+        let getForeGround = function (config) {
+            var options = config.options;
+            if (options.pdground && (
+                (config.row > 1 && config.row < 5 && config.col > 1 && config.col < 5) ||
+                (config.row > (config.count - 6) && config.row < (config.count - 2) && config.col > 1 && config.col < 5) ||
+                (config.row > 1 && config.row < 5 && config.col > (config.count - 6) && config.col < (config.count - 2))
+            )) {
+                return options.pdground;
+            }
+            return options.foreground;
+        }
+        // 创建canvas
+        let createCanvas = function (options) {
+            if (options.showLoading) {
+                uni.showLoading({
+                    title: options.loadingText,
+                    mask: true
+                });
+            }
+            var ctx = uni.createCanvasContext(options.canvasId, options.context);
+            var count = qrCodeAlg.getModuleCount();
+            var ratioSize = options.size;
+            var ratioImgSize = options.imageSize;
+            //计算每个点的长宽
+            var tileW = (ratioSize / count).toPrecision(4);
+            var tileH = (ratioSize / count).toPrecision(4);
+            //绘制
+            for (var row = 0; row < count; row++) {
+                for (var col = 0; col < count; col++) {
+                    var w = (Math.ceil((col + 1) * tileW) - Math.floor(col * tileW));
+                    var h = (Math.ceil((row + 1) * tileW) - Math.floor(row * tileW));
+                    var foreground = getForeGround({
+                        row: row,
+                        col: col,
+                        count: count,
+                        options: options
+                    });
+                    ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
+                    ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
+                }
+            }
+            if (options.image) {
+                var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
+                var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
+                drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true)
+                ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
+                // 画圆角矩形
+                function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
+                    ctxi.setLineWidth(lineWidth);
+                    ctxi.setFillStyle(options.background);
+                    ctxi.setStrokeStyle(options.background);
+                    ctxi.beginPath(); // draw top and top right corner 
+                    ctxi.moveTo(x + r, y);
+                    ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner 
+                    ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner 
+                    ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner 
+                    ctxi.arcTo(x, y, x + r, y, r);
+                    ctxi.closePath();
+                    if (fill) {
+                        ctxi.fill();
+                    }
+                    if (stroke) {
+                        ctxi.stroke();
+                    }
+                }
+            }
+            setTimeout(() => {
+                ctx.draw(true, () => {
+                    // 保存到临时区域
+                    setTimeout(() => {
+                        uni.canvasToTempFilePath({
+                            width: options.width,
+                            height: options.height,
+                            destWidth: options.width,
+                            destHeight: options.height,
+                            canvasId: options.canvasId,
+                            quality: Number(1),
+                            success: function (res) {
+                                if (options.cbResult) {
+                                    options.cbResult(res.tempFilePath)
+                                }
+                            },
+                            fail: function (res) {
+                                if (options.cbResult) {
+                                    options.cbResult(res)
+                                }
+                            },
+                            complete: function () {
+                                if (options.showLoading){
+                                    uni.hideLoading();
+                                }
+                            },
+                        }, options.context);
+                    }, options.text.length + 100);
+                });
+            }, options.usingComponents ? 0 : 150);
+        }
+        createCanvas(this.options);
+        // 空判定
+        let empty = function (v) {
+            let tp = typeof v,
+                rt = false;
+            if (tp == "number" && String(v) == "") {
+                rt = true
+            } else if (tp == "undefined") {
+                rt = true
+            } else if (tp == "object") {
+                if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+            } else if (tp == "string") {
+                if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+            } else if (tp == "function") {
+                rt = false
+            }
+            return rt
+        }
+    };
+    QRCode.prototype.clear = function (fn) {
+        var ctx = uni.createCanvasContext(this.options.canvasId, this.options.context)
+        ctx.clearRect(0, 0, this.options.size, this.options.size)
+        ctx.draw(false, () => {
+            if (fn) {
+                fn()
+            }
+        })
+    };
+})()
+
+export default QRCode

+ 210 - 0
components/tki-qrcode/tki-qrcode.vue

@@ -0,0 +1,210 @@
+<template xlang="wxml" minapp="mpvue">
+	<view class="tki-qrcode">
+		<!-- #ifndef MP-ALIPAY -->
+		<canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" />
+		<!-- #endif -->
+		<!-- #ifdef MP-ALIPAY -->
+		<canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" />
+		<!-- #endif -->
+		<image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" />
+	</view>
+</template>
+
+<script>
+import QRCode from "./qrcode.js"
+let qrcode
+export default {
+	name: "tki-qrcode",
+	props: {
+		cid: {
+			type: String,
+			default: 'tki-qrcode-canvas'
+		},
+		size: {
+			type: Number,
+			default: 200
+		},
+		unit: {
+			type: String,
+			default: 'upx'
+		},
+		show: {
+			type: Boolean,
+			default: true
+		},
+		val: {
+			type: String,
+			default: ''
+		},
+		background: {
+			type: String,
+			default: '#ffffff'
+		},
+		foreground: {
+			type: String,
+			default: '#000000'
+		},
+		pdground: {
+			type: String,
+			default: '#000000'
+		},
+		icon: {
+			type: String,
+			default: ''
+		},
+		iconSize: {
+			type: Number,
+			default: 40
+		},
+		lv: {
+			type: Number,
+			default: 3
+		},
+		onval: {
+			type: Boolean,
+			default: false
+		},
+		loadMake: {
+			type: Boolean,
+			default: false
+		},
+		usingComponents: {
+			type: Boolean,
+			default: true
+		},
+		showLoading: {
+			type: Boolean,
+			default: true
+		},
+		loadingText: {
+			type: String,
+			default: '二维码生成中'
+		},
+	},
+	data() {
+		return {
+			result: '',
+		}
+	},
+	methods: {
+		_makeCode() {
+			let that = this
+			if (!this._empty(this.val)) {
+				qrcode = new QRCode({
+					context: that, // 上下文环境
+					canvasId:that.cid, // canvas-id
+					usingComponents: that.usingComponents, // 是否是自定义组件
+					showLoading: that.showLoading, // 是否显示loading
+					loadingText: that.loadingText, // loading文字
+					text: that.val, // 生成内容
+					size: that.cpSize, // 二维码大小
+					background: that.background, // 背景色
+					foreground: that.foreground, // 前景色
+					pdground: that.pdground, // 定位角点颜色
+					correctLevel: that.lv, // 容错级别
+					image: that.icon, // 二维码图标
+					imageSize: that.iconSize,// 二维码图标大小
+					cbResult: function (res) { // 生成二维码的回调
+						that._result(res)
+					},
+				});
+			} else {
+				uni.showToast({
+					title: '二维码内容不能为空',
+					icon: 'none',
+					duration: 2000
+				});
+			}
+		},
+		_clearCode() {
+			this._result('')
+			qrcode.clear()
+		},
+		_saveCode() {
+			let that = this;
+			if (this.result != "") {
+				uni.saveImageToPhotosAlbum({
+					filePath: that.result,
+					success: function () {
+						uni.showToast({
+							title: '二维码保存成功',
+							icon: 'success',
+							duration: 2000
+						});
+					}
+				});
+			}
+		},
+		_result(res) {
+			this.result = res;
+			this.$emit('result', res)
+		},
+		_empty(v) {
+			let tp = typeof v,
+				rt = false;
+			if (tp == "number" && String(v) == "") {
+				rt = true
+			} else if (tp == "undefined") {
+				rt = true
+			} else if (tp == "object") {
+				if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+			} else if (tp == "string") {
+				if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+			} else if (tp == "function") {
+				rt = false
+			}
+			return rt
+		}
+	},
+	watch: {
+		size: function (n, o) {
+			if (n != o && !this._empty(n)) {
+				this.cSize = n
+				if (!this._empty(this.val)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 100);
+				}
+			}
+		},
+		val: function (n, o) {
+			if (this.onval) {
+				if (n != o && !this._empty(n)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 0);
+				}
+			}
+		}
+	},
+	computed: {
+		cpSize() {
+			if(this.unit == "upx"){
+				return uni.upx2px(this.size)
+			}else{
+				return this.size
+			}
+		}
+	},
+	mounted: function () {
+		if (this.loadMake) {
+			if (!this._empty(this.val)) {
+				setTimeout(() => {
+					this._makeCode()
+				}, 0);
+			}
+		}
+	},
+}
+</script>
+<style>
+.tki-qrcode {
+  position: relative;
+}
+.tki-qrcode-canvas {
+  position: fixed;
+  top: -99999upx;
+  left: -99999upx;
+  z-index: -99999;
+}
+</style>

+ 21 - 0
components/uview-ui/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 www.uviewui.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

Some files were not shown because too many files changed in this diff