123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <template>
- <view class="container">
- <!-- <navbar :config="config" backColor="#999999"></navbar> -->
- </view>
- </template>
- <script>
- let app = getApp();
- export default {
- data() {
- return {
- RefreshMap: false
- };
- },
- onLoad() {
-
- uni.$on('mapJump', (data) => {
- this.$openPage(data)
- })
- uni.$on('onMapNextPage', res => {
- this.RefreshMap = false;
- });
- },
- onShow() {
- this.openSubNVue()
- if (this.RefreshMap) {
- uni.$emit('initMap', {
- init: true
- })
- }
- this.RefreshMap = true;
- },
- onUnload() {
- uni.$off('initPop')
- uni.$off('mapJump')
- uni.$off('onMapNextPage')
- },
- methods: {
- openSubNVue() {
- const subNVue = uni.getSubNVueById('mapPopup');
- subNVue.setStyle({
- "top": '0',
- 'bottom': 0
- // "height": screenHeight - navHeight + 'px'
- })
- subNVue && subNVue.show()
- // this.subNVue && this.subNVue.show('slide-in-left', 300, () => {
- // console.log('初始化')
- // })
- },
- onSearch(e) {
- uni.$emit('NextMap', e)
- },
- onSearchKwd(e) {
- uni.$emit('NextMapKwd', e)
- }
- },
- onHide() {
- setTimeout(() => {
- const subNVue = uni.getSubNVueById('mapPopup');
- subNVue && subNVue.hide()
- }, 100)
- }
- };
- </script>
|