├── .eslintrc.js
├── .gitignore
├── README.md
├── dist
├── app.js
├── app.json
├── app.wxss
├── icityer
│ ├── animate.wxss
│ ├── cityData.js
│ ├── icityer.js
│ ├── icityer.wxml
│ ├── icityer.wxss
│ └── icon
│ │ └── search.png
├── npm
│ └── wepy
│ │ └── lib
│ │ ├── app.js
│ │ ├── base.js
│ │ ├── component.js
│ │ ├── event.js
│ │ ├── mixin.js
│ │ ├── native.js
│ │ ├── page.js
│ │ ├── util.js
│ │ └── wepy.js
└── pages
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── package-lock.json
├── package.json
├── project.config.json
├── screenshot
├── screenshot1.png
├── screenshot2.png
└── screenshot3.png
├── src
├── app.wpy
├── icityer
│ ├── animate.less
│ ├── cityData.js
│ ├── icityer.wpy
│ └── icon
│ │ └── search.png
└── pages
│ └── index.wpy
└── wepy.config.js
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: 'babel-eslint',
4 | parserOptions: {
5 | sourceType: 'module'
6 | },
7 | env: {
8 | browser: true
9 | },
10 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
11 | extends: 'standard',
12 | // required to lint *.wpy files
13 | plugins: [
14 | 'html'
15 | ],
16 | settings: {
17 | 'html/html-extensions': ['.html', '.wpy']
18 | },
19 | // add your custom rules here
20 | 'rules': {
21 | // allow paren-less arrow functions
22 | 'arrow-parens': 0,
23 | // allow async-await
24 | 'generator-star-spacing': 0,
25 | // allow debugger during development
26 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
27 | 'space-before-function-paren': 0
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DB_store
3 | .wepycache
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 同类组件
2 | #### [现代样式弹窗组件](https://github.com/wahao/wepy-com-iviewer)
3 | #### [自定义状态系统导航栏,可监听返回事件](https://github.com/wahao/wepy-com-inaver)
4 |
5 | ## 如何查看demo
6 |
7 | ### 1.直接使用开发者打包文件:
8 | #### 下载dist文件夹,用微信开发工具打开
9 |
10 | ### 2.自行编译
11 | ```console
12 | npm install
13 | ```
14 | ```console
15 | npm run build
16 | ```
17 | #### 然后将dist文件夹用微信开发工具打开
18 |
19 |
20 | ### 效果展示
21 |
22 |
23 |
24 |
25 |
26 | ### 特别说明
27 |
28 | #### 目前还存在左侧滚动关联右侧导航同步不稳定问题(待优化)
29 | #### 为了更好的显示效果,app设置navigationStyle: 'custom' 如需使用系统默认导航栏。需修改icityer的样式。后期会更新支持更多样式
30 |
31 | ### 参数
32 |
33 | #### show
34 | #### Boolean
35 | #### 默认true
36 |
37 | ### 方法
38 |
39 | #### choose
40 | #### 返回Object 包含{province,city,area}
41 |
42 |
--------------------------------------------------------------------------------
/dist/app.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 |
8 | 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; }; }();
9 |
10 | var _wepy = require('./npm/wepy/lib/wepy.js');
11 |
12 | var _wepy2 = _interopRequireDefault(_wepy);
13 |
14 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15 |
16 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17 |
18 | 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; }
19 |
20 | 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; }
21 |
22 | var _default = function (_wepy$app) {
23 | _inherits(_default, _wepy$app);
24 |
25 | function _default() {
26 | var _ref;
27 |
28 | var _temp, _this, _ret;
29 |
30 | _classCallCheck(this, _default);
31 |
32 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
33 | args[_key] = arguments[_key];
34 | }
35 |
36 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = _default.__proto__ || Object.getPrototypeOf(_default)).call.apply(_ref, [this].concat(args))), _this), _this.config = {
37 | pages: ['pages/index'],
38 | window: {
39 | backgroundTextStyle: 'light',
40 | navigationBarBackgroundColor: '#F2F2F2',
41 | navigationBarTitleText: 'Demo',
42 | navigationStyle: 'custom',
43 | navigationBarTextStyle: 'black'
44 | }
45 | }, _temp), _possibleConstructorReturn(_this, _ret);
46 | }
47 |
48 | _createClass(_default, [{
49 | key: 'onLaunch',
50 | value: function onLaunch() {}
51 | }]);
52 |
53 | return _default;
54 | }(_wepy2.default.app);
55 |
56 |
57 | App(require('./npm/wepy/lib/wepy.js').default.$createApp(_default, {"noPromiseAPI":["createSelectorQuery"]}));
58 |
59 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC5qcyJdLCJuYW1lcyI6WyJjb25maWciLCJwYWdlcyIsIndpbmRvdyIsImJhY2tncm91bmRUZXh0U3R5bGUiLCJuYXZpZ2F0aW9uQmFyQmFja2dyb3VuZENvbG9yIiwibmF2aWdhdGlvbkJhclRpdGxlVGV4dCIsIm5hdmlnYXRpb25TdHlsZSIsIm5hdmlnYXRpb25CYXJUZXh0U3R5bGUiLCJhcHAiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUNBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzswTEFHRUEsTSxHQUFTO0FBQ1BDLGFBQU8sQ0FDTCxhQURLLENBREE7QUFJUEMsY0FBUTtBQUNOQyw2QkFBcUIsT0FEZjtBQUVOQyxzQ0FBOEIsU0FGeEI7QUFHTkMsZ0NBQXdCLE1BSGxCO0FBSU5DLHlCQUFpQixRQUpYO0FBS05DLGdDQUF3QjtBQUxsQjtBQUpELEs7Ozs7OytCQWFFLENBQ1Y7Ozs7RUFmMEIsZUFBS0MsRyIsImZpbGUiOiJhcHAuanMiLCJzb3VyY2VzQ29udGVudCI6WyJcbmltcG9ydCB3ZXB5IGZyb20gJ3dlcHknXG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIGV4dGVuZHMgd2VweS5hcHAge1xuICBjb25maWcgPSB7XG4gICAgcGFnZXM6IFtcbiAgICAgICdwYWdlcy9pbmRleCdcbiAgICBdLFxuICAgIHdpbmRvdzoge1xuICAgICAgYmFja2dyb3VuZFRleHRTdHlsZTogJ2xpZ2h0JyxcbiAgICAgIG5hdmlnYXRpb25CYXJCYWNrZ3JvdW5kQ29sb3I6ICcjRjJGMkYyJyxcbiAgICAgIG5hdmlnYXRpb25CYXJUaXRsZVRleHQ6ICdEZW1vJyxcbiAgICAgIG5hdmlnYXRpb25TdHlsZTogJ2N1c3RvbScsXG4gICAgICBuYXZpZ2F0aW9uQmFyVGV4dFN0eWxlOiAnYmxhY2snXG4gICAgfVxuICB9XG5cbiAgb25MYXVuY2goKSB7XG4gIH1cbn1cbiJdfQ==
--------------------------------------------------------------------------------
/dist/app.json:
--------------------------------------------------------------------------------
1 | {"pages":["pages/index"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#F2F2F2","navigationBarTitleText":"Demo","navigationStyle":"custom","navigationBarTextStyle":"black"}}
--------------------------------------------------------------------------------
/dist/app.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HellyW/wepy-com-icityer/378791d7566310fb3d1fbf0c57d40fe8f4be1348/dist/app.wxss
--------------------------------------------------------------------------------
/dist/icityer/animate.wxss:
--------------------------------------------------------------------------------
1 | .expandToFull{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:expandToFull;animation-name:expandToFull}@-webkit-keyframes expandToFull{from{width:180rpx}to{width:580rpx}}@keyframes expandToFull{from{width:180rpx}to{width:580rpx}}
--------------------------------------------------------------------------------
/dist/icityer/icityer.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = undefined;
7 |
8 | 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; }; }();
9 |
10 | var _wepy = require('./../npm/wepy/lib/wepy.js');
11 |
12 | var _wepy2 = _interopRequireDefault(_wepy);
13 |
14 | var _cityData = require('./cityData.js');
15 |
16 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17 |
18 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19 |
20 | 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; }
21 |
22 | 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; }
23 |
24 | var Icityer = function (_wepy$component) {
25 | _inherits(Icityer, _wepy$component);
26 |
27 | function Icityer() {
28 | var _ref;
29 |
30 | var _temp, _this, _ret;
31 |
32 | _classCallCheck(this, Icityer);
33 |
34 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
35 | args[_key] = arguments[_key];
36 | }
37 |
38 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Icityer.__proto__ || Object.getPrototypeOf(Icityer)).call.apply(_ref, [this].concat(args))), _this), _this.props = {
39 | show: {
40 | type: Boolean,
41 | default: true
42 | }
43 | }, _this.computed = {
44 | DataSort: function DataSort() {
45 | var _data = {};
46 | for (var i in this.CITYSDATA) {
47 | if (!_data[this.CITYSDATA[i].key]) {
48 | _data[this.CITYSDATA[i].key] = [this.CITYSDATA[i]];
49 | } else {
50 | _data[this.CITYSDATA[i].key].push(this.CITYSDATA[i]);
51 | }
52 | }
53 | return _data;
54 | }
55 | }, _this.watch = {}, _this.data = {
56 | 'quick_flag': 'A',
57 | 'nav_flag': 'A',
58 | 'navs': ['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'],
59 | CITYSDATA: _cityData.CITYSDATA,
60 | expandSearchInput: false,
61 | searchData: []
62 | }, _this.methods = {
63 | getCity: function getCity(e) {
64 | var _province = e.currentTarget.dataset.province;
65 | var _city = e.currentTarget.dataset.city;
66 | var _area = e.currentTarget.dataset.area;
67 | this.expandSearchInput = false;
68 | this.$apply();
69 | this.$emit('choose', {
70 | province: _province,
71 | city: _city,
72 | area: _area
73 | });
74 | },
75 | scrollEvent: function scrollEvent() {
76 | // 暂时取消左侧滑动关联右侧关系
77 | this._getTopToNav();
78 | // this.$apply()
79 | },
80 | quickTo: function quickTo(e) {
81 | var _id = e.currentTarget.dataset.nav;
82 | this.quick_flag = this.nav_flag = _id;
83 | this.$apply();
84 | },
85 | showSearchInput: function showSearchInput() {
86 | this.expandSearchInput = true;
87 | this.$apply();
88 | },
89 |
90 | getSearchText: function getSearchText(e) {
91 | var _searchText = e.detail.value.trim();
92 | if (_searchText === '') {
93 | return;
94 | }
95 | this._pushSearchCityData(_searchText);
96 | }
97 | }, _temp), _possibleConstructorReturn(_this, _ret);
98 | }
99 |
100 | _createClass(Icityer, [{
101 | key: 'onLoad',
102 | value: function onLoad() {}
103 | }, {
104 | key: '_getTopToNav',
105 | value: function _getTopToNav() {
106 | var self = this;
107 | var _navs = this.navs;
108 | var _index = 0;
109 | var _checkActiveFlag = function _checkActiveFlag(n, cb) {
110 | var query = _wepy2.default.createSelectorQuery();
111 | query.select('#' + _navs[n]).boundingClientRect();
112 | query.selectViewport().scrollOffset();
113 | query.exec(function (res) {
114 | if (!res[0]) {
115 | return cb && cb(true);
116 | }
117 | if (res[0].top < 20) {
118 | return cb && cb(true);
119 | }
120 | return cb && cb(false);
121 | });
122 | };
123 | var _setActiveFlag = function _setActiveFlag() {
124 | _checkActiveFlag(_index, function (status) {
125 | if (status && _index < _navs.length) {
126 | _index++;
127 | _setActiveFlag();
128 | } else {
129 | self.nav_flag = _navs[_index];
130 | self.$apply();
131 | }
132 | });
133 | };
134 | _setActiveFlag();
135 | }
136 | }, {
137 | key: '_pushAllCity',
138 | value: function _pushAllCity(province, city) {
139 | var _searchCityData = [];
140 | for (var i in city) {
141 | var _city = city[i].name;
142 | var _areas = city[i].areas;
143 | for (var j in _areas) {
144 | _searchCityData.push({
145 | province: province,
146 | city: _city,
147 | area: _areas[j]
148 | });
149 | }
150 | }
151 | return _searchCityData;
152 | }
153 | }, {
154 | key: '_pushAllArea',
155 | value: function _pushAllArea(province, city, area) {
156 | var _searchCityData = [];
157 | for (var i in area) {
158 | _searchCityData.push({
159 | province: province,
160 | city: city,
161 | area: area[i]
162 | });
163 | }
164 | return _searchCityData;
165 | }
166 | }, {
167 | key: '_pushSearchCityData',
168 | value: function _pushSearchCityData(searchText) {
169 | var _searchCityData = [];
170 | for (var i in this.CITYSDATA) {
171 | if (_searchCityData.length > 30) {
172 | break;
173 | }
174 | var _province = this.CITYSDATA[i].name;
175 | if (_province.indexOf(searchText) !== -1) {
176 | _searchCityData = _searchCityData.concat(this._pushAllCity(_province, this.CITYSDATA[i].citys));
177 | continue;
178 | }
179 | var _citys = this.CITYSDATA[i].citys;
180 | for (var j in _citys) {
181 | var _city = _citys[j].name;
182 | if (_city.indexOf(searchText) !== -1) {
183 | _searchCityData = _searchCityData.concat(this._pushAllArea(_province, _city, _citys[j].areas));
184 | continue;
185 | }
186 | var _areas = _citys[j].areas;
187 | for (var k in _areas) {
188 | var _area = _areas[k];
189 | if (_area.indexOf(searchText) !== -1) {
190 | _searchCityData.push({
191 | province: _province,
192 | city: _city,
193 | area: _area
194 | });
195 | }
196 | }
197 | }
198 | }
199 | this.searchData = _searchCityData;
200 | this.$apply();
201 | }
202 | }]);
203 |
204 | return Icityer;
205 | }(_wepy2.default.component);
206 |
207 | exports.default = Icityer;
208 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImljaXR5ZXIuanMiXSwibmFtZXMiOlsiSWNpdHllciIsInByb3BzIiwic2hvdyIsInR5cGUiLCJCb29sZWFuIiwiZGVmYXVsdCIsImNvbXB1dGVkIiwiRGF0YVNvcnQiLCJfZGF0YSIsImkiLCJDSVRZU0RBVEEiLCJrZXkiLCJwdXNoIiwid2F0Y2giLCJkYXRhIiwiZXhwYW5kU2VhcmNoSW5wdXQiLCJzZWFyY2hEYXRhIiwibWV0aG9kcyIsImdldENpdHkiLCJlIiwiX3Byb3ZpbmNlIiwiY3VycmVudFRhcmdldCIsImRhdGFzZXQiLCJwcm92aW5jZSIsIl9jaXR5IiwiY2l0eSIsIl9hcmVhIiwiYXJlYSIsIiRhcHBseSIsIiRlbWl0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gIGlmIChzdGF0dXMgJiYgX2luZGV4IDwgX25hdnMubGVuZ3RoKSB7XG4gICAgICAgICAgICBfaW5kZXgrK1xuICAgICAgICAgICAgX3NldEFjdGl2ZUZsYWcoKVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzZWxmLm5hdl9mbGFnID0gX25hdnNbX2luZGV4XVxuICAgICAgICAgICAgc2VsZi4kYXBwbHkoKVxuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICAgIF9zZXRBY3RpdmVGbGFnKClcbiAgICB9XG4gICAgX3B1c2hBbGxDaXR5IChwcm92aW5jZSwgY2l0eSkge1xuICAgICAgbGV0IF9zZWFyY2hDaXR5RGF0YSA9IFtdXG4gICAgICBmb3IgKGxldCBpIGluIGNpdHkpIHtcbiAgICAgICAgbGV0IF9jaXR5ID0gY2l0eVtpXS5uYW1lXG4gICAgICAgIGxldCBfYXJlYXMgPSBjaXR5W2ldLmFyZWFzXG4gICAgICAgIGZvciAobGV0IGogaW4gX2FyZWFzKSB7XG4gICAgICAgICAgX3NlYXJjaENpdHlEYXRhLnB1c2goe1xuICAgICAgICAgICAgcHJvdmluY2U6IHByb3ZpbmNlLFxuICAgICAgICAgICAgY2l0eTogX2NpdHksXG4gICAgICAgICAgICBhcmVhOiBfYXJlYXNbal1cbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gX3NlYXJjaENpdHlEYXRhXG4gICAgfVxuICAgIF9wdXNoQWxsQXJlYSAocHJvdmluY2UsIGNpdHksIGFyZWEpIHtcbiAgICAgIGxldCBfc2VhcmNoQ2l0eURhdGEgPSBbXVxuICAgICAgZm9yIChsZXQgaSBpbiBhcmVhKSB7XG4gICAgICAgIF9zZWFyY2hDaXR5RGF0YS5wdXNoKHtcbiAgICAgICAgICBwcm92aW5jZTogcHJvdmluY2UsXG4gICAgICAgICAgY2l0eTogY2l0eSxcbiAgICAgICAgICBhcmVhOiBhcmV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XNcbiAgICAgICAgICBmb3IgKGxldCBrIGluIF9hcmVhcykge1xuICAgICAgICAgICAgbGV0IF9hcmVhID0gX2FyZWFzW2tdXG4gICAgICAgICAgICBpZiAoX2FyZWEuaW5kZXhPZihzZWFyY2hUZXh0KSE9PS0xKSB7XG4gICAgICAgICAgICAgIF9zZWFyY2hDaXR5RGF0YS5wdXNoKHtcbiAgICAgICAgICAgICAgICBwcm92aW5jZTogX3Byb3ZpbmNlLFxuICAgICAgICAgICAgICAgIGNpdHk6IF9jaXR5LFxuICAgICAgICAgICAgICAgIGFyZWE6IF9hcmVhXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICB0aGlzLnNlYXJjaERhdGEgPSBfc2VhcmNoQ2l0eURhdGFcbiAgICAgIHRoaXMuJGFwcGx5KClcbiAgICB9XG4gICAgbWV0aG9kcyA9IHtcbiAgICAgIGdldENpdHk6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgIGxldCBfcHJvdmluY2UgPSBlLmN1cnJlbnRUYXJnZXQuZGF0YXNldC5wcm92aW5jZVxuICAgICAgICBsZXQgX2NpdHkgPSBlLmN1cnJlbnRUYXJnZXQuZGF0YXNldC5jaXR5XG4gICAgICAgIGxldCBfYXJlYSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0LmFyZWFcbiAgICAgICAgdGhpcy5leHBhbmRTZWFyY2hJbnB1dCA9IGZhbHNlXG4gICAgICAgIHRoaXMuJGFwcGx5KClcbiAgICAgICAgdGhpcy4kZW1pdCgnY2hvb3NlJywge1xuICAgICAgICAgIHByb3ZpbmNlOiBfcHJvdmluY2UsXG4gICAgICAgICAgY2l0eTogX2NpdHksXG4gICAgICAgICAgYXJlYTogX2FyZWFcbiAgICAgICAgfSlcbiAgICAgIH0sXG4gICAgICBzY3JvbGxFdmVudDogZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyDmmoLml7blj5bmtojlt6bkvqfmu5HliqjlhbPogZTlj7PkvqflhbPns7tcbiAgICAgICAgdGhpcy5fZ2V0VG9wVG9OYXYoKVxuICAgICAgICAvLyB0aGlzLiRhcHBseSgpXG4gICAgICB9LFxuICAgICAgcXVpY2tUbzogZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgbGV0IF9pZCA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0Lm5hdlxuICAgICAgICB0aGlzLnF1aWNrX2ZsYWcgPSB0aGlzLm5hdl9mbGFnID0gX2lkXG4gICAgICAgIHRoaXMuJGFwcGx5KClcbiAgICAgIH0sXG4gICAgICBzaG93U2VhcmNoSW5wdXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5leHBhbmRTZWFyY2hJbnB1dCA9IHRydWVcbiAgICAgICAgdGhpcy4kYXBwbHkoKVxuICAgICAgfSxcblxuICAgICAgZ2V0U2VhcmNoVGV4dDogZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgbGV0IF9zZWFyY2hUZXh0ID0gZS5kZXRhaWwudmFsdWUudHJpbSgpXG4gICAgICAgIGlmIChfc2VhcmNoVGV4dD09PScnKSB7XG4gICAgICAgICAgcmV0dXJuXG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fcHVzaFNlYXJjaENpdHlEYXRhKF9zZWFyY2hUZXh0KVxuICAgICAgfVxuICAgIH1cbiAgfVxuIl19
--------------------------------------------------------------------------------
/dist/icityer/icityer.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{provinces.name}}
8 |
9 | {{citys.name}}
10 | {{areas}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{nav}}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | {{item.area}}-{{item.city}}-{{item.province}}
30 |
31 |
32 |
--------------------------------------------------------------------------------
/dist/icityer/icityer.wxss:
--------------------------------------------------------------------------------
1 | .expandToFull._d66b9e6{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:expandToFull;animation-name:expandToFull}@-webkit-keyframes expandToFull{from{width:180rpx}to{width:580rpx}}@keyframes expandToFull{from{width:180rpx}to{width:580rpx}}.icityer._d66b9e6{width:100vw;height:100vh;box-sizing:border-box;padding:280rpx 10rpx 10rpx 10rpx;position:absolute;z-index:10000;top:0;left:0;overflow:hidden;background:#fff}.icityer .container._d66b9e6{width:auto;margin:0 50rpx;height:100%;box-sizing:border-box;padding:0 80rpx 0 0}.icityer .container .types .provinces .province._d66b9e6{font-size:42rpx;font-weight:600;padding:5rpx 15rpx;text-align:right;border-bottom:1rpx solid #898989}.icityer .container .types .provinces .citys .city._d66b9e6{font-size:36rpx;font-weight:300;padding:5rpx 0;margin:5rpx 0}.icityer .container .types .provinces .areas._d66b9e6{display:inline-block;padding:10rpx 20rpx;margin:10rpx;border:1rpx dotted #999999;font-size:30rpx;font-weight:100;border-radius:30rpx}.icityer .nav_quick_tool._d66b9e6{position:fixed;z-index:1000;right:30rpx;bottom:60rpx;width:80rpx;padding:20rpx 0;border-radius:40rpx;background:#eee}.icityer .nav_quick_tool .nav_quick._d66b9e6{width:60rpx;margin:0 10rpx;font-size:32rpx}.icityer .nav_quick_tool .nav_quick .nav._d66b9e6{width:60rpx;height:60rpx;line-height:60rpx;text-align:center;display:inline-block}.icityer .nav_quick_tool .nav_quick .nav.active._d66b9e6{color:#fff;background:#555;border-radius:50%}.icityer .search-icon._d66b9e6{position:absolute;width:80rpx;height:80rpx;background:#eee;top:180rpx;left:60rpx;border-radius:40rpx;overflow:hidden;display:flex}.icityer .search-icon image._d66b9e6{width:70rpx;height:70rpx;margin:5rpx}.icityer .search-icon input._d66b9e6{flex:1;height:80rpx;line-height:80rpx;font-size:30rpx}.icityer .search-result._d66b9e6{width:100vw;height:80%;box-sizing:border-box;position:absolute;z-index:10001;bottom:0;left:0;overflow-x:hidden;overflow-y:scroll;background:#fff}.icityer .search-result .search-option._d66b9e6{width:90%;margin:10rpx auto;padding:0 10rpx;font-size:30rpx;box-sizing:border-box;height:80rpx;line-height:80rpx;border-bottom:1rpx solid #ddd;overflow:hidden;text-indent:30rpx}
--------------------------------------------------------------------------------
/dist/icityer/icon/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HellyW/wepy-com-icityer/378791d7566310fb3d1fbf0c57d40fe8f4be1348/dist/icityer/icon/search.png
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/app.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | 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; }; }();
8 |
9 | var _native = require('./native.js');
10 |
11 | var _native2 = _interopRequireDefault(_native);
12 |
13 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14 |
15 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16 |
17 | var RequestMQ = {
18 | map: {},
19 | mq: [],
20 | running: [],
21 | MAX_REQUEST: 5,
22 | push: function push(param) {
23 | param.t = +new Date();
24 | while (this.mq.indexOf(param.t) > -1 || this.running.indexOf(param.t) > -1) {
25 | param.t += Math.random() * 10 >> 0;
26 | }
27 | this.mq.push(param.t);
28 | this.map[param.t] = param;
29 | },
30 | next: function next() {
31 | var me = this;
32 |
33 | if (this.mq.length === 0) return;
34 |
35 | if (this.running.length < this.MAX_REQUEST - 1) {
36 | var newone = this.mq.shift();
37 | var obj = this.map[newone];
38 | var oldComplete = obj.complete;
39 | obj.complete = function () {
40 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
41 | args[_key] = arguments[_key];
42 | }
43 |
44 | me.running.splice(me.running.indexOf(obj.t), 1);
45 | delete me.map[obj.t];
46 | oldComplete && oldComplete.apply(obj, args);
47 | me.next();
48 | };
49 | this.running.push(obj.t);
50 | return wx.request(obj);
51 | }
52 | },
53 | request: function request(obj) {
54 |
55 | obj = obj || {};
56 | obj = typeof obj === 'string' ? { url: obj } : obj;
57 |
58 | this.push(obj);
59 |
60 | return this.next();
61 | }
62 | };
63 |
64 | var _class = function () {
65 | function _class() {
66 | _classCallCheck(this, _class);
67 |
68 | this.$addons = {};
69 | this.$interceptors = {};
70 | this.$pages = {};
71 | }
72 |
73 | _createClass(_class, [{
74 | key: '$init',
75 | value: function $init(wepy) {
76 | var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
77 |
78 | this.$initAPI(wepy, config.noPromiseAPI);
79 | this.$wxapp = getApp();
80 | }
81 | }, {
82 | key: 'use',
83 | value: function use(addon) {
84 | for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
85 | args[_key2 - 1] = arguments[_key2];
86 | }
87 |
88 | if (typeof addon === 'string' && this[addon]) {
89 | this.$addons[addon] = 1;
90 | this[addon](args);
91 | } else {
92 | this.$addons[addon.name] = new addon(args);
93 | }
94 | }
95 | }, {
96 | key: 'intercept',
97 | value: function intercept(api, provider) {
98 | this.$interceptors[api] = provider;
99 | }
100 | }, {
101 | key: 'promisify',
102 | value: function promisify() {}
103 | }, {
104 | key: 'requestfix',
105 | value: function requestfix() {}
106 | }, {
107 | key: '$initAPI',
108 | value: function $initAPI(wepy, noPromiseAPI) {
109 | var self = this;
110 | var noPromiseMethods = {
111 | stopRecord: true,
112 | getRecorderManager: true,
113 | pauseVoice: true,
114 | stopVoice: true,
115 | pauseBackgroundAudio: true,
116 | stopBackgroundAudio: true,
117 | getBackgroundAudioManager: true,
118 | createAudioContext: true,
119 | createInnerAudioContext: true,
120 | createVideoContext: true,
121 | createCameraContext: true,
122 |
123 | createMapContext: true,
124 |
125 | canIUse: true,
126 | startAccelerometer: true,
127 | stopAccelerometer: true,
128 | startCompass: true,
129 | stopCompass: true,
130 | onBLECharacteristicValueChange: true,
131 | onBLEConnectionStateChange: true,
132 |
133 | hideToast: true,
134 | hideLoading: true,
135 | showNavigationBarLoading: true,
136 | hideNavigationBarLoading: true,
137 | navigateBack: true,
138 | createAnimation: true,
139 | pageScrollTo: true,
140 | createSelectorQuery: true,
141 | createCanvasContext: true,
142 | createContext: true,
143 | drawCanvas: true,
144 | hideKeyboard: true,
145 | stopPullDownRefresh: true,
146 |
147 | arrayBufferToBase64: true,
148 | base64ToArrayBuffer: true
149 | };
150 | if (noPromiseAPI) {
151 | if (Array.isArray(noPromiseAPI)) {
152 | noPromiseAPI.forEach(function (v) {
153 | return noPromiseMethods[v] = true;
154 | });
155 | } else {
156 | for (var k in noPromiseAPI) {
157 | noPromiseMethods[k] = noPromiseAPI[k];
158 | }
159 | }
160 | }
161 | Object.keys(wx).forEach(function (key) {
162 | if (!noPromiseMethods[key] && key.substr(0, 2) !== 'on' && !/\w+Sync$/.test(key)) {
163 | Object.defineProperty(_native2.default, key, {
164 | get: function get() {
165 | return function (obj) {
166 | obj = obj || {};
167 | if (self.$interceptors[key] && self.$interceptors[key].config) {
168 | var rst = self.$interceptors[key].config.call(self, obj);
169 | if (rst === false) {
170 | if (self.$addons.promisify) {
171 | return Promise.reject('aborted by interceptor');
172 | } else {
173 | obj.fail && obj.fail('aborted by interceptor');
174 | return;
175 | }
176 | }
177 | obj = rst;
178 | }
179 | if (key === 'request') {
180 | obj = typeof obj === 'string' ? { url: obj } : obj;
181 | }
182 | if (typeof obj === 'string') {
183 | return wx[key](obj);
184 | }
185 | if (self.$addons.promisify) {
186 | var task = void 0;
187 | var p = new Promise(function (resolve, reject) {
188 | var bak = {};
189 | ['fail', 'success', 'complete'].forEach(function (k) {
190 | bak[k] = obj[k];
191 | obj[k] = function (res) {
192 | if (self.$interceptors[key] && self.$interceptors[key][k]) {
193 | res = self.$interceptors[key][k].call(self, res);
194 | }
195 | if (k === 'success') resolve(res);else if (k === 'fail') reject(res);
196 | };
197 | });
198 | if (self.$addons.requestfix && key === 'request') {
199 | RequestMQ.request(obj);
200 | } else {
201 | task = wx[key](obj);
202 | }
203 | });
204 | if (key === 'uploadFile' || key === 'downloadFile') {
205 | p.progress = function (cb) {
206 | task.onProgressUpdate(cb);
207 | return p;
208 | };
209 | p.abort = function (cb) {
210 | cb && cb();
211 | task.abort();
212 | return p;
213 | };
214 | }
215 | return p;
216 | } else {
217 | var bak = {};
218 | ['fail', 'success', 'complete'].forEach(function (k) {
219 | bak[k] = obj[k];
220 | obj[k] = function (res) {
221 | if (self.$interceptors[key] && self.$interceptors[key][k]) {
222 | res = self.$interceptors[key][k].call(self, res);
223 | }
224 | bak[k] && bak[k].call(self, res);
225 | };
226 | });
227 | if (self.$addons.requestfix && key === 'request') {
228 | RequestMQ.request(obj);
229 | } else {
230 | return wx[key](obj);
231 | }
232 | }
233 | };
234 | }
235 | });
236 | wepy[key] = _native2.default[key];
237 | } else {
238 | Object.defineProperty(_native2.default, key, {
239 | get: function get() {
240 | return function () {
241 | for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
242 | args[_key3] = arguments[_key3];
243 | }
244 |
245 | return wx[key].apply(wx, args);
246 | };
247 | }
248 | });
249 | wepy[key] = _native2.default[key];
250 | }
251 | });
252 | }
253 | }]);
254 |
255 | return _class;
256 | }();
257 |
258 | exports.default = _class;
259 | //# sourceMappingURL=app.js.map
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/base.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | var _event = require('./event.js');
8 |
9 | var _event2 = _interopRequireDefault(_event);
10 |
11 | var _util = require('./util.js');
12 |
13 | var _util2 = _interopRequireDefault(_util);
14 |
15 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16 |
17 | var PAGE_EVENT = ['onLoad', 'onReady', 'onShow', 'onHide', 'onUnload', 'onPullDownRefresh', 'onReachBottom', 'onShareAppMessage', 'onPageScroll', 'onTabItemTap'];
18 | var APP_EVENT = ['onLaunch', 'onShow', 'onHide', 'onError'];
19 |
20 | var $bindEvt = function $bindEvt(config, com, prefix) {
21 | com.$prefix = _util2.default.camelize(prefix || '');
22 | Object.getOwnPropertyNames(com.components || {}).forEach(function (name) {
23 | var cClass = com.components[name];
24 | var child = new cClass();
25 | child.$initMixins();
26 | child.$name = name;
27 | var comPrefix = prefix ? prefix + child.$name + '$' : '$' + child.$name + '$';
28 |
29 | com.$com[name] = child;
30 |
31 | $bindEvt(config, child, comPrefix);
32 | });
33 | Object.getOwnPropertyNames(com.constructor.prototype || []).forEach(function (prop) {
34 | if (prop !== 'constructor' && PAGE_EVENT.indexOf(prop) === -1) {
35 | config[prop] = function () {
36 | com.constructor.prototype[prop].apply(com, arguments);
37 | com.$apply();
38 | };
39 | }
40 | });
41 |
42 | var allMethods = Object.getOwnPropertyNames(com.methods || []);
43 |
44 | com.$mixins.forEach(function (mix) {
45 | allMethods = allMethods.concat(Object.getOwnPropertyNames(mix.methods || []));
46 | });
47 |
48 | allMethods.forEach(function (method, i) {
49 | config[com.$prefix + method] = function (e) {
50 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
51 | args[_key - 1] = arguments[_key];
52 | }
53 |
54 | var evt = new _event2.default('system', this, e.type);
55 | evt.$transfor(e);
56 | var wepyParams = [],
57 | paramsLength = 0,
58 | tmp = void 0,
59 | p = void 0,
60 | comIndex = void 0;
61 | if (e.currentTarget && e.currentTarget.dataset) {
62 | tmp = e.currentTarget.dataset;
63 | while (tmp['wpy' + method.toLowerCase() + (p = String.fromCharCode(65 + paramsLength++))] !== undefined) {
64 | wepyParams.push(tmp['wpy' + method.toLowerCase() + p]);
65 | }
66 | if (tmp.comIndex !== undefined) {
67 | comIndex = tmp.comIndex;
68 | }
69 | }
70 |
71 | if (comIndex !== undefined) {
72 | comIndex = ('' + comIndex).split('-');
73 | var level = comIndex.length,
74 | _tmp = level;
75 | while (level-- > 0) {
76 | _tmp = level;
77 | var tmpcom = com;
78 | while (_tmp-- > 0) {
79 | tmpcom = tmpcom.$parent;
80 | }
81 | tmpcom.$setIndex(comIndex.shift());
82 | }
83 | }
84 |
85 | args = args.concat(wepyParams);
86 | var rst = void 0,
87 | mixRst = void 0;
88 | var comfn = com.methods[method];
89 | if (comfn) {
90 | rst = comfn.apply(com, args.concat(evt));
91 | }
92 | com.$mixins.forEach(function (mix) {
93 | mix.methods[method] && (mixRst = mix.methods[method].apply(com, args.concat(evt)));
94 | });
95 | com.$apply();
96 | return comfn ? rst : mixRst;
97 | };
98 | });
99 | return config;
100 | };
101 |
102 | exports.default = {
103 | $createApp: function $createApp(appClass, appConfig) {
104 | var config = {};
105 | var app = new appClass();
106 |
107 | if (!this.$instance) {
108 | app.$init(this, appConfig);
109 | this.$instance = app;
110 | this.$appConfig = appConfig;
111 | }
112 |
113 | if (arguments.length === 2 && arguments[1] === true) {
114 | config.$app = app;
115 | }
116 |
117 | app.$wxapp = getApp();
118 |
119 | APP_EVENT = APP_EVENT.concat(appConfig.appEvents || []);
120 | PAGE_EVENT = PAGE_EVENT.concat(appConfig.pageEvents || []);
121 |
122 | APP_EVENT.forEach(function (v) {
123 | config[v] = function () {
124 | for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
125 | args[_key2] = arguments[_key2];
126 | }
127 |
128 | var rst = void 0;
129 | !app.$wxapp && (app.$wxapp = getApp());
130 | app[v] && (rst = app[v].apply(app, args));
131 | return rst;
132 | };
133 | });
134 | return config;
135 | },
136 | $createPage: function $createPage(pageClass, pagePath) {
137 | var self = this;
138 | var config = {},
139 | k = void 0;
140 | var page = new pageClass();
141 | if (typeof pagePath === 'string') {
142 | this.$instance.$pages['/' + pagePath] = page;
143 | }
144 | page.$initMixins();
145 |
146 | if (typeof pagePath === 'boolean' && pagePath || arguments.length === 3 && arguments[2] === true) config.$page = page;
147 |
148 | config.onLoad = function () {
149 | for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
150 | args[_key3] = arguments[_key3];
151 | }
152 |
153 | page.$name = pageClass.name || 'unnamed';
154 | page.$init(this, self.$instance, self.$instance);
155 |
156 | var prevPage = self.$instance.__prevPage__;
157 | var secParams = {};
158 | secParams.from = prevPage ? prevPage : undefined;
159 |
160 | if (prevPage && Object.keys(prevPage.$preloadData).length > 0) {
161 | secParams.preload = prevPage.$preloadData;
162 | prevPage.$preloadData = {};
163 | }
164 | if (page.$prefetchData && Object.keys(page.$prefetchData).length > 0) {
165 | secParams.prefetch = page.$prefetchData;
166 | page.$prefetchData = {};
167 | }
168 | args.push(secParams);
169 |
170 | [].concat(page.$mixins, page).forEach(function (mix) {
171 | mix['onLoad'] && mix['onLoad'].apply(page, args);
172 | });
173 |
174 | page.$apply();
175 | };
176 |
177 | config.onShow = function () {
178 | for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
179 | args[_key4] = arguments[_key4];
180 | }
181 |
182 | self.$instance.__prevPage__ = page;
183 |
184 | [].concat(page.$mixins, page).forEach(function (mix) {
185 | mix['onShow'] && mix['onShow'].apply(page, args);
186 | });
187 |
188 | var pages = getCurrentPages();
189 | var pageId = pages[pages.length - 1].__route__;
190 | var webViewId = pages[pages.length - 1].__wxWebviewId__;
191 |
192 | if (self.$instance.__wxWebviewId__ !== webViewId) {
193 |
194 | page.$wxpage = this;
195 |
196 | self.$instance.__route__ = pageId;
197 | self.$instance.__wxWebviewId__ = webViewId;
198 |
199 | [].concat(page.$mixins, page).forEach(function (mix) {
200 | mix['onRoute'] && mix['onRoute'].apply(page, args);
201 | });
202 | }
203 |
204 | page.$apply();
205 | };
206 |
207 | PAGE_EVENT.forEach(function (v) {
208 | if (v !== 'onLoad' && v !== 'onShow') {
209 | config[v] = function () {
210 | for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
211 | args[_key5] = arguments[_key5];
212 | }
213 |
214 | var rst = void 0;
215 |
216 | if (v === 'onShareAppMessage') {
217 | page[v] && (rst = page[v].apply(page, args));
218 | return rst;
219 | }
220 |
221 | [].concat(page.$mixins, page).forEach(function (mix) {
222 | mix[v] && mix[v].apply(page, args);
223 | });
224 |
225 | if (v !== 'onPageScroll') {
226 | page.$apply();
227 | }
228 |
229 | return rst;
230 | };
231 | }
232 | });
233 |
234 | if (!page.onShareAppMessage) {
235 | delete config.onShareAppMessage;
236 | }
237 |
238 | if ([].concat(page.$mixins, page).findIndex(function (mix) {
239 | return mix['onPageScroll'];
240 | }) === -1) {
241 | delete config.onPageScroll;
242 | }
243 |
244 | return $bindEvt(config, page, '');
245 | }
246 | };
247 | //# sourceMappingURL=base.js.map
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/component.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | 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; }; }();
8 |
9 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
10 |
11 | var _event = require('./event.js');
12 |
13 | var _event2 = _interopRequireDefault(_event);
14 |
15 | var _util = require('./util.js');
16 |
17 | var _util2 = _interopRequireDefault(_util);
18 |
19 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20 |
21 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22 |
23 | var Props = {
24 | check: function check(t, val) {
25 | switch (t) {
26 | case String:
27 | return typeof val === 'string';
28 | case Number:
29 | return typeof val === 'number';
30 | case Boolean:
31 | return typeof val === 'boolean';
32 | case Function:
33 | return typeof val === 'function';
34 | case Object:
35 | return (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object';
36 | case Array:
37 | return toString.call(val) === '[object Array]';
38 | default:
39 | return val instanceof t;
40 | }
41 | },
42 | build: function build(props) {
43 | var rst = {};
44 | if (typeof props === 'string') {
45 | rst[props] = {};
46 | } else if (toString.call(props) === '[object Array]') {
47 | props.forEach(function (p) {
48 | rst[p] = {};
49 | });
50 | } else {
51 | Object.keys(props).forEach(function (p) {
52 | if (typeof props[p] === 'function') {
53 | rst[p] = {
54 | type: [props[p]]
55 | };
56 | } else if (toString.call(props[p]) === '[object Array]') {
57 | rst[p] = {
58 | type: props[p]
59 | };
60 | } else rst[p] = props[p];
61 |
62 | if (rst[p].type && toString.call(rst[p].type) !== '[object Array]') rst[p].type = [rst[p].type];
63 | });
64 | }
65 | return rst;
66 | },
67 | valid: function valid(props, key, val) {
68 | var _this = this;
69 |
70 | var valid = false;
71 | if (props[key]) {
72 | if (!props[key].type) {
73 | valid = true;
74 | } else {
75 | return props[key].type.some(function (t) {
76 | return _this.check(t, val);
77 | });
78 | }
79 | }
80 | return valid;
81 | },
82 | getValue: function getValue(props, key, value) {
83 | var rst;
84 | if (value !== undefined && this.valid(props, key, value)) {
85 | rst = value;
86 | } else if (typeof props[key].default === 'function') {
87 | rst = props[key].default();
88 | } else rst = props[key].default;
89 | return props[key].coerce ? props[key].coerce(rst) : rst;
90 | }
91 | };
92 |
93 | var _class = function () {
94 | function _class() {
95 | _classCallCheck(this, _class);
96 |
97 | this.$com = {};
98 | this.$events = {};
99 | this.$mixins = [];
100 | this.$isComponent = true;
101 | this.$prefix = '';
102 | this.$mappingProps = {};
103 | this.data = {};
104 | this.methods = {};
105 | }
106 |
107 | _createClass(_class, [{
108 | key: '$init',
109 | value: function $init($wxpage, $root, $parent) {
110 | var _this2 = this;
111 |
112 | var self = this;
113 |
114 | this.$wxpage = $wxpage;
115 | if (this.$isComponent) {
116 | this.$root = $root || this.$root;
117 | this.$parent = $parent || this.$parent;
118 | this.$wxapp = this.$root.$parent.$wxapp;
119 | }
120 |
121 | if (this.props) {
122 | this.props = Props.build(this.props);
123 | }
124 |
125 | var k = void 0,
126 | defaultData = {};
127 |
128 | var props = this.props;
129 | var key = void 0,
130 | val = void 0,
131 | binded = void 0;
132 | var inRepeat = false,
133 | repeatKey = void 0;
134 |
135 | if (this.$initData === undefined) {
136 | this.$initData = _util2.default.$copy(this.data, true);
137 | } else {
138 | this.data = _util2.default.$copy(this.$initData, true);
139 | }
140 |
141 | if (this.$props) {
142 | for (key in this.$props) {
143 | for (binded in this.$props[key]) {
144 | if (/\.sync$/.test(binded)) {
145 | if (!this.$mappingProps[this.$props[key][binded]]) this.$mappingProps[this.$props[key][binded]] = {};
146 | this.$mappingProps[this.$props[key][binded]][key] = binded.substring(7, binded.length - 5);
147 | }
148 | }
149 | }
150 | }
151 |
152 | if (props) {
153 | for (key in props) {
154 | val = undefined;
155 | if ($parent && $parent.$props && $parent.$props[this.$name]) {
156 | val = $parent.$props[this.$name][key];
157 | binded = $parent.$props[this.$name]['v-bind:' + key + '.once'] || $parent.$props[this.$name]['v-bind:' + key + '.sync'];
158 | if (binded) {
159 | if ((typeof binded === 'undefined' ? 'undefined' : _typeof(binded)) === 'object') {
160 | (function () {
161 | props[key].repeat = binded.for;
162 | props[key].item = binded.item;
163 | props[key].index = binded.index;
164 | props[key].key = binded.key;
165 | props[key].value = binded.value;
166 |
167 | inRepeat = true;
168 |
169 | var bindfor = binded.for,
170 | binddata = $parent;
171 | bindfor.split('.').forEach(function (t) {
172 | binddata = binddata ? binddata[t] : {};
173 | });
174 | if (binddata && ((typeof binddata === 'undefined' ? 'undefined' : _typeof(binddata)) === 'object' || typeof binddata === 'string')) {
175 | repeatKey = Object.keys(binddata)[0];
176 | }
177 |
178 | if (!_this2.$mappingProps[key]) _this2.$mappingProps[key] = {};
179 | _this2.$mappingProps[key]['parent'] = {
180 | mapping: binded.for,
181 | from: key
182 | };
183 | })();
184 | } else {
185 | val = $parent[binded];
186 | if (props[key].twoWay) {
187 | if (!this.$mappingProps[key]) this.$mappingProps[key] = {};
188 | this.$mappingProps[key]['parent'] = binded;
189 | }
190 | }
191 | } else if ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object' && val.value !== undefined) {
192 | this.data[key] = val.value;
193 | }
194 | }
195 | if (!this.data[key] && !props[key].repeat) {
196 | val = Props.getValue(props, key, val);
197 | this.data[key] = val;
198 | }
199 | }
200 | }
201 |
202 | if (typeof this.data === 'function') {
203 | this.data = this.data.apply(this.data);
204 | }
205 |
206 | for (k in this.data) {
207 | defaultData['' + this.$prefix + k] = this.data[k];
208 | this[k] = this.data[k];
209 | }
210 |
211 | this.$data = _util2.default.$copy(this.data, true);
212 | if (inRepeat && repeatKey !== undefined) this.$setIndex(repeatKey);
213 |
214 | if (this.computed) {
215 | for (k in this.computed) {
216 | var fn = this.computed[k];
217 | defaultData['' + this.$prefix + k] = fn.call(this);
218 | this[k] = _util2.default.$copy(defaultData['' + this.$prefix + k], true);
219 | }
220 | }
221 | this.setData(defaultData);
222 |
223 | var coms = Object.getOwnPropertyNames(this.$com);
224 | if (coms.length) {
225 | coms.forEach(function (name) {
226 | var com = _this2.$com[name];
227 | com.$init(_this2.getWxPage(), $root, _this2);
228 |
229 | [].concat(com.$mixins, com).forEach(function (mix) {
230 | mix['onLoad'] && mix['onLoad'].call(com);
231 | });
232 | com.$apply();
233 | });
234 | }
235 | }
236 | }, {
237 | key: '$initMixins',
238 | value: function $initMixins() {
239 | var _this3 = this;
240 |
241 | if (this.mixins) {
242 | if (typeof this.mixins === 'function') {
243 | this.mixins = [this.mixins];
244 | }
245 | } else {
246 | this.mixins = [];
247 | }
248 | this.mixins.forEach(function (mix) {
249 | var inst = new mix();
250 | inst.$init(_this3);
251 | _this3.$mixins.push(inst);
252 | });
253 | }
254 | }, {
255 | key: 'onLoad',
256 | value: function onLoad() {}
257 | }, {
258 | key: 'setData',
259 | value: function setData(k, v) {
260 | if (typeof k === 'string') {
261 | if (v) {
262 | var tmp = {};
263 | tmp[k] = v;
264 | k = tmp;
265 | } else {
266 | var _tmp = {};
267 | _tmp[k] = this.data['' + k];
268 | k = _tmp;
269 | }
270 | return this.$wxpage.setData(k);
271 | }
272 | var t = null,
273 | reg = new RegExp('^' + this.$prefix.replace(/\$/g, '\\$'), 'ig');
274 |
275 | for (t in k) {
276 | var noPrefix = t.replace(reg, '');
277 | this.$data[noPrefix] = _util2.default.$copy(k[t], true);
278 |
279 | if (k[t] === undefined) {
280 | delete k[t];
281 | }
282 | }
283 |
284 | if (typeof v === 'function') {
285 | return this.$root.$wxpage.setData(k, v);
286 | }
287 | return this.$root.$wxpage.setData(k);
288 | }
289 | }, {
290 | key: 'getWxPage',
291 | value: function getWxPage() {
292 | return this.$wxpage;
293 | }
294 | }, {
295 | key: 'getCurrentPages',
296 | value: function (_getCurrentPages) {
297 | function getCurrentPages() {
298 | return _getCurrentPages.apply(this, arguments);
299 | }
300 |
301 | getCurrentPages.toString = function () {
302 | return _getCurrentPages.toString();
303 | };
304 |
305 | return getCurrentPages;
306 | }(function () {
307 | return getCurrentPages();
308 | })
309 | }, {
310 | key: '$setIndex',
311 | value: function $setIndex(index) {
312 | var _this4 = this;
313 |
314 | this.$index = index;
315 |
316 | var props = this.props,
317 | $parent = this.$parent;
318 | var key = void 0,
319 | val = void 0,
320 | binded = void 0;
321 | if (props) {
322 | for (key in props) {
323 | val = undefined;
324 | if ($parent && $parent.$props && $parent.$props[this.$name]) {
325 | val = $parent.$props[this.$name][key];
326 | binded = $parent.$props[this.$name]['v-bind:' + key + '.once'] || $parent.$props[this.$name]['v-bind:' + key + '.sync'];
327 | if (binded) {
328 | if ((typeof binded === 'undefined' ? 'undefined' : _typeof(binded)) === 'object') {
329 | (function () {
330 | var bindfor = binded.for,
331 | binddata = $parent;
332 | bindfor.split('.').forEach(function (t) {
333 | binddata = binddata ? binddata[t] : {};
334 | });
335 |
336 | index = Array.isArray(binddata) ? +index : index;
337 |
338 | if (props[key].value === props[key].item) {
339 | val = binddata[index];
340 | } else if (props[key].value === props[key].index) {
341 | val = index;
342 | } else if (props[key].value === props[key].key) {
343 | val = index;
344 | } else {
345 | val = $parent[props[key].value];
346 | }
347 | _this4.$index = index;
348 | _this4.data[key] = val;
349 | _this4[key] = val;
350 | _this4.$data[key] = _util2.default.$copy(_this4[key], true);
351 | })();
352 | }
353 | }
354 | }
355 | }
356 |
357 | for (key in this.$com) {
358 | this.$com[key].$index = undefined;
359 | }
360 | }
361 | }
362 | }, {
363 | key: '$getComponent',
364 | value: function $getComponent(com) {
365 | var _this5 = this;
366 |
367 | if (typeof com === 'string') {
368 | if (com.indexOf('/') === -1) {
369 | return this.$com[com];
370 | } else if (com === '/') {
371 | return this.$parent;
372 | } else {
373 | var path = com.split('/');
374 | path.forEach(function (s, i) {
375 | if (i === 0) {
376 | if (s === '') {
377 | com = _this5.$root;
378 | } else if (s === '.') {
379 | com = _this5;
380 | } else if (s === '..') {
381 | com = _this5.$parent;
382 | } else {
383 | com = _this5.$getComponent(s);
384 | }
385 | } else if (s) {
386 | com = com.$com[s];
387 | }
388 | });
389 | }
390 | }
391 | return (typeof com === 'undefined' ? 'undefined' : _typeof(com)) !== 'object' ? null : com;
392 | }
393 | }, {
394 | key: '$invoke',
395 | value: function $invoke(com, method) {
396 | com = this.$getComponent(com);
397 |
398 | if (!com) {
399 | throw new Error('Invalid path: ' + com);
400 | }
401 |
402 | var fn = com.methods ? com.methods[method] : '';
403 |
404 | for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
405 | args[_key - 2] = arguments[_key];
406 | }
407 |
408 | if (typeof fn === 'function') {
409 | var $evt = new _event2.default('', this, 'invoke');
410 | var rst = fn.apply(com, args.concat($evt));
411 | com.$apply();
412 | return rst;
413 | } else {
414 | fn = com[method];
415 | }
416 |
417 | if (typeof fn === 'function') {
418 | return fn.apply(com, args);
419 | } else {
420 | throw new Error('Invalid method: ' + method);
421 | }
422 | }
423 | }, {
424 | key: '$broadcast',
425 | value: function $broadcast(evtName) {
426 | for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
427 | args[_key2 - 1] = arguments[_key2];
428 | }
429 |
430 | var com = this;
431 | var $evt = typeof evtName === 'string' ? new _event2.default(evtName, this, 'broadcast') : $evt;
432 | var queue = [com];
433 |
434 | while (queue.length && $evt.active) {
435 | var current = queue.shift();
436 |
437 | var _loop = function _loop(_c) {
438 | _c = current.$com[_c];
439 | queue.push(_c);
440 | var fn = getEventsFn(_c, evtName);
441 | if (fn) {
442 | _c.$apply(function () {
443 | fn.apply(_c, args.concat($evt));
444 | });
445 | }
446 | if (!$evt.active) return 'break';
447 | c = _c;
448 | };
449 |
450 | for (var c in current.$com) {
451 | var _ret3 = _loop(c);
452 |
453 | if (_ret3 === 'break') break;
454 | }
455 | }
456 | }
457 | }, {
458 | key: '$emit',
459 | value: function $emit(evtName) {
460 | var _this6 = this;
461 |
462 | for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
463 | args[_key3 - 1] = arguments[_key3];
464 | }
465 |
466 | var com = this;
467 | var source = this;
468 | var $evt = new _event2.default(evtName, source, 'emit');
469 |
470 | args = args.concat($evt);
471 |
472 | if (this.$parent && this.$parent.$events && this.$parent.$events[this.$name]) {
473 | var method = this.$parent.$events[this.$name]['v-on:' + evtName];
474 | if (method && this.$parent.methods) {
475 | var _fn = this.$parent.methods[method];
476 | if (typeof _fn === 'function') {
477 | this.$parent.$apply(function () {
478 | _fn.apply(_this6.$parent, args);
479 | });
480 | return;
481 | } else {
482 | throw new Error('Invalid method from emit, component is ' + this.$parent.$name + ', method is ' + method + '. Make sure you defined it already.\n');
483 | }
484 | }
485 | }
486 |
487 | var _loop2 = function _loop2() {
488 | var comContext = com;
489 | var fn = getEventsFn(comContext, evtName);
490 | if (fn) {
491 | if (typeof fn === 'function') {
492 | comContext.$apply(function () {
493 | fn.apply(comContext, args);
494 | });
495 | } else if (Array.isArray(fn)) {
496 | fn.forEach(function (f) {
497 | f.apply(comContext, args);
498 | });
499 | comContext.$apply();
500 | }
501 | }
502 | com = comContext.$parent;
503 | };
504 |
505 | while (com && com.$isComponent !== undefined && $evt.active) {
506 | _loop2();
507 | }
508 | }
509 | }, {
510 | key: '$on',
511 | value: function $on(evtName, fn) {
512 | var _this7 = this;
513 |
514 | if (typeof evtName === 'string') {
515 | (this.$events[evtName] || (this.$events[evtName] = [])).push(fn);
516 | } else if (Array.isArray(evtName)) {
517 | evtName.forEach(function (k) {
518 | _this7.$on(k, fn);
519 | });
520 | } else if ((typeof evtName === 'undefined' ? 'undefined' : _typeof(evtName)) === 'object') {
521 | for (var k in evtName) {
522 | this.$on(k, evtName[k]);
523 | }
524 | }
525 | return this;
526 | }
527 | }, {
528 | key: '$once',
529 | value: function $once(evtName, fn) {
530 | var self = this;
531 | var oncefn = function oncefn() {
532 | self.$off(evtName, oncefn);
533 | fn.apply(self, arguments);
534 | };
535 | oncefn.fn = fn;
536 | this.$on(evtName, oncefn);
537 | }
538 | }, {
539 | key: '$off',
540 | value: function $off(evtName, fn) {
541 | var _this8 = this;
542 |
543 | if (evtName === undefined) {
544 | this.$events = {};
545 | } else if (typeof evtName === 'string') {
546 | if (fn) {
547 | var fns = this.$events[evtName];
548 | var i = fns.length;
549 | while (i--) {
550 | if (fn === fns[i] || fn === fns[i].fn) {
551 | fns.splice(i, 1);
552 | break;
553 | }
554 | }
555 | } else {
556 | this.$events[evtName] = [];
557 | }
558 | } else if (Array.isArray(evtName)) {
559 | evtName.forEach(function (k) {
560 | _this8.$off(k, fn);
561 | });
562 | }
563 | return this;
564 | }
565 | }, {
566 | key: '$apply',
567 | value: function $apply(fn) {
568 | if (typeof fn === 'function') {
569 | fn.call(this);
570 | this.$apply();
571 | } else {
572 | if (this.$$phase) {
573 | this.$$phase = '$apply';
574 | } else {
575 | this.$digest();
576 | }
577 | }
578 | }
579 | }, {
580 | key: '$digest',
581 | value: function $digest() {
582 | var _this9 = this;
583 |
584 | var k = void 0;
585 | var originData = this.$data;
586 | this.$$phase = '$digest';
587 | this.$$dc = 0;
588 | while (this.$$phase) {
589 | this.$$dc++;
590 | if (this.$$dc >= 3) {
591 | throw new Error('Can not call $apply in $apply process');
592 | }
593 | var readyToSet = {};
594 | if (this.computed) {
595 | for (k in this.computed) {
596 | var _fn2 = this.computed[k],
597 | val = _fn2.call(this);
598 | if (!_util2.default.$isEqual(this[k], val)) {
599 | readyToSet[this.$prefix + k] = val;
600 | this[k] = _util2.default.$copy(val, true);
601 | }
602 | }
603 | }
604 | for (k in originData) {
605 | if (!_util2.default.$isEqual(this[k], originData[k])) {
606 | if (this.watch) {
607 | if (this.watch[k]) {
608 | if (typeof this.watch[k] === 'function') {
609 | this.watch[k].call(this, this[k], originData[k]);
610 | } else if (typeof this.watch[k] === 'string' && typeof this.methods[k] === 'function') {
611 | this.methods[k].call(this, this[k], originData[k]);
612 | }
613 | }
614 | }
615 |
616 | readyToSet[this.$prefix + k] = this[k];
617 | this.data[k] = this[k];
618 | originData[k] = _util2.default.$copy(this[k], true);
619 | if (this.$repeat && this.$repeat[k]) {
620 | var $repeat = this.$repeat[k];
621 | this.$com[$repeat.com].data[$repeat.props] = this[k];
622 | this.$com[$repeat.com].$setIndex(0);
623 | this.$com[$repeat.com].$apply();
624 | }
625 | if (this.$mappingProps[k]) {
626 | Object.keys(this.$mappingProps[k]).forEach(function (changed) {
627 | var mapping = _this9.$mappingProps[k][changed];
628 | if ((typeof mapping === 'undefined' ? 'undefined' : _typeof(mapping)) === 'object') {
629 | _this9.$parent.$apply();
630 | } else if (changed === 'parent' && !_util2.default.$isEqual(_this9.$parent.$data[mapping], _this9[k])) {
631 | _this9.$parent[mapping] = _this9[k];
632 | _this9.$parent.data[mapping] = _this9[k];
633 | _this9.$parent.$apply();
634 | } else if (changed !== 'parent' && !_util2.default.$isEqual(_this9.$com[changed].$data[mapping], _this9[k])) {
635 | _this9.$com[changed][mapping] = _this9[k];
636 | _this9.$com[changed].data[mapping] = _this9[k];
637 | _this9.$com[changed].$apply();
638 | }
639 | });
640 | }
641 | }
642 | }
643 | if (Object.keys(readyToSet).length) {
644 | this.setData(readyToSet, function () {
645 | if (_this9.$$nextTick) {
646 | var $$nextTick = _this9.$$nextTick;
647 | _this9.$$nextTick = null;
648 | if ($$nextTick.promise) {
649 | $$nextTick();
650 | } else {
651 | $$nextTick.call(_this9);
652 | }
653 | }
654 | });
655 | } else {
656 | if (this.$$nextTick) {
657 | var $$nextTick = this.$$nextTick;
658 | this.$$nextTick = null;
659 | if ($$nextTick.promise) {
660 | $$nextTick();
661 | } else {
662 | $$nextTick.call(this);
663 | }
664 | }
665 | }
666 | this.$$phase = this.$$phase === '$apply' ? '$digest' : false;
667 | }
668 | }
669 | }, {
670 | key: '$nextTick',
671 | value: function $nextTick(fn) {
672 | var _this10 = this;
673 |
674 | if (typeof fn === 'undefined') {
675 | return new Promise(function (resolve, reject) {
676 | _this10.$$nextTick = function () {
677 | resolve();
678 | };
679 | _this10.$$nextTick.promise = true;
680 | });
681 | }
682 | this.$$nextTick = fn;
683 | }
684 | }]);
685 |
686 | return _class;
687 | }();
688 |
689 | exports.default = _class;
690 |
691 |
692 | function getEventsFn(comContext, evtName) {
693 | var fn = comContext.events ? comContext.events[evtName] : comContext.$events[evtName] ? comContext.$events[evtName] : undefined;
694 | var typeFn = typeof fn === 'undefined' ? 'undefined' : _typeof(fn);
695 | var fnFn = void 0;
696 | if (typeFn === 'string') {
697 | var method = comContext.methods && comContext.methods[fn];
698 | if (typeof method === 'function') {
699 | fnFn = method;
700 | }
701 | } else if (typeFn === 'function' || Array.isArray(fn)) {
702 | fnFn = fn;
703 | }
704 | return fnFn;
705 | }
706 | //# sourceMappingURL=component.js.map
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/event.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | 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; }; }();
8 |
9 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10 |
11 | var _class = function () {
12 | function _class(name, source, type) {
13 | _classCallCheck(this, _class);
14 |
15 | this.active = true;
16 |
17 |
18 | this.name = name;
19 | this.source = source;
20 | this.type = type;
21 | }
22 |
23 | _createClass(_class, [{
24 | key: "$destroy",
25 | value: function $destroy() {
26 | this.active = false;
27 | }
28 | }, {
29 | key: "$transfor",
30 | value: function $transfor(wxevent) {
31 | var k = 0;
32 | for (k in wxevent) {
33 | this[k] = wxevent[k];
34 | }
35 | }
36 | }]);
37 |
38 | return _class;
39 | }();
40 |
41 | exports.default = _class;
42 | //# sourceMappingURL=event.js.map
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/mixin.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | 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; }; }();
8 |
9 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10 |
11 | var _class = function () {
12 | function _class() {
13 | _classCallCheck(this, _class);
14 |
15 | this.data = {};
16 | this.components = {};
17 | this.methods = {};
18 | this.events = {};
19 | }
20 |
21 | _createClass(_class, [{
22 | key: '$init',
23 | value: function $init(parent) {
24 | var _this = this;
25 |
26 | var k = void 0;
27 |
28 | Object.getOwnPropertyNames(this).concat(Object.getOwnPropertyNames(Object.getPrototypeOf(this))).forEach(function (k) {
29 | if (k[0] + k[1] !== 'on' && k !== 'constructor') {
30 | if (!parent[k]) parent[k] = _this[k];
31 | }
32 | });
33 |
34 | ['data', 'events', 'components'].forEach(function (item) {
35 | Object.getOwnPropertyNames(_this[item]).forEach(function (k) {
36 | if (k !== 'init' && !parent[item][k]) parent[item][k] = _this[item][k];
37 | });
38 | });
39 | }
40 | }]);
41 |
42 | return _class;
43 | }();
44 |
45 | exports.default = _class;
46 | //# sourceMappingURL=mixin.js.map
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/native.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = {};
7 | //# sourceMappingURL=native.js.map
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/page.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
8 |
9 | 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; }; }();
10 |
11 | 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); } };
12 |
13 | var _native = require('./native.js');
14 |
15 | var _native2 = _interopRequireDefault(_native);
16 |
17 | var _component2 = require('./component.js');
18 |
19 | var _component3 = _interopRequireDefault(_component2);
20 |
21 | var _util = require('./util.js');
22 |
23 | var _util2 = _interopRequireDefault(_util);
24 |
25 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26 |
27 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
28 |
29 | 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; }
30 |
31 | 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; }
32 |
33 | var _class = function (_component) {
34 | _inherits(_class, _component);
35 |
36 | function _class() {
37 | var _ref;
38 |
39 | var _temp, _this, _ret;
40 |
41 | _classCallCheck(this, _class);
42 |
43 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
44 | args[_key] = arguments[_key];
45 | }
46 |
47 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = _class.__proto__ || Object.getPrototypeOf(_class)).call.apply(_ref, [this].concat(args))), _this), _this.$isComponent = false, _this.$preloadData = {}, _this.$prefetchData = {}, _temp), _possibleConstructorReturn(_this, _ret);
48 | }
49 |
50 | _createClass(_class, [{
51 | key: '$init',
52 | value: function $init(wxpage, $parent) {
53 |
54 | this.$parent = $parent;
55 | this.$root = this;
56 | if (!$parent.$wxapp) {
57 | $parent.$wxapp = getApp();
58 | }
59 | this.$wxapp = $parent.$wxapp;
60 | _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), '$init', this).call(this, wxpage, this);
61 | }
62 | }, {
63 | key: 'onLoad',
64 | value: function onLoad() {
65 | _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'onLoad', this).call(this);
66 | }
67 | }, {
68 | key: '$preload',
69 | value: function $preload(key, data) {
70 | if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object') {
71 | var k = void 0;
72 | for (k in key) {
73 | this.$preload(k, key[k]);
74 | }
75 | } else {
76 | this.$preloadData[key] = data;
77 | }
78 | }
79 | }, {
80 | key: '$route',
81 | value: function $route(type, url) {
82 | var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
83 |
84 | if (typeof url === 'string') {
85 | var s = url + '?';
86 | if (params) {
87 | var k = void 0;
88 | for (k in params) {
89 | s += k + '=' + params[k] + '&';
90 | }
91 | }
92 | s = s.substring(0, s.length - 1);
93 | url = { url: s };
94 | } else {
95 | params = _util2.default.$getParams(url.url);
96 | }
97 |
98 | if (!this.$parent.__route__) {
99 | this.$parent.__route__ = getCurrentPages()[0].__route__;
100 | this.$parent.__wxWebviewId__ = getCurrentPages()[0].__wxWebviewId__;
101 | }
102 | var absoluteRoute = this.$parent.__route__[0] !== '/' ? '/' + this.$parent.__route__ : this.$parent.__route__;
103 | var realPath = _util2.default.$resolvePath(absoluteRoute, url.url.split('?')[0]);
104 | var goTo = this.$parent.$pages[realPath];
105 | if (goTo && goTo.onPrefetch) {
106 | var prevPage = this.$parent.__prevPage__;
107 | var preloadData = {};
108 | if (prevPage && Object.keys(prevPage.$preloadData).length > 0) {
109 | preloadData = prevPage.$preloadData;
110 | }
111 | goTo.$prefetchData = goTo.onPrefetch(params, { from: this, preload: preloadData });
112 | }
113 | return _native2.default[type](url);
114 | }
115 | }, {
116 | key: '$redirect',
117 | value: function $redirect(url, params) {
118 | return this.$route('redirectTo', url, params);
119 | }
120 | }, {
121 | key: '$navigate',
122 | value: function $navigate(url, params) {
123 | return this.$route('navigateTo', url, params);
124 | }
125 | }, {
126 | key: '$switch',
127 | value: function $switch(url) {
128 | if (typeof url === 'string') url = { url: url };
129 |
130 | return _native2.default.switchTab(url);
131 | }
132 | }, {
133 | key: '$back',
134 | value: function $back(delta) {
135 | var p = delta || {};
136 | if (typeof p === 'number') p = { delta: p };
137 |
138 | if (!p.delta) p.delta = 1;
139 |
140 | return _native2.default.navigateBack(p);
141 | }
142 | }]);
143 |
144 | return _class;
145 | }(_component3.default);
146 |
147 | exports.default = _class;
148 | //# sourceMappingURL=page.js.map
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/util.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
8 |
9 | exports.default = {
10 | $isEmpty: function $isEmpty(obj) {
11 | return Object.keys(obj).length === 0;
12 | },
13 | $isEqual: function $isEqual(a, b, aStack, bStack) {
14 | if (a === b) return a !== 0 || 1 / a === 1 / b;
15 |
16 | if (a !== a) return b !== b;
17 |
18 | if (!a || !b) return a === b;
19 |
20 | var type = typeof a === 'undefined' ? 'undefined' : _typeof(a);
21 | if (type !== 'function' && type !== 'object' && (typeof b === 'undefined' ? 'undefined' : _typeof(b)) !== 'object') return false;
22 | return this.$isDeepEqual(a, b, aStack, bStack);
23 | },
24 | $isDeepEqual: function $isDeepEqual(a, b, aStack, bStack) {
25 | var self = this;
26 |
27 | var className = toString.call(a);
28 | if (className !== toString.call(b)) return false;
29 | switch (className) {
30 | case '[object RegExp]':
31 | case '[object String]':
32 | return '' + a === '' + b;
33 | case '[object Number]':
34 | if (+a !== +a) return +b !== +b;
35 |
36 | return +a === 0 ? 1 / +a === 1 / b : +a === +b;
37 | case '[object Date]':
38 | case '[object Boolean]':
39 | return +a === +b;
40 | case '[object Symbol]':
41 | var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
42 | return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
43 | }
44 |
45 | var areArrays = className === '[object Array]';
46 | if (!areArrays) {
47 | if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== 'object' || (typeof b === 'undefined' ? 'undefined' : _typeof(b)) !== 'object') return a === b;
48 |
49 | var aCtor = a.constructor,
50 | bCtor = b.constructor;
51 | if (aCtor !== bCtor && !(typeof aCtor === 'function' && aCtor instanceof aCtor && typeof bCtor === 'function' && bCtor instanceof bCtor) && 'constructor' in a && 'constructor' in b) {
52 | return false;
53 | }
54 | }
55 |
56 | aStack = aStack || [];
57 | bStack = bStack || [];
58 | var length = aStack.length;
59 | while (length--) {
60 | if (aStack[length] === a) return bStack[length] === b;
61 | }
62 |
63 | aStack.push(a);
64 | bStack.push(b);
65 |
66 | if (areArrays) {
67 | length = a.length;
68 | if (length !== b.length) return false;
69 |
70 | while (length--) {
71 | if (!self.$isEqual(a[length], b[length], aStack, bStack)) return false;
72 | }
73 | } else {
74 | var keys = Object.keys(a),
75 | key;
76 | length = keys.length;
77 |
78 | if (Object.keys(b).length !== length) return false;
79 | while (length--) {
80 | key = keys[length];
81 | if (!(self.$has(b, key) && self.$isEqual(a[key], b[key], aStack, bStack))) return false;
82 | }
83 | }
84 |
85 | aStack.pop();
86 | bStack.pop();
87 | return true;
88 | },
89 | $has: function $has(obj, path) {
90 | if (toString.call(path) !== '[object Array]') {
91 | return obj && hasOwnProperty.call(obj, path);
92 | }
93 | var length = path.length;
94 | for (var i = 0; i < length; i++) {
95 | var key = path[i];
96 | if (!obj || !hasOwnProperty.call(obj, key)) {
97 | return false;
98 | }
99 | obj = obj[key];
100 | }
101 | return !!length;
102 | },
103 | $extend: function $extend() {
104 | var options,
105 | name,
106 | src,
107 | copy,
108 | copyIsArray,
109 | clone,
110 | target = arguments[0] || {},
111 | i = 1,
112 | length = arguments.length,
113 | deep = false;
114 | var self = this;
115 |
116 | if (typeof target === 'boolean') {
117 | deep = target;
118 |
119 | target = arguments[i] || {};
120 | i++;
121 | }
122 |
123 | if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) !== 'object' && !(typeof target === 'function')) {
124 | target = {};
125 | }
126 |
127 | if (i === length) {
128 | target = this;
129 | i--;
130 | }
131 |
132 | for (; i < length; i++) {
133 | if (options = arguments[i]) {
134 | for (name in options) {
135 | src = target[name];
136 | copy = options[name];
137 |
138 | if (target === copy) {
139 | continue;
140 | }
141 |
142 | if (deep && copy && (self.$isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
143 |
144 | if (copyIsArray) {
145 | copyIsArray = false;
146 | clone = src && Array.isArray(src) ? src : [];
147 | } else {
148 | clone = src && self.$isPlainObject(src) ? src : {};
149 | }
150 |
151 | target[name] = self.$extend(deep, clone, copy);
152 | } else {
153 | target[name] = copy;
154 | }
155 | }
156 | }
157 | }
158 |
159 | return target;
160 | },
161 | $copy: function $copy(obj) {
162 | var deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
163 |
164 | if (Array.isArray(obj)) {
165 | return this.$extend(deep, [], obj);
166 | } else if ('' + obj === 'null') {
167 | return obj;
168 | } else if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object') {
169 | return this.$extend(deep, {}, obj);
170 | } else return obj;
171 | },
172 | $isPlainObject: function $isPlainObject(obj) {
173 | var proto, Ctor;
174 |
175 | if (!obj || Object.prototype.toString.call(obj) !== '[object Object]') {
176 | return false;
177 | }
178 |
179 | proto = Object.getPrototypeOf(obj);
180 |
181 | if (!proto) {
182 | return true;
183 | }
184 |
185 | Ctor = Object.prototype.hasOwnProperty.call(proto, 'constructor') && proto.constructor;
186 | return typeof Ctor === 'function' && Object.prototype.hasOwnProperty.toString.call(Ctor) === Object.prototype.hasOwnProperty.toString.call(Object);
187 | },
188 | $resolvePath: function $resolvePath(route, url) {
189 | if (!url) return route;
190 | if (url[0] === '/') {
191 | url = url.substr(1);
192 | return this.$resolvePath('', url);
193 | }
194 | if (url[0] !== '.') {
195 | return this.$resolvePath(route, './' + url);
196 | }
197 | var current = route.split('/');
198 | if (url[0] === '.' && url[1] === '/') {
199 | url = url.substr(2);
200 | if (url[0] !== '.') {
201 | if (current.length) current[current.length - 1] = url;else current = [url];
202 | return current.length === 1 ? '/' + current[0] : current.join('/');
203 | }
204 | return this.$resolvePath(current.join('/'), url);
205 | }
206 | if (url[0] === '.' && url[1] === '.' && url[2] === '/') {
207 | url = url.replace(/^\.*/ig, '');
208 | current.pop();
209 | return this.$resolvePath(current.join('/'), '.' + url);
210 | }
211 | if (url[0] === '.') {
212 | return this.$resolvePath(route, url.substr(1));
213 | }
214 | },
215 | $getParams: function $getParams(url) {
216 | var rst = {};
217 | var quoteIndex = url.indexOf('?');
218 |
219 | if (quoteIndex !== -1) {
220 | var str = url.substr(quoteIndex + 1);
221 | var tmp = void 0;
222 | str.split('&').forEach(function (v) {
223 | tmp = v.split('=');
224 | rst[tmp[0]] = decodeURIComponent(tmp[1]);
225 | });
226 | }
227 | return rst;
228 | },
229 | hyphenate: function hyphenate(str) {
230 | return str.replace(/([^-])([A-Z])/g, '$1-$2').replace(/([^-])([A-Z])/g, '$1-$2').toLowerCase();
231 | },
232 | camelize: function camelize(str) {
233 | return str.replace(/-(\w)/g, function (_, c) {
234 | return c ? c.toUpperCase() : '';
235 | });
236 | }
237 | };
238 | //# sourceMappingURL=util.js.map
--------------------------------------------------------------------------------
/dist/npm/wepy/lib/wepy.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 | var _app = require('./app.js');
8 |
9 | var _app2 = _interopRequireDefault(_app);
10 |
11 | var _page = require('./page.js');
12 |
13 | var _page2 = _interopRequireDefault(_page);
14 |
15 | var _component = require('./component.js');
16 |
17 | var _component2 = _interopRequireDefault(_component);
18 |
19 | var _event = require('./event.js');
20 |
21 | var _event2 = _interopRequireDefault(_event);
22 |
23 | var _base = require('./base.js');
24 |
25 | var _base2 = _interopRequireDefault(_base);
26 |
27 | var _util = require('./util.js');
28 |
29 | var _util2 = _interopRequireDefault(_util);
30 |
31 | var _mixin = require('./mixin.js');
32 |
33 | var _mixin2 = _interopRequireDefault(_mixin);
34 |
35 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
36 |
37 | exports.default = {
38 | event: _event2.default,
39 | app: _app2.default,
40 | component: _component2.default,
41 | page: _page2.default,
42 | mixin: _mixin2.default,
43 |
44 | $createApp: _base2.default.$createApp,
45 | $createPage: _base2.default.$createPage,
46 |
47 | $isEmpty: _util2.default.$isEmpty,
48 | $isEqual: _util2.default.$isEqual,
49 | $isDeepEqual: _util2.default.$isDeepEqual,
50 | $has: _util2.default.$has,
51 | $extend: _util2.default.$extend,
52 | $isPlainObject: _util2.default.$isPlainObject,
53 | $copy: _util2.default.$copy
54 | };
55 | //# sourceMappingURL=wepy.js.map
--------------------------------------------------------------------------------
/dist/pages/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 |
7 |
8 | 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; }; }();
9 |
10 | var _wepy = require('./../npm/wepy/lib/wepy.js');
11 |
12 | var _wepy2 = _interopRequireDefault(_wepy);
13 |
14 | var _icityer = require('./../icityer/icityer.js');
15 |
16 | var _icityer2 = _interopRequireDefault(_icityer);
17 |
18 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19 |
20 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21 |
22 | 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; }
23 |
24 | 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; }
25 |
26 | var Index = function (_wepy$page) {
27 | _inherits(Index, _wepy$page);
28 |
29 | function Index() {
30 | var _ref;
31 |
32 | var _temp, _this, _ret;
33 |
34 | _classCallCheck(this, Index);
35 |
36 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
37 | args[_key] = arguments[_key];
38 | }
39 |
40 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Index.__proto__ || Object.getPrototypeOf(Index)).call.apply(_ref, [this].concat(args))), _this), _this.config = {}, _this.data = {}, _this.$repeat = {}, _this.$props = { "icityer": { "xmlns:v-on": "" } }, _this.$events = { "icityer": { "v-on:choose": "chooseCity" } }, _this.components = {
41 | icityer: _icityer2.default
42 | }, _this.methods = {
43 | chooseCity: function chooseCity(addr) {
44 | _wepy2.default.showModal({
45 | title: '您选择的城市是',
46 | content: addr.province + '-' + addr.city + '-' + addr.area,
47 | showCancel: false
48 | });
49 | }
50 | }, _temp), _possibleConstructorReturn(_this, _ret);
51 | }
52 |
53 | _createClass(Index, [{
54 | key: 'onLoad',
55 | value: function onLoad() {}
56 | }]);
57 |
58 | return Index;
59 | }(_wepy2.default.page);
60 |
61 |
62 | Page(require('./../npm/wepy/lib/wepy.js').default.$createPage(Index , 'pages/index'));
63 |
64 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbIkluZGV4IiwiY29uZmlnIiwiZGF0YSIsIiRyZXBlYXQiLCIkcHJvcHMiLCIkZXZlbnRzIiwiY29tcG9uZW50cyIsImljaXR5ZXIiLCJtZXRob2RzIiwiY2hvb3NlQ2l0eSIsImFkZHIiLCJzaG93TW9kYWwiLCJ0aXRsZSIsImNvbnRlbnQiLCJwcm92aW5jZSIsImNpdHkiLCJhcmVhIiwic2hvd0NhbmNlbCIsInBhZ2UiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUNFOzs7O0FBQ0E7Ozs7Ozs7Ozs7OztJQUNxQkEsSzs7Ozs7Ozs7Ozs7Ozs7b0xBQ25CQyxNLEdBQVMsRSxRQUVUQyxJLEdBQU8sRSxRQUVSQyxPLEdBQVUsRSxRQUNiQyxNLEdBQVMsRUFBQyxXQUFVLEVBQUMsY0FBYSxFQUFkLEVBQVgsRSxRQUNUQyxPLEdBQVUsRUFBQyxXQUFVLEVBQUMsZUFBYyxZQUFmLEVBQVgsRSxRQUNUQyxVLEdBQWE7QUFDUkM7QUFEUSxLLFFBR1ZDLE8sR0FBVTtBQUNSQyxrQkFB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XG4gICAgfVxuICAgIG9uTG9hZCgpIHtcbiAgICB9XG4gIH1cbiJdfQ==
--------------------------------------------------------------------------------
/dist/pages/index.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/dist/pages/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{provinces.name}}
9 |
10 | {{citys.name}}
11 | {{areas}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{nav}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | {{item.area}}-{{item.city}}-{{item.province}}
31 |
32 |
33 |
--------------------------------------------------------------------------------
/dist/pages/index.wxss:
--------------------------------------------------------------------------------
1 | @import "./../icityer/icityer.wxss";
2 | button{display:inline-block;font-size:30rpx;padding:10rpx 20rpx;margin:10rpx}
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wepy-icityer",
3 | "version": "0.0.1",
4 | "description": "component for Modal and Toast",
5 | "main": "dist/app.js",
6 | "scripts": {
7 | "dev": "wepy build --watch",
8 | "build": "wepy build",
9 | "test": "echo \"Error: no test specified\" && exit 1"
10 | },
11 | "author": "wahao-mac ",
12 | "license": "MIT",
13 | "dependencies": {
14 | "wepy": "^1.7.1"
15 | },
16 | "devDependencies": {
17 | "babel-eslint": "^7.2.1",
18 | "babel-plugin-transform-class-properties": "^6.24.1",
19 | "babel-plugin-transform-decorators-legacy": "^1.3.4",
20 | "babel-plugin-transform-export-extensions": "^6.22.0",
21 | "babel-plugin-transform-object-rest-spread": "^6.26.0",
22 | "babel-preset-env": "^1.6.1",
23 | "cross-env": "^5.1.3",
24 | "eslint": "^3.18.0",
25 | "eslint-config-standard": "^7.1.0",
26 | "eslint-friendly-formatter": "^2.0.7",
27 | "eslint-plugin-html": "^2.0.1",
28 | "eslint-plugin-promise": "^3.5.0",
29 | "eslint-plugin-standard": "^2.0.1",
30 | "wepy-compiler-babel": "^1.5.1",
31 | "wepy-compiler-less": "^1.3.10",
32 | "wepy-eslint": "^1.5.4",
33 | "wepy-plugin-uglifyjs": "^1.3.7"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "setting": {
4 | "urlCheck": true,
5 | "es6": false,
6 | "postcss": false,
7 | "minified": false,
8 | "newFeature": true
9 | },
10 | "compileType": "miniprogram",
11 | "libVersion": "1.9.94",
12 | "appid": "touristappid",
13 | "projectname": "wepy-com-icityer",
14 | "condition": {
15 | "search": {
16 | "current": -1,
17 | "list": []
18 | },
19 | "conversation": {
20 | "current": -1,
21 | "list": []
22 | },
23 | "game": {
24 | "currentL": -1,
25 | "list": []
26 | },
27 | "miniprogram": {
28 | "current": -1,
29 | "list": []
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/screenshot/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HellyW/wepy-com-icityer/378791d7566310fb3d1fbf0c57d40fe8f4be1348/screenshot/screenshot1.png
--------------------------------------------------------------------------------
/screenshot/screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HellyW/wepy-com-icityer/378791d7566310fb3d1fbf0c57d40fe8f4be1348/screenshot/screenshot2.png
--------------------------------------------------------------------------------
/screenshot/screenshot3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HellyW/wepy-com-icityer/378791d7566310fb3d1fbf0c57d40fe8f4be1348/screenshot/screenshot3.png
--------------------------------------------------------------------------------
/src/app.wpy:
--------------------------------------------------------------------------------
1 |
3 |
4 |
25 |
--------------------------------------------------------------------------------
/src/icityer/animate.less:
--------------------------------------------------------------------------------
1 | .expandToFull {
2 | -webkit-animation-duration: 1s;
3 | animation-duration: 1s;
4 | -webkit-animation-fill-mode: both;
5 | animation-fill-mode: both;
6 | -webkit-animation-name: expandToFull;
7 | animation-name: expandToFull;
8 | }
9 | @-webkit-keyframes expandToFull {
10 | from {
11 | width:180rpx
12 | }
13 |
14 | to {
15 | width:580rpx
16 | }
17 | }
18 |
19 | @keyframes expandToFull {
20 | from {
21 | width:180rpx
22 | }
23 |
24 | to {
25 | width:580rpx
26 | }
27 | }
--------------------------------------------------------------------------------
/src/icityer/cityData.js:
--------------------------------------------------------------------------------
1 | /*
2 | ** 中国省市区数据
3 | */
4 |
5 | module.exports.CITYSDATA = [
6 | {
7 | "key": "B",
8 | "name": "北京市",
9 | "citys": [
10 | {
11 | "name": "北京市",
12 | "areas": ["东城区", "西城区", "崇文区", "宣武区", "朝阳区", "丰台区", "石景山区", "海淀区", "门头沟区", "房山区", "通州区", "顺义区", "昌平区", "大兴区", "平谷区", "怀柔区", "密云县", "延庆县"]
13 | }
14 | ]
15 | },
16 | {
17 | "key": "T",
18 | "name": "天津市",
19 | "citys": [
20 | {
21 | "name": "天津市",
22 | "areas": ["和平区", "河东区", "河西区", "南开区", "河北区", "红桥区", "塘沽区", "汉沽区", "大港区", "东丽区", "西青区", "津南区", "北辰区", "武清区", "宝坻区", "宁河县", "静海县", "蓟县"]
23 | }
24 | ]
25 | },
26 | {
27 | "key": "S",
28 | "name": "上海市",
29 | "citys": [
30 | {
31 | "name": "上海市",
32 | "areas": ["黄浦区", "卢湾区", "徐汇区", "长宁区", "静安区", "普陀区", "闸北区", "虹口区", "杨浦区", "宝山区", "闵行区", "嘉定区", "松江区", "金山区", "青浦区", "南汇区", "奉贤区", "浦东新区", "崇明县"]
33 | }
34 | ]
35 | },
36 | {
37 | "key": "C",
38 | "name": "重庆市",
39 | "citys": [
40 | {
41 | "name": "重庆市",
42 | "areas": ["渝中区", "大渡口区", "江北区", "南岸区", "北碚区", "渝北区", "巴南区", "长寿区", "双桥区", "沙坪坝区", "万盛区", "万州区", "涪陵区", "黔江区", "永川区", "合川区", "江津区", "九龙坡区", "南川区", "綦江县", "潼南县", "荣昌县", "璧山县", "大足县", "铜梁县", "梁平县", "开县", "忠县", "城口县", "垫江县", "武隆县", "丰都县", "奉节县", "云阳县", "巫溪县", "巫山县", "石柱土家族自治县", "秀山土家族苗族自治县", "酉阳土家族苗族自治县", "彭水苗族土家族自治县"]
43 | }
44 | ]
45 | },
46 | {
47 | "key": "G",
48 | "name": "广东省",
49 | "citys": [
50 | {
51 | "name": "广州市",
52 | "areas": ["越秀区", "荔湾区", "海珠区", "天河区", "白云区", "黄埔区", "番禺区", "花都区", "南沙区", "萝岗区", "增城市", "从化市"]
53 | },
54 | {
55 | "name": "深圳市",
56 | "areas": ["福田区", "罗湖区", "南山区", "宝安区", "龙岗区", "盐田区"]
57 | },
58 | {
59 | "name": "东莞市",
60 | "areas": ["东莞市"]
61 | },
62 | {
63 | "name": "中山市",
64 | "areas": ["中山市"]
65 | },
66 | {
67 | "name": "潮州市",
68 | "areas": ["湘桥区", "潮安县", "饶平县"]
69 | },
70 | {
71 | "name": "揭阳市",
72 | "areas": ["榕城区", "揭东县", "揭西县", "惠来县", "普宁市"]
73 | },
74 | {
75 | "name": "云浮市",
76 | "areas": ["云城区", "新兴县", "郁南县", "云安县", "罗定市"]
77 | },
78 | {
79 | "name": "珠海市",
80 | "areas": ["香洲区", "斗门区", "金湾区"]
81 | },
82 | {
83 | "name": "汕头市",
84 | "areas": ["金平区", "濠江区", "龙湖区", "潮阳区", "潮南区", "澄海区", "南澳县"]
85 | },
86 | {
87 | "name": "韶关市",
88 | "areas": ["浈江区", "武江区", "曲江区", "乐昌市", "南雄市", "始兴县", "仁化县", "翁源县", "新丰县", "乳源瑶族自治县"]
89 | },
90 | {
91 | "name": "佛山市",
92 | "areas": ["禅城区", "南海区", "顺德区", "三水区", "高明区"]
93 | },
94 | {
95 | "name": "江门市",
96 | "areas": ["蓬江区", "江海区", "新会区", "恩平市", "台山市", "开平市", "鹤山市"]
97 | },
98 | {
99 | "name": "湛江市",
100 | "areas": ["赤坎区", "霞山区", "坡头区", "麻章区", "吴川市", "廉江市", "雷州市", "遂溪县", "徐闻县"]
101 | },
102 | {
103 | "name": "茂名市",
104 | "areas": ["茂南区", "茂港区", "化州市", "信宜市", "高州市", "电白县"]
105 | },
106 | {
107 | "name": "肇庆市",
108 | "areas": ["端州区", "鼎湖区", "高要市", "四会市", "广宁县", "怀集县", "封开县", "德庆县"]
109 | },
110 | {
111 | "name": "惠州市",
112 | "areas": ["惠城区", "惠阳区", "博罗县", "惠东县", "龙门县"]
113 | },
114 | {
115 | "name": "梅州市",
116 | "areas": ["梅江区", "兴宁市", "梅县", "大埔县", "丰顺县", "五华县", "平远县", "蕉岭县"]
117 | },
118 | {
119 | "name": "汕尾市",
120 | "areas": ["城区", "陆丰市", "海丰县", "陆河县"]
121 | },
122 | {
123 | "name": "河源市",
124 | "areas": ["源城区", "紫金县", "龙川县", "连平县", "和平县", "东源县"]
125 | },
126 | {
127 | "name": "阳江市",
128 | "areas": ["江城区", "阳春市", "阳西县", "阳东县"]
129 | },
130 | {
131 | "name": "清远市",
132 | "areas": ["清城区", "英德市", "连州市", "佛冈县", "阳山县", "清新县", "连山壮族瑶族自治县", "连南瑶族自治县"]
133 | }
134 | ]
135 | },
136 | {
137 | "key": "Z",
138 | "name": "浙江省",
139 | "citys": [
140 | {
141 | "name": "杭州市",
142 | "areas": ["上城区", "下城区", "拱墅区", "西湖区", "江干区", "滨江区", "余杭区", "萧山区", "富阳区", "临安市", "桐庐县", "建德市", "淳安县"]
143 | },
144 | {
145 | "name": "宁波市",
146 | "areas": ["海曙区", "江东区", "江北区", "镇海区", "北仑区", "鄞州区", "余姚市", "慈溪市", "奉化市", "宁海县", "象山县"]
147 | },
148 | {
149 | "name": "温州市",
150 | "areas": ["鹿城区", "龙湾区", "瓯海区", "瑞安市", "乐清市", "永嘉县", "洞头县", "平阳县", "苍南县", "文成县", "泰顺县"]
151 | },
152 | {
153 | "name": "嘉兴市",
154 | "areas": ["秀城区", "秀洲区", "海宁市", "平湖市", "桐乡市", "嘉善县", "海盐县"]
155 | },
156 | {
157 | "name": "湖州市",
158 | "areas": ["吴兴区", "南浔区", "长兴县", "德清县", "安吉县"]
159 | },
160 | {
161 | "name": "绍兴市",
162 | "areas": ["越城区", "诸暨市", "上虞市", "嵊州市", "绍兴县", "新昌县"]
163 | },
164 | {
165 | "name": "金华市",
166 | "areas": ["婺城区", "金东区", "兰溪市", "义乌市", "东阳市", "永康市", "武义县", "浦江县", "磐安县"]
167 | },
168 | {
169 | "name": "衢州市",
170 | "areas": ["柯城区", "衢江区", "江山市", "龙游县", "常山县", "开化县"]
171 | },
172 | {
173 | "name": "舟山市",
174 | "areas": ["定海区", "普陀区", "岱山县", "嵊泗县"]
175 | },
176 | {
177 | "name": "台州市",
178 | "areas": ["椒江区", "黄岩区", "路桥区", "临海市", "温岭市", "玉环县", "天台县", "仙居县", "三门县"]
179 | },
180 | {
181 | "name": "丽水市",
182 | "areas": ["莲都区", "龙泉市", "缙云县", "青田县", "云和县", "遂昌县", "松阳县", "庆元县", "景宁畲族自治县"]
183 | }
184 | ]
185 | },
186 | {
187 | "key": "J",
188 | "name": "江苏省",
189 | "citys": [
190 | {
191 | "name": "南京市",
192 | "areas": ["玄武区", "白下区", "秦淮区", "建邺区", "鼓楼区", "下关区", "栖霞区", "雨花台区", "浦口区", "江宁区", "六合区", "溧水县", "高淳县"]
193 | },
194 | {
195 | "name": "苏州市",
196 | "areas": ["金阊区", "平江区", "沧浪区", "虎丘区", "吴中区", "相城区", "常熟市", "张家港市", "昆山市", "吴江市", "太仓市"]
197 | },
198 | {
199 | "name": "无锡市",
200 | "areas": ["崇安区", "南长区", "北塘区", "滨湖区", "锡山区", "惠山区", "江阴市", "宜兴市"]
201 | },
202 | {
203 | "name": "常州市",
204 | "areas": ["钟楼区", "天宁区", "戚墅堰区", "新北区", "武进区", "金坛市", "溧阳市"]
205 | },
206 | {
207 | "name": "镇江市",
208 | "areas": ["京口区", "润州区", "丹徒区", "丹阳市", "扬中市", "句容市"]
209 | },
210 | {
211 | "name": "南通市",
212 | "areas": ["崇川区", "港闸区", "通州市", "如皋市", "海门市", "启东市", "海安县", "如东县"]
213 | },
214 | {
215 | "name": "泰州市",
216 | "areas": ["海陵区", "高港区", "姜堰市", "泰兴市", "靖江市", "兴化市"]
217 | },
218 | {
219 | "name": "扬州市",
220 | "areas": ["广陵区", "维扬区", "邗江区", "江都市", "仪征市", "高邮市", "宝应县"]
221 | },
222 | {
223 | "name": "盐城市",
224 | "areas": ["亭湖区", "盐都区", "大丰市", "东台市", "建湖县", "射阳县", "阜宁县", "滨海县", "响水县"]
225 | },
226 | {
227 | "name": "连云港市",
228 | "areas": ["新浦区", "海州区", "连云区", "东海县", "灌云县", "赣榆县", "灌南县"]
229 | },
230 | {
231 | "name": "徐州市",
232 | "areas": ["云龙区", "鼓楼区", "九里区", "泉山区", "贾汪区", "邳州市", "新沂市", "铜山县", "睢宁县", "沛县", "丰县"]
233 | },
234 | {
235 | "name": "淮安市",
236 | "areas": ["清河区", "清浦区", "楚州区", "淮阴区", "涟水县", "洪泽县", "金湖县", "盱眙县"]
237 | },
238 | {
239 | "name": "宿迁市",
240 | "areas": ["宿城区", "宿豫区", "沭阳县", "泗阳县", "泗洪县"]
241 | }
242 | ]
243 | },
244 | {
245 | "key": "F",
246 | "name": "福建省",
247 | "citys": [
248 | {
249 | "name": "福州市",
250 | "areas": ["鼓楼区", "台江区", "仓山区", "马尾区", "晋安区", "福清市", "长乐市", "闽侯县", "闽清县", "永泰县", "连江县", "罗源县", "平潭县"]
251 | },
252 | {
253 | "name": "厦门市",
254 | "areas": ["思明区", "海沧区", "湖里区", "集美区", "同安区", "翔安区"]
255 | },
256 | {
257 | "name": "莆田市",
258 | "areas": ["城厢区", "涵江区", "荔城区", "秀屿区", "仙游县"]
259 | },
260 | {
261 | "name": "三明市",
262 | "areas": ["梅列区", "三元区", "永安市", "明溪县", "将乐县", "大田县", "宁化县", "建宁县", "沙县", "尤溪县", "清流县", "泰宁县"]
263 | },
264 | {
265 | "name": "泉州市",
266 | "areas": ["鲤城区", "丰泽区", "洛江区", "泉港区", "石狮市", "晋江市", "南安市", "惠安县", "永春县", "安溪县", "德化县", "金门县"]
267 | },
268 | {
269 | "name": "漳州市",
270 | "areas": ["芗城区", "龙文区", "龙海市", "平和县", "南靖县", "诏安县", "漳浦县", "华安县", "东山县", "长泰县", "云霄县"]
271 | },
272 | {
273 | "name": "南平市",
274 | "areas": ["延平区", "建瓯市", "邵武市", "武夷山市", "建阳市", "松溪县", "光泽县", "顺昌县", "浦城县", "政和县"]
275 | },
276 | {
277 | "name": "龙岩市",
278 | "areas": ["新罗区", "漳平市", "长汀县", "武平县", "上杭县", "永定县", "连城县"]
279 | },
280 | {
281 | "name": "宁德市",
282 | "areas": ["蕉城区", "福安市", "福鼎市", "寿宁县", "霞浦县", "柘荣县", "屏南县", "古田县", "周宁县"]
283 | }
284 | ]
285 | },
286 | {
287 | "key": "H",
288 | "name": "河北省",
289 | "citys": [
290 | {
291 | "name": "石家庄市",
292 | "areas": ["长安区", "桥东区", "桥西区", "新华区", "井陉矿区", "井陉县", "正定县", "栾城县", "行唐县", "灵寿县", "高邑县", "深泽县", "赞皇县", "无极县", "平山县", "元氏县", "赵县", "辛集市", "藁城市", "晋州市", "新乐市", "鹿泉市"]
293 | },
294 | {
295 | "name": "唐山市",
296 | "areas": ["路南区", "路北区", "古冶区", "开平区", "新区", "丰润县", "滦县", "滦南县", "乐亭县", "迁西县", "玉田县", "唐海县", "遵化市", "丰南市", "迁安市"]
297 | },
298 | {
299 | "name": "秦皇岛市",
300 | "areas": ["海港区", "山海关区", "北戴河区", "青龙满族自治县", "昌黎县", "抚宁县", "卢龙县"]
301 | },
302 | {
303 | "name": "邯郸市",
304 | "areas": ["邯山区", "丛台区", "复兴区", "峰峰矿区", "邯郸县", "临漳县", "成安县", "大名县", "涉县", "磁县", "肥乡县", "永年县", "邱县", "鸡泽县", "广平县", "馆陶县", "魏县", "曲周县", "武安市"]
305 | },
306 | {
307 | "name": "邢台市",
308 | "areas": ["桥东区", "桥西区", "邢台县", "临城县", "内丘县", "柏乡县", "隆尧县", "任县", "南和县", "宁晋县", "巨鹿县", "新河县", "广宗县", "平乡县", "威县", "清河县", "临西县", "南宫市", "沙河市"]
309 | },
310 | {
311 | "name": "保定市",
312 | "areas": ["新市区", "北市区", "南市区", "满城县", "清苑县", "涞水县", "阜平县", "徐水县", "定兴县", "唐县", "高阳县", "容城县", "涞源县", "望都县", "安新县", "易县", "曲阳县", "蠡县", "顺平县", "博野", "雄县", "涿州市", "定州市", "安国市", "高碑店市"]
313 | },
314 | {
315 | "name": "张家口市",
316 | "areas": ["桥东区", "桥西区", "宣化区", "下花园区", "宣化县", "张北县", "康保县", "沽源县", "尚义县", "蔚县", "阳原县", "怀安县", "万全县", "怀来县", "涿鹿县", "赤城县", "崇礼县"]
317 | },
318 | {
319 | "name": "承德市",
320 | "areas": ["双桥区", "双滦区", "鹰手营子矿区", "承德县", "兴隆县", "平泉县", "滦平县", "隆化县", "丰宁满族自治县", "宽城满族自治县", "围场满族蒙古族自治县"]
321 | },
322 | {
323 | "name": "沧州市",
324 | "areas": ["新华区", "运河区", "沧县", "青县", "东光县", "海兴县", "盐山县", "肃宁县", "南皮县", "吴桥县", "献县", "孟村回族自治县", "泊头市", "任丘市", "黄骅市", "河间市"]
325 | },
326 | {
327 | "name": "廊坊市",
328 | "areas": ["安次区", "固安县", "永清县", "香河县", "大城县", "文安县", "大厂回族自治县", "霸州市", "三河市"]
329 | },
330 | {
331 | "name": "衡水市",
332 | "areas": ["桃城区", "枣强县", "武邑县", "武强县", "饶阳县", "安平县", "故城县", "景县", "阜城县", "冀州市", "深州市"]
333 | }
334 | ]
335 | },
336 | {
337 | "key": "H",
338 | "name": "河南省",
339 | "citys": [
340 | {
341 | "name": "郑州市",
342 | "areas": ["中原区", "金水区", "二七区", "管城回族区", "上街区", "惠济区", "巩义市", "新郑市", "新密市", "登封市", "荥阳市", "中牟县"]
343 | },
344 | {
345 | "name": "开封市",
346 | "areas": ["鼓楼区", "龙亭区", "顺河回族区", "禹王台区", "金明区", "开封县", "尉氏县", "兰考县", "杞县", "通许县"]
347 | },
348 | {
349 | "name": "洛阳市",
350 | "areas": ["西工区", "老城区", "涧西区", "瀍河回族区", "洛龙区", "吉利区", "偃师市", "孟津县", "汝阳县", "伊川县", "洛宁县", "嵩县", "宜阳县", "新安县", "栾川县"]
351 | },
352 | {
353 | "name": "平顶山市",
354 | "areas": ["新华区", "卫东区", "湛河区", "石龙区", "汝州市", "舞钢市", "宝丰县", "叶县", "郏县", "鲁山县"]
355 | },
356 | {
357 | "name": "安阳市",
358 | "areas": ["北关区", "文峰区", "殷都区", "龙安区", "林州市", "安阳县", "滑县", "内黄县", "汤阴县"]
359 | },
360 | {
361 | "name": "鹤壁市",
362 | "areas": ["淇滨区", "山城区", "鹤山区", "浚县", "淇县"]
363 | },
364 | {
365 | "name": "新乡市",
366 | "areas": ["卫滨区", "红旗区", "凤泉区", "牧野区", "卫辉市", "辉县市", "新乡县", "获嘉县", "原阳县", "长垣县", "封丘县", "延津县"]
367 | },
368 | {
369 | "name": "焦作市",
370 | "areas": ["解放区", "中站区", "马村区", "山阳区", "沁阳市", "孟州市", "修武县", "温县", "武陟县", "博爱县"]
371 | },
372 | {
373 | "name": "濮阳市",
374 | "areas": ["华龙区", "濮阳县", "南乐县", "台前县", "清丰县", "范县"]
375 | },
376 | {
377 | "name": "许昌市",
378 | "areas": ["魏都区", "禹州市", "长葛市", "许昌县", "鄢陵县", "襄城县"]
379 | },
380 | {
381 | "name": "漯河市",
382 | "areas": ["源汇区", "郾城区", "召陵区", "临颍县", "舞阳县"]
383 | },
384 | {
385 | "name": "三门峡市",
386 | "areas": ["湖滨区", "义马市", "灵宝市", "渑池县", "卢氏县", "陕县"]
387 | },
388 | {
389 | "name": "南阳市",
390 | "areas": ["卧龙区", "宛城区", "邓州市", "桐柏县", "方城县", "淅川县", "镇平县", "唐河县", "南召县", "内乡县", "新野县", "社旗县", "西峡县"]
391 | },
392 | {
393 | "name": "商丘市",
394 | "areas": ["梁园区", "睢阳区", "永城市", "宁陵县", "虞城县", "民权县", "夏邑县", "柘城县", "睢县"]
395 | },
396 | {
397 | "name": "信阳市",
398 | "areas": ["浉河区", "平桥区", "潢川县", "淮滨县", "息县", "新县", "商城县", "固始县", "罗山县", "光山县"]
399 | },
400 | {
401 | "name": "周口市",
402 | "areas": ["川汇区", "项城市", "商水县", "淮阳县", "太康县", "鹿邑县", "西华县", "扶沟县", "沈丘县", "郸城县"]
403 | },
404 | {
405 | "name": "驻马店市",
406 | "areas": ["驿城区", "确山县", "新蔡县", "上蔡县", "西平县", "泌阳县", "平舆县", "汝南县", "遂平县", "正阳县"]
407 | },
408 | {
409 | "name": "焦作市",
410 | "areas": ["济源市"]
411 | }
412 | ]
413 | },
414 | {
415 | "key": "S",
416 | "name": "山西省",
417 | "citys": [
418 | {
419 | "name": "太原市",
420 | "areas": ["小店区", "迎泽区", "杏花岭区", "尖草坪区", "万柏林区", "晋源区", "清徐县", "阳曲县", "娄烦县", "古交市"]
421 | },
422 | {
423 | "name": "大同市",
424 | "areas": ["城区", "矿区", "南郊区", "新荣区", "阳高县", "天镇县", "广灵县", "灵丘县", "浑源县", "左云县", "大同县"]
425 | },
426 | {
427 | "name": "阳泉市",
428 | "areas": ["城区", "矿区", "郊区", "平定县", "盂县"]
429 | },
430 | {
431 | "name": "长治市",
432 | "areas": ["城区", "郊区", "长治县", "襄垣县", "屯留县", "平顺县", "黎城县", "壶关县", "长子县", "武乡县", "沁县", "沁源县", "潞城市"]
433 | },
434 | {
435 | "name": "晋城市",
436 | "areas": ["城区", "沁水县", "阳城县", "陵川县", "泽州县", "高平市"]
437 | },
438 | {
439 | "name": "朔州市",
440 | "areas": ["朔城区", "平鲁区", "山阴县", "应县", "右玉县", "怀仁县"]
441 | },
442 | {
443 | "name": "忻州市",
444 | "areas": ["忻府区", "原平市", "定襄县", "五台县", "代县", "繁峙县", "宁武县", "静乐县", "神池县", "五寨县", "岢岚县", "河曲县", "保德县", "偏关县"]
445 | },
446 | {
447 | "name": "吕梁市",
448 | "areas": ["离石区", "孝义市", "汾阳市", "文水县", "交城县", "兴县", "临县", "柳林县", "石楼县", "岚县", "方山县", "中阳县", "交口县"]
449 | },
450 | {
451 | "name": "晋中市",
452 | "areas": ["榆次市", "介休市", "榆社县", "左权县", "和顺县", "昔阳县", "寿阳县", "太谷县", "祁县", "平遥县", "灵石县"]
453 | },
454 | {
455 | "name": "临汾市",
456 | "areas": ["临汾市", "侯马市", "霍州市", "曲沃县", "翼城县", "襄汾县", "洪洞县", "古县", "安泽县", "浮山县", "吉县", "乡宁县", "蒲县", "大宁县", "永和县", "隰县", "汾西县"]
457 | },
458 | {
459 | "name": "运城市",
460 | "areas": ["运城市", "永济市", "河津市", "芮城县", "临猗县", "万荣县", "新绛县", "稷山县", "闻喜县", "夏县", "绛县", "平陆县", "垣曲县"]
461 | }
462 | ]
463 | },
464 | {
465 | "key": "S",
466 | "name": "山东省",
467 | "citys": [
468 | {
469 | "name": "济南市",
470 | "areas": ["市中区", "历下区", "天桥区", "槐荫区", "历城区", "长清区", "章丘市", "平阴县", "济阳县", "商河县"]
471 | },
472 | {
473 | "name": "青岛市",
474 | "areas": ["市南区", "市北区", "城阳区", "四方区", "李沧区", "黄岛区", "崂山区", "胶南市", "胶州市", "平度市", "莱西市", "即墨市"]
475 | },
476 | {
477 | "name": "淄博市",
478 | "areas": ["张店区", "临淄区", "淄川区", "博山区", "周村区", "桓台县", "高青县", "沂源县"]
479 | },
480 | {
481 | "name": "枣庄市",
482 | "areas": ["市中区", "山亭区", "峄城区", "台儿庄区", "薛城区", "滕州市"]
483 | },
484 | {
485 | "name": "东营市",
486 | "areas": ["东营区", "河口区", "垦利县", "广饶县", "利津县"]
487 | },
488 | {
489 | "name": "烟台市",
490 | "areas": ["芝罘区", "福山区", "牟平区", "莱山区", "龙口市", "莱阳市", "莱州市", "招远市", "蓬莱市", "栖霞市", "海阳市", "长岛县"]
491 | },
492 | {
493 | "name": "潍坊市",
494 | "areas": ["潍城区", "寒亭区", "坊子区", "奎文区", "青州市", "诸城市", "寿光市", "安丘市", "高密市", "昌邑市", "昌乐县", "临朐县"]
495 | },
496 | {
497 | "name": "济宁市",
498 | "areas": ["市中区", "任城区", "曲阜市", "兖州市", "邹城市", "鱼台县", "金乡县", "嘉祥县", "微山县", "汶上县", "泗水县", "梁山县"]
499 | },
500 | {
501 | "name": "泰安市",
502 | "areas": ["泰山区", "岱岳区", "新泰市", "肥城市", "宁阳县", "东平县"]
503 | },
504 | {
505 | "name": "威海市",
506 | "areas": ["环翠区", "乳山市", "文登市", "荣成市"]
507 | },
508 | {
509 | "name": "日照市",
510 | "areas": ["东港区", "岚山区", "五莲县", "莒县"]
511 | },
512 | {
513 | "name": "莱芜市",
514 | "areas": ["莱城区", "钢城区"]
515 | },
516 | {
517 | "name": "临沂市",
518 | "areas": ["兰山区", "罗庄区", "河东区", "沂南县", "郯城县", "沂水县", "苍山县", "费县", "平邑县", "莒南县", "蒙阴县", "临沭县"]
519 | },
520 | {
521 | "name": "德州市",
522 | "areas": ["德城区", "乐陵市", "禹城市", "陵县", "宁津县", "齐河县", "武城县", "庆云县", "平原县", "夏津县", "临邑县"]
523 | },
524 | {
525 | "name": "聊城市",
526 | "areas": ["东昌府区", "临清市", "高唐县", "阳谷县", "茌平县", "莘县", "东阿县", "冠县"]
527 | },
528 | {
529 | "name": "滨州市",
530 | "areas": ["滨城区", "邹平县", "沾化县", "惠民县", "博兴县", "阳信县", "无棣县"]
531 | },
532 | {
533 | "name": "菏泽市",
534 | "areas": ["牡丹区", "鄄城县", "单县", "郓城县", "曹县", "定陶县", "巨野县", "东明县", "成武县"]
535 | }
536 | ]
537 | },
538 | {
539 | "key": "L",
540 | "name": "辽宁省",
541 | "citys": [
542 | {
543 | "name": "沈阳市",
544 | "areas": ["沈河区", "皇姑区", "和平区", "大东区", "铁西区", "苏家屯区", "东陵区", "于洪区", "新民市", "法库县", "辽中县", "康平县", "新城子区"]
545 | },
546 | {
547 | "name": "大连市",
548 | "areas": ["西岗区", "中山区", "沙河口区", "甘井子区", "旅顺口区", "金州区", "瓦房店市", "普兰店市", "庄河市", "长海县"]
549 | },
550 | {
551 | "name": "鞍山市",
552 | "areas": ["铁东区", "铁西区", "立山区", "千山区", "海城市", "台安县", "岫岩满族自治县"]
553 | },
554 | {
555 | "name": "抚顺市",
556 | "areas": ["顺城区", "新抚区", "东洲区", "望花区", "抚顺县", "清原满族自治县", "新宾满族自治县"]
557 | },
558 | {
559 | "name": "本溪市",
560 | "areas": ["平山区", "明山区", "溪湖区", "南芬区", "本溪满族自治县", "桓仁满族自治县"]
561 | },
562 | {
563 | "name": "丹东市",
564 | "areas": ["振兴区", "元宝区", "振安区", "东港市", "凤城市", "宽甸满族自治县"]
565 | },
566 | {
567 | "name": "锦州市",
568 | "areas": ["太和区", "古塔区", "凌河区", "凌海市", "黑山县", "义县", "北宁市"]
569 | },
570 | {
571 | "name": "营口市",
572 | "areas": ["站前区", "西市区", "鲅鱼圈区", "老边区", "大石桥市", "盖州市"]
573 | },
574 | {
575 | "name": "阜新市",
576 | "areas": ["海州区", "新邱区", "太平区", "清河门区", "细河区", "彰武县", "阜新蒙古族自治县"]
577 | },
578 | {
579 | "name": "辽阳市",
580 | "areas": ["白塔区", "文圣区", "宏伟区", "太子河区", "弓长岭区", "灯塔市", "辽阳县"]
581 | },
582 | {
583 | "name": "盘锦市",
584 | "areas": ["双台子区", "兴隆台区", "盘山县", "大洼县"]
585 | },
586 | {
587 | "name": "铁岭市",
588 | "areas": ["银州区", "清河区", "调兵山市", "开原市", "铁岭县", "昌图县", "西丰县"]
589 | },
590 | {
591 | "name": "朝阳市",
592 | "areas": ["双塔区", "龙城区", "凌源市", "北票市", "朝阳县", "建平县", "喀喇沁左翼蒙古族自治县"]
593 | },
594 | {
595 | "name": "葫芦岛市",
596 | "areas": ["龙港区", "南票区", "连山区", "兴城市", "绥中县", "建昌县"]
597 | }
598 | ]
599 | },
600 | {
601 | "key": "J",
602 | "name": "吉林省",
603 | "citys": [
604 | {
605 | "name": "长春市",
606 | "areas": ["朝阳区", "宽城区", "二道区", "南关区", "绿园区", "双阳区", "九台市", "榆树市", "德惠市", "农安县"]
607 | },
608 | {
609 | "name": "吉林市",
610 | "areas": ["船营区", "昌邑区", "龙潭区", "丰满区", "舒兰市", "桦甸市", "蛟河市", "磐石市", "永吉县"]
611 | },
612 | {
613 | "name": "四平市",
614 | "areas": ["铁西区", "铁东区", "公主岭市", "双辽市", "梨树县", "伊通满族自治县"]
615 | },
616 | {
617 | "name": "辽源市",
618 | "areas": ["龙山区", "西安区", "东辽县", "东丰县"]
619 | },
620 | {
621 | "name": "通化市",
622 | "areas": ["东昌区", "二道江区", "梅河口市", "集安市", "通化县", "辉南县", "柳河县"]
623 | },
624 | {
625 | "name": "白山市",
626 | "areas": ["八道江区", "江源区", "临江市", "靖宇县", "抚松县", "长白朝鲜族自治县"]
627 | },
628 | {
629 | "name": "松原市",
630 | "areas": ["宁江区", "乾安县", "长岭县", "扶余县", "前郭尔罗斯蒙古族自治县"]
631 | },
632 | {
633 | "name": "白城市",
634 | "areas": ["洮北区", "大安市", "洮南市", "镇赉县", "通榆县"]
635 | },
636 | {
637 | "name": "延边朝鲜族自治州",
638 | "areas": ["延吉市", "图们市", "敦化市", "龙井市", "珲春市", "和龙市", "安图县", "汪清县"]
639 | }
640 | ]
641 | },
642 | {
643 | "key": "H",
644 | "name": "黑龙江省",
645 | "citys": [
646 | {
647 | "name": "哈尔滨市",
648 | "areas": ["松北区", "道里区", "南岗区", "平房区", "香坊区", "道外区", "呼兰区", "阿城区", "双城市", "尚志市", "五常市", "宾县", "方正县", "通河县", "巴彦县", "延寿县", "木兰县", "依兰县"]
649 | },
650 | {
651 | "name": "齐齐哈尔市",
652 | "areas": ["龙沙区", "昂昂溪区", "铁锋区", "建华区", "富拉尔基区", "碾子山区", "梅里斯达斡尔族区", "讷河市", "富裕县", "拜泉县", "甘南县", "依安县", "克山县", "泰来县", "克东县", "龙江县"]
653 | },
654 | {
655 | "name": "鹤岗市",
656 | "areas": ["兴山区", "工农区", "南山区", "兴安区", "向阳区", "东山区", "萝北县", "绥滨县"]
657 | },
658 | {
659 | "name": "双鸭山市",
660 | "areas": ["尖山区", "岭东区", "四方台区", "宝山区", "集贤县", "宝清县", "友谊县", "饶河县"]
661 | },
662 | {
663 | "name": "鸡西市",
664 | "areas": ["鸡冠区", "恒山区", "城子河区", "滴道区", "梨树区", "麻山区", "密山市", "虎林市", "鸡东县"]
665 | },
666 | {
667 | "name": "大庆市",
668 | "areas": ["萨尔图区", "红岗区", "龙凤区", "让胡路区", "大同区", "林甸县", "肇州县", "肇源县", "杜尔伯特蒙古族自治县"]
669 | },
670 | {
671 | "name": "伊春市",
672 | "areas": ["伊春区", "带岭区", "南岔区", "金山屯区", "西林区", "美溪区", "乌马河区", "翠峦区", "友好区", "上甘岭区", "五营区", "红星区", "新青区", "汤旺河区", "乌伊岭区", "铁力市", "嘉荫县"]
673 | },
674 | {
675 | "name": "牡丹江市",
676 | "areas": ["爱民区", "东安区", "阳明区", "西安区", "绥芬河市", "宁安市", "海林市", "穆棱市", "林口县", "东宁县"]
677 | },
678 | {
679 | "name": "佳木斯市",
680 | "areas": ["向阳区", "前进区", "东风区", "郊区", "同江市", "富锦市", "桦川县", "抚远县", "桦南县", "汤原县"]
681 | },
682 | {
683 | "name": "七台河市",
684 | "areas": ["桃山区", "新兴区", "茄子河区", "勃利县"]
685 | },
686 | {
687 | "name": "黑河市",
688 | "areas": ["爱辉区", "北安市", "五大连池市", "逊克县", "嫩江县", "孙吴县"]
689 | },
690 | {
691 | "name": "绥化市",
692 | "areas": ["北林区", "安达市", "肇东市", "海伦市", "绥棱县", "兰西县", "明水县", "青冈县", "庆安县", "望奎县"]
693 | },
694 | {
695 | "name": "大兴安岭地区市",
696 | "areas": ["呼玛县", "塔河县", "漠河县", "大兴安岭辖区"]
697 | }
698 | ]
699 | },
700 | {
701 | "key": "S",
702 | "name": "陕西省",
703 | "citys": [
704 | {
705 | "name": "西安市",
706 | "areas": ["莲湖区", "新城区", "碑林区", "雁塔区", "灞桥区", "未央区", "阎良区", "临潼区", "长安区", "高陵县", "蓝田县", "户县", "周至县"]
707 | },
708 | {
709 | "name": "铜川市",
710 | "areas": ["耀州区", "王益区", "印台区", "宜君县"]
711 | },
712 | {
713 | "name": "宝鸡市",
714 | "areas": ["渭滨区", "金台区", "陈仓区", "岐山县", "凤翔县", "陇县", "太白县", "麟游县", "扶风县", "千阳县", "眉县", "凤县"]
715 | },
716 | {
717 | "name": "咸阳市",
718 | "areas": ["秦都区", "渭城区", "杨陵区", "兴平市", "礼泉县", "泾阳县", "永寿县", "三原县", "彬县", "旬邑县", "长武县", "乾县", "武功县", "淳化县"]
719 | },
720 | {
721 | "name": "渭南市",
722 | "areas": ["临渭区", "韩城市", "华阴市", "蒲城县", "潼关县", "白水县", "澄城县", "华县", "合阳县", "富平县", "大荔县"]
723 | },
724 | {
725 | "name": "延安市",
726 | "areas": ["宝塔区", "安塞县", "洛川县", "子长县", "黄陵县", "延川县", "富县", "延长县", "甘泉县", "宜川县", "志丹县", "黄龙县", "吴起县"]
727 | },
728 | {
729 | "name": "汉中市",
730 | "areas": ["汉台区", "留坝县", "镇巴县", "城固县", "南郑县", "洋县", "宁强县", "佛坪县", "勉县", "西乡县", "略阳县"]
731 | },
732 | {
733 | "name": "榆林市",
734 | "areas": ["榆阳区", "清涧县", "绥德县", "神木县", "佳县", "府谷县", "子洲县", "靖边县", "横山县", "米脂县", "吴堡县", "定边县"]
735 | },
736 | {
737 | "name": "安康市",
738 | "areas": ["汉滨区", "紫阳县", "岚皋县", "旬阳县", "镇坪县", "平利县", "石泉县", "宁陕县", "白河县", "汉阴县"]
739 | },
740 | {
741 | "name": "商洛市",
742 | "areas": ["商州区", "镇安县", "山阳县", "洛南县", "商南县", "丹凤县", "柞水县"]
743 | }
744 | ]
745 | },
746 | {
747 | "key": "A",
748 | "name": "安徽省",
749 | "citys": [
750 | {
751 | "name": "合肥市",
752 | "areas": ["庐阳区", "瑶海区", "蜀山区", "包河区", "长丰县", "肥东县", "肥西县"]
753 | },
754 | {
755 | "name": "芜湖市",
756 | "areas": ["镜湖区", "弋江区", "鸠江区", "三山区", "芜湖县", "南陵县", "繁昌县"]
757 | },
758 | {
759 | "name": "蚌埠市",
760 | "areas": ["蚌山区", "龙子湖区", "禹会区", "淮上区", "怀远县", "固镇县", "五河县"]
761 | },
762 | {
763 | "name": "淮南市",
764 | "areas": ["田家庵区", "大通区", "谢家集区", "八公山区", "潘集区", "凤台县"]
765 | },
766 | {
767 | "name": "马鞍山市",
768 | "areas": ["雨山区", "花山区", "金家庄区", "当涂县"]
769 | },
770 | {
771 | "name": "淮北市",
772 | "areas": ["相山区", "杜集区", "烈山区", "濉溪县"]
773 | },
774 | {
775 | "name": "铜陵市",
776 | "areas": ["铜官山区", "狮子山区", "郊区", "铜陵县"]
777 | },
778 | {
779 | "name": "安庆市",
780 | "areas": ["迎江区", "大观区", "宜秀区", "桐城市", "宿松县", "枞阳县", "太湖县", "怀宁县", "岳西县", "望江县", "潜山县"]
781 | },
782 | {
783 | "name": "黄山市",
784 | "areas": ["屯溪区", "黄山区", "徽州区", "休宁县", "歙县", "祁门县", "黟县"]
785 | },
786 | {
787 | "name": "滁州市",
788 | "areas": ["琅琊区", "南谯区", "天长市", "明光市", "全椒县", "来安县", "定远县", "凤阳县"]
789 | },
790 | {
791 | "name": "阜阳市",
792 | "areas": ["颍州区", "颍东区", "颍泉区", "界首市", "临泉县", "颍上县", "阜南县", "太和县"]
793 | },
794 | {
795 | "name": "宿州市",
796 | "areas": ["埇桥区", "萧县", "泗县", "砀山县", "灵璧县"]
797 | },
798 | {
799 | "name": "巢湖市",
800 | "areas": ["居巢区", "含山县", "无为县", "庐江县", "和县"]
801 | },
802 | {
803 | "name": "六安市",
804 | "areas": ["金安区", "裕安区", "寿县", "霍山县", "霍邱县", "舒城县", "金寨县"]
805 | },
806 | {
807 | "name": "亳州市",
808 | "areas": ["谯城区", "利辛县", "涡阳县", "蒙城县"]
809 | },
810 | {
811 | "name": "池州市",
812 | "areas": ["贵池区", "东至县", "石台县", "青阳县"]
813 | },
814 | {
815 | "name": "宣城市",
816 | "areas": ["宣州区", "宁国市", "广德县", "郎溪县", "泾县", "旌德县", "绩溪县"]
817 | }
818 | ]
819 | },
820 | {
821 | "key": "J",
822 | "name": "江西省",
823 | "citys": [
824 | {
825 | "name": "南昌市",
826 | "areas": ["东湖区", "西湖区", "青云谱区", "湾里区", "青山湖区", "新建县", "南昌县", "进贤县", "安义县"]
827 | },
828 | {
829 | "name": "景德镇市",
830 | "areas": ["珠山区", "昌江区", "乐平市", "浮梁县"]
831 | },
832 | {
833 | "name": "萍乡市",
834 | "areas": ["安源区", "湘东区", "莲花县", "上栗县", "芦溪县"]
835 | },
836 | {
837 | "name": "九江市",
838 | "areas": ["浔阳区", "庐山区", "瑞昌市", "九江县", "星子县", "武宁县", "彭泽县", "永修县", "修水县", "湖口县", "德安县", "都昌县"]
839 | },
840 | {
841 | "name": "新余市",
842 | "areas": ["渝水区", "分宜县"]
843 | },
844 | {
845 | "name": "鹰潭市",
846 | "areas": ["月湖区", "贵溪市", "余江县"]
847 | },
848 | {
849 | "name": "赣州市",
850 | "areas": ["章贡区", "瑞金市", "南康市", "石城县", "安远县", "赣县", "宁都县", "寻乌县", "兴国县", "定南县", "上犹县", "于都县", "龙南县", "崇义县", "信丰县", "全南县", "大余县", "会昌县"]
851 | },
852 | {
853 | "name": "吉安市",
854 | "areas": ["吉州区", "青原区", "井冈山市", "吉安县", "永丰县", "永新县", "新干县", "泰和县", "峡江县", "遂川县", "安福县", "吉水县", "万安县"]
855 | },
856 | {
857 | "name": "宜春市",
858 | "areas": ["袁州区", "丰城市", "樟树市", "高安市", "铜鼓县", "靖安县", "宜丰县", "奉新县", "万载县", "上高县"]
859 | },
860 | {
861 | "name": "抚州市",
862 | "areas": ["临川区", "南丰县", "乐安县", "金溪县", "南城县", "东乡县", "资溪县", "宜黄县", "广昌县", "黎川县", "崇仁县"]
863 | },
864 | {
865 | "name": "上饶市",
866 | "areas": ["信州区", "德兴市", "上饶县", "广丰县", "鄱阳县", "婺源县", "铅山县", "余干县", "横峰县", "弋阳县", "玉山县", "万年县"]
867 | }
868 | ]
869 | },
870 | {
871 | "key": "H",
872 | "name": "湖北省",
873 | "citys": [
874 | {
875 | "name": "武汉市",
876 | "areas": ["江岸区", "武昌区", "江汉区", "硚口区", "汉阳区", "青山区", "洪山区", "东西湖区", "汉南区", "蔡甸区", "江夏区", "黄陂区", "新洲区"]
877 | },
878 | {
879 | "name": "黄石市",
880 | "areas": ["黄石港区", "西塞山区", "下陆区", "铁山区", "大冶市", "阳新县"]
881 | },
882 | {
883 | "name": "十堰市",
884 | "areas": ["张湾区", "茅箭区", "丹江口市", "郧县", "竹山县", "房县", "郧西县", "竹溪县"]
885 | },
886 | {
887 | "name": "荆州市",
888 | "areas": ["沙市区", "荆州区", "洪湖市", "石首市", "松滋市", "监利县", "公安县", "江陵县"]
889 | },
890 | {
891 | "name": "宜昌市",
892 | "areas": ["西陵区", "伍家岗区", "点军区", "猇亭区", "夷陵区", "宜都市", "当阳市", "枝江市", "秭归县", "远安县", "兴山县", "五峰土家族自治县", "长阳土家族自治县"]
893 | },
894 | {
895 | "name": "襄樊市",
896 | "areas": ["襄城区", "樊城区", "襄阳区", "老河口市", "枣阳市", "宜城市", "南漳县", "谷城县", "保康县"]
897 | },
898 | {
899 | "name": "鄂州市",
900 | "areas": ["鄂城区", "华容区", "梁子湖区"]
901 | },
902 | {
903 | "name": "荆门市",
904 | "areas": ["东宝区", "掇刀区", "钟祥市", "京山县", "沙洋县"]
905 | },
906 | {
907 | "name": "孝感市",
908 | "areas": ["孝南区", "应城市", "安陆市", "汉川市", "云梦县", "大悟县", "孝昌县"]
909 | },
910 | {
911 | "name": "黄冈市",
912 | "areas": ["黄州区", "麻城市", "武穴市", "红安县", "罗田县", "浠水县", "蕲春县", "黄梅县", "英山县", "团风县"]
913 | },
914 | {
915 | "name": "咸宁市",
916 | "areas": ["咸安区", "赤壁市", "嘉鱼县", "通山县", "崇阳县", "通城县"]
917 | },
918 | {
919 | "name": "随州市",
920 | "areas": ["曾都区", "广水市"]
921 | },
922 | {
923 | "name": "恩施土家族苗族自治州",
924 | "areas": ["恩施市", "利川市", "建始县", "来凤县", "巴东县", "鹤峰县", "宣恩县", "咸丰县"]
925 | },
926 | {
927 | "name": "仙桃市",
928 | "areas": ["仙桃"]
929 | },
930 | {
931 | "name": "天门市",
932 | "areas": ["天门"]
933 | },
934 | {
935 | "name": "潜江市",
936 | "areas": ["潜江"]
937 | },
938 | {
939 | "name": "神农架林区市",
940 | "areas": ["神农架林区"]
941 | }
942 | ]
943 | },
944 | {
945 | "key": "H",
946 | "name": "湖南省",
947 | "citys": [
948 | {
949 | "name": "长沙市",
950 | "areas": ["岳麓区", "芙蓉区", "天心区", "开福区", "雨花区", "浏阳市", "长沙县", "望城县", "宁乡县"]
951 | },
952 | {
953 | "name": "株洲市",
954 | "areas": ["天元区", "荷塘区", "芦淞区", "石峰区", "醴陵市", "株洲县", "炎陵县", "茶陵县", "攸县"]
955 | },
956 | {
957 | "name": "湘潭市",
958 | "areas": ["岳塘区", "雨湖区", "湘乡市", "韶山市", "湘潭县"]
959 | },
960 | {
961 | "name": "衡阳市",
962 | "areas": ["雁峰区", "珠晖区", "石鼓区", "蒸湘区", "南岳区", "耒阳市", "常宁市", "衡阳县", "衡东县", "衡山县", "衡南县", "祁东县"]
963 | },
964 | {
965 | "name": "邵阳市",
966 | "areas": ["双清区", "大祥区", "北塔区", "武冈市", "邵东县", "洞口县", "新邵县", "绥宁县", "新宁县", "邵阳县", "隆回县", "城步苗族自治县"]
967 | },
968 | {
969 | "name": "岳阳市",
970 | "areas": ["岳阳楼区", "云溪区", "君山区", "临湘市", "汨罗市", "岳阳县", "湘阴县", "平江县", "华容县"]
971 | },
972 | {
973 | "name": "常德市",
974 | "areas": ["武陵区", "鼎城区", "津市市", "澧县", "临澧县", "桃源县", "汉寿县", "安乡县", "石门县"]
975 | },
976 | {
977 | "name": "张家界市",
978 | "areas": ["永定区", "武陵源区", "慈利县", "桑植县"]
979 | },
980 | {
981 | "name": "益阳市",
982 | "areas": ["赫山区", "资阳区", "沅江市", "桃江县", "南县", "安化县"]
983 | },
984 | {
985 | "name": "郴州市",
986 | "areas": ["北湖区", "苏仙区", "资兴市", "宜章县", "汝城县", "安仁县", "嘉禾县", "临武县", "桂东县", "永兴县", "桂阳县"]
987 | },
988 | {
989 | "name": "永州市",
990 | "areas": ["冷水滩区", "零陵区", "祁阳县", "蓝山县", "宁远县", "新田县", "东安县", "江永县", "道县", "双牌县", "江华瑶族自治县"]
991 | },
992 | {
993 | "name": "怀化市",
994 | "areas": ["鹤城区", "洪江市", "会同县", "沅陵县", "辰溪县", "溆浦县", "中方县", "新晃侗族自治县", "芷江侗族自治县", "通道侗族自治县", "靖州苗族侗族自治县", "麻阳苗族自治县"]
995 | },
996 | {
997 | "name": "娄底市",
998 | "areas": ["娄星区", "冷水江市", "涟源市", "新化县", "双峰县"]
999 | },
1000 | {
1001 | "name": "湘西土家族苗族自治州",
1002 | "areas": ["吉首市", "古丈县", "龙山县", "永顺县", "凤凰县", "泸溪县", "保靖县", "花垣县"]
1003 | }
1004 | ]
1005 | },
1006 | {
1007 | "key": "S",
1008 | "name": "四川省",
1009 | "citys": [
1010 | {
1011 | "name": "成都市",
1012 | "areas": ["青羊区", "锦江区", "金牛区", "武侯区", "成华区", "龙泉驿区", "青白江区", "新都区", "温江区", "都江堰市", "彭州市", "邛崃市", "崇州市", "金堂县", "郫县", "新津县", "双流县", "蒲江县", "大邑县"]
1013 | },
1014 | {
1015 | "name": "自贡市",
1016 | "areas": ["大安区", "自流井区", "贡井区", "沿滩区", "荣县", "富顺县"]
1017 | },
1018 | {
1019 | "name": "攀枝花市",
1020 | "areas": ["仁和区", "米易县", "盐边县", "东区", "西区"]
1021 | },
1022 | {
1023 | "name": "泸州市",
1024 | "areas": ["江阳区", "纳溪区", "龙马潭区", "泸县", "合江县", "叙永县", "古蔺县"]
1025 | },
1026 | {
1027 | "name": "德阳市",
1028 | "areas": ["旌阳区", "广汉市", "什邡市", "绵竹市", "罗江县", "中江县"]
1029 | },
1030 | {
1031 | "name": "绵阳市",
1032 | "areas": ["涪城区", "游仙区", "江油市", "盐亭县", "三台县", "平武县", "安县", "梓潼县", "北川羌族自治县"]
1033 | },
1034 | {
1035 | "name": "广元市",
1036 | "areas": ["元坝区", "朝天区", "青川县", "旺苍县", "剑阁县", "苍溪县", "市中区"]
1037 | },
1038 | {
1039 | "name": "遂宁市",
1040 | "areas": ["船山区", "安居区", "射洪县", "蓬溪县", "大英县"]
1041 | },
1042 | {
1043 | "name": "内江市",
1044 | "areas": ["市中区", "东兴区", "资中县", "隆昌县", "威远县"]
1045 | },
1046 | {
1047 | "name": "乐山市",
1048 | "areas": ["市中区", "五通桥区", "沙湾区", "金口河区", "峨眉山市", "夹江县", "井研县", "犍为县", "沐川县", "马边彝族自治县", "峨边彝族自治县"]
1049 | },
1050 | {
1051 | "name": "南充市",
1052 | "areas": ["顺庆区", "高坪区", "嘉陵区", "阆中市", "营山县", "蓬安县", "仪陇县", "南部县", "西充县"]
1053 | },
1054 | {
1055 | "name": "眉山市",
1056 | "areas": ["东坡区", "仁寿县", "彭山县", "洪雅县", "丹棱县", "青神县"]
1057 | },
1058 | {
1059 | "name": "宜宾市",
1060 | "areas": ["翠屏区", "宜宾县", "兴文县", "南溪县", "珙县", "长宁县", "高县", "江安县", "筠连县", "屏山县"]
1061 | },
1062 | {
1063 | "name": "广安市",
1064 | "areas": ["广安区", "华蓥市", "岳池县", "邻水县", "武胜县"]
1065 | },
1066 | {
1067 | "name": "达州市",
1068 | "areas": ["通川区", "万源市", "达县", "渠县", "宣汉县", "开江县", "大竹县"]
1069 | },
1070 | {
1071 | "name": "雅安市",
1072 | "areas": ["雨城区", "芦山县", "石棉县", "名山县", "天全县", "荥经县", "宝兴县", "汉源县"]
1073 | },
1074 | {
1075 | "name": "巴中市",
1076 | "areas": ["巴州区", "南江县", "平昌县", "通江县"]
1077 | },
1078 | {
1079 | "name": "资阳市",
1080 | "areas": ["雁江区", "简阳市", "安岳县", "乐至县"]
1081 | },
1082 | {
1083 | "name": "阿坝藏族羌族自治州",
1084 | "areas": ["马尔康县", "九寨沟县", "红原县", "汶川县", "阿坝县", "理县", "若尔盖县", "小金县", "黑水县", "金川县", "松潘县", "壤塘县", "茂县"]
1085 | },
1086 | {
1087 | "name": "甘孜藏族自治州",
1088 | "areas": ["康定县", "丹巴县", "炉霍县", "九龙县", "甘孜县", "雅江县", "新龙县", "道孚县", "白玉县", "理塘县", "德格县", "乡城县", "石渠县", "稻城县", "色达县", "巴塘县", "泸定县", "得荣县"]
1089 | },
1090 | {
1091 | "name": "凉山彝族自治州",
1092 | "areas": ["西昌市", "美姑县", "昭觉县", "金阳县", "甘洛县", "布拖县", "雷波县", "普格县", "宁南县", "喜德县", "会东县", "越西县", "会理县", "盐源县", "德昌县", "冕宁县", "木里藏族自治县"]
1093 | }
1094 | ]
1095 | },
1096 | {
1097 | "key": "G",
1098 | "name": "贵州省",
1099 | "citys": [
1100 | {
1101 | "name": "贵阳市",
1102 | "areas": ["南明区", "云岩区", "花溪区", "乌当区", "白云区", "小河区", "清镇市", "开阳县", "修文县", "息烽县"]
1103 | },
1104 | {
1105 | "name": "六盘水市",
1106 | "areas": ["钟山区", "水城县", "盘县", "六枝特区"]
1107 | },
1108 | {
1109 | "name": "遵义市",
1110 | "areas": ["红花岗区", "汇川区", "赤水市", "仁怀市", "遵义县", "绥阳县", "桐梓县", "习水县", "凤冈县", "正安县", "余庆县", "湄潭县", "道真仡佬族苗族自治县", "务川仡佬族苗族自治县"]
1111 | },
1112 | {
1113 | "name": "安顺市",
1114 | "areas": ["西秀区", "普定县", "平坝县", "镇宁布依族苗族自治县", "紫云苗族布依族自治县", "关岭布依族苗族自治县"]
1115 | },
1116 | {
1117 | "name": "铜仁地区市",
1118 | "areas": ["铜仁市", "德江县", "江口县", "思南县", "石阡县", "玉屏侗族自治县", "松桃苗族自治县", "印江土家族苗族自治县", "沿河土家族自治县", "万山特区"]
1119 | },
1120 | {
1121 | "name": "毕节地区市",
1122 | "areas": ["毕节市", "黔西县", "大方县", "织金县", "金沙县", "赫章县", "纳雍县", "威宁彝族回族苗族自治县"]
1123 | },
1124 | {
1125 | "name": "黔西南布依族苗族自治州",
1126 | "areas": ["兴义市", "望谟县", "兴仁县", "普安县", "册亨县", "晴隆县", "贞丰县", "安龙县"]
1127 | },
1128 | {
1129 | "name": "黔东南苗族侗族自治州",
1130 | "areas": ["凯里市", "施秉县", "从江县", "锦屏县", "镇远县", "麻江县", "台江县", "天柱县", "黄平县", "榕江县", "剑河县", "三穗县", "雷山县", "黎平县", "岑巩县", "丹寨县"]
1131 | },
1132 | {
1133 | "name": "黔南布依族苗族自治州",
1134 | "areas": ["都匀市", "福泉市", "贵定县", "惠水县", "罗甸县", "瓮安县", "荔波县", "龙里县", "平塘县", "长顺县", "独山县", "三都水族自治县"]
1135 | }
1136 | ]
1137 | },
1138 | {
1139 | "key": "Y",
1140 | "name": "云南省",
1141 | "citys": [
1142 | {
1143 | "name": "昆明市",
1144 | "areas": ["盘龙区", "五华区", "官渡区", "西山区", "东川区", "安宁市", "呈贡县", "晋宁县", "富民县", "宜良县", "嵩明县", "石林彝族自治县", "禄劝彝族苗族自治县", "寻甸回族彝族自治县"]
1145 | },
1146 | {
1147 | "name": "曲靖市",
1148 | "areas": ["麒麟区", "宣威市", "马龙县", "沾益县", "富源县", "罗平县", "师宗县", "陆良县", "会泽县"]
1149 | },
1150 | {
1151 | "name": "玉溪市",
1152 | "areas": ["红塔区", "江川县", "澄江县", "通海县", "华宁县", "易门县", "峨山彝族自治县", "新平彝族傣族自治县", "元江哈尼族彝族傣族自治县"]
1153 | },
1154 | {
1155 | "name": "保山市",
1156 | "areas": ["隆阳区", "施甸县", "腾冲县", "龙陵县", "昌宁县"]
1157 | },
1158 | {
1159 | "name": "昭通市",
1160 | "areas": ["昭阳区", "鲁甸县", "巧家县", "盐津县", "大关县", "永善县", "绥江县", "镇雄县", "彝良县", "威信县", "水富县"]
1161 | },
1162 | {
1163 | "name": "丽江市",
1164 | "areas": ["古城区", "永胜县", "华坪县", "玉龙纳西族自治县", "宁蒗彝族自治县"]
1165 | },
1166 | {
1167 | "name": "普洱市",
1168 | "areas": ["思茅区", "普洱哈尼族彝族自治县", "墨江哈尼族自治县", "景东彝族自治县", "景谷傣族彝族自治县", "镇沅彝族哈尼族拉祜族自治县", "江城哈尼族彝族自治县", "孟连傣族拉祜族佤族自治县", "澜沧拉祜族自治县", "西盟佤族自治县"]
1169 | },
1170 | {
1171 | "name": "临沧市",
1172 | "areas": ["临翔区", "凤庆县", "云县", "永德县", "镇康县", "双江拉祜族佤族布朗族傣族自治县", "耿马傣族佤族自治县", "沧源佤族自治县"]
1173 | },
1174 | {
1175 | "name": "德宏傣族景颇族自治州",
1176 | "areas": ["潞西市", "瑞丽市", "梁河县", "盈江县", "陇川县"]
1177 | },
1178 | {
1179 | "name": "怒江傈僳族自治州",
1180 | "areas": ["泸水县", "福贡县", "贡山独龙族怒族自治县", "兰坪白族普米族自治县"]
1181 | },
1182 | {
1183 | "name": "迪庆藏族自治州",
1184 | "areas": ["香格里拉县", "德钦县", "维西傈僳族自治县"]
1185 | },
1186 | {
1187 | "name": "大理白族自治州",
1188 | "areas": ["大理市", "祥云县", "宾川县", "弥渡县", "永平县", "云龙县", "洱源县", "剑川县", "鹤庆县", "漾濞彝族自治县", "南涧彝族自治县", "巍山彝族回族自治县"]
1189 | },
1190 | {
1191 | "name": "楚雄彝族自治州",
1192 | "areas": ["楚雄市", "双柏县", "牟定县", "南华县", "姚安县", "大姚县", "永仁县", "元谋县", "武定县", "禄丰县"]
1193 | },
1194 | {
1195 | "name": "红河哈尼族彝族自治州",
1196 | "areas": ["蒙自县", "个旧市", "开远市", "绿春县", "建水县", "石屏县", "弥勒县", "泸西县", "元阳县", "红河县", "金平苗族瑶族傣族自治县", "河口瑶族自治县", "屏边苗族自治县"]
1197 | },
1198 | {
1199 | "name": "文山壮族苗族自治州",
1200 | "areas": ["文山县", "砚山县", "西畴县", "麻栗坡县", "马关县", "丘北县", "广南县", "富宁县"]
1201 | },
1202 | {
1203 | "name": "西双版纳傣族自治州",
1204 | "areas": ["景洪市", "勐海县", "勐腊县"]
1205 | }
1206 | ]
1207 | },
1208 | {
1209 | "key": "G",
1210 | "name": "广西自治区",
1211 | "citys": [
1212 | {
1213 | "name": "南宁市",
1214 | "areas": ["青秀区", "兴宁区", "西乡塘区", "良庆区", "江南区", "邕宁区", "武鸣县", "隆安县", "马山县", "上林县", "宾阳县", "横县"]
1215 | },
1216 | {
1217 | "name": "柳州市",
1218 | "areas": ["城中区", "鱼峰区", "柳北区", "柳南区", "柳江县", "柳城县", "鹿寨县", "融安县", "融水苗族自治县", "三江侗族自治县"]
1219 | },
1220 | {
1221 | "name": "桂林市",
1222 | "areas": ["象山区", "秀峰区", "叠彩区", "七星区", "雁山区", "阳朔县", "临桂县", "灵川县", "全州县", "平乐县", "兴安县", "灌阳县", "荔浦县", "资源县", "永福县", "龙胜各族自治县", "恭城瑶族自治县"]
1223 | },
1224 | {
1225 | "name": "梧州市",
1226 | "areas": ["万秀区", "蝶山区", "长洲区", "岑溪市", "苍梧县", "藤县", "蒙山县"]
1227 | },
1228 | {
1229 | "name": "北海市",
1230 | "areas": ["海城区", "银海区", "铁山港区", "合浦县"]
1231 | },
1232 | {
1233 | "name": "防城港市",
1234 | "areas": ["港口区", "防城区", "东兴市", "上思县"]
1235 | },
1236 | {
1237 | "name": "钦州市",
1238 | "areas": ["钦南区", "钦北区", "灵山县", "浦北县"]
1239 | },
1240 | {
1241 | "name": "贵港市",
1242 | "areas": ["港北区", "港南区", "覃塘区", "桂平市", "平南县"]
1243 | },
1244 | {
1245 | "name": "玉林市",
1246 | "areas": ["玉州区", "北流市", "容县", "陆川县", "博白县", "兴业县"]
1247 | },
1248 | {
1249 | "name": "百色市",
1250 | "areas": ["右江区", "凌云县", "平果县", "西林县", "乐业县", "德保县", "田林县", "田阳县", "靖西县", "田东县", "那坡县", "隆林各族自治县"]
1251 | },
1252 | {
1253 | "name": "贺州市",
1254 | "areas": ["八步区", "钟山县", "昭平县", "富川瑶族自治县"]
1255 | },
1256 | {
1257 | "name": "河池市",
1258 | "areas": ["金城江区", "宜州市", "天峨县", "凤山县", "南丹县", "东兰县", "都安瑶族自治县", "罗城仫佬族自治县", "巴马瑶族自治县", "环江毛南族自治县", "大化瑶族自治县"]
1259 | },
1260 | {
1261 | "name": "来宾市",
1262 | "areas": ["兴宾区", "合山市", "象州县", "武宣县", "忻城县", "金秀瑶族自治县"]
1263 | },
1264 | {
1265 | "name": "崇左市",
1266 | "areas": ["江州区", "凭祥市", "宁明县", "扶绥县", "龙州县", "大新县", "天等县"]
1267 | }
1268 | ]
1269 | },
1270 | {
1271 | "key": "H",
1272 | "name": "海南省",
1273 | "citys": [
1274 | {
1275 | "name": "海口市",
1276 | "areas": ["龙华区", "秀英区", "琼山区", "美兰区"]
1277 | },
1278 | {
1279 | "name": "三亚市",
1280 | "areas": ["三亚市"]
1281 | },
1282 | {
1283 | "name": "五指山市",
1284 | "areas": ["五指山市"]
1285 | },
1286 | {
1287 | "name": "琼海市",
1288 | "areas": ["琼海市"]
1289 | },
1290 | {
1291 | "name": "儋州市",
1292 | "areas": ["儋州市"]
1293 | },
1294 | {
1295 | "name": "文昌市",
1296 | "areas": ["文昌市"]
1297 | },
1298 | {
1299 | "name": "万宁市",
1300 | "areas": ["万宁市"]
1301 | },
1302 | {
1303 | "name": "东方市",
1304 | "areas": ["东方市"]
1305 | },
1306 | {
1307 | "name": "澄迈县",
1308 | "areas": ["澄迈县"]
1309 | },
1310 | {
1311 | "name": "定安县",
1312 | "areas": ["定安县"]
1313 | },
1314 | {
1315 | "name": "屯昌县",
1316 | "areas": ["屯昌县"]
1317 | },
1318 | {
1319 | "name": "临高县",
1320 | "areas": ["临高县"]
1321 | },
1322 | {
1323 | "name": "白沙黎族自治县",
1324 | "areas": ["白沙黎族自治县"]
1325 | },
1326 | {
1327 | "name": "昌江黎族自治县",
1328 | "areas": ["昌江黎族自治县"]
1329 | },
1330 | {
1331 | "name": "乐东黎族自治县",
1332 | "areas": ["乐东黎族自治县"]
1333 | },
1334 | {
1335 | "name": "陵水黎族自治县",
1336 | "areas": ["陵水黎族自治县"]
1337 | },
1338 | {
1339 | "name": "保亭黎族苗族自治县",
1340 | "areas": ["保亭黎族苗族自治县"]
1341 | },
1342 | {
1343 | "name": "琼中黎族苗族自治县",
1344 | "areas": ["琼中黎族苗族自治县"]
1345 | }
1346 | ]
1347 | },
1348 | {
1349 | "key": "G",
1350 | "name": "甘肃省",
1351 | "citys": [
1352 | {
1353 | "name": "兰州市",
1354 | "areas": ["城关区", "七里河区", "西固区", "安宁区", "红古区", "永登县", "皋兰县", "榆中县"]
1355 | },
1356 | {
1357 | "name": "嘉峪关市",
1358 | "areas": ["嘉峪关市"]
1359 | },
1360 | {
1361 | "name": "金昌市",
1362 | "areas": ["金川区", "永昌县"]
1363 | },
1364 | {
1365 | "name": "白银市",
1366 | "areas": ["白银区", "平川区", "靖远县", "会宁县", "景泰县"]
1367 | },
1368 | {
1369 | "name": "天水市",
1370 | "areas": ["清水县", "秦安县", "甘谷县", "武山县", "张家川回族自治县", "北道区", "秦城区"]
1371 | },
1372 | {
1373 | "name": "武威市",
1374 | "areas": ["凉州区", "民勤县", "古浪县", "天祝藏族自治县"]
1375 | },
1376 | {
1377 | "name": "酒泉市",
1378 | "areas": ["肃州区", "玉门市", "敦煌市", "金塔县", "肃北蒙古族自治县", "阿克塞哈萨克族自治县", "安西县"]
1379 | },
1380 | {
1381 | "name": "张掖市",
1382 | "areas": ["甘州区", "民乐县", "临泽县", "高台县", "山丹县", "肃南裕固族自治县"]
1383 | },
1384 | {
1385 | "name": "庆阳市",
1386 | "areas": ["西峰区", "庆城县", "环县", "华池县", "合水县", "正宁县", "宁县", "镇原县"]
1387 | },
1388 | {
1389 | "name": "平凉市",
1390 | "areas": ["崆峒区", "泾川县", "灵台县", "崇信县", "华亭县", "庄浪县", "静宁县"]
1391 | },
1392 | {
1393 | "name": "定西市",
1394 | "areas": ["安定区", "通渭县", "临洮县", "漳县", "岷县", "渭源县", "陇西县"]
1395 | },
1396 | {
1397 | "name": "陇南市",
1398 | "areas": ["武都区", "成县", "宕昌县", "康县", "文县", "西和县", "礼县", "两当县", "徽县"]
1399 | },
1400 | {
1401 | "name": "临夏回族自治州",
1402 | "areas": ["临夏市", "临夏县", "康乐县", "永靖县", "广河县", "和政县", "东乡族自治县", "积石山保安族东乡族撒拉族自治县"]
1403 | },
1404 | {
1405 | "name": "甘南藏族自治州",
1406 | "areas": ["合作市", "临潭县", "卓尼县", "舟曲县", "迭部县", "玛曲县", "碌曲县", "夏河县"]
1407 | }
1408 | ]
1409 | },
1410 | {
1411 | "key": "Q",
1412 | "name": "青海省",
1413 | "citys": [
1414 | {
1415 | "name": "西宁市",
1416 | "areas": ["城中区", "城东区", "城西区", "城北区", "湟源县", "湟中县", "大通回族土族自治县"]
1417 | },
1418 | {
1419 | "name": "海东地区市",
1420 | "areas": ["平安县", "乐都县", "民和回族土族自治县", "互助土族自治县", "化隆回族自治县", "循化撒拉族自治县"]
1421 | },
1422 | {
1423 | "name": "海北藏族自治州",
1424 | "areas": ["海晏县", "祁连县", "刚察县", "门源回族自治县"]
1425 | },
1426 | {
1427 | "name": "海南藏族自治州",
1428 | "areas": ["共和县", "同德县", "贵德县", "兴海县", "贵南县"]
1429 | },
1430 | {
1431 | "name": "黄南藏族自治州",
1432 | "areas": ["同仁县", "尖扎县", "泽库县", "河南蒙古族自治县"]
1433 | },
1434 | {
1435 | "name": "果洛藏族自治州",
1436 | "areas": ["玛沁县", "班玛县", "甘德县", "达日县", "久治县", "玛多县"]
1437 | },
1438 | {
1439 | "name": "玉树藏族自治州",
1440 | "areas": ["玉树县", "杂多县", "称多县", "治多县", "囊谦县", "曲麻莱县"]
1441 | },
1442 | {
1443 | "name": "海西蒙古族藏族自治州",
1444 | "areas": ["德令哈市", "格尔木市", "乌兰县", "都兰县", "天峻县"]
1445 | }
1446 | ]
1447 | },
1448 | {
1449 | "key": "N",
1450 | "name": "内蒙古自治区",
1451 | "citys": [
1452 | {
1453 | "name": "呼和浩特市",
1454 | "areas": ["新城区", "回民区", "玉泉区", "赛罕区", "土默特左旗", "托克托县", "和林格尔县", "清水河县", "武川县"]
1455 | },
1456 | {
1457 | "name": "包头市",
1458 | "areas": ["东河区", "昆都伦区", "青山区", "石拐矿区", "白云矿区", "土默特右旗", "固阳县", "达尔罕茂明安联合旗"]
1459 | },
1460 | {
1461 | "name": "乌海市",
1462 | "areas": ["海勃湾区", "海南区", "乌达区"]
1463 | },
1464 | {
1465 | "name": "赤峰市",
1466 | "areas": ["红山区", "元宝山区", "松山区", "阿鲁科尔沁旗", "巴林左旗", "巴林右旗", "林西县", "克什克腾旗", "翁牛特旗", "喀喇沁旗", "宁城县", "敖汉旗"]
1467 | },
1468 | {
1469 | "name": "呼伦贝尔市",
1470 | "areas": ["海拉尔市", "满洲里市", "扎兰屯市", "牙克石市", "根河市", "额尔古纳市", "阿荣旗", "莫力达瓦达斡尔族自治旗", "鄂伦春自治旗", "鄂温克族自治旗", "新巴尔虎右旗", "新巴尔虎左旗", "陈巴尔虎旗"]
1471 | },
1472 | {
1473 | "name": "兴安盟市",
1474 | "areas": ["乌兰浩特市", "阿尔山市", "科尔沁右翼前旗", "科尔沁右翼中旗", "扎赉特旗", "突泉县"]
1475 | },
1476 | {
1477 | "name": "通辽市",
1478 | "areas": ["科尔沁区", "霍林郭勒市", "科尔沁左翼中旗", "科尔沁左翼后旗", "开鲁县", "库伦旗", "奈曼旗", "扎鲁特旗"]
1479 | },
1480 | {
1481 | "name": "锡林郭勒盟市",
1482 | "areas": ["二连浩特市", "锡林浩特市", "阿巴嘎旗", "苏尼特左旗", "苏尼特右旗", "东乌珠穆沁旗", "西乌珠穆沁旗", "太仆寺旗", "镶黄旗", "正镶白旗", "正蓝旗", "多伦县"]
1483 | },
1484 | {
1485 | "name": "乌兰察布盟市",
1486 | "areas": ["集宁市", "丰镇市", "卓资县", "化德县", "商都县", "兴和县", "凉城县", "察哈尔右翼前旗", "察哈尔右翼中旗", "察哈尔右翼后旗", "四子王旗"]
1487 | },
1488 | {
1489 | "name": "伊克昭盟市",
1490 | "areas": ["东胜市", "达拉特旗", "准格尔旗", "鄂托克前旗", "鄂托克旗", "杭锦旗", "乌审旗", "伊金霍洛旗"]
1491 | },
1492 | {
1493 | "name": "巴彦淖尔盟市",
1494 | "areas": ["临河市", "五原县", "磴口县", "乌拉特前旗", "乌拉特中旗", "乌拉特后旗", "杭锦后旗"]
1495 | },
1496 | {
1497 | "name": "阿拉善盟市",
1498 | "areas": ["阿拉善左旗", "阿拉善右旗", "额济纳旗"]
1499 | }
1500 | ]
1501 | },
1502 | {
1503 | "key": "N",
1504 | "name": "宁夏自治区",
1505 | "citys": [
1506 | {
1507 | "name": "银川市",
1508 | "areas": ["兴庆区", "西夏区", "金凤区", "灵武市", "永宁县", "贺兰县"]
1509 | },
1510 | {
1511 | "name": "石嘴山市",
1512 | "areas": ["大武口区", "惠农区", "平罗县"]
1513 | },
1514 | {
1515 | "name": "吴忠市",
1516 | "areas": ["利通区", "青铜峡市", "盐池县", "同心县"]
1517 | },
1518 | {
1519 | "name": "固原市",
1520 | "areas": ["原州区", "西吉县", "隆德县", "泾源县", "彭阳县"]
1521 | },
1522 | {
1523 | "name": "中卫市",
1524 | "areas": ["沙坡头区", "中宁县", "海原县"]
1525 | }
1526 | ]
1527 | },
1528 | {
1529 | "key": "X",
1530 | "name": "西藏自治区",
1531 | "citys": [
1532 | {
1533 | "name": "拉萨市",
1534 | "areas": ["城关区", "林周县", "当雄县", "尼木县", "曲水县", "堆龙德庆县", "达孜县", "墨竹工卡县"]
1535 | },
1536 | {
1537 | "name": "那曲地区市",
1538 | "areas": ["那曲县", "嘉黎县", "比如县", "聂荣县", "安多县", "申扎县", "索县", "班戈县", "巴青县", "尼玛县"]
1539 | },
1540 | {
1541 | "name": "昌都地区市",
1542 | "areas": ["昌都县", "江达县", "贡觉县", "类乌齐县", "丁青县", "察雅县", "八宿县", "左贡县", "芒康县", "洛隆县", "边坝县"]
1543 | },
1544 | {
1545 | "name": "林芝地区市",
1546 | "areas": ["林芝县", "工布江达县", "米林县", "墨脱县", "波密县", "察隅县", "朗县"]
1547 | },
1548 | {
1549 | "name": "山南地区市",
1550 | "areas": ["乃东县", "扎囊县", "贡嘎县", "桑日县", "琼结县", "曲松县", "措美县", "洛扎县", "加查县", "隆子县", "错那县", "浪卡子县"]
1551 | },
1552 | {
1553 | "name": "日喀则地区市",
1554 | "areas": ["日喀则市", "南木林县", "江孜县", "定日县", "萨迦县", "拉孜县", "昂仁县", "谢通门县", "白朗县", "仁布县", "康马县", "定结县", "仲巴县", "亚东县", "吉隆县", "聂拉木县", "萨嘎县", "岗巴县"]
1555 | },
1556 | {
1557 | "name": "阿里地区市",
1558 | "areas": ["噶尔县", "普兰县", "札达县", "日土县", "革吉县", "改则县", "措勤县"]
1559 | }
1560 | ]
1561 | },
1562 | {
1563 | "key": "X",
1564 | "name": "新疆自治区",
1565 | "citys": [
1566 | {
1567 | "name": "乌鲁木齐市",
1568 | "areas": ["天山区", "沙依巴克区", "新市区", "水磨沟区", "头屯河区", "达坂城区", "东山区", "乌鲁木齐县"]
1569 | },
1570 | {
1571 | "name": "克拉玛依市",
1572 | "areas": ["克拉玛依区", "独山子区", "白碱滩区", "乌尔禾区"]
1573 | },
1574 | {
1575 | "name": "吐鲁番地区市",
1576 | "areas": ["吐鲁番市", "托克逊县", "鄯善县"]
1577 | },
1578 | {
1579 | "name": "哈密地区市",
1580 | "areas": ["哈密市", "伊吾县", "巴里坤哈萨克自治县"]
1581 | },
1582 | {
1583 | "name": "和田地区市",
1584 | "areas": ["和田市", "和田县", "洛浦县", "民丰县", "皮山县", "策勒县", "于田县", "墨玉县"]
1585 | },
1586 | {
1587 | "name": "阿克苏地区市",
1588 | "areas": ["阿克苏市", "温宿县", "沙雅县", "拜城县", "阿瓦提县", "库车县", "柯坪县", "新和县", "乌什县"]
1589 | },
1590 | {
1591 | "name": "喀什地区市",
1592 | "areas": ["喀什市", "巴楚县", "泽普县", "伽师县", "叶城县", "岳普湖县", "疏勒县", "麦盖提县", "英吉沙县", "莎车县", "疏附县", "塔什库尔干塔吉克自治县"]
1593 | },
1594 | {
1595 | "name": "克孜勒苏柯尔克孜自治州",
1596 | "areas": ["阿图什市", "阿合奇县", "乌恰县", "阿克陶县"]
1597 | },
1598 | {
1599 | "name": "巴音郭楞蒙古自治州",
1600 | "areas": ["库尔勒市", "和静县", "尉犁县", "和硕县", "且末县", "博湖县", "轮台县", "若羌县", "焉耆回族自治县"]
1601 | },
1602 | {
1603 | "name": "昌吉回族自治州",
1604 | "areas": ["昌吉市", "阜康市", "奇台县", "玛纳斯县", "吉木萨尔县", "呼图壁县", "木垒哈萨克自治县", "米泉市"]
1605 | },
1606 | {
1607 | "name": "博尔塔拉蒙古自治州",
1608 | "areas": ["博乐市", "精河县", "温泉县"]
1609 | },
1610 | {
1611 | "name": "石河子市",
1612 | "areas": ["石河子"]
1613 | },
1614 | {
1615 | "name": "阿拉尔市",
1616 | "areas": ["阿拉尔"]
1617 | },
1618 | {
1619 | "name": "图木舒克市",
1620 | "areas": ["图木舒克"]
1621 | },
1622 | {
1623 | "name": "五家渠市",
1624 | "areas": ["五家渠"]
1625 | },
1626 | {
1627 | "name": "伊犁哈萨克自治州",
1628 | "areas": ["伊宁市", "奎屯市", "伊宁县", "特克斯县", "尼勒克县", "昭苏县", "新源县", "霍城县", "巩留县", "察布查尔锡伯自治县", "塔城地区", "阿勒泰地区"]
1629 | }
1630 | ]
1631 | },
1632 | {
1633 | "key": "T",
1634 | "name": "台湾省",
1635 | "citys": [
1636 | {
1637 | "name": "台湾省",
1638 | "areas": ["台北市", "高雄市", "台北县", "桃园县", "新竹县", "苗栗县", "台中县", "彰化县", "南投县", "云林县", "嘉义县", "台南县", "高雄县", "屏东县", "宜兰县", "花莲县", "台东县", "澎湖县", "基隆市", "新竹市", "台中市", "嘉义市", "台南市"]
1639 | }
1640 | ]
1641 | },
1642 | {
1643 | "key": "A",
1644 | "name": "澳门",
1645 | "citys": [
1646 | {
1647 | "name": "澳门",
1648 | "areas": ["花地玛堂区", "圣安多尼堂区", "大堂区", "望德堂区", "风顺堂区", "嘉模堂区", "圣方济各堂区", "路凼"]
1649 | }
1650 | ]
1651 | },
1652 | {
1653 | "key": "X",
1654 | "name": "香港",
1655 | "citys": [
1656 | {
1657 | "name": "香港",
1658 | "areas": ["中西区", "湾仔区", "东区", "南区", "深水埗区", "油尖旺区", "九龙城区", "黄大仙区", "观塘区", "北区", "大埔区", "沙田区", "西贡区", "元朗区", "屯门区", "荃湾区", "葵青区", "离岛区"]
1659 | }
1660 | ]
1661 | }
1662 | ];
--------------------------------------------------------------------------------
/src/icityer/icityer.wpy:
--------------------------------------------------------------------------------
1 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | {{provinces.name}}
132 |
133 | {{citys.name}}
134 | {{areas}}
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 | {{nav}}
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 | {{item.area}}-{{item.city}}-{{item.province}}
154 |
155 |
156 |
157 |
158 |
323 |
--------------------------------------------------------------------------------
/src/icityer/icon/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HellyW/wepy-com-icityer/378791d7566310fb3d1fbf0c57d40fe8f4be1348/src/icityer/icon/search.png
--------------------------------------------------------------------------------
/src/pages/index.wpy:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
37 |
--------------------------------------------------------------------------------
/wepy.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | var prod = process.env.NODE_ENV === 'production'
3 |
4 | module.exports = {
5 | wpyExt: '.wpy',
6 | build: {
7 | web: {
8 | htmlTemplate: path.join('src', 'index.template.html'),
9 | htmlOutput: path.join('web', 'index.html'),
10 | jsOutput: path.join('web', 'index.js')
11 | }
12 | },
13 | resolve: {
14 | alias: {
15 | '@': path.join(__dirname, 'src')
16 | },
17 | modules: ['node_modules']
18 | },
19 | eslint: true,
20 | compilers: {
21 | less: {
22 | compress: true
23 | },
24 | /*sass: {
25 | outputStyle: 'compressed'
26 | },*/
27 | babel: {
28 | sourceMap: true,
29 | presets: [
30 | 'env'
31 | ],
32 | plugins: [
33 | 'transform-class-properties',
34 | 'transform-decorators-legacy',
35 | 'transform-object-rest-spread',
36 | 'transform-export-extensions',
37 | ]
38 | }
39 | },
40 | plugins: {
41 | },
42 | appConfig: {
43 | noPromiseAPI: ['createSelectorQuery']
44 | }
45 | }
46 |
47 | if (prod) {
48 |
49 | delete module.exports.compilers.babel.sourcesMap;
50 | // 压缩sass
51 | // module.exports.compilers['sass'] = {outputStyle: 'compressed'}
52 |
53 | // 压缩less
54 | module.exports.compilers['less'] = {compress: true}
55 |
56 | // 压缩js
57 | module.exports.plugins = {
58 | uglifyjs: {
59 | filter: /\.js$/,
60 | config: {
61 | }
62 | },
63 | imagemin: {
64 | filter: /\.(jpg|png|jpeg)$/,
65 | config: {
66 | jpg: {
67 | quality: 80
68 | },
69 | png: {
70 | quality: 80
71 | }
72 | }
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------