|
|
@@ -188,10 +188,8 @@ import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
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 {getIntroduce,applyRegister} from "@/api/official";
|
|
|
+import { mapResolve } from "@/api/map";
|
|
|
export default {
|
|
|
name: "apply-data",
|
|
|
components: {
|
|
|
@@ -235,6 +233,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) {
|
|
|
@@ -422,4 +439,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|