| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <template>
- <view class="select-site-box iPhone-bottom flex-common-css box-border-box">
- <Nav title='选择站点'></Nav>
- <scroll-view class="scroll-view-css box-border-box p-24" scroll-y="true">
- <view class="list-item" :class="id == item.id?'s-b':''" v-for="(item,i) in list" :key="i"
- @click="selectFun(item)">
- <!-- <image v-if="true" class="jlzj-box" src="@/static/img/buy/jlzj.png" mode=""></image> -->
- <view class="align-items-center mr-18">
- <view class="list-item-s">
- <image v-if="id == item.id" src="@/static/img/common/y-select.png" mode=""></image>
- <image v-else src="@/static/img/common/n-select.png" mode=""></image>
- </view>
- <image class="img-1" :src="item.logo" mode="scaleToFill"></image>
- <view class="w292">
- <view class="fs-32 fw-600 fc-0">{{item.name}}</view>
- <view class="fs-26 fw-400 fc-9">{{item.city_name}}{{item.address}}</view>
- </view>
- </view>
- <view class="box-right text-align-center">
- <view class="">
- <view class="fs-28 mb-12">去下单</view>
- <!-- <view class="fs-26 fc-9">距您你{{item.distance}}km</view> -->
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </template>
- <script>
- import {
- laundrySite
- } from '@/api/laundry.js';
- import tools from "@/service/tools";
- export default {
- data() {
- return {
- id: '',
- list: [],
- }
- },
- onLoad(e) {
- if (e.id) {
- this.id = Number(e.id);
- }
- this.getList();
- },
- methods: {
- getList() {
- let obj = {
- school_id: uni.getStorageSync('school_id'),
- lon: uni.getStorageSync('lon'),
- lat: uni.getStorageSync('lat'),
- }
- laundrySite(obj).then((res) => {
- if (res.code === 1) {
- this.list = res.data;
- }
- })
- },
- selectFun(item) {
- let obj = JSON.stringify(item);
- this.id = item.id;
- uni.$emit('stationData', item)
- uni.navigateBack({
- delta: 1
- });
- },
- },
- }
- </script>
- <style scoped lang="scss">
- .select-site-box {
- .box-right {
- border-left: 2rpx solid #eee;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding-left: 42rpx;
- }
- .w292 {
- width: 292rpx;
- }
- .list-item {
- width: 100%;
- min-height: 162rpx;
- background: #FFFFFF;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- margin-bottom: 20rpx;
- box-sizing: border-box;
- padding: 24rpx 32rpx 20rpx 80rpx;
- position: relative;
- display: flex;
- .jlzj-box {
- width: 118rpx;
- height: 44rpx;
- position: absolute;
- right: 0rpx;
- top: -1rpx;
- }
- .img-1 {
- width: 80rpx;
- height: 80rpx;
- border-radius: 8rpx;
- margin-right: 20rpx;
- }
- .w-490 {
- width: 490rpx;
- }
- .list-item-s {
- position: absolute;
- left: 24rpx;
- top: 45%;
- image {
- width: 32rpx;
- height: 32rpx;
- }
- }
- }
- .s-b {
- border: 2rpx solid #41ABF5;
- }
- }
- </style>
|