Commit e4dc1690 by LJM

bug

parent b0a4ae06
...@@ -191,6 +191,18 @@ ...@@ -191,6 +191,18 @@
} }
}, },
onShow() { onShow() {
var that = this;
if (getApp().globalData.fromPage === "putwaySingle") {
// 从特定页面返回
that.searchParams.search_keyword = '';
// 重置全局变量或执行其他操作
getApp().globalData.fromPage = null;
//再次获取焦点
that.isFocus = false;
setTimeout(() => {
that.isFocus = true;
}, 1000);
}
this.resetChange(); this.resetChange();
this.getData(); this.getData();
}, },
......
...@@ -414,6 +414,8 @@ ...@@ -414,6 +414,8 @@
icon: 'success' icon: 'success'
}); });
setTimeout(() => { setTimeout(() => {
// 在进行导航之前设置全局变量
getApp().globalData.fromPage = "putwaySingle";
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
...@@ -427,6 +429,8 @@ ...@@ -427,6 +429,8 @@
if (res.confirm) { if (res.confirm) {
this.getData(); this.getData();
} else if (res.cancel) { } else if (res.cancel) {
// 在进行导航之前设置全局变量
getApp().globalData.fromPage = "putwaySingle";
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment