35 lines
589 B
Vue
35 lines
589 B
Vue
<template>
|
|
<h1>城市页</h1>
|
|
<div v-for="item in city.data">
|
|
<h5 class="title">{{ item.prefix }}</h5>
|
|
<div class="cities">
|
|
<div v-for="city in item.cities">{{ city.name }}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { request } from '@/utils';
|
|
export default {
|
|
data() {
|
|
return {
|
|
city: {}
|
|
}
|
|
},
|
|
mounted() {
|
|
request("http://101.35.148.193:3000/api/city/list").then(data => this.city = data)
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped lang="less">
|
|
* {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.title {
|
|
padding-left: 25px;
|
|
line-height: 30px;
|
|
|
|
color: #333;
|
|
}
|
|
</style>
|