123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <template>
- <view :class="['swiper-box' , DataType === 1 && addressList.length > 0 ? '' : 'hide-element' ]" @touchmove="(e) => {return false}" :style="{'bottom': bottom }">
- <esc-swiper ref="swiper" :autoplay="false" :circular="false" :current.sync="current" :size="addressList.length"
- :plus="2" :width="750" :height="317" :itemWidth="623" :space="20">
- <esc-swiper-item v-for="(item, idx) in addressList" :index="idx" :key="`swiper_${idx}`">
- <view class="swiper-content" id="details" @click.stop="e => {onViewDetails(item , e)}">
- <view class="content-info">
- <image v-if="item.icon" class="info-logo" :src="item.icon" mode="scaleToFill"></image>
- <image v-else class="info-logo" src="@/static/map/default-icon.png" mode="scaleToFill"></image>
- <view class="info-text">
- <text class="info-name nvue-one-row">{{item.name}}</text>
- <view class="info-more">
- <view class="more-text">
- <view class="auto-width-item">
- <view class="bottomTextView">
- <text class="bottomText nvue-one-row">{{getTypeName(item)}}</text>
- </view>
- </view>
- <text class="info-site nvue-one-row">{{(item.distance/1000).toFixed(1)}}公里</text>
- <text class="info-site nvue-one-row">{{item.detailedAddress}}</text>
- </view>
- <view class="more-btn" id="goMap" @click.stop="toHere(item)">
- <image class="toimg" src="@/static/map/location.png" mode="scaleToFill">
- </image>
- <text class="btn-text">到这里</text>
- </view>
- </view>
- </view>
- </view>
- <text class="content-details nvue-two-row">{{item.intro}}</text>
- </view>
- </esc-swiper-item>
- </esc-swiper>
- </view>
- </template>
- <script>
- import Mixin from "./Mixin.js"
- export default {
- mixins: [Mixin],
- props: {
- },
- // classifyList
- data() {
- return {
- current: 0,
- bottom: '40px'
- }
- },
- watch: {
- current: {
- handler: function(newC, oldC) {
- this.$emit('onCurrent', newC)
- },
- immediate: true
- }
- },
- created() {
- const platform = uni.getSystemInfoSync().platform + '';
- // ios 系统
- if (platform.toLowerCase() == "ios") {
- this.bottom = '70px'
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import url("./style.scss");
- .swiper-box {
- position: absolute;
- left: 0;
- z-index: 1;
- // background-color: skyblue;
- .swiper-content {
- width: 623rpx;
- height: 317rpx;
- background-color: #fff;
- border-radius: 20rpx;
- overflow: hidden;
- padding: 20rpx;
- .content-info {
- height: 168rpx;
- flex-direction: row;
- align-items: stretch;
- justify-content: space-between;
- .info-logo {
- width: 168rpx;
- height: 168rpx;
- border-radius: 20rpx;
- }
- .info-text {
- width: 390rpx;
- height: 168rpx;
- flex-direction: column;
- .info-name {
- font-size: 30rpx;
- height: 42rpx;
- font-family: PingFang SC, PingFang SC-Bold;
- font-weight: 700;
- color: #333333;
- }
- .info-more {
- height: 126rpx;
- flex-direction: row;
- justify-content: space-between;
- align-items: flex-end;
- .more-text {
- height: 126rpx;
- flex-direction: column;
- justify-content: space-between;
- width: 268rpx;
- padding-right: 20rpx;
- // .info-tag {
- // height: 42rpx;
- // font-size: 24rpx;
- // background-color: #E3FCFC;
- // }
- .bottomTextView {
- border-radius: 20rpx 0px;
- height: 42rpx;
- font-size: 24rpx;
- background-color: #E3FCFC;
- .bottomText {
- line-height: 42rpx;
- padding: 0 22rpx;
- font-size: 24rpx;
- color: #43BDD6;
- }
- }
- .info-site {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Medium;
- color: #666666;
- }
- }
- .more-btn {
- width: 122rpx;
- height: 50rpx;
- // background: linear-gradient(90deg,#45c7d5 4%, #3cb7d1 93%);
- background-color: #45c7d5;
- border-radius: 25rpx;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- .toimg {
- width: 22rpx;
- height: 24rpx;
- }
- .btn-text {
- font-size: 24rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #ffffff;
- }
- }
- }
- }
- }
- .content-details {
- padding-top: 25rpx;
- height: 109rpx;
- font-size: 30rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #1a1a1a;
- }
- }
- }
- .auto-width-item {
- overflow: hidden;
- flex-direction: row;
- }
- </style>
|