deming/components/mine/address-active/index.vue
2020-06-23 09:05:45 +08:00

87 lines
1.8 KiB
Vue

<template>
<view class="address-active">
<view class="user-info">
<view>
<input type="text" placeholder="收货人" />
</view>
<view>
<input type="text" placeholder="手机号" />
</view>
<view class="area" @click="show=true">
<input type="text" placeholder="省市区" disabled />
</view>
<view>
<input type="text" placeholder="详细地址" />
</view>
<view class="set-default">
<view>设为默认地址</view>
<view>
<u-switch v-model="checked" active-color="#FF770F" inactive-color="#A9A7A7" size="35"></u-switch>
</view>
</view>
</view>
<view class="edit-btn">保存地址</view>
<!-- <u-picker mode="region" v-model="show" @confirm="setArea"></u-picker> -->
<u-select v-model="show" mode="mutil-column-auto" :list="areaList" @confirm="setArea"></u-select>
</view>
</template>
<script>
export default {
data() {
return {
checked: false,
show: false,
areaList: []
}
},
mounted() {
this.getAreaList(0);
},
methods: {
setArea(e) {
console.log(e);
},
getAreaList(pid) {
this.$u.api.getAreaList({
pid: pid
}).then((res)=>{
if (res.errCode == 0) {}
})
}
},
}
</script>
<style lang="scss" scoped>
.address-active {
.user-info {
border-top: 1rpx solid rgba(235,235,235,1);
> view {
height: 98rpx;
padding: 30rpx;
border-bottom: 2rpx solid rgba(235,235,235,1);
> input {
font-size: 30rpx;
outline: none;
}
}
.set-default {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
color: rgba(51,51,51,1);
}
}
.edit-btn {
margin: 122rpx auto 0;
width: 690rpx;
height: 98rpx;
background: rgba(255,119,15,1);
border-radius: 49rpx;
font-size: 36rpx;
color:rgba(255,255,255,1);
line-height: 98rpx;
text-align: center;
}
}
</style>