| | |
| | | title: '详情'
|
| | | })
|
| | | }
|
| | | this.getCurrentLocation();
|
| | |
|
| | |
|
| | | },
|
| | |
| | |
|
| | | async getAllBizDict() {
|
| | | // 获取九小场所类型
|
| | | await this.getBizDict('nineType', this.nineTypeList)
|
| | | // await this.getBizDict('nineType', this.nineTypeList)
|
| | | // 获取阵地
|
| | | await this.getBizDict('frontType', this.frontTypeList)
|
| | | },
|
| | |
| | | uni.getLocation({
|
| | | type: 'gcj02', // 坐标系类型
|
| | | success: (res) => {
|
| | | var latitude = res.latitude; // 维度
|
| | | var longitude = res.longitude; // 经度
|
| | | // var latitude = res.latitude; // 维度
|
| | | // var longitude = res.longitude; // 经度
|
| | |
|
| | | this.form.lng = longitude
|
| | | this.form.lat = latitude
|
| | | this.form.jwd =
|
| | | `${Number(res.longitude).toFixed(6)},${Number(res.latitude).toFixed(6)}`
|
| | |
|
| | | // this.form.lng = longitude
|
| | | // this.form.lat = latitude
|
| | | // this.form.jwd =
|
| | | // `${Number(res.longitude).toFixed(6)},${Number(res.latitude).toFixed(6)}`
|
| | | },
|
| | | fail: function(res) {
|
| | | console.log('获取定位失败:' + res.errMsg);
|
| | | complete: (res) => {
|
| | | if (res.latitude) {
|
| | | this.$set(this.form, "x", res.longitude)
|
| | | this.$set(this.form, "y", res.latitude)
|
| | | } else {
|
| | | uni.showModal({
|
| | | title: "提示!",
|
| | | content: `获取定位信息失败 ${res.errMsg}`,
|
| | | showCancel: false
|
| | | })
|
| | | }
|
| | | }
|
| | | });
|
| | | },
|