更新
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<view class="site-list">
|
||||
<view class="container" v-if="siteList.length">
|
||||
<list >
|
||||
<list>
|
||||
<view class="item" v-for="item,index in siteList" :key="index">
|
||||
<image
|
||||
:src="item.siteImages || 'https://static.czb365.com/1647787216992.jpg?x-oss-process=image/resize,m_lfit,h_420,w_630/format,png'">
|
||||
</image>
|
||||
<view>{{item.siteName}}</view>
|
||||
<view>
|
||||
<view>{{item.address}}</view> <text>{{item.juli | adjust}}km</text>
|
||||
<view>{{item.address || ''}}</view> <text>{{item.juli | adjust}}km</text>
|
||||
</view>
|
||||
<view>0# ¥7.94</view>
|
||||
<view>
|
||||
@@ -36,20 +36,23 @@
|
||||
if (!options.markers) return
|
||||
let markers = JSON.parse(decodeURIComponent(options.markers))
|
||||
this.siteList = markers
|
||||
console.log('site markers',markers)
|
||||
console.log('site markers', markers)
|
||||
},
|
||||
filters: {
|
||||
adjust(val) {
|
||||
if (!val) return '--'
|
||||
val = +val
|
||||
val = +val/1000
|
||||
return val.toFixed(2)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lookPosition(item) {
|
||||
// console.log(getCurrentPages())
|
||||
getCurrentPages()[0].$vm.perspectives(item)
|
||||
uni.navigateBack()
|
||||
let pageArr = getCurrentPages()
|
||||
let target = pageArr[pageArr.length - 2]
|
||||
if (target.$vm.perspectives) {
|
||||
target.$vm.perspectives(item)
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
jump(item) {
|
||||
let obj = {
|
||||
@@ -76,17 +79,22 @@
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
|
||||
image {
|
||||
width: 450rpx;
|
||||
height: 381rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.site-list {
|
||||
min-height: 100vh;
|
||||
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
padding: 50rpx;
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user