dever 3 سال پیش
والد
کامیت
ce708becf1
6فایلهای تغییر یافته به همراه37 افزوده شده و 5 حذف شده
  1. 1 1
      database/msg.php
  2. 1 1
      database/msg_form.php
  3. 1 1
      database/msg_log.php
  4. 19 1
      database/subscribe.php
  5. 1 1
      database/subscribe_log.php
  6. 14 0
      src/Subscribe.php

+ 1 - 1
database/msg.php

@@ -37,7 +37,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '请输入项目',
 			'match' 	=> 'is_numeric',
-			'list'		=> true,
+			'list'		=> 'Dever::load("token/project-one#name", {project_id})',
 		),
 		
 		'name'		=> array

+ 1 - 1
database/msg_form.php

@@ -29,7 +29,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '请输入项目',
 			'match' 	=> 'is_numeric',
-			'list'		=> true,
+			'list'		=> 'Dever::load("token/project-one#name", {project_id})',
 		),
 
 		'openid'		=> array

+ 1 - 1
database/msg_log.php

@@ -35,7 +35,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '请输入项目',
 			'match' 	=> 'is_numeric',
-			'list'		=> true,
+			'list'		=> 'Dever::load("token/project-one#name", {project_id})',
 		),
 		
 		'msg_id'		=> array

+ 19 - 1
database/subscribe.php

@@ -42,7 +42,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '请输入项目',
 			'match' 	=> 'is_numeric',
-			'list'		=> true,
+			'list'		=> 'Dever::load("token/project-one#name", {project_id})',
 		),
 		
 		'name'		=> array
@@ -147,4 +147,22 @@ return array
 			'同步订阅模板' => 'wechat_applet/subscribe.sync',
 		),
 	),
+
+	'request' => array
+    (
+        'getAll' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'project_id' => 'yes',
+                'key' => array('yes', 'like'),
+                'state' => 1,
+            ),
+            'type' => 'all',
+            'order' => array('cdate' => 'desc'),
+            'limit' => '0,3',
+            'col' => '*',
+        ),
+    )
 );

+ 1 - 1
database/subscribe_log.php

@@ -42,7 +42,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '请输入项目',
 			'match' 	=> 'is_numeric',
-			'list'		=> true,
+			'list'		=> 'Dever::load("token/project-one#name", {project_id})',
 		),
 		
 		'subscribe_id'		=> array

+ 14 - 0
src/Subscribe.php

@@ -243,4 +243,18 @@ class Subscribe
 		}
 		return array();
 	}
+
+	# 获取模板列表
+	public function getList()
+	{
+		$key = Dever::input('key');
+		$project_id = Dever::input('project_id');
+		$where['project_id'] = $project_id;
+		if ($key) {
+			$where['key'] => $key;
+		}
+		$data = Dever::db('wechat_applet/subscribe')->getAll($where);
+
+		return $data;
+	}
 }