提交 749a509e authored 作者: 正反's avatar 正反

地址解析

上级 181719c2
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -13,6 +13,7 @@
"element-ui": "^2.15.2",
"qs": "^6.10.1",
"vue": "^2.6.11",
"vue-jsonp": "^2.0.0",
"vue-router": "^3.2.0",
"vuex": "^3.4.0",
"wot-design": "^2.3.2"
......
import request from '../request/request'
export function getAction(url,params){
return request({
method:'GET',
url:url,
params:params
})
export function getAction(url, params) {
return request({
method: 'GET',
url: url,
params: params
})
}
export function postAction(url,params){
return request({
method:'POST',
url:url,
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
data:params
})
export function postAction(url, params) {
return request({
method: 'POST',
url: url,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},
data: params
})
}
//地址识别
export function recognizedata(url, params) {
return request({
method: 'POST',
url: url,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},
data: params
})
}
/**
*
* @description 获取行政区信息API(来源:高德地图)
......@@ -25,17 +37,17 @@ export function postAction(url,params){
* @author Ras
*
*/
export function getBoroughs(){
let params = {
key:'2564f6ab105b9193d25f7a9b8e1facd9',
address:'中国',
subdistrict: 3,
extensions: 'base'
}
let url = 'https://restapi.amap.com/v3/config/district'
return request({
method:'GET',
url:url,
params:params
})
}
\ No newline at end of file
export function getBoroughs() {
let params = {
key: '2564f6ab105b9193d25f7a9b8e1facd9',
address: '中国',
subdistrict: 3,
extensions: 'base'
}
let url = 'https://restapi.amap.com/v3/config/district'
return request({
method: 'GET',
url: url,
params: params
})
}
......@@ -6,7 +6,6 @@ import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import qs from 'qs'
Vue.use(ElementUI)
Vue.prototype.$axios = axios
Vue.prototype.$qs = qs
......
......@@ -23,7 +23,7 @@ const routes = [
]
const router = new VueRouter({
mode: 'hash',
mode: 'history',
routes
})
......
差异被折叠。
module.exports = {
// 基本路径 baseURL已经过时
publicPath: './',
// 输出文件目录
outputDir: 'dist',
// eslint-loader 是否在保存的时候检查
lintOnSave: true,
// use the full build with in-browser compiler?
// https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
// compiler: false,
// webpack配置
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
chainWebpack: () => {},
configureWebpack: () => {},
// vue-loader 配置项
// https://vue-loader.vuejs.org/en/options.html
// vueLoader: {},
// 生产环境是否生成 sourceMap 文件
productionSourceMap: true,
// css相关配置
css: {
// 是否使用css分离插件 ExtractTextPlugin
extract: true,
// 开启 CSS source maps?
sourceMap: false,
// css预设器配置项
loaderOptions: {},
// 启用 CSS modules for all css / pre-processor files.
modules: false
},
// use thread-loader for babel & TS in production build
// enabled by default if the machine has more than 1 cores
parallel: require('os').cpus().length > 1,
// 是否启用dll
// See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#dll-mode
// dll: false,
// PWA 插件相关配置
// see https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa
pwa: {},
// webpack-dev-server 相关配置
devServer: {
// overlay: { // 让浏览器 overlay 同时显示警告和错误
// warnings: true,
// errors: true
// },
// host: "localhost",
// port: 8080, // 端口号
// https: false, // https:{type:Boolean}
// open: false, //配置后自动启动浏览器
// hotOnly: true, // 热更新
// // proxy: 'http://localhost:8080', // 配置跨域处理,只有一个代理
// proxy: { //配置多个代理
// "/testIp": {
// target: "http://197.0.0.1:8088",
// changeOrigin: true,
// ws: true,//websocket支持
// secure: false,
// pathRewrite: {
// "^/testIp": "/"
// }
// },
// "/elseIp": {
// target: "http://197.0.0.2:8088",
// changeOrigin: true,
// //ws: true,//websocket支持
// secure: false,
// pathRewrite: {
// "^/elseIp": "/"
// }
// },
// }
},
// 第三方插件配置
pluginOptions: {
// ...
}
}
\ No newline at end of file
// 基本路径 baseURL已经过时
publicPath: './',
// 输出文件目录
outputDir: 'dist',
// eslint-loader 是否在保存的时候检查
lintOnSave: true,
// use the full build with in-browser compiler?
// https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
// compiler: false,
// webpack配置
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
chainWebpack: () => {},
configureWebpack: () => {},
// vue-loader 配置项
// https://vue-loader.vuejs.org/en/options.html
// vueLoader: {},
// 生产环境是否生成 sourceMap 文件
productionSourceMap: true,
// css相关配置
css: {
// 是否使用css分离插件 ExtractTextPlugin
extract: true,
// 开启 CSS source maps?
sourceMap: false,
// css预设器配置项
loaderOptions: {},
// 启用 CSS modules for all css / pre-processor files.
modules: false
},
// use thread-loader for babel & TS in production build
// enabled by default if the machine has more than 1 cores
parallel: require('os').cpus().length > 1,
// 是否启用dll
// See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#dll-mode
// dll: false,
// PWA 插件相关配置
// see https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa
pwa: {},
// webpack-dev-server 相关配置
devServer: {
// proxy: {
// '/baiduApi': {
// target: 'https://aip.baidubce.com', //访问地址
// changeOrigin: true,
// secure: false, //只有代理https 地址需要次选项
// pathRewrite: {
// '^/baiduApi': '/'
// }
// },
// },
overlay: { // 让浏览器 overlay 同时显示警告和错误
warnings: true,
errors: true
},
host: "localhost",
port: 8080, // 端口号
https: false, // https:{type:Boolean}
open: false, //配置后自动启动浏览器
hotOnly: true, // 热更新
// proxy: 'http://localhost:8080', // 配置跨域处理,只有一个代理
proxy: { //配置多个代理
// "/testIp": {
// target: "http://197.0.0.1:8088",
// changeOrigin: true,
// ws: true, //websocket支持
// secure: false,
// pathRewrite: {
// "^/testIp": "/"
// }
// },
// "/elseIp": {
// target: "http://197.0.0.2:8088",
// changeOrigin: true,
// //ws: true,//websocket支持
// secure: false,
// pathRewrite: {
// "^/elseIp": "/"
// },
// },
"/baiduApi": {
target: "https://aip.baidubce.com", //访问地址
changeOrigin: true,
ws: true,
secure: false, //只有代理https 地址需要次选项
pathRewrite: {
'^/baiduApi': '/'
}
},
}
},
// 第三方插件配置
pluginOptions: {
// ...
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论