flat: 修改天地图

This commit is contained in:
Apcallover
2024-07-22 15:12:17 +08:00
parent 85aaeacd2b
commit 9fe5c37292
4 changed files with 23 additions and 19 deletions

View File

@@ -130,7 +130,7 @@
if (this.option && this.option.apikey) { if (this.option && this.option.apikey) {
const script = document.createElement('script') const script = document.createElement('script')
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算 // view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey script.src = 'http://api.tianditu.gov.cn:9075/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this) script.onload = this.initEcharts.bind(this)
document.head.appendChild(script) document.head.appendChild(script)
} }
@@ -145,7 +145,7 @@
if (this.option.apikey) { if (this.option.apikey) {
const script = document.createElement('script') const script = document.createElement('script')
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey script.src = 'http://api.tianditu.gov.cn:9075/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this) script.onload = this.initEcharts.bind(this)
document.head.appendChild(script) document.head.appendChild(script)

View File

@@ -128,7 +128,7 @@
}) })
uni.request({ uni.request({
//url: 'https://service.sdmap.gov.cn/geodecode', //url: 'https://service.sdmap.gov.cn/geodecode',
url: 'https://api.tianditu.gov.cn/geocoder', url: 'http://api.tianditu.gov.cn:9075/geocoder',
method: 'GET', method: 'GET',
@@ -193,7 +193,7 @@
if (this.option && this.option.apikey) { if (this.option && this.option.apikey) {
const script = document.createElement('script') const script = document.createElement('script')
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算 // view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey script.src = 'http://api.tianditu.gov.cn:9075/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this) script.onload = this.initEcharts.bind(this)
document.head.appendChild(script) document.head.appendChild(script)
@@ -212,7 +212,7 @@
if (this.option.apikey) { if (this.option.apikey) {
const script = document.createElement('script') const script = document.createElement('script')
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey script.src = 'http://api.tianditu.gov.cn:9075/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this) script.onload = this.initEcharts.bind(this)
document.head.appendChild(script) document.head.appendChild(script)

View File

@@ -133,7 +133,7 @@
mask: true mask: true
}) })
uni.request({ uni.request({
url: 'http://api.tianditu.gov.cn/v2/search', url: 'http://api.tianditu.gov.cn:9075/v2/search',
method: 'GET', method: 'GET',
data: params, data: params,
success: res => { success: res => {
@@ -245,7 +245,7 @@
}) })
uni.request({ uni.request({
//url: 'https://service.sdmap.gov.cn/geodecode', //url: 'https://service.sdmap.gov.cn/geodecode',
url: 'https://api.tianditu.gov.cn/geocoder', url: 'http://api.tianditu.gov.cn:9075/geocoder',
method: 'GET', method: 'GET',
data: { data: {
postStr: JSON.stringify({ postStr: JSON.stringify({
@@ -257,7 +257,6 @@
tk: e.apikey tk: e.apikey
}, },
success: res => { success: res => {
//console.log(res);
if (res.data.result) { if (res.data.result) {
const value = that.formatterAdressLocation(res.data.result, 1) const value = that.formatterAdressLocation(res.data.result, 1)
that.arr_list = [value] that.arr_list = [value]
@@ -328,7 +327,7 @@
if (this.option && this.option.apikey) { if (this.option && this.option.apikey) {
const script = document.createElement('script') const script = document.createElement('script')
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算 // view 层的页面运行在 www 根目录,其相对路径相对于 www 计算
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey script.src = 'http://api.tianditu.gov.cn:9075/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this) script.onload = this.initEcharts.bind(this)
document.head.appendChild(script) document.head.appendChild(script)
@@ -347,7 +346,7 @@
if (this.option.apikey) { if (this.option.apikey) {
const script = document.createElement('script') const script = document.createElement('script')
script.src = 'http://api.tianditu.gov.cn/api?v=4.0&tk=' + this.option.apikey script.src = 'http://api.tianditu.gov.cn:9075/api?v=4.0&tk=' + this.option.apikey
script.onload = this.initEcharts.bind(this) script.onload = this.initEcharts.bind(this)
document.head.appendChild(script) document.head.appendChild(script)

View File

@@ -289,18 +289,11 @@
policyContentList: [], policyContentList: [],
policyType: 1, policyType: 1,
swiperType: 1, swiperType: 1,
IsResume: true,
}; };
}, },
onLoad: function(options) { onLoad: function(options) {
myResume().then(res => {
const data = res.data.data
if (!(data.education && data.telephone && data.wage && data.workplace)) {
this.goures()
this.$api.sleep(1000).then(() => {
this.$api.msg('请输入基本信息')
})
}
})
}, },
onShow: function() { onShow: function() {
if (!this.$store.state.user.token) { if (!this.$store.state.user.token) {
@@ -319,6 +312,18 @@
this.download() this.download()
this.getSwiperList() this.getSwiperList()
this.getPolicy() this.getPolicy()
if (this.IsResume) {
myResume().then(res => {
const data = res.data.data
if (!(data.education && data.telephone && data.wage && data.workplace)) {
this.goures()
this.$api.sleep(1000).then(() => {
this.$api.msg('请输入基本信息')
})
}
})
this.IsResume = false
}
}, },
onReady() { onReady() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({