unknown
2 days ago
39 changed files with 67136 additions and 55 deletions
-
8config/api.js
-
2config/site.config.js
-
2manifest.json
-
61node_modules/.package-lock.json
-
21node_modules/vue-jsonp/LICENSE
-
153node_modules/vue-jsonp/README.md
-
73node_modules/vue-jsonp/dist/index.d.ts
-
8node_modules/vue-jsonp/dist/index.esm.js
-
8node_modules/vue-jsonp/dist/index.js
-
20node_modules/vue-jsonp/dist/utils/index.d.ts
-
50node_modules/vue-jsonp/package.json
-
71package-lock.json
-
4package.json
-
7pages.json
-
1pages/exercises/brushQuestions/brushQuestions.vue
-
1pages/exercises/brushQuestions/examQuestions.vue
-
28pages/exercises/brushQuestions/wrongQuestions.vue
-
7pages/exercises/categoryExercises/categoryExercises.vue
-
5pages/exercises/chapter/chapter.vue
-
5pages/exercises/queTypeExercises/queTypeExercises.vue
-
5pages/exercises/theoryStudy/theoryStudy.vue
-
2pages/exercises/wrongQuestion/wrongQuestion.vue
-
30009pages/index/comp/allCity.js
-
512pages/index/comp/city - 副本.vue
-
1121pages/index/comp/city.js
-
514pages/index/comp/city.vue
-
19pages/index/comp/hotCity.js
-
151pages/index/index.vue
-
BINstatic/images/back_img.png
-
BINstatic/images/dingweis.png
-
2store/modules/car.js
-
15unpackage/dist/cache/.vite/deps/_metadata.json
-
76unpackage/dist/cache/.vite/deps/vue-jsonp.js
-
7unpackage/dist/cache/.vite/deps/vue-jsonp.js.map
-
BINutils/省市区编码表及JSON文件.zip
-
3742utils/省市区编码表及JSON文件/区编码表.txt
-
396utils/省市区编码表及JSON文件/城市编码表.txt
-
35utils/省市区编码表及JSON文件/省份编码表.txt
-
30050utils/省市区编码表及JSON文件/省市区三级联动结构JSON数据服务.json
@ -0,0 +1,21 @@ |
|||
MIT License |
|||
|
|||
Copyright (c) 2020 LancerComet |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
of this software and associated documentation files (the "Software"), to deal |
|||
in the Software without restriction, including without limitation the rights |
|||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
copies of the Software, and to permit persons to whom the Software is |
|||
furnished to do so, subject to the following conditions: |
|||
|
|||
The above copyright notice and this permission notice shall be included in all |
|||
copies or substantial portions of the Software. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
SOFTWARE. |
@ -0,0 +1,153 @@ |
|||
# Vue-jsonp |
|||
|
|||
[![VueJsonp](https://github.com/LancerComet/vue-jsonp/workflows/Test/badge.svg)](https://github.com/LancerComet/vue-jsonp/actions) |
|||
|
|||
A tiny library for handling JSONP request. |
|||
|
|||
## Quick Start |
|||
|
|||
As Vue plugin: |
|||
|
|||
```ts |
|||
import { VueJsonp } from 'vue-jsonp' |
|||
|
|||
// Vue Plugin. |
|||
Vue.use(VueJsonp) |
|||
|
|||
// Now you can use this.$jsonp in Vue components. |
|||
const vm = new Vue() |
|||
vm.$jsonp('/some-jsonp-url', { |
|||
myCustomUrlParam: 'veryNice' |
|||
}) |
|||
``` |
|||
|
|||
Use function directly: |
|||
|
|||
```ts |
|||
import { jsonp } from 'vue-jsonp' |
|||
|
|||
jsonp('/some-jsonp-url', { |
|||
myCustomUrlParam: 'veryNice' |
|||
}) |
|||
``` |
|||
|
|||
## Send data and set query & function name |
|||
|
|||
### Send data |
|||
|
|||
```ts |
|||
// The request url will be "/some-jsonp-url?name=LancerComet&age=100&callback=jsonp_{RANDOM_STR}". |
|||
jsonp('/some-jsonp-url', { |
|||
name: 'LancerComet', |
|||
age: 100 |
|||
}) |
|||
``` |
|||
|
|||
### Custom query & function name |
|||
|
|||
The url uniform is `/url?{callbackQuery}={callbackName}&...`, the default is `/url?callback=jsonp_{RANDOM_STRING}&...`. |
|||
|
|||
And you can change it like this: |
|||
|
|||
```ts |
|||
// The request url will be "/some-jsonp-url?name=LancerComet&age=100&cb=jsonp_func". |
|||
jsonp('/some-jsonp-url', { |
|||
callbackQuery: 'cb', |
|||
callbackName: 'jsonp_func', |
|||
name: 'LancerComet', |
|||
age: 100 |
|||
}) |
|||
``` |
|||
|
|||
## Module exports |
|||
|
|||
- `VueJsonp: PluginObject<never>` |
|||
|
|||
- `jsonp<T>: (url: string, param?: IJsonpParam, timeout?: number) => Promise<T>` |
|||
|
|||
## API |
|||
|
|||
### IJsonpParam |
|||
|
|||
IJsonpParam is the type of param for jsonp function. |
|||
|
|||
```ts |
|||
/** |
|||
* JSONP parameter declaration. |
|||
*/ |
|||
interface IJsonpParam { |
|||
/** |
|||
* Callback query name. |
|||
* This param is used to define the query name of the callback function. |
|||
* |
|||
* @example |
|||
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice" |
|||
* jsonp('/some-url', { |
|||
* callbackQuery: 'myCallback', |
|||
* callbackName: 'jsonp_func', |
|||
* myCustomUrlParam: 'veryNice' |
|||
* }) |
|||
* |
|||
* @default callback |
|||
*/ |
|||
callbackQuery?: string |
|||
|
|||
/** |
|||
* Callback function name. |
|||
* This param is used to define the jsonp function name. |
|||
* |
|||
* @example |
|||
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice" |
|||
* jsonp('/some-url', { |
|||
* callbackQuery: 'myCallback', |
|||
* callbackName: 'jsonp_func', |
|||
* myCustomUrlParam: 'veryNice' |
|||
* }) |
|||
* |
|||
* @default jsonp_ + randomStr() |
|||
*/ |
|||
callbackName?: string |
|||
|
|||
/** |
|||
* Custom data. |
|||
*/ |
|||
[key: string]: any |
|||
} |
|||
``` |
|||
|
|||
## Example |
|||
|
|||
```ts |
|||
import Vue from 'vue' |
|||
import { VueJsonp } from 'vue-jsonp' |
|||
|
|||
Vue.use(VueJsonp) |
|||
|
|||
const vm = new Vue() |
|||
const { code, data, message } = await vm.$jsonp<{ |
|||
code: number, |
|||
message: string, |
|||
data: { |
|||
id: number, |
|||
nickname: string |
|||
} |
|||
}>('/my-awesome-url', { |
|||
name: 'MyName', age: 20 |
|||
}) |
|||
|
|||
assert(code === 0) |
|||
assert(message === 'ok') |
|||
assert(data.id === 1) |
|||
assert(data.nickname === 'John Smith') |
|||
``` |
|||
|
|||
```ts |
|||
import { jsonp } from 'vue-jsonp' |
|||
|
|||
const result = await jsonp<string>('/my-awesome-url') |
|||
assert(result === 'such a jsonp') |
|||
``` |
|||
|
|||
## License |
|||
|
|||
MIT |
@ -0,0 +1,73 @@ |
|||
/** |
|||
* Vue Jsonp. |
|||
* # Carry Your World # |
|||
* |
|||
* @author: LancerComet |
|||
* @license: MIT |
|||
*/ |
|||
import { PluginObject } from 'vue/types/plugin'; |
|||
declare module 'vue/types/vue' { |
|||
interface Vue { |
|||
$jsonp: typeof jsonp; |
|||
} |
|||
} |
|||
/** |
|||
* Vue JSONP. |
|||
*/ |
|||
declare const VueJsonp: PluginObject<never>; |
|||
/** |
|||
* JSONP function. |
|||
* |
|||
* @param { string } url Target URL address. |
|||
* @param { IJsonpParam } param Querying params object. |
|||
* @param { number } timeout Timeout setting (ms). |
|||
* |
|||
* @example |
|||
* jsonp('/url', { |
|||
* callbackQuery: '' |
|||
* callbackName: '', |
|||
* name: 'LancerComet', |
|||
* age: 26 |
|||
* }, 1000) |
|||
*/ |
|||
declare function jsonp<T = any>(url: string, param?: IJsonpParam, timeout?: number): Promise<T>; |
|||
export { VueJsonp, jsonp }; |
|||
/** |
|||
* JSONP parameter declaration. |
|||
*/ |
|||
interface IJsonpParam { |
|||
/** |
|||
* Callback query name. |
|||
* This param is used to define the query name of the callback function. |
|||
* |
|||
* @example |
|||
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
|
|||
* jsonp('/some-url', { |
|||
* callbackQuery: 'myCallback', |
|||
* callbackName: 'jsonp_func', |
|||
* myCustomUrlParam: 'veryNice' |
|||
* }) |
|||
* |
|||
* @default callback |
|||
*/ |
|||
callbackQuery?: string; |
|||
/** |
|||
* Callback function name. |
|||
* This param is used to define the jsonp function name. |
|||
* |
|||
* @example |
|||
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
|
|||
* jsonp('/some-url', { |
|||
* callbackQuery: 'myCallback', |
|||
* callbackName: 'jsonp_func', |
|||
* myCustomUrlParam: 'veryNice' |
|||
* }) |
|||
* |
|||
* @default jsonp_ + randomStr() |
|||
*/ |
|||
callbackName?: string; |
|||
/** |
|||
* Custom data. |
|||
*/ |
|||
[key: string]: any; |
|||
} |
@ -0,0 +1,8 @@ |
|||
function e(t,n){t=t.replace(/=/g,"");var o=[];switch(n.constructor){case String:case Number:case Boolean:o.push(encodeURIComponent(t)+"="+encodeURIComponent(n));break;case Array:n.forEach((function(n){o=o.concat(e(t+"[]=",n))}));break;case Object:Object.keys(n).forEach((function(r){var a=n[r];o=o.concat(e(t+"["+r+"]",a))}))}return o}function t(e){var n=[];return e.forEach((function(e){"string"==typeof e?n.push(e):n=n.concat(t(e))})),n} |
|||
/** |
|||
* Vue Jsonp. |
|||
* # Carry Your World # |
|||
* |
|||
* @author: LancerComet |
|||
* @license: MIT |
|||
*/var n={install:function(e){e.prototype.$jsonp=o}};function o(n,o,r){if(void 0===o&&(o={}),"string"!=typeof n)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof o||!o)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r="number"==typeof r?r:5e3,new Promise((function(a,c){var u="string"==typeof o.callbackQuery?o.callbackQuery:"callback",i="string"==typeof o.callbackName?o.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);o[u]=i,delete o.callbackQuery,delete o.callbackName;var s=[];Object.keys(o).forEach((function(t){s=s.concat(e(t,o[t]))}));var l=t(s).join("&"),f=function(){p(),clearTimeout(m),c({status:400,statusText:"Bad Request"})},p=function(){b.removeEventListener("error",f)},d=function(){document.body.removeChild(b),delete window[i]},m=null;r>-1&&(m=setTimeout((function(){p(),d(),c({statusText:"Request Timeout",status:408})}),r)),window[i]=function(e){clearTimeout(m),p(),d(),a(e)};var b=document.createElement("script");b.addEventListener("error",f),b.src=n+(/\?/.test(n)?"&":"?")+l,document.body.appendChild(b)}))}export{n as VueJsonp,o as jsonp}; |
@ -0,0 +1,8 @@ |
|||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueJsonp={})}(this,(function(e){"use strict";function t(e,o){e=e.replace(/=/g,"");var n=[];switch(o.constructor){case String:case Number:case Boolean:n.push(encodeURIComponent(e)+"="+encodeURIComponent(o));break;case Array:o.forEach((function(o){n=n.concat(t(e+"[]=",o))}));break;case Object:Object.keys(o).forEach((function(r){var c=o[r];n=n.concat(t(e+"["+r+"]",c))}))}return n}function o(e){var t=[];return e.forEach((function(e){"string"==typeof e?t.push(e):t=t.concat(o(e))})),t} |
|||
/** |
|||
* Vue Jsonp. |
|||
* # Carry Your World # |
|||
* |
|||
* @author: LancerComet |
|||
* @license: MIT |
|||
*/var n={install:function(e){e.prototype.$jsonp=r}};function r(e,n,r){if(void 0===n&&(n={}),"string"!=typeof e)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof n||!n)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r="number"==typeof r?r:5e3,new Promise((function(c,a){var i="string"==typeof n.callbackQuery?n.callbackQuery:"callback",s="string"==typeof n.callbackName?n.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);n[i]=s,delete n.callbackQuery,delete n.callbackName;var u=[];Object.keys(n).forEach((function(e){u=u.concat(t(e,n[e]))}));var f=o(u).join("&"),l=function(){p(),clearTimeout(b),a({status:400,statusText:"Bad Request"})},p=function(){m.removeEventListener("error",l)},d=function(){document.body.removeChild(m),delete window[s]},b=null;r>-1&&(b=setTimeout((function(){p(),d(),a({statusText:"Request Timeout",status:408})}),r)),window[s]=function(e){clearTimeout(b),p(),d(),c(e)};var m=document.createElement("script");m.addEventListener("error",l),m.src=e+(/\?/.test(e)?"&":"?")+f,document.body.appendChild(m)}))}e.VueJsonp=n,e.jsonp=r,Object.defineProperty(e,"__esModule",{value:!0})})); |
@ -0,0 +1,20 @@ |
|||
/** |
|||
* Generate random string. |
|||
* |
|||
* @return { string } |
|||
*/ |
|||
declare function randomStr(): string; |
|||
/** |
|||
* Format params into querying string. |
|||
* |
|||
* @return {string[]} |
|||
*/ |
|||
declare function formatParams(queryKey: string, value: any): string[]; |
|||
/** |
|||
* Flat querys. |
|||
* |
|||
* @param {string[] | (string[])[]} array |
|||
* @returns |
|||
*/ |
|||
declare function flatten(array: string[] | (string[])[]): string[]; |
|||
export { formatParams, flatten, randomStr }; |
@ -0,0 +1,50 @@ |
|||
{ |
|||
"name": "vue-jsonp", |
|||
"version": "2.0.0", |
|||
"description": "A tiny library for handling JSONP request.", |
|||
"main": "./dist/index.js", |
|||
"module": "./dist/index.esm.js", |
|||
"keywords": [ |
|||
"Vue", |
|||
"JSONP" |
|||
], |
|||
"files": [ |
|||
"dist/", |
|||
"index.d.ts", |
|||
"README.md" |
|||
], |
|||
"scripts": { |
|||
"build": "rollup -c", |
|||
"test": "jest", |
|||
"pretest": "npm run build", |
|||
"preversion": "npm run test", |
|||
"prepublish": "npm run test" |
|||
}, |
|||
"author": { |
|||
"name": "LancerComet", |
|||
"email": "chw644@hotmail.com" |
|||
}, |
|||
"repository": { |
|||
"type": "git", |
|||
"url": "https://github.com/LancerComet/vue-jsonp.git" |
|||
}, |
|||
"license": "MIT", |
|||
"devDependencies": { |
|||
"@types/expect-puppeteer": "^4.4.3", |
|||
"@types/jest": "^26.0.14", |
|||
"@types/jest-environment-puppeteer": "^4.4.0", |
|||
"@types/puppeteer": "^3.0.2", |
|||
"jest": "^26.4.2", |
|||
"jest-puppeteer": "^4.4.0", |
|||
"puppeteer": "^5.3.1", |
|||
"rollup": "^2.28.2", |
|||
"rollup-plugin-cleanup": "^3.2.1", |
|||
"rollup-plugin-delete": "^2.0.0", |
|||
"rollup-plugin-terser": "^7.0.2", |
|||
"rollup-plugin-typescript2": "^0.27.3", |
|||
"ts-jest": "^26.4.1", |
|||
"tslint": "^6.1.3", |
|||
"typescript": "^4.0.3", |
|||
"vue": "^2.6.12" |
|||
} |
|||
} |
@ -1,30 +1,83 @@ |
|||
{ |
|||
"name": "questionbankvue3", |
|||
"version": "1.0.0", |
|||
"lockfileVersion": 1, |
|||
"lockfileVersion": 3, |
|||
"requires": true, |
|||
"dependencies": { |
|||
"@vue/devtools-api": { |
|||
"packages": { |
|||
"": { |
|||
"name": "questionbankvue3", |
|||
"version": "1.0.0", |
|||
"license": "ISC", |
|||
"dependencies": { |
|||
"js-md5": "^0.8.3", |
|||
"pinia": "^2.2.4", |
|||
"vue-jsonp": "^2.0.0" |
|||
}, |
|||
"devDependencies": {} |
|||
}, |
|||
"node_modules/@vue/devtools-api": { |
|||
"version": "6.6.4", |
|||
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz", |
|||
"integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==" |
|||
}, |
|||
"js-md5": { |
|||
"version": "0.8.3" |
|||
"node_modules/js-md5": { |
|||
"version": "0.8.3", |
|||
"integrity": "sha512-qR0HB5uP6wCuRMrWPTrkMaev7MJZwJuuw4fnwAzRgP4J4/F8RwtodOKpGp4XpqsLBFzzgqIO42efFAyz2Et6KQ==" |
|||
}, |
|||
"pinia": { |
|||
"node_modules/pinia": { |
|||
"version": "2.2.4", |
|||
"resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.2.4.tgz", |
|||
"integrity": "sha512-K7ZhpMY9iJ9ShTC0cR2+PnxdQRuwVIsXDO/WIEV/RnMC/vmSoKDTKW/exNQYPI+4ij10UjXqdNiEHwn47McANQ==", |
|||
"requires": { |
|||
"dependencies": { |
|||
"@vue/devtools-api": "^6.6.3", |
|||
"vue-demi": "^0.14.10" |
|||
}, |
|||
"funding": { |
|||
"url": "https://github.com/sponsors/posva" |
|||
}, |
|||
"peerDependencies": { |
|||
"@vue/composition-api": "^1.4.0", |
|||
"typescript": ">=4.4.4", |
|||
"vue": "^2.6.14 || ^3.3.0" |
|||
}, |
|||
"peerDependenciesMeta": { |
|||
"@vue/composition-api": { |
|||
"optional": true |
|||
}, |
|||
"typescript": { |
|||
"optional": true |
|||
} |
|||
} |
|||
}, |
|||
"vue-demi": { |
|||
"node_modules/vue-demi": { |
|||
"version": "0.14.10", |
|||
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz", |
|||
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==" |
|||
"integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", |
|||
"hasInstallScript": true, |
|||
"bin": { |
|||
"vue-demi-fix": "bin/vue-demi-fix.js", |
|||
"vue-demi-switch": "bin/vue-demi-switch.js" |
|||
}, |
|||
"engines": { |
|||
"node": ">=12" |
|||
}, |
|||
"funding": { |
|||
"url": "https://github.com/sponsors/antfu" |
|||
}, |
|||
"peerDependencies": { |
|||
"@vue/composition-api": "^1.0.0-rc.1", |
|||
"vue": "^3.0.0-0 || ^2.6.0" |
|||
}, |
|||
"peerDependenciesMeta": { |
|||
"@vue/composition-api": { |
|||
"optional": true |
|||
} |
|||
} |
|||
}, |
|||
"node_modules/vue-jsonp": { |
|||
"version": "2.0.0", |
|||
"resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz", |
|||
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==" |
|||
} |
|||
} |
|||
} |
30009
pages/index/comp/allCity.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,512 @@ |
|||
<template> |
|||
<div class="wrapper" :style="'top:'+statusBarHeight+'px'"> |
|||
<div class="header"> |
|||
<!-- <view class="back_div"> |
|||
<image class="back_img" @click="back_city()" src="@/static/images/back_img.png" mode=""></image> |
|||
</view> --> |
|||
<input class="input" @input="onInput" placeholder="搜索 中文/拼音/首字母" v-model="searchValue" /> |
|||
</div> |
|||
<scroll-view class="calendar-list" scroll-y="true" :scroll-into-view="scrollIntoId"> |
|||
<view v-if="disdingwei" id="hot"> |
|||
<!-- 定位模块 --> |
|||
<view class="dingwei"> |
|||
<view class="dingwei_Tips"> |
|||
当前定位 |
|||
</view> |
|||
<view class="dingwei_city"> |
|||
<view class="dingwei_city_one" @click="back_city(currentCity)"> |
|||
{{currentCity.cityName}} |
|||
</view> |
|||
<view class="dingweis_div" @click="getWarpweft"> |
|||
<image class="dingweis" src="@/static/images/dingweis.png" mode=""></image> |
|||
<text>{{po_tips}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 最近模块 --> |
|||
<view class="dingwei"> |
|||
<view class="dingwei_Tips"> |
|||
热门城市 |
|||
</view> |
|||
<view class="dingwei_city dingwei_city_zuijin"> |
|||
<view class="dingwei_city_one toright" v-for="(item,index) in hotCity" @click="back_city(item)"> |
|||
{{item.cityName}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
|
|||
|
|||
<!-- 城市列表 --> |
|||
<view v-if="searchValue == ''" v-for="(item, index) in list" :id="getId(index)" :key="index"> |
|||
<view class="letter-header">{{ getId(index) }}</view> |
|||
<view class="city-div" v-for="(city, i) in item" :key="i" @click="back_city(city)"> |
|||
<text class="city">{{ city.cityName }}</text> |
|||
</view> |
|||
</view> |
|||
<!-- 搜索结果 --> |
|||
<view class="city-div" v-for="(item, index) in searchList" @click="back_city(item)"> |
|||
<text class="city">{{ item.cityName }}</text> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<!-- 右侧字母 --> |
|||
<view class="letters" v-if="searchValue == ''"> |
|||
<view class="letters-item" @click="scrollTo('hot')">最近</view> |
|||
<view class="letters-item" v-for="item in letter" :key="item" @click="scrollTo(item)">{{ item }}</view> |
|||
</view> |
|||
|
|||
<!-- 选中之后字母 --> |
|||
<view class="mask" v-if="showMask"> |
|||
<view class="mask-r">{{selectLetter}}</view> |
|||
</view> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Citys from './city.js'; |
|||
import allCity from './allCity.js' |
|||
import HotCity from './HotCity.js' |
|||
import carStore from '@/store/modules/car.js' |
|||
let usecarStore = carStore() |
|||
|
|||
import { |
|||
jsonp |
|||
} from 'vue-jsonp' |
|||
export default { |
|||
|
|||
|
|||
data() { |
|||
return { |
|||
statusBarHeight: this.statusBarHeight, |
|||
ImgUrl: this.ImgUrl, |
|||
letter: [], |
|||
selectLetter: '', |
|||
searchValue: '', |
|||
scrollIntoId: '', |
|||
list: [], |
|||
tId: null, |
|||
searchList: [], |
|||
showMask: false, |
|||
disdingwei: true, |
|||
Visit: [], //最近访问 |
|||
currentCity: ' ', |
|||
longitude: '', //经度 |
|||
latitude: '', //纬度 |
|||
seconds: 3, |
|||
po_tips: '重新定位', |
|||
citys: [], |
|||
hotCity: HotCity |
|||
} |
|||
}, |
|||
|
|||
created() { |
|||
console.log(usecarStore) |
|||
//获取存储的最近访问 |
|||
this.initcity() |
|||
var that = this |
|||
uni.getStorage({ |
|||
key: 'Visit_key', |
|||
success: function(res) { |
|||
that.Visit = res.data |
|||
} |
|||
}); |
|||
//获取定位 经度纬度 |
|||
that.getWarpweft() |
|||
//获取city.js 的程序字母 |
|||
var mu = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'w', 'x', |
|||
'y', |
|||
'z' |
|||
]; |
|||
var tmp = []; |
|||
for (var i = 0; i < mu.length; i++) { |
|||
var item = mu[i]; |
|||
for (var j = 0; j < this.citys.length; j++) { |
|||
var py = this.citys[j].py; |
|||
if (py.substring(0, 1) == item) { |
|||
if (tmp.indexOf(item) == -1) { |
|||
this.list[i] = [this.citys[j]]; |
|||
tmp.push(item); |
|||
this.letter.push(item.toUpperCase()); |
|||
} else { |
|||
this.list[i].push(this.citys[j]); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
initcity() { |
|||
let cityArr = allCity.map(arr => { |
|||
return arr.cityInfoList.map(item => { |
|||
let obj = { |
|||
cityName: item.cityName, |
|||
pinYin: item.cityPinyin, |
|||
py: item.cityAcronym.toLocaleLowerCase(), |
|||
code: item.cityCode, |
|||
cityInitial: item.cityInitial |
|||
} |
|||
return obj |
|||
}) |
|||
}) |
|||
this.citys = cityArr.flat() |
|||
console.log(this.citys) |
|||
}, |
|||
getId(index) { |
|||
return this.letter[index]; |
|||
}, |
|||
|
|||
scrollTo(letter) { |
|||
this.showMask = true |
|||
this.selectLetter = letter == 'hot' ? '最' : letter |
|||
setTimeout(() => { |
|||
this.showMask = false |
|||
}, 300); |
|||
this.scrollIntoId = letter; |
|||
}, |
|||
|
|||
|
|||
query(source, text) { |
|||
console.log(source, text) |
|||
let res = []; |
|||
var self = this; |
|||
res = source.filter(item => { |
|||
const arr = []; |
|||
let isHave = false; |
|||
Object.keys(item).forEach(prop => { |
|||
const itemStr = item[prop]; |
|||
self.isString(itemStr) && |
|||
itemStr.split(',').forEach(val => { |
|||
arr.push(val); |
|||
}); |
|||
}); |
|||
arr.some(val => { |
|||
isHave = new RegExp('^' + text).test(val); |
|||
return isHave; |
|||
}); |
|||
return isHave; |
|||
}); |
|||
console.log(JSON.stringify(res)); |
|||
return res; |
|||
}, |
|||
|
|||
isString(obj) { |
|||
return typeof obj === 'string'; |
|||
}, |
|||
|
|||
onInput(e) { |
|||
const value = e.detail.value; |
|||
console.log(value); |
|||
if (value !== '' && this.citys && this.citys.length > 0) { |
|||
const queryData = this.query(this.citys, String(value).trim()); |
|||
this.searchList = queryData; |
|||
this.disdingwei = false |
|||
} else { |
|||
this.searchList = []; |
|||
this.disdingwei = true |
|||
} |
|||
}, |
|||
|
|||
back_city(item) { |
|||
if (item) { |
|||
console.log(item) |
|||
usecarStore.setCar('city', item.code) |
|||
usecarStore.setCar('cityName', item.cityName) |
|||
uni.navigateBack() |
|||
return |
|||
this.$emit('back_city', item); |
|||
//unshift 把数据插入到首位,与push相反 |
|||
this.Visit.unshift(item) |
|||
this.searchValue = ""; |
|||
this.disdingwei = true |
|||
var arr = this.Visit |
|||
//数组去重 |
|||
function distinct(arr) { |
|||
let newArr = [] |
|||
for (let i = 0; i < arr.length; i++) { |
|||
if (newArr.indexOf(arr[i]) < 0) { |
|||
newArr.push(arr[i]) |
|||
} |
|||
} |
|||
return newArr |
|||
} |
|||
this.Visit = distinct(arr) |
|||
console.log(this.Visit, "---最近访问") |
|||
uni.setStorage({ |
|||
key: 'Visit_key', |
|||
data: this.Visit |
|||
}); |
|||
} else { |
|||
this.$emit('back_city', 'no'); |
|||
} |
|||
|
|||
}, |
|||
// IDZBZ-L5GCZ-EQXXA-ZR5K4-JTSXH-IQBLO |
|||
getWarpweft() { |
|||
var that = this |
|||
that.po_tips = '定位中...' |
|||
// let key = 'NRWBZ-TKRWV-CSAPH-5PFDS-J4HT6-IWF4O' |
|||
let key = 'IDZBZ-L5GCZ-EQXXA-ZR5K4-JTSXH-IQBLO' |
|||
let countdown = setInterval(() => { |
|||
that.seconds--; |
|||
uni.getLocation({ |
|||
type: 'wgs84', |
|||
success: function(res) { |
|||
console.log('当前位置的经度:' + res.longitude); |
|||
console.log('当前位置的纬度:' + res.latitude); |
|||
that.longitude = res.longitude |
|||
that.latitude = res.latitude |
|||
|
|||
let url = 'https://apis.map.qq.com/ws/geocoder/v1/' |
|||
jsonp(url, { |
|||
key: key, |
|||
location: res.latitude + ',' + res.longitude, |
|||
output: 'jsonp' |
|||
}).then(res => { |
|||
console.log('jsonp', res.result.address_component); |
|||
let { |
|||
province, |
|||
city, |
|||
district |
|||
} = res.result.address_component; |
|||
that.province = province; |
|||
that.city = city; |
|||
that.area = district; |
|||
console.log(province, city, district); |
|||
that.currentCity = that.citys.find(item=>item.cityName==city) |
|||
if(!that.currentCity) { |
|||
uni.$u.toast('获取定位失败,请手动选择城市') |
|||
} |
|||
console.log(that.currentCity, '当前城市') |
|||
}).catch(()=>{ |
|||
uni.$u.toast('获取定位失败,请手动选择城市') |
|||
}) |
|||
|
|||
}, |
|||
fail() { |
|||
uni.$u.toast('获取定位失败,请手动选择城市') |
|||
} |
|||
}) |
|||
if (that.seconds <= 0) { |
|||
that.seconds = 3 |
|||
that.po_tips = '重新定位' |
|||
clearInterval(countdown); |
|||
} |
|||
}, |
|||
1000); |
|||
} |
|||
|
|||
} |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wrapper { |
|||
/* position: fixed; |
|||
z-index: 999999; |
|||
background: #ffffff; |
|||
height: 100%; |
|||
width: 100%; |
|||
top: 0px; |
|||
left: 0px; */ |
|||
} |
|||
|
|||
.mask { |
|||
position: absolute; |
|||
bottom: 0rpx; |
|||
top: 83rpx; |
|||
left: 0rpx; |
|||
right: 0rpx; |
|||
width: 750rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
background: rgba(0, 0, 0, 0); |
|||
} |
|||
|
|||
.mask-r { |
|||
height: 120rpx; |
|||
width: 120rpx; |
|||
border-radius: 60rpx; |
|||
display: flex; |
|||
background: rgba(0, 0, 0, 0.5); |
|||
justify-content: center; |
|||
align-items: center; |
|||
font-size: 40rpx; |
|||
color: #FFFFFF |
|||
} |
|||
|
|||
.content { |
|||
height: 100%; |
|||
width: 100%; |
|||
background-color: #ffffff; |
|||
} |
|||
|
|||
.header { |
|||
height: 100rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
|
|||
.back_div { |
|||
width: 65rpx; |
|||
height: 100%; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.back_img { |
|||
width: 35rpx; |
|||
height: 35rpx; |
|||
} |
|||
|
|||
.input { |
|||
font-size: 28rpx; |
|||
width: 620rpx; |
|||
height: 70rpx; |
|||
border-radius: 40rpx; |
|||
background-color: #F5F5F5; |
|||
padding-left: 20rpx; |
|||
padding-right: 20rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 30rpx; |
|||
color: white; |
|||
} |
|||
|
|||
.show { |
|||
left: 0; |
|||
width: 100%; |
|||
transition: left 0.3s ease; |
|||
} |
|||
|
|||
.hide { |
|||
left: 100%; |
|||
width: 100%; |
|||
transition: left 0.3s ease; |
|||
} |
|||
|
|||
|
|||
.title { |
|||
font-size: 30rpx; |
|||
color: white; |
|||
} |
|||
|
|||
.calendar-list { |
|||
position: absolute; |
|||
top: 83rpx; |
|||
bottom: 0rpx; |
|||
width: 100%; |
|||
background-color: #FFFFFF; |
|||
} |
|||
|
|||
.letters { |
|||
position: absolute; |
|||
right: 30rpx; |
|||
bottom: 0px; |
|||
width: 50rpx; |
|||
top: 260rpx; |
|||
color: #2f9bfe; |
|||
text-align: center; |
|||
font-size: 24rpx; |
|||
} |
|||
|
|||
.letters-item { |
|||
margin-bottom: 5rpx; |
|||
} |
|||
|
|||
.letter-header { |
|||
height: 45rpx; |
|||
font-size: 22rpx; |
|||
color: #333333; |
|||
padding-left: 24rpx; |
|||
box-sizing: border-box; |
|||
display: flex; |
|||
align-items: center; |
|||
background-color: #ebedef; |
|||
|
|||
} |
|||
|
|||
.city-div { |
|||
width: 660rpx; |
|||
height: 85rpx; |
|||
margin-left: 24rpx; |
|||
border-bottom-width: 0.5rpx; |
|||
border-bottom-color: #ebedef; |
|||
border-bottom-style: solid; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-right: 35rpx; |
|||
} |
|||
|
|||
.city { |
|||
font-size: 28rpx; |
|||
color: #000000; |
|||
padding-left: 30rpx; |
|||
} |
|||
|
|||
.dingwei { |
|||
width: 100%; |
|||
padding-top: 25rpx; |
|||
box-sizing: border-box; |
|||
margin-bottom: 26rpx; |
|||
} |
|||
|
|||
.dingwei_Tips { |
|||
margin-left: 24rpx; |
|||
margin-bottom: 24rpx; |
|||
font-size: 24rpx; |
|||
color: #A5A5A5; |
|||
} |
|||
|
|||
.dingwei_city { |
|||
width: 100%; |
|||
height: 60rpx; |
|||
padding-left: 55rpx; |
|||
padding-right: 70rpx; |
|||
box-sizing: border-box; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.dingwei_city_one { |
|||
width: 185rpx; |
|||
height: 60rpx; |
|||
background-color: #F5F5F5; |
|||
border-radius: 10rpx; |
|||
font-size: 32rpx; |
|||
color: #333333; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.dingweis_div { |
|||
display: flex; |
|||
align-content: flex-end; |
|||
align-items: center; |
|||
font-size: 24rpx; |
|||
color: #FD5745; |
|||
} |
|||
|
|||
.dingweis { |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
} |
|||
|
|||
.dingwei_city_zuijin { |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
} |
|||
|
|||
.toright { |
|||
margin-right: 25rpx; |
|||
} |
|||
</style> |
1121
pages/index/comp/city.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,514 @@ |
|||
<template> |
|||
<div class="wrapper"> |
|||
<div class="header"> |
|||
<!-- <view class="back_div"> |
|||
<image class="back_img" @click="back_city()" src="@/static/images/back_img.png" mode=""></image> |
|||
</view> --> |
|||
<input class="input" @input="onInput" placeholder="搜索 中文/拼音/首字母" v-model="searchValue" /> |
|||
</div> |
|||
<scroll-view class="calendar-list" scroll-y="true" :scroll-into-view="scrollIntoId"> |
|||
<view v-if="disdingwei" id="hot"> |
|||
<!-- 定位模块 --> |
|||
<view class="dingwei"> |
|||
<view class="dingwei_Tips"> |
|||
当前定位 |
|||
</view> |
|||
<view class="dingwei_city"> |
|||
<view style="min-width: 100rpx;"> |
|||
<view class="dingwei_city_one" @click="back_city(currentCity)" v-if="currentCity.cityName"> |
|||
{{currentCity.cityName}} |
|||
</view> |
|||
</view> |
|||
<view class="dingweis_div" @click="getWarpweft"> |
|||
<image class="dingweis" src="@/static/images/dingweis.png" mode=""></image> |
|||
<text>{{po_tips}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 最近模块 --> |
|||
<view class="dingwei"> |
|||
<view class="dingwei_Tips"> |
|||
热门城市 |
|||
</view> |
|||
<view class="dingwei_city dingwei_city_zuijin"> |
|||
<view class="dingwei_city_one toright" v-for="(item,index) in hotCity" @click="back_city(item)"> |
|||
{{item.cityName}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
|
|||
|
|||
<!-- 城市列表 --> |
|||
<view v-if="searchValue == ''" v-for="(item, index) in list" :id="getId(index)" :key="index"> |
|||
<view class="letter-header">{{ getId(index) }}</view> |
|||
<view class="city-div" v-for="(city, i) in item" :key="i" @click="back_city(city)"> |
|||
<text class="city">{{ city.cityName }}</text> |
|||
</view> |
|||
</view> |
|||
<!-- 搜索结果 --> |
|||
<view class="city-div" v-for="(item, index) in searchList" @click="back_city(item)"> |
|||
<text class="city">{{ item.cityName }}</text> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<!-- 右侧字母 --> |
|||
<view class="letters" v-if="searchValue == ''"> |
|||
<view class="letters-item" v-for="item in letter" :key="item" @click="scrollTo(item)">{{ item }}</view> |
|||
</view> |
|||
|
|||
<!-- 选中之后字母 --> |
|||
<view class="mask" v-if="showMask"> |
|||
<view class="mask-r">{{selectLetter}}</view> |
|||
</view> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import allCity from './allCity.js' |
|||
import HotCity from './HotCity.js' |
|||
import carStore from '@/store/modules/car.js' |
|||
let usecarStore = carStore() |
|||
import setObj from '@/config/site.config.js'; |
|||
let { |
|||
mapKey |
|||
} = setObj |
|||
|
|||
import { |
|||
jsonp |
|||
} from 'vue-jsonp' |
|||
export default { |
|||
|
|||
|
|||
data() { |
|||
return { |
|||
letter: [], |
|||
selectLetter: '', |
|||
searchValue: '', |
|||
scrollIntoId: '', |
|||
list: [], |
|||
tId: null, |
|||
searchList: [], |
|||
showMask: false, |
|||
disdingwei: true, |
|||
Visit: [], //最近访问 |
|||
currentCity: ' ', |
|||
longitude: '', //经度 |
|||
latitude: '', //纬度 |
|||
seconds: 3, |
|||
po_tips: '重新定位', |
|||
citys: [], |
|||
hotCity: HotCity |
|||
} |
|||
}, |
|||
|
|||
created() { |
|||
console.log(usecarStore) |
|||
//获取存储的最近访问 |
|||
this.initcity() |
|||
var that = this |
|||
uni.getStorage({ |
|||
key: 'Visit_key', |
|||
success: function(res) { |
|||
that.Visit = res.data |
|||
} |
|||
}); |
|||
//获取定位 经度纬度 |
|||
that.getWarpweft() |
|||
//获取city.js 的程序字母 |
|||
var mu = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'w', 'x', |
|||
'y', |
|||
'z' |
|||
]; |
|||
var tmp = []; |
|||
for (var i = 0; i < mu.length; i++) { |
|||
var item = mu[i]; |
|||
for (var j = 0; j < this.citys.length; j++) { |
|||
var py = this.citys[j].py; |
|||
if (py.substring(0, 1) == item) { |
|||
if (tmp.indexOf(item) == -1) { |
|||
this.list[i] = [this.citys[j]]; |
|||
tmp.push(item); |
|||
this.letter.push(item.toUpperCase()); |
|||
} else { |
|||
this.list[i].push(this.citys[j]); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
initcity() { |
|||
let cityArr = allCity.map(arr => { |
|||
return arr.cityInfoList.map(item => { |
|||
let obj = { |
|||
cityName: item.cityName, |
|||
pinYin: item.cityPinyin, |
|||
py: item.cityAcronym.toLocaleLowerCase(), |
|||
code: item.cityCode, |
|||
cityInitial: item.cityInitial |
|||
} |
|||
return obj |
|||
}) |
|||
}) |
|||
this.citys = cityArr.flat() |
|||
console.log(this.citys) |
|||
}, |
|||
getId(index) { |
|||
return this.letter[index]; |
|||
}, |
|||
|
|||
scrollTo(letter) { |
|||
this.showMask = true |
|||
this.selectLetter = letter == 'hot' ? '最' : letter |
|||
setTimeout(() => { |
|||
this.showMask = false |
|||
}, 300); |
|||
this.scrollIntoId = letter; |
|||
}, |
|||
|
|||
|
|||
query(source, text) { |
|||
console.log(source, text) |
|||
let res = []; |
|||
var self = this; |
|||
res = source.filter(item => { |
|||
const arr = []; |
|||
let isHave = false; |
|||
Object.keys(item).forEach(prop => { |
|||
const itemStr = item[prop]; |
|||
self.isString(itemStr) && |
|||
itemStr.split(',').forEach(val => { |
|||
arr.push(val); |
|||
}); |
|||
}); |
|||
arr.some(val => { |
|||
isHave = new RegExp('^' + text).test(val); |
|||
return isHave; |
|||
}); |
|||
return isHave; |
|||
}); |
|||
console.log(JSON.stringify(res)); |
|||
return res; |
|||
}, |
|||
|
|||
isString(obj) { |
|||
return typeof obj === 'string'; |
|||
}, |
|||
|
|||
onInput(e) { |
|||
const value = e.detail.value; |
|||
console.log(value); |
|||
if (value !== '' && this.citys && this.citys.length > 0) { |
|||
const queryData = this.query(this.citys, String(value).trim()); |
|||
this.searchList = queryData; |
|||
this.disdingwei = false |
|||
} else { |
|||
this.searchList = []; |
|||
this.disdingwei = true |
|||
} |
|||
}, |
|||
|
|||
back_city(item) { |
|||
if (item) { |
|||
console.log(item) |
|||
usecarStore.setCar('city', item.code) |
|||
usecarStore.setCar('cityName', item.cityName) |
|||
uni.navigateBack() |
|||
return |
|||
this.$emit('back_city', item); |
|||
//unshift 把数据插入到首位,与push相反 |
|||
this.Visit.unshift(item) |
|||
this.searchValue = ""; |
|||
this.disdingwei = true |
|||
var arr = this.Visit |
|||
//数组去重 |
|||
function distinct(arr) { |
|||
let newArr = [] |
|||
for (let i = 0; i < arr.length; i++) { |
|||
if (newArr.indexOf(arr[i]) < 0) { |
|||
newArr.push(arr[i]) |
|||
} |
|||
} |
|||
return newArr |
|||
} |
|||
this.Visit = distinct(arr) |
|||
console.log(this.Visit, "---最近访问") |
|||
uni.setStorage({ |
|||
key: 'Visit_key', |
|||
data: this.Visit |
|||
}); |
|||
} else { |
|||
this.$emit('back_city', 'no'); |
|||
} |
|||
|
|||
}, |
|||
// IDZBZ-L5GCZ-EQXXA-ZR5K4-JTSXH-IQBLO |
|||
getWarpweft() { |
|||
var that = this |
|||
that.po_tips = '定位中...' |
|||
// let key = 'NRWBZ-TKRWV-CSAPH-5PFDS-J4HT6-IWF4O' |
|||
let countdown = setInterval(() => { |
|||
that.seconds--; |
|||
uni.getLocation({ |
|||
type: 'wgs84', |
|||
success: function(res) { |
|||
console.log('当前位置的经度:' + res.longitude); |
|||
console.log('当前位置的纬度:' + res.latitude); |
|||
that.longitude = res.longitude |
|||
that.latitude = res.latitude |
|||
|
|||
let url = 'https://apis.map.qq.com/ws/geocoder/v1/' |
|||
jsonp(url, { |
|||
key: mapKey, |
|||
location: res.latitude + ',' + res.longitude, |
|||
output: 'jsonp' |
|||
}).then(res => { |
|||
console.log('jsonp', res.result.address_component); |
|||
let { |
|||
province, |
|||
city, |
|||
district |
|||
} = res.result.address_component; |
|||
that.province = province; |
|||
that.city = city; |
|||
that.area = district; |
|||
console.log(province, city, district); |
|||
that.currentCity = that.citys.find(item => item.cityName == |
|||
city) |
|||
if (!that.currentCity) { |
|||
uni.$u.toast('获取定位失败,请手动选择城市') |
|||
} |
|||
console.log(that.currentCity, '当前城市') |
|||
}).catch(() => { |
|||
uni.$u.toast('获取定位失败,请手动选择城市') |
|||
}) |
|||
|
|||
}, |
|||
fail() { |
|||
uni.$u.toast('获取定位失败,请手动选择城市') |
|||
} |
|||
}) |
|||
if (that.seconds <= 0) { |
|||
that.seconds = 3 |
|||
that.po_tips = '重新定位' |
|||
clearInterval(countdown); |
|||
} |
|||
}, |
|||
1000); |
|||
} |
|||
|
|||
} |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wrapper { |
|||
/* position: fixed; |
|||
z-index: 999999; |
|||
background: #ffffff; |
|||
height: 100%; |
|||
width: 100%; |
|||
top: 0px; |
|||
left: 0px; */ |
|||
} |
|||
|
|||
.mask { |
|||
position: absolute; |
|||
bottom: 0rpx; |
|||
top: 83rpx; |
|||
left: 0rpx; |
|||
right: 0rpx; |
|||
width: 750rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
background: rgba(0, 0, 0, 0); |
|||
} |
|||
|
|||
.mask-r { |
|||
height: 120rpx; |
|||
width: 120rpx; |
|||
border-radius: 60rpx; |
|||
display: flex; |
|||
background: rgba(0, 0, 0, 0.5); |
|||
justify-content: center; |
|||
align-items: center; |
|||
font-size: 40rpx; |
|||
color: #FFFFFF |
|||
} |
|||
|
|||
.content { |
|||
height: 100%; |
|||
width: 100%; |
|||
background-color: #ffffff; |
|||
} |
|||
|
|||
.header { |
|||
height: 90rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
|
|||
.back_div { |
|||
width: 65rpx; |
|||
height: 100%; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.back_img { |
|||
width: 35rpx; |
|||
height: 35rpx; |
|||
} |
|||
|
|||
.input { |
|||
font-size: 28rpx; |
|||
width: 620rpx; |
|||
height: 70rpx; |
|||
border-radius: 40rpx; |
|||
background-color: #F5F5F5; |
|||
padding-left: 20rpx; |
|||
padding-right: 20rpx; |
|||
box-sizing: border-box; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 30rpx; |
|||
color: white; |
|||
} |
|||
|
|||
.show { |
|||
left: 0; |
|||
width: 100%; |
|||
transition: left 0.3s ease; |
|||
} |
|||
|
|||
.hide { |
|||
left: 100%; |
|||
width: 100%; |
|||
transition: left 0.3s ease; |
|||
} |
|||
|
|||
|
|||
.title { |
|||
font-size: 30rpx; |
|||
color: white; |
|||
} |
|||
|
|||
.calendar-list { |
|||
position: absolute; |
|||
top: 83rpx; |
|||
bottom: 0rpx; |
|||
width: 100%; |
|||
background-color: #FFFFFF; |
|||
} |
|||
|
|||
.letters { |
|||
position: absolute; |
|||
right: 30rpx; |
|||
bottom: 0px; |
|||
width: 50rpx; |
|||
top: 260rpx; |
|||
color: #2f9bfe; |
|||
text-align: center; |
|||
font-size: 24rpx; |
|||
} |
|||
|
|||
.letters-item { |
|||
margin-bottom: 10rpx; |
|||
} |
|||
|
|||
.letter-header { |
|||
height: 45rpx; |
|||
font-size: 22rpx; |
|||
color: #333333; |
|||
padding-left: 24rpx; |
|||
box-sizing: border-box; |
|||
display: flex; |
|||
align-items: center; |
|||
background-color: #ebedef; |
|||
|
|||
} |
|||
|
|||
.city-div { |
|||
width: 660rpx; |
|||
height: 85rpx; |
|||
margin-left: 24rpx; |
|||
border-bottom-width: 0.5rpx; |
|||
border-bottom-color: #ebedef; |
|||
border-bottom-style: solid; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-right: 35rpx; |
|||
} |
|||
|
|||
.city { |
|||
font-size: 28rpx; |
|||
color: #000000; |
|||
padding-left: 30rpx; |
|||
} |
|||
|
|||
.dingwei { |
|||
width: 100%; |
|||
padding-top: 25rpx; |
|||
box-sizing: border-box; |
|||
margin-bottom: 26rpx; |
|||
} |
|||
|
|||
.dingwei_Tips { |
|||
margin-left: 24rpx; |
|||
margin-bottom: 24rpx; |
|||
font-size: 24rpx; |
|||
color: #A5A5A5; |
|||
} |
|||
|
|||
.dingwei_city { |
|||
width: 100%; |
|||
height: 60rpx; |
|||
padding-left: 55rpx; |
|||
padding-right: 70rpx; |
|||
box-sizing: border-box; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.dingwei_city_one { |
|||
width: 185rpx; |
|||
height: 60rpx; |
|||
background-color: #F5F5F5; |
|||
border-radius: 10rpx; |
|||
font-size: 28rpx; |
|||
color: #333333; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.dingweis_div { |
|||
display: flex; |
|||
align-content: flex-end; |
|||
align-items: center; |
|||
font-size: 24rpx; |
|||
color: #FD5745; |
|||
} |
|||
|
|||
.dingweis { |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
} |
|||
|
|||
.dingwei_city_zuijin { |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
} |
|||
|
|||
.toright { |
|||
margin-right: 25rpx; |
|||
} |
|||
</style> |
@ -0,0 +1,19 @@ |
|||
|
|||
let HotCity = [ |
|||
{ |
|||
"py": "hzs", |
|||
"code": 330100, |
|||
"cityInitial": "H", |
|||
"cityName": "杭州市", |
|||
"pinYin": "hang zhou shi", |
|||
}, |
|||
{ |
|||
"py": "lys", |
|||
"code": 410300, |
|||
"cityInitial": "L", |
|||
"cityName": "洛阳市", |
|||
"pinYin": "luo yang shi", |
|||
} |
|||
] |
|||
|
|||
export default HotCity |
After Width: 200 | Height: 200 | Size: 3.9 KiB |
After Width: 200 | Height: 200 | Size: 9.2 KiB |
@ -1,8 +1,15 @@ |
|||
{ |
|||
"hash": "0cf7e1d7", |
|||
"hash": "b2e96ba9", |
|||
"configHash": "cb5a66fc", |
|||
"lockfileHash": "22da1564", |
|||
"browserHash": "9db51c10", |
|||
"optimized": {}, |
|||
"lockfileHash": "053a9807", |
|||
"browserHash": "21763be4", |
|||
"optimized": { |
|||
"vue-jsonp": { |
|||
"src": "../../../../../node_modules/vue-jsonp/dist/index.esm.js", |
|||
"file": "vue-jsonp.js", |
|||
"fileHash": "f58d3c34", |
|||
"needsInterop": false |
|||
} |
|||
}, |
|||
"chunks": {} |
|||
} |
@ -0,0 +1,76 @@ |
|||
// ../../../../../work/questionbankvue3/node_modules/vue-jsonp/dist/index.esm.js
|
|||
function e(t2, n2) { |
|||
t2 = t2.replace(/=/g, ""); |
|||
var o2 = []; |
|||
switch (n2.constructor) { |
|||
case String: |
|||
case Number: |
|||
case Boolean: |
|||
o2.push(encodeURIComponent(t2) + "=" + encodeURIComponent(n2)); |
|||
break; |
|||
case Array: |
|||
n2.forEach(function(n3) { |
|||
o2 = o2.concat(e(t2 + "[]=", n3)); |
|||
}); |
|||
break; |
|||
case Object: |
|||
Object.keys(n2).forEach(function(r) { |
|||
var a = n2[r]; |
|||
o2 = o2.concat(e(t2 + "[" + r + "]", a)); |
|||
}); |
|||
} |
|||
return o2; |
|||
} |
|||
function t(e2) { |
|||
var n2 = []; |
|||
return e2.forEach(function(e3) { |
|||
"string" == typeof e3 ? n2.push(e3) : n2 = n2.concat(t(e3)); |
|||
}), n2; |
|||
} |
|||
var n = { install: function(e2) { |
|||
e2.prototype.$jsonp = o; |
|||
} }; |
|||
function o(n2, o2, r) { |
|||
if (void 0 === o2 && (o2 = {}), "string" != typeof n2) |
|||
throw new Error('[Vue-jsonp] Type of param "url" is not string.'); |
|||
if ("object" != typeof o2 || !o2) |
|||
throw new Error("[Vue-jsonp] Invalid params, should be an object."); |
|||
return r = "number" == typeof r ? r : 5e3, new Promise(function(a, c) { |
|||
var u = "string" == typeof o2.callbackQuery ? o2.callbackQuery : "callback", i = "string" == typeof o2.callbackName ? o2.callbackName : "jsonp_" + (Math.floor(1e5 * Math.random()) * Date.now()).toString(16); |
|||
o2[u] = i, delete o2.callbackQuery, delete o2.callbackName; |
|||
var s = []; |
|||
Object.keys(o2).forEach(function(t2) { |
|||
s = s.concat(e(t2, o2[t2])); |
|||
}); |
|||
var l = t(s).join("&"), f = function() { |
|||
p(), clearTimeout(m), c({ status: 400, statusText: "Bad Request" }); |
|||
}, p = function() { |
|||
b.removeEventListener("error", f); |
|||
}, d = function() { |
|||
document.body.removeChild(b), delete window[i]; |
|||
}, m = null; |
|||
r > -1 && (m = setTimeout(function() { |
|||
p(), d(), c({ statusText: "Request Timeout", status: 408 }); |
|||
}, r)), window[i] = function(e2) { |
|||
clearTimeout(m), p(), d(), a(e2); |
|||
}; |
|||
var b = document.createElement("script"); |
|||
b.addEventListener("error", f), b.src = n2 + (/\?/.test(n2) ? "&" : "?") + l, document.body.appendChild(b); |
|||
}); |
|||
} |
|||
export { |
|||
n as VueJsonp, |
|||
o as jsonp |
|||
}; |
|||
/*! Bundled license information: |
|||
|
|||
vue-jsonp/dist/index.esm.js: |
|||
(** |
|||
* Vue Jsonp. |
|||
* # Carry Your World # |
|||
* |
|||
* @author: LancerComet |
|||
* @license: MIT |
|||
*) |
|||
*/ |
|||
//# sourceMappingURL=vue-jsonp.js.map
|
@ -0,0 +1,7 @@ |
|||
{ |
|||
"version": 3, |
|||
"sources": ["../../../../../node_modules/vue-jsonp/dist/index.esm.js"], |
|||
"sourcesContent": ["function e(t,n){t=t.replace(/=/g,\"\");var o=[];switch(n.constructor){case String:case Number:case Boolean:o.push(encodeURIComponent(t)+\"=\"+encodeURIComponent(n));break;case Array:n.forEach((function(n){o=o.concat(e(t+\"[]=\",n))}));break;case Object:Object.keys(n).forEach((function(r){var a=n[r];o=o.concat(e(t+\"[\"+r+\"]\",a))}))}return o}function t(e){var n=[];return e.forEach((function(e){\"string\"==typeof e?n.push(e):n=n.concat(t(e))})),n}\n/**\n * Vue Jsonp.\n * # Carry Your World #\n *\n * @author: LancerComet\n * @license: MIT\n */var n={install:function(e){e.prototype.$jsonp=o}};function o(n,o,r){if(void 0===o&&(o={}),\"string\"!=typeof n)throw new Error('[Vue-jsonp] Type of param \"url\" is not string.');if(\"object\"!=typeof o||!o)throw new Error(\"[Vue-jsonp] Invalid params, should be an object.\");return r=\"number\"==typeof r?r:5e3,new Promise((function(a,c){var u=\"string\"==typeof o.callbackQuery?o.callbackQuery:\"callback\",i=\"string\"==typeof o.callbackName?o.callbackName:\"jsonp_\"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);o[u]=i,delete o.callbackQuery,delete o.callbackName;var s=[];Object.keys(o).forEach((function(t){s=s.concat(e(t,o[t]))}));var l=t(s).join(\"&\"),f=function(){p(),clearTimeout(m),c({status:400,statusText:\"Bad Request\"})},p=function(){b.removeEventListener(\"error\",f)},d=function(){document.body.removeChild(b),delete window[i]},m=null;r>-1&&(m=setTimeout((function(){p(),d(),c({statusText:\"Request Timeout\",status:408})}),r)),window[i]=function(e){clearTimeout(m),p(),d(),a(e)};var b=document.createElement(\"script\");b.addEventListener(\"error\",f),b.src=n+(/\\?/.test(n)?\"&\":\"?\")+l,document.body.appendChild(b)}))}export{n as VueJsonp,o as jsonp};\n"], |
|||
"mappings": ";AAAA,SAAS,EAAEA,IAAEC,IAAE;AAAC,EAAAD,KAAEA,GAAE,QAAQ,MAAK,EAAE;AAAE,MAAIE,KAAE,CAAC;AAAE,UAAOD,GAAE,aAAY;AAAA,IAAC,KAAK;AAAA,IAAO,KAAK;AAAA,IAAO,KAAK;AAAQ,MAAAC,GAAE,KAAK,mBAAmBF,EAAC,IAAE,MAAI,mBAAmBC,EAAC,CAAC;AAAE;AAAA,IAAM,KAAK;AAAM,MAAAA,GAAE,QAAS,SAASA,IAAE;AAAC,QAAAC,KAAEA,GAAE,OAAO,EAAEF,KAAE,OAAMC,EAAC,CAAC;AAAA,MAAC,CAAE;AAAE;AAAA,IAAM,KAAK;AAAO,aAAO,KAAKA,EAAC,EAAE,QAAS,SAAS,GAAE;AAAC,YAAI,IAAEA,GAAE,CAAC;AAAE,QAAAC,KAAEA,GAAE,OAAO,EAAEF,KAAE,MAAI,IAAE,KAAI,CAAC,CAAC;AAAA,MAAC,CAAE;AAAA,EAAC;AAAC,SAAOE;AAAC;AAAC,SAAS,EAAEC,IAAE;AAAC,MAAIF,KAAE,CAAC;AAAE,SAAOE,GAAE,QAAS,SAASA,IAAE;AAAC,gBAAU,OAAOA,KAAEF,GAAE,KAAKE,EAAC,IAAEF,KAAEA,GAAE,OAAO,EAAEE,EAAC,CAAC;AAAA,EAAC,CAAE,GAAEF;AAAC;AAOnb,IAAI,IAAE,EAAC,SAAQ,SAASE,IAAE;AAAC,EAAAA,GAAE,UAAU,SAAO;AAAC,EAAC;AAAE,SAAS,EAAEF,IAAEC,IAAE,GAAE;AAAC,MAAG,WAASA,OAAIA,KAAE,CAAC,IAAG,YAAU,OAAOD;AAAE,UAAM,IAAI,MAAM,gDAAgD;AAAE,MAAG,YAAU,OAAOC,MAAG,CAACA;AAAE,UAAM,IAAI,MAAM,kDAAkD;AAAE,SAAO,IAAE,YAAU,OAAO,IAAE,IAAE,KAAI,IAAI,QAAS,SAAS,GAAE,GAAE;AAAC,QAAI,IAAE,YAAU,OAAOA,GAAE,gBAAcA,GAAE,gBAAc,YAAW,IAAE,YAAU,OAAOA,GAAE,eAAaA,GAAE,eAAa,YAAU,KAAK,MAAM,MAAI,KAAK,OAAO,CAAC,IAAE,KAAK,IAAI,GAAG,SAAS,EAAE;AAAE,IAAAA,GAAE,CAAC,IAAE,GAAE,OAAOA,GAAE,eAAc,OAAOA,GAAE;AAAa,QAAI,IAAE,CAAC;AAAE,WAAO,KAAKA,EAAC,EAAE,QAAS,SAASF,IAAE;AAAC,UAAE,EAAE,OAAO,EAAEA,IAAEE,GAAEF,EAAC,CAAC,CAAC;AAAA,IAAC,CAAE;AAAE,QAAI,IAAE,EAAE,CAAC,EAAE,KAAK,GAAG,GAAE,IAAE,WAAU;AAAC,QAAE,GAAE,aAAa,CAAC,GAAE,EAAE,EAAC,QAAO,KAAI,YAAW,cAAa,CAAC;AAAA,IAAC,GAAE,IAAE,WAAU;AAAC,QAAE,oBAAoB,SAAQ,CAAC;AAAA,IAAC,GAAE,IAAE,WAAU;AAAC,eAAS,KAAK,YAAY,CAAC,GAAE,OAAO,OAAO,CAAC;AAAA,IAAC,GAAE,IAAE;AAAK,QAAE,OAAK,IAAE,WAAY,WAAU;AAAC,QAAE,GAAE,EAAE,GAAE,EAAE,EAAC,YAAW,mBAAkB,QAAO,IAAG,CAAC;AAAA,IAAC,GAAG,CAAC,IAAG,OAAO,CAAC,IAAE,SAASG,IAAE;AAAC,mBAAa,CAAC,GAAE,EAAE,GAAE,EAAE,GAAE,EAAEA,EAAC;AAAA,IAAC;AAAE,QAAI,IAAE,SAAS,cAAc,QAAQ;AAAE,MAAE,iBAAiB,SAAQ,CAAC,GAAE,EAAE,MAAIF,MAAG,KAAK,KAAKA,EAAC,IAAE,MAAI,OAAK,GAAE,SAAS,KAAK,YAAY,CAAC;AAAA,EAAC,CAAE;AAAC;", |
|||
"names": ["t", "n", "o", "e"] |
|||
} |
3742
utils/省市区编码表及JSON文件/区编码表.txt
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,396 @@ |
|||
-code name provinceCode |
|||
110100 北京市 110000 |
|||
120100 天津市 120000 |
|||
130100 石家庄市 130000 |
|||
130200 唐山市 130000 |
|||
130300 秦皇岛市 130000 |
|||
130400 邯郸市 130000 |
|||
130500 邢台市 130000 |
|||
130600 保定市 130000 |
|||
130700 张家口市 130000 |
|||
130800 承德市 130000 |
|||
130900 沧州市 130000 |
|||
131000 廊坊市 130000 |
|||
131100 衡水市 130000 |
|||
140100 太原市 140000 |
|||
140200 大同市 140000 |
|||
140300 阳泉市 140000 |
|||
140400 长治市 140000 |
|||
140500 晋城市 140000 |
|||
140600 朔州市 140000 |
|||
140700 晋中市 140000 |
|||
140800 运城市 140000 |
|||
140900 忻州市 140000 |
|||
141000 临汾市 140000 |
|||
141100 吕梁市 140000 |
|||
150100 呼和浩特市 150000 |
|||
150200 包头市 150000 |
|||
150300 乌海市 150000 |
|||
150400 赤峰市 150000 |
|||
150500 通辽市 150000 |
|||
150600 鄂尔多斯市 150000 |
|||
150700 呼伦贝尔市 150000 |
|||
150800 巴彦淖尔市 150000 |
|||
150900 乌兰察布市 150000 |
|||
152200 兴安盟 150000 |
|||
152500 锡林郭勒盟 150000 |
|||
152900 阿拉善盟 150000 |
|||
210100 沈阳市 210000 |
|||
210200 大连市 210000 |
|||
210300 鞍山市 210000 |
|||
210400 抚顺市 210000 |
|||
210500 本溪市 210000 |
|||
210600 丹东市 210000 |
|||
210700 锦州市 210000 |
|||
210800 营口市 210000 |
|||
210900 阜新市 210000 |
|||
211000 辽阳市 210000 |
|||
211100 盘锦市 210000 |
|||
211200 铁岭市 210000 |
|||
211300 朝阳市 210000 |
|||
211400 葫芦岛市 210000 |
|||
220100 长春市 220000 |
|||
220200 吉林市 220000 |
|||
220300 四平市 220000 |
|||
220400 辽源市 220000 |
|||
220500 通化市 220000 |
|||
220600 白山市 220000 |
|||
220700 松原市 220000 |
|||
220800 白城市 220000 |
|||
222400 延边朝鲜族自治州 220000 |
|||
230100 哈尔滨市 230000 |
|||
230200 齐齐哈尔市 230000 |
|||
230300 鸡西市 230000 |
|||
230400 鹤岗市 230000 |
|||
230500 双鸭山市 230000 |
|||
230600 大庆市 230000 |
|||
230700 伊春市 230000 |
|||
230800 佳木斯市 230000 |
|||
230900 七台河市 230000 |
|||
231000 牡丹江市 230000 |
|||
231100 黑河市 230000 |
|||
231200 绥化市 230000 |
|||
232700 大兴安岭地区 230000 |
|||
310100 上海市 310000 |
|||
320100 南京市 320000 |
|||
320200 无锡市 320000 |
|||
320300 徐州市 320000 |
|||
320400 常州市 320000 |
|||
320500 苏州市 320000 |
|||
320600 南通市 320000 |
|||
320700 连云港市 320000 |
|||
320800 淮安市 320000 |
|||
320900 盐城市 320000 |
|||
321000 扬州市 320000 |
|||
321100 镇江市 320000 |
|||
321200 泰州市 320000 |
|||
321300 宿迁市 320000 |
|||
330100 杭州市 330000 |
|||
330200 宁波市 330000 |
|||
330300 温州市 330000 |
|||
330400 嘉兴市 330000 |
|||
330500 湖州市 330000 |
|||
330600 绍兴市 330000 |
|||
330700 金华市 330000 |
|||
330800 衢州市 330000 |
|||
330900 舟山市 330000 |
|||
331000 台州市 330000 |
|||
331100 丽水市 330000 |
|||
340100 合肥市 340000 |
|||
340200 芜湖市 340000 |
|||
340300 蚌埠市 340000 |
|||
340400 淮南市 340000 |
|||
340500 马鞍山市 340000 |
|||
340600 淮北市 340000 |
|||
340700 铜陵市 340000 |
|||
340800 安庆市 340000 |
|||
341000 黄山市 340000 |
|||
341100 滁州市 340000 |
|||
341200 阜阳市 340000 |
|||
341300 宿州市 340000 |
|||
341500 六安市 340000 |
|||
341600 亳州市 340000 |
|||
341700 池州市 340000 |
|||
341800 宣城市 340000 |
|||
350100 福州市 350000 |
|||
350200 厦门市 350000 |
|||
350300 莆田市 350000 |
|||
350400 三明市 350000 |
|||
350500 泉州市 350000 |
|||
350600 漳州市 350000 |
|||
350700 南平市 350000 |
|||
350800 龙岩市 350000 |
|||
350900 宁德市 350000 |
|||
360100 南昌市 360000 |
|||
360200 景德镇市 360000 |
|||
360300 萍乡市 360000 |
|||
360400 九江市 360000 |
|||
360500 新余市 360000 |
|||
360600 鹰潭市 360000 |
|||
360700 赣州市 360000 |
|||
360800 吉安市 360000 |
|||
360900 宜春市 360000 |
|||
361000 抚州市 360000 |
|||
361100 上饶市 360000 |
|||
370100 济南市 370000 |
|||
370200 青岛市 370000 |
|||
370300 淄博市 370000 |
|||
370400 枣庄市 370000 |
|||
370500 东营市 370000 |
|||
370600 烟台市 370000 |
|||
370700 潍坊市 370000 |
|||
370800 济宁市 370000 |
|||
370900 泰安市 370000 |
|||
371000 威海市 370000 |
|||
371100 日照市 370000 |
|||
371300 临沂市 370000 |
|||
371400 德州市 370000 |
|||
371500 聊城市 370000 |
|||
371600 滨州市 370000 |
|||
371700 菏泽市 370000 |
|||
410100 郑州市 410000 |
|||
410200 开封市 410000 |
|||
410300 洛阳市 410000 |
|||
410400 平顶山市 410000 |
|||
410500 安阳市 410000 |
|||
410600 鹤壁市 410000 |
|||
410700 新乡市 410000 |
|||
410800 焦作市 410000 |
|||
410900 濮阳市 410000 |
|||
411000 许昌市 410000 |
|||
411100 漯河市 410000 |
|||
411200 三门峡市 410000 |
|||
411300 南阳市 410000 |
|||
411400 商丘市 410000 |
|||
411500 信阳市 410000 |
|||
411600 周口市 410000 |
|||
411700 驻马店市 410000 |
|||
419001 济源市 410000 |
|||
420100 武汉市 420000 |
|||
420200 黄石市 420000 |
|||
420300 十堰市 420000 |
|||
420500 宜昌市 420000 |
|||
420600 襄阳市 420000 |
|||
420700 鄂州市 420000 |
|||
420800 荆门市 420000 |
|||
420900 孝感市 420000 |
|||
421000 荆州市 420000 |
|||
421100 黄冈市 420000 |
|||
421200 咸宁市 420000 |
|||
421300 随州市 420000 |
|||
422800 恩施土家族苗族自治州 420000 |
|||
429004 仙桃市 420000 |
|||
429005 潜江市 420000 |
|||
429006 天门市 420000 |
|||
429021 神农架林区 420000 |
|||
430100 长沙市 430000 |
|||
430200 株洲市 430000 |
|||
430300 湘潭市 430000 |
|||
430400 衡阳市 430000 |
|||
430500 邵阳市 430000 |
|||
430600 岳阳市 430000 |
|||
430700 常德市 430000 |
|||
430800 张家界市 430000 |
|||
430900 益阳市 430000 |
|||
431000 郴州市 430000 |
|||
431100 永州市 430000 |
|||
431200 怀化市 430000 |
|||
431300 娄底市 430000 |
|||
433100 湘西土家族苗族自治州 430000 |
|||
440100 广州市 440000 |
|||
440200 韶关市 440000 |
|||
440300 深圳市 440000 |
|||
440400 珠海市 440000 |
|||
440500 汕头市 440000 |
|||
440600 佛山市 440000 |
|||
440700 江门市 440000 |
|||
440800 湛江市 440000 |
|||
440900 茂名市 440000 |
|||
441200 肇庆市 440000 |
|||
441300 惠州市 440000 |
|||
441400 梅州市 440000 |
|||
441500 汕尾市 440000 |
|||
441600 河源市 440000 |
|||
441700 阳江市 440000 |
|||
441800 清远市 440000 |
|||
441900 东莞市 440000 |
|||
442000 中山市 440000 |
|||
445100 潮州市 440000 |
|||
445200 揭阳市 440000 |
|||
445300 云浮市 440000 |
|||
450100 南宁市 450000 |
|||
450200 柳州市 450000 |
|||
450300 桂林市 450000 |
|||
450400 梧州市 450000 |
|||
450500 北海市 450000 |
|||
450600 防城港市 450000 |
|||
450700 钦州市 450000 |
|||
450800 贵港市 450000 |
|||
450900 玉林市 450000 |
|||
451000 百色市 450000 |
|||
451100 贺州市 450000 |
|||
451200 河池市 450000 |
|||
451300 来宾市 450000 |
|||
451400 崇左市 450000 |
|||
460100 海口市 460000 |
|||
460200 三亚市 460000 |
|||
460300 三沙市 460000 |
|||
460400 儋州市 460000 |
|||
469001 五指山市 460000 |
|||
469002 琼海市 460000 |
|||
469005 文昌市 460000 |
|||
469006 万宁市 460000 |
|||
469007 东方市 460000 |
|||
469021 定安县 460000 |
|||
469022 屯昌县 460000 |
|||
469023 澄迈县 460000 |
|||
469024 临高县 460000 |
|||
469025 白沙黎族自治县 460000 |
|||
469026 昌江黎族自治县 460000 |
|||
469027 乐东黎族自治县 460000 |
|||
469028 陵水黎族自治县 460000 |
|||
469029 保亭黎族苗族自治县 460000 |
|||
469030 琼中黎族苗族自治县 460000 |
|||
500100 重庆市 500000 |
|||
500200 重庆郊县 500000 |
|||
510100 成都市 510000 |
|||
510300 自贡市 510000 |
|||
510400 攀枝花市 510000 |
|||
510500 泸州市 510000 |
|||
510600 德阳市 510000 |
|||
510700 绵阳市 510000 |
|||
510800 广元市 510000 |
|||
510900 遂宁市 510000 |
|||
511000 内江市 510000 |
|||
511100 乐山市 510000 |
|||
511300 南充市 510000 |
|||
511400 眉山市 510000 |
|||
511500 宜宾市 510000 |
|||
511600 广安市 510000 |
|||
511700 达州市 510000 |
|||
511800 雅安市 510000 |
|||
511900 巴中市 510000 |
|||
512000 资阳市 510000 |
|||
513200 阿坝藏族羌族自治州 510000 |
|||
513300 甘孜藏族自治州 510000 |
|||
513400 凉山彝族自治州 510000 |
|||
520100 贵阳市 520000 |
|||
520200 六盘水市 520000 |
|||
520300 遵义市 520000 |
|||
520400 安顺市 520000 |
|||
520500 毕节市 520000 |
|||
520600 铜仁市 520000 |
|||
522300 黔西南布依族苗族自治州 520000 |
|||
522600 黔东南苗族侗族自治州 520000 |
|||
522700 黔南布依族苗族自治州 520000 |
|||
530100 昆明市 530000 |
|||
530300 曲靖市 530000 |
|||
530400 玉溪市 530000 |
|||
530500 保山市 530000 |
|||
530600 昭通市 530000 |
|||
530700 丽江市 530000 |
|||
530800 普洱市 530000 |
|||
530900 临沧市 530000 |
|||
532300 楚雄彝族自治州 530000 |
|||
532500 红河哈尼族彝族自治州 530000 |
|||
532600 文山壮族苗族自治州 530000 |
|||
532800 西双版纳傣族自治州 530000 |
|||
532900 大理白族自治州 530000 |
|||
533100 德宏傣族景颇族自治州 530000 |
|||
533300 怒江傈僳族自治州 530000 |
|||
533400 迪庆藏族自治州 530000 |
|||
540100 拉萨市 540000 |
|||
540200 日喀则市 540000 |
|||
540300 昌都市 540000 |
|||
540400 林芝市 540000 |
|||
540500 山南市 540000 |
|||
540600 那曲市 540000 |
|||
542500 阿里地区 540000 |
|||
610100 西安市 610000 |
|||
610200 铜川市 610000 |
|||
610300 宝鸡市 610000 |
|||
610400 咸阳市 610000 |
|||
610500 渭南市 610000 |
|||
610600 延安市 610000 |
|||
610700 汉中市 610000 |
|||
610800 榆林市 610000 |
|||
610900 安康市 610000 |
|||
611000 商洛市 610000 |
|||
620100 兰州市 620000 |
|||
620200 嘉峪关市 620000 |
|||
620300 金昌市 620000 |
|||
620400 白银市 620000 |
|||
620500 天水市 620000 |
|||
620600 武威市 620000 |
|||
620700 张掖市 620000 |
|||
620800 平凉市 620000 |
|||
620900 酒泉市 620000 |
|||
621000 庆阳市 620000 |
|||
621100 定西市 620000 |
|||
621200 陇南市 620000 |
|||
622900 临夏回族自治州 620000 |
|||
623000 甘南藏族自治州 620000 |
|||
630100 西宁市 630000 |
|||
630200 海东市 630000 |
|||
632200 海北藏族自治州 630000 |
|||
632300 黄南藏族自治州 630000 |
|||
632500 海南藏族自治州 630000 |
|||
632600 果洛藏族自治州 630000 |
|||
632700 玉树藏族自治州 630000 |
|||
632800 海西蒙古族藏族自治州 630000 |
|||
640100 银川市 640000 |
|||
640200 石嘴山市 640000 |
|||
640300 吴忠市 640000 |
|||
640400 固原市 640000 |
|||
640500 中卫市 640000 |
|||
650100 乌鲁木齐市 650000 |
|||
650200 克拉玛依市 650000 |
|||
650400 吐鲁番市 650000 |
|||
650500 哈密市 650000 |
|||
652300 昌吉回族自治州 650000 |
|||
652700 博尔塔拉蒙古自治州 650000 |
|||
652800 巴音郭楞蒙古自治州 650000 |
|||
652900 阿克苏地区 650000 |
|||
653000 克孜勒苏柯尔克孜自治州 650000 |
|||
653100 喀什地区 650000 |
|||
653200 和田地区 650000 |
|||
654000 伊犁哈萨克自治州 650000 |
|||
654200 塔城地区 650000 |
|||
654300 阿勒泰地区 650000 |
|||
659001 石河子市 650000 |
|||
659002 阿拉尔市 650000 |
|||
659003 图木舒克市 650000 |
|||
659004 五家渠市 650000 |
|||
659005 北屯市 650000 |
|||
659006 铁门关市 650000 |
|||
659007 双河市 650000 |
|||
659008 可克达拉市 650000 |
|||
659009 昆玉市 650000 |
|||
659010 胡杨河市 650000 |
|||
710100 台北市 710000 |
|||
710200 高雄市 710000 |
|||
710300 台南市 710000 |
|||
710400 台中市 710000 |
|||
710500 金门县 710000 |
|||
710600 南投县 710000 |
|||
710700 基隆市 710000 |
|||
710800 新竹市 710000 |
|||
710900 嘉义市 710000 |
|||
711100 新北市 710000 |
|||
711200 宜兰县 710000 |
|||
711300 新竹县 710000 |
|||
711400 桃园县 710000 |
|||
711500 苗栗县 710000 |
|||
711700 彰化县 710000 |
|||
711900 嘉义县 710000 |
|||
712100 云林县 710000 |
|||
712400 屏东县 710000 |
|||
712500 台东县 710000 |
|||
712600 花莲县 710000 |
|||
712700 澎湖县 710000 |
|||
712800 连江县 710000 |
|||
810100 香港岛 810000 |
|||
810200 九龙 810000 |
|||
810300 新界 810000 |
|||
820100 澳门半岛 820000 |
|||
820200 离岛 820000 |
@ -0,0 +1,35 @@ |
|||
-code name |
|||
110000 北京市 |
|||
120000 天津市 |
|||
130000 河北省 |
|||
140000 山西省 |
|||
150000 内蒙古自治区 |
|||
210000 辽宁省 |
|||
220000 吉林省 |
|||
230000 黑龙江省 |
|||
310000 上海市 |
|||
320000 江苏省 |
|||
330000 浙江省 |
|||
340000 安徽省 |
|||
350000 福建省 |
|||
360000 江西省 |
|||
370000 山东省 |
|||
410000 河南省 |
|||
420000 湖北省 |
|||
430000 湖南省 |
|||
440000 广东省 |
|||
450000 广西壮族自治区 |
|||
460000 海南省 |
|||
500000 重庆市 |
|||
510000 四川省 |
|||
520000 贵州省 |
|||
530000 云南省 |
|||
540000 西藏自治区 |
|||
610000 陕西省 |
|||
620000 甘肃省 |
|||
630000 青海省 |
|||
640000 宁夏回族自治区 |
|||
650000 新疆维吾尔自治区 |
|||
710000 台湾省 |
|||
810000 香港特别行政区 |
|||
820000 澳门特别行政区 |
30050
utils/省市区编码表及JSON文件/省市区三级联动结构JSON数据服务.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue