king
2024-12-24 c3c7e475d5655f236b88d74565494d553dc3e35e
src/api/index.js
@@ -74,6 +74,10 @@
      placement: 'bottomRight',
      duration: 15
    })
    if ([404, 500, 504].includes(response.status) && error.config && error.config.url) {
      window.mkInfo(error.config.url)
      error.config.data && window.mkInfo(error.config.data)
    }
  }
  return Promise.reject(response)
@@ -175,12 +179,7 @@
   * @description 游客登录
   */
  getTouristMsg (binding_type, appid, openid, memberid, scanId) {
    let _SessionUid = localStorage.getItem('SessionUid')
    if (!_SessionUid) { // 手动清除SessionUid时,实时生成
      _SessionUid = Utils.getuuid()
      localStorage.setItem('SessionUid', _SessionUid)
    }
    let _SessionUid = localStorage.getItem('SessionUid') || ''
    let param = {
      func: 's_visitor_login',
@@ -434,7 +433,7 @@
            CacheUtils.delIndexDBConfig(list)
            this.delCacheConfig('all')
            if (reHome) {
            if (reHome && reload !== 'home_page_id') {
              MKEmitter.emit('reloadMenuView', 'home_page_id')
            }
          }
@@ -718,6 +717,7 @@
              window.mkInfo(n)
            })
          }
          delete res.mksqls
          if (res.ErrCode === 'version_error') {
            res.ErrCode = '-2'
            MKEmitter.emit('reloadTabs')
@@ -1036,6 +1036,7 @@
              window.mkInfo(n)
            })
          }
          delete res.mksqls
          if (!res.status) {
            if (res.ErrCode === 'version_error') {
              res.ErrCode = '-2'
@@ -1228,7 +1229,7 @@
  /**
   * @description sql检验
   */
  sDebug (sql) {
  sDebug (sql, skip = false) {
    let param = {
      func: 's_debug_sql',
      exec_type: window.GLOB.execType || 'y',
@@ -1256,6 +1257,8 @@
    window.mkInfo(`/* sql 验证 */\n${sql.replace(/\n\s{6,20}/ig, '\n')}`)
    if (skip) return
    sql = sql.replace(/\n/ig, ' ')
    param.LText = Utils.formatOptions(sql, param.exec_type)