king
2024-11-20 fe837c3f5cc3aec41031d0f338a424b8b7949137
src/index.js
@@ -12,14 +12,23 @@
import '@/assets/css/viewstyle.scss'
if (!localStorage.getItem('SessionUid')) {
  localStorage.setItem('SessionUid', (() => {
  let sid = (() => {
    let uuid = []
    let _options = '0123456789abcdefghigklmnopqrstuv'
    for (let i = 0; i < 32; i++) {
      uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
    }
    return uuid.join('')
  })())
  })()
  if (/_mk_sid=[0-9a-z]{32}/.test(document.cookie)) {
    sid = document.cookie.match(/_mk_sid=[0-9a-z]{32}/)[0].split('=')[1]
  } else {
    document.cookie = '_mk_sid=' + sid
  }
  localStorage.setItem('SessionUid', sid)
}
fetch('../options.json')
@@ -52,6 +61,7 @@
    GLOB.WXminiAppID = config.WXminiAppID || ''
    GLOB.WXMerchID = config.WXMerchID || ''
    GLOB.WXNotice = config.WXNotice + '' === 'true'
    GLOB.SysNotice = config.SysNotice + '' === 'true'
    GLOB.execType = config.execType === 'x' ? 'x' : ''
    GLOB.mkHS = false
    GLOB.debugger = false