From e1cee96b38805bcccf48e7bcb9d296f2bc54c720 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 24 一月 2025 11:10:32 +0800
Subject: [PATCH] 2025-01-24

---
 src/mob/components/menubar/normal-menubar/menucomponent/options.jsx |   73 +++++++++++++++++++++++++++---------
 1 files changed, 54 insertions(+), 19 deletions(-)

diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx
index 3e8bc87..c8ead06 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',
@@ -22,24 +30,13 @@
       initval: setting.name || '',
       required: true
     },
-    {
-      type: 'text',
-      field: 'MenuNo',
-      label: '鑿滃崟鍙傛暟',
-      initval: setting.MenuNo || '',
-      required: true
-    },
-    {
-      type: 'number',
-      field: 'width',
-      label: '瀹藉害',
-      initval: setting.width || 24,
-      tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
-      min: 1,
-      max: 24,
-      precision: 0,
-      required: true
-    },
+    // {
+    //   type: 'text',
+    //   field: 'MenuNo',
+    //   label: '鑿滃崟鍙傛暟',
+    //   initval: setting.MenuNo || '',
+    //   required: true
+    // },
     {
       type: 'radio',
       field: 'type',
@@ -50,12 +47,31 @@
         {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',
@@ -66,6 +82,7 @@
       required: false,
       options: menulist,
       extendName: 'MenuNo',
+      dropdown: 'false',
       controlFields: [
         {field: 'clearMenu', notNull: true},
       ],
@@ -91,7 +108,6 @@
       extendName: 'MenuNo',
       options: [
         ...menulist,
-        // {value: 'IM', label: '鍗虫椂閫氫俊锛堢郴缁熼〉锛�'},
         {value: 'AIService', label: '鏅鸿兘瀹㈡湇锛堢郴缁熼〉锛�'}
       ]
     },
@@ -128,6 +144,17 @@
       field: 'icon',
       label: '鍥炬爣',
       initval: setting.icon || '',
+      required: true
+    },
+    {
+      type: 'number',
+      field: 'width',
+      label: '瀹藉害',
+      initval: setting.width || 24,
+      tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
+      min: 1,
+      max: 24,
+      precision: 0,
       required: true
     },
     {
@@ -198,6 +225,14 @@
       required: false,
       options: columns
     },
+    {
+      type: 'text',
+      field: 'primaryId',
+      label: '闈欐�佷富閿��',
+      initval: setting.primaryId || '',
+      tooltip: '鍙綔涓築ID浼犲埌涓嬩竴椤甸潰銆傛敞锛欯userid@浼氭浛鎹负鐢ㄦ埛ID銆�',
+      required: false
+    }
   ]
 
   return menuWrapForm

--
Gitblit v1.8.0