Commit fd19f023 authored by 姬鋆屾's avatar 姬鋆屾
parents 1a82a6f3 40244ed0
......@@ -22,8 +22,8 @@ import "quill/dist/quill.bubble.css";
import { ColorPicker } from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ColorPicker);
// import { VueJsonp } from "vue-jsonp";
// Vue.use(VueJsonp);
import { VueJsonp } from "vue-jsonp";
Vue.use(VueJsonp);
// 公共样式
import "@/assets/css/common.css";
Vue.use(VueQuillEditor);
......
......@@ -306,7 +306,6 @@
import { modelList, siteSave } from "@/services/basicsetFun";
import YCheckbox from "@/components/ycheckbox/YCheckbox.vue";
import YSwitch from "@/components/yswitch/YSwitch.vue";
import axios from "axios";
// import options from "@/utils/city";
import { regionData } from "element-china-area-data";
export default {
......@@ -725,16 +724,15 @@ export default {
getAddress(address) {
this.$refs.ruleForm.validateField("detailAddress", (errVal) => {
if (errVal !== "中心详细地址不能为空") {
axios
.get("https://restapi.amap.com/v3/geocode/geo", {
params: {
this.$jsonp(`https://restapi.amap.com/v3/geocode/geo`, {
//官方接口
output: "jsonp",
key: "21e7ac78b448640e516f1eddc3ffd720", //key
address: address, //获取输入的位置
},
})
.then((res) => {
if (res.data.status == 1) {
let { location } = res.data.geocodes[0];
if (res.status == 1) {
let { location } = res.geocodes[0];
[
this.formInfo.longitude,
this.formInfo.latitude,
......@@ -744,7 +742,7 @@ export default {
}
})
.catch((err) => {
this.$message.error(err);
console.log(err);
});
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment