flat: 添加定位
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<block v-if="activeTab == 0">
|
||||
<view v-if="newList.length > 0" style="padding-bottom: 20rpx;">
|
||||
<block v-for="(item, index) in newList" :key="index">
|
||||
<companyList :companyitem="item"></companyList>
|
||||
<companyList :companyitem="item" :position="userLocation"></companyList>
|
||||
</block>
|
||||
</view>
|
||||
<view v-else>
|
||||
@@ -125,7 +125,9 @@
|
||||
getcoder
|
||||
} from "@/api/map.js";
|
||||
import verticalMenu from '@/components/vertical-menu/vertical-menu.vue';
|
||||
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
export default {
|
||||
components: {
|
||||
vTabs,
|
||||
@@ -134,7 +136,9 @@
|
||||
workList,
|
||||
userrecruitList
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['userLocation']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
policyContentList: [],
|
||||
@@ -180,6 +184,7 @@
|
||||
},
|
||||
onLoad: function() {
|
||||
this.getData()
|
||||
console.log('userLocation', this.userLocation)
|
||||
// this.getPolicy()
|
||||
},
|
||||
onShow: function() {
|
||||
@@ -398,7 +403,8 @@
|
||||
return
|
||||
}
|
||||
if (this.activeTab === 2) {
|
||||
if (this.policyPage.current <= Math.ceil(this.policyPage.total / this.policyPage.size)) {
|
||||
if (this.policyPage.current <= Math.ceil(this.policyPage.total / this.policyPage
|
||||
.size)) {
|
||||
if (this.isSearch) {
|
||||
this.getPolicySearch()
|
||||
} else {
|
||||
@@ -527,7 +533,8 @@
|
||||
this.policyPage.current += 1;
|
||||
this.policyPage.total = res.data.data.total;
|
||||
if (res.data.data && res.data.data.records.length) {
|
||||
this.policyContentList = this.policyContentList.concat(res.data.data.records);
|
||||
this.policyContentList = this.policyContentList.concat(res.data.data
|
||||
.records);
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user