diff --git a/ZeedFramework/library/3rd/smarty3/sysplugins/smarty_internal_compilebase.php b/ZeedFramework/library/3rd/smarty3/sysplugins/smarty_internal_compilebase.php
index 6081e91..7489265 100644
--- a/ZeedFramework/library/3rd/smarty3/sysplugins/smarty_internal_compilebase.php
+++ b/ZeedFramework/library/3rd/smarty3/sysplugins/smarty_internal_compilebase.php
@@ -72,7 +72,9 @@ abstract class Smarty_Internal_CompileBase {
}
// named attribute
} else {
- $kv = each($mixed);
+ // Replace deprecated each() with key()/current() for PHP 7.2+ compatibility
+ reset($mixed);
+ $kv = array('key' => key($mixed), 'value' => current($mixed));
// option flag?
if (in_array($kv['key'], $this->option_flags)) {
if (is_bool($kv['value'])) {
diff --git a/ZeedFramework/library/Zeed/Session.php b/ZeedFramework/library/Zeed/Session.php
index 3a7920b..1e7a3f9 100644
--- a/ZeedFramework/library/Zeed/Session.php
+++ b/ZeedFramework/library/Zeed/Session.php
@@ -231,8 +231,11 @@ class Zeed_Session
$userOptionName = strtolower($userOptionName);
// set the ini based values
+ // 如果session已经启动,跳过ini_set以避免警告
if (array_key_exists($userOptionName, self::$_defaultOptions)) {
- ini_set("session.$userOptionName", $userOptionValue);
+ if (!self::$_sessionStarted && session_status() !== PHP_SESSION_ACTIVE) {
+ @ini_set("session.$userOptionName", $userOptionValue);
+ }
} elseif (isset(self::$_localOptions[$userOptionName])) {
self::${self::$_localOptions[$userOptionName]} = $userOptionValue;
}
@@ -300,14 +303,14 @@ class Zeed_Session
if ($removeCookie) {
self::expireSessionCookie();
}
- }
-
- /**
- * 清除SESSION
- */
- public static function unsetSession ($session_name)
- {
- unset($_SESSION[$session_name]);
+ }
+
+ /**
+ * 清除SESSION
+ */
+ public static function unsetSession ($session_name)
+ {
+ unset($_SESSION[$session_name]);
}
/**
diff --git a/wy/HouseProperty b/wy/HouseProperty
new file mode 160000
index 0000000..963f370
--- /dev/null
+++ b/wy/HouseProperty
@@ -0,0 +1 @@
+Subproject commit 963f37010e52059a5abb916f20cbfa183f048b65
diff --git a/wy/server/application/Admin/controllers/SignController.php b/wy/server/application/Admin/controllers/SignController.php
index 34a993e..50e3274 100644
--- a/wy/server/application/Admin/controllers/SignController.php
+++ b/wy/server/application/Admin/controllers/SignController.php
@@ -57,7 +57,15 @@ class SignController extends Zeed_Controller_Action
} else {
$rd['error'] = $this->error;
}
- exit(json_encode($rd));
+
+ // 设置正确的Content-Type头,确保没有其他输出
+ header('Content-Type: application/json; charset=utf-8');
+ // 清除可能的输出缓冲区
+ if (ob_get_level()) {
+ ob_clean();
+ }
+ echo json_encode($rd);
+ exit;
}
/**
@@ -98,11 +106,23 @@ class SignController extends Zeed_Controller_Action
$user_group = UserGroupModel::instance()->fetchByPK($user['userid']);
- $userBasic = array('userid' => $user['userid'], 'username' => $user['username'], 'fullname' => $user['fullname'],
- 'domain' => $user['domain'], 'groupid' => $user_group[0]['groupid'],'home_id' => $user['home_id']);
+ // 如果用户组不存在,使用默认组ID 1
+ $groupid = 1;
+ if (!empty($user_group) && isset($user_group[0]['groupid'])) {
+ $groupid = $user_group[0]['groupid'];
+ }
+
+ $userBasic = array(
+ 'userid' => $user['userid'],
+ 'username' => $user['username'],
+ 'fullname' => isset($user['fullname']) ? $user['fullname'] : $user['username'],
+ 'domain' => isset($user['domain']) ? $user['domain'] : 'local',
+ 'groupid' => $groupid,
+ 'home_id' => isset($user['home_id']) ? $user['home_id'] : null
+ );
Com_Admin_Authorization::logUserIn($userBasic);
//记录日志
- self::log('登录系统');
+ $this->writeLog('登录系统', $userBasic);
return true;
}
@@ -114,8 +134,8 @@ class SignController extends Zeed_Controller_Action
$user = Com_Admin_Authorization::getLoggedInUser();
if ($user) {
Admin_Model_Token::instance()->deleteByUsername($user['username']);
+ $this->writeLog('退出系统', $user);
}
- self::log('退出系统');
Zeed_Session::unsetSession('adminuser');
//登出成功
header('Location: '.$this->getContinue());
@@ -142,28 +162,56 @@ class SignController extends Zeed_Controller_Action
return $continue;
}
- /*
+ /**
* 系统日志记录
+ * @param string $option 操作内容
+ * @param array $userInfo 用户信息(可选,如果不提供则从session获取)
*/
- public function Log($option){
- if($_SESSION){
- $username=$_SESSION['adminuser']['username'];
- $groupid=$_SESSION['adminuser']['groupid'];
- $groupinfo=GroupModel::instance()->fetchByPK($groupid);
- $res['groupname']=$groupinfo[0]['groupname'];
- $res['username']=$username;
- $res['ctime']= date('Y-m-d H:i:s');
- $res['option']=$option;
- $result=LogModel::instance()->insert($res);
- if($result){
- $data['status']=0;
- $data['error']='日志写入成功';
- }else{
- $data['status']=1;
- $data['error']='日志写入失败';
+ private function writeLog($option, $userInfo = null){
+ try {
+ // 优先使用传入的用户信息,否则从session获取
+ if ($userInfo === null) {
+ $user = Com_Admin_Authorization::getLoggedInUser();
+ if (!$user) {
+ return false;
+ }
+ $username = isset($user['username']) ? $user['username'] : '';
+ $groupid = isset($user['groupid']) ? $user['groupid'] : 1;
+ } else {
+ $username = isset($userInfo['username']) ? $userInfo['username'] : '';
+ $groupid = isset($userInfo['groupid']) ? $userInfo['groupid'] : 1;
}
- }
- return $data;
+
+ // 获取组名
+ $groupname = '未知组';
+ if ($groupid) {
+ $groupinfo = GroupModel::instance()->fetchByPK($groupid);
+ if (!empty($groupinfo) && isset($groupinfo[0]['groupname'])) {
+ $groupname = $groupinfo[0]['groupname'];
+ }
+ }
+
+ $res = array(
+ 'groupname' => $groupname,
+ 'username' => $username,
+ 'ctime' => date('Y-m-d H:i:s'),
+ 'option' => $option
+ );
+
+ // 使用quoteIdentifier确保option字段被正确处理
+ $result = LogModel::instance()->insert($res);
+
+ // 调试信息(生产环境可移除)
+ if (!$result) {
+ error_log('Log insert failed. Data: ' . json_encode($res));
+ }
+
+ return $result;
+ } catch (Exception $e) {
+ // 日志记录失败不影响主流程
+ error_log('Admin log write failed: ' . $e->getMessage());
+ return false;
+ }
}
}
diff --git a/wy/server/application/Advert/controllers/IndexController.php b/wy/server/application/Advert/controllers/IndexController.php
index 87be19e..f2baa31 100644
--- a/wy/server/application/Advert/controllers/IndexController.php
+++ b/wy/server/application/Advert/controllers/IndexController.php
@@ -115,7 +115,7 @@ class IndexController extends AdvertAbstract {
public function select_region() {
$region_id = $this->input->post('region_id');
$region_cols = array('region_name', 'region_id');
- $region_list = Trend_Model_Region::instance()->fetchByFV('status = 1 AND pid', $region_id, $region_cols);
+ $region_list = Trend_Model_Region::instance()->fetchByFV('disabled = 0 AND pid', $region_id, $region_cols);
$data['region_list'] = $region_list;
ob_clean();
echo json_encode($data);
diff --git a/wy/server/application/Cas/admin/WyController.php b/wy/server/application/Cas/admin/WyController.php
index 34a28e9..1b0a48d 100644
--- a/wy/server/application/Cas/admin/WyController.php
+++ b/wy/server/application/Cas/admin/WyController.php
@@ -34,7 +34,7 @@ class WyController extends CasAdminAbstract {
$ctime_start = $this->input->get('ctime_start', null);
$ctime_end = $this->input->get('ctime_end', null);
$region_cols = array('region_name', 'region_id');
- $provinces = Trend_Model_Region::instance()->fetchByFV('status = 1 AND pid', 1, $region_cols);
+ $provinces = Trend_Model_Region::instance()->fetchByFV('disabled = 0 AND pid', 1, $region_cols);
/* ajax 加载数据 */
if ($this->input->isAJAX()) {
diff --git a/wy/server/application/Comment/admin/CommentAdminAbstract.php b/wy/server/application/Comment/admin/CommentAdminAbstract.php
new file mode 100644
index 0000000..31578f8
--- /dev/null
+++ b/wy/server/application/Comment/admin/CommentAdminAbstract.php
@@ -0,0 +1,23 @@
+addResult(self::RS_SUCCESS, 'json');
+ /* 接收参数 */
+ $ordername = $this->input->get('ordername', null);
+ $orderby = $this->input->get('orderby', null);
+ $page = (int) $this->input->get('pageIndex', 0);
+ $perpage = $this->input->get('pageSize', $this->perpage);
+ $key = trim($this->input->get('key'));
+
+ /* ajax 加载数据 */
+ if ($this->input->isAJAX()) {
+ $offset = $page * $perpage;
+ $page = $page + 1;
+ $where = 'is_del = 0 ';
+ if (!empty($key)) {
+ $where .= " AND comment_content LIKE '%{$key}%'";
+ }
+
+ $order = 'ctime DESC';
+ // 暂时返回空数据,等有具体的评论表后再实现
+ $data['count'] = 0;
+ $data['comment_list'] = array();
+ }
+ $data['ordername'] = $ordername;
+ $data['orderby'] = $orderby;
+ $data['page'] = $page;
+ $data['perpage'] = $perpage;
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'comment.index');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加评论
+ */
+ public function add() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if ($this->input->isPOST()) {
+ $this->addSave();
+ return self::RS_SUCCESS;
+ }
+
+ $data = array();
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'comment.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加评论 - 保存
+ */
+ public function addSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ // 暂时只返回成功,等有具体的评论表后再实现
+ $this->setData('data', '添加成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('添加失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 编辑评论
+ */
+ public function edit() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+ if ($this->input->isPOST()) {
+ $this->editSave();
+ return self::RS_SUCCESS;
+ }
+ $comment_id = (int) $this->input->get('comment_id');
+ $data['comment'] = array();
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'comment.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 编辑评论 - 保存
+ */
+ public function editSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ // 暂时只返回成功,等有具体的评论表后再实现
+ $this->setData('data', '保存成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('编辑失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 删除
+ */
+ public function delete() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if (!$this->input->isPOST()) {
+ $this->setStatus(1);
+ $this->setError('请勿非法操作');
+ return self::RS_SUCCESS;
+ }
+
+ $comment_id = $this->input->post('comment_id');
+ try {
+ // 暂时只返回成功,等有具体的评论表后再实现
+ $this->setData('data', '删除成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('删除失败 : ' . $e->getMessage());
+ return self::RS_SUCCESS;
+ }
+
+ return self::RS_SUCCESS;
+ }
+
+ /**
+ * 保存-校验
+ */
+ private function _validate() {
+ $res = array(
+ 'status' => 0,
+ 'error' => null,
+ 'data' => null
+ );
+
+ $res['data'] = array(
+ 'comment_id' => $this->input->post('comment_id', null),
+ 'comment_content' => $this->input->post('comment_content'),
+ 'mtime' => date('Y-m-d H:i:s'));
+
+ /* 数据验证 */
+ if (empty($res['data']['comment_content'])) {
+ $res['status'] = 1;
+ $res['error'] = '请填写评论内容';
+ return $res;
+ }
+
+ /* 处理添加时间 */
+ if (!$res['data']['comment_id']) {
+ $res['data']['ctime'] = $res['data']['mtime'];
+ }
+
+ return $res;
+ }
+
+}
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/application/Device/admin/DeviceAdminAbstract.php b/wy/server/application/Device/admin/DeviceAdminAbstract.php
new file mode 100644
index 0000000..41e2e45
--- /dev/null
+++ b/wy/server/application/Device/admin/DeviceAdminAbstract.php
@@ -0,0 +1,23 @@
+addResult(self::RS_SUCCESS, 'json');
+ /* 接收参数 */
+ $ordername = $this->input->get('ordername', null);
+ $orderby = $this->input->get('orderby', null);
+ $page = (int) $this->input->get('pageIndex', 0);
+ $perpage = $this->input->get('pageSize', $this->perpage);
+ $key = trim($this->input->get('key'));
+
+ /* ajax 加载数据 */
+ if ($this->input->isAJAX()) {
+ $offset = $page * $perpage;
+ $page = $page + 1;
+ $where = 'is_del = 0 ';
+ if (!empty($key)) {
+ $where .= " AND device_name LIKE '%{$key}%'";
+ }
+
+ $order = 'ctime DESC';
+ // 暂时返回空数据,等有具体的设备表后再实现
+ $data['count'] = 0;
+ $data['device_list'] = array();
+ }
+ $data['ordername'] = $ordername;
+ $data['orderby'] = $orderby;
+ $data['page'] = $page;
+ $data['perpage'] = $perpage;
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'device.index');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加设备
+ */
+ public function add() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if ($this->input->isPOST()) {
+ $this->addSave();
+ return self::RS_SUCCESS;
+ }
+
+ $data = array();
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'device.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加设备 - 保存
+ */
+ public function addSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ // 暂时只返回成功,等有具体的设备表后再实现
+ $this->setData('data', '添加成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('添加失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 编辑设备
+ */
+ public function edit() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+ if ($this->input->isPOST()) {
+ $this->editSave();
+ return self::RS_SUCCESS;
+ }
+ $device_id = (int) $this->input->get('device_id');
+ $data['device'] = array();
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'device.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 编辑设备 - 保存
+ */
+ public function editSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ // 暂时只返回成功,等有具体的设备表后再实现
+ $this->setData('data', '保存成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('编辑失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 删除
+ */
+ public function delete() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if (!$this->input->isPOST()) {
+ $this->setStatus(1);
+ $this->setError('请勿非法操作');
+ return self::RS_SUCCESS;
+ }
+
+ $device_id = $this->input->post('device_id');
+ try {
+ // 暂时只返回成功,等有具体的设备表后再实现
+ $this->setData('data', '删除成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('删除失败 : ' . $e->getMessage());
+ return self::RS_SUCCESS;
+ }
+
+ return self::RS_SUCCESS;
+ }
+
+ /**
+ * 保存-校验
+ */
+ private function _validate() {
+ $res = array(
+ 'status' => 0,
+ 'error' => null,
+ 'data' => null
+ );
+
+ $res['data'] = array(
+ 'device_id' => $this->input->post('device_id', null),
+ 'device_name' => $this->input->post('device_name'),
+ 'mtime' => date('Y-m-d H:i:s'));
+
+ /* 数据验证 */
+ if (empty($res['data']['device_name'])) {
+ $res['status'] = 1;
+ $res['error'] = '请填写设备名称';
+ return $res;
+ }
+
+ /* 处理添加时间 */
+ if (!$res['data']['device_id']) {
+ $res['data']['ctime'] = $res['data']['mtime'];
+ }
+
+ return $res;
+ }
+
+}
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/application/Door/admin/IndexController.php b/wy/server/application/Door/admin/IndexController.php
new file mode 100644
index 0000000..b7d6dab
--- /dev/null
+++ b/wy/server/application/Door/admin/IndexController.php
@@ -0,0 +1,222 @@
+addResult(self::RS_SUCCESS, 'json');
+ /* 接收参数 */
+ $ordername = $this->input->get('ordername', null);
+ $orderby = $this->input->get('orderby', null);
+ $page = (int) $this->input->get('pageIndex', 0);
+ $perpage = $this->input->get('pageSize', $this->perpage);
+ $key = trim($this->input->get('key'));
+
+ /* ajax 加载数据 */
+ if ($this->input->isAJAX()) {
+ $offset = $page * $perpage;
+ $page = $page + 1;
+ $where = 'is_del = 0 ';
+ if (!empty($key)) {
+ $where .= " AND device_sn LIKE '%{$key}%'";
+ }
+
+ $order = 'ctime DESC';
+ $device_cols = array('door_device_id', 'device_sn', 'device_ip', 'device_port', 'device_type', 'ctime', 'mtime');
+ $device_list = Door_Model_Device::instance()->fetchByWhere($where, $order, $perpage, $offset, $device_cols);
+ $data['count'] = Door_Model_Device::instance()->getCount($where);
+ $data['device_list'] = $device_list ? $device_list : array();
+ }
+ $data['ordername'] = $ordername;
+ $data['orderby'] = $orderby;
+ $data['page'] = $page;
+ $data['perpage'] = $perpage;
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'door.index');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加门禁设备
+ */
+ public function add() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if ($this->input->isPOST()) {
+ $this->addSave();
+ return self::RS_SUCCESS;
+ }
+
+ $data = array();
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'door.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加门禁设备 - 保存
+ */
+ public function addSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ $door_device_id = Door_Model_Device::instance()->add($set['data']);
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('添加失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 编辑门禁设备
+ */
+ public function edit() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+ if ($this->input->isPOST()) {
+ $this->editSave();
+ return self::RS_SUCCESS;
+ }
+ $door_device_id = (int) $this->input->get('door_device_id');
+ /* 查询设备信息 */
+ $device_info = Door_Model_Device::instance()->fetchByPK($door_device_id);
+ if (!$device_info) {
+ $this->setStatus(1);
+ $this->setError('查无此设备');
+ return self::RS_SUCCESS;
+ }
+ $data['device'] = $device_info[0];
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'door.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 编辑门禁设备 - 保存
+ */
+ public function editSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ Door_Model_Device::instance()->save($set['data']);
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('编辑失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 删除 - 扔进回收站
+ */
+ public function delete() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if (!$this->input->isPOST()) {
+ $this->setStatus(1);
+ $this->setError('请勿非法操作');
+ return self::RS_SUCCESS;
+ }
+
+ $door_device_id = $this->input->post('door_device_id');
+ if (is_string($door_device_id)) {
+ if (strpos($door_device_id, ',')) {
+ $door_device_id = explode(',', $door_device_id);
+ } else {
+ $door_device_id = array((int) $door_device_id);
+ }
+ }
+
+ try {
+ if (is_array($door_device_id) && count($door_device_id)) {
+ foreach ($door_device_id as $k => $v) {
+ $where = "door_device_id = {$v}";
+ $set = array('is_del' => 1);
+ Door_Model_Device::instance()->update($set, $where);
+ }
+ }
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('删除失败 : ' . $e->getMessage());
+ return self::RS_SUCCESS;
+ }
+
+ $this->setData('data', '删除成功');
+ return self::RS_SUCCESS;
+ }
+
+ /**
+ * 保存-校验
+ */
+ private function _validate() {
+ $res = array(
+ 'status' => 0,
+ 'error' => null,
+ 'data' => null
+ );
+
+ $res['data'] = array(
+ 'door_device_id' => $this->input->post('door_device_id', null),
+ 'device_sn' => $this->input->post('device_sn'),
+ 'device_ip' => $this->input->post('device_ip'),
+ 'device_port' => $this->input->post('device_port'),
+ 'device_type' => $this->input->post('device_type', 1),
+ 'residential_id' => $this->input->post('residential_id', 0),
+ 'building_id' => $this->input->post('building_id', 0),
+ 'unit_id' => $this->input->post('unit_id', 0),
+ 'mtime' => date('Y-m-d H:i:s'));
+
+ /* 数据验证 */
+ if (empty($res['data']['device_sn'])) {
+ $res['status'] = 1;
+ $res['error'] = '请填写设备序列号';
+ return $res;
+ }
+
+ if (empty($res['data']['device_ip'])) {
+ $res['status'] = 1;
+ $res['error'] = '请填写设备IP地址';
+ return $res;
+ }
+
+ /* 处理添加时间 */
+ if (!$res['data']['door_device_id']) {
+ $res['data']['ctime'] = $res['data']['mtime'];
+ }
+
+ return $res;
+ }
+
+}
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/application/Errand/admin/ErrandAdminAbstract.php b/wy/server/application/Errand/admin/ErrandAdminAbstract.php
new file mode 100644
index 0000000..afc2c4c
--- /dev/null
+++ b/wy/server/application/Errand/admin/ErrandAdminAbstract.php
@@ -0,0 +1,23 @@
+addResult(self::RS_SUCCESS, 'json');
+ /* 接收参数 */
+ $ordername = $this->input->get('ordername', null);
+ $orderby = $this->input->get('orderby', null);
+ $page = (int) $this->input->get('pageIndex', 0);
+ $perpage = $this->input->get('pageSize', $this->perpage);
+ $key = trim($this->input->get('key'));
+
+ /* ajax 加载数据 */
+ if ($this->input->isAJAX()) {
+ $offset = $page * $perpage;
+ $page = $page + 1;
+ $where = 'is_del = 0 ';
+ if (!empty($key)) {
+ $where .= " AND errand_name LIKE '%{$key}%'";
+ }
+
+ $order = 'ctime DESC';
+ // 暂时返回空数据,等有具体的跑腿服务表后再实现
+ $data['count'] = 0;
+ $data['errand_list'] = array();
+ }
+ $data['ordername'] = $ordername;
+ $data['orderby'] = $orderby;
+ $data['page'] = $page;
+ $data['perpage'] = $perpage;
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'errand.index');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加跑腿服务
+ */
+ public function add() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if ($this->input->isPOST()) {
+ $this->addSave();
+ return self::RS_SUCCESS;
+ }
+
+ $data = array();
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'errand.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加跑腿服务 - 保存
+ */
+ public function addSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ // 暂时只返回成功,等有具体的跑腿服务表后再实现
+ $this->setData('data', '添加成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('添加失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 编辑跑腿服务
+ */
+ public function edit() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+ if ($this->input->isPOST()) {
+ $this->editSave();
+ return self::RS_SUCCESS;
+ }
+ $errand_id = (int) $this->input->get('errand_id');
+ $data['errand'] = array();
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'errand.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 编辑跑腿服务 - 保存
+ */
+ public function editSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ // 暂时只返回成功,等有具体的跑腿服务表后再实现
+ $this->setData('data', '保存成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('编辑失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 删除
+ */
+ public function delete() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if (!$this->input->isPOST()) {
+ $this->setStatus(1);
+ $this->setError('请勿非法操作');
+ return self::RS_SUCCESS;
+ }
+
+ $errand_id = $this->input->post('errand_id');
+ try {
+ // 暂时只返回成功,等有具体的跑腿服务表后再实现
+ $this->setData('data', '删除成功');
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('删除失败 : ' . $e->getMessage());
+ return self::RS_SUCCESS;
+ }
+
+ return self::RS_SUCCESS;
+ }
+
+ /**
+ * 保存-校验
+ */
+ private function _validate() {
+ $res = array(
+ 'status' => 0,
+ 'error' => null,
+ 'data' => null
+ );
+
+ $res['data'] = array(
+ 'errand_id' => $this->input->post('errand_id', null),
+ 'errand_name' => $this->input->post('errand_name'),
+ 'mtime' => date('Y-m-d H:i:s'));
+
+ /* 数据验证 */
+ if (empty($res['data']['errand_name'])) {
+ $res['status'] = 1;
+ $res['error'] = '请填写服务名称';
+ return $res;
+ }
+
+ /* 处理添加时间 */
+ if (!$res['data']['errand_id']) {
+ $res['data']['ctime'] = $res['data']['mtime'];
+ }
+
+ return $res;
+ }
+
+}
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/application/Fingerprint/admin/IndexController.php b/wy/server/application/Fingerprint/admin/IndexController.php
index ef323dc..9e85ef4 100644
--- a/wy/server/application/Fingerprint/admin/IndexController.php
+++ b/wy/server/application/Fingerprint/admin/IndexController.php
@@ -128,7 +128,7 @@ class IndexController extends FingerprintAdminAbstract {
$advert_cols = array('advert_category_name', 'advert_category_id');
$advert_categort = Advert_Model_Category::instance()->fetchByFV('is_del', 0, $advert_cols);
$region_cols = array('region_name', 'region_id');
- $provinces = Trend_Model_Region::instance()->fetchByFV('status = 1 AND pid', 1, $region_cols);
+ $provinces = Trend_Model_Region::instance()->fetchByFV('disabled = 0 AND pid', 1, $region_cols);
$data['provinces_list'] = $provinces;
$data['advert_categort'] = $advert_categort;
$this->setData('data', $data);
diff --git a/wy/server/application/Fingerprint/controllers/IndexController.php b/wy/server/application/Fingerprint/controllers/IndexController.php
index 791373d..f7a9304 100644
--- a/wy/server/application/Fingerprint/controllers/IndexController.php
+++ b/wy/server/application/Fingerprint/controllers/IndexController.php
@@ -115,7 +115,7 @@ class IndexController extends FingerprintAbstract {
public function select_region() {
$region_id = $this->input->post('region_id');
$region_cols = array('region_name', 'region_id');
- $region_list = Trend_Model_Region::instance()->fetchByFV('status = 1 AND pid', $region_id, $region_cols);
+ $region_list = Trend_Model_Region::instance()->fetchByFV('disabled = 0 AND pid', $region_id, $region_cols);
$data['region_list'] = $region_list;
ob_clean();
echo json_encode($data);
diff --git a/wy/server/application/Interface/api/IndexController.php b/wy/server/application/Interface/api/IndexController.php
index b469ece..b92275b 100644
--- a/wy/server/application/Interface/api/IndexController.php
+++ b/wy/server/application/Interface/api/IndexController.php
@@ -63,7 +63,7 @@ class IndexController extends InterfaceApiAbstract
private function _validate()
{
- $res = array('status' => 0, 'error' => '', 'data' => '');
+ $res = array('status' => 0, 'error' => '', 'data' => array());
if (! $this->input->isPOST()) {
$res['status'] = 1;
@@ -87,10 +87,12 @@ class IndexController extends InterfaceApiAbstract
}
/* 获取密钥 */
- if ($configs_apps[$params['app']]) {
+ if (isset($configs_apps[$params['app']]) && !empty($configs_apps[$params['app']])) {
$secret = $configs_apps[$params['app']]['secret'];
+ $res['data']['configs_apps'] = $configs_apps[$params['app']];
} else {
$secret = $configs_apps['default']['secret'];
+ $res['data']['configs_apps'] = $configs_apps['default'];
}
$sign_local = MD5($params['app'] . $params['class'] . $secret);
@@ -99,8 +101,6 @@ class IndexController extends InterfaceApiAbstract
$res['error'] = '未经授权,拒绝访问';
return $res;
}
-
- $res['data']['configs_apps'] = $configs_apps[$params['app']];
$res['data']['params_app'] = array(
'app' => $params['app'],
'class' => $params['class']
diff --git a/wy/server/application/Interface/libraries/Api/Cas/UserReg.php b/wy/server/application/Interface/libraries/Api/Cas/UserReg.php
index cb29556..eba328f 100644
--- a/wy/server/application/Interface/libraries/Api/Cas/UserReg.php
+++ b/wy/server/application/Interface/libraries/Api/Cas/UserReg.php
@@ -32,7 +32,7 @@ class Api_Cas_UserReg {
$send = self::userRegTwo($mobile, $code); //验证验证码是否正确
//$send['status'] = 0;
if ($send['status'] == 0) {
- $reg_status = self::UserRegThree($mobile, $password);
+ $reg_status = self::UserRegThree($mobile, $password, $code);
return $reg_status;
} else {
return $send;
@@ -42,6 +42,13 @@ class Api_Cas_UserReg {
//验证用户提交的验证码是否正确
public static function userRegTwo($mobile, $code) {
+ // 测试环境:固定验证码1234直接通过验证
+ if ($code == '1234') {
+ $res['status'] = 0;
+ $res['error'] = "验证成功";
+ return $res;
+ }
+
$mod = Cas_Model_Code::instance();
$action = "register";
$is_exist = $mod->validateCode($mobile, $action, $code);
@@ -62,7 +69,7 @@ class Api_Cas_UserReg {
}
//用户提交注册信息保存
- public static function UserRegThree($mobile, $password) {
+ public static function UserRegThree($mobile, $password, $code = '') {
$user_model = Cas_Model_User::instance();
//judge the phone is exist
$isExist = $user_model->fetchByFV('phone', $mobile); //验证手机号码是否被注册
@@ -82,7 +89,10 @@ class Api_Cas_UserReg {
$res['data'] = array();
} else {
//注册成功
- Cas_Model_Code::instance()->delUserCode($mobile, 'register');
+ // 只有在非固定验证码的情况下才删除验证码记录
+ if ($code != '1234') {
+ Cas_Model_Code::instance()->delUserCode($mobile, 'register');
+ }
$userinfo = $user_model->fetchByPK($status, array('userid', 'phone','gender'));
$res['status'] = 0;
$res['error'] = "注册成功";
diff --git a/wy/server/application/Interface/libraries/Api/Store/GetMsgInfoList.php b/wy/server/application/Interface/libraries/Api/Store/GetMsgInfoList.php
index 0a15c03..e089e83 100644
--- a/wy/server/application/Interface/libraries/Api/Store/GetMsgInfoList.php
+++ b/wy/server/application/Interface/libraries/Api/Store/GetMsgInfoList.php
@@ -29,7 +29,7 @@ class Api_Store_GetMsgInfoList
$store_info = Store_Model_Msg::instance()->fetchByWhere($where,null,null,null,array('msg_id','title','is_dot'));
if($store_info){
foreach ($store_info as $k=>&$v){
- $v['url']="https://wy.dou1.net/store/info?id=".$v['msg_id'];
+ $v['url']="http://101.43.95.130:8030/store/info?id=".$v['msg_id'];
}
}
$res['data']=$store_info?$store_info:array();
diff --git a/wy/server/application/Interface/libraries/Api/Store/GetMsgList.php b/wy/server/application/Interface/libraries/Api/Store/GetMsgList.php
index f4b76c7..097d49b 100644
--- a/wy/server/application/Interface/libraries/Api/Store/GetMsgList.php
+++ b/wy/server/application/Interface/libraries/Api/Store/GetMsgList.php
@@ -38,7 +38,7 @@ class Api_Store_GetMsgList
$v['img'] = '';
}
$v['store_name']=$store[0]['store_name'];
- $v['url']="https://wy.dou1.net/store/info?id=".$v['msg_id'];
+ $v['url']="http://101.43.95.130:8030/store/info?id=".$v['msg_id'];
$v['ctime']=Support_FormartTime::run($v['ctime']);
}
}
diff --git a/wy/server/application/Interface/libraries/Api/Store/GetStoreAd.php b/wy/server/application/Interface/libraries/Api/Store/GetStoreAd.php
index d17f862..1e08776 100644
--- a/wy/server/application/Interface/libraries/Api/Store/GetStoreAd.php
+++ b/wy/server/application/Interface/libraries/Api/Store/GetStoreAd.php
@@ -44,7 +44,7 @@ class Api_Store_GetStoreAd
$v['image'] =array();
}
unset($v['img']);
- $v['url']="https://wy.dou1.net/store/info?type=1&id=".$v['store_ad_id'];
+ $v['url']="http://101.43.95.130:8030/store/info?type=1&id=".$v['store_ad_id'];
}
}
$res['data'] = $store_ad;
diff --git a/wy/server/application/Interface/libraries/Api/Store/PushMsg.php b/wy/server/application/Interface/libraries/Api/Store/PushMsg.php
index 5246daf..7489504 100644
--- a/wy/server/application/Interface/libraries/Api/Store/PushMsg.php
+++ b/wy/server/application/Interface/libraries/Api/Store/PushMsg.php
@@ -45,7 +45,7 @@ class Api_Store_PushMsg
$content = $store_info[0]['title'];
$ext=array(
'type'=>1,
- 'url'=>"https://wy.dou1.net/store/info?id=".$id,
+ 'url'=>"http://101.43.95.130:8030/store/info?id=".$id,
'store_name'=>$storeInfo[0]['store_name']
);
$badge=Store_Model_Msg::instance()->getCount("userid={$userid} and is_dot=1");
diff --git a/wy/server/application/Message/admin/IndexController.php b/wy/server/application/Message/admin/IndexController.php
new file mode 100644
index 0000000..921957b
--- /dev/null
+++ b/wy/server/application/Message/admin/IndexController.php
@@ -0,0 +1,306 @@
+addResult(self::RS_SUCCESS, 'json');
+ /* 接收参数 */
+ $ordername = $this->input->get('ordername', null);
+ $orderby = $this->input->get('orderby', null);
+ $page = (int) $this->input->get('pageIndex', 0);
+ $perpage = $this->input->get('pageSize', $this->perpage);
+ $key = trim($this->input->get('key'));
+ $message_object = (int) $this->input->get('message_object', 0);
+ /* ajax 加载数据 */
+ if ($this->input->isAJAX()) {
+ $offset = $page * $perpage;
+ $page = $page + 1;
+ $where = 'is_del = 0 ';
+// if ($message_object) {
+// $where .= " AND message_object = $message_object ";
+// }
+ if (!empty($key)) {
+ $where .= " AND message_title LIKE '%{$key}%'";
+ }
+
+ $order = 'ctime DESC';
+ $message_cols = array('message_id', 'ctime', 'message_title', 'mtime', 'is_send', 'city_id', 'province_id', 'region_id', 'message_picture');
+ $message = Message_Model_Content::instance()->fetchByWhere($where, $order, $perpage, $offset, $message_cols);
+ if (!empty($message)) {
+ $url_mapping = Zeed_Config::loadGroup('urlmapping');
+ foreach ($message as $k => $v) {
+ $message[$k]['message_picture'] = $url_mapping['store_url'] . 'uploads' . $v['message_picture'];
+ }
+ }
+ $data['count'] = Message_Model_Content::instance()->getCount($where);
+ $data['message_list'] = $message ? $message : array();
+ }
+ $data['ordername'] = $ordername;
+ $data['orderby'] = $orderby;
+ $data['page'] = $page;
+ $data['perpage'] = $perpage;
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'message.index');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加消息
+ */
+ public function add() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if ($this->input->isPOST()) {
+ $this->addSave();
+ return self::RS_SUCCESS;
+ }
+ $region_cols = array('region_name', 'region_id');
+ $provinces = Trend_Model_Region::instance()->fetchByFV('disabled = 0 AND pid', 1, $region_cols);
+ $data['provinces_list'] = $provinces;
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'message.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 添加消息 - 保存
+ */
+ public function addSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+
+ /* 处理图片 */
+ $files = $set['data']['message_picture'];
+ if ($files['name']) {
+ $files_upload = Support_Attachment::upload($files);
+ if ($files['error'] == 0) {
+ $set['data']['message_picture'] = $files_upload['filepath'];
+ } else {
+ throw new Zeed_Exception('好像发生一些意外错误呢');
+ }
+ } else {
+ unset($set['data']['message_picture']);
+ }
+ $message_id = Message_Model_Content::instance()->add($set['data']);
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('添加失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 编辑消息
+ */
+ public function edit() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+ if ($this->input->isPOST()) {
+ $this->editSave();
+ return self::RS_SUCCESS;
+ }
+ $message_id = (int) $this->input->get('message_id');
+ /* 查询消息主体信息 */
+ $cols_message = array('message_id', 'ctime', 'message_title', 'message_brief', 'message_info');
+ $message_info = Message_Model_Content::instance()->fetchByPK($message_id, $cols_message);
+ if (!$message_info) {
+ $this->setStatus(1);
+ $this->setError('查无此消息');
+ return self::RS_SUCCESS;
+ }
+ $data['message'] = $message_info[0];
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'message.edit');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ /**
+ * 编辑消息 - 保存
+ */
+ public function editSave() {
+ $set = $this->_validate();
+ if ($set['status'] == 0) {
+ try {
+ /* 处理图片 */
+ $files = $set['data']['message_picture'];
+ if ($files['name']) {
+ $files_upload = Support_Attachment::upload($files);
+ if ($files['error'] == 0) {
+ $set['data']['message_picture'] = $files_upload['filepath'];
+ } else {
+ throw new Zeed_Exception('好像发生一些意外错误呢');
+ }
+ } else {
+ unset($set['data']['message_picture']);
+ }
+ /* 基础数据处理 */
+ Message_Model_Content::instance()->save($set['data']);
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('编辑失败 : ' . $e->getMessage());
+ return false;
+ }
+ return true;
+ }
+ $this->setStatus($set['status']);
+ $this->setError($set['error']);
+ return false;
+ }
+
+ /**
+ * 查看消息详情
+ */
+ public function look_info() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+ if ($this->input->isPOST()) {
+ $this->editSave();
+ return self::RS_SUCCESS;
+ }
+ $message_id = (int) $this->input->get('message_id');
+ /* 查询消息主体信息 */
+ $message_cols = array('message_id', 'ctime', 'message_title', 'message_brief', 'message_info', 'is_send');
+ $message_info = Message_Model_Content::instance()->fetchByPK($message_id, $message_cols);
+ if (!$message_info) {
+ $this->setStatus(1);
+ $this->setError('查无此消息');
+ return self::RS_SUCCESS;
+ }
+ $data['message'] = $message_info[0];
+ $this->setData('data', $data);
+ $this->addResult(self::RS_SUCCESS, 'php', 'message.info');
+ return parent::multipleResult(self::RS_SUCCESS);
+ }
+
+ //发送方式
+ public function message_send() {
+ $message_id = $this->input->post('message_id');
+
+ $cols_message = array('message_title', 'ctime', 'region_id', 'city_id');
+ $message_info = Message_Model_Content::instance()->fetchByPK($message_id, $cols_message);
+ if (!$message_info) {
+ $this->setStatus(1);
+ $this->setError('查无此消息');
+ return self::RS_SUCCESS;
+ }
+ $cole_user = array('userid');
+ $user_is_exits = Cas_Model_User::instance()->fetchByFV('is_del', 0, $cole_user);
+ if (!empty($user_is_exits)) {
+ foreach ($user_is_exits as $k => $v) {
+ $usernum = array();
+ $usernum['message_id'] = $message_id;
+ $usernum['user_id'] = $v['userid'];
+ $usernum['ctime'] = date('Y-m-d H:i:s');
+ Message_Model_Num::instance()->add($usernum);
+ }
+ }
+ $where = "message_id = {$message_id}";
+ $set = array('is_send' => 1);
+ Message_Model_Content::instance()->update($set, $where);
+ echo 'ok';
+ exit;
+ }
+
+ /**
+ * 删除 - 扔进回收站
+ * 支持 AJAX 和 GET 请求删除
+ * 支持参数: message_id(int, array, 逗号分割)
+ */
+ public function delete() {
+ $this->addResult(self::RS_SUCCESS, 'json');
+
+ if (!$this->input->isPOST()) {
+ $this->setStatus(1);
+ $this->setError('请勿非法操作');
+ return self::RS_SUCCESS;
+ }
+
+ $message_id = $this->input->post('message_id');
+ if (is_string($message_id)) {
+ if (strpos($message_id, ',')) {
+ $message_id = explode(',', $message_id);
+ } else {
+ $message_id = array((int) $message_id);
+ }
+ }
+
+ try {
+ if (is_array($message_id) && count($message_id)) {
+ foreach ($message_id as $k => $v) {
+ $where = "message_id = {$v}";
+ $set = array('is_del' => 1);
+ Message_Model_Content::instance()->update($set, $where);
+ }
+ }
+ } catch (Zeed_Exception $e) {
+ $this->setStatus(1);
+ $this->setError('删除失败 : ' . $e->getMessage());
+ return self::RS_SUCCESS;
+ }
+
+ $this->setData('data', '删除成功');
+ return self::RS_SUCCESS;
+ }
+
+ /**
+ * 保存-校验
+ */
+ private function _validate() {
+ $res = array(
+ 'status' => 0,
+ 'error' => null,
+ 'data' => null
+ );
+
+ $res['data'] = array(
+ 'message_id' => $this->input->post('system_message_id', null),
+ 'region_type' => 1,
+ 'message_picture' => $_FILES['message_picture'],
+ 'message_brief' => $this->input->post('message_brief'),
+ 'message_title' => $this->input->post('message_title'),
+ 'message_info' => $this->input->post('message_info'),
+ 'mtime' => date('Y-m-d H:i:s'));
+
+ /* 数据验证 */
+ if (empty($res['data']['message_title'])) {
+ $res['status'] = 1;
+ $res['error'] = '请填写完所有带红色星号的内容';
+ return $res;
+ }
+
+ /* 处理添加时间 */
+ if (!$res['data']['message_id']) {
+ $res['data']['ctime'] = $res['data']['mtime'];
+ }
+
+ return $res;
+ }
+
+}
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/application/Message/admin/MessageController.php b/wy/server/application/Message/admin/MessageController.php
index 5765120..cfae7b5 100644
--- a/wy/server/application/Message/admin/MessageController.php
+++ b/wy/server/application/Message/admin/MessageController.php
@@ -75,7 +75,7 @@ class MessageController extends MessageAdminAbstract {
return self::RS_SUCCESS;
}
$region_cols = array('region_name', 'region_id');
- $provinces = Trend_Model_Region::instance()->fetchByFV('status = 1 AND pid', 1, $region_cols);
+ $provinces = Trend_Model_Region::instance()->fetchByFV('disabled = 0 AND pid', 1, $region_cols);
$data['provinces_list'] = $provinces;
$this->setData('data', $data);
$this->addResult(self::RS_SUCCESS, 'php', 'message.edit');
diff --git a/wy/server/config/database.php b/wy/server/config/database.php
index d7d0370..82922d9 100644
--- a/wy/server/config/database.php
+++ b/wy/server/config/database.php
@@ -28,26 +28,37 @@ defined('ZEED_DB_TABLEPREFIX') || define('ZEED_DB_TABLEPREFIX', '');
return array(
'default' => array(
'adapter' => 'PDO_MYSQL',
- //'host' => '10.58.128.61',
- 'host' => 'localhost',
+ 'host' => 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com',
+ 'port' => 24936,
'username' => 'root',
- // 'password' => 'sensor76309697MICRO',
- 'password' => 'qazwsx.com',
- 'dbname' => 'wy',
+ 'password' => '!Rjb12191',
+ 'dbname' => 'wy_db',
'prefix' => '',
'charset' => 'utf8mb4',
- 'profiler' => 1
+ 'profiler' => 0 // 生产环境建议设为0
),
/**
* 这里仅仅是配置, 不兼容Zend_Db_Adapter
*/
- 'redis' => array(
- 'host' => 'localhost',
- 'port' => '6379',
- 'db' => 0,
- 'expire' => 0 // 生命周期,0 为无限制
- )
+ 'redis' => array(
+ 'host' => 'localhost',
+ 'port' => '6379',
+ 'db' => 0,
+ 'expire' => 0 // 生命周期,0 为无限制
+ ),
+ // ACL数据库配置(如果不存在,使用default配置)
+ 'acl' => array(
+ 'adapter' => 'PDO_MYSQL',
+ 'host' => 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com',
+ 'port' => 24936,
+ 'username' => 'root',
+ 'password' => '!Rjb12191',
+ 'dbname' => 'wy_db',
+ 'prefix' => '',
+ 'charset' => 'utf8mb4',
+ 'profiler' => 0
+ )
);
// End ^ Native EOL ^ UTF-8
diff --git a/wy/server/config/urlmapping.php b/wy/server/config/urlmapping.php
index e955b9a..9d90fa6 100644
--- a/wy/server/config/urlmapping.php
+++ b/wy/server/config/urlmapping.php
@@ -16,8 +16,9 @@
*/
$config['site_name'] = '智慧豆豆管理平台';
-$config['store_url'] = 'https://wy.dou1.net/'; // 本地地址
-$config['store_url_login'] = 'https://wy.dou1.net/'; // 登录地址
+// 测试服务器地址
+$config['store_url'] = 'http://101.43.95.130:8030/'; // 本地地址
+$config['store_url_login'] = 'http://101.43.95.130:8030/'; // 登录地址
$config['static_url'] = '/static';
$config['upload_url'] = '/uploads'; // 跟配置的别名保持一致
@@ -25,7 +26,12 @@ $config['upload_url'] = '/uploads'; // 跟配置的别名保持一致
* 公共第三方JavaScript&CSS框架、插件等, 一般是按版本
*/
$config['static_cdn'] = '/static';
-$config['upload_cdn'] = 'https://wy.dou1.net/'; //图片服务器的域名
+$config['upload_cdn'] = 'http://101.43.95.130:8030/'; //图片服务器的域名
+
+// 原生产环境地址(备用)
+// $config['store_url'] = 'https://wy.dou1.net/';
+// $config['store_url_login'] = 'https://wy.dou1.net/';
+// $config['upload_cdn'] = 'https://wy.dou1.net/';
return $config;
diff --git a/wy/server/data/cache/__CLASSINDEXING.php b/wy/server/data/cache/__CLASSINDEXING.php
new file mode 100755
index 0000000..e6f9970
--- /dev/null
+++ b/wy/server/data/cache/__CLASSINDEXING.php
@@ -0,0 +1,281 @@
+
+ array (
+ 'Index' => '/home/renjianbo/saars/wy/wy/wy/server/application/Index/controllers/IndexAbstract.php',
+ ),
+ 'Com_Admin_Permission' => '/home/renjianbo/saars/wy/wy/ZeedFramework/library/Com/Admin/Permission.php',
+ 'Com_Admin_Authorization' => '/home/renjianbo/saars/wy/wy/ZeedFramework/library/Com/Admin/Authorization.php',
+ 'PermissionHelper' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/libraries/PermissionHelper.php',
+ ),
+ 'System_Model_Navigation' => '/home/renjianbo/saars/wy/wy/wy/server/library/System/Model/Navigation.php',
+ 'Com_Admin_Permission_Model' => '/home/renjianbo/saars/wy/wy/ZeedFramework/library/Com/Admin/Permission/Model.php',
+ 'Com_Admin_Model_User' => '/home/renjianbo/saars/wy/wy/ZeedFramework/library/Com/Admin/Model/User.php',
+ 'Admin_Model_User' => '/home/renjianbo/saars/wy/wy/wy/server/library/Admin/Model/User.php',
+ 'AdminAbstract' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/controllers/AdminAbstract.php',
+ ),
+ 'UserGroupModel' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/models/UserGroupModel.php',
+ ),
+ 'UserPermissionModel' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/models/UserPermissionModel.php',
+ ),
+ 'Admin_Model_Token' => '/home/renjianbo/saars/wy/wy/wy/server/library/Admin/Model/Token.php',
+ 'Com_Admin_Model_Group' => '/home/renjianbo/saars/wy/wy/ZeedFramework/library/Com/Admin/Model/Group.php',
+ 'GroupModel' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/models/GroupModel.php',
+ ),
+ 'LogModel' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/models/LogModel.php',
+ ),
+ 'InterfaceApiAbstract' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/api/InterfaceApiAbstract.php',
+ ),
+ 'Api_Cas_Login' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Cas/Login.php',
+ ),
+ 'Cas_Model_User' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Model/User.php',
+ 'Api_Cas_SendCode' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Cas/SendCode.php',
+ ),
+ 'Cas_Model_Code' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Model/Code.php',
+ 'Api_Cas_UserReg' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Cas/UserReg.php',
+ ),
+ 'Cas_Entity_User' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Entity/User.php',
+ 'Cas_Model_Login_Log' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Model/Login/Log.php',
+ 'Cas_Entity_Login_Log' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Entity/Login/Log.php',
+ 'Api_Cas_MyHouseList' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Cas/MyHouseList.php',
+ ),
+ 'Cas_Model_User_Home' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Model/User/Home.php',
+ 'Api_Store_GetMsgList' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Store/GetMsgList.php',
+ ),
+ 'Store_Model_Msg' => '/home/renjianbo/saars/wy/wy/wy/server/application/Store/Model/Msg.php',
+ 'Api_Cas_GetMyAddress' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Cas/GetMyAddress.php',
+ ),
+ 'Api_Advert_AdvertHomeList' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Advert/AdvertHomeList.php',
+ ),
+ 'Advert_Model_Content' => '/home/renjianbo/saars/wy/wy/wy/server/application/Advert/Model/Content.php',
+ 'Api_Goods_IndexGoodsLists' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Goods/IndexGoodsLists.php',
+ ),
+ 'Goods_Model_Content' => '/home/renjianbo/saars/wy/wy/wy/server/application/Goods/Model/Content.php',
+ 'Support_ImageUrl' => '/home/renjianbo/saars/wy/wy/wy/server/library/Support/ImageUrl.php',
+ 'Api_Goods_GoodsLists' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Goods/GoodsLists.php',
+ ),
+ 'Api_Door_IsExsitFace' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Door/IsExsitFace.php',
+ ),
+ 'Cas_Model_User_Faceinfo' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Model/User/Faceinfo.php',
+ 'Advertorial_Model_Content' => '/home/renjianbo/saars/wy/wy/wy/server/application/Advertorial/Model/Content.php',
+ 'Message_Model_Content' => '/home/renjianbo/saars/wy/wy/wy/server/application/Message/Model/Content.php',
+ 'Api_Goods_UpGoodsLists' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Goods/UpGoodsLists.php',
+ ),
+ 'Store_Model_Info' => '/home/renjianbo/saars/wy/wy/wy/server/application/Store/Model/Info.php',
+ 'Goods_Model_Dis' => '/home/renjianbo/saars/wy/wy/wy/server/application/Goods/Model/Dis.php',
+ 'Api_Goods_MyGoodsLists' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Goods/MyGoodsLists.php',
+ ),
+ 'Api_Goods_AddUp' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Goods/AddUp.php',
+ ),
+ 'Goods_Entity_Content' => '/home/renjianbo/saars/wy/wy/wy/server/application/Goods/Entity/Content.php',
+ 'Support_FormartTime' => '/home/renjianbo/saars/wy/wy/wy/server/library/Support/FormartTime.php',
+ 'Api_Goods_DisGoods' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Goods/DisGoods.php',
+ ),
+ 'Goods_Entity_Dis' => '/home/renjianbo/saars/wy/wy/wy/server/application/Goods/Entity/Dis.php',
+ 'Api_Cas_GetUserInfo' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Cas/GetUserInfo.php',
+ ),
+ 'Store_Entity_Msg' =>
+ array (
+ 'Store' => '/home/renjianbo/saars/wy/wy/wy/server/application/Store/Entity/Msg.php',
+ ),
+ 'Cas_Authorization' => '/home/renjianbo/saars/wy/wy/wy/server/library/Cas/Authorization.php',
+ 'System_Model_Frontend_Menu' => '/home/renjianbo/saars/wy/wy/wy/server/library/System/Model/Frontend/Menu.php',
+ 'Order_Model_List' =>
+ array (
+ 'Order' => '/home/renjianbo/saars/wy/wy/wy/server/application/Order/Model/List.php',
+ ),
+ 'SystemAdminAbstract' =>
+ array (
+ 'System' => '/home/renjianbo/saars/wy/wy/wy/server/application/System/admin/SystemAdminAbstract.php',
+ ),
+ 'System_Model_Feedback' =>
+ array (
+ 'System' => '/home/renjianbo/saars/wy/wy/wy/server/application/System/Model/Feedback.php',
+ ),
+ 'CasAdminAbstract' =>
+ array (
+ 'Cas' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/admin/CasAdminAbstract.php',
+ ),
+ 'Trend_Model_Home' => '/home/renjianbo/saars/wy/wy/wy/server/application/Trend/Model/Home.php',
+ 'UserModel' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/models/UserModel.php',
+ ),
+ 'PanelAbstract' =>
+ array (
+ 'Panel' => '/home/renjianbo/saars/wy/wy/wy/server/application/Panel/controllers/PanelAbstract.php',
+ ),
+ 'AdvertAdminAbstract' =>
+ array (
+ 'Advert' => '/home/renjianbo/saars/wy/wy/wy/server/application/Advert/admin/AdvertAdminAbstract.php',
+ ),
+ 'Advert_Model_Category' =>
+ array (
+ 'Advert' => '/home/renjianbo/saars/wy/wy/wy/server/application/Advert/Model/Category.php',
+ ),
+ 'ArticleAdminAbstract' =>
+ array (
+ 'Article' => '/home/renjianbo/saars/wy/wy/wy/server/application/Article/admin/ArticleAdminAbstract.php',
+ ),
+ 'Article_Model_Content' =>
+ array (
+ 'Article' => '/home/renjianbo/saars/wy/wy/wy/server/application/Article/Model/Content.php',
+ ),
+ 'ServeAdminAbstract' =>
+ array (
+ 'Serve' => '/home/renjianbo/saars/wy/wy/wy/server/application/Serve/admin/ServeAdminAbstract.php',
+ ),
+ 'Serve_Model_Category' =>
+ array (
+ 'Serve' => '/home/renjianbo/saars/wy/wy/wy/server/application/Serve/Model/Category.php',
+ ),
+ 'Serve_Model_Content' =>
+ array (
+ 'Serve' => '/home/renjianbo/saars/wy/wy/wy/server/application/Serve/Model/Content.php',
+ ),
+ 'Garage_Model_User' =>
+ array (
+ 'Garage' => '/home/renjianbo/saars/wy/wy/wy/server/application/Garage/Model/User.php',
+ ),
+ 'Order_Model_Mainlist' =>
+ array (
+ 'Order' => '/home/renjianbo/saars/wy/wy/wy/server/application/Order/Model/Mainlist.php',
+ ),
+ 'Order_Model_Detail' =>
+ array (
+ 'Order' => '/home/renjianbo/saars/wy/wy/wy/server/application/Order/Model/Detail.php',
+ ),
+ 'Goods_Model_Detail' => '/home/renjianbo/saars/wy/wy/wy/server/application/Goods/Model/Detail.php',
+ 'AppModel' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/models/AppModel.php',
+ ),
+ 'PermissionModel' =>
+ array (
+ 'Admin' => '/home/renjianbo/saars/wy/wy/wy/server/application/Admin/models/PermissionModel.php',
+ ),
+ 'MessageAdminAbstract' =>
+ array (
+ 'Message' => '/home/renjianbo/saars/wy/wy/wy/server/application/Message/admin/MessageAdminAbstract.php',
+ ),
+ 'DoorAdminAbstract' =>
+ array (
+ 'Door' => '/home/renjianbo/saars/wy/wy/wy/server/application/Door/admin/DoorAdminAbstract.php',
+ ),
+ 'Door_Model_Device' =>
+ array (
+ 'Door' => '/home/renjianbo/saars/wy/wy/wy/server/application/Door/Model/Device.php',
+ ),
+ 'Store_Entity_Info' =>
+ array (
+ 'Store' => '/home/renjianbo/saars/wy/wy/wy/server/application/Store/Entity/Info.php',
+ ),
+ 'FingerprintAdminAbstract' =>
+ array (
+ 'Fingerprint' => '/home/renjianbo/saars/wy/wy/wy/server/application/Fingerprint/admin/FingerprintAdminAbstract.php',
+ ),
+ 'DeviceAdminAbstract' =>
+ array (
+ 'Device' => '/home/renjianbo/saars/wy/wy/wy/server/application/Device/admin/DeviceAdminAbstract.php',
+ ),
+ 'Cas_Model_Fingerprint' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Model/Fingerprint.php',
+ 'TrendAdminAbstract' =>
+ array (
+ 'Trend' => '/home/renjianbo/saars/wy/wy/wy/server/application/Trend/admin/TrendAdminAbstract.php',
+ ),
+ 'Trend_Entity_Home' =>
+ array (
+ 'Trend' => '/home/renjianbo/saars/wy/wy/wy/server/application/Trend/Entity/Home.php',
+ ),
+ 'Api_Trend_GetHomeByPid' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Trend/GetHomeByPid.php',
+ ),
+ 'Api_Cas_AddMyHouse' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Cas/AddMyHouse.php',
+ ),
+ 'Cas_Entity_User_Home' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Entity/User/Home.php',
+ 'Cas_Model_User_Family' =>
+ array (
+ 'Cas' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Model/User/Family.php',
+ ),
+ 'Cas_Entity_User_Family' =>
+ array (
+ 'Cas' => '/home/renjianbo/saars/wy/wy/wy/server/application/Cas/Entity/User/Family.php',
+ ),
+ 'Api_Goods_WyGoodsLists' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Goods/WyGoodsLists.php',
+ ),
+ 'Api_Door_GetownerCode' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Door/GetownerCode.php',
+ ),
+ 'Door_Model_Verification' => '/home/renjianbo/saars/wy/wy/wy/server/application/Door/Model/Verification.php',
+ 'Door_Entity_Verification' => '/home/renjianbo/saars/wy/wy/wy/server/application/Door/Entity/Verification.php',
+ 'Trend_Model_Region' => '/home/renjianbo/saars/wy/wy/wy/server/application/Trend/Model/Region.php',
+ 'ErrandAdminAbstract' =>
+ array (
+ 'Errand' => '/home/renjianbo/saars/wy/wy/wy/server/application/Errand/admin/ErrandAdminAbstract.php',
+ ),
+ 'Api_Goods_AddGoodsInfo' =>
+ array (
+ 'Interface' => '/home/renjianbo/saars/wy/wy/wy/server/application/Interface/libraries/Api/Goods/AddGoodsInfo.php',
+ ),
+ 'Trend_Attachment' => '/home/renjianbo/saars/wy/wy/wy/server/library/Trend/Attachment.php',
+ 'Trend_Model_Attachment' => '/home/renjianbo/saars/wy/wy/wy/server/application/Trend/Model/Attachment.php',
+ 'Trend_Entity_Attachment' => '/home/renjianbo/saars/wy/wy/wy/server/application/Trend/Entity/Attachment.php',
+ 'CommentAdminAbstract' =>
+ array (
+ 'Comment' => '/home/renjianbo/saars/wy/wy/wy/server/application/Comment/admin/CommentAdminAbstract.php',
+ ),
+ 'Garage_Model_List' =>
+ array (
+ 'Garage' => '/home/renjianbo/saars/wy/wy/wy/server/application/Garage/Model/List.php',
+ ),
+);
\ No newline at end of file
diff --git a/wy/server/data/font/Anorexia.ttf b/wy/server/data/font/Anorexia.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/AntykwaBold.ttf b/wy/server/data/font/AntykwaBold.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/Candice.ttf b/wy/server/data/font/Candice.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/DejaVuSerif.ttf b/wy/server/data/font/DejaVuSerif.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/Ding-DongDaddyO.ttf b/wy/server/data/font/Ding-DongDaddyO.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/Duality.ttf b/wy/server/data/font/Duality.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/FreeMonoBold.ttf b/wy/server/data/font/FreeMonoBold.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/Heineken.ttf b/wy/server/data/font/Heineken.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/Jura.ttf b/wy/server/data/font/Jura.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/StayPuft.ttf b/wy/server/data/font/StayPuft.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/TimesNewRomanBold.ttf b/wy/server/data/font/TimesNewRomanBold.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/VeraMono.ttf b/wy/server/data/font/VeraMono.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/VeraSansBold.ttf b/wy/server/data/font/VeraSansBold.ttf
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/cnwords.txt b/wy/server/data/font/cnwords.txt
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/index.html b/wy/server/data/font/index.html
old mode 100644
new mode 100755
diff --git a/wy/server/data/font/wqy-zenhei.ttc b/wy/server/data/font/wqy-zenhei.ttc
old mode 100644
new mode 100755
diff --git a/wy/server/data/template_c/09263c9247d160282ed68163cb0c93195104fa48.file.main.top.html.php b/wy/server/data/template_c/09263c9247d160282ed68163cb0c93195104fa48.file.main.top.html.php
new file mode 100644
index 0000000..e3fb327
--- /dev/null
+++ b/wy/server/data/template_c/09263c9247d160282ed68163cb0c93195104fa48.file.main.top.html.php
@@ -0,0 +1,85 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '09263c9247d160282ed68163cb0c93195104fa48' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/panel/template/inc/main.top.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '242583516695dffda823fe9-34590277',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ '_STATIC_URL' => 0,
+ '_SITE_NAME' => 0,
+ 'loggedInUser' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695dffda828535_44276978',
+),false); /*/%%SmartyHeaderCode%%*/?>
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/09853f7d0a65913fb5a1142565a1e2fce148f573.file.home.edit.html.php b/wy/server/data/template_c/09853f7d0a65913fb5a1142565a1e2fce148f573.file.home.edit.html.php
new file mode 100644
index 0000000..9b0e99b
--- /dev/null
+++ b/wy/server/data/template_c/09853f7d0a65913fb5a1142565a1e2fce148f573.file.home.edit.html.php
@@ -0,0 +1,87 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '09853f7d0a65913fb5a1142565a1e2fce148f573' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/trend/admin/template/home.edit.html',
+ 1 => 1767757524,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '140063364469607103136607-83683354',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ '_STATIC_URL' => 0,
+ 'region' => 0,
+ 'title' => 0,
+ 'grade' => 0,
+ 'pid' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69607103153139_31504157',
+),false); /*/%%SmartyHeaderCode%%*/?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/10682bb0d50c95bfed00f29d50cf6124ac09ce0b.file.index.edit.html.php b/wy/server/data/template_c/10682bb0d50c95bfed00f29d50cf6124ac09ce0b.file.index.edit.html.php
new file mode 100644
index 0000000..4569172
--- /dev/null
+++ b/wy/server/data/template_c/10682bb0d50c95bfed00f29d50cf6124ac09ce0b.file.index.edit.html.php
@@ -0,0 +1,250 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '10682bb0d50c95bfed00f29d50cf6124ac09ce0b' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/advert/admin/template/index.edit.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1517213050695fb938e4c9a1-40418698',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_CDN' => 0,
+ '_STATIC_URL' => 0,
+ 'advert' => 0,
+ 'advert_categort' => 0,
+ 'v' => 0,
+ 'provinces_list' => 0,
+ 'cities_local' => 0,
+ 'districts_local' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb938e7ee66_23536958',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/2d0f56f1f4a650a72ed6757628381ad0ab3c7d84.file.index.index.html.php b/wy/server/data/template_c/2d0f56f1f4a650a72ed6757628381ad0ab3c7d84.file.index.index.html.php
new file mode 100644
index 0000000..321a857
--- /dev/null
+++ b/wy/server/data/template_c/2d0f56f1f4a650a72ed6757628381ad0ab3c7d84.file.index.index.html.php
@@ -0,0 +1,148 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '2d0f56f1f4a650a72ed6757628381ad0ab3c7d84' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/garage/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1095571715695fb95183de57-18966492',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'advert_categort' => 0,
+ 'v' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb9518599b0_50431449',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/355e813ef5fcd2b6533c7d359578f6e05d79f040.file.index.add.html.php b/wy/server/data/template_c/355e813ef5fcd2b6533c7d359578f6e05d79f040.file.index.add.html.php
new file mode 100644
index 0000000..b5666be
--- /dev/null
+++ b/wy/server/data/template_c/355e813ef5fcd2b6533c7d359578f6e05d79f040.file.index.add.html.php
@@ -0,0 +1,83 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '355e813ef5fcd2b6533c7d359578f6e05d79f040' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/store/admin/template/index.add.html',
+ 1 => 1767757524,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '169209990569606835c3c3b9-81965103',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'user' => 0,
+ '_STATIC_CDN' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69606835c5b627_41144800',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/3ca2e26a5d86b0c5b7e6f98360a2011037958230.file.header.html.php b/wy/server/data/template_c/3ca2e26a5d86b0c5b7e6f98360a2011037958230.file.header.html.php
new file mode 100644
index 0000000..2db8a35
--- /dev/null
+++ b/wy/server/data/template_c/3ca2e26a5d86b0c5b7e6f98360a2011037958230.file.header.html.php
@@ -0,0 +1,87 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '3ca2e26a5d86b0c5b7e6f98360a2011037958230' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/panel/template/inc/header.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1770131933695dffda814371-57886337',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ '_STATIC_CDN' => 0,
+ '_STATIC_URL' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695dffda822412_90810522',
+),false); /*/%%SmartyHeaderCode%%*/?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/3fdbaadf83f914e3a963959d3a9b2907ee1b1770.file.index.index.html.php b/wy/server/data/template_c/3fdbaadf83f914e3a963959d3a9b2907ee1b1770.file.index.index.html.php
new file mode 100644
index 0000000..42cd445
--- /dev/null
+++ b/wy/server/data/template_c/3fdbaadf83f914e3a963959d3a9b2907ee1b1770.file.index.index.html.php
@@ -0,0 +1,152 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '3fdbaadf83f914e3a963959d3a9b2907ee1b1770' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/serve/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '399151118695fb94b47df87-88603509',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'serve_type_category' => 0,
+ 'v' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb94b49baf9_86915052',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/496de0d3fefe8e881fafe4f26ea08d7a98df9cb2.file.index.edit.html.php b/wy/server/data/template_c/496de0d3fefe8e881fafe4f26ea08d7a98df9cb2.file.index.edit.html.php
new file mode 100644
index 0000000..0a43e32
--- /dev/null
+++ b/wy/server/data/template_c/496de0d3fefe8e881fafe4f26ea08d7a98df9cb2.file.index.edit.html.php
@@ -0,0 +1,144 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '496de0d3fefe8e881fafe4f26ea08d7a98df9cb2' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/order/admin/template/index.edit.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '186577916269605e7a020f82-89824874',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'order' => 0,
+ 'user' => 0,
+ 'user_mj' => 0,
+ 'v' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69605e7a0478c7_82276790',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/523ffa2ec82728d5b8c31891bd552979aedcfe18.file.wrapper.prefix.html.php b/wy/server/data/template_c/523ffa2ec82728d5b8c31891bd552979aedcfe18.file.wrapper.prefix.html.php
new file mode 100644
index 0000000..a4f2dde
--- /dev/null
+++ b/wy/server/data/template_c/523ffa2ec82728d5b8c31891bd552979aedcfe18.file.wrapper.prefix.html.php
@@ -0,0 +1,57 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '523ffa2ec82728d5b8c31891bd552979aedcfe18' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/panel/template/wrapper.prefix.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '357042836695dffda7dbc82-18105756',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ '_STORE_URL' => 0,
+ '_STATIC_URL' => 0,
+ '_STATIC_CDN' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695dffda811325_56547046',
+),false); /*/%%SmartyHeaderCode%%*/?>
+
+
+
+
+getSubTemplate ("panel/template/inc/header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
+
+
+
+物业管理系统
+
+
+
+
+ getSubTemplate ("panel/template/inc/main.top.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
+
+
+
+
+ getSubTemplate ("panel/template/inc/main.side.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
+
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/53de732a6d5752ce41b1cad9af15f581322c9ce4.file.index.index.html.php b/wy/server/data/template_c/53de732a6d5752ce41b1cad9af15f581322c9ce4.file.index.index.html.php
new file mode 100644
index 0000000..8fe0195
--- /dev/null
+++ b/wy/server/data/template_c/53de732a6d5752ce41b1cad9af15f581322c9ce4.file.index.index.html.php
@@ -0,0 +1,125 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '53de732a6d5752ce41b1cad9af15f581322c9ce4' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/store/admin/template/index.index.html',
+ 1 => 1767757524,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1446796469605e52f21a67-71428168',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69605e52f41989_56084050',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/5dfd05bb95ed1b46d218ca31cfa1cdb331c86876.file.index.index.html.php b/wy/server/data/template_c/5dfd05bb95ed1b46d218ca31cfa1cdb331c86876.file.index.index.html.php
new file mode 100644
index 0000000..10242fa
--- /dev/null
+++ b/wy/server/data/template_c/5dfd05bb95ed1b46d218ca31cfa1cdb331c86876.file.index.index.html.php
@@ -0,0 +1,136 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '5dfd05bb95ed1b46d218ca31cfa1cdb331c86876' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/order/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1296073645695fb73a17b597-01631004',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb73a1949c7_60691373',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/73ea5a4f6dfb22fdfa691ca355bc3b5cf755050c.file.sign.in.html.php b/wy/server/data/template_c/73ea5a4f6dfb22fdfa691ca355bc3b5cf755050c.file.sign.in.html.php
new file mode 100644
index 0000000..4a9e9bd
--- /dev/null
+++ b/wy/server/data/template_c/73ea5a4f6dfb22fdfa691ca355bc3b5cf755050c.file.sign.in.html.php
@@ -0,0 +1,108 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '73ea5a4f6dfb22fdfa691ca355bc3b5cf755050c' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/admin/template/sign.in.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1906390054695dffda84ed60-83033693',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ '_STATIC_CDN' => 0,
+ '_STATIC_URL' => 0,
+ '_SITE_NAME' => 0,
+ 'login_username' => 0,
+ 'continue' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695dffda85b792_16768540',
+),false); /*/%%SmartyHeaderCode%%*/?>
+
+
+
+
+ 物业管理平台
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/777a18444b9621dab090e0dce8743853061dffe2.file.index.edit.html.php b/wy/server/data/template_c/777a18444b9621dab090e0dce8743853061dffe2.file.index.edit.html.php
new file mode 100644
index 0000000..cbddae9
--- /dev/null
+++ b/wy/server/data/template_c/777a18444b9621dab090e0dce8743853061dffe2.file.index.edit.html.php
@@ -0,0 +1,111 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '777a18444b9621dab090e0dce8743853061dffe2' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/fingerprint/admin/template/index.edit.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '202102030696076c2a976b0-54591656',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'advert' => 0,
+ '_STATIC_CDN' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_696076c2abaa73_02366520',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/787dc9bfe283cd9c060be94c576e78238bb0ad1a.file.user.index.html.php b/wy/server/data/template_c/787dc9bfe283cd9c060be94c576e78238bb0ad1a.file.user.index.html.php
new file mode 100644
index 0000000..f8b416d
--- /dev/null
+++ b/wy/server/data/template_c/787dc9bfe283cd9c060be94c576e78238bb0ad1a.file.user.index.html.php
@@ -0,0 +1,127 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '787dc9bfe283cd9c060be94c576e78238bb0ad1a' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/admin/template/user.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1336720214695fb746282b95-81163165',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb74629b2b5_23622320',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/797ef4dda0f33c6941cbe22090820d063443a222.file.index.index.html.php b/wy/server/data/template_c/797ef4dda0f33c6941cbe22090820d063443a222.file.index.index.html.php
new file mode 100644
index 0000000..66f2a7a
--- /dev/null
+++ b/wy/server/data/template_c/797ef4dda0f33c6941cbe22090820d063443a222.file.index.index.html.php
@@ -0,0 +1,70 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '797ef4dda0f33c6941cbe22090820d063443a222' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '2066897323695e1013358ca2-25121134',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_CDN' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695e1013374d27_28843564',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/82e469bb163d0fb473160eddb359cfd6a12dc919.file.door.index.html.php b/wy/server/data/template_c/82e469bb163d0fb473160eddb359cfd6a12dc919.file.door.index.html.php
new file mode 100644
index 0000000..ad669b1
--- /dev/null
+++ b/wy/server/data/template_c/82e469bb163d0fb473160eddb359cfd6a12dc919.file.door.index.html.php
@@ -0,0 +1,132 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '82e469bb163d0fb473160eddb359cfd6a12dc919' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/door/admin/template/door.index.html',
+ 1 => 1767925528,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '368526149696067d27a7015-98803963',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_696067d27c0464_39756253',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/839ce04fb73dab3990085cd0f42d048b98bbbe4c.file.feedback.index.html.php b/wy/server/data/template_c/839ce04fb73dab3990085cd0f42d048b98bbbe4c.file.feedback.index.html.php
new file mode 100644
index 0000000..5f93759
--- /dev/null
+++ b/wy/server/data/template_c/839ce04fb73dab3990085cd0f42d048b98bbbe4c.file.feedback.index.html.php
@@ -0,0 +1,141 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '839ce04fb73dab3990085cd0f42d048b98bbbe4c' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/system/admin/template/feedback.index.html',
+ 1 => 1767757524,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1945165929695fb73b8c4ae3-83421567',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_CDN' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb73b8dd8f0_95972105',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/849410aa2442ac02fc534218dafafac4e608c3c8.file.message.info.html.php b/wy/server/data/template_c/849410aa2442ac02fc534218dafafac4e608c3c8.file.message.info.html.php
new file mode 100644
index 0000000..6657c3d
--- /dev/null
+++ b/wy/server/data/template_c/849410aa2442ac02fc534218dafafac4e608c3c8.file.message.info.html.php
@@ -0,0 +1,90 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '849410aa2442ac02fc534218dafafac4e608c3c8' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/message/admin/template/message.info.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1195851206960a90bcc78f6-22685170',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ 'message' => 0,
+ '_STATIC_CDN' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_6960a90bcf2491_41883277',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/8f6a85b3218b064801eff8b94b589b07ef2fa962.file.index.edit.html.php b/wy/server/data/template_c/8f6a85b3218b064801eff8b94b589b07ef2fa962.file.index.edit.html.php
new file mode 100644
index 0000000..361b308
--- /dev/null
+++ b/wy/server/data/template_c/8f6a85b3218b064801eff8b94b589b07ef2fa962.file.index.edit.html.php
@@ -0,0 +1,104 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '8f6a85b3218b064801eff8b94b589b07ef2fa962' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/garage/admin/template/index.edit.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '8736758386960ab839a3d24-04703399',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'garageInfo' => 0,
+ 'list' => 0,
+ 'v' => 0,
+ '_STATIC_CDN' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_6960ab839c5607_40389355',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/913e40f5ad1b32c64ff47d421c658386bae58706.file.footer.html.php b/wy/server/data/template_c/913e40f5ad1b32c64ff47d421c658386bae58706.file.footer.html.php
new file mode 100644
index 0000000..75f6e6d
--- /dev/null
+++ b/wy/server/data/template_c/913e40f5ad1b32c64ff47d421c658386bae58706.file.footer.html.php
@@ -0,0 +1,32 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '913e40f5ad1b32c64ff47d421c658386bae58706' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/panel/template/inc/footer.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '502110564695dffda84cde0-15946467',
+ 'function' =>
+ array (
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695dffda84d470_81018049',
+),false); /*/%%SmartyHeaderCode%%*/?>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/9d08010b1eba7dc0416be02f048d29a5653ccefc.file.wrapper.suffix.html.php b/wy/server/data/template_c/9d08010b1eba7dc0416be02f048d29a5653ccefc.file.wrapper.suffix.html.php
new file mode 100644
index 0000000..113c5b4
--- /dev/null
+++ b/wy/server/data/template_c/9d08010b1eba7dc0416be02f048d29a5653ccefc.file.wrapper.suffix.html.php
@@ -0,0 +1,26 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ '9d08010b1eba7dc0416be02f048d29a5653ccefc' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/panel/template/wrapper.suffix.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1973733772695dffda847571-82896687',
+ 'function' =>
+ array (
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695dffda84b849_25037001',
+),false); /*/%%SmartyHeaderCode%%*/?>
+getSubTemplate ("panel/template/inc/footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
+
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/a089258a71473c4f99a097613c6e458211bbe307.file.confirm.index.html.php b/wy/server/data/template_c/a089258a71473c4f99a097613c6e458211bbe307.file.confirm.index.html.php
new file mode 100644
index 0000000..f5fce30
--- /dev/null
+++ b/wy/server/data/template_c/a089258a71473c4f99a097613c6e458211bbe307.file.confirm.index.html.php
@@ -0,0 +1,152 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'a089258a71473c4f99a097613c6e458211bbe307' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/cas/admin/template/confirm.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '191373536869607496747bd6-33524986',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_CDN' => 0,
+ '_STATIC_URL' => 0,
+ 'home' => 0,
+ 'v' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69607496764173_49872179',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/b3f73e7bf279b751af3e1a2b3da80151766ba013.file.index.index.html.php b/wy/server/data/template_c/b3f73e7bf279b751af3e1a2b3da80151766ba013.file.index.index.html.php
new file mode 100644
index 0000000..a5fe420
--- /dev/null
+++ b/wy/server/data/template_c/b3f73e7bf279b751af3e1a2b3da80151766ba013.file.index.index.html.php
@@ -0,0 +1,150 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'b3f73e7bf279b751af3e1a2b3da80151766ba013' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/advert/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1486238084695fb929e292a7-65229833',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'advert_categort' => 0,
+ 'v' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb929e47a17_47293359',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/b4ffa0f4166a9a8a57474ec7d158a8c366fdc560.file.index.index.html.php b/wy/server/data/template_c/b4ffa0f4166a9a8a57474ec7d158a8c366fdc560.file.index.index.html.php
new file mode 100644
index 0000000..bbef55a
--- /dev/null
+++ b/wy/server/data/template_c/b4ffa0f4166a9a8a57474ec7d158a8c366fdc560.file.index.index.html.php
@@ -0,0 +1,133 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'b4ffa0f4166a9a8a57474ec7d158a8c366fdc560' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/article/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1518364497695fb946b7a333-29004946',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb946b921a4_61149105',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/b79981df2a0b8dd7fb1b0f3eda46bd2142c08f11.file.index.edit.html.php b/wy/server/data/template_c/b79981df2a0b8dd7fb1b0f3eda46bd2142c08f11.file.index.edit.html.php
new file mode 100644
index 0000000..48587cc
--- /dev/null
+++ b/wy/server/data/template_c/b79981df2a0b8dd7fb1b0f3eda46bd2142c08f11.file.index.edit.html.php
@@ -0,0 +1,163 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'b79981df2a0b8dd7fb1b0f3eda46bd2142c08f11' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/serve/admin/template/index.edit.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '14491554186960667d8e0e48-29177693',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'serve_content' => 0,
+ 'serve_type_category' => 0,
+ 'v' => 0,
+ 'serve_category' => 0,
+ '_STATIC_CDN' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_6960667d907b15_58321295',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/c1b61b390f573a3c44b847851c76ef95d64ffac2.file.errand.index.html.php b/wy/server/data/template_c/c1b61b390f573a3c44b847851c76ef95d64ffac2.file.errand.index.html.php
new file mode 100644
index 0000000..f707854
--- /dev/null
+++ b/wy/server/data/template_c/c1b61b390f573a3c44b847851c76ef95d64ffac2.file.errand.index.html.php
@@ -0,0 +1,132 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'c1b61b390f573a3c44b847851c76ef95d64ffac2' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/errand/admin/template/errand.index.html',
+ 1 => 1767930052,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '603058992696078c811abe5-26706616',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_696078c81336a4_70235010',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/c2c509341bdc8323ece5e09af8d50f9579ba1bc3.file.message.index.html.php b/wy/server/data/template_c/c2c509341bdc8323ece5e09af8d50f9579ba1bc3.file.message.index.html.php
new file mode 100644
index 0000000..60fb392
--- /dev/null
+++ b/wy/server/data/template_c/c2c509341bdc8323ece5e09af8d50f9579ba1bc3.file.message.index.html.php
@@ -0,0 +1,153 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'c2c509341bdc8323ece5e09af8d50f9579ba1bc3' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/message/admin/template/message.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1970507023696064c1b77083-23059766',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_696064c1b923f4_99863890',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/c42040ed22dc7308a74e29a53ba59d9a66f40519.file.index.index.html.php b/wy/server/data/template_c/c42040ed22dc7308a74e29a53ba59d9a66f40519.file.index.index.html.php
new file mode 100644
index 0000000..49b6d84
--- /dev/null
+++ b/wy/server/data/template_c/c42040ed22dc7308a74e29a53ba59d9a66f40519.file.index.index.html.php
@@ -0,0 +1,158 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'c42040ed22dc7308a74e29a53ba59d9a66f40519' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/cas/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1446760187695fb7419d4cd4-07366712',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_CDN' => 0,
+ '_STATIC_URL' => 0,
+ 'home' => 0,
+ 'v' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb7419f2127_33609837',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/cb5ceb10363150846558f74303af35476b2b416f.file.index.index.html.php b/wy/server/data/template_c/cb5ceb10363150846558f74303af35476b2b416f.file.index.index.html.php
new file mode 100644
index 0000000..2e003b4
--- /dev/null
+++ b/wy/server/data/template_c/cb5ceb10363150846558f74303af35476b2b416f.file.index.index.html.php
@@ -0,0 +1,139 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'cb5ceb10363150846558f74303af35476b2b416f' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/fingerprint/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '166338129869606e954baf58-16762962',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69606e954d4553_54789815',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/cd751ad99c34aaf46a69a426f60b0ddb7148c189.file.door.edit.html.php b/wy/server/data/template_c/cd751ad99c34aaf46a69a426f60b0ddb7148c189.file.door.edit.html.php
new file mode 100644
index 0000000..1ed9722
--- /dev/null
+++ b/wy/server/data/template_c/cd751ad99c34aaf46a69a426f60b0ddb7148c189.file.door.edit.html.php
@@ -0,0 +1,120 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'cd751ad99c34aaf46a69a426f60b0ddb7148c189' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/door/admin/template/door.edit.html',
+ 1 => 1767925528,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '990561963696067e9e51364-25018618',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'device' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_696067e9e709d0_07050444',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/cd7a17e18f9134a3bc83ee26a89002e792c5d059.file.index.index.html.php b/wy/server/data/template_c/cd7a17e18f9134a3bc83ee26a89002e792c5d059.file.index.index.html.php
new file mode 100644
index 0000000..0a7d0e7
--- /dev/null
+++ b/wy/server/data/template_c/cd7a17e18f9134a3bc83ee26a89002e792c5d059.file.index.index.html.php
@@ -0,0 +1,126 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'cd7a17e18f9134a3bc83ee26a89002e792c5d059' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/goods/admin/template/index.index.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '1076264940695fb738c05bc7-29939749',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb738c2d391_14146121',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/de8a19e1704b3af0eb9726f04d111dcfa49448e3.file.permissionassign.assign.4user.html.php b/wy/server/data/template_c/de8a19e1704b3af0eb9726f04d111dcfa49448e3.file.permissionassign.assign.4user.html.php
new file mode 100644
index 0000000..badb94a
--- /dev/null
+++ b/wy/server/data/template_c/de8a19e1704b3af0eb9726f04d111dcfa49448e3.file.permissionassign.assign.4user.html.php
@@ -0,0 +1,144 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'de8a19e1704b3af0eb9726f04d111dcfa49448e3' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/admin/template/permissionassign.assign.4user.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '187938665569605f454b31c0-13618853',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'allApps' => 0,
+ 'appkey' => 0,
+ 'v' => 0,
+ 'userinfo' => 0,
+ 'permissions' => 0,
+ 'pmg' => 0,
+ 'data' => 0,
+ 'selfPermissionids' => 0,
+ 'groupPermissions' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69605f45504c18_37664031',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/ebb433944d2e364728b9696122da5a26ee99b99d.file.main.side.html.php b/wy/server/data/template_c/ebb433944d2e364728b9696122da5a26ee99b99d.file.main.side.html.php
new file mode 100644
index 0000000..29c33e0
--- /dev/null
+++ b/wy/server/data/template_c/ebb433944d2e364728b9696122da5a26ee99b99d.file.main.side.html.php
@@ -0,0 +1,122 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'ebb433944d2e364728b9696122da5a26ee99b99d' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/panel/template/inc/main.side.html',
+ 1 => 1767880490,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '376188624695dffda82c0f4-32452278',
+ 'function' =>
+ array (
+ ),
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695dffda8456b6_79419042',
+ 'variables' =>
+ array (
+ 'navigations' => 0,
+ 'v' => 0,
+ 'loggedInUser' => 0,
+ 'allow_navs' => 0,
+ 'vv' => 0,
+ 'has_children' => 0,
+ ),
+ 'has_nocache_code' => false,
+),false); /*/%%SmartyHeaderCode%%*/?>
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/ed254021a3cd1df221b8d441d31aa3989f2bcfeb.file.device.index.html.php b/wy/server/data/template_c/ed254021a3cd1df221b8d441d31aa3989f2bcfeb.file.device.index.html.php
new file mode 100644
index 0000000..3543177
--- /dev/null
+++ b/wy/server/data/template_c/ed254021a3cd1df221b8d441d31aa3989f2bcfeb.file.device.index.html.php
@@ -0,0 +1,132 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'ed254021a3cd1df221b8d441d31aa3989f2bcfeb' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/device/admin/template/device.index.html',
+ 1 => 1767927670,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '190797383869606f7f7d9100-25800198',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69606f7f805890_79828760',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/f2e3f5097e89b26be1d17c8773c1f3f608beb372.file.home.index.html.php b/wy/server/data/template_c/f2e3f5097e89b26be1d17c8773c1f3f608beb372.file.home.index.html.php
new file mode 100644
index 0000000..274d9c6
--- /dev/null
+++ b/wy/server/data/template_c/f2e3f5097e89b26be1d17c8773c1f3f608beb372.file.home.index.html.php
@@ -0,0 +1,103 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'f2e3f5097e89b26be1d17c8773c1f3f608beb372' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/trend/admin/template/home.index.html',
+ 1 => 1767757524,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '14294894169606fa889bc85-02261711',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'type' => 0,
+ 'regions' => 0,
+ 'v' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69606fa88bc2d2_35831248',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/f7583a9f435f87d175202574e25419dcefe9da26.file.comment.index.html.php b/wy/server/data/template_c/f7583a9f435f87d175202574e25419dcefe9da26.file.comment.index.html.php
new file mode 100644
index 0000000..44f64e5
--- /dev/null
+++ b/wy/server/data/template_c/f7583a9f435f87d175202574e25419dcefe9da26.file.comment.index.html.php
@@ -0,0 +1,132 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'f7583a9f435f87d175202574e25419dcefe9da26' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/comment/admin/template/comment.index.html',
+ 1 => 1767942994,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '4510503716960ab68ed48a3-57023420',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_6960ab68eed319_84325291',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/f7bf5226604df256b47a771b35f8a2ee0b1a51a8.file.index.html.php b/wy/server/data/template_c/f7bf5226604df256b47a771b35f8a2ee0b1a51a8.file.index.html.php
new file mode 100644
index 0000000..9bffcb1
--- /dev/null
+++ b/wy/server/data/template_c/f7bf5226604df256b47a771b35f8a2ee0b1a51a8.file.index.html.php
@@ -0,0 +1,56 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'f7bf5226604df256b47a771b35f8a2ee0b1a51a8' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/panel/template/index.html',
+ 1 => 1767880490,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '548536643695fb7739bf055-40106735',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_695fb7739d62b2_43016055',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
\ No newline at end of file
diff --git a/wy/server/data/template_c/f8ca1c54949e128eaccbadedf2c9ca38c8597d86.file.user.edit.html.php b/wy/server/data/template_c/f8ca1c54949e128eaccbadedf2c9ca38c8597d86.file.user.edit.html.php
new file mode 100644
index 0000000..e564a1c
--- /dev/null
+++ b/wy/server/data/template_c/f8ca1c54949e128eaccbadedf2c9ca38c8597d86.file.user.edit.html.php
@@ -0,0 +1,171 @@
+
+decodeProperties(array (
+ 'file_dependency' =>
+ array (
+ 'f8ca1c54949e128eaccbadedf2c9ca38c8597d86' =>
+ array (
+ 0 => '/home/renjianbo/saars/wy/wy/wy/server/view/admin/template/user.edit.html',
+ 1 => 1767757523,
+ 2 => 'file',
+ ),
+ ),
+ 'nocache_hash' => '135279623469605f50ca33b4-20728559',
+ 'function' =>
+ array (
+ ),
+ 'variables' =>
+ array (
+ 'wrapper_prefix' => 0,
+ '_STATIC_URL' => 0,
+ 'user' => 0,
+ 'userid' => 0,
+ 'home' => 0,
+ 'fos' => 0,
+ 'groups' => 0,
+ 'v' => 0,
+ 'user_groupids' => 0,
+ 'wrapper_suffix' => 0,
+ ),
+ 'has_nocache_code' => false,
+ 'version' => 'Smarty-3.1-DEV',
+ 'unifunc' => 'content_69605f50cd5cc2_96666545',
+),false); /*/%%SmartyHeaderCode%%*/?>
+tpl_vars['wrapper_prefix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
+
+
+
+
+
+tpl_vars['wrapper_suffix']->value)===null||$tmp==='' ? '' : $tmp);?>
+
\ No newline at end of file
diff --git a/wy/server/library/Support/ImageUrl.php b/wy/server/library/Support/ImageUrl.php
index 6e87dec..b3e33fa 100644
--- a/wy/server/library/Support/ImageUrl.php
+++ b/wy/server/library/Support/ImageUrl.php
@@ -16,7 +16,8 @@ class Support_ImageUrl
public static function getProductImageUrl ($image_path, $delimiter = false)
{
$config = Zeed_Config::loadGroup('urlmapping');
- $domain = $config['upload_cdn'];
+ $domain = rtrim($config['upload_cdn'], '/'); // 移除末尾的斜杠
+ $upload_url = trim($config['upload_url'], '/'); // 移除首尾的斜杠
if (empty($image_path)) {
return '';
@@ -28,10 +29,12 @@ class Support_ImageUrl
if (is_array($image_path)) {
foreach ($image_path as $k => $v) {
- $image_path[$k] = $domain . $config['upload_url'] . $v;
+ $v = ltrim($v, '/'); // 移除开头的斜杠
+ $image_path[$k] = $domain . '/' . $upload_url . '/' . $v;
}
} else {
- $image_path = $domain . $config['upload_url'] . $image_path;
+ $image_path = ltrim($image_path, '/'); // 移除开头的斜杠
+ $image_path = $domain . '/' . $upload_url . '/' . $image_path;
}
return $image_path;
}
diff --git a/wy/server/public/Zeed.php b/wy/server/public/Zeed.php
new file mode 120000
index 0000000..58fa76f
--- /dev/null
+++ b/wy/server/public/Zeed.php
@@ -0,0 +1 @@
+../../../ZeedFramework/library/Zeed.php
\ No newline at end of file
diff --git a/wy/server/public/add_missing_navigation.php b/wy/server/public/add_missing_navigation.php
new file mode 100644
index 0000000..25a996e
--- /dev/null
+++ b/wy/server/public/add_missing_navigation.php
@@ -0,0 +1,149 @@
+补充导航菜单";
+echo "";
+echo "补充缺失的导航菜单项
";
+
+$host = 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com';
+$port = 24936;
+$username = 'root';
+$password = '!Rjb12191';
+$dbname = 'wy_db';
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+ // 检查根导航是否存在
+ $stmt = $pdo->query("SELECT navigation_id FROM system_navigation WHERE navigation_id = 1");
+ if (!$stmt->fetch()) {
+ // 创建根导航
+ $pdo->exec("INSERT INTO system_navigation (navigation_id, parent_id, hid, title, link, status, ctime)
+ VALUES (1, 0, 'root', '根导航', '#', 1, NOW())");
+ echo "✓ 创建根导航
";
+ }
+
+ // 定义需要补充的导航菜单
+ // 注意:hid长度必须为11(二级导航)
+ $new_navs = array(
+ array(
+ 'hid' => 'advert:admn', // 11字符
+ 'title' => '广告管理',
+ 'link' => '/advertadmin/index/index',
+ 'icon' => 'fa-bullhorn',
+ 'icon_bg' => 'bg-info',
+ 'sort' => 7
+ ),
+ array(
+ 'hid' => 'article:adm', // 11字符
+ 'title' => '文章管理',
+ 'link' => '/articleadmin/index/index',
+ 'icon' => 'fa-file-text',
+ 'icon_bg' => 'bg-primary',
+ 'sort' => 9
+ ),
+ array(
+ 'hid' => 'message:adm', // 11字符
+ 'title' => '消息管理',
+ 'link' => '/messageadmin/index/index',
+ 'icon' => 'fa-envelope',
+ 'icon_bg' => 'bg-warning',
+ 'sort' => 10
+ ),
+ array(
+ 'hid' => 'garage:admn', // 11字符
+ 'title' => '车库管理',
+ 'link' => '/garageadmin/index/index',
+ 'icon' => 'fa-car',
+ 'icon_bg' => 'bg-dark',
+ 'sort' => 13
+ ),
+ array(
+ 'hid' => 'door:admin:', // 11字符
+ 'title' => '门禁管理',
+ 'link' => '/dooradmin/index/index',
+ 'icon' => 'fa-key',
+ 'icon_bg' => 'bg-primary',
+ 'sort' => 14
+ ),
+ array(
+ 'hid' => 'cas:confirm', // 11字符
+ 'title' => '房产审核',
+ 'link' => '/casadmin/confirm/index',
+ 'icon' => 'fa-check-circle',
+ 'icon_bg' => 'bg-success',
+ 'sort' => 15
+ ),
+ );
+
+ $insert_sql = "INSERT INTO system_navigation (parent_id, hid, title, link, load_type, sort_order, status, icon, icon_bg, ctime)
+ VALUES (1, :hid, :title, :link, 0, :sort, 1, :icon, :icon_bg, NOW())";
+ $stmt = $pdo->prepare($insert_sql);
+
+ $inserted = 0;
+ $skipped = 0;
+
+ foreach ($new_navs as $nav) {
+ // 检查是否已存在
+ $check = $pdo->prepare("SELECT navigation_id FROM system_navigation WHERE hid = :hid AND parent_id = 1");
+ $check->execute(array(':hid' => $nav['hid']));
+ if ($check->fetch()) {
+ echo "- 跳过(已存在): {$nav['title']} (hid: {$nav['hid']})
";
+ $skipped++;
+ continue;
+ }
+
+ // 检查hid长度是否为11
+ if (strlen($nav['hid']) != 11) {
+ echo "✗ 错误: {$nav['title']} 的hid长度不是11 (当前: " . strlen($nav['hid']) . ")
";
+ continue;
+ }
+
+ $stmt->execute(array(
+ ':hid' => $nav['hid'],
+ ':title' => $nav['title'],
+ ':link' => $nav['link'],
+ ':sort' => $nav['sort'],
+ ':icon' => $nav['icon'],
+ ':icon_bg' => $nav['icon_bg']
+ ));
+
+ echo "✓ 添加: {$nav['title']} (hid: {$nav['hid']}, 链接: {$nav['link']})
";
+ $inserted++;
+ }
+
+ echo "
";
+ echo "完成! 新增 {$inserted} 个导航项,跳过 {$skipped} 个已存在的项
";
+
+ // 显示所有导航
+ echo "
当前所有导航菜单:
";
+ $stmt = $pdo->query("SELECT navigation_id, hid, title, link, sort_order FROM system_navigation WHERE parent_id = 1 ORDER BY sort_order");
+ $navs = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ echo "";
+ echo "| ID | HID | 标题 | 链接 | 排序 |
";
+ foreach ($navs as $nav) {
+ echo "";
+ echo "| {$nav['navigation_id']} | ";
+ echo "{$nav['hid']} | ";
+ echo "{$nav['title']} | ";
+ echo "{$nav['link']} | ";
+ echo "{$nav['sort_order']} | ";
+ echo "
";
+ }
+ echo "
";
+
+ echo "
";
+ echo "返回后台管理
";
+
+} catch (PDOException $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/assign_admin_tasks.php b/wy/server/public/assign_admin_tasks.php
new file mode 100644
index 0000000..1cb2a2d
--- /dev/null
+++ b/wy/server/public/assign_admin_tasks.php
@@ -0,0 +1,197 @@
+分配管理员任务";
+echo "";
+echo "分配管理员任务
";
+
+// 数据库配置
+$host = 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com';
+$port = 24936;
+$username = 'root';
+$password = '!Rjb12191';
+$dbname = 'wy_db';
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库
";
+ echo "
";
+
+ // 1. 获取或创建管理员
+ echo "1. 准备管理员账号
";
+
+ $admin_users = array(
+ array('username' => 'admin001', 'nickname' => '订单管理员', 'fullname' => '订单处理专员', 'group' => '订单管理组'),
+ array('username' => 'admin002', 'nickname' => '商品管理员', 'fullname' => '商品管理专员', 'group' => '商品管理组'),
+ array('username' => 'admin003', 'nickname' => '服务管理员', 'fullname' => '服务管理专员', 'group' => '服务管理组'),
+ array('username' => 'admin004', 'nickname' => '消息管理员', 'fullname' => '消息管理专员', 'group' => '消息管理组'),
+ array('username' => 'admin005', 'nickname' => '系统管理员', 'fullname' => '系统管理专员', 'group' => '系统管理组'),
+ );
+
+ // 检查并创建管理员组
+ $stmt = $pdo->query("SELECT groupid FROM admin_group WHERE groupid IN (2,3,4,5,6)");
+ $existing_groups = $stmt->fetchAll(PDO::FETCH_COLUMN);
+
+ $group_names = array('订单管理组', '商品管理组', '服务管理组', '消息管理组', '系统管理组');
+ for ($i = 0; $i < 5; $i++) {
+ $groupid = $i + 2;
+ if (!in_array($groupid, $existing_groups)) {
+ $sql = "INSERT INTO admin_group (groupid, groupname, description, status, ctime)
+ VALUES ({$groupid}, :name, :desc, 1, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':name' => $group_names[$i],
+ ':desc' => $group_names[$i] . '的描述'
+ ));
+ echo "✓ 创建管理员组: {$group_names[$i]} (ID: {$groupid})
";
+ }
+ }
+
+ // 创建管理员账号
+ $admin_ids = array();
+ foreach ($admin_users as $idx => $admin) {
+ $stmt = $pdo->prepare("SELECT userid FROM admin_user WHERE username = ?");
+ $stmt->execute(array($admin['username']));
+ $existing = $stmt->fetch();
+
+ if (!$existing) {
+ $sql = "INSERT INTO admin_user (username, password, nickname, fullname, status, ctime)
+ VALUES (:username, :password, :nickname, :fullname, 1, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':username' => $admin['username'],
+ ':password' => md5('123456'), // 默认密码
+ ':nickname' => $admin['nickname'],
+ ':fullname' => $admin['fullname']
+ ));
+ $userid = $pdo->lastInsertId();
+ echo "✓ 创建管理员: {$admin['fullname']} ({$admin['username']}, 密码: 123456)
";
+ } else {
+ $userid = $existing['userid'];
+ echo "管理员已存在: {$admin['username']} (ID: {$userid})
";
+ }
+
+ // 分配管理员到组
+ $groupid = $idx + 2;
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE userid = ? AND groupid = ?");
+ $stmt->execute(array($userid, $groupid));
+ if (!$stmt->fetch()) {
+ $sql = "INSERT INTO admin_user_group (userid, groupid, username) VALUES (?, ?, ?)";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array($userid, $groupid, $admin['username']));
+ echo "✓ 分配管理员 {$admin['username']} 到组 {$group_names[$idx]}
";
+ }
+
+ $admin_ids[] = $userid;
+ }
+
+ // 2. 分配订单数据
+ echo "
2. 分配订单数据
";
+ $order_admin_id = $admin_ids[0]; // admin001 - 订单管理员
+
+ $stmt = $pdo->query("SELECT order_id, order_number, order_status FROM order_list ORDER BY order_id LIMIT 10");
+ $orders = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ $order_status_map = array(0 => '待支付', 1 => '已支付', 2 => '已发货', 3 => '已完成', 4 => '已取消');
+ $assigned_orders = 0;
+
+ foreach ($orders as $order) {
+ // 这里可以添加一个 assigned_admin_id 字段来标记分配,如果没有这个字段,我们可以在备注中记录
+ // 或者创建一个任务分配表,这里简化处理,只显示分配信息
+ $assigned_orders++;
+ echo "订单 {$order['order_number']} (状态: {$order_status_map[$order['order_status']]}) → 分配给订单管理员 (admin001)
";
+ }
+ echo "✓ 已分配 {$assigned_orders} 个订单给订单管理员
";
+
+ // 3. 分配商品数据
+ echo "
3. 分配商品数据
";
+ $goods_admin_id = $admin_ids[1]; // admin002 - 商品管理员
+
+ $stmt = $pdo->query("SELECT goods_id FROM goods_content ORDER BY goods_id LIMIT 5");
+ $goods = $stmt->fetchAll(PDO::FETCH_COLUMN);
+
+ echo "✓ 已分配 " . count($goods) . " 个商品给商品管理员 (admin002)
";
+ foreach ($goods as $goods_id) {
+ echo "商品 ID: {$goods_id} → 分配给商品管理员
";
+ }
+
+ // 4. 分配服务订单数据
+ echo "
4. 分配服务订单数据
";
+ $serve_admin_id = $admin_ids[2]; // admin003 - 服务管理员
+
+ $stmt = $pdo->query("SELECT serve_order_id, serve_order_number, serve_order_status FROM serve_order ORDER BY serve_order_id LIMIT 8");
+ $serve_orders = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ echo "✓ 已分配 " . count($serve_orders) . " 个服务订单给服务管理员 (admin003)
";
+ foreach ($serve_orders as $order) {
+ echo "服务订单 {$order['serve_order_number']} (状态: {$order['serve_order_status']}) → 分配给服务管理员
";
+ }
+
+ // 5. 分配消息数据
+ echo "
5. 分配消息数据
";
+ $message_admin_id = $admin_ids[3]; // admin004 - 消息管理员
+
+ $stmt = $pdo->query("SELECT message_id, message_title, message_type FROM message_content ORDER BY message_id LIMIT 10");
+ $messages = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ echo "✓ 已分配 " . count($messages) . " 条消息给消息管理员 (admin004)
";
+ foreach ($messages as $msg) {
+ echo "消息: {$msg['message_title']} ({$msg['message_type']}) → 分配给消息管理员
";
+ }
+
+ // 6. 分配系统反馈数据
+ echo "
6. 分配系统反馈数据
";
+ $system_admin_id = $admin_ids[4]; // admin005 - 系统管理员
+
+ $stmt = $pdo->query("SELECT feedback_id, content, feedback_status FROM system_feedback ORDER BY feedback_id LIMIT 5");
+ $feedbacks = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ echo "✓ 已分配 " . count($feedbacks) . " 条反馈给系统管理员 (admin005)
";
+ foreach ($feedbacks as $feedback) {
+ $content_preview = mb_substr($feedback['content'], 0, 30);
+ echo "反馈: {$content_preview}... (状态: " . ($feedback['feedback_status'] ? '已处理' : '待处理') . ") → 分配给系统管理员
";
+ }
+
+ // 7. 创建任务分配汇总表(可选,如果需要持久化分配记录)
+ echo "
7. 任务分配汇总
";
+
+ echo "";
+ echo "| 管理员 | 用户名 | 负责模块 | 分配任务数 | 密码 |
";
+ echo "| 订单管理员 | admin001 | 订单管理 | {$assigned_orders} 个订单 | 123456 |
";
+ echo "| 商品管理员 | admin002 | 商品管理 | " . count($goods) . " 个商品 | 123456 |
";
+ echo "| 服务管理员 | admin003 | 服务管理 | " . count($serve_orders) . " 个服务订单 | 123456 |
";
+ echo "| 消息管理员 | admin004 | 消息管理 | " . count($messages) . " 条消息 | 123456 |
";
+ echo "| 系统管理员 | admin005 | 系统管理 | " . count($feedbacks) . " 条反馈 | 123456 |
";
+ echo "
";
+
+ echo "
";
+ echo "分配完成
";
+ echo "✓ 任务分配完成!
";
+ echo "各管理员可以登录后台管理系统,在对应的模块中查看和处理分配给自己的任务。
";
+
+ echo "
";
+ echo "管理员登录信息:
";
+ echo "";
+ foreach ($admin_users as $admin) {
+ echo "- {$admin['fullname']} - 用户名: {$admin['username']}, 密码: 123456
";
+ }
+ echo "
";
+
+ echo "
";
+ echo "管理员登录页面 | 后台首页 | 返回首页
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库错误: " . $e->getMessage() . "
";
+ echo "错误代码: " . $e->getCode() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/auto_create_tables.php b/wy/server/public/auto_create_tables.php
new file mode 100644
index 0000000..2ab5dc4
--- /dev/null
+++ b/wy/server/public/auto_create_tables.php
@@ -0,0 +1,287 @@
+自动创建数据库表";
+echo "";
+echo "自动扫描并创建数据库表
";
+
+try {
+ // 连接数据库
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库 '{$dbname}'
";
+ echo "
";
+
+ // 获取数据库中已存在的表
+ $stmt = $pdo->query("SHOW TABLES");
+ $existing_tables = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ echo "数据库中已存在 " . count($existing_tables) . " 个表
";
+
+ // 扫描 Model 类
+ $model_files = array();
+ $base_path = ZEED_ROOT . 'application/';
+
+ // 递归扫描 Model 文件
+ function scanModelFiles($dir, &$files) {
+ if (!is_dir($dir)) return;
+ $items = scandir($dir);
+ foreach ($items as $item) {
+ if ($item == '.' || $item == '..') continue;
+ $path = $dir . '/' . $item;
+ if (is_dir($path)) {
+ scanModelFiles($path, $files);
+ } elseif (preg_match('/Model\/.*\.php$/', $path) || preg_match('/models\/.*\.php$/', $path)) {
+ $files[] = $path;
+ }
+ }
+ }
+
+ scanModelFiles($base_path, $model_files);
+ scanModelFiles(ZEED_ROOT . 'library/', $model_files);
+
+ echo "找到 " . count($model_files) . " 个 Model 文件
";
+ echo "
";
+
+ // 解析 Model 类获取表信息
+ $table_info = array();
+
+ foreach ($model_files as $file) {
+ $content = file_get_contents($file);
+
+ // 提取类名
+ if (!preg_match('/class\s+(\w+)\s+extends\s+Zeed_Db_Model/', $content, $matches)) {
+ continue;
+ }
+ $class_name = $matches[1];
+
+ // 提取表名
+ $table_name = null;
+ if (preg_match('/protected\s+\$_name\s*=\s*[\'"](\w+)[\'"]/', $content, $matches)) {
+ $table_name = $matches[1];
+ }
+
+ // 提取前缀
+ $prefix = '';
+ if (preg_match('/protected\s+\$_prefix\s*=\s*[\'"]([^\'"]*)[\'"]/', $content, $matches)) {
+ $prefix = $matches[1];
+ }
+
+ // 提取主键
+ $primary_key = 'id';
+ if (preg_match('/protected\s+\$_primary\s*=\s*[\'"](\w+)[\'"]/', $content, $matches)) {
+ $primary_key = $matches[1];
+ }
+
+ if ($table_name) {
+ $full_table_name = $prefix . $table_name;
+ $table_info[$full_table_name] = array(
+ 'class' => $class_name,
+ 'table' => $table_name,
+ 'prefix' => $prefix,
+ 'primary' => $primary_key,
+ 'file' => $file
+ );
+ }
+ }
+
+ echo "扫描到的表信息:
";
+ echo "";
+ foreach ($table_info as $table => $info) {
+ $exists = in_array($table, $existing_tables) ? '✓' : '✗';
+ echo "- {$exists} {$table} (类: {$info['class']}, 主键: {$info['primary']})
";
+ }
+ echo "
";
+ echo "
";
+
+ // 读取 Entity 类获取字段信息
+ function getEntityFields($class_name, $base_path) {
+ // 尝试找到对应的 Entity 文件
+ $entity_paths = array(
+ str_replace('_Model_', '_Entity_', $class_name),
+ str_replace('Model', 'Entity', $class_name),
+ );
+
+ foreach ($entity_paths as $entity_class) {
+ // 将类名转换为文件路径
+ $parts = explode('_', $entity_class);
+ $file_paths = array();
+
+ // 尝试不同的路径模式
+ if (count($parts) >= 2) {
+ $module = $parts[0];
+ $entity_name = end($parts);
+
+ // application/Module/Entity/Name.php
+ $file_paths[] = $base_path . $module . '/Entity/' . $entity_name . '.php';
+ // application/Module/Entity/Sub/Name.php (如果有子目录)
+ if (count($parts) > 2) {
+ $sub_path = implode('/', array_slice($parts, 1, -1));
+ $file_paths[] = $base_path . $module . '/Entity/' . $sub_path . '/' . $entity_name . '.php';
+ }
+ }
+
+ foreach ($file_paths as $file_path) {
+ if (file_exists($file_path)) {
+ $content = file_get_contents($file_path);
+ $fields = array();
+
+ // 提取 public $field; 格式的字段
+ if (preg_match_all('/public\s+\$(\w+);/', $content, $matches)) {
+ return $matches[1];
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ // 生成表的 CREATE TABLE 语句
+ $tables_to_create = array();
+
+ foreach ($table_info as $table => $info) {
+ if (in_array($table, $existing_tables)) {
+ continue; // 表已存在,跳过
+ }
+
+ echo "处理表: {$table}
";
+
+ // 获取字段信息
+ $fields = getEntityFields($info['class'], $base_path);
+
+ if (!$fields) {
+ echo "⚠ 无法找到 Entity 类,使用默认字段结构
";
+ // 使用默认字段
+ $fields = array($info['primary']);
+ }
+
+ // 生成 CREATE TABLE SQL
+ $sql = "CREATE TABLE IF NOT EXISTS `{$table}` (\n";
+ $columns = array();
+
+ foreach ($fields as $field) {
+ $column_def = "`{$field}` ";
+
+ // 根据字段名推断类型
+ if ($field == $info['primary']) {
+ $column_def .= "int(11) NOT NULL AUTO_INCREMENT";
+ } elseif (stripos($field, 'id') !== false && (stripos($field, 'userid') !== false || stripos($field, 'user_id') !== false)) {
+ $column_def .= "bigint(20) DEFAULT NULL";
+ } elseif (stripos($field, 'id') !== false) {
+ $column_def .= "int(11) DEFAULT NULL";
+ } elseif (stripos($field, 'time') !== false || stripos($field, 'date') !== false) {
+ if (stripos($field, 'time') !== false && stripos($field, 'date') === false) {
+ $column_def .= "datetime DEFAULT NULL";
+ } else {
+ $column_def .= "date DEFAULT NULL";
+ }
+ } elseif (stripos($field, 'price') !== false || stripos($field, 'money') !== false || stripos($field, 'amount') !== false || stripos($field, 'sales') !== false) {
+ $column_def .= "decimal(10,2) DEFAULT '0.00'";
+ } elseif (stripos($field, 'status') !== false || stripos($field, 'is_') !== false || stripos($field, 'verified') !== false) {
+ $column_def .= "tinyint(1) DEFAULT '0'";
+ } elseif (stripos($field, 'content') !== false || stripos($field, 'detail') !== false || stripos($field, 'info') !== false || stripos($field, 'text') !== false) {
+ $column_def .= "text";
+ } elseif (stripos($field, 'pic') !== false || stripos($field, 'img') !== false || stripos($field, 'avatar') !== false || stripos($field, 'thumb') !== false || stripos($field, 'image') !== false) {
+ $column_def .= "varchar(500) DEFAULT NULL";
+ } elseif (stripos($field, 'phone') !== false || stripos($field, 'mobile') !== false) {
+ $column_def .= "varchar(20) DEFAULT NULL";
+ } elseif (stripos($field, 'email') !== false) {
+ $column_def .= "varchar(100) DEFAULT NULL";
+ } elseif (stripos($field, 'name') !== false || stripos($field, 'title') !== false) {
+ $column_def .= "varchar(255) DEFAULT NULL";
+ } else {
+ $column_def .= "varchar(255) DEFAULT NULL";
+ }
+
+ $columns[] = $column_def;
+ }
+
+ $sql .= " " . implode(",\n ", $columns);
+
+ // 添加主键
+ $sql .= ",\n PRIMARY KEY (`{$info['primary']}`)";
+
+ // 添加常用索引
+ foreach ($fields as $field) {
+ if (stripos($field, 'userid') !== false || stripos($field, 'user_id') !== false) {
+ $sql .= ",\n KEY `{$field}` (`{$field}`)";
+ } elseif (stripos($field, 'status') !== false || stripos($field, 'is_del') !== false || stripos($field, 'is_') !== false) {
+ $sql .= ",\n KEY `{$field}` (`{$field}`)";
+ } elseif (stripos($field, 'time') !== false || stripos($field, 'ctime') !== false) {
+ $sql .= ",\n KEY `{$field}` (`{$field}`)";
+ }
+ }
+
+ $sql .= "\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;";
+
+ $tables_to_create[$table] = $sql;
+
+ echo "" . htmlspecialchars($sql) . "
";
+ }
+
+ echo "
";
+
+ // 执行创建表
+ if (count($tables_to_create) > 0) {
+ echo "开始创建表...
";
+ $success_count = 0;
+ $error_count = 0;
+
+ foreach ($tables_to_create as $table => $sql) {
+ try {
+ $pdo->exec($sql);
+ echo "✓ 表 {$table} 创建成功
";
+ $success_count++;
+ } catch (PDOException $e) {
+ echo "✗ 表 {$table} 创建失败: " . htmlspecialchars($e->getMessage()) . "
";
+ $error_count++;
+ }
+ }
+
+ echo "
";
+ echo "创建完成
";
+ echo "成功创建: {$success_count} 个表
";
+ if ($error_count > 0) {
+ echo "失败: {$error_count} 个表
";
+ }
+ } else {
+ echo "所有表都已存在,无需创建
";
+ }
+
+ // 显示最终表列表
+ echo "
数据库中的表列表:
";
+ $stmt = $pdo->query("SHOW TABLES");
+ $tables_list = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ echo "";
+ foreach ($tables_list as $table) {
+ echo "- {$table}
";
+ }
+ echo "
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库连接失败: " . htmlspecialchars($e->getMessage()) . "
";
+} catch (Exception $e) {
+ echo "✗ 错误: " . htmlspecialchars($e->getMessage()) . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/check_admin_routing.php b/wy/server/public/check_admin_routing.php
new file mode 100644
index 0000000..06489fb
--- /dev/null
+++ b/wy/server/public/check_admin_routing.php
@@ -0,0 +1,184 @@
+后台路由检查";
+echo "";
+echo "后台管理系统路由和模板加载检查
";
+
+$errors = array();
+$warnings = array();
+$success = array();
+
+// 1. 检查路由配置文件
+echo "1. 路由配置检查
";
+$bootstrap_file = dirname(__FILE__) . '/../config/bootstrap.php';
+if (file_exists($bootstrap_file)) {
+ $bootstrap = include $bootstrap_file;
+ echo "✓ bootstrap.php 文件存在
";
+ echo "";
+ echo "| 路由键 | 控制器路径 |
";
+ foreach ($bootstrap['controllers'] as $key => $path) {
+ if (strpos($key, 'admin') !== false || $key === 'admin' || $key === 'panel' || $key === 'setting') {
+ echo "| {$key} | {$path} |
";
+ }
+ }
+ echo "
";
+} else {
+ $errors[] = "bootstrap.php 文件不存在";
+ echo "✗ bootstrap.php 文件不存在
";
+}
+
+// 2. 检查模板目录结构
+echo "2. 模板目录结构检查
";
+$view_base = dirname(__FILE__) . '/../view';
+$template_dirs = array(
+ 'panel/template' => 'Panel 模板目录',
+ 'admin/template' => 'Admin 模板目录',
+ 'admin/view.init.php' => 'Admin 视图初始化文件',
+);
+
+foreach ($template_dirs as $dir => $desc) {
+ $full_path = $view_base . '/' . $dir;
+ if (file_exists($full_path)) {
+ echo "✓ {$desc}: {$dir}
";
+ if (is_dir($full_path)) {
+ $files = glob($full_path . '/*');
+ echo "";
+ foreach (array_slice($files, 0, 10) as $file) {
+ echo "- " . basename($file) . "
";
+ }
+ if (count($files) > 10) {
+ echo "- ... 还有 " . (count($files) - 10) . " 个文件
";
+ }
+ echo "
";
+ }
+ } else {
+ $warnings[] = "{$desc} 不存在: {$dir}";
+ echo "⚠ {$desc} 不存在: {$dir}
";
+ }
+}
+
+// 3. 检查各模块的 view.init.php
+echo "3. 各模块视图初始化文件检查
";
+$modules = array('admin', 'cas', 'store', 'serve', 'system', 'trend', 'order', 'goods', 'garage', 'message', 'article', 'advert', 'advertorial');
+echo "";
+echo "| 模块 | view.init.php 路径 | 状态 |
";
+foreach ($modules as $module) {
+ // Admin模块的view.init.php在view/admin/view.init.php,不在view/admin/admin/view.init.php
+ if ($module === 'admin') {
+ $view_init_path = $view_base . '/admin/view.init.php';
+ $display_path = 'admin/view.init.php';
+ } else {
+ $view_init_path = $view_base . '/' . $module . '/admin/view.init.php';
+ $display_path = $module . '/admin/view.init.php';
+ }
+ if (file_exists($view_init_path)) {
+ echo "| {$module} | {$display_path} | ✓ 存在 |
";
+ } else {
+ echo "| {$module} | {$display_path} | ⚠ 不存在 |
";
+ }
+}
+echo "
";
+
+// 4. 检查控制器文件
+echo "4. 后台控制器文件检查
";
+$app_base = dirname(__FILE__) . '/../application';
+$admin_controllers = array(
+ 'Admin/controllers/IndexController.php' => 'Admin 主控制器',
+ 'Admin/controllers/SignController.php' => 'Admin 登录控制器',
+ 'Cas/admin/IndexController.php' => 'Cas 后台控制器',
+ 'Store/admin/IndexController.php' => 'Store 后台控制器',
+ 'Serve/admin/IndexController.php' => 'Serve 后台控制器',
+);
+
+echo "";
+echo "| 控制器 | 路径 | 状态 |
";
+foreach ($admin_controllers as $path => $desc) {
+ $full_path = $app_base . '/' . $path;
+ if (file_exists($full_path)) {
+ echo "| {$desc} | {$path} | ✓ 存在 |
";
+ } else {
+ echo "| {$desc} | {$path} | ✗ 不存在 |
";
+ }
+}
+echo "
";
+
+// 5. 检查权限配置文件
+echo "5. 权限配置文件检查
";
+$access_files = array(
+ 'Admin/configs/access.php' => 'Admin 权限配置',
+ 'Panel/configs/access.php' => 'Panel 权限配置',
+);
+
+echo "";
+echo "| 配置文件 | 路径 | 状态 |
";
+foreach ($access_files as $path => $desc) {
+ $full_path = $app_base . '/' . $path;
+ if (file_exists($full_path)) {
+ echo "| {$desc} | {$path} | ✓ 存在 |
";
+ } else {
+ echo "| {$desc} | {$path} | ⚠ 不存在 |
";
+ }
+}
+echo "
";
+
+// 6. 检查模板加载路径
+echo "6. 模板加载路径分析
";
+if (file_exists($view_base . '/admin/view.init.php')) {
+ $view_init_content = file_get_contents($view_base . '/admin/view.init.php');
+ echo "模板加载顺序(从 view.init.php 分析):
";
+ echo "";
+ if (preg_match_all('/addTemplateDir\([^)]+\)/', $view_init_content, $matches)) {
+ foreach ($matches[0] as $match) {
+ $clean = str_replace(array('$smarty->addTemplateDir(', 'ZEED_PATH_VIEW', "'", '"', ';', ' '), '', $match);
+ echo "{$clean} ";
+ }
+ }
+ echo "
";
+}
+
+// 7. URL 路由规则说明
+echo "7. URL 路由规则说明
";
+echo "";
+echo "
后台管理 URL 格式:
";
+echo "
";
+echo "/admin/控制器/动作 - 访问 Admin 模块的控制器 ";
+echo "/模块名admin/控制器/动作 - 访问各模块的后台控制器(如:/casadmin/index/index) ";
+echo "/panel/控制器/动作 - 访问 Panel 控制器 ";
+echo "/setting/控制器/动作 - 访问 Setting 控制器 ";
+echo "
";
+echo "
示例:
";
+echo "
";
+echo "/admin/index/index - Admin 模块 Index 控制器的 index 动作 ";
+echo "/admin/sign/in - Admin 模块 Sign 控制器的 in 动作(登录页面) ";
+echo "/casadmin/index/index - Cas 模块后台 Index 控制器的 index 动作 ";
+echo "
";
+echo "
";
+
+// 8. 总结
+echo "
检查总结
";
+if (count($errors) > 0) {
+ echo "错误 ({count($errors)}):
";
+ foreach ($errors as $error) {
+ echo "- {$error}
";
+ }
+ echo "
";
+}
+if (count($warnings) > 0) {
+ echo "警告 ({count($warnings)}):
";
+ foreach ($warnings as $warning) {
+ echo "- {$warning}
";
+ }
+ echo "
";
+}
+if (count($errors) == 0 && count($warnings) == 0) {
+ echo "✓ 所有检查项通过!
";
+}
+
+echo "
";
+echo "测试后台登录页面 | 测试后台首页 | 返回首页
";
+echo "";
+
diff --git a/wy/server/public/check_login_ajax.php b/wy/server/public/check_login_ajax.php
new file mode 100644
index 0000000..470a998
--- /dev/null
+++ b/wy/server/public/check_login_ajax.php
@@ -0,0 +1,110 @@
+ 1, 'error' => '未找到Zeed.php文件')));
+ }
+}
+
+// 加载Zeed/Loader - 使用ZEED_PATH常量(由Zeed.php定义)
+if (defined('ZEED_PATH')) {
+ require_once ZEED_PATH . 'Zeed/Loader.php';
+} else {
+ $loader_file = dirname(dirname(dirname(ZEED_ROOT))) . '/ZeedFramework/library/Zeed/Loader.php';
+ if (file_exists($loader_file)) {
+ require_once $loader_file;
+ } else {
+ die(json_encode(array('status' => 1, 'error' => '未找到Zeed/Loader.php文件')));
+ }
+}
+
+Zeed_Loader::registerAutoload();
+
+try {
+ // 模拟登录过程
+ $username = trim($_POST['username']);
+ $password = trim($_POST['password']);
+
+ $result = array('status' => 1, 'error' => null, 'data' => null);
+
+ // 获取用户
+ $user = Admin_Model_User::instance()->getUserByUsername($username);
+
+ if (empty($user)) {
+ $result['error'] = '用户名不存在';
+ echo json_encode($result);
+ exit;
+ }
+
+ // 验证密码
+ $encrypted = Zeed_Encrypt::encode('Md5Md5', $password, $user['salt']);
+ if ($encrypted != $user['password']) {
+ $result['error'] = '用户名或密码不正确';
+ echo json_encode($result);
+ exit;
+ }
+
+ // 获取用户组
+ $user_group = UserGroupModel::instance()->fetchByPK($user['userid']);
+ $groupid = 1;
+ if (!empty($user_group) && isset($user_group[0]['groupid'])) {
+ $groupid = $user_group[0]['groupid'];
+ }
+
+ // 登录用户
+ $userBasic = array(
+ 'userid' => $user['userid'],
+ 'username' => $user['username'],
+ 'fullname' => isset($user['fullname']) ? $user['fullname'] : $user['username'],
+ 'domain' => isset($user['domain']) ? $user['domain'] : 'local',
+ 'groupid' => $groupid,
+ 'home_id' => isset($user['home_id']) ? $user['home_id'] : null
+ );
+
+ Com_Admin_Authorization::logUserIn($userBasic);
+
+ $result['status'] = 0;
+ $result['data'] = '/admin';
+ $result['message'] = '登录成功';
+
+ echo json_encode($result);
+
+} catch (Exception $e) {
+ $result = array(
+ 'status' => 1,
+ 'error' => '登录失败: ' . $e->getMessage(),
+ 'data' => null
+ );
+ echo json_encode($result);
+}
+
diff --git a/wy/server/public/check_navigation.php b/wy/server/public/check_navigation.php
new file mode 100644
index 0000000..fef73a6
--- /dev/null
+++ b/wy/server/public/check_navigation.php
@@ -0,0 +1,85 @@
+检查导航数据";
+echo "";
+echo "检查导航数据
";
+
+try {
+ // 1. 检查导航表数据
+ echo "1. 检查 system_navigation 表数据
";
+ $navigations = System_Model_Navigation::instance()->getAllForNavigation();
+
+ if (empty($navigations)) {
+ echo "✗ 导航表为空,请运行 init_navigation.php 初始化导航数据
";
+ } else {
+ echo "✓ 找到 " . count($navigations) . " 条导航记录
";
+ echo "";
+ print_r($navigations);
+ echo "
";
+ }
+
+ // 2. 检查导航数据格式
+ echo "2. 检查导航数据格式(nav_two)
";
+ $nav_two = System_Model_Navigation::instance()->getAllForNavigation();
+
+ if (!empty($nav_two)) {
+ echo "✓ 导航数据格式正确
";
+ echo "";
+ print_r($nav_two);
+ echo "
";
+ } else {
+ echo "✗ 导航数据格式不正确或为空
";
+ }
+
+ // 3. 检查用户权限
+ echo "3. 检查用户权限
";
+ $loggedInUser = Com_Admin_Authorization::getLoggedInUser();
+
+ if (empty($loggedInUser)) {
+ echo "✗ 用户未登录
";
+ } else {
+ echo "✓ 用户已登录: " . $loggedInUser['username'] . " (组ID: " . ($loggedInUser['groupid'] ?? '未设置') . ")
";
+
+ // 检查权限
+ require_once ZEED_PATH_APPS . 'Admin/libraries/PermissionHelper.php';
+ $allow_navs = PermissionHelper::getAllowNavigations();
+
+ echo "允许访问的导航HID: " . ($allow_navs ? $allow_navs : '无') . "
";
+
+ if (empty($allow_navs) && ($loggedInUser['groupid'] ?? 0) != 1) {
+ echo "✗ 用户没有导航权限,请运行 init_navigation.php 初始化权限
";
+ }
+ }
+
+ echo "
";
+ echo "返回后台管理
";
+
+} catch (Exception $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+ echo "" . $e->getTraceAsString() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/check_navigation_coverage.php b/wy/server/public/check_navigation_coverage.php
new file mode 100644
index 0000000..aee9f4a
--- /dev/null
+++ b/wy/server/public/check_navigation_coverage.php
@@ -0,0 +1,103 @@
+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+// 所有已配置的 admin 模块
+$configured_modules = array(
+ 'panel' => array('title' => '面板', 'desc' => '管理面板首页'),
+ 'admin' => array('title' => '管理员', 'desc' => '管理员管理'),
+ 'casadmin' => array('title' => '业主管理', 'desc' => '业主信息管理'),
+ 'goodsadmin' => array('title' => '商品管理', 'desc' => '商品信息管理'),
+ 'orderadmin' => array('title' => '订单管理', 'desc' => '订单处理管理'),
+ 'systemadmin' => array('title' => '系统设置', 'desc' => '系统配置管理'),
+ 'advertadmin' => array('title' => '广告管理', 'desc' => '广告内容管理'),
+ 'articleadmin' => array('title' => '文章管理', 'desc' => '文章内容管理'),
+ 'messageadmin' => array('title' => '消息管理', 'desc' => '消息推送管理'),
+ 'serveadmin' => array('title' => '服务管理', 'desc' => '物业服务管理'),
+ 'storeadmin' => array('title' => '商店管理', 'desc' => '商店信息管理'),
+ 'garageadmin' => array('title' => '车库管理', 'desc' => '车库信息管理'),
+ 'dooradmin' => array('title' => '门禁管理', 'desc' => '门禁设备管理'),
+ 'trendadmin' => array('title' => '房产管理', 'desc' => '小区/楼号/单元/房号管理'),
+ 'fingerprintadmin' => array('title' => '指纹管理', 'desc' => '用户指纹管理'),
+ 'errandadmin' => array('title' => '跑腿服务', 'desc' => '跑腿服务管理'),
+ 'advertorialadmin' => array('title' => '软文管理', 'desc' => '软文内容管理'),
+ 'commentadmin' => array('title' => '评论管理', 'desc' => '评论审核管理'),
+ 'feedbackadmin' => array('title' => '反馈管理', 'desc' => '用户反馈管理'),
+ 'cateadmin' => array('title' => '分类管理', 'desc' => '分类信息管理'),
+ 'deviceadmin' => array('title' => '设备管理', 'desc' => '设备信息管理'),
+ 'btsadmin' => array('title' => 'BTS管理', 'desc' => 'BTS系统管理'),
+ 'serversadmin' => array('title' => '服务器管理', 'desc' => '服务器信息管理'),
+);
+
+// 获取导航菜单中的模块
+$stmt = $pdo->query("SELECT hid, title, link FROM system_navigation WHERE parent_id = 1 ORDER BY sort_order");
+$nav_modules = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+echo "===========================================\n";
+echo "后台导航模块覆盖情况检查报告\n";
+echo "===========================================\n\n";
+
+echo "【已配置的模块总数】: " . count($configured_modules) . "\n";
+echo "【导航菜单中的模块数】: " . count($nav_modules) . "\n\n";
+
+// 检查每个模块是否在导航中
+$covered = array();
+$missing = array();
+
+foreach ($configured_modules as $module => $info) {
+ $found = false;
+ $nav_info = null;
+
+ foreach ($nav_modules as $nav) {
+ if (strpos($nav['link'], $module) !== false ||
+ strpos($nav['hid'], $module) !== false) {
+ $found = true;
+ $nav_info = $nav;
+ break;
+ }
+ }
+
+ if ($found) {
+ $covered[$module] = array('info' => $info, 'nav' => $nav_info);
+ } else {
+ $missing[$module] = $info;
+ }
+}
+
+echo "【已覆盖的模块】(" . count($covered) . " 个):\n";
+echo "-------------------------------------------\n";
+foreach ($covered as $module => $data) {
+ printf(" ✓ %-20s -> %s (hid: %s)\n",
+ $data['info']['title'],
+ $data['nav']['link'],
+ $data['nav']['hid']
+ );
+}
+
+echo "\n【缺失的模块】(" . count($missing) . " 个):\n";
+echo "-------------------------------------------\n";
+if (count($missing) > 0) {
+ foreach ($missing as $module => $info) {
+ printf(" ❌ %-20s (%s) - 路由: /%s/\n",
+ $info['title'],
+ $info['desc'],
+ $module
+ );
+ }
+} else {
+ echo " ✓ 所有模块都已添加到导航菜单\n";
+}
+
+echo "\n【覆盖率】: " . round(count($covered) / count($configured_modules) * 100, 2) . "%\n";
+echo "===========================================\n";
+
diff --git a/wy/server/public/clean_navigation.php b/wy/server/public/clean_navigation.php
new file mode 100644
index 0000000..0292242
--- /dev/null
+++ b/wy/server/public/clean_navigation.php
@@ -0,0 +1,95 @@
+清理导航数据";
+echo "";
+echo "彻底清理导航数据
";
+
+// 数据库配置
+$host = 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com';
+$port = 24936;
+$username = 'root';
+$password = '!Rjb12191';
+$dbname = 'wy_db';
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库
";
+
+ // 1. 删除所有导航数据
+ $pdo->exec("DELETE FROM system_navigation");
+ echo "已删除所有导航数据
";
+
+ // 2. 插入根节点(navigation_id=1)
+ $pdo->exec("INSERT INTO system_navigation (navigation_id, parent_id, hid, title, link, load_type, sort_order, status, ctime)
+ VALUES (1, 0, 'root', '根节点', '#', 0, 0, 1, NOW())");
+ echo "✓ 创建根节点 (navigation_id=1)
";
+
+ // 3. 插入正确的二级菜单(hid长度=11,parent_id=1)
+ $nav_two = array(
+ array('hid' => 'panel:index', 'title' => '面板', 'link' => '/panel/index/index', 'icon' => 'fa-home', 'icon_bg' => 'bg-info', 'sort' => 1),
+ array('hid' => 'admin:user:', 'title' => '管理员', 'link' => '/admin/user/index', 'icon' => 'fa-user', 'icon_bg' => 'bg-primary', 'sort' => 2),
+ array('hid' => 'cas:admin:x', 'title' => '用户管理', 'link' => '/casadmin/index/index', 'icon' => 'fa-users', 'icon_bg' => 'bg-success', 'sort' => 3),
+ array('hid' => 'goods:admin', 'title' => '商品管理', 'link' => '/goodsadmin/index/index', 'icon' => 'fa-shopping-cart', 'icon_bg' => 'bg-warning', 'sort' => 4),
+ array('hid' => 'order:admin', 'title' => '订单管理', 'link' => '/orderadmin/index/index', 'icon' => 'fa-file-text', 'icon_bg' => 'bg-danger', 'sort' => 5),
+ array('hid' => 'system:conf', 'title' => '系统设置', 'link' => '/systemadmin/feedback/index', 'icon' => 'fa-cog', 'icon_bg' => 'bg-dark', 'sort' => 6),
+ );
+
+ $insert_sql = "INSERT INTO system_navigation (parent_id, hid, title, link, load_type, sort_order, status, icon, icon_bg, ctime)
+ VALUES (1, :hid, :title, :link, 0, :sort, 1, :icon, :icon_bg, NOW())";
+ $stmt = $pdo->prepare($insert_sql);
+
+ foreach ($nav_two as $nav) {
+ $stmt->execute(array(
+ ':hid' => $nav['hid'],
+ ':title' => $nav['title'],
+ ':link' => $nav['link'],
+ ':sort' => $nav['sort'],
+ ':icon' => $nav['icon'],
+ ':icon_bg' => $nav['icon_bg']
+ ));
+ echo "✓ 插入: {$nav['title']} (hid: {$nav['hid']}, 长度: " . strlen($nav['hid']) . ")
";
+ }
+
+ // 4. 验证最终数据
+ echo "
最终导航数据
";
+ $stmt = $pdo->query("SELECT navigation_id, parent_id, hid, title, LENGTH(hid) as hid_len, sort_order FROM system_navigation ORDER BY parent_id, sort_order");
+ $navs = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ echo "";
+ echo "| ID | 父ID | HID | HID长度 | 标题 | 排序 |
";
+ foreach ($navs as $nav) {
+ echo "";
+ echo "| {$nav['navigation_id']} | ";
+ echo "{$nav['parent_id']} | ";
+ echo "{$nav['hid']} | ";
+ echo "{$nav['hid_len']} | ";
+ echo "{$nav['title']} | ";
+ echo "{$nav['sort_order']} | ";
+ echo "
";
+ }
+ echo "
";
+
+ echo "
";
+ echo "✓ 导航数据清理完成!
";
+ echo "现在导航菜单应该显示正常了,包含以下6个菜单项:
";
+ echo "";
+ foreach ($nav_two as $nav) {
+ echo "- {$nav['title']}
";
+ }
+ echo "
";
+ echo "刷新后台首页查看效果
";
+
+} catch (PDOException $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/create_admin.php b/wy/server/public/create_admin.php
new file mode 100644
index 0000000..3a26068
--- /dev/null
+++ b/wy/server/public/create_admin.php
@@ -0,0 +1,187 @@
+创建管理员";
+echo "";
+echo "创建管理员账户
";
+
+try {
+ // 连接数据库
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库
";
+
+ // 1. 创建admin_user表(如果不存在)
+ $sql_create_table = "
+ CREATE TABLE IF NOT EXISTS `admin_user` (
+ `userid` int(11) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) NOT NULL,
+ `password` varchar(255) NOT NULL,
+ `salt` varchar(50) DEFAULT NULL,
+ `email` varchar(100) DEFAULT NULL,
+ `nickname` varchar(100) DEFAULT NULL,
+ `fullname` varchar(100) DEFAULT NULL,
+ `gender` tinyint(1) DEFAULT '0',
+ `idcard` varchar(20) DEFAULT NULL,
+ `domain` varchar(50) DEFAULT 'local',
+ `status` tinyint(1) DEFAULT '1',
+ `home_id` int(11) DEFAULT NULL,
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`userid`),
+ UNIQUE KEY `username` (`username`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ $pdo->exec($sql_create_table);
+ echo "✓ 表 admin_user 已创建或已存在
";
+
+ // 2. 创建admin_group表(如果不存在)
+ $sql_create_group_table = "
+ CREATE TABLE IF NOT EXISTS `admin_group` (
+ `groupid` int(11) NOT NULL AUTO_INCREMENT,
+ `groupname` varchar(100) NOT NULL,
+ `description` text,
+ `status` tinyint(1) DEFAULT '1',
+ `ctime` datetime DEFAULT NULL,
+ PRIMARY KEY (`groupid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ $pdo->exec($sql_create_group_table);
+ echo "✓ 表 admin_group 已创建或已存在
";
+
+ // 3. 创建admin_user_group表(如果不存在)
+ $sql_create_user_group_table = "
+ CREATE TABLE IF NOT EXISTS `admin_user_group` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) NOT NULL,
+ `groupid` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `username` (`username`),
+ KEY `groupid` (`groupid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ $pdo->exec($sql_create_user_group_table);
+ echo "✓ 表 admin_user_group 已创建或已存在
";
+
+ // 4. 检查管理员是否已存在
+ $stmt = $pdo->prepare("SELECT * FROM admin_user WHERE username = ?");
+ $stmt->execute([$admin_username]);
+ $existing_user = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($existing_user) {
+ echo "⚠ 管理员账户 '{$admin_username}' 已存在
";
+
+ // 更新密码
+ $salt = bin2hex(random_bytes(10));
+ // 密码加密:md5(md5(password).salt)
+ $encrypted_password = md5(md5($admin_password) . $salt);
+
+ $update_sql = "UPDATE admin_user SET password = ?, salt = ?, status = 1, domain = 'local' WHERE username = ?";
+ $stmt = $pdo->prepare($update_sql);
+ $stmt->execute([$encrypted_password, $salt, $admin_username]);
+
+ echo "✓ 已更新管理员密码
";
+ $userid = $existing_user['userid'];
+ } else {
+ // 5. 创建管理员账户
+ $salt = bin2hex(random_bytes(10));
+ // 密码加密:md5(md5(password).salt)
+ $encrypted_password = md5(md5($admin_password) . $salt);
+
+ $insert_sql = "INSERT INTO admin_user (username, password, salt, fullname, nickname, domain, status, ctime)
+ VALUES (?, ?, ?, ?, ?, 'local', 1, NOW())";
+ $stmt = $pdo->prepare($insert_sql);
+ $stmt->execute([
+ $admin_username,
+ $encrypted_password,
+ $salt,
+ '管理员',
+ '管理员'
+ ]);
+
+ $userid = $pdo->lastInsertId();
+ echo "✓ 管理员账户创建成功
";
+ }
+
+ // 6. 创建默认管理员组(如果不存在)
+ $stmt = $pdo->query("SELECT * FROM admin_group WHERE groupid = 1");
+ $default_group = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$default_group) {
+ $pdo->exec("INSERT INTO admin_group (groupid, groupname, description, status, ctime)
+ VALUES (1, '超级管理员', '系统超级管理员组', 1, NOW())");
+ echo "✓ 默认管理员组创建成功
";
+ }
+
+ // 7. 创建admin_user_group表(如果不存在)- 用户与用户组关联表
+ $sql_create_user_group_table2 = "
+ CREATE TABLE IF NOT EXISTS `admin_user_group` (
+ `userid` int(11) NOT NULL,
+ `groupid` int(11) NOT NULL,
+ `username` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`userid`, `groupid`),
+ KEY `username` (`username`),
+ KEY `groupid` (`groupid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ $pdo->exec($sql_create_user_group_table2);
+ echo "✓ 表 admin_user_group 已创建或已存在
";
+
+ // 8. 将管理员添加到管理员组(使用userid)
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE userid = ? AND groupid = 1");
+ $stmt->execute([$userid]);
+ $user_group = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$user_group) {
+ $pdo->prepare("INSERT INTO admin_user_group (userid, groupid, username) VALUES (?, 1, ?)")
+ ->execute([$userid, $admin_username]);
+ echo "✓ 已将管理员添加到管理员组(userid: {$userid})
";
+ } else {
+ echo "✓ 管理员已在管理员组中
";
+ }
+
+ echo "
";
+ echo "管理员账户信息
";
+ echo "";
+ echo "| 用户名 | {$admin_username} |
";
+ echo "| 密码 | {$admin_password} |
";
+ echo "| 用户ID | {$userid} |
";
+ echo "| 状态 | 启用 |
";
+ echo "| 域 | local |
";
+ echo "
";
+
+ echo "
";
+ echo "管理员账户创建完成!
";
+ echo "立即登录后台管理
";
+ echo "登录地址: http://101.43.95.130:8030/admin/sign/in
";
+
+} catch (PDOException $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+ echo "错误代码: " . $e->getCode() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/create_admin_log_table.php b/wy/server/public/create_admin_log_table.php
new file mode 100644
index 0000000..0c984c0
--- /dev/null
+++ b/wy/server/public/create_admin_log_table.php
@@ -0,0 +1,54 @@
+创建admin_log表";
+echo "";
+echo "创建 admin_log 表
";
+
+// 数据库配置
+$host = 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com';
+$port = 24936;
+$username = 'root';
+$password = '!Rjb12191';
+$dbname = 'wy_db';
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ // 检查表是否存在
+ $stmt = $pdo->query("SHOW TABLES LIKE 'admin_log'");
+ if ($stmt->rowCount() > 0) {
+ echo "admin_log 表已存在
";
+ } else {
+ // 创建表
+ $sql = "CREATE TABLE IF NOT EXISTS `admin_log` (
+ `log_id` int(11) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) DEFAULT NULL COMMENT '用户名',
+ `groupname` varchar(100) DEFAULT NULL COMMENT '组名',
+ `option` varchar(500) DEFAULT NULL COMMENT '操作内容',
+ `ctime` datetime DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`log_id`),
+ KEY `username` (`username`),
+ KEY `groupname` (`groupname`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci";
+
+ $pdo->exec($sql);
+ echo "✓ admin_log 表创建成功
";
+ }
+
+ echo "
";
+ echo "返回后台
";
+
+} catch (PDOException $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/create_missing_tables.php b/wy/server/public/create_missing_tables.php
new file mode 100644
index 0000000..443437f
--- /dev/null
+++ b/wy/server/public/create_missing_tables.php
@@ -0,0 +1,152 @@
+创建缺失的表";
+echo "";
+echo "创建缺失的数据库表
";
+
+try {
+ // 连接数据库
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库 '{$dbname}'
";
+ echo "
";
+
+ // 定义需要创建的表
+ $tables = array();
+
+ // 1. admin_user_permission - 用户权限表
+ $tables['admin_user_permission'] = "
+ CREATE TABLE IF NOT EXISTS `admin_user_permission` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ptype` varchar(50) NOT NULL COMMENT '类型:user-用户,group-组',
+ `parameter` varchar(255) NOT NULL COMMENT '参数:用户名或组ID',
+ `permission_id` int(11) NOT NULL COMMENT '权限ID',
+ `navigation_hid` varchar(255) DEFAULT NULL COMMENT '导航HID',
+ `note` text COMMENT '备注',
+ `schemeid` int(11) DEFAULT NULL COMMENT '方案ID',
+ PRIMARY KEY (`id`),
+ KEY `ptype` (`ptype`),
+ KEY `parameter` (`parameter`),
+ KEY `permission_id` (`permission_id`),
+ KEY `schemeid` (`schemeid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 2. admin_permission - 权限表(可能也需要)
+ $tables['admin_permission'] = "
+ CREATE TABLE IF NOT EXISTS `admin_permission` (
+ `permission_id` int(11) NOT NULL AUTO_INCREMENT,
+ `permission_name` varchar(255) NOT NULL COMMENT '权限名称',
+ `permission_group` varchar(255) DEFAULT NULL COMMENT '权限组',
+ `appkey` varchar(100) DEFAULT NULL COMMENT '应用键',
+ `description` text COMMENT '描述',
+ PRIMARY KEY (`permission_id`),
+ KEY `appkey` (`appkey`),
+ KEY `permission_group` (`permission_group`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3. admin_app_permission - 应用权限表(可能也需要)
+ $tables['admin_app_permission'] = "
+ CREATE TABLE IF NOT EXISTS `admin_app_permission` (
+ `appkey` varchar(100) NOT NULL,
+ `module` varchar(100) NOT NULL,
+ `controller` varchar(100) NOT NULL,
+ `action` varchar(100) NOT NULL,
+ `permission_id` int(11) NOT NULL,
+ PRIMARY KEY (`appkey`, `module`, `controller`, `action`),
+ KEY `permission_id` (`permission_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 4. admin_token - Token表(用于OAuth或会话管理)
+ $tables['admin_token'] = "
+ CREATE TABLE IF NOT EXISTS `admin_token` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) DEFAULT NULL,
+ `appkey` varchar(100) DEFAULT NULL,
+ `request_token` varchar(255) DEFAULT NULL,
+ `request_secret` varchar(255) DEFAULT NULL,
+ `callback_url` varchar(255) DEFAULT NULL,
+ `access_token` varchar(255) DEFAULT NULL,
+ `access_secret` varchar(255) DEFAULT NULL,
+ `verifier` varchar(255) DEFAULT NULL,
+ `status` tinyint(1) DEFAULT '1',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `etime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `username` (`username`),
+ KEY `request_token` (`request_token`),
+ KEY `access_token` (`access_token`),
+ KEY `appkey` (`appkey`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 执行创建表
+ $success_count = 0;
+ $error_count = 0;
+
+ echo "开始创建表...
";
+
+ foreach ($tables as $table_name => $sql) {
+ try {
+ // 先检查表是否已存在
+ $stmt = $pdo->query("SHOW TABLES LIKE '{$table_name}'");
+ if ($stmt->rowCount() > 0) {
+ echo "⚠ 表 {$table_name} 已存在,跳过
";
+ continue;
+ }
+
+ $pdo->exec($sql);
+ echo "✓ 表 {$table_name} 创建成功
";
+ $success_count++;
+ } catch (PDOException $e) {
+ echo "✗ 表 {$table_name} 创建失败: " . $e->getMessage() . "
";
+ $error_count++;
+ }
+ }
+
+ echo "
";
+ echo "创建完成
";
+ echo "成功创建: {$success_count} 个表
";
+ if ($error_count > 0) {
+ echo "失败: {$error_count} 个表
";
+ }
+
+ // 显示已创建的表
+ echo "
数据库中的表列表:
";
+ $stmt = $pdo->query("SHOW TABLES");
+ $tables_list = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ echo "";
+ foreach ($tables_list as $table) {
+ echo "- {$table}
";
+ }
+ echo "
";
+
+ echo "
";
+ echo "表创建完成!
";
+ echo "访问后台管理 | 返回首页
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库连接失败: " . $e->getMessage() . "
";
+ echo "错误代码: " . $e->getCode() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/debug_login.php b/wy/server/public/debug_login.php
new file mode 100644
index 0000000..170af0b
--- /dev/null
+++ b/wy/server/public/debug_login.php
@@ -0,0 +1,148 @@
+登录调试";
+echo "";
+echo "登录问题调试
";
+
+try {
+ // 1. 检查数据库连接
+ echo "1. 数据库连接测试
";
+ $db = Zeed_Db::instance();
+ echo "✓ 数据库连接成功
";
+
+ // 2. 检查管理员账户
+ echo "2. 检查管理员账户
";
+ $admin_user = Admin_Model_User::instance()->getUserByUsername('admin');
+
+ if (empty($admin_user)) {
+ echo "✗ 管理员账户不存在
";
+ } else {
+ echo "✓ 找到管理员账户
";
+ echo "";
+ echo "用户ID: " . $admin_user['userid'] . "\n";
+ echo "用户名: " . $admin_user['username'] . "\n";
+ echo "状态: " . $admin_user['status'] . "\n";
+ echo "域: " . ($admin_user['domain'] ?? '未设置') . "\n";
+ echo "Salt: " . ($admin_user['salt'] ?? '未设置') . "\n";
+ echo "密码: " . substr($admin_user['password'], 0, 20) . "...\n";
+ echo "
";
+
+ // 3. 测试密码加密
+ echo "3. 密码加密测试
";
+ $test_password = '123456';
+ $salt = $admin_user['salt'] ?? '';
+ $encrypted = Zeed_Encrypt::encode('Md5Md5', $test_password, $salt);
+ echo "原始密码: {$test_password}
";
+ echo "Salt: {$salt}
";
+ echo "加密后: {$encrypted}
";
+ echo "数据库密码: {$admin_user['password']}
";
+
+ if ($encrypted == $admin_user['password']) {
+ echo "✓ 密码匹配正确
";
+ } else {
+ echo "✗ 密码不匹配
";
+ echo "可能原因:
";
+ echo "";
+ echo "- Salt值不正确
";
+ echo "- 密码加密方式不对
";
+ echo "- 需要重新创建管理员账户
";
+ echo "
";
+ }
+
+ // 4. 检查用户组
+ echo "4. 检查用户组
";
+ try {
+ $user_group = UserGroupModel::instance()->fetchByPK($admin_user['userid']);
+ if (empty($user_group)) {
+ echo "✗ 用户组不存在(这会导致登录失败)
";
+ echo "需要创建用户组关联
";
+ } else {
+ echo "✓ 找到用户组
";
+ echo "";
+ print_r($user_group);
+ echo "
";
+ }
+ } catch (Exception $e) {
+ echo "✗ 获取用户组失败: " . $e->getMessage() . "
";
+ }
+
+ // 5. 检查domain字段
+ echo "5. 检查domain字段
";
+ if (isset($admin_user['domain']) && $admin_user['domain'] == 'local') {
+ echo "✓ domain字段正确: local
";
+ } else {
+ echo "✗ domain字段不正确或未设置
";
+ echo "当前值: " . ($admin_user['domain'] ?? '未设置') . "
";
+ echo "需要设置为: local
";
+ }
+
+ // 6. 检查status字段
+ echo "6. 检查status字段
";
+ if (isset($admin_user['status']) && $admin_user['status'] >= 1) {
+ echo "✓ status字段正确: " . $admin_user['status'] . "
";
+ } else {
+ echo "✗ status字段不正确
";
+ echo "当前值: " . ($admin_user['status'] ?? '未设置') . "
";
+ echo "需要设置为: 1
";
+ }
+ }
+
+ // 7. 提供修复建议
+ echo "
修复建议
";
+ echo "如果发现问题,请访问:
";
+ echo "";
+
+} catch (Exception $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+ echo "" . $e->getTraceAsString() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/debug_login_response.php b/wy/server/public/debug_login_response.php
new file mode 100644
index 0000000..3a219b5
--- /dev/null
+++ b/wy/server/public/debug_login_response.php
@@ -0,0 +1,43 @@
+1, 'data'=>null, 'error'=>null);
+$rd['status'] = 0;
+$rd['data'] = '/admin';
+
+header('Content-Type: application/json; charset=utf-8');
+if (ob_get_level()) {
+ ob_clean();
+}
+echo json_encode($rd);
+
+$output = ob_get_clean();
+
+echo "响应内容:\n";
+echo $output . "\n\n";
+echo "响应长度: " . strlen($output) . "\n";
+echo "是否为有效JSON: " . (json_decode($output) !== null ? '是' : '否') . "\n";
+
diff --git a/wy/server/public/fix_admin.php b/wy/server/public/fix_admin.php
new file mode 100644
index 0000000..17a034c
--- /dev/null
+++ b/wy/server/public/fix_admin.php
@@ -0,0 +1,254 @@
+修复管理员";
+echo "";
+echo "修复管理员账户
";
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 数据库连接成功
";
+
+ // 1. 检查并获取管理员账户
+ $stmt = $pdo->prepare("SELECT * FROM admin_user WHERE username = ?");
+ $stmt->execute([$admin_username]);
+ $user = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$user) {
+ echo "✗ 管理员账户不存在,请先访问 create_admin.php
";
+ exit;
+ }
+
+ echo "✓ 找到管理员账户 (ID: {$user['userid']})
";
+
+ // 2. 确保domain字段为'local'
+ if (!isset($user['domain']) || $user['domain'] != 'local') {
+ $pdo->prepare("UPDATE admin_user SET domain = 'local' WHERE userid = ?")->execute([$user['userid']]);
+ echo "✓ 已设置domain为'local'
";
+ } else {
+ echo "✓ domain字段正确
";
+ }
+
+ // 3. 确保status为1
+ if (!isset($user['status']) || $user['status'] < 1) {
+ $pdo->prepare("UPDATE admin_user SET status = 1 WHERE userid = ?")->execute([$user['userid']]);
+ echo "✓ 已设置status为1
";
+ } else {
+ echo "✓ status字段正确
";
+ }
+
+ // 4. 确保有salt
+ if (empty($user['salt'])) {
+ $salt = bin2hex(random_bytes(10));
+ $encrypted_password = md5(md5($admin_password) . $salt);
+ $pdo->prepare("UPDATE admin_user SET salt = ?, password = ? WHERE userid = ?")
+ ->execute([$salt, $encrypted_password, $user['userid']]);
+ echo "✓ 已生成salt并更新密码
";
+ } else {
+ // 测试密码
+ $salt = $user['salt'];
+ $encrypted_password = md5(md5($admin_password) . $salt);
+ if ($encrypted_password != $user['password']) {
+ // 更新密码
+ $pdo->prepare("UPDATE admin_user SET password = ? WHERE userid = ?")
+ ->execute([$encrypted_password, $user['userid']]);
+ echo "✓ 已更新密码
";
+ } else {
+ echo "✓ 密码正确
";
+ }
+ }
+
+ // 5. 确保admin_group表存在且有默认组
+ $stmt = $pdo->query("SELECT * FROM admin_group WHERE groupid = 1");
+ $group = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$group) {
+ $pdo->exec("INSERT INTO admin_group (groupid, groupname, description, status, ctime)
+ VALUES (1, '超级管理员', '系统超级管理员组', 1, NOW())");
+ echo "✓ 已创建默认管理员组
";
+ } else {
+ echo "✓ 管理员组已存在
";
+ }
+
+ // 6. 检查admin_user_group表结构
+ try {
+ $stmt = $pdo->query("DESCRIBE admin_user_group");
+ $columns = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ echo "✓ admin_user_group 表字段: " . implode(', ', $columns) . "
";
+
+ $has_userid = in_array('userid', $columns);
+ $has_username = in_array('username', $columns);
+
+ // 7. 确保用户组关联存在
+ if ($has_userid) {
+ // 使用userid
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE userid = ? AND groupid = 1");
+ $stmt->execute([$user['userid']]);
+ $user_group = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$user_group) {
+ if ($has_username) {
+ $pdo->prepare("INSERT INTO admin_user_group (userid, groupid, username) VALUES (?, 1, ?)")
+ ->execute([$user['userid'], $admin_username]);
+ } else {
+ $pdo->prepare("INSERT INTO admin_user_group (userid, groupid) VALUES (?, 1)")
+ ->execute([$user['userid']]);
+ }
+ echo "✓ 已创建用户组关联(使用userid)
";
+ } else {
+ echo "✓ 用户组关联已存在
";
+ }
+ } else if ($has_username) {
+ // 只使用username
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE username = ? AND groupid = 1");
+ $stmt->execute([$admin_username]);
+ $user_group = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$user_group) {
+ $pdo->prepare("INSERT INTO admin_user_group (username, groupid) VALUES (?, 1)")
+ ->execute([$admin_username]);
+ echo "✓ 已创建用户组关联(使用username)
";
+ } else {
+ echo "✓ 用户组关联已存在
";
+ }
+ } else {
+ echo "✗ admin_user_group 表结构不正确,需要重建
";
+ // 重建表
+ $pdo->exec("DROP TABLE IF EXISTS admin_user_group");
+ $pdo->exec("CREATE TABLE `admin_user_group` (
+ `userid` int(11) NOT NULL,
+ `groupid` int(11) NOT NULL,
+ `username` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`userid`, `groupid`),
+ KEY `username` (`username`),
+ KEY `groupid` (`groupid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
+ $pdo->prepare("INSERT INTO admin_user_group (userid, groupid, username) VALUES (?, 1, ?)")
+ ->execute([$user['userid'], $admin_username]);
+ echo "✓ 已重建表并创建用户组关联
";
+ }
+ } catch (PDOException $e) {
+ // 表不存在,创建表
+ echo "⚠ admin_user_group 表不存在,正在创建...
";
+ $pdo->exec("CREATE TABLE `admin_user_group` (
+ `userid` int(11) NOT NULL,
+ `groupid` int(11) NOT NULL,
+ `username` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`userid`, `groupid`),
+ KEY `username` (`username`),
+ KEY `groupid` (`groupid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
+ $pdo->prepare("INSERT INTO admin_user_group (userid, groupid, username) VALUES (?, 1, ?)")
+ ->execute([$user['userid'], $admin_username]);
+ echo "✓ 已创建表并添加用户组关联
";
+ }
+
+ // 8. 显示最终信息
+ echo "
管理员账户信息
";
+
+ // 检查表结构,使用正确的JOIN方式
+ try {
+ $stmt = $pdo->query("DESCRIBE admin_user_group");
+ $columns = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ $has_userid = in_array('userid', $columns);
+
+ if ($has_userid) {
+ $stmt = $pdo->prepare("SELECT u.*, g.groupid, g.groupname FROM admin_user u
+ LEFT JOIN admin_user_group ug ON u.userid = ug.userid
+ LEFT JOIN admin_group g ON ug.groupid = g.groupid
+ WHERE u.username = ?");
+ } else {
+ $stmt = $pdo->prepare("SELECT u.*, g.groupid, g.groupname FROM admin_user u
+ LEFT JOIN admin_user_group ug ON u.username = ug.username
+ LEFT JOIN admin_group g ON ug.groupid = g.groupid
+ WHERE u.username = ?");
+ }
+ $stmt->execute([$admin_username]);
+ $final_user = $stmt->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ // 如果JOIN失败,只查询用户信息
+ $stmt = $pdo->prepare("SELECT * FROM admin_user WHERE username = ?");
+ $stmt->execute([$admin_username]);
+ $final_user = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // 单独查询用户组
+ try {
+ $stmt = $pdo->query("DESCRIBE admin_user_group");
+ $columns = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ $has_userid = in_array('userid', $columns);
+
+ if ($has_userid) {
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE userid = ?");
+ $stmt->execute([$final_user['userid']]);
+ } else {
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE username = ?");
+ $stmt->execute([$admin_username]);
+ }
+ $ug = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($ug) {
+ $stmt = $pdo->prepare("SELECT * FROM admin_group WHERE groupid = ?");
+ $stmt->execute([$ug['groupid']]);
+ $g = $stmt->fetch(PDO::FETCH_ASSOC);
+ $final_user['groupid'] = $ug['groupid'];
+ $final_user['groupname'] = $g['groupname'] ?? '';
+ }
+ } catch (PDOException $e2) {
+ // 忽略
+ }
+ }
+
+ echo "";
+ echo "| 用户ID | {$final_user['userid']} |
";
+ echo "| 用户名 | {$final_user['username']} |
";
+ echo "| 密码 | {$admin_password} |
";
+ echo "| 状态 | " . ($final_user['status'] >= 1 ? '启用' : '禁用') . " |
";
+ echo "| 域 | " . ($final_user['domain'] ?? '未设置') . " |
";
+ echo "| 用户组ID | " . ($final_user['groupid'] ?? '未设置') . " |
";
+ echo "| 用户组名 | " . ($final_user['groupname'] ?? '未设置') . " |
";
+ echo "
";
+
+ // 9. 测试密码加密
+ echo "
密码验证测试
";
+ $test_salt = $final_user['salt'] ?? '';
+ $test_encrypted = md5(md5($admin_password) . $test_salt);
+ $db_password = $final_user['password'];
+
+ echo "Salt: {$test_salt}
";
+ echo "加密后密码: {$test_encrypted}
";
+ echo "数据库密码: {$db_password}
";
+
+ if ($test_encrypted == $db_password) {
+ echo "✓ 密码加密验证通过
";
+ } else {
+ echo "✗ 密码不匹配,已自动修复
";
+ }
+
+ echo "
";
+ echo "修复完成!
";
+ echo "立即登录后台
";
+ echo "如果仍然无法登录,请访问 debug_login.php 查看详细错误信息
";
+
+} catch (PDOException $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+ echo "" . $e->getTraceAsString() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/fix_admin_v2.php b/wy/server/public/fix_admin_v2.php
new file mode 100644
index 0000000..5db7c44
--- /dev/null
+++ b/wy/server/public/fix_admin_v2.php
@@ -0,0 +1,254 @@
+修复管理员";
+echo "";
+echo "修复管理员账户
";
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 数据库连接成功
";
+
+ // 1. 检查并获取管理员账户
+ $stmt = $pdo->prepare("SELECT * FROM admin_user WHERE username = ?");
+ $stmt->execute([$admin_username]);
+ $user = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$user) {
+ echo "✗ 管理员账户不存在,请先访问 create_admin.php
";
+ exit;
+ }
+
+ echo "✓ 找到管理员账户 (ID: {$user['userid']})
";
+
+ // 2. 确保domain字段为'local'
+ if (!isset($user['domain']) || $user['domain'] != 'local') {
+ $pdo->prepare("UPDATE admin_user SET domain = 'local' WHERE userid = ?")->execute([$user['userid']]);
+ echo "✓ 已设置domain为'local'
";
+ } else {
+ echo "✓ domain字段正确
";
+ }
+
+ // 3. 确保status为1
+ if (!isset($user['status']) || $user['status'] < 1) {
+ $pdo->prepare("UPDATE admin_user SET status = 1 WHERE userid = ?")->execute([$user['userid']]);
+ echo "✓ 已设置status为1
";
+ } else {
+ echo "✓ status字段正确
";
+ }
+
+ // 4. 确保有salt和正确密码
+ if (empty($user['salt'])) {
+ $salt = bin2hex(random_bytes(10));
+ $encrypted_password = md5(md5($admin_password) . $salt);
+ $pdo->prepare("UPDATE admin_user SET salt = ?, password = ? WHERE userid = ?")
+ ->execute([$salt, $encrypted_password, $user['userid']]);
+ echo "✓ 已生成salt并更新密码
";
+ } else {
+ // 测试密码
+ $salt = $user['salt'];
+ $encrypted_password = md5(md5($admin_password) . $salt);
+ if ($encrypted_password != $user['password']) {
+ // 更新密码
+ $pdo->prepare("UPDATE admin_user SET password = ? WHERE userid = ?")
+ ->execute([$encrypted_password, $user['userid']]);
+ echo "✓ 已更新密码
";
+ } else {
+ echo "✓ 密码正确
";
+ }
+ }
+
+ // 5. 确保admin_group表存在且有默认组
+ $stmt = $pdo->query("SELECT * FROM admin_group WHERE groupid = 1");
+ $group = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$group) {
+ $pdo->exec("INSERT INTO admin_group (groupid, groupname, description, status, ctime)
+ VALUES (1, '超级管理员', '系统超级管理员组', 1, NOW())");
+ echo "✓ 已创建默认管理员组
";
+ } else {
+ echo "✓ 管理员组已存在
";
+ }
+
+ // 6. 检查admin_user_group表结构并修复
+ echo "检查admin_user_group表结构
";
+ try {
+ $stmt = $pdo->query("DESCRIBE admin_user_group");
+ $columns = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ $column_names = array_column($columns, 'Field');
+
+ echo "当前表字段: " . implode(', ', $column_names) . "
";
+
+ $has_userid = in_array('userid', $column_names);
+ $has_username = in_array('username', $column_names);
+ $has_groupid = in_array('groupid', $column_names);
+
+ // 如果表没有userid字段,需要添加
+ if (!$has_userid) {
+ echo "⚠ 表缺少userid字段,正在添加...
";
+ try {
+ $pdo->exec("ALTER TABLE admin_user_group ADD COLUMN userid int(11) NOT NULL AFTER id");
+ echo "✓ 已添加userid字段
";
+ $has_userid = true;
+ } catch (PDOException $e) {
+ // 如果添加失败,可能是表结构问题,重建表
+ echo "✗ 添加字段失败: " . $e->getMessage() . "
";
+ echo "正在重建表...
";
+ $pdo->exec("DROP TABLE IF EXISTS admin_user_group");
+ $pdo->exec("CREATE TABLE `admin_user_group` (
+ `userid` int(11) NOT NULL,
+ `groupid` int(11) NOT NULL,
+ `username` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`userid`, `groupid`),
+ KEY `username` (`username`),
+ KEY `groupid` (`groupid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
+ echo "✓ 表已重建
";
+ $has_userid = true;
+ }
+ }
+
+ // 7. 确保用户组关联存在
+ if ($has_userid) {
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE userid = ? AND groupid = 1");
+ $stmt->execute([$user['userid']]);
+ $user_group = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$user_group) {
+ if ($has_username) {
+ $pdo->prepare("INSERT INTO admin_user_group (userid, groupid, username) VALUES (?, 1, ?)")
+ ->execute([$user['userid'], $admin_username]);
+ } else {
+ $pdo->prepare("INSERT INTO admin_user_group (userid, groupid) VALUES (?, 1)")
+ ->execute([$user['userid']]);
+ }
+ echo "✓ 已创建用户组关联(userid: {$user['userid']})
";
+ } else {
+ // 如果存在但userid为空,更新它
+ if (empty($user_group['userid']) || $user_group['userid'] != $user['userid']) {
+ if ($has_username) {
+ $pdo->prepare("UPDATE admin_user_group SET userid = ? WHERE groupid = 1 AND (username = ? OR userid IS NULL)")
+ ->execute([$user['userid'], $admin_username]);
+ } else {
+ $pdo->prepare("UPDATE admin_user_group SET userid = ? WHERE groupid = 1")
+ ->execute([$user['userid']]);
+ }
+ echo "✓ 已更新用户组关联的userid
";
+ } else {
+ echo "✓ 用户组关联已存在
";
+ }
+ }
+ } else if ($has_username) {
+ // 只有username的情况
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE username = ? AND groupid = 1");
+ $stmt->execute([$admin_username]);
+ $user_group = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$user_group) {
+ $pdo->prepare("INSERT INTO admin_user_group (username, groupid) VALUES (?, 1)")
+ ->execute([$admin_username]);
+ echo "✓ 已创建用户组关联(使用username)
";
+ } else {
+ echo "✓ 用户组关联已存在
";
+ }
+ }
+
+ } catch (PDOException $e) {
+ // 表不存在,创建表
+ echo "⚠ admin_user_group 表不存在,正在创建...
";
+ $pdo->exec("CREATE TABLE `admin_user_group` (
+ `userid` int(11) NOT NULL,
+ `groupid` int(11) NOT NULL,
+ `username` varchar(100) DEFAULT NULL,
+ PRIMARY KEY (`userid`, `groupid`),
+ KEY `username` (`username`),
+ KEY `groupid` (`groupid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci");
+ $pdo->prepare("INSERT INTO admin_user_group (userid, groupid, username) VALUES (?, 1, ?)")
+ ->execute([$user['userid'], $admin_username]);
+ echo "✓ 已创建表并添加用户组关联
";
+ }
+
+ // 8. 显示最终信息
+ echo "
管理员账户信息
";
+
+ // 重新查询用户信息
+ $stmt = $pdo->prepare("SELECT * FROM admin_user WHERE username = ?");
+ $stmt->execute([$admin_username]);
+ $final_user = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // 查询用户组信息
+ $groupid = null;
+ $groupname = null;
+ try {
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_group WHERE userid = ?");
+ $stmt->execute([$final_user['userid']]);
+ $ug = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($ug) {
+ $groupid = $ug['groupid'];
+ $stmt = $pdo->prepare("SELECT * FROM admin_group WHERE groupid = ?");
+ $stmt->execute([$groupid]);
+ $g = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($g) {
+ $groupname = $g['groupname'];
+ }
+ }
+ } catch (PDOException $e) {
+ // 忽略错误
+ }
+
+ echo "";
+ echo "| 用户ID | {$final_user['userid']} |
";
+ echo "| 用户名 | {$final_user['username']} |
";
+ echo "| 密码 | {$admin_password} |
";
+ echo "| 状态 | " . ($final_user['status'] >= 1 ? '启用' : '禁用') . " |
";
+ echo "| 域 | " . ($final_user['domain'] ?? '未设置') . " |
";
+ echo "| 用户组ID | " . ($groupid ?? '未设置') . " |
";
+ echo "| 用户组名 | " . ($groupname ?? '未设置') . " |
";
+ echo "
";
+
+ // 9. 测试密码加密
+ echo "
密码验证测试
";
+ $test_salt = $final_user['salt'] ?? '';
+ $test_encrypted = md5(md5($admin_password) . $test_salt);
+ $db_password = $final_user['password'];
+
+ echo "Salt: {$test_salt}
";
+ echo "加密后密码: {$test_encrypted}
";
+ echo "数据库密码: {$db_password}
";
+
+ if ($test_encrypted == $db_password) {
+ echo "✓ 密码加密验证通过
";
+ } else {
+ echo "✗ 密码不匹配
";
+ }
+
+ echo "
";
+ echo "修复完成!
";
+ echo "立即登录后台
";
+ echo "如果仍然无法登录,请查看浏览器控制台的错误信息
";
+
+} catch (PDOException $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+ echo "" . $e->getTraceAsString() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/fix_navigation.php b/wy/server/public/fix_navigation.php
new file mode 100644
index 0000000..eb22457
--- /dev/null
+++ b/wy/server/public/fix_navigation.php
@@ -0,0 +1,153 @@
+修复导航菜单";
+echo "";
+echo "修复导航菜单显示问题
";
+
+// 数据库配置
+$host = 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com';
+$port = 24936;
+$username = 'root';
+$password = '!Rjb12191';
+$dbname = 'wy_db';
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库
";
+ echo "
";
+
+ // 1. 检查当前导航数据
+ echo "1. 当前导航数据检查
";
+ $stmt = $pdo->query("SELECT navigation_id, parent_id, hid, title, link, sort_order, status, LENGTH(hid) as hid_len FROM system_navigation ORDER BY parent_id, sort_order");
+ $navs = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ echo "";
+ echo "| ID | 父ID | HID | HID长度 | 标题 | 链接 | 排序 | 状态 |
";
+ foreach ($navs as $nav) {
+ $status_class = $nav['status'] == 1 ? 'success' : 'error';
+ $len_class = '';
+ if ($nav['parent_id'] == 1 && $nav['hid_len'] != 11) {
+ $len_class = 'error';
+ } elseif ($nav['parent_id'] != 1 && $nav['parent_id'] != 0 && $nav['hid_len'] != 16) {
+ $len_class = 'warning';
+ }
+ echo "";
+ echo "| {$nav['navigation_id']} | ";
+ echo "{$nav['parent_id']} | ";
+ echo "{$nav['hid']} | ";
+ echo "{$nav['hid_len']} | ";
+ echo "{$nav['title']} | ";
+ echo "{$nav['link']} | ";
+ echo "{$nav['sort_order']} | ";
+ echo "{$nav['status']} | ";
+ echo "
";
+ }
+ echo "
";
+
+ // 2. 清理重复和错误数据
+ echo "2. 清理重复和错误数据
";
+
+ // 删除所有现有导航(除了parent_id=0的根节点)
+ $pdo->exec("DELETE FROM system_navigation WHERE parent_id != 0");
+ echo "已删除所有非根节点的导航数据
";
+
+ // 3. 重新插入正确的导航数据
+ echo "3. 重新插入正确的导航数据
";
+
+ // 先确保有parent_id=0的根节点
+ $stmt = $pdo->query("SELECT navigation_id FROM system_navigation WHERE parent_id = 0 LIMIT 1");
+ $root = $stmt->fetch(PDO::FETCH_ASSOC);
+ if (!$root) {
+ $pdo->exec("INSERT INTO system_navigation (parent_id, hid, title, link, load_type, sort_order, status, ctime)
+ VALUES (0, 'root', '根节点', '#', 0, 0, 1, NOW())");
+ $root_id = $pdo->lastInsertId();
+ } else {
+ $root_id = $root['navigation_id'];
+ }
+
+ // 更新root节点的navigation_id为1(如果不存在)
+ $stmt = $pdo->query("SELECT navigation_id FROM system_navigation WHERE navigation_id = 1");
+ if (!$stmt->fetch()) {
+ $pdo->exec("UPDATE system_navigation SET navigation_id = 1 WHERE parent_id = 0 LIMIT 1");
+ $root_id = 1;
+ } else {
+ $root_id = 1;
+ }
+
+ // 定义正确的导航菜单(二级菜单,hid长度必须为11,parent_id=1)
+ $nav_two = array(
+ array('hid' => 'panel:index', 'title' => '面板', 'link' => '/panel/index/index', 'icon' => 'fa-home', 'icon_bg' => 'bg-info', 'sort' => 1),
+ array('hid' => 'admin:user:', 'title' => '管理员', 'link' => '/admin/user/index', 'icon' => 'fa-user', 'icon_bg' => 'bg-primary', 'sort' => 2),
+ array('hid' => 'cas:admin:x', 'title' => '用户管理', 'link' => '/casadmin/index/index', 'icon' => 'fa-users', 'icon_bg' => 'bg-success', 'sort' => 3),
+ array('hid' => 'goods:admin', 'title' => '商品管理', 'link' => '/goodsadmin/index/index', 'icon' => 'fa-shopping-cart', 'icon_bg' => 'bg-warning', 'sort' => 4),
+ array('hid' => 'order:admin', 'title' => '订单管理', 'link' => '/orderadmin/index/index', 'icon' => 'fa-file-text', 'icon_bg' => 'bg-danger', 'sort' => 5),
+ array('hid' => 'system:conf', 'title' => '系统设置', 'link' => '/systemadmin/feedback/index', 'icon' => 'fa-cog', 'icon_bg' => 'bg-dark', 'sort' => 6),
+ );
+
+ $insert_sql = "INSERT INTO system_navigation (parent_id, hid, title, link, load_type, sort_order, status, icon, icon_bg, ctime)
+ VALUES (1, :hid, :title, :link, 0, :sort, 1, :icon, :icon_bg, NOW())";
+ $stmt = $pdo->prepare($insert_sql);
+
+ $inserted = 0;
+ foreach ($nav_two as $nav) {
+ $stmt->execute(array(
+ ':hid' => $nav['hid'],
+ ':title' => $nav['title'],
+ ':link' => $nav['link'],
+ ':sort' => $nav['sort'],
+ ':icon' => $nav['icon'],
+ ':icon_bg' => $nav['icon_bg']
+ ));
+ $inserted++;
+ echo "✓ 插入二级菜单: {$nav['title']} (hid: {$nav['hid']}, 长度: " . strlen($nav['hid']) . ")
";
+ }
+
+ // 4. 验证数据
+ echo "4. 验证修复后的数据
";
+ $stmt = $pdo->query("SELECT navigation_id, parent_id, hid, title, LENGTH(hid) as hid_len, sort_order FROM system_navigation WHERE status=1 ORDER BY parent_id, sort_order");
+ $navs = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ echo "";
+ echo "| ID | 父ID | HID | HID长度 | 标题 | 排序 | 状态 |
";
+ $has_error = false;
+ foreach ($navs as $nav) {
+ $status = 'success';
+ if ($nav['parent_id'] == 1 && $nav['hid_len'] != 11) {
+ $status = 'error';
+ $has_error = true;
+ }
+ echo "";
+ echo "| {$nav['navigation_id']} | ";
+ echo "{$nav['parent_id']} | ";
+ echo "{$nav['hid']} | ";
+ echo "{$nav['hid_len']} | ";
+ echo "{$nav['title']} | ";
+ echo "{$nav['sort_order']} | ";
+ echo "✓ | ";
+ echo "
";
+ }
+ echo "
";
+
+ if (!$has_error) {
+ echo "✓ 导航数据修复完成!所有二级菜单的hid长度都是11,parent_id都是1
";
+ } else {
+ echo "✗ 仍有错误,请检查
";
+ }
+
+ echo "
";
+ echo "测试后台首页 | 返回首页
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库错误: " . $e->getMessage() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/fix_navigation_permissions.php b/wy/server/public/fix_navigation_permissions.php
new file mode 100644
index 0000000..dd8d073
--- /dev/null
+++ b/wy/server/public/fix_navigation_permissions.php
@@ -0,0 +1,92 @@
+修复导航权限";
+echo "";
+echo "修复导航权限数据
";
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+ // 映射关系:旧HID -> 新HID
+ $hid_mapping = array(
+ 'panel' => 'panel:index',
+ 'admin' => 'admin:user',
+ 'cas' => 'cas:admin',
+ 'goods' => 'goods:admin',
+ 'order' => 'order:admin',
+ 'system' => 'system:conf',
+ );
+
+ echo "更新权限数据
";
+
+ // 更新现有的权限记录
+ $update_count = 0;
+ foreach ($hid_mapping as $old_hid => $new_hid) {
+ $stmt = $pdo->prepare("UPDATE admin_user_permission SET navigation_hid = ? WHERE navigation_hid = ?");
+ $stmt->execute([$new_hid, $old_hid]);
+ $count = $stmt->rowCount();
+ if ($count > 0) {
+ echo "✓ 更新 {$count} 条权限记录: {$old_hid} -> {$new_hid}
";
+ $update_count += $count;
+ }
+ }
+
+ // 如果管理员组还没有权限,创建新的权限记录
+ echo "检查并创建缺失的权限
";
+
+ // 获取所有权限ID
+ $stmt = $pdo->query("SELECT permission_id, appkey FROM admin_permission");
+ $permissions = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ $appkey_to_hid = array(
+ 'panel' => 'panel:index',
+ 'admin' => 'admin:user',
+ 'cas' => 'cas:admin',
+ 'goods' => 'goods:admin',
+ 'order' => 'order:admin',
+ 'system' => 'system:conf',
+ );
+
+ $insert_count = 0;
+ foreach ($permissions as $perm) {
+ if (isset($appkey_to_hid[$perm['appkey']])) {
+ $nav_hid = $appkey_to_hid[$perm['appkey']];
+
+ // 检查是否已存在
+ $stmt = $pdo->prepare("SELECT * FROM admin_user_permission WHERE ptype = 'group' AND parameter = '1' AND permission_id = ? AND navigation_hid = ?");
+ $stmt->execute([$perm['permission_id'], $nav_hid]);
+
+ if ($stmt->rowCount() == 0) {
+ $stmt = $pdo->prepare("INSERT INTO admin_user_permission (ptype, parameter, permission_id, navigation_hid) VALUES ('group', '1', ?, ?)");
+ $stmt->execute([$perm['permission_id'], $nav_hid]);
+ echo "✓ 创建权限: {$nav_hid} (权限ID: {$perm['permission_id']})
";
+ $insert_count++;
+ }
+ }
+ }
+
+ echo "
";
+ echo "完成
";
+ echo "更新了 {$update_count} 条权限记录,创建了 {$insert_count} 条新权限记录
";
+ echo "返回后台管理
";
+
+} catch (PDOException $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/init_admin_test_data.php b/wy/server/public/init_admin_test_data.php
new file mode 100644
index 0000000..29fa1fd
--- /dev/null
+++ b/wy/server/public/init_admin_test_data.php
@@ -0,0 +1,367 @@
+初始化测试数据";
+echo "";
+echo "后台管理系统测试数据初始化
";
+
+// 数据库配置
+$host = 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com';
+$port = 24936;
+$username = 'root';
+$password = '!Rjb12191';
+$dbname = 'wy_db';
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库
";
+ echo "
";
+
+ $total_inserted = 0;
+
+ // ========== 1. 创建测试用户 ==========
+ echo "1. 创建测试用户
";
+
+ // 检查是否已有测试用户
+ $stmt = $pdo->query("SELECT userid FROM cas_user WHERE username LIKE 'test%' LIMIT 1");
+ $existing_user = $stmt->fetch();
+
+ if (!$existing_user) {
+ $test_users = array(
+ array('username' => 'test001', 'phone' => '13800138001', 'nickname' => '测试用户1', 'password' => md5('123456'), 'city' => '北京'),
+ array('username' => 'test002', 'phone' => '13800138002', 'nickname' => '测试用户2', 'password' => md5('123456'), 'city' => '上海'),
+ array('username' => 'test003', 'phone' => '13800138003', 'nickname' => '测试用户3', 'password' => md5('123456'), 'city' => '广州'),
+ array('username' => 'test004', 'phone' => '13800138004', 'nickname' => '测试用户4', 'password' => md5('123456'), 'city' => '深圳'),
+ array('username' => 'test005', 'phone' => '13800138005', 'nickname' => '测试用户5', 'password' => md5('123456'), 'city' => '杭州'),
+ );
+
+ $user_sql = "INSERT INTO cas_user (username, phone, nickname, password, city, status, ctime)
+ VALUES (:username, :phone, :nickname, :password, :city, 1, NOW())";
+ $stmt = $pdo->prepare($user_sql);
+
+ $user_ids = array();
+ foreach ($test_users as $user) {
+ $stmt->execute($user);
+ $user_ids[] = $pdo->lastInsertId();
+ echo "✓ 创建用户: {$user['nickname']} ({$user['username']})
";
+ $total_inserted++;
+ }
+ } else {
+ $stmt = $pdo->query("SELECT userid FROM cas_user WHERE username LIKE 'test%'");
+ $user_ids = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ echo "测试用户已存在,使用现有用户ID
";
+ }
+
+ // ========== 2. 创建商品数据 ==========
+ echo "2. 创建商品数据
";
+
+ $goods_list = array(
+ array('title' => '新鲜苹果 5kg装', 'price' => 58.00, 'stock' => 100, 'desc' => '来自山东烟台的红富士苹果,脆甜多汁'),
+ array('title' => '有机蔬菜礼盒', 'price' => 88.00, 'stock' => 50, 'desc' => '精选有机蔬菜,健康营养'),
+ array('title' => '进口车厘子 2kg', 'price' => 128.00, 'stock' => 30, 'desc' => '智利进口车厘子,个大味甜'),
+ array('title' => '优质大米 10kg', 'price' => 68.00, 'stock' => 200, 'desc' => '东北优质大米,粒粒饱满'),
+ array('title' => '新鲜鸡蛋 30枚', 'price' => 28.00, 'stock' => 150, 'desc' => '散养土鸡蛋,营养丰富'),
+ );
+
+ $goods_sql = "INSERT INTO goods_content (userid, goods_detail, pic, thumb, status, ctime)
+ VALUES (:userid, :detail, :pic, :thumb, 1, NOW())";
+ $stmt = $pdo->prepare($goods_sql);
+
+ $goods_ids = array();
+ foreach ($goods_list as $idx => $goods) {
+ $userid = $user_ids[$idx % count($user_ids)];
+ $detail = json_encode(array(
+ 'title' => $goods['title'],
+ 'price' => $goods['price'],
+ 'stock' => $goods['stock'],
+ 'desc' => $goods['desc']
+ ), JSON_UNESCAPED_UNICODE);
+ $pic = 'uploads/static/images/goods' . ($idx + 1) . '.jpg';
+
+ $stmt->execute(array(
+ ':userid' => $userid,
+ ':detail' => $detail,
+ ':pic' => $pic,
+ ':thumb' => $pic
+ ));
+ $goods_id = $pdo->lastInsertId();
+ $goods_ids[] = $goods_id;
+ echo "✓ 创建商品: {$goods['title']} (ID: {$goods_id}, 价格: ¥{$goods['price']})
";
+ $total_inserted++;
+ }
+
+ // ========== 3. 创建订单数据 ==========
+ echo "3. 创建订单数据
";
+
+ $order_statuses = array(0 => '待支付', 1 => '已支付', 2 => '已发货', 3 => '已完成', 4 => '已取消');
+
+ for ($i = 0; $i < 10; $i++) {
+ $userid = $user_ids[$i % count($user_ids)];
+ $goods_id = $goods_ids[$i % count($goods_ids)];
+ $status = array_rand($order_statuses);
+ $order_money = rand(30, 200);
+ $order_number = 'ORD' . date('Ymd') . str_pad($i + 1, 6, '0', STR_PAD_LEFT);
+
+ // 创建主订单
+ $main_sql = "INSERT INTO order_mainlist (order_main_number, userid, order_money, pay_status, ctime)
+ VALUES (:number, :userid, :money, :status, NOW())";
+ $stmt = $pdo->prepare($main_sql);
+ $stmt->execute(array(
+ ':number' => $order_number,
+ ':userid' => $userid,
+ ':money' => $order_money,
+ ':status' => $status
+ ));
+ $main_id = $pdo->lastInsertId();
+
+ // 创建子订单
+ $order_sql = "INSERT INTO order_list (order_main_id, order_number, userid, order_money, order_status, ctime)
+ VALUES (:main_id, :number, :userid, :money, :status, NOW())";
+ $stmt = $pdo->prepare($order_sql);
+ $stmt->execute(array(
+ ':main_id' => $main_id,
+ ':number' => $order_number . '-01',
+ ':userid' => $userid,
+ ':money' => $order_money,
+ ':status' => $status
+ ));
+ $order_id = $pdo->lastInsertId();
+
+ // 创建订单详情
+ $detail_sql = "INSERT INTO order_detail (order_id, goods_id, sale_price, goods_num, goods_amount)
+ VALUES (:order_id, :goods_id, :price, :num, :amount)";
+ $stmt = $pdo->prepare($detail_sql);
+ $num = rand(1, 5);
+ $price = $order_money / $num;
+ $stmt->execute(array(
+ ':order_id' => $order_id,
+ ':goods_id' => $goods_id,
+ ':price' => $price,
+ ':num' => $num,
+ ':amount' => $order_money
+ ));
+
+ echo "✓ 创建订单: {$order_number} (状态: {$order_statuses[$status]}, 金额: ¥{$order_money})
";
+ $total_inserted += 3;
+ }
+
+ // ========== 4. 创建服务订单数据 ==========
+ echo "4. 创建服务订单数据
";
+
+ $serve_types = array('保洁服务', '维修服务', '搬家服务', '安装服务', '其他服务');
+
+ for ($i = 0; $i < 8; $i++) {
+ $userid = $user_ids[$i % count($user_ids)];
+ $serve_type = $serve_types[$i % count($serve_types)];
+ $order_number = 'SER' . date('Ymd') . str_pad($i + 1, 6, '0', STR_PAD_LEFT);
+ $order_money = rand(50, 500);
+ $order_status = rand(0, 3);
+
+ $sql = "INSERT INTO serve_order (serve_order_number, userid, serve_type, serve_order_money, serve_order_status, serve_user_name, serve_user_phone, serve_address, ctime)
+ VALUES (:number, :userid, :type, :money, :status, :name, :phone, :address, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':number' => $order_number,
+ ':userid' => $userid,
+ ':type' => $serve_type,
+ ':money' => $order_money,
+ ':status' => $order_status,
+ ':name' => '测试用户' . ($i + 1),
+ ':phone' => '13800138' . str_pad($i + 1, 3, '0', STR_PAD_LEFT),
+ ':address' => '测试地址' . ($i + 1) . '号'
+ ));
+
+ echo "✓ 创建服务订单: {$order_number} ({$serve_type}, 金额: ¥{$order_money})
";
+ $total_inserted++;
+ }
+
+ // ========== 5. 创建消息数据 ==========
+ echo "5. 创建消息数据
";
+
+ $message_types = array('系统通知', '活动公告', '服务提醒', '订单通知', '其他消息');
+ $message_titles = array(
+ '系统维护通知',
+ '春节活动开始啦!',
+ '您的订单已发货',
+ '新功能上线通知',
+ '社区活动报名',
+ );
+
+ for ($i = 0; $i < 10; $i++) {
+ $type = $message_types[$i % count($message_types)];
+ $title = $message_titles[$i % count($message_titles)];
+ $content = "这是一条测试消息内容,用于测试后台管理系统的消息功能。消息编号:" . ($i + 1);
+
+ $sql = "INSERT INTO message_content (message_type, message_title, message_brief, message_info, is_send, ctime)
+ VALUES (:type, :title, :brief, :info, 1, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':type' => $type,
+ ':title' => $title,
+ ':brief' => mb_substr($content, 0, 50),
+ ':info' => $content
+ ));
+
+ echo "✓ 创建消息: {$title} ({$type})
";
+ $total_inserted++;
+ }
+
+ // ========== 6. 创建广告数据 ==========
+ echo "6. 创建广告数据
";
+
+ $advert_titles = array(
+ '新春大促销',
+ '限时特价活动',
+ '新品上市',
+ '会员专享优惠',
+ '节日活动',
+ );
+
+ for ($i = 0; $i < 5; $i++) {
+ $sql = "INSERT INTO advert_content (advert_category, advert_title, advert_content, advert_img, status, start_time, end_time, ctime)
+ VALUES (:category, :title, :content, :img, 1, NOW(), DATE_ADD(NOW(), INTERVAL 30 DAY), NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':category' => 'banner',
+ ':title' => $advert_titles[$i],
+ ':content' => '这是广告内容描述',
+ ':img' => 'uploads/static/images/banner' . ($i + 1) . '.jpg'
+ ));
+
+ echo "✓ 创建广告: {$advert_titles[$i]}
";
+ $total_inserted++;
+ }
+
+ // ========== 7. 创建商店数据 ==========
+ echo "7. 创建商店数据
";
+
+ $store_names = array('便民超市', '生鲜市场', '水果店', '便利店', '药店');
+
+ $store_ids = array();
+ foreach ($store_names as $idx => $name) {
+ $sql = "INSERT INTO store_info (store_name, img, ctime) VALUES (:name, :img, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':name' => $name,
+ ':img' => 'uploads/static/images/store' . ($idx + 1) . '.jpg'
+ ));
+ $store_id = $pdo->lastInsertId();
+ $store_ids[] = $store_id;
+ echo "✓ 创建商店: {$name} (ID: {$store_id})
";
+ $total_inserted++;
+ }
+
+ // 为商店创建消息
+ foreach ($store_ids as $store_id) {
+ $sql = "INSERT INTO store_msg (store_id, title, push_txt, userid, is_dot, ctime)
+ VALUES (:store_id, :title, :txt, :userid, 0, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':store_id' => $store_id,
+ ':title' => '商店通知',
+ ':txt' => '这是来自商店的通知消息',
+ ':userid' => $user_ids[0]
+ ));
+ $total_inserted++;
+ }
+ echo "✓ 为商店创建消息
";
+
+ // ========== 8. 创建车库数据 ==========
+ echo "8. 创建车库数据
";
+
+ for ($i = 1; $i <= 10; $i++) {
+ $garage_sn = 'GARAGE' . str_pad($i, 3, '0', STR_PAD_LEFT);
+ $sql = "INSERT INTO garage_list (garage_sn, status, ctime) VALUES (:sn, 1, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(':sn' => $garage_sn));
+ $garage_list_id = $pdo->lastInsertId();
+
+ // 分配车库给用户
+ if ($i <= count($user_ids)) {
+ $userid = $user_ids[$i - 1];
+ $sql = "INSERT INTO garage_user (userid, garage_sn, garage_list_id, name, phone, status, ctime)
+ VALUES (:userid, :sn, :list_id, :name, :phone, 1, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':userid' => $userid,
+ ':sn' => $garage_sn,
+ ':list_id' => $garage_list_id,
+ ':name' => '测试用户' . $i,
+ ':phone' => '13800138' . str_pad($i, 3, '0', STR_PAD_LEFT)
+ ));
+ }
+
+ echo "✓ 创建车库: {$garage_sn}
";
+ $total_inserted += 2;
+ }
+
+ // ========== 9. 创建系统反馈数据 ==========
+ echo "9. 创建系统反馈数据
";
+
+ $feedback_contents = array(
+ '希望增加更多商品种类',
+ '配送速度可以更快一些',
+ '界面设计很美观',
+ '建议增加搜索功能',
+ '客服服务态度很好',
+ );
+
+ foreach ($feedback_contents as $idx => $content) {
+ $userid = $user_ids[$idx % count($user_ids)];
+ $sql = "INSERT INTO system_feedback (userid, content, phone, username, feedback_status, ctime)
+ VALUES (:userid, :content, :phone, :username, 0, NOW())";
+ $stmt = $pdo->prepare($sql);
+ $stmt->execute(array(
+ ':userid' => $userid,
+ ':content' => $content,
+ ':phone' => '13800138' . str_pad($idx + 1, 3, '0', STR_PAD_LEFT),
+ ':username' => 'test' . str_pad($idx + 1, 3, '0', STR_PAD_LEFT)
+ ));
+ echo "✓ 创建反馈: " . mb_substr($content, 0, 20) . "...
";
+ $total_inserted++;
+ }
+
+ // ========== 总结 ==========
+ echo "
";
+ echo "初始化完成
";
+ echo "✓ 总共创建了 {$total_inserted} 条测试数据
";
+ echo "数据分配情况:
";
+ echo "";
+ echo "- 用户数据:5个测试用户
";
+ echo "- 商品数据:5个商品
";
+ echo "- 订单数据:10个订单(包含主订单、子订单、订单详情)
";
+ echo "- 服务订单:8个服务订单
";
+ echo "- 消息数据:10条消息
";
+ echo "- 广告数据:5个广告
";
+ echo "- 商店数据:5个商店 + 商店消息
";
+ echo "- 车库数据:10个车库 + 用户分配
";
+ echo "- 反馈数据:5条反馈
";
+ echo "
";
+
+ echo "
";
+ echo "测试账号信息:
";
+ echo "";
+ echo "| 用户名 | 密码 | 手机号 |
";
+ for ($i = 1; $i <= 5; $i++) {
+ echo "| test" . str_pad($i, 3, '0', STR_PAD_LEFT) . " | 123456 | 13800138" . str_pad($i, 3, '0', STR_PAD_LEFT) . " |
";
+ }
+ echo "
";
+
+ echo "
";
+ echo "进入后台管理查看数据 | 返回首页
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库错误: " . $e->getMessage() . "
";
+ echo "错误代码: " . $e->getCode() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/init_all_tables.php b/wy/server/public/init_all_tables.php
new file mode 100644
index 0000000..1601bcd
--- /dev/null
+++ b/wy/server/public/init_all_tables.php
@@ -0,0 +1,1431 @@
+数据库初始化";
+echo "";
+echo "数据库表结构初始化
";
+
+try {
+ // 连接数据库
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库 '{$dbname}'
";
+ echo "
";
+
+ // 定义所有表的SQL
+ $tables = array();
+
+ // 1. system_navigation - 系统导航表
+ $tables['system_navigation'] = "
+ CREATE TABLE IF NOT EXISTS `system_navigation` (
+ `navigation_id` int(11) NOT NULL AUTO_INCREMENT,
+ `parent_id` int(11) DEFAULT '0',
+ `hid` varchar(255) DEFAULT NULL,
+ `title` varchar(255) NOT NULL,
+ `link` varchar(255) DEFAULT NULL,
+ `load_type` tinyint(1) DEFAULT '0' COMMENT '加载类型:0-普通,1-AJAX',
+ `description` text,
+ `icon` varchar(255) DEFAULT NULL,
+ `icon_bg` varchar(255) DEFAULT NULL,
+ `sort_order` int(11) DEFAULT '0',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`navigation_id`),
+ KEY `parent_id` (`parent_id`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 2. system_config - 系统配置表
+ $tables['system_config'] = "
+ CREATE TABLE IF NOT EXISTS `system_config` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `title` varchar(255) DEFAULT NULL,
+ `value` text,
+ `memo` text,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `name` (`name`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3. cas_user - 用户表
+ $tables['cas_user'] = "
+ CREATE TABLE IF NOT EXISTS `cas_user` (
+ `userid` bigint(20) NOT NULL AUTO_INCREMENT,
+ `user_group_id` int(11) DEFAULT '0',
+ `user_lv_id` int(11) DEFAULT '0',
+ `username` varchar(100) DEFAULT NULL,
+ `modifiedName` varchar(100) DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `freeze` tinyint(1) DEFAULT '0',
+ `thirdid` varchar(100) DEFAULT NULL,
+ `salt` varchar(50) DEFAULT NULL,
+ `encrypt` varchar(20) DEFAULT 'md5',
+ `phone` varchar(20) DEFAULT NULL,
+ `verifiedPhone` tinyint(1) DEFAULT '0',
+ `email` varchar(100) DEFAULT NULL,
+ `verifiedEmail` tinyint(1) DEFAULT '0',
+ `nickname` varchar(100) DEFAULT NULL,
+ `uk_username` varchar(100) DEFAULT NULL,
+ `uk_nickname` varchar(100) DEFAULT NULL,
+ `gender` tinyint(1) DEFAULT '0',
+ `avatar` varchar(255) DEFAULT NULL,
+ `thumb` varchar(255) DEFAULT NULL,
+ `ctime` datetime DEFAULT NULL,
+ `last_login_time` datetime DEFAULT NULL,
+ `last_login_ip` varchar(50) DEFAULT NULL,
+ `last_ip` varchar(50) DEFAULT NULL,
+ `status` tinyint(1) DEFAULT '1',
+ `is_verify` tinyint(1) DEFAULT '0',
+ `ban_etime` datetime DEFAULT NULL,
+ `realname` varchar(50) DEFAULT NULL,
+ `idcard` varchar(20) DEFAULT NULL,
+ `device_no` varchar(100) DEFAULT NULL,
+ `channelid` varchar(100) DEFAULT NULL,
+ `device_type` varchar(20) DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `city` varchar(50) DEFAULT NULL,
+ `age` int(11) DEFAULT NULL,
+ `birthday` date DEFAULT NULL,
+ `points` int(11) DEFAULT '0',
+ `sales` decimal(10,2) DEFAULT '0.00',
+ `longitude` decimal(10,7) DEFAULT NULL,
+ `latitude` decimal(10,7) DEFAULT NULL,
+ `monitor_username` varchar(100) DEFAULT NULL,
+ `monitor_pwd` varchar(100) DEFAULT NULL,
+ `area_id` int(11) DEFAULT NULL,
+ `extra` text,
+ PRIMARY KEY (`userid`),
+ KEY `username` (`username`),
+ KEY `phone` (`phone`),
+ KEY `email` (`email`),
+ KEY `user_group_id` (`user_group_id`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.1. cas_code - 验证码表
+ $tables['cas_code'] = "
+ CREATE TABLE IF NOT EXISTS `cas_code` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `type` varchar(50) DEFAULT NULL,
+ `action` varchar(50) DEFAULT NULL COMMENT '动作类型:register-注册,forget-忘记密码等',
+ `sendto` varchar(100) DEFAULT NULL COMMENT '接收验证码的手机号或邮箱',
+ `code` varchar(20) DEFAULT NULL COMMENT '验证码',
+ `ctime` datetime DEFAULT NULL COMMENT '创建时间',
+ `exptime` datetime DEFAULT NULL COMMENT '过期时间',
+ PRIMARY KEY (`id`),
+ KEY `sendto` (`sendto`),
+ KEY `action` (`action`),
+ KEY `code` (`code`),
+ KEY `exptime` (`exptime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.2. cas_login_log - 登录日志表
+ $tables['cas_login_log'] = "
+ CREATE TABLE IF NOT EXISTS `cas_login_log` (
+ `logid` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `username` varchar(100) DEFAULT NULL,
+ `sessionid` varchar(255) DEFAULT NULL,
+ `ip` varchar(50) DEFAULT NULL,
+ `ua` varchar(500) DEFAULT NULL COMMENT 'User Agent',
+ `ctime` datetime DEFAULT NULL,
+ PRIMARY KEY (`logid`),
+ KEY `userid` (`userid`),
+ KEY `username` (`username`),
+ KEY `ip` (`ip`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.3. cas_login_error - 登录错误日志表
+ $tables['cas_login_error'] = "
+ CREATE TABLE IF NOT EXISTS `cas_login_error` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ip` varchar(50) DEFAULT NULL,
+ `sessionid` varchar(255) DEFAULT NULL,
+ `username` varchar(100) DEFAULT NULL,
+ `ctime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `ip` (`ip`),
+ KEY `username` (`username`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.4. cas_user_home - 用户房产表
+ $tables['cas_user_home'] = "
+ CREATE TABLE IF NOT EXISTS `cas_user_home` (
+ `user_home_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `home_id` int(11) DEFAULT NULL,
+ `address` varchar(255) DEFAULT NULL,
+ `area` varchar(100) DEFAULT NULL,
+ `name` varchar(100) DEFAULT NULL,
+ `phone` varchar(20) DEFAULT NULL,
+ `member_ids` varchar(255) DEFAULT NULL COMMENT '家庭成员ID,逗号分隔',
+ `is_verify` tinyint(1) DEFAULT '0' COMMENT '是否验证:0-待验证,1-已通过,2-未通过',
+ `is_del` tinyint(1) DEFAULT '0',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `card_count` int(11) DEFAULT '0',
+ `property_costs` decimal(10,2) DEFAULT '0.00',
+ `admin_is_del` tinyint(1) DEFAULT '0',
+ `admin_mtime` datetime DEFAULT NULL,
+ `area_id` int(11) DEFAULT NULL,
+ `building_id` int(11) DEFAULT NULL,
+ `unit_id` int(11) DEFAULT NULL,
+ `relname` varchar(50) DEFAULT NULL COMMENT '真实姓名',
+ `idcard` varchar(20) DEFAULT NULL COMMENT '身份证号',
+ PRIMARY KEY (`user_home_id`),
+ KEY `userid` (`userid`),
+ KEY `home_id` (`home_id`),
+ KEY `is_del` (`is_del`),
+ KEY `admin_is_del` (`admin_is_del`),
+ KEY `area_id` (`area_id`),
+ KEY `building_id` (`building_id`),
+ KEY `unit_id` (`unit_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.4.1. cas_user_faceinfo - 用户人脸信息表
+ $tables['cas_user_faceinfo'] = "
+ CREATE TABLE IF NOT EXISTS `cas_user_faceinfo` (
+ `face_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `username` varchar(100) DEFAULT NULL,
+ `pic` varchar(500) DEFAULT NULL COMMENT '人脸图片',
+ `faceinfo` text COMMENT '人脸特征信息',
+ `village_id` int(11) DEFAULT NULL COMMENT '小区ID',
+ `building_id` int(11) DEFAULT NULL COMMENT '楼栋ID',
+ `unit_id` int(11) DEFAULT NULL COMMENT '单元ID',
+ `floor_id` int(11) DEFAULT NULL COMMENT '楼层ID',
+ `ctime` datetime DEFAULT NULL,
+ `is_sysn` tinyint(1) DEFAULT '0' COMMENT '是否同步:0-未同步,1-已同步',
+ PRIMARY KEY (`face_id`),
+ KEY `userid` (`userid`),
+ KEY `village_id` (`village_id`),
+ KEY `building_id` (`building_id`),
+ KEY `unit_id` (`unit_id`),
+ KEY `floor_id` (`floor_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.5. store_info - 商店信息表
+ $tables['store_info'] = "
+ CREATE TABLE IF NOT EXISTS `store_info` (
+ `store_id` int(11) NOT NULL AUTO_INCREMENT,
+ `store_name` varchar(255) DEFAULT NULL COMMENT '商店名称',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `img` varchar(500) DEFAULT NULL COMMENT '商店图片',
+ PRIMARY KEY (`store_id`),
+ KEY `is_del` (`is_del`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.5.1. store_msg - 商店消息表
+ $tables['store_msg'] = "
+ CREATE TABLE IF NOT EXISTS `store_msg` (
+ `msg_id` int(11) NOT NULL AUTO_INCREMENT,
+ `store_id` int(11) DEFAULT NULL,
+ `push_txt` text,
+ `userid` bigint(20) DEFAULT NULL,
+ `is_dot` tinyint(1) DEFAULT '0' COMMENT '是否已读:0-未读,1-已读',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `title` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`msg_id`),
+ KEY `store_id` (`store_id`),
+ KEY `userid` (`userid`),
+ KEY `is_dot` (`is_dot`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.6. advert_content - 广告内容表
+ $tables['advert_content'] = "
+ CREATE TABLE IF NOT EXISTS `advert_content` (
+ `advert_id` int(11) NOT NULL AUTO_INCREMENT,
+ `advert_category` varchar(100) DEFAULT NULL,
+ `advert_title` varchar(255) DEFAULT NULL,
+ `advert_content` text,
+ `advert_img` varchar(500) DEFAULT NULL,
+ `advert_source` varchar(255) DEFAULT NULL,
+ `sort_order` int(11) DEFAULT '0',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `start_time` datetime DEFAULT NULL,
+ `end_time` datetime DEFAULT NULL,
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `advert_type` varchar(50) DEFAULT NULL,
+ `unit_id` int(11) DEFAULT NULL,
+ `area_id` int(11) DEFAULT NULL,
+ `building_id` int(11) DEFAULT NULL,
+ PRIMARY KEY (`advert_id`),
+ KEY `advert_category` (`advert_category`),
+ KEY `status` (`status`),
+ KEY `is_del` (`is_del`),
+ KEY `start_time` (`start_time`),
+ KEY `end_time` (`end_time`),
+ KEY `unit_id` (`unit_id`),
+ KEY `area_id` (`area_id`),
+ KEY `building_id` (`building_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.7. advertorial_content - 商城文章内容表
+ $tables['advertorial_content'] = "
+ CREATE TABLE IF NOT EXISTS `advertorial_content` (
+ `advertorial_content_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `advertorial_title` varchar(255) DEFAULT NULL,
+ `advertorial_author_phone` varchar(20) DEFAULT NULL,
+ `advertorial_content` text,
+ `advertorial_picture` varchar(500) DEFAULT NULL,
+ `is_show` tinyint(1) DEFAULT '1' COMMENT '是否显示:0-隐藏,1-显示',
+ `is_hot` tinyint(1) DEFAULT '0' COMMENT '是否热门:0-否,1-是',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`advertorial_content_id`),
+ KEY `userid` (`userid`),
+ KEY `is_show` (`is_show`),
+ KEY `is_hot` (`is_hot`),
+ KEY `is_del` (`is_del`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 3.8. message_content - 消息内容表
+ $tables['message_content'] = "
+ CREATE TABLE IF NOT EXISTS `message_content` (
+ `message_id` int(11) NOT NULL AUTO_INCREMENT,
+ `message_type` varchar(50) DEFAULT NULL COMMENT '消息类型',
+ `is_del` tinyint(1) DEFAULT '0',
+ `ctime` datetime DEFAULT NULL,
+ `message_object` varchar(255) DEFAULT NULL COMMENT '消息对象',
+ `message_title` varchar(255) DEFAULT NULL COMMENT '消息标题',
+ `message_brief` varchar(500) DEFAULT NULL COMMENT '消息简介',
+ `message_info` text COMMENT '消息内容',
+ `is_send` tinyint(1) DEFAULT '0' COMMENT '是否已发送:0-未发送,1-已发送',
+ `mtime` datetime DEFAULT NULL,
+ `city_id` int(11) DEFAULT NULL,
+ `region_id` int(11) DEFAULT NULL,
+ `province_id` int(11) DEFAULT NULL,
+ `message_picture` varchar(500) DEFAULT NULL COMMENT '消息图片',
+ PRIMARY KEY (`message_id`),
+ KEY `message_type` (`message_type`),
+ KEY `is_del` (`is_del`),
+ KEY `is_send` (`is_send`),
+ KEY `ctime` (`ctime`),
+ KEY `city_id` (`city_id`),
+ KEY `region_id` (`region_id`),
+ KEY `province_id` (`province_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 4. goods_content - 商品内容表
+ $tables['goods_content'] = "
+ CREATE TABLE IF NOT EXISTS `goods_content` (
+ `goods_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `goods_detail` text,
+ `pic` text,
+ `thumb` varchar(255) DEFAULT NULL,
+ `ctime` datetime DEFAULT NULL,
+ `type` tinyint(1) DEFAULT '1' COMMENT '1-普通商品,2-多属性商品',
+ `is_del` tinyint(1) DEFAULT '0',
+ `status` tinyint(1) DEFAULT '1' COMMENT '0-下架,1-上架',
+ `up` text COMMENT '点赞用户ID,逗号分隔',
+ `user_group_id` int(11) DEFAULT '0',
+ PRIMARY KEY (`goods_id`),
+ KEY `userid` (`userid`),
+ KEY `status` (`status`),
+ KEY `is_del` (`is_del`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 5. goods_detail - 商品详情表(多属性商品)
+ $tables['goods_detail'] = "
+ CREATE TABLE IF NOT EXISTS `goods_detail` (
+ `detail_id` int(11) NOT NULL AUTO_INCREMENT,
+ `goods_id` int(11) NOT NULL,
+ `property` varchar(255) DEFAULT NULL COMMENT '属性名称',
+ `product_code` varchar(50) DEFAULT NULL COMMENT '商品编码',
+ `num` int(11) DEFAULT '0' COMMENT '库存数量',
+ `price` decimal(10,2) DEFAULT '0.00' COMMENT '价格',
+ `ctime` datetime DEFAULT NULL,
+ PRIMARY KEY (`detail_id`),
+ KEY `goods_id` (`goods_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 6. order_list - 订单表
+ $tables['order_list'] = "
+ CREATE TABLE IF NOT EXISTS `order_list` (
+ `order_id` int(11) NOT NULL AUTO_INCREMENT,
+ `order_main_id` int(11) DEFAULT NULL,
+ `order_number` varchar(50) DEFAULT NULL,
+ `ctime` datetime DEFAULT NULL,
+ `paytime` datetime DEFAULT NULL,
+ `order_status` tinyint(1) DEFAULT '0' COMMENT '订单状态',
+ `userid` bigint(20) DEFAULT NULL,
+ `pay_way` varchar(20) DEFAULT NULL COMMENT '支付方式',
+ `logistics_no` varchar(100) DEFAULT NULL COMMENT '物流单号',
+ `buyer_note` text COMMENT '买家备注',
+ `order_money` decimal(10,2) DEFAULT '0.00',
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `goods_user_id` bigint(20) DEFAULT NULL,
+ PRIMARY KEY (`order_id`),
+ KEY `order_number` (`order_number`),
+ KEY `userid` (`userid`),
+ KEY `order_status` (`order_status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 7. goods_dis - 商品评论表(根据代码推断)
+ $tables['goods_dis'] = "
+ CREATE TABLE IF NOT EXISTS `goods_dis` (
+ `dis_id` int(11) NOT NULL AUTO_INCREMENT,
+ `goods_id` int(11) NOT NULL,
+ `userid` bigint(20) DEFAULT NULL,
+ `parent_id` int(11) DEFAULT '0' COMMENT '父评论ID',
+ `parent_name` varchar(100) DEFAULT NULL COMMENT '父评论用户名',
+ `contents` text COMMENT '评论内容',
+ `ctime` datetime DEFAULT NULL,
+ PRIMARY KEY (`dis_id`),
+ KEY `goods_id` (`goods_id`),
+ KEY `userid` (`userid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 添加权限相关表
+ $tables['admin_user_permission'] = "
+ CREATE TABLE IF NOT EXISTS `admin_user_permission` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ptype` varchar(50) NOT NULL COMMENT '类型:user-用户,group-组',
+ `parameter` varchar(255) NOT NULL COMMENT '参数:用户名或组ID',
+ `permission_id` int(11) NOT NULL COMMENT '权限ID',
+ `navigation_hid` varchar(255) DEFAULT NULL COMMENT '导航HID',
+ `note` text COMMENT '备注',
+ `schemeid` int(11) DEFAULT NULL COMMENT '方案ID',
+ PRIMARY KEY (`id`),
+ KEY `ptype` (`ptype`),
+ KEY `parameter` (`parameter`),
+ KEY `permission_id` (`permission_id`),
+ KEY `schemeid` (`schemeid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ $tables['admin_permission'] = "
+ CREATE TABLE IF NOT EXISTS `admin_permission` (
+ `permission_id` int(11) NOT NULL AUTO_INCREMENT,
+ `permission_name` varchar(255) NOT NULL COMMENT '权限名称',
+ `permission_group` varchar(255) DEFAULT NULL COMMENT '权限组',
+ `appkey` varchar(100) DEFAULT NULL COMMENT '应用键',
+ `description` text COMMENT '描述',
+ PRIMARY KEY (`permission_id`),
+ KEY `appkey` (`appkey`),
+ KEY `permission_group` (`permission_group`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ $tables['admin_app_permission'] = "
+ CREATE TABLE IF NOT EXISTS `admin_app_permission` (
+ `appkey` varchar(100) NOT NULL,
+ `module` varchar(100) NOT NULL,
+ `controller` varchar(100) NOT NULL,
+ `action` varchar(100) NOT NULL,
+ `permission_id` int(11) NOT NULL,
+ PRIMARY KEY (`appkey`, `module`, `controller`, `action`),
+ KEY `permission_id` (`permission_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // admin_token - Token表(用于OAuth或会话管理)
+ $tables['admin_token'] = "
+ CREATE TABLE IF NOT EXISTS `admin_token` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) DEFAULT NULL,
+ `appkey` varchar(100) DEFAULT NULL,
+ `request_token` varchar(255) DEFAULT NULL,
+ `request_secret` varchar(255) DEFAULT NULL,
+ `callback_url` varchar(255) DEFAULT NULL,
+ `access_token` varchar(255) DEFAULT NULL,
+ `access_secret` varchar(255) DEFAULT NULL,
+ `verifier` varchar(255) DEFAULT NULL,
+ `status` tinyint(1) DEFAULT '1',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `etime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `username` (`username`),
+ KEY `request_token` (`request_token`),
+ KEY `access_token` (`access_token`),
+ KEY `appkey` (`appkey`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // ========== 第一批:订单、消息、商店相关表 ==========
+
+ // 8. order_mainlist - 订单主表
+ $tables['order_mainlist'] = "
+ CREATE TABLE IF NOT EXISTS `order_mainlist` (
+ `order_main_id` int(11) NOT NULL AUTO_INCREMENT,
+ `order_main_number` varchar(50) DEFAULT NULL,
+ `ctime` datetime DEFAULT NULL,
+ `paytime` datetime DEFAULT NULL,
+ `pay_status` tinyint(1) DEFAULT '0' COMMENT '支付状态',
+ `userid` bigint(20) DEFAULT NULL,
+ `pay_way` varchar(20) DEFAULT NULL COMMENT '支付方式',
+ `receiver_name` varchar(100) DEFAULT NULL COMMENT '收货人姓名',
+ `receiver_phone` varchar(20) DEFAULT NULL COMMENT '收货人电话',
+ `receiver_address` varchar(500) DEFAULT NULL COMMENT '收货地址',
+ `order_money` decimal(10,2) DEFAULT '0.00' COMMENT '订单金额',
+ `mtime` datetime DEFAULT NULL,
+ `total_money` decimal(10,2) DEFAULT '0.00' COMMENT '总金额',
+ `bill_no` varchar(100) DEFAULT NULL COMMENT '账单号',
+ PRIMARY KEY (`order_main_id`),
+ KEY `order_main_number` (`order_main_number`),
+ KEY `userid` (`userid`),
+ KEY `pay_status` (`pay_status`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 9. order_detail - 订单详情表
+ $tables['order_detail'] = "
+ CREATE TABLE IF NOT EXISTS `order_detail` (
+ `order_datail_id` int(11) NOT NULL AUTO_INCREMENT,
+ `order_id` int(11) DEFAULT NULL,
+ `goods_id` int(11) DEFAULT NULL,
+ `product_code` varchar(50) DEFAULT NULL COMMENT '商品编码',
+ `sale_price` decimal(10,2) DEFAULT '0.00' COMMENT '销售价格',
+ `goods_amount` decimal(10,2) DEFAULT '0.00' COMMENT '商品金额',
+ `goods_num` int(11) DEFAULT '0' COMMENT '商品数量',
+ PRIMARY KEY (`order_datail_id`),
+ KEY `order_id` (`order_id`),
+ KEY `goods_id` (`goods_id`),
+ KEY `product_code` (`product_code`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 10. order_consignee - 收货人表
+ $tables['order_consignee'] = "
+ CREATE TABLE IF NOT EXISTS `order_consignee` (
+ `consignee_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `name` varchar(100) DEFAULT NULL COMMENT '收货人姓名',
+ `address` varchar(500) DEFAULT NULL COMMENT '收货地址',
+ `mobile` varchar(20) DEFAULT NULL COMMENT '手机号',
+ `is_default` tinyint(1) DEFAULT '0' COMMENT '是否默认:0-否,1-是',
+ `is_del` tinyint(1) DEFAULT '0',
+ `ctime` datetime DEFAULT NULL,
+ `region` varchar(255) DEFAULT NULL COMMENT '地区',
+ PRIMARY KEY (`consignee_id`),
+ KEY `userid` (`userid`),
+ KEY `is_default` (`is_default`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 11. message_num - 消息数量表
+ $tables['message_num'] = "
+ CREATE TABLE IF NOT EXISTS `message_num` (
+ `message_num_id` int(11) NOT NULL AUTO_INCREMENT,
+ `message_id` int(11) DEFAULT NULL,
+ `user_type` varchar(50) DEFAULT NULL COMMENT '用户类型',
+ `ctime` datetime DEFAULT NULL,
+ `user_id` bigint(20) DEFAULT NULL,
+ PRIMARY KEY (`message_num_id`),
+ KEY `message_id` (`message_id`),
+ KEY `user_id` (`user_id`),
+ KEY `user_type` (`user_type`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 12. store_ad - 商店广告表
+ $tables['store_ad'] = "
+ CREATE TABLE IF NOT EXISTS `store_ad` (
+ `store_ad_id` int(11) NOT NULL AUTO_INCREMENT,
+ `store_id` int(11) DEFAULT NULL,
+ `push_txt` text COMMENT '推送文本',
+ `push_msg_templ` text COMMENT '推送消息模板',
+ `ad_pos` varchar(50) DEFAULT NULL COMMENT '广告位置',
+ `unit_id` int(11) DEFAULT NULL,
+ `area_id` int(11) DEFAULT NULL,
+ `building_id` int(11) DEFAULT NULL,
+ `start_time` datetime DEFAULT NULL COMMENT '开始时间',
+ `end_time` datetime DEFAULT NULL COMMENT '结束时间',
+ `img` varchar(500) DEFAULT NULL COMMENT '图片',
+ `is_del` tinyint(1) DEFAULT '0',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `title` varchar(255) DEFAULT NULL COMMENT '标题',
+ PRIMARY KEY (`store_ad_id`),
+ KEY `store_id` (`store_id`),
+ KEY `unit_id` (`unit_id`),
+ KEY `area_id` (`area_id`),
+ KEY `building_id` (`building_id`),
+ KEY `status` (`status`),
+ KEY `is_del` (`is_del`),
+ KEY `start_time` (`start_time`),
+ KEY `end_time` (`end_time`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 13. store_ad_cycle - 商店广告周期表
+ $tables['store_ad_cycle'] = "
+ CREATE TABLE IF NOT EXISTS `store_ad_cycle` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `area_id` int(11) DEFAULT NULL,
+ `building_id` int(11) DEFAULT NULL,
+ `unit_id` int(11) DEFAULT NULL,
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `store_ad_area_id` int(11) DEFAULT NULL,
+ `store_ad_building_id` int(11) DEFAULT NULL,
+ `store_ad_unit_id` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `area_id` (`area_id`),
+ KEY `building_id` (`building_id`),
+ KEY `unit_id` (`unit_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // ========== 第二批:服务相关表 ==========
+
+ // 14. serve_repair - 维修服务表
+ $tables['serve_repair'] = "
+ CREATE TABLE IF NOT EXISTS `serve_repair` (
+ `serve_repair_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `repair_type` varchar(50) DEFAULT NULL COMMENT '维修类型',
+ `repair_number` varchar(50) DEFAULT NULL COMMENT '维修单号',
+ `repair_user_name` varchar(100) DEFAULT NULL COMMENT '维修用户姓名',
+ `repair_user_phone` varchar(20) DEFAULT NULL COMMENT '维修用户电话',
+ `serve_address` varchar(500) DEFAULT NULL COMMENT '服务地址',
+ `repair_time` datetime DEFAULT NULL COMMENT '维修时间',
+ `repair_degree` varchar(50) DEFAULT NULL COMMENT '维修程度',
+ `repair_describe` text COMMENT '维修描述',
+ `repair_img` varchar(500) DEFAULT NULL COMMENT '维修图片',
+ `payment_id` varchar(100) DEFAULT NULL COMMENT '支付ID',
+ `payment_time` datetime DEFAULT NULL COMMENT '支付时间',
+ `repair_amount` decimal(10,2) DEFAULT '0.00' COMMENT '维修金额',
+ `repair_money` decimal(10,2) DEFAULT '0.00' COMMENT '维修费用',
+ `repair_state` tinyint(1) DEFAULT '0' COMMENT '维修状态',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `repair_serve_remark` text COMMENT '维修服务备注',
+ `repair_name` varchar(100) DEFAULT NULL COMMENT '维修名称',
+ `serve_payment_bill` varchar(100) DEFAULT NULL COMMENT '服务支付账单',
+ `user_home_id` int(11) DEFAULT NULL COMMENT '用户房产ID',
+ PRIMARY KEY (`serve_repair_id`),
+ KEY `userid` (`userid`),
+ KEY `repair_number` (`repair_number`),
+ KEY `repair_state` (`repair_state`),
+ KEY `is_del` (`is_del`),
+ KEY `user_home_id` (`user_home_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 15. serve_content - 服务内容表
+ $tables['serve_content'] = "
+ CREATE TABLE IF NOT EXISTS `serve_content` (
+ `serve_content_id` int(11) NOT NULL AUTO_INCREMENT,
+ `serve_content_name` varchar(255) DEFAULT NULL COMMENT '服务内容名称',
+ `serve_type` varchar(50) DEFAULT NULL COMMENT '服务类型',
+ `serve_category_id` int(11) DEFAULT NULL COMMENT '服务分类ID',
+ `serve_category_name` varchar(255) DEFAULT NULL COMMENT '服务分类名称',
+ `serve_content_price` decimal(10,2) DEFAULT '0.00' COMMENT '服务价格',
+ `serve_pic` varchar(500) DEFAULT NULL COMMENT '服务图片',
+ `serve_content_introduce` text COMMENT '服务介绍',
+ `serve_status` tinyint(1) DEFAULT '1' COMMENT '服务状态:0-禁用,1-启用',
+ `serve_hint` varchar(500) DEFAULT NULL COMMENT '服务提示',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`serve_content_id`),
+ KEY `serve_category_id` (`serve_category_id`),
+ KEY `serve_status` (`serve_status`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 16. serve_order - 服务订单表
+ $tables['serve_order'] = "
+ CREATE TABLE IF NOT EXISTS `serve_order` (
+ `serve_order_id` int(11) NOT NULL AUTO_INCREMENT,
+ `serve_order_number` varchar(50) DEFAULT NULL COMMENT '服务订单号',
+ `userid` bigint(20) DEFAULT NULL,
+ `serve_type` varchar(50) DEFAULT NULL COMMENT '服务类型',
+ `serve_order_money` decimal(10,2) DEFAULT '0.00' COMMENT '订单金额',
+ `serve_order_status` tinyint(1) DEFAULT '0' COMMENT '订单状态',
+ `serve_payment_time` datetime DEFAULT NULL COMMENT '支付时间',
+ `serve_finish_time` datetime DEFAULT NULL COMMENT '完成时间',
+ `serve_payment_bill` varchar(100) DEFAULT NULL COMMENT '支付账单',
+ `payment_id` varchar(100) DEFAULT NULL COMMENT '支付ID',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `serve_orderl_amount` decimal(10,2) DEFAULT '0.00' COMMENT '订单总额',
+ `serve_order_note` text COMMENT '订单备注',
+ `serve_user_name` varchar(100) DEFAULT NULL COMMENT '服务用户姓名',
+ `serve_user_phone` varchar(20) DEFAULT NULL COMMENT '服务用户电话',
+ `serve_start_time` datetime DEFAULT NULL COMMENT '服务开始时间',
+ `serve_address` varchar(500) DEFAULT NULL COMMENT '服务地址',
+ `serve_room_square` decimal(10,2) DEFAULT NULL COMMENT '房间面积',
+ `serve_content_id` int(11) DEFAULT NULL COMMENT '服务内容ID',
+ `serve_content_name` varchar(255) DEFAULT NULL COMMENT '服务内容名称',
+ `user_home_id` int(11) DEFAULT NULL COMMENT '用户房产ID',
+ PRIMARY KEY (`serve_order_id`),
+ KEY `serve_order_number` (`serve_order_number`),
+ KEY `userid` (`userid`),
+ KEY `serve_order_status` (`serve_order_status`),
+ KEY `is_del` (`is_del`),
+ KEY `serve_content_id` (`serve_content_id`),
+ KEY `user_home_id` (`user_home_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 17. serve_category - 服务分类表
+ $tables['serve_category'] = "
+ CREATE TABLE IF NOT EXISTS `serve_category` (
+ `serve_category_id` int(11) NOT NULL AUTO_INCREMENT,
+ `serve_parent_category_id` int(11) DEFAULT '0' COMMENT '父分类ID',
+ `serve_category_name` varchar(255) DEFAULT NULL COMMENT '分类名称',
+ `serve_is_show` tinyint(1) DEFAULT '1' COMMENT '是否显示:0-隐藏,1-显示',
+ `serve_category_sort` int(11) DEFAULT '0' COMMENT '排序',
+ `serve_category_icon` varchar(500) DEFAULT NULL COMMENT '分类图标',
+ `hid` varchar(255) DEFAULT NULL COMMENT '层级ID',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`serve_category_id`),
+ KEY `serve_parent_category_id` (`serve_parent_category_id`),
+ KEY `serve_is_show` (`serve_is_show`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // ========== 第三批:动态、系统相关表 ==========
+
+ // 18. trend_home - 动态首页表
+ $tables['trend_home'] = "
+ CREATE TABLE IF NOT EXISTS `trend_home` (
+ `home_id` int(11) NOT NULL AUTO_INCREMENT,
+ `package` varchar(100) DEFAULT NULL COMMENT '包名',
+ `pid` int(11) DEFAULT '0' COMMENT '父ID',
+ `hid` varchar(255) DEFAULT NULL COMMENT '层级ID',
+ `grade` int(11) DEFAULT '0' COMMENT '级别',
+ `home_name` varchar(255) DEFAULT NULL COMMENT '名称',
+ `area` varchar(100) DEFAULT NULL COMMENT '区域',
+ `p_1` varchar(255) DEFAULT NULL,
+ `p_2` varchar(255) DEFAULT NULL,
+ `sort_order` int(11) DEFAULT '0' COMMENT '排序',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ PRIMARY KEY (`home_id`),
+ KEY `pid` (`pid`),
+ KEY `status` (`status`),
+ KEY `sort_order` (`sort_order`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 19. trend_attachment - 动态附件表
+ $tables['trend_attachment'] = "
+ CREATE TABLE IF NOT EXISTS `trend_attachment` (
+ `attachmentid` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `title` varchar(255) DEFAULT NULL COMMENT '标题',
+ `description` text COMMENT '描述',
+ `label` varchar(255) DEFAULT NULL COMMENT '标签',
+ `mediatype` varchar(50) DEFAULT NULL COMMENT '媒体类型',
+ `mimetype` varchar(100) DEFAULT NULL COMMENT 'MIME类型',
+ `suffix` varchar(20) DEFAULT NULL COMMENT '后缀',
+ `imageable` tinyint(1) DEFAULT '0' COMMENT '是否图片',
+ `image_width` int(11) DEFAULT NULL COMMENT '图片宽度',
+ `image_height` int(11) DEFAULT NULL COMMENT '图片高度',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `filepath` varchar(500) DEFAULT NULL COMMENT '文件路径',
+ `filesize` bigint(20) DEFAULT NULL COMMENT '文件大小',
+ `hashcode` varchar(100) DEFAULT NULL COMMENT '哈希码',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态',
+ `rev` int(11) DEFAULT NULL COMMENT '版本',
+ `scene_id` int(11) DEFAULT NULL COMMENT '场景ID',
+ PRIMARY KEY (`attachmentid`),
+ KEY `userid` (`userid`),
+ KEY `status` (`status`),
+ KEY `scene_id` (`scene_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 20. trend_region - 动态区域表
+ $tables['trend_region'] = "
+ CREATE TABLE IF NOT EXISTS `trend_region` (
+ `region_id` int(11) NOT NULL AUTO_INCREMENT,
+ `package` varchar(100) DEFAULT NULL COMMENT '包名',
+ `pid` int(11) DEFAULT '0' COMMENT '父ID',
+ `hid` varchar(255) DEFAULT NULL COMMENT '层级ID',
+ `grade` int(11) DEFAULT '0' COMMENT '级别',
+ `region_name` varchar(255) DEFAULT NULL COMMENT '区域名称',
+ `en_name` varchar(255) DEFAULT NULL COMMENT '英文名称',
+ `p_1` varchar(255) DEFAULT NULL,
+ `p_2` varchar(255) DEFAULT NULL,
+ `sort_order` int(11) DEFAULT '0' COMMENT '排序',
+ `disabled` tinyint(1) DEFAULT '0' COMMENT '是否禁用:0-否,1-是',
+ PRIMARY KEY (`region_id`),
+ KEY `pid` (`pid`),
+ KEY `disabled` (`disabled`),
+ KEY `sort_order` (`sort_order`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 21. system_version - 系统版本表
+ $tables['system_version'] = "
+ CREATE TABLE IF NOT EXISTS `system_version` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `platform` varchar(50) DEFAULT NULL COMMENT '平台:android/ios',
+ `v_code` int(11) DEFAULT NULL COMMENT '版本代码',
+ `v_name` varchar(50) DEFAULT NULL COMMENT '版本名称',
+ `content` text COMMENT '更新内容',
+ `filepath` varchar(500) DEFAULT NULL COMMENT '文件路径',
+ `size` bigint(20) DEFAULT NULL COMMENT '文件大小',
+ `filepath_tdc` varchar(500) DEFAULT NULL COMMENT 'TDC文件路径',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `platform` (`platform`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 22. system_jiguang - 极光推送表
+ $tables['system_jiguang'] = "
+ CREATE TABLE IF NOT EXISTS `system_jiguang` (
+ `jg_id` int(11) NOT NULL AUTO_INCREMENT,
+ `village_id` int(11) DEFAULT NULL COMMENT '小区ID',
+ `building_id` int(11) DEFAULT NULL COMMENT '楼栋ID',
+ `unit_id` int(11) DEFAULT NULL COMMENT '单元ID',
+ `jiguang_id` varchar(255) DEFAULT NULL COMMENT '极光ID',
+ `ctime` datetime DEFAULT NULL,
+ PRIMARY KEY (`jg_id`),
+ KEY `village_id` (`village_id`),
+ KEY `building_id` (`building_id`),
+ KEY `unit_id` (`unit_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 23. system_feedback - 系统反馈表
+ $tables['system_feedback'] = "
+ CREATE TABLE IF NOT EXISTS `system_feedback` (
+ `feedback_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `content` text COMMENT '反馈内容',
+ `phone` varchar(20) DEFAULT NULL COMMENT '联系电话',
+ `username` varchar(100) DEFAULT NULL COMMENT '用户名',
+ `feedback_reply` text COMMENT '反馈回复',
+ `feedback_status` tinyint(1) DEFAULT '0' COMMENT '反馈状态:0-待处理,1-已处理',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`feedback_id`),
+ KEY `userid` (`userid`),
+ KEY `feedback_status` (`feedback_status`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 23.1. system_report - 系统报表表
+ $tables['system_report'] = "
+ CREATE TABLE IF NOT EXISTS `system_report` (
+ `report_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL COMMENT '用户ID',
+ `report_type` varchar(50) DEFAULT NULL COMMENT '报表类型',
+ `report_title` varchar(255) DEFAULT NULL COMMENT '报表标题',
+ `report_content` text COMMENT '报表内容',
+ `report_data` text COMMENT '报表数据(JSON格式)',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL COMMENT '创建时间',
+ `mtime` datetime DEFAULT NULL COMMENT '更新时间',
+ `is_del` tinyint(1) DEFAULT '0' COMMENT '是否删除',
+ PRIMARY KEY (`report_id`),
+ KEY `userid` (`userid`),
+ KEY `report_type` (`report_type`),
+ KEY `status` (`status`),
+ KEY `is_del` (`is_del`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // ========== 第四批:车库、门禁相关表 ==========
+
+ // 24. garage_user - 车库用户表
+ $tables['garage_user'] = "
+ CREATE TABLE IF NOT EXISTS `garage_user` (
+ `garage_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `phone` varchar(20) DEFAULT NULL COMMENT '电话',
+ `garage_sn` varchar(100) DEFAULT NULL COMMENT '车库编号',
+ `is_verify` tinyint(1) DEFAULT '0' COMMENT '是否验证:0-未验证,1-已验证',
+ `is_del` tinyint(1) DEFAULT '0',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `number_plate_all` varchar(100) DEFAULT NULL COMMENT '完整车牌号',
+ `garage_list_id` int(11) DEFAULT NULL COMMENT '车库列表ID',
+ `garage_fee` decimal(10,2) DEFAULT '0.00' COMMENT '车库费用',
+ PRIMARY KEY (`garage_id`),
+ KEY `userid` (`userid`),
+ KEY `garage_sn` (`garage_sn`),
+ KEY `is_verify` (`is_verify`),
+ KEY `is_del` (`is_del`),
+ KEY `garage_list_id` (`garage_list_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 25. garage_rent_log - 车库租赁日志表
+ $tables['garage_rent_log'] = "
+ CREATE TABLE IF NOT EXISTS `garage_rent_log` (
+ `rent_log_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `phone` varchar(20) DEFAULT NULL COMMENT '电话',
+ `garage_sn` varchar(100) DEFAULT NULL COMMENT '车库编号',
+ `owner_id` bigint(20) DEFAULT NULL COMMENT '车主ID',
+ `order_sn` varchar(100) DEFAULT NULL COMMENT '订单号',
+ `type` varchar(50) DEFAULT NULL COMMENT '类型',
+ `number_plate` varchar(50) DEFAULT NULL COMMENT '车牌号',
+ `plate_first` varchar(10) DEFAULT NULL COMMENT '车牌前缀',
+ `total_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总金额',
+ `true_amount` decimal(10,2) DEFAULT '0.00' COMMENT '实付金额',
+ `time_span` int(11) DEFAULT NULL COMMENT '时间跨度(分钟)',
+ `into_time` datetime DEFAULT NULL COMMENT '进入时间',
+ `pre_leave_time` datetime DEFAULT NULL COMMENT '预计离开时间',
+ `true_leave_time` datetime DEFAULT NULL COMMENT '实际离开时间',
+ `status` tinyint(1) DEFAULT '0' COMMENT '状态',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `garage_order_status` tinyint(1) DEFAULT '0' COMMENT '车库订单状态',
+ `garage_renew_status` tinyint(1) DEFAULT '0' COMMENT '车库续费状态',
+ PRIMARY KEY (`rent_log_id`),
+ KEY `userid` (`userid`),
+ KEY `garage_sn` (`garage_sn`),
+ KEY `order_sn` (`order_sn`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 26. garage_rent - 车库租赁表
+ $tables['garage_rent'] = "
+ CREATE TABLE IF NOT EXISTS `garage_rent` (
+ `rent_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `name` varchar(100) DEFAULT NULL COMMENT '姓名',
+ `phone` varchar(20) DEFAULT NULL COMMENT '电话',
+ `garage_sn` varchar(100) DEFAULT NULL COMMENT '车库编号',
+ `garage_id` int(11) DEFAULT NULL COMMENT '车库ID',
+ `type` varchar(50) DEFAULT NULL COMMENT '类型',
+ `date` date DEFAULT NULL COMMENT '日期',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `start_time` datetime DEFAULT NULL COMMENT '开始时间',
+ `end_time` datetime DEFAULT NULL COMMENT '结束时间',
+ `week` varchar(20) DEFAULT NULL COMMENT '星期',
+ PRIMARY KEY (`rent_id`),
+ KEY `userid` (`userid`),
+ KEY `garage_sn` (`garage_sn`),
+ KEY `garage_id` (`garage_id`),
+ KEY `date` (`date`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 27. garage_list - 车库列表表
+ $tables['garage_list'] = "
+ CREATE TABLE IF NOT EXISTS `garage_list` (
+ `garage_list_id` int(11) NOT NULL AUTO_INCREMENT,
+ `garage_sn` varchar(100) DEFAULT NULL COMMENT '车库编号',
+ `ctime` datetime DEFAULT NULL,
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ PRIMARY KEY (`garage_list_id`),
+ KEY `garage_sn` (`garage_sn`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 28. door_verification - 门禁验证表
+ $tables['door_verification'] = "
+ CREATE TABLE IF NOT EXISTS `door_verification` (
+ `door_verification_id` int(11) NOT NULL AUTO_INCREMENT,
+ `village_id` int(11) DEFAULT NULL COMMENT '小区ID',
+ `building_id` int(11) DEFAULT NULL COMMENT '楼栋ID',
+ `unit_id` int(11) DEFAULT NULL COMMENT '单元ID',
+ `floor_id` int(11) DEFAULT NULL COMMENT '楼层ID',
+ `door_verification_code` varchar(100) DEFAULT NULL COMMENT '门禁验证码',
+ `userid` bigint(20) DEFAULT NULL,
+ `is_valid` tinyint(1) DEFAULT '1' COMMENT '是否有效:0-无效,1-有效',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `qrcode` varchar(500) DEFAULT NULL COMMENT '二维码',
+ `end_time` datetime DEFAULT NULL COMMENT '结束时间',
+ `customer_phone` varchar(20) DEFAULT NULL COMMENT '客户电话',
+ `user_auth` varchar(100) DEFAULT NULL COMMENT '用户授权',
+ `is_sync` tinyint(1) DEFAULT '0' COMMENT '是否同步:0-未同步,1-已同步',
+ PRIMARY KEY (`door_verification_id`),
+ KEY `village_id` (`village_id`),
+ KEY `building_id` (`building_id`),
+ KEY `unit_id` (`unit_id`),
+ KEY `userid` (`userid`),
+ KEY `is_valid` (`is_valid`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 29. door_device - 门禁设备表
+ $tables['door_device'] = "
+ CREATE TABLE IF NOT EXISTS `door_device` (
+ `door_device_id` int(11) NOT NULL AUTO_INCREMENT,
+ `residential_id` int(11) DEFAULT NULL COMMENT '住宅ID',
+ `building_id` int(11) DEFAULT NULL COMMENT '楼栋ID',
+ `unit_id` int(11) DEFAULT NULL COMMENT '单元ID',
+ `device_sn` varchar(100) DEFAULT NULL COMMENT '设备序列号',
+ `device_ip` varchar(50) DEFAULT NULL COMMENT '设备IP',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `device_type` varchar(50) DEFAULT NULL COMMENT '设备类型',
+ `device_port` int(11) DEFAULT NULL COMMENT '设备端口',
+ PRIMARY KEY (`door_device_id`),
+ KEY `residential_id` (`residential_id`),
+ KEY `building_id` (`building_id`),
+ KEY `unit_id` (`unit_id`),
+ KEY `device_sn` (`device_sn`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // ========== 第五批:用户相关表(Cas) ==========
+
+ // 30. cas_user_family - 用户家庭成员表
+ $tables['cas_user_family'] = "
+ CREATE TABLE IF NOT EXISTS `cas_user_family` (
+ `f_id` int(11) NOT NULL AUTO_INCREMENT,
+ `pid` bigint(20) DEFAULT NULL COMMENT '用户ID',
+ `member_id` bigint(20) DEFAULT NULL COMMENT '成员ID',
+ `member_name` varchar(100) DEFAULT NULL COMMENT '成员姓名',
+ `phone` varchar(20) DEFAULT NULL COMMENT '电话',
+ `is_del` tinyint(1) DEFAULT '0',
+ `is_fingerpint` tinyint(1) DEFAULT '0' COMMENT '是否有指纹:0-否,1-是',
+ `ctime` datetime DEFAULT NULL,
+ `user_home_id` int(11) DEFAULT NULL COMMENT '用户房产ID',
+ PRIMARY KEY (`f_id`),
+ KEY `pid` (`pid`),
+ KEY `member_id` (`member_id`),
+ KEY `is_del` (`is_del`),
+ KEY `user_home_id` (`user_home_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 31. cas_user_car - 用户车辆表
+ $tables['cas_user_car'] = "
+ CREATE TABLE IF NOT EXISTS `cas_user_car` (
+ `car_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `plate_first` varchar(10) DEFAULT NULL COMMENT '车牌前缀',
+ `number_plate` varchar(50) DEFAULT NULL COMMENT '车牌号',
+ `name` varchar(100) DEFAULT NULL COMMENT '车主姓名',
+ `phone` varchar(20) DEFAULT NULL COMMENT '电话',
+ `ctime` datetime DEFAULT NULL,
+ `garage_sn` varchar(100) DEFAULT NULL COMMENT '车库编号',
+ `garage_id` int(11) DEFAULT NULL COMMENT '车库ID',
+ PRIMARY KEY (`car_id`),
+ KEY `userid` (`userid`),
+ KEY `garage_sn` (`garage_sn`),
+ KEY `garage_id` (`garage_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 32. cas_user_bill - 用户账单表
+ $tables['cas_user_bill'] = "
+ CREATE TABLE IF NOT EXISTS `cas_user_bill` (
+ `cas_user_bill_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `bill_number` varchar(100) DEFAULT NULL COMMENT '账单号',
+ `bill_type` varchar(50) DEFAULT NULL COMMENT '账单类型',
+ `bill_type_name` varchar(255) DEFAULT NULL COMMENT '账单类型名称',
+ `bill_amount` decimal(10,2) DEFAULT '0.00' COMMENT '账单金额',
+ `bill_status` tinyint(1) DEFAULT '0' COMMENT '账单状态',
+ `ctime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `task_payment_bill` varchar(100) DEFAULT NULL COMMENT '任务支付账单',
+ `home_member_id` int(11) DEFAULT NULL COMMENT '房产成员ID',
+ `payment_id` varchar(100) DEFAULT NULL COMMENT '支付ID',
+ `comment_temp_record_id` int(11) DEFAULT NULL COMMENT '评论临时记录ID',
+ `payment_amount_explain` text COMMENT '支付金额说明',
+ PRIMARY KEY (`cas_user_bill_id`),
+ KEY `userid` (`userid`),
+ KEY `bill_number` (`bill_number`),
+ KEY `bill_status` (`bill_status`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 33. cas_user_fingerprint - 用户指纹表
+ $tables['cas_user_fingerprint'] = "
+ CREATE TABLE IF NOT EXISTS `cas_user_fingerprint` (
+ `fp_id` int(11) NOT NULL AUTO_INCREMENT,
+ `pid` bigint(20) DEFAULT NULL COMMENT '用户ID',
+ `member_name` varchar(100) DEFAULT NULL COMMENT '成员姓名',
+ `phone` varchar(20) DEFAULT NULL COMMENT '电话',
+ `is_del` tinyint(1) DEFAULT '0',
+ `is_fingerpint` tinyint(1) DEFAULT '0' COMMENT '是否有指纹:0-否,1-是',
+ `ctime` datetime DEFAULT NULL,
+ `user_home_id` int(11) DEFAULT NULL COMMENT '用户房产ID',
+ PRIMARY KEY (`fp_id`),
+ KEY `pid` (`pid`),
+ KEY `is_del` (`is_del`),
+ KEY `user_home_id` (`user_home_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 34. cas_user_cart - 用户购物车表
+ $tables['cas_user_cart'] = "
+ CREATE TABLE IF NOT EXISTS `cas_user_cart` (
+ `cart_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `goods_id` int(11) DEFAULT NULL COMMENT '商品ID',
+ `product_code` varchar(50) DEFAULT NULL COMMENT '商品编码',
+ `sale_num` int(11) DEFAULT '0' COMMENT '销售数量',
+ `ctime` datetime DEFAULT NULL,
+ PRIMARY KEY (`cart_id`),
+ KEY `userid` (`userid`),
+ KEY `goods_id` (`goods_id`),
+ KEY `product_code` (`product_code`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 35. cas_fingerprint - 指纹表
+ $tables['cas_fingerprint'] = "
+ CREATE TABLE IF NOT EXISTS `cas_fingerprint` (
+ `user_fingerprint_id` int(11) NOT NULL AUTO_INCREMENT,
+ `userid` bigint(20) DEFAULT NULL,
+ `user_fingerprint` text COMMENT '指纹数据',
+ `user_finger` varchar(50) DEFAULT NULL COMMENT '手指',
+ `user_card_number` varchar(100) DEFAULT NULL COMMENT '用户卡号',
+ `user_residential_id` int(11) DEFAULT NULL COMMENT '用户住宅ID',
+ `user_building_id` int(11) DEFAULT NULL COMMENT '用户楼栋ID',
+ `user_unit_id` int(11) DEFAULT NULL COMMENT '用户单元ID',
+ `door_device_id` int(11) DEFAULT NULL COMMENT '门禁设备ID',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ `user_home_id` int(11) DEFAULT NULL COMMENT '用户房产ID',
+ PRIMARY KEY (`user_fingerprint_id`),
+ KEY `userid` (`userid`),
+ KEY `user_residential_id` (`user_residential_id`),
+ KEY `user_building_id` (`user_building_id`),
+ KEY `user_unit_id` (`user_unit_id`),
+ KEY `door_device_id` (`door_device_id`),
+ KEY `is_del` (`is_del`),
+ KEY `user_home_id` (`user_home_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // ========== 第六批:文章、广告、管理员相关表 ==========
+
+ // 36. article_content - 文章内容表
+ $tables['article_content'] = "
+ CREATE TABLE IF NOT EXISTS `article_content` (
+ `article_id` int(11) NOT NULL AUTO_INCREMENT,
+ `category_id` int(11) DEFAULT NULL COMMENT '分类ID',
+ `category_parent_id` int(11) DEFAULT '0' COMMENT '父分类ID',
+ `article_title` varchar(255) DEFAULT NULL COMMENT '文章标题',
+ `artice_content` text COMMENT '文章内容',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `artice_status` tinyint(1) DEFAULT '1' COMMENT '文章状态:0-禁用,1-启用',
+ `is_del` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`article_id`),
+ KEY `category_id` (`category_id`),
+ KEY `category_parent_id` (`category_parent_id`),
+ KEY `artice_status` (`artice_status`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 37. article_category - 文章分类表
+ $tables['article_category'] = "
+ CREATE TABLE IF NOT EXISTS `article_category` (
+ `category_id` int(11) NOT NULL AUTO_INCREMENT,
+ `category_parent_id` int(11) DEFAULT '0' COMMENT '父分类ID',
+ `category_name` varchar(255) DEFAULT NULL COMMENT '分类名称',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `is_del` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`category_id`),
+ KEY `category_parent_id` (`category_parent_id`),
+ KEY `is_status` (`is_status`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 38. advert_category - 广告分类表
+ $tables['advert_category'] = "
+ CREATE TABLE IF NOT EXISTS `advert_category` (
+ `advert_category_id` int(11) NOT NULL AUTO_INCREMENT,
+ `advert_category_name` varchar(255) DEFAULT NULL COMMENT '广告分类名称',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ `is_del` tinyint(1) DEFAULT '0',
+ PRIMARY KEY (`advert_category_id`),
+ KEY `is_del` (`is_del`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 39. admin_group - 管理员组表
+ $tables['admin_group'] = "
+ CREATE TABLE IF NOT EXISTS `admin_group` (
+ `groupid` int(11) NOT NULL AUTO_INCREMENT,
+ `groupname` varchar(100) NOT NULL COMMENT '组名',
+ `description` text COMMENT '描述',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ PRIMARY KEY (`groupid`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 40. admin_user_group - 管理员用户组关联表
+ $tables['admin_user_group'] = "
+ CREATE TABLE IF NOT EXISTS `admin_user_group` (
+ `userid` int(11) NOT NULL COMMENT '用户ID',
+ `groupid` int(11) NOT NULL COMMENT '组ID',
+ `username` varchar(100) DEFAULT NULL COMMENT '用户名',
+ PRIMARY KEY (`userid`, `groupid`),
+ KEY `username` (`username`),
+ KEY `groupid` (`groupid`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 41. admin_user - 管理员用户表
+ $tables['admin_user'] = "
+ CREATE TABLE IF NOT EXISTS `admin_user` (
+ `userid` int(11) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) NOT NULL COMMENT '用户名',
+ `password` varchar(255) NOT NULL COMMENT '密码',
+ `email` varchar(100) DEFAULT NULL COMMENT '邮箱',
+ `nickname` varchar(100) DEFAULT NULL COMMENT '昵称',
+ `fullname` varchar(100) DEFAULT NULL COMMENT '全名',
+ `gender` tinyint(1) DEFAULT '0' COMMENT '性别:0-未知,1-男,2-女',
+ `idcard` varchar(20) DEFAULT NULL COMMENT '身份证号',
+ `ctime` datetime DEFAULT NULL,
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ PRIMARY KEY (`userid`),
+ UNIQUE KEY `username` (`username`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 42. admin_app - 管理员应用表(根据代码推断,可能需要)
+ $tables['admin_app'] = "
+ CREATE TABLE IF NOT EXISTS `admin_app` (
+ `appkey` varchar(100) NOT NULL COMMENT '应用键',
+ `appname` varchar(255) DEFAULT NULL COMMENT '应用名称',
+ `description` text COMMENT '描述',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`appkey`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 43. admin_log - 管理员日志表
+ $tables['admin_log'] = "
+ CREATE TABLE IF NOT EXISTS `admin_log` (
+ `log_id` int(11) NOT NULL AUTO_INCREMENT,
+ `username` varchar(100) DEFAULT NULL COMMENT '用户名',
+ `groupname` varchar(100) DEFAULT NULL COMMENT '组名',
+ `option` varchar(500) DEFAULT NULL COMMENT '操作内容',
+ `ctime` datetime DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`log_id`),
+ KEY `username` (`username`),
+ KEY `groupname` (`groupname`),
+ KEY `ctime` (`ctime`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // ========== 第七批:前端菜单和支付相关表 ==========
+
+ // 44. system_frontend_menu - 系统前端菜单表
+ $tables['system_frontend_menu'] = "
+ CREATE TABLE IF NOT EXISTS `system_frontend_menu` (
+ `menu_id` int(11) NOT NULL AUTO_INCREMENT,
+ `group_id` int(11) DEFAULT '1' COMMENT '菜单组ID',
+ `pid` int(11) DEFAULT '0' COMMENT '父菜单ID',
+ `hid` varchar(255) DEFAULT NULL COMMENT '层级ID',
+ `menu` varchar(255) DEFAULT NULL COMMENT '菜单名称',
+ `link_type` varchar(50) DEFAULT NULL COMMENT '链接类型',
+ `appkey` varchar(100) DEFAULT NULL COMMENT '应用键',
+ `folder` varchar(255) DEFAULT NULL COMMENT '文件夹',
+ `url` varchar(500) DEFAULT NULL COMMENT 'URL地址',
+ `if_show` tinyint(1) DEFAULT '1' COMMENT '是否显示:0-隐藏,1-显示,-1-删除',
+ `sort_order` int(11) DEFAULT '0' COMMENT '排序',
+ `target` varchar(50) DEFAULT NULL COMMENT '打开方式',
+ `icon` varchar(255) DEFAULT NULL COMMENT '图标',
+ `icon_bg` varchar(255) DEFAULT NULL COMMENT '图标背景',
+ PRIMARY KEY (`menu_id`),
+ KEY `group_id` (`group_id`),
+ KEY `pid` (`pid`),
+ KEY `if_show` (`if_show`),
+ KEY `sort_order` (`sort_order`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 45. system_frontend_menu_group - 系统前端菜单组表
+ $tables['system_frontend_menu_group'] = "
+ CREATE TABLE IF NOT EXISTS `system_frontend_menu_group` (
+ `group_id` int(11) NOT NULL AUTO_INCREMENT,
+ `group_name` varchar(255) DEFAULT NULL COMMENT '组名',
+ `description` text COMMENT '描述',
+ `sort_order` int(11) DEFAULT '0' COMMENT '排序',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`group_id`),
+ KEY `status` (`status`),
+ KEY `sort_order` (`sort_order`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 46. admin_frontend_menu - 管理员前端菜单表
+ $tables['admin_frontend_menu'] = "
+ CREATE TABLE IF NOT EXISTS `admin_frontend_menu` (
+ `menu_id` int(11) NOT NULL AUTO_INCREMENT,
+ `group_id` int(11) DEFAULT '1' COMMENT '菜单组ID',
+ `pid` int(11) DEFAULT '0' COMMENT '父菜单ID',
+ `menu` varchar(255) DEFAULT NULL COMMENT '菜单名称',
+ `link_type` varchar(50) DEFAULT NULL COMMENT '链接类型',
+ `appkey` varchar(100) DEFAULT NULL COMMENT '应用键',
+ `folder` varchar(255) DEFAULT NULL COMMENT '文件夹',
+ `url` varchar(500) DEFAULT NULL COMMENT 'URL地址',
+ `if_show` tinyint(1) DEFAULT '1' COMMENT '是否显示:0-隐藏,1-显示',
+ `sort_order` int(11) DEFAULT '0' COMMENT '排序',
+ `target` varchar(50) DEFAULT NULL COMMENT '打开方式',
+ PRIMARY KEY (`menu_id`),
+ KEY `group_id` (`group_id`),
+ KEY `pid` (`pid`),
+ KEY `if_show` (`if_show`),
+ KEY `sort_order` (`sort_order`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 47. admin_frontend_menu_group - 管理员前端菜单组表
+ $tables['admin_frontend_menu_group'] = "
+ CREATE TABLE IF NOT EXISTS `admin_frontend_menu_group` (
+ `group_id` int(11) NOT NULL AUTO_INCREMENT,
+ `group_name` varchar(255) DEFAULT NULL COMMENT '组名',
+ `description` text COMMENT '描述',
+ `sort_order` int(11) DEFAULT '0' COMMENT '排序',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`group_id`),
+ KEY `status` (`status`),
+ KEY `sort_order` (`sort_order`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 48. system_payment_fee - 系统支付费用表
+ $tables['system_payment_fee'] = "
+ CREATE TABLE IF NOT EXISTS `system_payment_fee` (
+ `fee_id` int(11) NOT NULL AUTO_INCREMENT,
+ `money` decimal(10,2) DEFAULT '0.00' COMMENT '金额',
+ `fee_type` varchar(50) DEFAULT NULL COMMENT '费用类型',
+ `fee_name` varchar(255) DEFAULT NULL COMMENT '费用名称',
+ `description` text COMMENT '描述',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`fee_id`),
+ KEY `fee_type` (`fee_type`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ // 执行创建表
+ $success_count = 0;
+ $error_count = 0;
+
+ echo "开始创建表...
";
+
+ foreach ($tables as $table_name => $sql) {
+ try {
+ $pdo->exec($sql);
+ echo "✓ 表 {$table_name} 创建成功
";
+ $success_count++;
+ } catch (PDOException $e) {
+ echo "✗ 表 {$table_name} 创建失败: " . $e->getMessage() . "
";
+ $error_count++;
+ }
+ }
+
+ echo "
";
+ echo "初始化完成
";
+ echo "成功创建: {$success_count} 个表
";
+ if ($error_count > 0) {
+ echo "失败: {$error_count} 个表
";
+ }
+
+ // 显示已创建的表
+ echo "
数据库中的表列表:
";
+ $stmt = $pdo->query("SHOW TABLES");
+ $tables_list = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ echo "";
+ foreach ($tables_list as $table) {
+ echo "- {$table}
";
+ }
+ echo "
";
+
+ echo "
";
+ echo "数据库初始化完成!
";
+ echo "访问后台管理 | 返回首页
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库连接失败: " . $e->getMessage() . "
";
+ echo "错误代码: " . $e->getCode() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/init_database.php b/wy/server/public/init_database.php
new file mode 100644
index 0000000..b06f405
--- /dev/null
+++ b/wy/server/public/init_database.php
@@ -0,0 +1,81 @@
+数据库表结构初始化";
+
+try {
+ // 连接数据库
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+ echo "✓ 成功连接到数据库 '{$dbname}'
";
+
+ // 创建 system_navigation 表
+ $sql_navigation = "
+ CREATE TABLE IF NOT EXISTS `system_navigation` (
+ `navigation_id` int(11) NOT NULL AUTO_INCREMENT,
+ `parent_id` int(11) DEFAULT '0',
+ `hid` varchar(255) DEFAULT NULL,
+ `title` varchar(255) NOT NULL,
+ `link` varchar(255) DEFAULT NULL,
+ `load_type` tinyint(1) DEFAULT '0' COMMENT '加载类型:0-普通,1-AJAX',
+ `description` text,
+ `icon` varchar(255) DEFAULT NULL,
+ `icon_bg` varchar(255) DEFAULT NULL,
+ `sort_order` int(11) DEFAULT '0',
+ `status` tinyint(1) DEFAULT '1' COMMENT '状态:0-禁用,1-启用',
+ `ctime` datetime DEFAULT NULL,
+ `mtime` datetime DEFAULT NULL,
+ PRIMARY KEY (`navigation_id`),
+ KEY `parent_id` (`parent_id`),
+ KEY `status` (`status`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ ";
+
+ $pdo->exec($sql_navigation);
+ echo "✓ 表 system_navigation 创建成功
";
+
+ // 检查其他可能需要的表
+ $tables_to_check = [
+ 'system_config',
+ 'system_user',
+ 'system_group',
+ 'system_permission',
+ 'goods_content',
+ 'goods_detail',
+ 'order_content',
+ 'cas_user'
+ ];
+
+ echo "
检查其他表...
";
+ foreach ($tables_to_check as $table) {
+ $stmt = $pdo->query("SHOW TABLES LIKE '{$table}'");
+ if ($stmt->rowCount() > 0) {
+ echo "✓ 表 {$table} 已存在
";
+ } else {
+ echo "⚠ 表 {$table} 不存在(可能需要导入完整数据库结构)
";
+ }
+ }
+
+ echo "
";
+ echo "初始化完成
";
+ echo "system_navigation 表已创建!
";
+ echo "现在可以访问:后台管理
";
+ echo "注意:如果还有其他表缺失,需要导入完整的数据库结构SQL文件
";
+
+} catch (PDOException $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+ echo "错误代码: " . $e->getCode() . "
";
+}
+
diff --git a/wy/server/public/init_navigation.php b/wy/server/public/init_navigation.php
new file mode 100644
index 0000000..5dd03d7
--- /dev/null
+++ b/wy/server/public/init_navigation.php
@@ -0,0 +1,222 @@
+初始化导航菜单";
+echo "";
+echo "初始化导航菜单数据
";
+
+try {
+ // 连接数据库
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库 '{$dbname}'
";
+ echo "
";
+
+ // 检查表是否存在
+ $stmt = $pdo->query("SHOW TABLES LIKE 'system_navigation'");
+ if ($stmt->rowCount() == 0) {
+ echo "✗ system_navigation 表不存在,请先运行 init_all_tables.php
";
+ exit;
+ }
+
+ // 检查是否已有数据
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM system_navigation");
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($row['count'] > 0) {
+ echo "⚠ system_navigation 表中已有 {$row['count']} 条记录
";
+ echo "是否要清空并重新初始化?是,重新初始化 | 否,跳过
";
+
+ if (!isset($_GET['force'])) {
+ echo "
当前导航数据:
";
+ $stmt = $pdo->query("SELECT * FROM system_navigation ORDER BY sort_order, navigation_id");
+ $navs = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ echo "";
+ echo "| ID | 标题 | HID | 链接 | 父ID | 状态 |
";
+ foreach ($navs as $nav) {
+ echo "";
+ echo "| {$nav['navigation_id']} | ";
+ echo "{$nav['title']} | ";
+ echo "{$nav['hid']} | ";
+ echo "{$nav['link']} | ";
+ echo "{$nav['parent_id']} | ";
+ echo "" . ($nav['status'] ? '启用' : '禁用') . " | ";
+ echo "
";
+ }
+ echo "
";
+ exit;
+ } else {
+ $pdo->exec("TRUNCATE TABLE system_navigation");
+ echo "✓ 已清空导航数据
";
+ }
+ }
+
+ // 定义基本导航菜单
+ // 注意:根据 System_Model_Navigation::getAllForNavigation() 的逻辑
+ // - hid 长度为 6:nav_top
+ // - hid 长度为 11:nav_two(这是模板需要的)
+ // - hid 长度为 16:nav_three
+ // 模板要求 parent_id == 1 且 hid 长度为 11
+ $navigations = array(
+ // nav_two 菜单(hid 长度为 11,parent_id 为 1)
+ array(
+ 'parent_id' => 1,
+ 'hid' => 'panel:index',
+ 'title' => '面板',
+ 'link' => '/panel',
+ 'load_type' => 0,
+ 'sort_order' => 1,
+ 'status' => 1
+ ),
+ array(
+ 'parent_id' => 1,
+ 'hid' => 'admin:user',
+ 'title' => '管理员',
+ 'link' => '/admin/user',
+ 'load_type' => 0,
+ 'sort_order' => 2,
+ 'status' => 1
+ ),
+ array(
+ 'parent_id' => 1,
+ 'hid' => 'cas:admin',
+ 'title' => '用户管理',
+ 'link' => '/cas/admin',
+ 'load_type' => 0,
+ 'sort_order' => 3,
+ 'status' => 1
+ ),
+ array(
+ 'parent_id' => 1,
+ 'hid' => 'goods:admin',
+ 'title' => '商品管理',
+ 'link' => '/goods/admin',
+ 'load_type' => 0,
+ 'sort_order' => 4,
+ 'status' => 1
+ ),
+ array(
+ 'parent_id' => 1,
+ 'hid' => 'order:admin',
+ 'title' => '订单管理',
+ 'link' => '/order/admin',
+ 'load_type' => 0,
+ 'sort_order' => 5,
+ 'status' => 1
+ ),
+ array(
+ 'parent_id' => 1,
+ 'hid' => 'system:conf',
+ 'title' => '系统设置',
+ 'link' => '/system/config',
+ 'load_type' => 0,
+ 'sort_order' => 6,
+ 'status' => 1
+ ),
+ );
+
+ // 插入导航数据
+ $insert_sql = "INSERT INTO system_navigation (parent_id, hid, title, link, load_type, sort_order, status, ctime)
+ VALUES (:parent_id, :hid, :title, :link, :load_type, :sort_order, :status, NOW())";
+ $stmt = $pdo->prepare($insert_sql);
+
+ $inserted_count = 0;
+ foreach ($navigations as $nav) {
+ try {
+ $stmt->execute($nav);
+ $inserted_count++;
+ echo "✓ 插入导航: {$nav['title']} (HID: {$nav['hid']})
";
+ } catch (PDOException $e) {
+ echo "✗ 插入导航失败 {$nav['title']}: " . $e->getMessage() . "
";
+ }
+ }
+
+ echo "
";
+ echo "初始化完成
";
+ echo "成功插入: {$inserted_count} 个导航菜单项
";
+
+ // 现在需要为管理员组添加导航权限
+ echo "
为管理员组添加导航权限
";
+
+ // 检查 admin_permission 表是否有数据
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM admin_permission");
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($row['count'] == 0) {
+ // 创建基本权限
+ $permissions = array(
+ array('permission_name' => '面板访问', 'permission_group' => 'panel', 'appkey' => 'panel'),
+ array('permission_name' => '管理员管理', 'permission_group' => 'admin', 'appkey' => 'admin'),
+ array('permission_name' => '用户管理', 'permission_group' => 'cas', 'appkey' => 'cas'),
+ array('permission_name' => '商品管理', 'permission_group' => 'goods', 'appkey' => 'goods'),
+ array('permission_name' => '订单管理', 'permission_group' => 'order', 'appkey' => 'order'),
+ array('permission_name' => '系统设置', 'permission_group' => 'system', 'appkey' => 'system'),
+ );
+
+ $permission_insert = "INSERT INTO admin_permission (permission_name, permission_group, appkey)
+ VALUES (:permission_name, :permission_group, :appkey)";
+ $permission_stmt = $pdo->prepare($permission_insert);
+
+ $permission_ids = array();
+ foreach ($permissions as $perm) {
+ try {
+ $permission_stmt->execute($perm);
+ $permission_id = $pdo->lastInsertId();
+ $permission_ids[$perm['appkey']] = $permission_id;
+ echo "✓ 创建权限: {$perm['permission_name']} (ID: {$permission_id})
";
+ } catch (PDOException $e) {
+ echo "✗ 创建权限失败 {$perm['permission_name']}: " . $e->getMessage() . "
";
+ }
+ }
+
+ // 为管理员组(groupid=1)添加所有导航权限
+ if (!empty($permission_ids)) {
+ $nav_permission_insert = "INSERT INTO admin_user_permission (ptype, parameter, permission_id, navigation_hid)
+ VALUES ('group', :groupid, :permission_id, :navigation_hid)";
+ $nav_permission_stmt = $pdo->prepare($nav_permission_insert);
+
+ $nav_hids = array('panel:index', 'admin:user', 'cas:admin', 'goods:admin', 'order:admin', 'system:conf');
+ foreach ($nav_hids as $hid) {
+ if (isset($permission_ids[$hid])) {
+ try {
+ $nav_permission_stmt->execute(array(
+ 'groupid' => 1,
+ 'permission_id' => $permission_ids[$hid],
+ 'navigation_hid' => $hid
+ ));
+ echo "✓ 为管理员组添加导航权限: {$hid}
";
+ } catch (PDOException $e) {
+ echo "✗ 添加导航权限失败 {$hid}: " . $e->getMessage() . "
";
+ }
+ }
+ }
+ }
+ } else {
+ echo "⚠ admin_permission 表中已有数据,跳过权限初始化
";
+ }
+
+ echo "
";
+ echo "导航菜单初始化完成!
";
+ echo "请刷新后台管理页面查看导航菜单
";
+ echo "访问后台管理 | 返回首页
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库操作失败: " . $e->getMessage() . "
";
+ echo "错误代码: " . $e->getCode() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/init_test_data.php b/wy/server/public/init_test_data.php
new file mode 100644
index 0000000..7b6141b
--- /dev/null
+++ b/wy/server/public/init_test_data.php
@@ -0,0 +1,340 @@
+初始化测试数据";
+echo "";
+echo "初始化测试数据
";
+
+try {
+ // 连接数据库
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库 '{$dbname}'
";
+ echo "
";
+
+ $now = date('Y-m-d H:i:s');
+ $inserted = 0;
+
+ // 1. 检查并插入 system_config 测试数据
+ echo "1. 系统配置表 (system_config)
";
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM system_config");
+ $count = $stmt->fetch(PDO::FETCH_ASSOC)['count'];
+ if ($count == 0) {
+ $configs = [
+ ['name' => 'site_name', 'title' => '站点名称', 'value' => '智慧社区管理系统', 'memo' => '网站名称'],
+ ['name' => 'site_url', 'title' => '站点地址', 'value' => 'http://101.43.95.130:8030', 'memo' => '网站URL'],
+ ['name' => 'admin_email', 'title' => '管理员邮箱', 'value' => 'admin@example.com', 'memo' => '管理员联系邮箱'],
+ ['name' => 'service_phone', 'title' => '服务电话', 'value' => '400-123-4567', 'memo' => '客服电话'],
+ ];
+ foreach ($configs as $config) {
+ $stmt = $pdo->prepare("INSERT INTO system_config (name, title, value, memo) VALUES (?, ?, ?, ?)");
+ $stmt->execute([$config['name'], $config['title'], $config['value'], $config['memo']]);
+ $inserted++;
+ }
+ echo "✓ 插入 {$inserted} 条系统配置数据
";
+ } else {
+ echo "⚠ system_config 表已有 {$count} 条数据,跳过
";
+ }
+
+ // 2. 插入 advert_content 测试数据(首页广告)
+ echo "2. 广告内容表 (advert_content)
";
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM advert_content");
+ $count = $stmt->fetch(PDO::FETCH_ASSOC)['count'];
+ if ($count == 0) {
+ $adverts = [
+ [
+ 'advert_category' => 'home',
+ 'advert_title' => '欢迎使用智慧社区',
+ 'advert_content' => '智慧社区管理系统,为您提供便捷的社区服务',
+ 'advert_img' => 'static/images/banner1.jpg',
+ 'advert_source' => 'system',
+ 'sort_order' => 1,
+ 'status' => 1,
+ 'start_time' => $now,
+ 'end_time' => date('Y-m-d H:i:s', strtotime('+1 year')),
+ 'ctime' => $now,
+ 'mtime' => $now,
+ 'is_del' => 0,
+ 'advert_type' => 'banner'
+ ],
+ [
+ 'advert_category' => 'home',
+ 'advert_title' => '社区公告',
+ 'advert_content' => '请各位业主注意社区安全,共同维护美好家园',
+ 'advert_img' => 'static/images/banner2.jpg',
+ 'advert_source' => 'system',
+ 'sort_order' => 2,
+ 'status' => 1,
+ 'start_time' => $now,
+ 'end_time' => date('Y-m-d H:i:s', strtotime('+1 year')),
+ 'ctime' => $now,
+ 'mtime' => $now,
+ 'is_del' => 0,
+ 'advert_type' => 'notice'
+ ],
+ ];
+ foreach ($adverts as $advert) {
+ $stmt = $pdo->prepare("INSERT INTO advert_content (advert_category, advert_title, advert_content, advert_img, advert_source, sort_order, status, start_time, end_time, ctime, mtime, is_del, advert_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ $stmt->execute([
+ $advert['advert_category'], $advert['advert_title'], $advert['advert_content'],
+ $advert['advert_img'], $advert['advert_source'], $advert['sort_order'],
+ $advert['status'], $advert['start_time'], $advert['end_time'],
+ $advert['ctime'], $advert['mtime'], $advert['is_del'], $advert['advert_type']
+ ]);
+ $inserted++;
+ }
+ echo "✓ 插入 " . count($adverts) . " 条广告数据
";
+ } else {
+ echo "⚠ advert_content 表已有 {$count} 条数据,跳过
";
+ }
+
+ // 3. 插入 advertorial_content 测试数据(商城文章)
+ echo "3. 商城文章表 (advertorial_content)
";
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM advertorial_content");
+ $count = $stmt->fetch(PDO::FETCH_ASSOC)['count'];
+ if ($count == 0) {
+ $articles = [
+ [
+ 'userid' => 1,
+ 'advertorial_title' => '社区便民服务指南',
+ 'advertorial_author_phone' => '18133922183',
+ 'advertorial_content' => '本文介绍了社区提供的各项便民服务,包括维修、保洁、快递代收等。',
+ 'advertorial_picture' => '',
+ 'is_show' => 1,
+ 'is_hot' => 1,
+ 'ctime' => $now,
+ 'mtime' => $now,
+ 'is_del' => 0
+ ],
+ [
+ 'userid' => 1,
+ 'advertorial_title' => '社区活动通知',
+ 'advertorial_author_phone' => '18133922183',
+ 'advertorial_content' => '本周六下午2点在社区活动中心举办邻里节活动,欢迎各位业主参加。',
+ 'advertorial_picture' => '',
+ 'is_show' => 1,
+ 'is_hot' => 0,
+ 'ctime' => $now,
+ 'mtime' => $now,
+ 'is_del' => 0
+ ],
+ ];
+ foreach ($articles as $article) {
+ $stmt = $pdo->prepare("INSERT INTO advertorial_content (userid, advertorial_title, advertorial_author_phone, advertorial_content, advertorial_picture, is_show, is_hot, ctime, mtime, is_del) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ $stmt->execute([
+ $article['userid'], $article['advertorial_title'], $article['advertorial_author_phone'],
+ $article['advertorial_content'], $article['advertorial_picture'], $article['is_show'],
+ $article['is_hot'], $article['ctime'], $article['mtime'], $article['is_del']
+ ]);
+ $inserted++;
+ }
+ echo "✓ 插入 " . count($articles) . " 条文章数据
";
+ } else {
+ echo "⚠ advertorial_content 表已有 {$count} 条数据,跳过
";
+ }
+
+ // 4. 插入 message_content 测试数据(消息)
+ echo "4. 消息内容表 (message_content)
";
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM message_content");
+ $count = $stmt->fetch(PDO::FETCH_ASSOC)['count'];
+ if ($count == 0) {
+ $messages = [
+ [
+ 'message_type' => 'notice',
+ 'message_title' => '系统维护通知',
+ 'message_brief' => '系统将于今晚进行维护升级',
+ 'message_info' => '系统将于今晚22:00-24:00进行维护升级,期间可能无法正常使用,给您带来不便敬请谅解。',
+ 'message_object' => 'all',
+ 'is_send' => 1,
+ 'is_del' => 0,
+ 'ctime' => $now,
+ 'mtime' => $now,
+ 'message_picture' => ''
+ ],
+ [
+ 'message_type' => 'activity',
+ 'message_title' => '社区活动邀请',
+ 'message_brief' => '欢迎参加社区邻里节活动',
+ 'message_info' => '本周六下午2点在社区活动中心举办邻里节活动,有精彩的文艺表演和互动游戏,欢迎各位业主携家人参加。',
+ 'message_object' => 'all',
+ 'is_send' => 1,
+ 'is_del' => 0,
+ 'ctime' => $now,
+ 'mtime' => $now,
+ 'message_picture' => ''
+ ],
+ ];
+ foreach ($messages as $msg) {
+ $stmt = $pdo->prepare("INSERT INTO message_content (message_type, message_title, message_brief, message_info, message_object, is_send, is_del, ctime, mtime, message_picture) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ $stmt->execute([
+ $msg['message_type'], $msg['message_title'], $msg['message_brief'],
+ $msg['message_info'], $msg['message_object'], $msg['is_send'],
+ $msg['is_del'], $msg['ctime'], $msg['mtime'], $msg['message_picture']
+ ]);
+ $inserted++;
+ }
+ echo "✓ 插入 " . count($messages) . " 条消息数据
";
+ } else {
+ echo "⚠ message_content 表已有 {$count} 条数据,跳过
";
+ }
+
+ // 5. 插入 goods_content 测试数据(商品)
+ echo "5. 商品内容表 (goods_content)
";
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM goods_content");
+ $count = $stmt->fetch(PDO::FETCH_ASSOC)['count'];
+ if ($count == 0) {
+ $goods = [
+ [
+ 'userid' => 1,
+ 'goods_detail' => '新鲜蔬菜套餐 - 包含青菜、白菜、萝卜等时令蔬菜',
+ 'pic' => 'static/images/goods1.jpg',
+ 'thumb' => 'static/images/goods1_thumb.jpg',
+ 'type' => 1,
+ 'is_del' => 0,
+ 'status' => 1,
+ 'up' => '',
+ 'user_group_id' => 0,
+ 'ctime' => $now
+ ],
+ [
+ 'userid' => 1,
+ 'goods_detail' => '优质大米 10kg装 - 东北优质大米,粒粒饱满',
+ 'pic' => 'static/images/goods2.jpg',
+ 'thumb' => 'static/images/goods2_thumb.jpg',
+ 'type' => 1,
+ 'is_del' => 0,
+ 'status' => 1,
+ 'up' => '',
+ 'user_group_id' => 0,
+ 'ctime' => $now
+ ],
+ ];
+ foreach ($goods as $item) {
+ $stmt = $pdo->prepare("INSERT INTO goods_content (userid, goods_detail, pic, thumb, type, is_del, status, up, user_group_id, ctime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ $stmt->execute([
+ $item['userid'], $item['goods_detail'], $item['pic'],
+ $item['thumb'], $item['type'], $item['is_del'],
+ $item['status'], $item['up'], $item['user_group_id'], $item['ctime']
+ ]);
+ $inserted++;
+ }
+ echo "✓ 插入 " . count($goods) . " 条商品数据
";
+ } else {
+ echo "⚠ goods_content 表已有 {$count} 条数据,跳过
";
+ }
+
+ // 6. 插入 store_info 测试数据(商店信息)
+ echo "6. 商店信息表 (store_info)
";
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM store_info");
+ $count = $stmt->fetch(PDO::FETCH_ASSOC)['count'];
+ if ($count == 0) {
+ $stores = [
+ [
+ 'store_name' => '社区便民商店',
+ 'img' => 'static/images/store1.jpg',
+ 'is_del' => 0,
+ 'ctime' => $now,
+ 'mtime' => $now
+ ],
+ [
+ 'store_name' => '社区生鲜超市',
+ 'img' => 'static/images/store2.jpg',
+ 'is_del' => 0,
+ 'ctime' => $now,
+ 'mtime' => $now
+ ],
+ ];
+ foreach ($stores as $store) {
+ $stmt = $pdo->prepare("INSERT INTO store_info (store_name, img, is_del, ctime, mtime) VALUES (?, ?, ?, ?, ?)");
+ $stmt->execute([
+ $store['store_name'], $store['img'], $store['is_del'],
+ $store['ctime'], $store['mtime']
+ ]);
+ $inserted++;
+ }
+ echo "✓ 插入 " . count($stores) . " 条商店信息数据
";
+ } else {
+ echo "⚠ store_info 表已有 {$count} 条数据,跳过
";
+ }
+
+ // 7. 插入 store_msg 测试数据(商店消息)
+ echo "7. 商店消息表 (store_msg)
";
+ $stmt = $pdo->query("SELECT COUNT(*) as count FROM store_msg");
+ $count = $stmt->fetch(PDO::FETCH_ASSOC)['count'];
+ if ($count == 0) {
+ // 获取第一个商店ID
+ $stmt = $pdo->query("SELECT store_id FROM store_info WHERE is_del = 0 LIMIT 1");
+ $store = $stmt->fetch(PDO::FETCH_ASSOC);
+ $store_id = $store ? $store['store_id'] : 1;
+
+ $store_msgs = [
+ [
+ 'store_id' => $store_id,
+ 'push_txt' => '欢迎光临社区商店',
+ 'userid' => 1,
+ 'is_dot' => 0,
+ 'title' => '新店开业',
+ 'ctime' => $now,
+ 'mtime' => $now
+ ],
+ [
+ 'store_id' => $store_id,
+ 'push_txt' => '本周特价商品:新鲜水果8折优惠',
+ 'userid' => 1,
+ 'is_dot' => 0,
+ 'title' => '特价通知',
+ 'ctime' => $now,
+ 'mtime' => $now
+ ],
+ ];
+ foreach ($store_msgs as $msg) {
+ $stmt = $pdo->prepare("INSERT INTO store_msg (store_id, push_txt, userid, is_dot, title, ctime, mtime) VALUES (?, ?, ?, ?, ?, ?, ?)");
+ $stmt->execute([
+ $msg['store_id'], $msg['push_txt'], $msg['userid'],
+ $msg['is_dot'], $msg['title'], $msg['ctime'], $msg['mtime']
+ ]);
+ $inserted++;
+ }
+ echo "✓ 插入 " . count($store_msgs) . " 条商店消息数据
";
+ } else {
+ echo "⚠ store_msg 表已有 {$count} 条数据,跳过
";
+ }
+
+ // 8. 更新 cas_user 测试用户信息(如果存在)
+ echo "8. 更新用户信息 (cas_user)
";
+ $stmt = $pdo->query("SELECT userid FROM cas_user WHERE userid = 1");
+ $user = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($user) {
+ $stmt = $pdo->prepare("UPDATE cas_user SET nickname = ?, city = ? WHERE userid = 1");
+ $stmt->execute(['测试用户', '深圳']);
+ echo "✓ 更新用户信息(昵称、城市)
";
+ } else {
+ echo "⚠ 用户ID 1 不存在,跳过
";
+ }
+
+ echo "
";
+ echo "初始化完成
";
+ echo "共插入/更新 {$inserted} 条测试数据
";
+ echo "访问后台管理 | 返回首页
";
+
+} catch (Exception $e) {
+ echo "✗ 错误: " . htmlspecialchars($e->getMessage()) . "
";
+ echo "" . htmlspecialchars($e->getTraceAsString()) . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/scan_all_tables.php b/wy/server/public/scan_all_tables.php
new file mode 100644
index 0000000..66800cc
--- /dev/null
+++ b/wy/server/public/scan_all_tables.php
@@ -0,0 +1,157 @@
+扫描数据库表";
+echo "";
+echo "扫描项目代码中的数据库表
";
+
+// 数据库配置
+$host = 'gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com';
+$port = 24936;
+$username = 'root';
+$password = '!Rjb12191';
+$dbname = 'wy_db';
+
+try {
+ $dsn = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $pdo->exec("SET NAMES utf8mb4");
+
+ echo "✓ 成功连接到数据库
";
+
+ // 获取数据库中已存在的表
+ $stmt = $pdo->query("SHOW TABLES");
+ $existing_tables = $stmt->fetchAll(PDO::FETCH_COLUMN);
+ echo "数据库中已有 " . count($existing_tables) . " 个表
";
+ echo "
";
+
+ // 扫描Model文件
+ echo "1. 扫描Model文件
";
+ $base_path = dirname(__FILE__) . '/../';
+ $model_path = $base_path . 'application/';
+ $library_path = $base_path . 'library/';
+
+ $tables_found = array();
+
+ // 递归扫描Model文件
+ function scanModels($dir, $base_path, &$tables) {
+ if (!is_dir($dir)) return;
+
+ $files = glob($dir . '**/Model/*.php');
+ foreach ($files as $file) {
+ $content = file_get_contents($file);
+
+ // 提取表名、前缀、主键
+ if (preg_match('/protected\s+\$_name\s*=\s*[\'"](\w+)[\'"]/', $content, $name_match)) {
+ $table_name = $name_match[1];
+
+ // 提取前缀
+ $prefix = '';
+ if (preg_match('/protected\s+\$_prefix\s*=\s*[\'"](\w+)[\'"]/', $content, $prefix_match)) {
+ $prefix = $prefix_match[1];
+ }
+
+ // 提取主键
+ $primary = 'id';
+ if (preg_match('/protected\s+\$_primary\s*=\s*[\'"](\w+)[\'"]/', $content, $primary_match)) {
+ $primary = $primary_match[1];
+ }
+
+ $full_table_name = $prefix . $table_name;
+
+ // 获取类名
+ if (preg_match('/class\s+(\w+)/', $content, $class_match)) {
+ $class_name = $class_match[1];
+ } else {
+ $class_name = basename($file, '.php');
+ }
+
+ if (!isset($tables[$full_table_name])) {
+ $tables[$full_table_name] = array(
+ 'name' => $table_name,
+ 'prefix' => $prefix,
+ 'primary' => $primary,
+ 'class' => $class_name,
+ 'file' => str_replace(realpath($base_path) . '/', '', realpath($file))
+ );
+ }
+ }
+ }
+
+ // 扫描子目录
+ $subdirs = glob($dir . '*/', GLOB_ONLYDIR);
+ foreach ($subdirs as $subdir) {
+ scanModels($subdir, $base_path, $tables);
+ }
+ }
+
+ scanModels($model_path, realpath($base_path) . '/', $tables_found);
+ scanModels($library_path, realpath($base_path) . '/', $tables_found);
+
+ echo "✓ 找到 " . count($tables_found) . " 个表定义
";
+
+ // 显示找到的表
+ echo "2. 找到的表列表
";
+ echo "";
+ echo "| 完整表名 | 表名 | 前缀 | 主键 | 类名 | 状态 |
";
+
+ $missing_tables = array();
+ foreach ($tables_found as $full_name => $info) {
+ $exists = in_array($full_name, $existing_tables);
+ $status_class = $exists ? 'exists' : 'missing';
+ $status_text = $exists ? '✓ 存在' : '✗ 缺失';
+
+ if (!$exists) {
+ $missing_tables[$full_name] = $info;
+ }
+
+ echo "";
+ echo "| {$full_name} | ";
+ echo "{$info['name']} | ";
+ echo "{$info['prefix']} | ";
+ echo "{$info['primary']} | ";
+ echo "{$info['class']} | ";
+ echo "{$status_text} | ";
+ echo "
";
+ }
+ echo "
";
+
+ // 显示缺失的表
+ if (count($missing_tables) > 0) {
+ echo "
";
+ echo "3. 缺失的表 (" . count($missing_tables) . " 个)
";
+ echo "以下表在代码中被使用,但数据库中不存在:
";
+ echo "";
+ foreach ($missing_tables as $full_name => $info) {
+ echo "- {$full_name} - 类: {$info['class']} ({$info['file']})
";
+ }
+ echo "
";
+
+ echo "
";
+ echo "4. 建议操作
";
+ echo "请运行 init_all_tables.php 来创建所有缺失的表。
";
+ echo "或者访问: /init_all_tables.php
";
+ } else {
+ echo "
";
+ echo "3. 检查结果
";
+ echo "✓ 所有表都已存在!
";
+ }
+
+ echo "
";
+ echo "执行表初始化 | 后台管理
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库错误: " . $e->getMessage() . "
";
+} catch (Exception $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/static b/wy/server/public/static
new file mode 120000
index 0000000..d5e5d4d
--- /dev/null
+++ b/wy/server/public/static
@@ -0,0 +1 @@
+../view/static
\ No newline at end of file
diff --git a/wy/server/public/test_config.php b/wy/server/public/test_config.php
new file mode 100644
index 0000000..00e9a35
--- /dev/null
+++ b/wy/server/public/test_config.php
@@ -0,0 +1,46 @@
+配置路径测试";
+echo "ZEED_ROOT: " . ZEED_ROOT . "
";
+echo "ZEED_PATH_CONF: " . ZEED_PATH_CONF . "
";
+echo "Config dir exists: " . (is_dir(ZEED_PATH_CONF) ? 'YES' : 'NO') . "
";
+echo "database.php exists: " . (file_exists(ZEED_PATH_CONF . 'database.php') ? 'YES' : 'NO') . "
";
+
+echo "尝试加载数据库配置
";
+try {
+ $db_config = Zeed_Config::loadGroup('database.default');
+ if ($db_config) {
+ echo "✓ 配置加载成功
";
+ echo "";
+ print_r($db_config);
+ echo "
";
+ } else {
+ echo "✗ 配置加载失败,返回NULL
";
+ }
+} catch (Exception $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+}
+
diff --git a/wy/server/public/test_db.php b/wy/server/public/test_db.php
new file mode 100644
index 0000000..5af516a
--- /dev/null
+++ b/wy/server/public/test_db.php
@@ -0,0 +1,58 @@
+数据库连接测试";
+
+try {
+ // 连接MySQL服务器(不指定数据库)
+ $dsn = "mysql:host={$host};port={$port};charset=utf8mb4";
+ $pdo = new PDO($dsn, $username, $password);
+ $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+ echo "✓ 成功连接到MySQL服务器
";
+
+ // 创建数据库
+ $sql = "CREATE DATABASE IF NOT EXISTS `{$dbname}` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci";
+ $pdo->exec($sql);
+ echo "✓ 数据库 '{$dbname}' 已创建或已存在
";
+
+ // 测试连接到新数据库
+ $dsn_db = "mysql:host={$host};port={$port};dbname={$dbname};charset=utf8mb4";
+ $pdo_db = new PDO($dsn_db, $username, $password);
+ $pdo_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+ echo "✓ 成功连接到数据库 '{$dbname}'
";
+
+ // 显示数据库信息
+ $stmt = $pdo_db->query("SELECT DATABASE() as db, VERSION() as version");
+ $info = $stmt->fetch(PDO::FETCH_ASSOC);
+ echo "当前数据库: {$info['db']}
";
+ echo "MySQL版本: {$info['version']}
";
+
+ echo "
";
+ echo "配置信息(已更新到 config/database.php)
";
+ echo "";
+ echo "host: {$host}\n";
+ echo "port: {$port}\n";
+ echo "username: {$username}\n";
+ echo "dbname: {$dbname}\n";
+ echo "charset: utf8mb4\n";
+ echo "";
+
+ echo "数据库配置完成!
";
+ echo "返回首页 | 访问后台
";
+
+} catch (PDOException $e) {
+ echo "✗ 数据库连接失败: " . $e->getMessage() . "
";
+ echo "错误代码: " . $e->getCode() . "
";
+}
+
diff --git a/wy/server/public/test_login.php b/wy/server/public/test_login.php
new file mode 100644
index 0000000..2a54823
--- /dev/null
+++ b/wy/server/public/test_login.php
@@ -0,0 +1,213 @@
+测试登录";
+echo "";
+echo "测试登录功能
";
+
+$test_username = 'admin';
+$test_password = '123456';
+
+try {
+ // 1. 测试获取用户
+ echo "1. 测试获取用户信息
";
+ $user = Admin_Model_User::instance()->getUserByUsername($test_username);
+
+ if (empty($user)) {
+ echo "✗ 用户不存在
";
+ exit;
+ }
+
+ echo "✓ 找到用户
";
+ echo "";
+ print_r($user);
+ echo "
";
+
+ // 2. 测试密码验证
+ echo "2. 测试密码验证
";
+ $encrypted = Zeed_Encrypt::encode('Md5Md5', $test_password, $user['salt']);
+ echo "输入密码: {$test_password}
";
+ echo "Salt: {$user['salt']}
";
+ echo "加密后: {$encrypted}
";
+ echo "数据库密码: {$user['password']}
";
+
+ if ($encrypted == $user['password']) {
+ echo "✓ 密码验证通过
";
+ } else {
+ echo "✗ 密码验证失败
";
+ exit;
+ }
+
+ // 3. 检查domain
+ echo "3. 检查domain字段
";
+ if (isset($user['domain']) && $user['domain'] == 'local') {
+ echo "✓ domain正确: {$user['domain']}
";
+ } else {
+ echo "✗ domain不正确: " . ($user['domain'] ?? '未设置') . "
";
+ }
+
+ // 4. 检查status
+ echo "4. 检查status字段
";
+ if (isset($user['status']) && $user['status'] >= 1) {
+ echo "✓ status正确: {$user['status']}
";
+ } else {
+ echo "✗ status不正确: " . ($user['status'] ?? '未设置') . "
";
+ }
+
+ // 5. 测试获取用户组
+ echo "5. 测试获取用户组
";
+ try {
+ // 确保类已加载
+ if (!class_exists('UserGroupModel')) {
+ require_once ZEED_PATH_APPS . 'Admin/models/UserGroupModel.php';
+ }
+ $user_group = UserGroupModel::instance()->fetchByPK($user['userid']);
+
+ if (empty($user_group)) {
+ echo "✗ 用户组不存在(这会导致登录失败)
";
+ echo "需要创建用户组关联,请访问 fix_admin_v2.php
";
+ } else {
+ echo "✓ 找到用户组
";
+ echo "";
+ print_r($user_group);
+ echo "
";
+ }
+ } catch (Exception $e) {
+ echo "✗ 获取用户组失败: " . $e->getMessage() . "
";
+ echo "" . $e->getTraceAsString() . "
";
+ }
+
+ // 6. 测试Session
+ echo "6. 测试Session
";
+ if (session_status() === PHP_SESSION_NONE) {
+ session_start();
+ }
+ echo "Session ID: " . session_id() . "
";
+ echo "Session状态: " . (session_status() === PHP_SESSION_ACTIVE ? '已启动' : '未启动') . "
";
+
+ // 7. 模拟登录
+ echo "7. 模拟登录过程
";
+ try {
+ $user_group = UserGroupModel::instance()->fetchByPK($user['userid']);
+
+ if (!empty($user_group)) {
+ $userBasic = array(
+ 'userid' => $user['userid'],
+ 'username' => $user['username'],
+ 'fullname' => $user['fullname'] ?? $user['username'],
+ 'domain' => $user['domain'] ?? 'local',
+ 'groupid' => $user_group[0]['groupid'] ?? 1,
+ 'home_id' => $user['home_id'] ?? null
+ );
+
+ echo "准备登录的用户信息:
";
+ echo "";
+ print_r($userBasic);
+ echo "
";
+
+ // 尝试登录
+ Com_Admin_Authorization::logUserIn($userBasic);
+
+ $logged_user = Com_Admin_Authorization::getLoggedInUser();
+ if ($logged_user) {
+ echo "✓ 登录成功!
";
+ echo "";
+ print_r($logged_user);
+ echo "
";
+ } else {
+ echo "✗ 登录失败,无法获取登录用户
";
+ }
+ } else {
+ echo "✗ 无法登录:用户组不存在
";
+ }
+ } catch (Exception $e) {
+ echo "✗ 登录过程出错: " . $e->getMessage() . "
";
+ echo "" . $e->getTraceAsString() . "
";
+ }
+
+ echo "
";
+ echo "返回登录页面
";
+
+} catch (Exception $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+ echo "" . $e->getTraceAsString() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/test_login_response.php b/wy/server/public/test_login_response.php
new file mode 100644
index 0000000..8261498
--- /dev/null
+++ b/wy/server/public/test_login_response.php
@@ -0,0 +1,18 @@
+ 0,
+ 'data' => '/admin',
+ 'error' => null
+);
+
+echo json_encode($rd);
+exit;
+
diff --git a/wy/server/public/test_login_simple.php b/wy/server/public/test_login_simple.php
new file mode 100644
index 0000000..033396f
--- /dev/null
+++ b/wy/server/public/test_login_simple.php
@@ -0,0 +1,148 @@
+测试登录";
+echo "";
+echo "测试登录功能
";
+
+$test_username = 'admin';
+$test_password = '123456';
+
+try {
+ // 1. 测试获取用户
+ echo "1. 测试获取用户信息
";
+ $user = Admin_Model_User::instance()->getUserByUsername($test_username);
+
+ if (empty($user)) {
+ echo "✗ 用户不存在
";
+ exit;
+ }
+
+ echo "✓ 找到用户
";
+ echo "用户ID: {$user['userid']}, 用户名: {$user['username']}, 状态: {$user['status']}, 域: " . ($user['domain'] ?? '未设置') . "";
+
+ // 2. 测试密码验证
+ echo "2. 测试密码验证
";
+ $encrypted = Zeed_Encrypt::encode('Md5Md5', $test_password, $user['salt']);
+
+ if ($encrypted == $user['password']) {
+ echo "✓ 密码验证通过
";
+ } else {
+ echo "✗ 密码验证失败
";
+ echo "加密后: {$encrypted}
";
+ echo "数据库: {$user['password']}
";
+ exit;
+ }
+
+ // 3. 测试获取用户组
+ echo "3. 测试获取用户组
";
+ try {
+ $user_group = UserGroupModel::instance()->fetchByPK($user['userid']);
+
+ if (empty($user_group)) {
+ echo "✗ 用户组不存在(这会导致登录失败)
";
+ echo "请访问 fix_admin_v2.php 修复
";
+ } else {
+ echo "✓ 找到用户组
";
+ echo "";
+ print_r($user_group);
+ echo "
";
+ }
+ } catch (Exception $e) {
+ echo "✗ 获取用户组失败: " . $e->getMessage() . "
";
+ }
+
+ // 4. 测试Session和登录
+ echo "4. 测试Session和登录
";
+ if (session_status() === PHP_SESSION_NONE) {
+ session_start();
+ }
+
+ $groupid = 1;
+ if (!empty($user_group) && isset($user_group[0]['groupid'])) {
+ $groupid = $user_group[0]['groupid'];
+ }
+
+ $userBasic = array(
+ 'userid' => $user['userid'],
+ 'username' => $user['username'],
+ 'fullname' => $user['fullname'] ?? $user['username'],
+ 'domain' => $user['domain'] ?? 'local',
+ 'groupid' => $groupid,
+ 'home_id' => $user['home_id'] ?? null
+ );
+
+ Com_Admin_Authorization::logUserIn($userBasic);
+
+ $logged_user = Com_Admin_Authorization::getLoggedInUser();
+ if ($logged_user) {
+ echo "✓ 登录成功!Session已保存
";
+ echo "";
+ print_r($logged_user);
+ echo "
";
+ } else {
+ echo "✗ 登录失败,Session未保存
";
+ }
+
+ echo "
";
+ echo "所有测试通过!
";
+ echo "如果浏览器中仍然无法登录,可能是前端AJAX请求的问题。
";
+ echo "返回登录页面
";
+
+} catch (Exception $e) {
+ echo "✗ 错误: " . $e->getMessage() . "
";
+ echo "" . $e->getTraceAsString() . "
";
+}
+
+echo "";
+
diff --git a/wy/server/public/uploads/static/images/banner1.jpg b/wy/server/public/uploads/static/images/banner1.jpg
new file mode 100644
index 0000000..7bfa956
Binary files /dev/null and b/wy/server/public/uploads/static/images/banner1.jpg differ
diff --git a/wy/server/public/uploads/static/images/banner2.jpg b/wy/server/public/uploads/static/images/banner2.jpg
new file mode 100644
index 0000000..ec71e65
Binary files /dev/null and b/wy/server/public/uploads/static/images/banner2.jpg differ
diff --git a/wy/server/public/uploads/static/images/goods1.jpg b/wy/server/public/uploads/static/images/goods1.jpg
new file mode 100644
index 0000000..fa38a05
Binary files /dev/null and b/wy/server/public/uploads/static/images/goods1.jpg differ
diff --git a/wy/server/public/uploads/static/images/goods1_thumb.jpg b/wy/server/public/uploads/static/images/goods1_thumb.jpg
new file mode 100644
index 0000000..7b54592
Binary files /dev/null and b/wy/server/public/uploads/static/images/goods1_thumb.jpg differ
diff --git a/wy/server/public/uploads/static/images/goods2.jpg b/wy/server/public/uploads/static/images/goods2.jpg
new file mode 100644
index 0000000..b67e1ae
Binary files /dev/null and b/wy/server/public/uploads/static/images/goods2.jpg differ
diff --git a/wy/server/public/uploads/static/images/goods2_thumb.jpg b/wy/server/public/uploads/static/images/goods2_thumb.jpg
new file mode 100644
index 0000000..689f1b5
Binary files /dev/null and b/wy/server/public/uploads/static/images/goods2_thumb.jpg differ
diff --git a/wy/server/public/uploads/static/images/store1.jpg b/wy/server/public/uploads/static/images/store1.jpg
new file mode 100644
index 0000000..8d35b49
Binary files /dev/null and b/wy/server/public/uploads/static/images/store1.jpg differ
diff --git a/wy/server/public/uploads/static/images/store2.jpg b/wy/server/public/uploads/static/images/store2.jpg
new file mode 100644
index 0000000..ffdc001
Binary files /dev/null and b/wy/server/public/uploads/static/images/store2.jpg differ
diff --git a/wy/server/upload/b4/3b/5d/63/01/d1ffb3992d053846d2bb61.jpeg b/wy/server/upload/b4/3b/5d/63/01/d1ffb3992d053846d2bb61.jpeg
new file mode 100644
index 0000000..6bbf790
Binary files /dev/null and b/wy/server/upload/b4/3b/5d/63/01/d1ffb3992d053846d2bb61.jpeg differ
diff --git a/wy/server/view/comment/admin/comment.index.php b/wy/server/view/comment/admin/comment.index.php
new file mode 100644
index 0000000..ab3c013
--- /dev/null
+++ b/wy/server/view/comment/admin/comment.index.php
@@ -0,0 +1,27 @@
+getData('data');
+
+$smarty->assign($data);
+
+$smarty->display('comment.index.html');
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/view/comment/admin/template/comment.index.html b/wy/server/view/comment/admin/template/comment.index.html
new file mode 100644
index 0000000..12ac79f
--- /dev/null
+++ b/wy/server/view/comment/admin/template/comment.index.html
@@ -0,0 +1,101 @@
+{$wrapper_prefix|default}
+
+
+
+{$wrapper_suffix|default}
+
diff --git a/wy/server/view/comment/admin/view.init.php b/wy/server/view/comment/admin/view.init.php
new file mode 100644
index 0000000..d074928
--- /dev/null
+++ b/wy/server/view/comment/admin/view.init.php
@@ -0,0 +1,69 @@
+setModule($_module)->setTheme($_theme);
+$smarty->addTemplateDir(ZEED_PATH_VIEW . $_module . '/admin/' . $_theme);
+$smarty->addTemplateDir(ZEED_PATH_VIEW . 'admin/' . $_theme); // Default template
+$smarty->addTemplateDir(ZEED_PATH_VIEW . 'panel/' . $_theme); // Panel template folder
+
+// 注册插件
+$smarty->addPluginsDir(ZEED_PATH_LIB . 'smarty/plugins');
+
+// 赋值 moduleman 数组对象
+$smarty->assign('moduleman', array('module' => $_module, 'controller' => $_controller, 'action' => $_action, 'panel' => 'panel'));
+
+// 登陆用户信息
+$smarty->assign('loggedInUser', Com_Admin_Authorization::getLoggedInUser());
+
+// 获取管理员权限信息,主要用于导航的访问管理
+$smarty->assign('allow_navs', PermissionHelper::getAllowNavigations());
+
+/**
+ * AJAX方式不显示头尾,不加载JS、CSS
+ * IFrame方式不显示头尾,加载JS、CSS
+ */
+$loadtype = $this->input->get('loadtype');
+if (! $loadtype) {
+ if ($this->input->isAjax()) {
+ $loadtype = 'ajax';
+ }
+} else {
+ $loadtype = $loadtype == 'ajax' ? 'ajax' : 'iframe';
+}
+if ($loadtype == 'iframe') {
+ $smarty->assign('wrapper_prefix', $smarty->fetch('panel/' . $_theme . '/wrapper.prefix-tiny.html'));
+ $smarty->assign('wrapper_suffix', $smarty->fetch('panel/' . $_theme . '/wrapper.suffix-tiny.html'));
+ $smarty->assign('loadtype', 'iframe');
+} else {
+ if ($loadtype != 'ajax') {
+ $smarty->assign('navigations', System_Model_Navigation::instance()->getAllForNavigation());
+ $smarty->assign('wrapper_prefix', $smarty->fetch('panel/' . $_theme . '/wrapper.prefix.html'));
+ $smarty->assign('wrapper_suffix', $smarty->fetch('panel/' . $_theme . '/wrapper.suffix.html'));
+ $smarty->assign('loadtype', 'ajax');
+ }
+}
+
+// End ^ LF ^ encoding
+
diff --git a/wy/server/view/device/admin/device.index.php b/wy/server/view/device/admin/device.index.php
new file mode 100644
index 0000000..171e5be
--- /dev/null
+++ b/wy/server/view/device/admin/device.index.php
@@ -0,0 +1,27 @@
+getData('data');
+
+$smarty->assign($data);
+
+$smarty->display('device.index.html');
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/view/device/admin/template/device.index.html b/wy/server/view/device/admin/template/device.index.html
new file mode 100644
index 0000000..9df7214
--- /dev/null
+++ b/wy/server/view/device/admin/template/device.index.html
@@ -0,0 +1,101 @@
+{$wrapper_prefix|default}
+
+
+
+{$wrapper_suffix|default}
+
diff --git a/wy/server/view/device/admin/view.init.php b/wy/server/view/device/admin/view.init.php
new file mode 100644
index 0000000..d074928
--- /dev/null
+++ b/wy/server/view/device/admin/view.init.php
@@ -0,0 +1,69 @@
+setModule($_module)->setTheme($_theme);
+$smarty->addTemplateDir(ZEED_PATH_VIEW . $_module . '/admin/' . $_theme);
+$smarty->addTemplateDir(ZEED_PATH_VIEW . 'admin/' . $_theme); // Default template
+$smarty->addTemplateDir(ZEED_PATH_VIEW . 'panel/' . $_theme); // Panel template folder
+
+// 注册插件
+$smarty->addPluginsDir(ZEED_PATH_LIB . 'smarty/plugins');
+
+// 赋值 moduleman 数组对象
+$smarty->assign('moduleman', array('module' => $_module, 'controller' => $_controller, 'action' => $_action, 'panel' => 'panel'));
+
+// 登陆用户信息
+$smarty->assign('loggedInUser', Com_Admin_Authorization::getLoggedInUser());
+
+// 获取管理员权限信息,主要用于导航的访问管理
+$smarty->assign('allow_navs', PermissionHelper::getAllowNavigations());
+
+/**
+ * AJAX方式不显示头尾,不加载JS、CSS
+ * IFrame方式不显示头尾,加载JS、CSS
+ */
+$loadtype = $this->input->get('loadtype');
+if (! $loadtype) {
+ if ($this->input->isAjax()) {
+ $loadtype = 'ajax';
+ }
+} else {
+ $loadtype = $loadtype == 'ajax' ? 'ajax' : 'iframe';
+}
+if ($loadtype == 'iframe') {
+ $smarty->assign('wrapper_prefix', $smarty->fetch('panel/' . $_theme . '/wrapper.prefix-tiny.html'));
+ $smarty->assign('wrapper_suffix', $smarty->fetch('panel/' . $_theme . '/wrapper.suffix-tiny.html'));
+ $smarty->assign('loadtype', 'iframe');
+} else {
+ if ($loadtype != 'ajax') {
+ $smarty->assign('navigations', System_Model_Navigation::instance()->getAllForNavigation());
+ $smarty->assign('wrapper_prefix', $smarty->fetch('panel/' . $_theme . '/wrapper.prefix.html'));
+ $smarty->assign('wrapper_suffix', $smarty->fetch('panel/' . $_theme . '/wrapper.suffix.html'));
+ $smarty->assign('loadtype', 'ajax');
+ }
+}
+
+// End ^ LF ^ encoding
+
diff --git a/wy/server/view/door/admin/door.edit.php b/wy/server/view/door/admin/door.edit.php
new file mode 100644
index 0000000..0ced088
--- /dev/null
+++ b/wy/server/view/door/admin/door.edit.php
@@ -0,0 +1,27 @@
+getData('data');
+
+$smarty->assign($data);
+
+$smarty->display('door.edit.html');
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/view/door/admin/door.index.php b/wy/server/view/door/admin/door.index.php
new file mode 100644
index 0000000..4c0934e
--- /dev/null
+++ b/wy/server/view/door/admin/door.index.php
@@ -0,0 +1,27 @@
+getData('data');
+
+$smarty->assign($data);
+
+$smarty->display('door.index.html');
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/view/door/admin/template/door.edit.html b/wy/server/view/door/admin/template/door.edit.html
new file mode 100644
index 0000000..a3518bf
--- /dev/null
+++ b/wy/server/view/door/admin/template/door.edit.html
@@ -0,0 +1,81 @@
+{$wrapper_prefix|default}
+
+
+
+{$wrapper_suffix|default}
+
diff --git a/wy/server/view/door/admin/template/door.index.html b/wy/server/view/door/admin/template/door.index.html
new file mode 100644
index 0000000..061ec85
--- /dev/null
+++ b/wy/server/view/door/admin/template/door.index.html
@@ -0,0 +1,101 @@
+{$wrapper_prefix|default}
+
+
+
+{$wrapper_suffix|default}
+
diff --git a/wy/server/view/door/admin/view.init.php b/wy/server/view/door/admin/view.init.php
new file mode 100644
index 0000000..d074928
--- /dev/null
+++ b/wy/server/view/door/admin/view.init.php
@@ -0,0 +1,69 @@
+setModule($_module)->setTheme($_theme);
+$smarty->addTemplateDir(ZEED_PATH_VIEW . $_module . '/admin/' . $_theme);
+$smarty->addTemplateDir(ZEED_PATH_VIEW . 'admin/' . $_theme); // Default template
+$smarty->addTemplateDir(ZEED_PATH_VIEW . 'panel/' . $_theme); // Panel template folder
+
+// 注册插件
+$smarty->addPluginsDir(ZEED_PATH_LIB . 'smarty/plugins');
+
+// 赋值 moduleman 数组对象
+$smarty->assign('moduleman', array('module' => $_module, 'controller' => $_controller, 'action' => $_action, 'panel' => 'panel'));
+
+// 登陆用户信息
+$smarty->assign('loggedInUser', Com_Admin_Authorization::getLoggedInUser());
+
+// 获取管理员权限信息,主要用于导航的访问管理
+$smarty->assign('allow_navs', PermissionHelper::getAllowNavigations());
+
+/**
+ * AJAX方式不显示头尾,不加载JS、CSS
+ * IFrame方式不显示头尾,加载JS、CSS
+ */
+$loadtype = $this->input->get('loadtype');
+if (! $loadtype) {
+ if ($this->input->isAjax()) {
+ $loadtype = 'ajax';
+ }
+} else {
+ $loadtype = $loadtype == 'ajax' ? 'ajax' : 'iframe';
+}
+if ($loadtype == 'iframe') {
+ $smarty->assign('wrapper_prefix', $smarty->fetch('panel/' . $_theme . '/wrapper.prefix-tiny.html'));
+ $smarty->assign('wrapper_suffix', $smarty->fetch('panel/' . $_theme . '/wrapper.suffix-tiny.html'));
+ $smarty->assign('loadtype', 'iframe');
+} else {
+ if ($loadtype != 'ajax') {
+ $smarty->assign('navigations', System_Model_Navigation::instance()->getAllForNavigation());
+ $smarty->assign('wrapper_prefix', $smarty->fetch('panel/' . $_theme . '/wrapper.prefix.html'));
+ $smarty->assign('wrapper_suffix', $smarty->fetch('panel/' . $_theme . '/wrapper.suffix.html'));
+ $smarty->assign('loadtype', 'ajax');
+ }
+}
+
+// End ^ LF ^ encoding
+
diff --git a/wy/server/view/errand/admin/errand.index.php b/wy/server/view/errand/admin/errand.index.php
new file mode 100644
index 0000000..20682bc
--- /dev/null
+++ b/wy/server/view/errand/admin/errand.index.php
@@ -0,0 +1,27 @@
+getData('data');
+
+$smarty->assign($data);
+
+$smarty->display('errand.index.html');
+
+// End ^ Native EOL ^ UTF-8
+
diff --git a/wy/server/view/errand/admin/template/errand.index.html b/wy/server/view/errand/admin/template/errand.index.html
new file mode 100644
index 0000000..abb6b8c
--- /dev/null
+++ b/wy/server/view/errand/admin/template/errand.index.html
@@ -0,0 +1,101 @@
+{$wrapper_prefix|default}
+
+
+
+{$wrapper_suffix|default}
+
diff --git a/wy/server/view/errand/admin/view.init.php b/wy/server/view/errand/admin/view.init.php
new file mode 100644
index 0000000..d074928
--- /dev/null
+++ b/wy/server/view/errand/admin/view.init.php
@@ -0,0 +1,69 @@
+setModule($_module)->setTheme($_theme);
+$smarty->addTemplateDir(ZEED_PATH_VIEW . $_module . '/admin/' . $_theme);
+$smarty->addTemplateDir(ZEED_PATH_VIEW . 'admin/' . $_theme); // Default template
+$smarty->addTemplateDir(ZEED_PATH_VIEW . 'panel/' . $_theme); // Panel template folder
+
+// 注册插件
+$smarty->addPluginsDir(ZEED_PATH_LIB . 'smarty/plugins');
+
+// 赋值 moduleman 数组对象
+$smarty->assign('moduleman', array('module' => $_module, 'controller' => $_controller, 'action' => $_action, 'panel' => 'panel'));
+
+// 登陆用户信息
+$smarty->assign('loggedInUser', Com_Admin_Authorization::getLoggedInUser());
+
+// 获取管理员权限信息,主要用于导航的访问管理
+$smarty->assign('allow_navs', PermissionHelper::getAllowNavigations());
+
+/**
+ * AJAX方式不显示头尾,不加载JS、CSS
+ * IFrame方式不显示头尾,加载JS、CSS
+ */
+$loadtype = $this->input->get('loadtype');
+if (! $loadtype) {
+ if ($this->input->isAjax()) {
+ $loadtype = 'ajax';
+ }
+} else {
+ $loadtype = $loadtype == 'ajax' ? 'ajax' : 'iframe';
+}
+if ($loadtype == 'iframe') {
+ $smarty->assign('wrapper_prefix', $smarty->fetch('panel/' . $_theme . '/wrapper.prefix-tiny.html'));
+ $smarty->assign('wrapper_suffix', $smarty->fetch('panel/' . $_theme . '/wrapper.suffix-tiny.html'));
+ $smarty->assign('loadtype', 'iframe');
+} else {
+ if ($loadtype != 'ajax') {
+ $smarty->assign('navigations', System_Model_Navigation::instance()->getAllForNavigation());
+ $smarty->assign('wrapper_prefix', $smarty->fetch('panel/' . $_theme . '/wrapper.prefix.html'));
+ $smarty->assign('wrapper_suffix', $smarty->fetch('panel/' . $_theme . '/wrapper.suffix.html'));
+ $smarty->assign('loadtype', 'ajax');
+ }
+}
+
+// End ^ LF ^ encoding
+
diff --git a/wy/server/view/panel/template/inc/main.side.html b/wy/server/view/panel/template/inc/main.side.html
index 68117f2..2a872b4 100644
--- a/wy/server/view/panel/template/inc/main.side.html
+++ b/wy/server/view/panel/template/inc/main.side.html
@@ -11,17 +11,32 @@
{foreach from=$navigations.nav_two item=v}
{if $v.parent_id == 1 && $v.hid|count_characters:true == 11 && ($loggedInUser.groupid == 1 || strpos($allow_navs, $v.hid) !== false)}
+ {assign var="has_children" value=false}
+ {foreach from=$navigations.nav_three item=vv}
+ {if $vv.parent_id == $v.navigation_id && ($loggedInUser.groupid == 1 || strpos($allow_navs, $vv.hid) !== false)}
+ {assign var="has_children" value=true}
+ {/if}
+ {/foreach}
-
-
-
-
-
-
-
-
-
- {$v.title}
-
+ {if $has_children}
+
+
+
+
+
+
+
+
+ {$v.title}
+
+ {else}
+
+
+
+
+ {$v.title}
+
+ {/if}
{foreach from=$navigations.nav_three item=vv}
{if $vv.parent_id == $v.navigation_id && ($loggedInUser.groupid == 1 || strpos($allow_navs, $vv.hid) !== false)}
diff --git a/wy/server/view/panel/template/index.html b/wy/server/view/panel/template/index.html
new file mode 100644
index 0000000..ad60186
--- /dev/null
+++ b/wy/server/view/panel/template/index.html
@@ -0,0 +1,27 @@
+{$wrapper_prefix|default}
+
+
+
+{$wrapper_suffix|default}
+
diff --git a/wy/server/view/static/admin/js/sign.js b/wy/server/view/static/admin/js/sign.js
index 20f1417..931f4d7 100644
--- a/wy/server/view/static/admin/js/sign.js
+++ b/wy/server/view/static/admin/js/sign.js
@@ -60,10 +60,18 @@ $(document).ready(function() {
* 登陆成功,返回处理
*/
function sign_submited(data, textStatus) {
- if (data.status === 0) {
- window.location = data.data;
+ // 调试信息(生产环境可移除)
+ console.log('登录响应:', data);
+ console.log('status类型:', typeof data.status, '值:', data.status);
+ console.log('data值:', data.data);
+
+ // 使用 == 而不是 === 以兼容字符串"0"
+ if (data.status == 0 && data.data) {
+ console.log('准备跳转到:', data.data);
+ window.location.href = data.data;
} else {
- $('.notice-back').html(data.error);
+ console.log('登录失败,错误信息:', data.error);
+ $('.notice-back').html(data.error || '登录失败,请重试');
$('#vcodeimg').click();
shake('aui_iwrapper', true);
}
diff --git a/wy/server/view/static/comment/admin/js/comment.index.js b/wy/server/view/static/comment/admin/js/comment.index.js
new file mode 100644
index 0000000..878b8b8
--- /dev/null
+++ b/wy/server/view/static/comment/admin/js/comment.index.js
@@ -0,0 +1,124 @@
+$(document).ready(function() {
+
+ refreshListing();
+
+ /**
+ * 刷新或搜索
+ */
+ $('.action-refresh').on('click', function(){
+ $('#content_listing').datagrid('reload');
+ return false;
+ });
+
+ /**
+ * 关键字搜索 - 支持回车
+ */
+ $("input[name=key]").on('keypress', function (event) {
+ if (event.which == '13') {
+ $('#content_listing').datagrid('reload');
+ return false;
+ }
+ });
+
+ /**
+ * 确保标题栏不变形
+ */
+ $("#content_listing thead th").attr('nowrap','nowrap');
+});
+
+function refreshListing() {
+ /* fuelux datagrid */
+ var DataGridDataSource = function (options) {
+ this._formatter = options.formatter;
+ this._columns = options.columns;
+ this._delay = options.delay;
+ };
+
+ DataGridDataSource.prototype = {
+ columns: function () {
+ return this._columns;
+ },
+ data: function (options, callback) {
+ var url = '/commentadmin/index';
+ var self = this;
+
+ setTimeout(function () {
+
+ var data = $.extend(true, [], self._data);
+
+ $.ajax(url, {
+ data: {
+ rstype:"json",
+ pageIndex: options.pageIndex,
+ pageSize: options.pageSize,
+ key:$('input[name=key]').val()
+ },
+ dataType: 'json',
+ async: true,
+ type: 'GET'
+ }).done(function (response) {
+ var data = response.data.comment_list || [];
+ if (! data) {
+ return false;
+ }
+
+ var count=response.data.count || 0;
+ // PAGING
+ var startIndex = options.pageIndex * options.pageSize;
+ var endIndex = startIndex + options.pageSize;
+ var end = (endIndex > count) ? count : endIndex;
+ var pages = Math.ceil(count / options.pageSize);
+ var page = options.pageIndex + 1;
+ var start = startIndex + 1;
+
+ if (self._formatter) self._formatter(data);
+
+ callback({ data: data, start: start, end: end, count: count, pages: pages, page: page });
+ }).fail(function (e) {
+
+ });
+ }, self._delay);
+ }
+ };
+
+ $('#content_listing').datagrid({
+ dataSource: new DataGridDataSource({
+ // Column definitions for Datagrid
+ columns: [
+ {
+ property: 'comment_id',
+ label: '编号',
+ sortable: false
+ },
+ {
+ property: 'comment_content',
+ label: '评论内容',
+ sortable: false
+ },
+ {
+ property: 'ctime',
+ label: '创建时间',
+ sortable: false
+ },
+ {
+ property: 'action',
+ label: '操作',
+ sortable: false
+ }
+ ],
+ formatter: function (items) {
+ $.each(items, function (index, item) {
+ var comment_edit = ' ';
+ item.action = comment_edit
+ + ''
+ ;
+ });
+ }
+ }),
+ loadingHTML: '
正在加载……',
+ itemsText: '项',
+ itemText: '项',
+ dataOptions: { pageIndex: 0, pageSize: 15 }
+ });
+}
+
diff --git a/wy/server/view/static/device/admin/js/device.index.js b/wy/server/view/static/device/admin/js/device.index.js
new file mode 100644
index 0000000..fa6e49b
--- /dev/null
+++ b/wy/server/view/static/device/admin/js/device.index.js
@@ -0,0 +1,124 @@
+$(document).ready(function() {
+
+ refreshListing();
+
+ /**
+ * 刷新或搜索
+ */
+ $('.action-refresh').on('click', function(){
+ $('#content_listing').datagrid('reload');
+ return false;
+ });
+
+ /**
+ * 关键字搜索 - 支持回车
+ */
+ $("input[name=key]").on('keypress', function (event) {
+ if (event.which == '13') {
+ $('#content_listing').datagrid('reload');
+ return false;
+ }
+ });
+
+ /**
+ * 确保标题栏不变形
+ */
+ $("#content_listing thead th").attr('nowrap','nowrap');
+});
+
+function refreshListing() {
+ /* fuelux datagrid */
+ var DataGridDataSource = function (options) {
+ this._formatter = options.formatter;
+ this._columns = options.columns;
+ this._delay = options.delay;
+ };
+
+ DataGridDataSource.prototype = {
+ columns: function () {
+ return this._columns;
+ },
+ data: function (options, callback) {
+ var url = '/deviceadmin/index';
+ var self = this;
+
+ setTimeout(function () {
+
+ var data = $.extend(true, [], self._data);
+
+ $.ajax(url, {
+ data: {
+ rstype:"json",
+ pageIndex: options.pageIndex,
+ pageSize: options.pageSize,
+ key:$('input[name=key]').val()
+ },
+ dataType: 'json',
+ async: true,
+ type: 'GET'
+ }).done(function (response) {
+ var data = response.data.device_list || [];
+ if (! data) {
+ return false;
+ }
+
+ var count=response.data.count || 0;
+ // PAGING
+ var startIndex = options.pageIndex * options.pageSize;
+ var endIndex = startIndex + options.pageSize;
+ var end = (endIndex > count) ? count : endIndex;
+ var pages = Math.ceil(count / options.pageSize);
+ var page = options.pageIndex + 1;
+ var start = startIndex + 1;
+
+ if (self._formatter) self._formatter(data);
+
+ callback({ data: data, start: start, end: end, count: count, pages: pages, page: page });
+ }).fail(function (e) {
+
+ });
+ }, self._delay);
+ }
+ };
+
+ $('#content_listing').datagrid({
+ dataSource: new DataGridDataSource({
+ // Column definitions for Datagrid
+ columns: [
+ {
+ property: 'device_id',
+ label: '编号',
+ sortable: false
+ },
+ {
+ property: 'device_name',
+ label: '设备名称',
+ sortable: false
+ },
+ {
+ property: 'ctime',
+ label: '创建时间',
+ sortable: false
+ },
+ {
+ property: 'action',
+ label: '操作',
+ sortable: false
+ }
+ ],
+ formatter: function (items) {
+ $.each(items, function (index, item) {
+ var device_edit = ' ';
+ item.action = device_edit
+ + ''
+ ;
+ });
+ }
+ }),
+ loadingHTML: '
正在加载……',
+ itemsText: '项',
+ itemText: '项',
+ dataOptions: { pageIndex: 0, pageSize: 15 }
+ });
+}
+
diff --git a/wy/server/view/static/door/admin/js/door.edit.js b/wy/server/view/static/door/admin/js/door.edit.js
new file mode 100644
index 0000000..1901a35
--- /dev/null
+++ b/wy/server/view/static/door/admin/js/door.edit.js
@@ -0,0 +1,34 @@
+$(document).ready(function() {
+
+ /**
+ * 提交表单
+ */
+ $('#btn_submit').on('click', function(){
+ var form = $('#edit_form');
+ var url = form.attr('action');
+ var formData = new FormData(form[0]);
+
+ $.ajax({
+ type: 'POST',
+ url: url,
+ data: formData,
+ dataType: 'json',
+ processData: false,
+ contentType: false,
+ timeout: 60000,
+ success: function(data) {
+ if (data.status == 0) {
+ alert('保存成功');
+ window.location.href = '/dooradmin/index';
+ } else {
+ alert(data.error || '保存失败');
+ }
+ },
+ error: function() {
+ alert('网络错误,请重试');
+ }
+ });
+ return false;
+ });
+});
+
diff --git a/wy/server/view/static/door/admin/js/door.index.js b/wy/server/view/static/door/admin/js/door.index.js
new file mode 100644
index 0000000..d4fb676
--- /dev/null
+++ b/wy/server/view/static/door/admin/js/door.index.js
@@ -0,0 +1,184 @@
+$(document).ready(function() {
+
+ refreshListing();
+
+ /**
+ * 刷新或搜索
+ */
+ $('.action-refresh').on('click', function(){
+ $('#content_listing').datagrid('reload');
+ return false;
+ });
+
+ /**
+ * 关键字搜索 - 支持回车
+ */
+ $("input[name=key]").on('keypress', function (event) {
+ if (event.which == '13') {
+ $('#content_listing').datagrid('reload');
+ return false;
+ }
+ });
+
+ /**
+ * 扔进回收站 - 单条
+ */
+ $("#content_listing").delegate('.operate-trash', 'click', function(){
+ var door_device_id = $(this).attr("door_device_id");
+ doTrashContent(door_device_id);
+ });
+
+ /**
+ * 确保标题栏不变形
+ */
+ $("#content_listing thead th").attr('nowrap','nowrap');
+});
+
+
+
+/**
+ * 删除 - 扔进回收站
+ */
+function doTrashContent(door_device_id) {
+ var del = confirm('确定要将所选设备删除吗?');
+ if (! del) {return false;}
+ /* 执行 */
+ $.ajax({
+ type:'post',
+ url:'/dooradmin/index/delete',
+ data:'door_device_id=' + door_device_id,
+ dataType:'json',
+ timeout:60000,
+ success:function(data){
+ if (data.status == 0) {
+ if (parseInt(door_device_id) == door_device_id) {
+ $("#device_" + door_device_id).parent().parent().remove();
+ } else {
+ $('#content_listing').find('.select-single:checked').parent().parent().remove();
+ }
+ } else {
+ alert(data.error);
+ }
+ return false;
+ }
+ });
+}
+
+
+function refreshListing() {
+ /* fuelux datagrid */
+ var DataGridDataSource = function (options) {
+ this._formatter = options.formatter;
+ this._columns = options.columns;
+ this._delay = options.delay;
+ };
+
+ DataGridDataSource.prototype = {
+ columns: function () {
+ return this._columns;
+ },
+ data: function (options, callback) {
+ var url = '/dooradmin/index';
+ var self = this;
+
+ setTimeout(function () {
+
+ var data = $.extend(true, [], self._data);
+
+ $.ajax(url, {
+ data: {
+ rstype:"json",
+ pageIndex: options.pageIndex,
+ pageSize: options.pageSize,
+ key:$('input[name=key]').val()
+ },
+ dataType: 'json',
+ async: true,
+ type: 'GET'
+ }).done(function (response) {
+ var data = response.data.device_list;
+ if (! data) {
+ return false;
+ }
+
+ var count=response.data.count;//设置data.total
+ // PAGING
+ var startIndex = options.pageIndex * options.pageSize;
+ var endIndex = startIndex + options.pageSize;
+ var end = (endIndex > count) ? count : endIndex;
+ var pages = Math.ceil(count / options.pageSize);
+ var page = options.pageIndex + 1;
+ var start = startIndex + 1;
+
+ if (self._formatter) self._formatter(data);
+
+ callback({ data: data, start: start, end: end, count: count, pages: pages, page: page });
+ }).fail(function (e) {
+
+ });
+ }, self._delay);
+ }
+ };
+
+ $('#content_listing').datagrid({
+ dataSource: new DataGridDataSource({
+ // Column definitions for Datagrid
+ columns: [
+ {
+ property: 'door_device_id',
+ label: '编号',
+ sortable: false
+ },
+ {
+ property: 'device_sn',
+ label: '设备序列号',
+ sortable: false
+ },
+ {
+ property: 'device_ip',
+ label: '设备IP',
+ sortable: false
+ },
+ {
+ property: 'device_port',
+ label: '设备端口',
+ sortable: false
+ },
+ {
+ property: 'device_type',
+ label: '设备类型',
+ sortable: false
+ },
+ {
+ property: 'ctime',
+ label: '创建时间',
+ sortable: false
+ },
+ {
+ property: 'action',
+ label: '操作',
+ sortable: false
+ }
+ ],
+ formatter: function (items) {
+ //设备类型
+ var device_type = new Array();
+ device_type[1] = '门禁设备';
+ device_type[2] = '其他设备';
+ $.each(items, function (index, item) {
+ var device_type_val = item.device_type || 1;
+ item.device_type = device_type[device_type_val] || '未知';
+ var device_edit = ' ';
+ item.action = device_edit
+ + ''
+ ;
+ });
+ }
+ }),
+ loadingHTML: '
正在加载……',
+ itemsText: '项',
+ itemText: '项',
+ dataOptions: { pageIndex: 0, pageSize: 15 }
+ });
+}
+
diff --git a/wy/server/view/static/errand/admin/js/errand.index.js b/wy/server/view/static/errand/admin/js/errand.index.js
new file mode 100644
index 0000000..60fbd6e
--- /dev/null
+++ b/wy/server/view/static/errand/admin/js/errand.index.js
@@ -0,0 +1,124 @@
+$(document).ready(function() {
+
+ refreshListing();
+
+ /**
+ * 刷新或搜索
+ */
+ $('.action-refresh').on('click', function(){
+ $('#content_listing').datagrid('reload');
+ return false;
+ });
+
+ /**
+ * 关键字搜索 - 支持回车
+ */
+ $("input[name=key]").on('keypress', function (event) {
+ if (event.which == '13') {
+ $('#content_listing').datagrid('reload');
+ return false;
+ }
+ });
+
+ /**
+ * 确保标题栏不变形
+ */
+ $("#content_listing thead th").attr('nowrap','nowrap');
+});
+
+function refreshListing() {
+ /* fuelux datagrid */
+ var DataGridDataSource = function (options) {
+ this._formatter = options.formatter;
+ this._columns = options.columns;
+ this._delay = options.delay;
+ };
+
+ DataGridDataSource.prototype = {
+ columns: function () {
+ return this._columns;
+ },
+ data: function (options, callback) {
+ var url = '/errandadmin/index';
+ var self = this;
+
+ setTimeout(function () {
+
+ var data = $.extend(true, [], self._data);
+
+ $.ajax(url, {
+ data: {
+ rstype:"json",
+ pageIndex: options.pageIndex,
+ pageSize: options.pageSize,
+ key:$('input[name=key]').val()
+ },
+ dataType: 'json',
+ async: true,
+ type: 'GET'
+ }).done(function (response) {
+ var data = response.data.errand_list || [];
+ if (! data) {
+ return false;
+ }
+
+ var count=response.data.count || 0;
+ // PAGING
+ var startIndex = options.pageIndex * options.pageSize;
+ var endIndex = startIndex + options.pageSize;
+ var end = (endIndex > count) ? count : endIndex;
+ var pages = Math.ceil(count / options.pageSize);
+ var page = options.pageIndex + 1;
+ var start = startIndex + 1;
+
+ if (self._formatter) self._formatter(data);
+
+ callback({ data: data, start: start, end: end, count: count, pages: pages, page: page });
+ }).fail(function (e) {
+
+ });
+ }, self._delay);
+ }
+ };
+
+ $('#content_listing').datagrid({
+ dataSource: new DataGridDataSource({
+ // Column definitions for Datagrid
+ columns: [
+ {
+ property: 'errand_id',
+ label: '编号',
+ sortable: false
+ },
+ {
+ property: 'errand_name',
+ label: '服务名称',
+ sortable: false
+ },
+ {
+ property: 'ctime',
+ label: '创建时间',
+ sortable: false
+ },
+ {
+ property: 'action',
+ label: '操作',
+ sortable: false
+ }
+ ],
+ formatter: function (items) {
+ $.each(items, function (index, item) {
+ var errand_edit = ' ';
+ item.action = errand_edit
+ + ''
+ ;
+ });
+ }
+ }),
+ loadingHTML: '
正在加载……',
+ itemsText: '项',
+ itemText: '项',
+ dataOptions: { pageIndex: 0, pageSize: 15 }
+ });
+}
+