diyici
This commit is contained in:
8
ChargingStation/pages/chargingPorts/index.scss
Normal file
8
ChargingStation/pages/chargingPorts/index.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
.chargingPorts_body{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(180deg, rgba(241,248,253,0.9) 2%, rgba(241,248,253,0.4) 100%);
|
||||
padding-top: 25rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
51
ChargingStation/pages/chargingPorts/index.vue
Normal file
51
ChargingStation/pages/chargingPorts/index.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<view class="chargingPorts_body">
|
||||
<scroll-view v-if="list.length" style="height: 100%;" scroll-y="true" @scrolltolower='scrolltolower'>
|
||||
<port-item :item='item' :key="index" v-for="(item,index) in list"></port-item>
|
||||
</scroll-view>
|
||||
<image class="qx" v-else src="@/static/qs.png" mode=""></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import portItem from "../../components/portItem/index.vue"
|
||||
import station from '@/api/station.js'
|
||||
export default {
|
||||
components: {
|
||||
portItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.equipmentType && e.id) {
|
||||
this.getInterface(e.equipmentType, e.id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getInterface(equipmentType, id) {
|
||||
station.getConnectorList({
|
||||
equipmentType: equipmentType,
|
||||
id: id
|
||||
}).then(res => {
|
||||
this.list = res.data;
|
||||
this.list.forEach(item=>{
|
||||
item['color'] = equipmentType=='1'? '#48b8ba' : equipmentType=='2'? '#36658DFF': '#F67A22FF'
|
||||
})
|
||||
})
|
||||
},
|
||||
scrolltolower() {
|
||||
uni.showToast({
|
||||
title: '到底了',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import 'index.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user