|
@@ -12,12 +12,17 @@
|
|
|
<van-address-list
|
|
|
v-model="chosenAddressId"
|
|
|
:list="list"
|
|
|
- default-tag-text="默认"
|
|
|
:disabled-list="[]"
|
|
|
@add="onAdd"
|
|
|
@select="onSelect"
|
|
|
@edit="onEdit"
|
|
|
/>
|
|
|
+ <div class="addr-null"
|
|
|
+ v-show="isShowAddrNull"
|
|
|
+ >
|
|
|
+ <img src="@/assets/images/home/addr-null.png" alt="">
|
|
|
+ <div class="addr-null-title">暂无地址~</div>
|
|
|
+ </div>
|
|
|
<div
|
|
|
class="addmore"
|
|
|
v-if="total > 0 && list.length < total && list.length > 0"
|
|
@@ -39,6 +44,7 @@ export default {
|
|
|
mixins: [resToken],
|
|
|
data() {
|
|
|
return {
|
|
|
+ isShowAddrNull:true,
|
|
|
delId: "",
|
|
|
chosenAddressId: "",
|
|
|
isRes: this.$route.query.id ? this.$route.query.id : "0",
|
|
@@ -138,7 +144,6 @@ export default {
|
|
|
},
|
|
|
async searchList() {
|
|
|
if (!this.loading) {
|
|
|
- console.log(this.chosenAddressId);
|
|
|
if (this.parmValue.page === 1) {
|
|
|
this.list = [];//如果没有在加载中且当前页数是1,清空list列表,防止造成上次的地址残留
|
|
|
}
|
|
@@ -156,7 +161,13 @@ export default {
|
|
|
return v1;
|
|
|
});
|
|
|
this.list.push(...arr);//把arr数组解构放到list列表渲染
|
|
|
- console.log(this.list);
|
|
|
+ console.log(this.list.length);
|
|
|
+ console.log(this.isShowAddrNull);
|
|
|
+ if(this.list.length != 0){
|
|
|
+ this.isShowAddrNull = false;
|
|
|
+ }else{
|
|
|
+ this.isShowAddrNull = true;
|
|
|
+ }
|
|
|
if (this.chosenAddressId === "" && this.list.length > 0) {
|
|
|
this.chosenAddressId = this.list[0].id;
|
|
|
}
|
|
@@ -295,7 +306,22 @@ export default {
|
|
|
color: #1A1A1A;
|
|
|
line-height: 26px;
|
|
|
}
|
|
|
-.van-icon.van-icon-arrow-left.van-nav-bar__arrow{
|
|
|
- color: #1A1A1A;
|
|
|
+//空地址时候的样式
|
|
|
+.addr-null{
|
|
|
+ width: 73px;
|
|
|
+ height: 102px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: fixed;
|
|
|
+ left: 130px;
|
|
|
+ top: 150px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #959595;
|
|
|
+ // line-height: 7px;
|
|
|
+ img{
|
|
|
+ width: 100%;
|
|
|
+ padding-bottom:10px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|