| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <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" @scrolltolower="scrolltolower">
- <view class="list-item align-items-center" :class="site_id == item.site_id?'s-b':''"
- v-for="(item,i) in list" :key="i" @click="selectFun(item)">
- <view class="list-item-s">
- <image v-if="site_id == item.site_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="aspectFill"></image>
- <view class="w-490">
- <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>
- </scroll-view>
- </view>
- </template>
- <script>
- import tools from "@/service/tools";
- import {
- getExpressSite
- } from '@/api/express.js';
- export default {
- data() {
- return {
- site_id: '',
- list: [],
- }
- },
- onLoad(e) {
- this.site_id = Number(e.site_id);
- this.getExpressSite();
- },
- methods: {
- getExpressSite() {
- let school_id = uni.getStorageSync('school_id');
- getExpressSite({
- school_id: school_id
- }).then((res) => {
- if (res.code === 1) {
- this.list = res.data
- }
- })
- },
- selectFun(item) {
- this.site_id = item.site_id;
- uni.setStorageSync('site_id', item.site_id)
- uni.setStorageSync('site_name', item.name)
- uni.setStorageSync('site_address', item.city_name + item.address)
- uni.setStorageSync('site_logo', item.logo)
- tools.leftClick()
- // uni.reLaunch({
- // url: '/pages-takeout/replace-take'
- // })
- },
- },
- }
- </script>
- <style scoped lang="scss">
- .select-site-box {
- .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;
- .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>
|