king
2022-11-11 ba138a0acb597e1420d1041e7d8e89ad810c57a5
src/api/index.js
@@ -219,7 +219,8 @@
      timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), 
      SessionUid: _SessionUid,
      TypeCharOne: 'pc',
      kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host))
      kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host)),
      appkey: window.GLOB.appkey || ''
    }
    let url = '/webapi/dologon/s_visitor_login'
@@ -253,8 +254,6 @@
    param.v_type = param.v_type || 'Y'
    param.secretkey = md5(param.LText + solt + param.timestamp)
    param.appkey = window.GLOB.appkey || ''
    return axios({
      url: url,
      method: 'post',
@@ -277,10 +276,9 @@
      login_city: city,
      login_id_address: ipAddress,
      kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host)),
      device_id: localStorage.getItem('SessionUid')
      device_id: localStorage.getItem('SessionUid'),
      appkey: window.GLOB.appkey || ''
    }
    param.appkey = window.GLOB.appkey || ''
    let url = '/webapi/dologon'
    if (isCloud) {
@@ -314,10 +312,10 @@
      login_city: city,
      login_id_address: ipAddress,
      kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host)),
      device_id: localStorage.getItem('SessionUid')
      device_id: localStorage.getItem('SessionUid'),
      timestamp: moment().format('YYYY-MM-DD HH:mm:ss'),
      appkey: window.GLOB.appkey || ''
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    let sys_datetime = sessionStorage.getItem('sys_datetime')
    let app_datetime = sessionStorage.getItem('app_datetime')
@@ -342,20 +340,17 @@
    // Type: 'X' 时
    // param.Password = Utils.formatOptions(password)
    param.appkey = window.GLOB.appkey || ''
    let url = '/webapi/dologon'
    if (isCloud) {
      param.debug = 'Y'
      if (options.cloudServiceApi) {
        // url = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon')
        param.rduri = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon')
      }
    } else if (window.GLOB.mainSystemApi) {
      if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') {
        param.linkurl = window.GLOB.linkurl
      }
      // url = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon')
      param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon')
    }
@@ -891,17 +886,17 @@
        UserName: token.username,
        systemType: options.sysType,
        login_city: sessionStorage.getItem('city') || '',
        device_id: localStorage.getItem('SessionUid')
        device_id: token.appkey || '',
        timestamp: moment().format('YYYY-MM-DD HH:mm:ss'),
        Type: token.publicKey,
        appkey: token.appkey || ''
      }
  
      _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      _param.Type = token.publicKey
      let shaObj = new jsSHA('SHA-1', 'TEXT')
      shaObj.update(token.password)
      _param.Password = shaObj.getHash('HEX').toUpperCase()
      _param.Password = md5(token.privateKey + token.username + _param.Password + _param.timestamp)
      _param.appkey = token.appkey || ''
      let url = token.interface.replace(/\/webapi(.*)/, '/webapi/dologon')
  
      if (token.ssoInterface) {