提交修改
This commit is contained in:
@@ -70,7 +70,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['injectJWeixin', 'agentSign']),
|
||||
|
||||
submit() {
|
||||
if (this.flag) return
|
||||
if (!this.forms.content) {
|
||||
@@ -80,7 +79,6 @@ export default {
|
||||
if (this.forms.typeName === '') {
|
||||
return this.$u.toast('请选择类型')
|
||||
}
|
||||
|
||||
this.$http.post(`/app/appgirdnews/addOrUpdate`, {...this.forms}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('update')
|
||||
@@ -92,26 +90,25 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
selectType(e) {
|
||||
this.forms.type = e[0].value
|
||||
this.forms.typeName = e[0].label
|
||||
},
|
||||
|
||||
getLocation() {
|
||||
this.injectJWeixin(['getLocation']).then(() => {
|
||||
wx.getLocation({
|
||||
this.injectJWeixin('getLocation').then(() => {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: res2 => {
|
||||
alert(res2)
|
||||
this.forms.lng = res2.longitude
|
||||
this.forms.lat = res2.latitude
|
||||
this.$http.post('/api/appdvcpconfig/apiForward', `https://apis.map.qq.com/ws/geocoder/v1/?location=${this.forms.lat},${this.forms.lng}&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1`).then(res => {
|
||||
if (res.code == 0) {
|
||||
alert(res)
|
||||
this.$http.post('/api/appdvcpconfig/apiForward', null, {
|
||||
params: {
|
||||
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${this.forms.lat},${this.forms.lng}&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1`
|
||||
}
|
||||
}).then(res => {
|
||||
console.log("获取详细地址信息:", res)
|
||||
if (res?.code == 0) {
|
||||
this.forms.address = res.data.result.address
|
||||
}else {
|
||||
alert(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user