diff --git a/pages/select_address/select_address.vue b/pages/select_address/select_address.vue
index c93b55e..3c4dd63 100644
--- a/pages/select_address/select_address.vue
+++ b/pages/select_address/select_address.vue
@@ -22,7 +22,7 @@
当前位置:
{{street}}
- 重新定位
+ 重新定位
附近地址
@@ -36,11 +36,44 @@
泸州区县
- 江阳区
+
+ {{item.name}}
+
选择街道/镇
+
+
+ A
+
+
+ {{item.name}}
+
+
+
+
+ B
+
+
+ {{item.name}}
+
+
+
+
+ D
+
+
+ {{item.name}}
+
+
+
+
@@ -51,6 +84,10 @@
merClassifly,
getProductslist
} from '@/api/store.js';
+ import {
+ getArea,
+ getStreet
+ } from "@/api/article.js";
export default {
data() {
return {
@@ -64,11 +101,16 @@
longitude: '',
town: '',
street_id: '',
- street: ''
+ street: '',
+ areaList: [],
+ streetList: [],
+ area_change: '',
+ street_change: '',
}
},
onLoad() {
this.getLoaction();
+ this.loadArea();
},
onShow() {},
methods: {
@@ -120,6 +162,29 @@
// });
}
});
+ },
+ reGetLocation(){
+ this.getLoaction()
+ },
+ loadArea(){
+ getArea({
+ city_code: 510500
+ }).then((res)=>{
+ this.areaList = res.data;
+ this.changeArea(this.areaList[0]);
+ })
+ },
+ loadStreet(area_code){
+ this.street_change = '';
+ getStreet({
+ area_code
+ }).then((res)=>{
+ this.streetList = res.data;
+ })
+ },
+ changeArea(item){
+ this.area_change = item.code;
+ this.loadStreet(this.area_change);
}
},
onPullDownRefresh() {
@@ -208,9 +273,32 @@
margin-right: 22rpx;
}
.area-item-on{
- background-color: #F4F4F4;
- color: #333;
- font-weight: bold;
+ // background-color: #F4F4F4;
+ color: #ff6d20;
+ // font-weight: bold;
+ border: 2rpx solid #ff6d20;
+ }
+ }
+
+ .street{
+ padding-top: 28rpx;
+ .letter-item{
+ display: flex;
+ .letter{
+ flex-shrink: 0;
+ margin-right: 28rpx;
+ font-size: 25rpx;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 400;
+ color: #737373;
+ }
+ .street-item{
+ padding-bottom: 28rpx;
+ font-size: 28rpx;
+ font-family: PingFang SC, PingFang SC;
+ font-weight: 400;
+ color: #333333;
+ }
}
}
}