|
@@ -2,7 +2,7 @@
|
|
|
<view class="content">
|
|
|
<view class="map">
|
|
|
<map @updated='mapChange' ref='map_1' style="width:750rpx;" :style="{'height': height}" :latitude="latitude"
|
|
|
- :longitude="longitude" :markers="marker" @markertap="lookmore" @regionchange="mapchange"></map>
|
|
|
+ :longitude="longitude" :markers="marker" @markertap="lookmore" @regionchange="mapchange" show-location></map>
|
|
|
</view>
|
|
|
<view class="aedxq-wrap" v-if="isShow">
|
|
|
<view class="xq-top">
|
|
@@ -50,7 +50,8 @@
|
|
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
|
|
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
|
|
import {
|
|
|
- getAed
|
|
|
+ getAed,
|
|
|
+ MiniLink
|
|
|
} from '@/api/category.js'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -107,29 +108,11 @@
|
|
|
onLoad() {
|
|
|
let obj = this;
|
|
|
this.getLocal()
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
-
|
|
|
- // if (!this.hasLogin) {
|
|
|
- // // 登录拦截
|
|
|
- // // interceptor();
|
|
|
- // uni.showModal({
|
|
|
- // title: '登录',
|
|
|
- // content: '您未登录,是否马上登陆?',
|
|
|
- // success: e => {
|
|
|
- // if (e.confirm) {
|
|
|
- // interceptor();
|
|
|
- // }
|
|
|
- // },
|
|
|
- // fail: e => {
|
|
|
- // console.log(e);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // } else {
|
|
|
-
|
|
|
- // // this.loadData();
|
|
|
- // }
|
|
|
+
|
|
|
+ // this.getUrl()
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('user', ['hasLogin', 'userInfo']),
|
|
@@ -137,6 +120,14 @@
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations('user', ['setUserInfo']),
|
|
|
+ getUrl() {
|
|
|
+
|
|
|
+ MiniLink({
|
|
|
+ path: '/pages/applic/aed'
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
//
|
|
|
mapchange(e){
|
|
|
console.log('地图刷新完毕',e)
|
|
@@ -304,7 +295,8 @@
|
|
|
}) => {
|
|
|
console.log(data, 'aed++++++++++++++')
|
|
|
obj.AEDList = obj.AEDList.concat(data);
|
|
|
- obj.page++
|
|
|
+
|
|
|
+
|
|
|
let arr = data.map(item => ({
|
|
|
latitude: item.latitude,
|
|
|
longitude: item.longitude,
|
|
@@ -315,6 +307,14 @@
|
|
|
address: item.address
|
|
|
}));
|
|
|
obj.marker = obj.marker.concat(arr)
|
|
|
+ if(obj.page == 1) {
|
|
|
+ obj.lookmore({
|
|
|
+ detail: {
|
|
|
+ markerId: 1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ obj.page++
|
|
|
console.log('加入完成+++++++++++++')
|
|
|
if (data.length == obj.limit) {
|
|
|
obj.loadingType = 'more'
|