yakuza0 2.22.39-beta.4 → 2.22.39-beta.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.22.39-beta.4",
3
+ "version": "2.22.39-beta.6",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -77,12 +77,17 @@ export default (ctx, inject) => {
77
77
  // }
78
78
  if (route.query.ticket || route.query.__isc) {
79
79
  const __isc = route.query.ticket ? md5(route.query.ticket).substring(0, 6) : route.query.__isc
80
- if (global.__http_bd__[__isc]) {
80
+ if (global.__http_bd__ && global.__http_bd__[__isc] && global.__http_bd__[__isc].ucResC) {
81
+ let defC = defaults.headers.Cookie || '';
82
+ if (defC && defC.length > 0) {
83
+ defC += '; '
84
+ }
81
85
  if (typeof req.headers.Cookie === "string" && req.headers.Cookie.length > 0) {
82
- defaults.headers.Cookie = req.headers.Cookie + '; ' + global.__http_bd__[__isc].ucResC;
86
+ defC = defC + global.__http_bd__[__isc].ucResC;
83
87
  } else {
84
- defaults.headers.Cookie = global.__http_bd__[__isc].ucResC;
88
+ defC = defC + global.__http_bd__[__isc].ucResC;
85
89
  }
90
+ defaults.headers.Cookie = defC;
86
91
  }
87
92
  }
88
93
  }
package/utils/secret.js CHANGED
@@ -62,7 +62,7 @@ var secret = {};
62
62
  // import {asymmetric, getKey, symmetry} from "yakuza1/lib/encrypt/sm";
63
63
 
64
64
  _yakuza.global.__yk_gu__ = _yakuza.global.__yk_gu__ || {};
65
- _yakuza.global.__http_bd__ = _yakuza.global.__http_bd__ || {};
65
+ _yakuza.global.__http_bd__ = {};
66
66
 
67
67
  // const allowHeaders = {
68
68
  // 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36',
@@ -191,12 +191,12 @@ var set = exports.set = function set(_ref3) {
191
191
  req = _ref3.req,
192
192
  res = _ref3.res,
193
193
  route = _ref3.route,
194
- $redirect = _ref3.$redirect,
194
+ redirect = _ref3.redirect,
195
195
  store = _ref3.store;
196
196
 
197
197
  return new _promise2.default(function () {
198
198
  var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(resolve, reject) {
199
- var w, mixin, yc, hostname, spiData, spi, spiQuery, spiSecret, parser, setUniversal, ucResC, timeout, universalBody, getUc, getSvcInSsrWithServer, getSvc;
199
+ var w, mixin, yc, hostname, spiData, spi, spiQuery, spiSecret, parser, setUniversal, ucResC, timeout, universalBody, getUc, getSvcInSsrWithServer, getSvc, q, ci;
200
200
  return _regenerator2.default.wrap(function _callee9$(_context9) {
201
201
  while (1) {
202
202
  switch (_context9.prev = _context9.next) {
@@ -221,7 +221,7 @@ var set = exports.set = function set(_ref3) {
221
221
  }
222
222
 
223
223
  if ($yk.standAlone) {
224
- _context9.next = 29;
224
+ _context9.next = 30;
225
225
  break;
226
226
  }
227
227
 
@@ -292,7 +292,7 @@ var set = exports.set = function set(_ref3) {
292
292
  };
293
293
 
294
294
  if (!w) {
295
- _context9.next = 29;
295
+ _context9.next = 30;
296
296
  break;
297
297
  }
298
298
 
@@ -715,6 +715,59 @@ var set = exports.set = function set(_ref3) {
715
715
  return getSvc();
716
716
 
717
717
  case 29:
718
+
719
+ if (route.query.__isc) {
720
+ q = _yakuza._.omit(route.query, ['__isc']);
721
+ // route.query.__isc = ''
722
+ // console.log(route.path, q, 2222);
723
+ // const fu = location.href.replace('__isc=' + route.query.__isc ,'')
724
+ // // console.log(fu, 221);
725
+ // history.pushState(q, "", location.href.split('?')[0]);
726
+ // history.pushState(q, "", route.path);
727
+
728
+ ci = setInterval(function () {
729
+ // history.replaceState(q, '', route.path)
730
+ if (location.href.indexOf("__isc") !== -1) {
731
+ history.pushState(q, "", location.href.split('?')[0]);
732
+ }
733
+ }, 100);
734
+
735
+ setTimeout(function () {
736
+ clearInterval(ci);
737
+ }, 10000);
738
+ // const a = route.path + '?' + qs.stringify(q)
739
+ // console.log(a);
740
+ // console.log(route.path, q, 111);
741
+ // redirect(location.href.split('?')[0], q)
742
+ }
743
+ // if (!checkServer() && yConf.security.isStupid) {
744
+ // function sc() {
745
+ // const sc = Cookies.get('__sc')
746
+ // if (!sc) {
747
+ // Cookies.set('__sc', gPwd(), { expires: 7 });
748
+ // }
749
+ // }
750
+ //
751
+ // const main = document.getElementsByTagName('body')[0]
752
+ // main.onkeydown = sc;
753
+ // main.myKeyUp = sc;
754
+ // main.onclick = sc;
755
+ // main.ondblclick = sc;
756
+ // main.onmousedown = sc;
757
+ // main.onmouseover = sc;
758
+ // main.onmousemove = sc;
759
+ // main.onmouseenter = sc;
760
+ // main.onmouseup = sc;
761
+ // main.onmouseout = sc;
762
+ // main.onmouseleave = sc;
763
+ // if (document.addEventListener) {
764
+ // document.addEventListener('DOMMouseScroll', sc, false);
765
+ // }//W3C
766
+ // window.onmousewheel = document.onmousewheel = sc
767
+ // document.onmousemove = sc
768
+ // }
769
+
770
+ case 30:
718
771
  case "end":
719
772
  return _context9.stop();
720
773
  }