eoss-ui 0.5.14 → 0.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/form.js CHANGED
@@ -1965,7 +1965,11 @@ var isLogined = function isLogined(_ref8) {
1965
1965
  // const logined = getStorage('logined');
1966
1966
  // eslint-disable-next-line eqeqeq
1967
1967
  if (token || cookie == true || cookie == 1) {
1968
- next && next();
1968
+ if (to.path === '/main' || to.path === '/login') {
1969
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1970
+ } else {
1971
+ next && next();
1972
+ }
1969
1973
  } else {
1970
1974
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1971
1975
  ajax({
@@ -1966,7 +1966,11 @@ var isLogined = function isLogined(_ref8) {
1966
1966
  // const logined = getStorage('logined');
1967
1967
  // eslint-disable-next-line eqeqeq
1968
1968
  if (token || cookie == true || cookie == 1) {
1969
- next && next();
1969
+ if (to.path === '/main' || to.path === '/login') {
1970
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1971
+ } else {
1972
+ next && next();
1973
+ }
1970
1974
  } else {
1971
1975
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1972
1976
  ajax({
package/lib/handler.js CHANGED
@@ -1966,7 +1966,11 @@ var isLogined = function isLogined(_ref8) {
1966
1966
  // const logined = getStorage('logined');
1967
1967
  // eslint-disable-next-line eqeqeq
1968
1968
  if (token || cookie == true || cookie == 1) {
1969
- next && next();
1969
+ if (to.path === '/main' || to.path === '/login') {
1970
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
1971
+ } else {
1972
+ next && next();
1973
+ }
1970
1974
  } else {
1971
1975
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1972
1976
  ajax({