去除高德定位

This commit is contained in:
guanj
2025-08-13 10:42:31 +08:00
parent 032eed6768
commit c387cc9589
9 changed files with 80 additions and 72 deletions

View File

@@ -1,7 +1,7 @@
const debug = false // true 是连地服务端本地false 是连接线上
const debug = true // true 是连地服务端本地false 是连接线上
const development = {
domain: 'http://192.168.1.22:10215',
domain: 'http://192.168.1.62:10215',
}
const production = {

View File

@@ -1,5 +1,5 @@
export const MQTT_IP = 'pqmcn.com:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt
// export const MQTT_IP = '192.168.1.24:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt
// export const MQTT_IP = 'pqmcn.com:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt
export const MQTT_IP = '192.168.1.24:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt
const MQTT_USERNAME = 't_user'//mqtt用户名
const MQTT_PASSWORD = 'njcnpqs'//密码

View File

@@ -25,7 +25,6 @@
},
/* */
"modules" : {
"Maps" : {},
"Barcode" : {},
"Camera" : {},
"Push" : {}
@@ -73,6 +72,7 @@
"ad" : {},
"maps" : {
"amap" : {
"name" : "",
"appkey_ios" : "73262624599d79ee4ad8bba2ab4a0958",
"appkey_android" : "c93dd87e087f3686a9d4463ce5ebcbe1"
}
@@ -144,8 +144,8 @@
"proxy" : {
"/api" : {
"https" : true,
"target" : "https://pqmcn.com:8092/api",
// "target" : "http://192.168.1.62:10215",
// "target" : "https://pqmcn.com:8092/api",
"target" : "http://192.168.1.62:10215",
"changOrigin" : true,
"pathRewrite" : {
"/api" : ""

View File

@@ -284,17 +284,17 @@ export default {
})
})
},
chooseLocation() {
uni.chooseLocation({
success: function (res) {
this.address = res.name
console.log('位置名称:' + res.name)
console.log('详细地址:' + res.address)
console.log('纬度:' + res.latitude)
console.log('经度:' + res.longitude)
},
})
},
// chooseLocation() {
// uni.chooseLocation({
// success: function (res) {
// this.address = res.name
// console.log('位置名称:' + res.name)
// console.log('详细地址:' + res.address)
// console.log('纬度:' + res.latitude)
// console.log('经度:' + res.longitude)
// },
// })
// },
chooseGplot() {
this.$refs.gplot.open()
},

View File

@@ -23,7 +23,7 @@
</button>
</view>
</template>
<template v-else>
<template v-else >
<view class="content">
<uni-forms>
<uni-forms-item label="项目">
@@ -97,9 +97,12 @@
</uni-forms>
</view>
<image class="gplot-image" ref="gplot-image" :src="formData.topologyDiagramUrl" mode="widthFix" />
<view class="btn-wrap">
<view class="btn-wrap" >
<!-- <view class="btn-wrap-item" @click="add"> 添加监测点 </view> -->
<view class="btn-wrap-item" @click="submit"> 提交</view>
<!-- <view class="btn-wrap-item" @click="submit" > 提交</view> -->
<button class="btn-wrap-item" :loading="isLoading1" :disabled="isLoading1" @click="submit">
{{ isLoading1 ? '提交中...' : '提交' }}
</button>
</view>
<uni-drawer ref="gplot" mode="right" :mask-click="false">
<scroll-view style="height: 100%" scroll-y="true">
@@ -189,6 +192,7 @@ export default {
projectRange: [],
point: {},
isLoading: false,
isLoading1: false,
pointList: [],
activeGplot: 0,
positionList: [],
@@ -360,17 +364,17 @@ export default {
this.isLoading = false
})
},
chooseLocation() {
uni.chooseLocation({
success: function (res) {
this.address = res.name
console.log('位置名称:' + res.name)
console.log('详细地址:' + res.address)
console.log('纬度:' + res.latitude)
console.log('经度:' + res.longitude)
},
})
},
// chooseLocation() {
// uni.chooseLocation({
// success: function (res) {
// this.address = res.name
// console.log('位置名称:' + res.name)
// console.log('详细地址:' + res.address)
// console.log('纬度:' + res.latitude)
// console.log('经度:' + res.longitude)
// },
// })
// },
chooseGplot() {
this.$refs.gplot.open()
this.dialogOpen = true
@@ -451,6 +455,7 @@ export default {
this.$util.toast('监测点不能重复')
return
}
this.isLoading1 = true
addDevice({
...this.formData,
list: this.pointList,
@@ -459,10 +464,13 @@ export default {
}).then((res) => {
console.log(res)
this.$util.toast('提交成功')
this.isLoading1 = false
setTimeout(() => {
this.type = 3
uni.navigateBack({ delta: 1 })
}, 1500)
}).catch(()=>{
this.isLoading1 = false
})
},
},

View File

@@ -93,17 +93,17 @@ export default {
select(e) {
console.log(e)
},
chooseLocation() {
uni.chooseLocation({
success: function (res) {
this.address = res.name
console.log('位置名称:' + res.name)
console.log('详细地址:' + res.address)
console.log('纬度:' + res.latitude)
console.log('经度:' + res.longitude)
},
})
},
// chooseLocation() {
// uni.chooseLocation({
// success: function (res) {
// this.address = res.name
// console.log('位置名称:' + res.name)
// console.log('详细地址:' + res.address)
// console.log('纬度:' + res.latitude)
// console.log('经度:' + res.longitude)
// },
// })
// },
async submit() {
console.log(this.formData)
if (!this.formData.name) {

View File

@@ -26,8 +26,8 @@
<view style="display:flex;">
<uni-easyinput :clearable="false" type="textarea" autoHeight v-model="formData.address"
placeholder="请输入位置信息" />
<uni-icons type="location" color="#007aff" size="26" class="ml20"
@click="chooseLocation"></uni-icons>
<!-- <uni-icons type="location" color="#007aff" size="26" class="ml20"
@click="chooseLocation"></uni-icons> -->
</view>
</uni-forms-item>
<uni-forms-item label="拓扑图">
@@ -97,17 +97,17 @@ export default {
register () {
this.type = 2
},
chooseLocation () {
uni.chooseLocation({
success: function (res) {
this.address = res.name
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
}
});
},
// chooseLocation () {
// uni.chooseLocation({
// success: function (res) {
// this.address = res.name
// console.log('位置名称:' + res.name);
// console.log('详细地址:' + res.address);
// console.log('纬度:' + res.latitude);
// console.log('经度:' + res.longitude);
// }
// });
// },
submit () {
this.$util.toast('提交成功')
setTimeout(() => {

View File

@@ -24,13 +24,13 @@
v-model="formData.area"
placeholder="请输入区域信息"
/>
<uni-icons
<!-- <uni-icons
type="location"
color="#007aff"
size="26"
class="ml20"
@click="chooseLocation"
></uni-icons>
></uni-icons> -->
</view>
</uni-forms-item>
<uni-forms-item label="描述">
@@ -241,19 +241,19 @@ export default {
this.formData.files.push(...e.tempFiles)
console.log(this.formData.files)
},
chooseLocation() {
uni.chooseLocation({
success: (res) => {
this.formData.area = res.name
this.formData.lat = res.latitudeame
this.formData.lng = res.longitude
console.log('位置名称:' + res.name)
console.log('详细地址:' + res.address)
console.log('纬度:' + res.latitude)
console.log('经度:' + res.longitude)
},
})
},
// chooseLocation() {
// uni.chooseLocation({
// success: (res) => {
// this.formData.area = res.name
// this.formData.lat = res.latitudeame
// this.formData.lng = res.longitude
// console.log('位置名称:' + res.name)
// console.log('详细地址:' + res.address)
// console.log('纬度:' + res.latitude)
// console.log('经度:' + res.longitude)
// },
// })
// },
async submit() {
console.log(this.formData)
if (!this.formData.name) {

2
readme
View File

@@ -9,7 +9,7 @@
njcnyw
1.工程用户 1899999999
1.工程用户 18000001234 12345678
2.营销用户 1888888888
3.正式用户 187777777777
4.运维管理元 18666666666