| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <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" :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)
-
- 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;
- display: flex;
- .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>
|