king
2024-09-09 55a89127d14a20a96720d9050295743f2090f046
src/views/menudesign/index.jsx
@@ -13,7 +13,7 @@
import Utils from '@/utils/utils.js'
import { langs } from '@/store/options'
import MKEmitter from '@/utils/events.js'
import { getTables, getFuncsAndInters, getLangTrans, getAllSqls } from '@/utils/utils-custom.js'
import { getTables, getFuncsAndInters, getOutMessage, getLangTrans, getAllSqls } from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
import '@/assets/css/design.scss'
@@ -809,7 +809,6 @@
      }
      let long_data = ''
      delete config.allSqls
      if (window.backend && config.enabled) {
        let sqls = getAllSqls(config)
        let _t = moment().format('YYYYMMDDHHmmss')
@@ -822,9 +821,21 @@
        }
        long_data = []
        let oriIds = {}
        if (config.allSqls) {
          config.allSqls.forEach(item => {
            if (!item.md5) return
            oriIds[item.uuid + item.md5] = item.v_id
          })
        }
        
        config.allSqls = sqls.map(item => {
          let v_id = _t + getguid()
          if (oriIds[item.uuid + item.md5]) {
            v_id = oriIds[item.uuid + item.md5]
          }
          long_data.push(`${md5(window.GLOB.appkey + v_id)},${item.uuid},${v_id},${window.btoa(window.encodeURIComponent(item.LText))}`)
          
          return {
@@ -832,11 +843,14 @@
            v_id: v_id,
            type: item.type,
            reps: item.reps,
            sql: item.LText
            md5: item.md5 || '',
            luser: item.luser === true
          }
        })
        long_data = long_data.join(';')
      } else {
        delete config.allSqls
      }
      if (config.cacheUseful !== 'true') {
@@ -885,6 +899,7 @@
      }
      let interfaces = getFuncsAndInters(config)
      let msg = getOutMessage(config)
      let urlFields = config.urlFields ? config.urlFields.join(',') : ''
      let langSql = getLangTrans(config)
@@ -898,7 +913,7 @@
        EasyCode: config.easyCode || '',
        Template: 'CustomPage',
        MenuName: config.MenuName || '',
        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, urlFields}),
        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, msg, urlFields}),
        open_edition: config.open_edition,
        long_data: long_data,
        debug_md5: key,