Commit ae3aad48 by huyue

更换省市区地址为可配置的

1 parent 6fe8ced0
...@@ -157,8 +157,9 @@ export default { ...@@ -157,8 +157,9 @@ export default {
data += '&' + key + '=' + params[key] data += '&' + key + '=' + params[key]
} }
// let path = `https://restapi.amap.com/v3/config/district?key=d22348363c34c266f772ae9b635eef2a` // let path = `https://restapi.amap.com/v3/config/district?key=d22348363c34c266f772ae9b635eef2a`
let path = 'http://eshield.dev.glsx.com.cn/nesi/apiRegion/search?' // let path = 'http://eshield.dev.glsx.com.cn/nesi/apiRegion/search?'
path = path + data // path = path + data
const path = this.$provinceUrl + data
const pro = fetch(path).then(res => { const pro = fetch(path).then(res => {
return res.json() return res.json()
}) })
......
...@@ -27,12 +27,13 @@ let routes = [] ...@@ -27,12 +27,13 @@ let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, request_config, request_car, sign_common, request_province } = await fetchConfig(common) const { response, request, sign, secret, request_common, request_config, request_car, sign_common, request_province, provinceUrl } = await fetchConfig(common)
console.log(request) console.log(request)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
console.log(globalState) console.log(globalState)
Vue.prototype.$provinceUrl = provinceUrl
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!