From 58d0838635b4b20411b518099c72250259f7c82c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 26 十月 2023 15:45:22 +0800
Subject: [PATCH] 2023-10-26

---
 src/mob/components/menubar/normal-menubar/menucomponent/index.jsx   |    2 +-
 src/mob/components/menubar/normal-menubar/menucomponent/options.jsx |   26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
index 53aa073..2382fb8 100644
--- a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
+++ b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx
@@ -118,7 +118,7 @@
       <Col span={card.setting.width || 6}>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            <NormalForm title="鑿滃崟缂栬緫" width={900} update={this.updateSetting} getForms={this.getSettingForms}>
+            <NormalForm title="鑿滃崟缂栬緫" width={950} update={this.updateSetting} getForms={this.getSettingForms}>
               <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
             <CopyComponent type="menucell" card={card}/>
diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx
index 5ce1a43..d61728f 100644
--- a/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx
+++ b/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx
@@ -14,6 +14,14 @@
     menulist = []
   }
 
+  let ops = []
+  let adapters = sessionStorage.getItem('adapter') || ''
+  if (adapters.indexOf('wxmini') > -1) {
+    ops.push({value: 'miniprogram', label: '灏忕▼搴�'})
+  } else if (setting.type === 'miniprogram') {
+    setting.type = ''
+  }
+
   const menuWrapForm = [
     {
       type: 'text',
@@ -39,15 +47,33 @@
         {value: 'menu', label: '鑿滃崟'},
         {value: 'linkmenu', label: '鍏宠仈鑿滃崟'},
         {value: 'link', label: '閾炬帴'},
+        ...ops
       ],
       controlFields: [
         {field: 'copyMenuId', values: ['menu']},
         {field: 'linkMenuId', values: ['linkmenu']},
         {field: 'linkurl', values: ['link']},
         {field: 'primaryId', values: ['menu', 'linkmenu']},
+        {field: 'miniAppId', values: ['miniprogram']},
+        {field: 'miniPath', values: ['miniprogram']},
       ]
     },
     {
+      type: 'text',
+      field: 'miniAppId',
+      label: '灏忕▼搴廇ppID',
+      initval: setting.miniAppId || '',
+      required: true
+    },
+    {
+      type: 'text',
+      field: 'miniPath',
+      label: '椤甸潰璺緞',
+      initval: setting.miniPath || '',
+      tooltip: '鍙寚瀹氳烦杞皬绋嬪簭椤甸潰璺緞銆�',
+      required: false
+    },
+    {
       type: 'select',
       field: 'copyMenuId',
       label: '澶嶅埗鑿滃崟',

--
Gitblit v1.8.0