mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 16:05:53 +08:00
选择地址功能添加loading方法
This commit is contained in:
@@ -185,25 +185,35 @@ export default {
|
|||||||
this.tabbars.splice(index + 1, this.tabbars.length - index - 1);
|
this.tabbars.splice(index + 1, this.tabbars.length - index - 1);
|
||||||
}
|
}
|
||||||
if (this.tabbars.length < this.pickersize) {
|
if (this.tabbars.length < this.pickersize) {
|
||||||
let data = await getRegionsById(item.id);
|
uni.showLoading({
|
||||||
// 当前选项级为最后一级时回调,将选中的数据返回
|
title: "加载中",
|
||||||
if (data.data.result.length == 0) {
|
mask:true
|
||||||
this.$emit("funcValue", this.tabbars);
|
});
|
||||||
this.hide();
|
try {
|
||||||
} else {
|
let data = await getRegionsById(item.id);
|
||||||
// 将新的数据填充进下一级
|
uni.hideLoading();
|
||||||
var current = {
|
// 当前选项级为最后一级时回调,将选中的数据返回
|
||||||
localName: "请选择",
|
if (data.data.result.length == 0) {
|
||||||
id: "",
|
this.$emit("funcValue", this.tabbars);
|
||||||
children: data.data.result,
|
this.hide();
|
||||||
|
} else {
|
||||||
};
|
// 将新的数据填充进下一级
|
||||||
this.tabbars.push(current);
|
var current = {
|
||||||
this.tabCurrentIndex++;
|
localName: "请选择",
|
||||||
|
id: "",
|
||||||
|
children: data.data.result,
|
||||||
|
|
||||||
|
};
|
||||||
|
this.tabbars.push(current);
|
||||||
|
this.tabCurrentIndex++;
|
||||||
|
|
||||||
// 当前距离重新为最上面
|
// 当前距离重新为最上面
|
||||||
this.$set(this,'scrollTop',0)
|
this.$set(this,'scrollTop',0)
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.$emit("funcValue", this.tabbars);
|
this.$emit("funcValue", this.tabbars);
|
||||||
this.hide();
|
this.hide();
|
||||||
|
|||||||
Reference in New Issue
Block a user