dever 6 years ago
parent
commit
c93850bcc6
2 changed files with 1 additions and 72 deletions
  1. 1 1
      daemon/notify/wechat.php
  2. 0 71
      lib/Api.php

+ 1 - 1
daemon/notify/wechat.php

@@ -4,4 +4,4 @@ define('DEVER_DAEMON', true);
 
 include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../index.php');
 
-Dever::load('pay/notify.wechat');
+Dever::load('pay/lib/wechat.notify');

+ 0 - 71
lib/Api.php

@@ -1,71 +0,0 @@
-<?php
-
-namespace Attr\Src;
-
-use Dever;
-
-class Api
-{
-	/**
-	 * 获取属性配置
-	 *
-	 * @return mixed
-	 */
-	public function get()
-	{
-		$cate = Dever::db('attr/cate')->state();
-
-		if ($cate) {
-			foreach ($cate as $k => $v) {
-				$cate[$k]['child'] = Dever::db('attr/info')->state(array('cate_id' => $v['id']));
-			}
-		}
-
-		$cate['state'] = 1;
-
-		return $cate;
-	}
-
-	/**
-	 * 获取属性详细信息
-	 *
-	 * @return mixed
-	 */
-	public function getInfo($ids, $value)
-	{
-		$result = array();
-		if ($ids) {
-			$where['ids'] = $ids;
-			$cate = Dever::db('attr/cate')->state();
-			$data = Dever::db('attr/info')->getAllByIds($where);
-
-			$ids = explode(',', $ids);
-			$value = explode(',', $value);
-			if ($data) {
-				foreach ($ids as $k => $v) {
-					if (isset($data[$v])) {
-						$cate_id = $data[$v]['cate_id'];
-
-						if (!isset($result[$cate_id])) {
-							$result[$cate_id] = array
-							(
-								'name' => $cate[$cate_id]['name'],
-								'id' => $cate_id
-							);
-						}
-
-						$result[$cate_id]['attr'][$v] = array
-						(
-							'name' => $data[$v]['name'],
-							'value' => $value[$k],
-							'id' => $v
-						);
-					}
-				}
-			}
-		}
-		
-
-		return $result;
-	}
-}