king
2021-10-27 bbcb3f45ad0ef4c808bf5a68ec10c0464c094e2f
src/api/index.js
@@ -14,7 +14,7 @@
  1585192949946f3et2ts8tn82krmumdf,15855615451212m12ip23vpcm79kloro,1587005717541lov40vg61q7l1rbveon,1590458676585agbbr63t6ihighg2i1g,1602315375262ikd33ii0nii34pt861o,1582771068837vsv54a089lgp45migbg,
  1582777675954ifu05upurs465omoth7,158294809668898cklbv6c5bou8e1fpu,1584676379094iktph45fb8imhg96bql,1584695125339vo5g7iqgfn01qmrd6s2,1584699661372vhmpp9dn9foo0eob722,15848421131551gg04ie8sitsd3f7467,
  1589782279158ngr675kk3oksin35sul,1589788042787ffdt9hle4s45k9r1nvs,15900310928174dro07ihfckghpb5h13,1594095599055qicg2eb642v5qglhnuo,1599613340050c8nu6rbst9d4emnnbsq,1577972969199lei1g0qkvlh4tkc908m,
  1578479100252lfbp29v1kafk4s4q4ig,1577971621421tg4v0i1ur8873k7e0ob,1577929944419lgc5h3hepum765e2k7u,1588493493409k9guqp067d31lu7blsv`
  1578479100252lfbp29v1kafk4s4q4ig,1577971621421tg4v0i1ur8873k7e0ob,1577929944419lgc5h3hepum765e2k7u,1588493493409k9guqp067d31lu7blsv,15827879285193g85m3i2uprektpgmpf`
if (window.openDatabase) {
  CacheUtils.openWebSql(options.sysType)
@@ -169,7 +169,7 @@
  /**
   * @description 游客登录
   */
  getTouristMsg () {
  getTouristMsg (appid, openid, memberid, scanId) {
    let _SessionUid = localStorage.getItem('SessionUid')
    if (!_SessionUid) { // 手动清除SessionUid时,实时生成
@@ -188,6 +188,14 @@
    param.secretkey = md5(param.LText + 'mingke' + param.timestamp)
    param.appkey = window.GLOB.appkey || ''
    if (appid) {
      param.binding_type = 'mk'
      param.thd_party_member_id = memberid
      param.thd_party_openid = openid
      param.thd_party_appid = appid
      param.id = scanId
    }
    let url = '/webapi/dologon/s_visitor_login'
    if (window.GLOB.mainSystemApi) {
@@ -308,7 +316,6 @@
   * @description 获取系统版本信息,启用或更新websql
   */
  getAppVersion (_resolve, _reject) {
    let appVersion = {}
    if (!window.GLOB.WebSql && !window.GLOB.IndexDB) {
      return Promise.reject()
    }
@@ -324,7 +331,6 @@
    if (window.GLOB.WebSql) {
      return new Promise((resolve, reject) => {
        CacheUtils.getWebSqlVersion().then(msg => {
          appVersion.oldVersion = msg.version || ''
          let modifydate = msg.createDate || curTime
          if (modifydate.indexOf('Invalid date') > -1) {
            modifydate = curTime
@@ -341,9 +347,7 @@
              return
            }
            let clear = false
            let version = res.app_version || '1.00'
            appVersion.newVersion = version
            appVersion.oldVersion = appVersion.oldVersion || version
            let version = '1.00'
  
            if (res.menu_data && res.menu_data.length > 0) {
              res.menu_data.forEach(mid => {
@@ -366,7 +370,7 @@
              CacheUtils.createWebSqlversion(version, curTime)
            }
  
            resolve(appVersion)
            resolve()
          })
        }, () => {
          reject()
@@ -375,7 +379,6 @@
    } else {
      return new Promise((resolve, reject) => {
        CacheUtils.getIndexDBVersion().then(msg => {
          appVersion.oldVersion = msg.version || ''
          let modifydate = msg.createDate || curTime
          if (modifydate.indexOf('Invalid date') > -1) {
            modifydate = curTime
@@ -391,9 +394,7 @@
              return
            }
            let clear = false
            let version = res.app_version || '1.00'
            appVersion.newVersion = version
            appVersion.oldVersion = appVersion.oldVersion || version
            let version = '1.00'
  
            if (res.menu_data && res.menu_data.length > 0) {
              res.menu_data.forEach(mid => {
@@ -410,9 +411,9 @@
              }
            }
            CacheUtils.updateIndexDBversion({version: appVersion.oldVersion, createDate: curTime})
            CacheUtils.updateIndexDBversion({version: version, createDate: curTime})
  
            resolve(appVersion)
            resolve()
          })
        }, () => {
          reject()
@@ -424,12 +425,13 @@
  /**
   * @description 更新系统版本信息,清空配置信息
   */
  updateAppVersion (newVersion) {
  updateAppVersion () {
    let curTime = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
    CacheUtils.clearWebSqlConfig()
    CacheUtils.updateWebSqlversion(newVersion, curTime)
    CacheUtils.updateWebSqlversion('1.00', curTime)
    CacheUtils.clearIndexDBConfig()
    CacheUtils.updateIndexDBversion({version: newVersion, createDate: curTime})
    CacheUtils.updateIndexDBversion({version: '1.00', createDate: curTime})
    CacheUtils.clearFuncs(options.sysType)
  }
  /**
@@ -487,7 +489,7 @@
      appkey: window.GLOB.appkey
    }
    let url = window.GLOB.mainSystemApi
    let url = window.GLOB.mainSystemApi || '/webapi/dostars'
    param = this.encryptParam(param)
    return axios({
@@ -505,7 +507,7 @@
    param.lang = param.lang || sessionStorage.getItem('lang') || ''
    param.SessionUid = localStorage.getItem('SessionUid') || ''
    param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || ''
    param.appkey = window.GLOB.appkey || ''
    param.appkey = param.appkey || window.GLOB.appkey
    let url = '/webapi/dostars'
    if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) { // 编辑状态,且存在云端地址
@@ -812,7 +814,7 @@
            }
            resolve()
          }
        } catch {
        } catch (e) {
          resolve({
            ErrCode: 'E',
            ErrMesg: '文件解析错误',