From 0ddf0f980d675d28c41f746b55d0d7cc55007d8a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 七月 2024 00:05:15 +0800
Subject: [PATCH] 2024-07-02

---
 src/views/mobdesign/menuform/index.jsx |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx
index 49d4013..16fa737 100644
--- a/src/views/mobdesign/menuform/index.jsx
+++ b/src/views/mobdesign/menuform/index.jsx
@@ -20,6 +20,14 @@
 
   state = {}
 
+  componentDidMount() {
+    const { config, adapters } = this.props
+
+    if (adapters.includes('wxmini') && config.getLocation === 'true') {
+      window.GLOB.getLocation = true
+    }
+  }
+
   // 涓�浜岀骇鑿滃崟鍒囨崲
   selectChange = (key, value, hex) => {
     if (key === 'cacheTime' || key === 'localCacheTime') {
@@ -36,6 +44,8 @@
       } else {
         delete _config.statusBarHexColor
       }
+    } else if (key === 'getLocation') {
+      window.GLOB.getLocation = value === 'true'
     }
 
     this.props.updateConfig(_config)
@@ -279,6 +289,23 @@
               )}
             </Form.Item>
           </Col> : null}
+          {adapters.includes('wxmini') ? <Col span={24}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="寮�鍚椂锛屽湪灏忕▼搴忎腑鍙幏鍙栫敤鎴锋墍鍦ㄧ粡绾害銆�">
+                <QuestionCircleOutlined className="mk-form-tip" />
+                瀹氫綅
+              </Tooltip>
+            }>
+              {getFieldDecorator('getLocation', {
+                initialValue: config.getLocation || 'false'
+              })(
+                <Radio.Group onChange={(e) => {this.selectChange('getLocation', e.target.value)}}>
+                  <Radio value="true">寮�鍚�</Radio>
+                  <Radio value="false">涓嶅紑鍚�</Radio>
+                </Radio.Group>
+              )}
+            </Form.Item>
+          </Col> : null}
           {adapters.includes('weixin') || adapters.includes('wxmini') ? <Col span={24}>
             <Form.Item label={
               <Tooltip placement="topLeft" title="浣跨敤榛樿鏃惰鍦ㄥ瓙搴旂敤璁剧疆鍒嗕韩淇℃伅锛屼娇鐢╱rl鍙傛暟浼氫娇鐢ㄤ笂椤靛弬鏁版浛鎹㈢浉搴斿瓧娈碉紙@field@锛夈�傛敞锛氫娇鐢ㄨ嚜瀹氫箟鎴杣rl鍙傛暟鏃朵細鍒嗕韩褰撳墠椤甸潰銆�">

--
Gitblit v1.8.0