|
|
@@ -1,11 +1,5 @@
|
|
|
<template>
|
|
|
- <iframe
|
|
|
- id="iframe"
|
|
|
- frameborder="0"
|
|
|
- scrolling="no"
|
|
|
- src="https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K&referer=Dingdong"
|
|
|
- >
|
|
|
- </iframe>
|
|
|
+ <iframe id="iframe" frameborder="0" scrolling="no" :src="src"> </iframe>
|
|
|
</template>
|
|
|
<script>
|
|
|
window.addEventListener(
|
|
|
@@ -21,14 +15,29 @@ window.addEventListener(
|
|
|
},
|
|
|
false,
|
|
|
);
|
|
|
-import { mapState } from 'vuex';
|
|
|
export default {
|
|
|
name: '',
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ location: '',
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(['userInfo']),
|
|
|
+ src() {
|
|
|
+ if (this.location) {
|
|
|
+ return (
|
|
|
+ 'https://apis.map.qq.com/tools/locpicker?search=1&type=1&zoom=18&key=GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K&referer=Dingdong&coord=' +
|
|
|
+ this.location
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ if (this.$route.query.location) {
|
|
|
+ this.location = this.$route.query.location;
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|