rabin 6 months ago
parent
commit
ecca2d17d8
4 changed files with 147 additions and 0 deletions
  1. 38 0
      src/wechat/api/Receive.php
  2. 5 0
      src/wechat/index.php
  3. 54 0
      src/wechat/manage/core.php
  4. 50 0
      src/wechat/table/info.php

+ 38 - 0
src/wechat/api/Receive.php

@@ -0,0 +1,38 @@
+<?php namespace Place\Api;
+use Dever;
+class Receive
+{
+    # 获取消息
+    public function callback()
+    {
+        $input = Dever::input();
+        $this->log($input);
+
+        $m = $input['m'];
+        if ($m == 'auth') {
+            # 权限
+            $this->auth();
+        } else {
+            $this->msg($m);
+        }
+        echo 'success';die;
+    }
+
+    # 获取权限信息
+    private function auth()
+    {
+        
+    }
+
+    # 获取消息
+    private function msg($m)
+    {
+        list($method, $appid) = explode('/', $m);
+    }
+
+    # 记录日志
+    private function log($log)
+    {
+        return Dever::log($log, 'wechat');
+    }
+}

+ 5 - 0
src/wechat/index.php

@@ -0,0 +1,5 @@
+<?php
+define('DEVER_APP_NAME', 'wechat');
+define('DEVER_APP_LANG', '微信开放平台');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(DEVER_APP_PATH . '../../boot.php');

+ 54 - 0
src/wechat/manage/core.php

@@ -0,0 +1,54 @@
+<?php
+return array
+(
+    'menu' => array
+    (
+        'info' => array
+        (
+            'parent'    => 'platform',
+            'name'      => '领域管理',
+            'icon'      => 'archive-drawer-line',
+            'sort'      => '5',
+        ),
+
+        'money' => array
+        (
+            'parent'    => 'platform',
+            'name'      => '货币管理',
+            'icon'      => 'money-cny-box-line',
+            'sort'      => '6',
+        ),
+
+        'express' => array
+        (
+            'parent'    => 'platform',
+            'name'      => '快递管理',
+            'icon'      => 'exchange-funds-fill',
+            'sort'      => '7',
+        ),
+
+        'sector_manage' => array
+        (
+            'parent'    => 'sector',
+            'name'      => '领域管理',
+            'icon'      => 'group-2-line',
+            'sort'      => '100',
+        ),
+
+        'user' => array
+        (
+            'parent'    => 'sector_manage',
+            'name'      => '用户管理',
+            'icon'      => 'user-settings-line',
+            'sort'      => '1',
+        ),
+
+        'role' => array
+        (
+            'parent'    => 'sector_manage',
+            'name'      => '角色管理',
+            'icon'      => 'archive-line',
+            'sort'      => '2',
+        ),
+    ),
+);

+ 50 - 0
src/wechat/table/info.php

@@ -0,0 +1,50 @@
+<?php
+return array
+(
+    'name' => '领域',
+    'order' => 'sort asc',
+    'struct' => array
+    (
+        'name' => array
+        (
+            'name'      => '领域名称',
+            'type'      => 'varchar(200)',
+        ),
+        'number' => array
+        (
+            'name'      => '领域号',
+            'type'      => 'varchar(60)',
+        ),
+        'mobile' => array
+        (
+            'name'      => '手机号',
+            'type'      => 'varchar(11)',
+        ),
+        'sort' => array
+        (
+            'name'      => '排序',
+            'type'      => 'int(11)',
+            'default'   => '1',
+        ),
+        'status' => array
+        (
+            'name'      => '状态',
+            'type'      => 'tinyint(1)',
+            'default'   => 1,
+            'value'     => array
+            (
+                1 => '启用',
+                2 => '关闭',
+            ),
+        ),
+    ),
+    'default' => array
+    (
+        'field' => 'name,number,sort,cdate',
+        'value' => array
+        (
+            '"默认领域","default",-100,' . DEVER_TIME,
+        ),
+        'num' => 1,
+    ),
+);