king
2024-07-01 b45eed171519ffe4f95d0d10743e7b3a25fcd569
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -331,9 +331,21 @@
    extraParam.push('dataM')
  }
  let apps = []
  let merchs = []
  if (!appType) {
    if (typeof(card.openmenu) === 'string') {
      card.openmenu = []
    }
    if (window.GLOB.WXApps) {
      window.GLOB.WXApps.forEach(item => {
        if (item.appType === 'merchant') {
          merchs.push({value: item.appId, text: item.appName})
        } else {
          apps.push({value: item.appId, text: item.appName})
        }
      })
    }
  } else {
    if (typeof(card.openmenu) !== 'string') {
@@ -509,10 +521,20 @@
      key: 'wxApp',
      label: '关联应用',
      initVal: card.wxApp || '',
      tooltip: '请关联支付(或退款)的公众号或小程序。',
      tooltip: '请关联支付的公众号或小程序。',
      required: true,
      forbid: !!appType || !window.GLOB.WXApps,
      options: window.GLOB.WXApps ? window.GLOB.WXApps.map(item => ({value: item.appId, text: item.appName})) : []
      forbid: apps.length === 0,
      options: apps
    },
    {
      type: 'select',
      key: 'wxMerch',
      label: '关联商户',
      initVal: card.wxMerch || '',
      tooltip: '请关联支付的商户号。',
      required: true,
      forbid: merchs.length === 0,
      options: merchs
    },
    {
      type: 'text',
@@ -1764,6 +1786,19 @@
    extraParam.push('dataM')
  }
  let apps = []
  let merchs = []
  if (window.GLOB.WXApps) {
    window.GLOB.WXApps.forEach(item => {
      if (item.appType === 'merchant') {
        merchs.push({value: item.appId, text: item.appName})
      } else {
        apps.push({value: item.appId, text: item.appName})
      }
    })
  }
  let forms = [
    {
      type: 'select',
@@ -1911,10 +1946,20 @@
      key: 'wxApp',
      label: '关联应用',
      initVal: card.wxApp || '',
      tooltip: '请关联支付(或退款)的公众号或小程序。',
      tooltip: '请关联支付的公众号或小程序。',
      required: true,
      forbid: !window.GLOB.WXApps,
      options: window.GLOB.WXApps ? window.GLOB.WXApps.map(item => ({value: item.appId, text: item.appName})) : []
      forbid: apps.length === 0,
      options: apps
    },
    {
      type: 'select',
      key: 'wxMerch',
      label: '关联商户',
      initVal: card.wxMerch || '',
      tooltip: '请关联支付的商户号。',
      required: true,
      forbid: merchs.length === 0,
      options: merchs
    },
    {
      type: 'text',