fourPayProject/51uni/components/select/nationality.vue
2025-03-31 10:23:28 +08:00

47 lines
926 B
Vue

<template>
<view class="page-main">
<headers :titles="titles"><uni-icons type="arrow-left" color="#fff" size="22px"></uni-icons></headers>
<view style="height: 88px; width: 100%;"></view>
<liu-indexed-list :dataList="dataList" :idKey="'value'" :nameKey="'label'" @click="click"></liu-indexed-list>
</view>
</template>
<script>
import headers from '../../components/header/headers.vue'
import request from '../../utils/request.js'
export default {
data() {
return {
titles: '',
dataList: []
}
},
onLoad() {
this.getNation()
},
components: {
headers,
},
methods: {
async getNation() {
let res = await request({
url: 'app/uaBase/dictData/pos_nation',
method: 'post'
})
if (res.code == 0) {
this.dataList = res.data
}
},
//点击列表回调事件
click(e) {
uni.$emit('selectNation', e)
uni.navigateBack()
}
}
}
</script>