Compare commits

...

2 Commits

@ -58,11 +58,11 @@ export const STATION_LIST = {
}, },
{ {
id: '33', id: '33',
stationName: '方阵1' stationName: '方阵2'
}, },
{ {
id: '34', id: '34',
stationName: '方阵1' stationName: '方阵3'
}, },
], ],
'1052758022': [ '1052758022': [

@ -69,6 +69,21 @@
}, },
methods: { methods: {
getStationList() { getStationList() {
const userInfo = uni.getStorageSync('login_user_info')
const username = userInfo.username
const filterStation = [
{
username: 'hailun',
stationId: ['1052758024'],
stationName: '海伦'
},
{
username: 'hanzhong',
stationId: ['1052758028', '1052758029'],
stationName: '汉钟'
},
]
const filterStationItem = filterStation.some(v => v.username === username) && filterStation.filter(v => v.username === username)[0]
getStationList({ getStationList({
pageSize:20 pageSize:20
}).then(res => { }).then(res => {
@ -77,6 +92,11 @@
}).map(v => { }).map(v => {
v.children = STATION_LIST[v.id] v.children = STATION_LIST[v.id]
return v return v
}).filter(v => {
if (filterStationItem) {
return v.stationName.includes(filterStationItem.stationName)
}
return v
}) })
this.station = this.stationData[this.index] this.station = this.stationData[this.index]
uni.setStorageSync('_pro_stations', this.stationData) uni.setStorageSync('_pro_stations', this.stationData)

Loading…
Cancel
Save