diff --git a/exchange.html b/exchange.html
index 7b5ca53..e9e1ccb 100644
--- a/exchange.html
+++ b/exchange.html
@@ -292,10 +292,13 @@
window.location.replace('./homepage.html');
}, 3000);
} else {
- let backUrl = window.history.length;
- if (backUrl) {
- history.go(-backUrl + 1);
- }
+ // let backUrl = window.history.length;
+ // if (backUrl) {
+ // history.go(-backUrl + 1);
+ // }
+ /*跳转起始页面*/
+ let entryLink=sessionStorage.getItem('entryLink');
+ window.location.replace(entryLink);
}
}
}
diff --git a/index.html b/index.html
index 33c5b7c..44ac964 100644
--- a/index.html
+++ b/index.html
@@ -150,7 +150,9 @@
sessionStorage.setItem('token', res.data.token);
sessionStorage.setItem('haskey', keyCode);
this.openDialog('正在加载商品...');
+ sessionStorage.setItem('entryLink',window.location.href);//存储起始页链接
window.location.replace("/homepage.html");
+
} else {
self.openErrorDialog(res.message);
}
@@ -233,6 +235,7 @@
sessionStorage.setItem('key', self.key);
sessionStorage.setItem('token', res.data.token);
this.openDialog('正在加载商品...');
+ sessionStorage.setItem('entryLink',window.location.href);//存储起始页链接
setTimeout(() => {
window.location.href = './homepage.html';
}, 2000);
@@ -278,6 +281,7 @@
if (istoGoods) {
sessionStorage.setItem('getTokenList', JSON.stringify(getTokenList));
this.openDialog('正在加载商品...');
+ sessionStorage.setItem('entryLink',window.location.href);//存储起始页链接
setTimeout(() => {
window.location.href = './homepage.html';
}, 2000);