全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug

This commit is contained in:
stivepeim
2021-06-11 17:41:16 +08:00
parent 0b9f28fa52
commit b76840e10f
582 changed files with 35633 additions and 28276 deletions

View File

@@ -45,21 +45,26 @@
isLog: {
type: Boolean,
default: false,
},
}
},
data() {
return {
active: 0,
//地址列表
addressList: [],
is_loading: true
is_loading: true,
addressList: []
};
},
methods: {
tapAddress: function(e, addressid) {
this.active = e;
this.$emit('OnChangeAddress', addressid);
let a = {};
for (let i = 0, leng = this.addressList.length; i < leng; i++) {
if (this.addressList[i].id == addressid) {
a = this.addressList[i];
}
}
this.$emit('OnChangeAddress', a);
},
close: function() {
this.$emit('changeClose');
@@ -79,14 +84,18 @@
limit: 5
}).then(res => {
let addressList = res.data.list;
that.$set(that, 'addressList', addressList);
that.is_loading = false;
let defaultAddress = {};
//处理默认选中项
if(!that.address.addressId) return;
for (let i = 0, leng = addressList.length; i < leng; i++) {
if (addressList[i].id == that.address.addressId) {
that.active = i;
defaultAddress = this.addressList[i];
}
}
that.$set(that, 'addressList', addressList);
that.is_loading = false;
this.$emit('OnDefaultAddress', defaultAddress);
})
}
}