From b45eed171519ffe4f95d0d10743e7b3a25fcd569 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 01 七月 2024 15:43:07 +0800 Subject: [PATCH] 2024-07-01 --- src/menu/components/share/actioncomponent/formconfig.jsx | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 51 insertions(+), 6 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index bbf9eb6..4d90ee7 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/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', -- Gitblit v1.8.0