From da34633b25d16359cd91a656acad5e811f9972b7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 三月 2023 18:09:54 +0800
Subject: [PATCH] 2023-03-14

---
 src/menu/components/card/cardcomponent/options.jsx |   67 ++++++++++++++++++++++++++++-----
 1 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx
index dfbcf7c..02d46f2 100644
--- a/src/menu/components/card/cardcomponent/options.jsx
+++ b/src/menu/components/card/cardcomponent/options.jsx
@@ -40,6 +40,12 @@
   if (hasMenus) {
     ops = [{value: 'menus', label: '鑿滃崟缁�'}]
   }
+  let adapters = sessionStorage.getItem('adapter') || ''
+  if (adapters.indexOf('wxmini') > -1) {
+    ops.push({value: 'miniprogram', label: '灏忕▼搴�'})
+  } else if (setting.click === 'miniprogram') {
+    setting.click = ''
+  }
 
   const cardSettingForm = [
     {
@@ -67,7 +73,7 @@
       controlFields: [
         {field: 'transform', values: ['multi']},
       ],
-      forbid: appType === 'mob'
+      forbid: appType === 'mob' || subtype === 'dualdatacard'
     },
     {
       type: 'select',
@@ -85,7 +91,8 @@
         {value: 'opacity', label: '閫忔槑搴�'},
         {value: 'rotateX', label: '绾靛悜灞曞紑'},
         {value: 'rotateY', label: '妯悜灞曞紑'},
-      ]
+      ],
+      forbid: appType === 'mob' || subtype === 'dualdatacard'
     },
     {
       type: 'text',
@@ -97,11 +104,21 @@
       forbid: subtype !== 'propcard'
     },
     {
-      type: !hasMenus ? 'radio' : 'select',
+      type: 'select',
+      field: 'bgField',
+      label: '鑳屾櫙鍥�',
+      initval: setting.bgField || '',
+      tooltip: '鍔ㄦ�佽儗鏅紝鑳屾櫙鍥剧墖鐢卞瓧娈靛�兼帶鍒躲�傝娉ㄦ剰璋冩暣鑳屾櫙鏍峰紡銆�',
+      required: false,
+      options: columns,
+      forbid: cardType === 'extendCard'
+    },
+    {
+      type: ops.length === 0 ? 'radio' : 'select',
       field: 'click',
       label: '鐐瑰嚮浜嬩欢',
       initval: setting.click || '',
-      tooltip: '褰撶粦瀹氱偣鍑讳簨浠舵椂锛屽崱鐗囩殑鍒囨崲鍔熻兘灏嗗け鏁堛��',
+      // tooltip: '褰撶粦瀹氱偣鍑讳簨浠舵椂锛屽崱鐗囩殑鍒囨崲鍔熻兘灏嗗け鏁堛��',
       required: false,
       options: [
         {value: '', label: '鏃�'},
@@ -114,11 +131,13 @@
         {field: 'menu', values: ['menu']},
         {field: 'linkurl', values: ['link']},
         {field: 'open', values: ['menu', 'link', 'menus']},
-        {field: 'joint', values: ['menu', 'link', 'menus']},
+        {field: 'joint', values: ['menu', 'link', 'menus', 'miniprogram']},
         {field: 'linkbtn', values: ['button']},
         {field: 'clickType', values: ['button']},
         {field: 'menuType', values: ['menus']},
         {field: 'menus', values: ['menus']},
+        {field: 'miniAppId', values: ['miniprogram']},
+        {field: 'miniPath', values: ['miniprogram']},
       ]
     },
     {
@@ -148,16 +167,31 @@
       span: 24
     },
     {
+      type: 'text',
+      field: 'miniAppId',
+      label: '灏忕▼搴廇ppID',
+      initval: setting.miniAppId || '',
+      required: true
+    },
+    {
+      type: 'text',
+      field: 'miniPath',
+      label: '椤甸潰璺緞',
+      initval: setting.miniPath || '',
+      tooltip: '鍙寚瀹氳烦杞皬绋嬪簭椤甸潰锛屼负绌烘椂鎵撳紑棣栭〉锛屾敞锛氬弬鏁版嫾鎺ュ湪鎸囧畾椤甸潰鏃舵湁鏁堛��',
+      required: false
+    },
+    {
       type: 'radio',
       field: 'open',
       label: '鎵撳紑鏂瑰紡',
       initval: setting.open || 'blank',
       required: false,
       options: [
-        {value: 'blank', label: '鏂扮獥鍙�'},
-        {value: 'self', label: '褰撳墠绐楀彛'},
+        {value: 'blank', label: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'},
+        {value: 'self', label: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'},
       ],
-      forbid: appType !== 'pc'
+      forbid: appType !== 'pc' && appType !== 'mob'
     },
     {
       type: 'radio',
@@ -204,6 +238,19 @@
       forbid: appType === 'mob'
     },
     {
+      type: 'radio',
+      field: 'checkAll',
+      label: '鍏ㄩ��',
+      initval: setting.checkAll || 'hidden',
+      tooltip: '鍏ㄩ�変粎鍦ㄦ暟鎹崱鍙閫夛紝涓旈�変腑椋庢牸涓哄嬀閫夋鏃舵湁鏁堛��',
+      required: false,
+      options: [
+        {value: 'hidden', label: '闅愯棌'},
+        {value: 'show', label: '鏄剧ず'},
+      ],
+      forbid: cardType !== 'extendCard'
+    },
+    {
       type: 'table',
       field: 'menus',
       label: '鑿滃崟缁�',
@@ -219,7 +266,7 @@
           editable: true,
           unique: true,
           required: false,
-          width: '35%'
+          width: '30%'
         },
         {
           title: '鑿滃崟',
@@ -228,7 +275,7 @@
           editable: true,
           required: true,
           extends: !appType ? 'Menu' : [{key: 'label', value: 'label'}],
-          width: '35%',
+          width: '40%',
           render: (text, record) => record.label,
           options: menulist
         }

--
Gitblit v1.8.0