|
|
@@ -157,6 +157,7 @@ import AppUploader from "@/components/app-uploader";
|
|
|
import AppBindInfo from "@/components/app-bind-info";
|
|
|
const form = require("@/utils/formValidation.js");
|
|
|
import { getIntroduce, applyRegister } from "@/api/official";
|
|
|
+import { mapResolve } from "@/api/map";
|
|
|
export default {
|
|
|
name: "apply-data",
|
|
|
components: {
|
|
|
@@ -199,6 +200,25 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
onLoad() {},
|
|
|
+ onShow() {
|
|
|
+ let self = this
|
|
|
+ uni.getLocation({
|
|
|
+ type: 'wgs84',
|
|
|
+ success: function (res) {
|
|
|
+ mapResolve({lat:res.latitude,long:res.longitude}).then((obj) => {
|
|
|
+ console.log(obj)
|
|
|
+ self.form.longitude=res.longitude,
|
|
|
+ self.form.latitude=res.latitude,
|
|
|
+ self.form.province = obj.data.province
|
|
|
+ self.form.city = obj.data.city
|
|
|
+ self.form.address = obj.data.address
|
|
|
+ self.form.showAddress = obj.data.showAddress
|
|
|
+ })
|
|
|
+ // console.log('当前位置的经度:' + res.longitude);
|
|
|
+ // console.log('当前位置的纬度:' + res.latitude);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
methods: {
|
|
|
//图片地址
|
|
|
resultData(val) {
|