以房找人

This commit is contained in:
liuye
2024-07-30 17:00:35 +08:00
parent fa74319438
commit 329dcf52c2
55 changed files with 2096 additions and 4823 deletions

View File

@@ -128,6 +128,7 @@ export default {
aiConfigName: '',
showType: false,
showPopup: true,
latLng: ''
}
},
computed: {
@@ -222,7 +223,13 @@ export default {
return this.$u.toast("请先进行登录")
}
this.$loading()
this.$instance.post("/app/appaicopilotinfo/add", {content: this.content, appType: 0, areaId: this.areaId, aiConfigId: this.aiConfigId}).then(res => {
this.$instance.post("/app/appaicopilotinfo/add", {
content: this.content,
appType: 0,
areaId: this.areaId,
aiConfigId: this.aiConfigId,
supplementContent: this.latLng
}).then(res => {
if(res.code == 0) {
this.content = ''
this.messageList.push(res.data[0])
@@ -329,6 +336,15 @@ export default {
this.aiConfigId = val[0].value
this.aiConfigName = val[0].label
this.messageList = []
this.typeList.map((item) => {
if(item.dictValue == this.aiConfigId) {
if(item.ability == 1) {
this.getLocation()
}else {
this.latLng = ''
}
}
})
},
getAiTypeList() {
this.$instance.post(`/app/appaiconfiginfo/list?status=1`).then(res => {
@@ -343,7 +359,42 @@ export default {
// this.getHistoryList()
}
})
}
},
getLocation() {
wx.authorize({
scope: 'scope.userLocation',
success: () => {
uni.getLocation({
type: 'gcj02',
success: res => {
this.latLng = `${res.latitude},${res.longitude}`
},
fail: e => {
console.log(e)
}
})
},
fail: () => {
this.$dialog.confirm({
content: '您未授权定位,功能将无法使用'
}).then(() => {
uni.openSetting({
success: res => {
if (!res.authSetting['scope.userLocation']) {
this.$dialog.alert({
content: '您未授权定位,功能将无法使用'
}).then(() => {
})
} else {
}
}
})
})
}
})
},
},
}
</script>