| | |
| | | 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') { |
| | |
| | | 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', |
| | |
| | | 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', |
| | |
| | | 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', |