2020-06-03 09:14:04 +08:00
|
|
|
<template>
|
|
|
|
<view class="address-active">
|
|
|
|
<view class="user-info">
|
|
|
|
<view>
|
|
|
|
<input type="text" placeholder="收货人" />
|
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<input type="text" placeholder="手机号" />
|
|
|
|
</view>
|
2020-06-22 17:45:17 +08:00
|
|
|
<view class="area" @click="show=true">
|
|
|
|
<input type="text" placeholder="省市区" disabled />
|
2020-06-03 09:14:04 +08:00
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<input type="text" placeholder="详细地址" />
|
|
|
|
</view>
|
|
|
|
<view class="set-default">
|
|
|
|
<view>设为默认地址</view>
|
|
|
|
<view>
|
2020-06-04 08:21:34 +08:00
|
|
|
<u-switch v-model="checked" active-color="#FF770F" inactive-color="#A9A7A7" size="35"></u-switch>
|
2020-06-03 09:14:04 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="edit-btn">保存地址</view>
|
2020-06-22 17:45:17 +08:00
|
|
|
<!-- <u-picker mode="region" v-model="show" @confirm="setArea"></u-picker> -->
|
2020-06-23 09:05:45 +08:00
|
|
|
<u-select v-model="show" mode="mutil-column-auto" :list="areaList" @confirm="setArea"></u-select>
|
2020-06-03 09:14:04 +08:00
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2020-06-22 17:45:17 +08:00
|
|
|
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) {}
|
|
|
|
})
|
2020-06-03 09:14:04 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</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>
|