-
-
-
- From a9a0403d72f3bf8ae729733ff350f380b757aa56 Mon Sep 17 00:00:00 2001
From: gongfuxiang <2499232802@qq.com>
Date: Mon, 29 Apr 2019 00:29:43 +0800
Subject: [PATCH] del petscms
---
application/plugins/petscms/Admin.php | 102 ---
application/plugins/petscms/Hook.php | 93 ---
application/plugins/petscms/Pets.php | 350 ---------
application/plugins/petscms/Petsadmin.php | 280 -------
application/plugins/petscms/Service.php | 700 ------------------
application/plugins/petscms/config.json | 27 -
application/plugins/petscms/install.sql | 59 --
application/plugins/petscms/uninstall.sql | 5 -
.../plugins/view/petscms/admin/base.html | 99 ---
.../plugins/view/petscms/admin/index.html | 33 -
.../plugins/view/petscms/admin/saveinfo.html | 103 ---
.../plugins/view/petscms/pets/detail.html | 319 --------
.../plugins/view/petscms/pets/help.html | 92 ---
.../plugins/view/petscms/pets/helpmap.html | 39 -
.../plugins/view/petscms/pets/index.html | 220 ------
.../plugins/view/petscms/pets/saveinfo.html | 249 -------
.../plugins/view/petscms/petsadmin/help.html | 79 --
.../view/petscms/petsadmin/helpmap.html | 39 -
.../plugins/view/petscms/petsadmin/index.html | 210 ------
.../view/petscms/petsadmin/saveinfo.html | 220 ------
application/tags.php | 18 +-
config/shopxo.sql | 88 +--
public/static/plugins/css/petscms/admin.css | 60 --
public/static/plugins/css/petscms/pets.css | 78 --
.../plugins/css/petscms/pets.detail.css | 288 -------
.../static/plugins/css/petscms/petsadmin.css | 87 ---
.../plugins/images/petscms/default-images.jpg | Bin 13755 -> 0 bytes
.../static/plugins/images/petscms/index.html | 1 -
.../images/petscms/pets-default-images.jpg | Bin 16374 -> 0 bytes
public/static/plugins/js/petscms/pets.js | 15 -
public/static/plugins/js/petscms/petsadmin.js | 15 -
.../2019/04/09/1554814711403578.jpg | Bin 3385 -> 0 bytes
32 files changed, 15 insertions(+), 3953 deletions(-)
delete mode 100755 application/plugins/petscms/Admin.php
delete mode 100755 application/plugins/petscms/Hook.php
delete mode 100755 application/plugins/petscms/Pets.php
delete mode 100755 application/plugins/petscms/Petsadmin.php
delete mode 100755 application/plugins/petscms/Service.php
delete mode 100755 application/plugins/petscms/config.json
delete mode 100755 application/plugins/petscms/install.sql
delete mode 100755 application/plugins/petscms/uninstall.sql
delete mode 100755 application/plugins/view/petscms/admin/base.html
delete mode 100755 application/plugins/view/petscms/admin/index.html
delete mode 100755 application/plugins/view/petscms/admin/saveinfo.html
delete mode 100755 application/plugins/view/petscms/pets/detail.html
delete mode 100755 application/plugins/view/petscms/pets/help.html
delete mode 100755 application/plugins/view/petscms/pets/helpmap.html
delete mode 100755 application/plugins/view/petscms/pets/index.html
delete mode 100755 application/plugins/view/petscms/pets/saveinfo.html
delete mode 100755 application/plugins/view/petscms/petsadmin/help.html
delete mode 100755 application/plugins/view/petscms/petsadmin/helpmap.html
delete mode 100755 application/plugins/view/petscms/petsadmin/index.html
delete mode 100755 application/plugins/view/petscms/petsadmin/saveinfo.html
delete mode 100755 public/static/plugins/css/petscms/admin.css
delete mode 100644 public/static/plugins/css/petscms/pets.css
delete mode 100644 public/static/plugins/css/petscms/pets.detail.css
delete mode 100644 public/static/plugins/css/petscms/petsadmin.css
delete mode 100644 public/static/plugins/images/petscms/default-images.jpg
delete mode 100755 public/static/plugins/images/petscms/index.html
delete mode 100644 public/static/plugins/images/petscms/pets-default-images.jpg
delete mode 100644 public/static/plugins/js/petscms/pets.js
delete mode 100644 public/static/plugins/js/petscms/petsadmin.js
delete mode 100755 public/static/upload/images/plugins_petscms/2019/04/09/1554814711403578.jpg
diff --git a/application/plugins/petscms/Admin.php b/application/plugins/petscms/Admin.php
deleted file mode 100755
index 1a014051c..000000000
--- a/application/plugins/petscms/Admin.php
+++ /dev/null
@@ -1,102 +0,0 @@
-fetch('../../../plugins/view/petscms/admin/index');
- }
-
- /**
- * 配置管理
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-02-07T08:21:54+0800
- * @param [array] $params [输入参数]
- */
- public function base($params = [])
- {
- $ret = PluginsService::PluginsData('petscms', ['logo', 'pets_default_images', 'alipay_qrcode_images', 'weixin_qrcode_images']);
- if($ret['code'] == 0)
- {
- if(!empty($ret['data']['not_bind_desc']))
- {
- $ret['data']['not_bind_desc'] = str_replace("\n", '
', $ret['data']['not_bind_desc']);
- }
- $this->assign('data', $ret['data']);
- return $this->fetch('../../../plugins/view/petscms/admin/base');
- } else {
- return $ret['msg'];
- }
- }
-
- /**
- * 编辑页面
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-02-07T08:21:54+0800
- * @param [array] $params [输入参数]
- */
- public function saveinfo($params = [])
- {
- $ret = PluginsService::PluginsData('petscms', ['logo', 'pets_default_images', 'alipay_qrcode_images', 'weixin_qrcode_images'], false);
- if($ret['code'] == 0)
- {
- // 是否
- $is_whether_list = [
- 0 => array('id' => 0, 'name' => '否', 'checked' => true),
- 1 => array('id' => 1, 'name' => '是'),
- ];
-
- $this->assign('is_whether_list', $is_whether_list);
- $this->assign('data', $ret['data']);
- return $this->fetch('../../../plugins/view/petscms/admin/saveinfo');
- } else {
- return $ret['msg'];
- }
- }
-
- /**
- * 数据保存
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-02-07T08:21:54+0800
- * @param [array] $params [输入参数]
- */
- public function save($params = [])
- {
- return PluginsService::PluginsDataSave(['plugins'=>'petscms', 'data'=>$params], ['logo', 'pets_default_images', 'alipay_qrcode_images', 'weixin_qrcode_images']);
- }
-}
-?>
\ No newline at end of file
diff --git a/application/plugins/petscms/Hook.php b/application/plugins/petscms/Hook.php
deleted file mode 100755
index 19a71abdb..000000000
--- a/application/plugins/petscms/Hook.php
+++ /dev/null
@@ -1,93 +0,0 @@
-UserCenterLeftMenuHandle($params);
- break;
-
- // 顶部小导航右侧-我的商城
- case 'plugins_service_header_navigation_top_right_handle' :
- $ret = $this->CommonTopNavRightMenuHandle($params);
- break;
-
- default :
- $ret = '';
- }
- return $ret;
- }
- }
-
- /**
- * 用户中心左侧菜单处理
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2019-04-11
- * @desc description
- * @param array $params [description]
- */
- public function UserCenterLeftMenuHandle($params = [])
- {
- $params['data']['business']['item'][] = [
- 'name' => '我的宠物',
- 'url' => PluginsHomeUrl('petscms', 'pets', 'index'),
- 'contains' => ['petsindex', 'petssaveinfo', 'petshelp'],
- 'is_show' => 1,
- 'icon' => 'am-icon-github-alt',
- ];
- }
-
- /**
- * 顶部小导航右侧-我的商城
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2019-04-11
- * @desc description
- * @param array $params [description]
- */
- public function CommonTopNavRightMenuHandle($params = [])
- {
- array_push($params['data'][1]['items'], [
- 'name' => '我的宠物',
- 'url' => PluginsHomeUrl('petscms', 'pets', 'index'),
- ]);
- }
-}
-?>
\ No newline at end of file
diff --git a/application/plugins/petscms/Pets.php b/application/plugins/petscms/Pets.php
deleted file mode 100755
index 32cb7c538..000000000
--- a/application/plugins/petscms/Pets.php
+++ /dev/null
@@ -1,350 +0,0 @@
-user = UserService::LoginUserInfo();
-
- // 需要登录校验的方法
- $is_login_all = ['index', 'saveinfo', 'save', 'untying', 'help', 'helpmap'];
-
- // 登录校验
- if(in_array(input('pluginsaction'), $is_login_all) && empty($this->user))
- {
- if(IS_AJAX)
- {
- exit(json_encode(DataReturn('登录失效,请重新登录', -400)));
- } else {
- return $this->redirect('index/user/logininfo');
- }
- }
- }
-
- /**
- * 我的宠物
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function index($params = [])
- {
- // 参数
- $params['user'] = $this->user;
-
- // 分页
- $number = 10;
-
- // 条件
- $where = Service::PetsListWhere($params);
-
- // 获取总数
- $total = Service::PetsTotal($where);
-
- // 分页
- $page_params = array(
- 'number' => $number,
- 'total' => $total,
- 'where' => $params,
- 'page' => isset($params['page']) ? intval($params['page']) : 1,
- 'url' => PluginsHomeUrl('petscms', 'pets', 'index'),
- );
- $page = new \base\Page($page_params);
- $this->assign('page_html', $page->GetPageHtml());
-
- // 获取列表
- $data_params = array(
- 'm' => $page->GetPageStarNumber(),
- 'n' => $number,
- 'where' => $where,
- );
- $data = Service::PetsList($data_params);
- unset($params['user']);
- $this->assign('params', $params);
- $this->assign('data_list', $data['data']);
- $this->assign('pets_attribute_status_list', Service::$pets_attribute_status_list);
- $this->assign('pets_attribute_is_text_list', Service::$pets_attribute_is_text_list);
- $this->assign('pets_attribute_gender_list', Service::$pets_attribute_gender_list);
- $this->assign('pets_attribute_type_list', Service::$pets_attribute_type_list);
- return $this->fetch('../../../plugins/view/petscms/pets/index');
- }
-
- /**
- * 宠物添加/编辑页面
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function saveinfo($params = [])
- {
- // 是否绑定
- if(!empty($params['pest_no']))
- {
- $data_params = array(
- 'm' => 0,
- 'n' => 1,
- 'where' => ['pest_no' => $params['pest_no']],
- );
- $ret = Service::PetsList($data_params);
- if(!empty($ret['data'][0]['user_id']))
- {
- $this->assign('msg', '该宠物已被绑定');
- return $this->fetch('public/tips_error');
- }
- $this->assign('pest_no', $params['pest_no']);
- unset($params['pest_no']);
- }
-
- // 获取数据
- $data = [];
- if(!empty($params['id']))
- {
- $data_params = array(
- 'm' => 0,
- 'n' => 1,
- 'where' => ['id' => intval($params['id'])],
- );
- $ret = Service::PetsList($data_params);
- if(!empty($ret['data'][0]))
- {
- $ret['data'][0]['lose_features'] = str_replace('
', "\n", $ret['data'][0]['lose_features']);
- $data = $ret['data'][0];
- }
- unset($params['id']);
- }
-
- $this->assign('params', $params);
- $this->assign('data', $data);
- $this->assign('pets_attribute_status_list', Service::$pets_attribute_status_list);
- $this->assign('pets_attribute_is_text_list', Service::$pets_attribute_is_text_list);
- $this->assign('pets_attribute_gender_list', Service::$pets_attribute_gender_list);
- $this->assign('pets_attribute_type_list', Service::$pets_attribute_type_list);
- return $this->fetch('../../../plugins/view/petscms/pets/saveinfo');
- }
-
- /**
- * 宠物详情
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function detail($params = [])
- {
- // 获取数据
- $data = [];
- if(empty($params['id']))
- {
- return '宠物id有误';
- }
- $data_params = array(
- 'm' => 0,
- 'n' => 1,
- 'where' => ['id' => intval($params['id']), 'status'=>[0,1,2]],
- );
- $ret = Service::PetsList($data_params);
- $data = empty($ret['data'][0]) ? [] : $ret['data'][0];
- $this->assign('data', $data);
-
- // 基础信息
- $ret = PluginsService::PluginsData('petscms', ['logo', 'pets_default_images', 'alipay_qrcode_images', 'weixin_qrcode_images']);
- if(!empty($ret['data']['not_bind_desc']))
- {
- $ret['data']['not_bind_desc'] = str_replace("\n", '
', $ret['data']['not_bind_desc']);
- }
- $this->assign('plugins_base_data', $ret['data']);
-
- // 浏览器标题
- if(!empty($data['title']))
- {
- $this->assign('home_seo_site_title', SeoService::BrowserSeoTitle($data['title']));
- }
-
- $this->assign('params', $params);
- return $this->fetch('../../../plugins/view/petscms/pets/detail');
- }
-
- /**
- * 宠物添加/编辑
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function save($params = [])
- {
- // 是否ajax请求
- if(!IS_AJAX)
- {
- return $this->error('非法访问');
- }
-
- // 用户
- $params['user_id'] = $this->user['id'];
- return Service::PetsSave($params);
- }
-
- /**
- * 宠物解绑
- * @author Devil
- * @blog http://gong.gg/
- * @version 0.0.1
- * @datetime 2016-12-15T11:03:30+0800
- */
- public function untying($params = [])
- {
- // 是否ajax
- if(!IS_AJAX)
- {
- return $this->error('非法访问');
- }
-
- // 用户
- $params['user_id'] = $this->user['id'];
- return Service::PetsUntying($params);
- }
-
- /**
- * 丢失提供信息添加/编辑
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function helpsave($params = [])
- {
- // 是否ajax请求
- if(!IS_AJAX)
- {
- return $this->error('非法访问');
- }
-
- // 用户
- $params['user_id'] = $this->user['id'];
- return Service::HelpSave($params);
- }
-
- /**
- * 宠物帮助数据列表
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function help($params = [])
- {
- // 参数
- $params = input();
- if(empty($params['pets_id']))
- {
- $this->assign('msg', '参数有误');
- return $this->fetch('public/tips_error');
- }
-
- // 分页
- $number = 10;
-
- // 条件
- $where = [
- 'user_id' => $this->user['id'],
- 'pets_id' => intval($params['pets_id']),
- ];
-
- // 获取总数
- $total = Service::HelpTotal($where);
-
- // 分页
- $page_params = array(
- 'number' => $number,
- 'total' => $total,
- 'where' => $params,
- 'page' => isset($params['page']) ? intval($params['page']) : 1,
- 'url' => PluginsHomeUrl('petscms', 'pets', 'index'),
- );
- $page = new \base\Page($page_params);
- $this->assign('page_html', $page->GetPageHtml());
-
- // 获取列表
- $data_params = array(
- 'm' => $page->GetPageStarNumber(),
- 'n' => $number,
- 'where' => $where,
- );
- $data = Service::HelpList($data_params);
- $this->assign('data_list', $data['data']);
- return $this->fetch('../../../plugins/view/petscms/pets/help');
- }
-
- /**
- * 宠物帮助数据地图展示
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function helpmap($params = [])
- {
- // 隐藏头尾
- $this->assign('is_header', 0);
- $this->assign('is_footer', 0);
-
- // 参数
- $params = input();
- if(!empty($params['lng']))
- {
- $params['lng'] = base64_decode($params['lng']);
- }
- if(!empty($params['lat']))
- {
- $params['lat'] = base64_decode($params['lat']);
- }
- $this->assign('params', $params);
- return $this->fetch('../../../plugins/view/petscms/pets/helpmap');
- }
-}
-?>
\ No newline at end of file
diff --git a/application/plugins/petscms/Petsadmin.php b/application/plugins/petscms/Petsadmin.php
deleted file mode 100755
index 097946fde..000000000
--- a/application/plugins/petscms/Petsadmin.php
+++ /dev/null
@@ -1,280 +0,0 @@
- $number,
- 'total' => $total,
- 'where' => $params,
- 'page' => isset($params['page']) ? intval($params['page']) : 1,
- 'url' => PluginsAdminUrl('petscms', 'petsadmin', 'index'),
- );
- $page = new \base\Page($page_params);
- $this->assign('page_html', $page->GetPageHtml());
-
- // 获取列表
- $data_params = array(
- 'm' => $page->GetPageStarNumber(),
- 'n' => $number,
- 'where' => $where,
- );
- $data = Service::PetsList($data_params);
- $this->assign('data_list', $data['data']);
-
- // 插件配置信息
- $base = PluginsService::PluginsData('petscms', ['logo', 'pets_default_images', 'alipay_qrcode_images', 'weixin_qrcode_images'], false);
- $this->assign('plugins_base_data', $base['data']);
-
- $this->assign('params', $params);
- $this->assign('pets_attribute_status_list', Service::$pets_attribute_status_list);
- $this->assign('pets_attribute_is_text_list', Service::$pets_attribute_is_text_list);
- $this->assign('pets_attribute_gender_list', Service::$pets_attribute_gender_list);
- $this->assign('pets_attribute_type_list', Service::$pets_attribute_type_list);
- return $this->fetch('../../../plugins/view/petscms/petsadmin/index');
- }
-
- /**
- * 添加/编辑页面
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function saveinfo($params = [])
- {
- // 获取数据
- $data = [];
- if(!empty($params['id']))
- {
- $data_params = array(
- 'm' => 0,
- 'n' => 1,
- 'where' => ['id' => intval($params['id'])],
- );
- $ret = Service::PetsList($data_params);
- if(!empty($ret['data'][0]))
- {
- $ret['data'][0]['lose_features'] = str_replace('
', "\n", $ret['data'][0]['lose_features']);
- $data = $ret['data'][0];
- }
- unset($params['id']);
- }
- $this->assign('params', $params);
- $this->assign('data', $data);
- $this->assign('pets_attribute_status_list', Service::$pets_attribute_status_list);
- $this->assign('pets_attribute_is_text_list', Service::$pets_attribute_is_text_list);
- $this->assign('pets_attribute_gender_list', Service::$pets_attribute_gender_list);
- $this->assign('pets_attribute_type_list', Service::$pets_attribute_type_list);
- return $this->fetch('../../../plugins/view/petscms/petsadmin/saveinfo');
- }
-
- /**
- * 宠物详情
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function detail($params = [])
- {
- // 获取数据
- $data = [];
- if(empty($params['id']))
- {
- return '宠物id有误';
- }
- $data_params = array(
- 'm' => 0,
- 'n' => 1,
- 'where' => ['id' => intval($params['id']), 'status'=>[0,1,2]],
- );
- $ret = Service::PetsList($data_params);
- $data = empty($ret['data'][0]) ? [] : $ret['data'][0];
-
- $this->assign('data', $data);
- $this->assign('params', $params);
- return $this->fetch('../../../plugins/view/petscms/petsadmin/detail');
- }
-
- /**
- * 宠物添加/编辑
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function save($params = [])
- {
- // 是否ajax请求
- if(!IS_AJAX)
- {
- return $this->error('非法访问');
- }
-
- // 用户
- return Service::PetsSave($params);
- }
-
- /**
- * 宠物解绑
- * @author Devil
- * @blog http://gong.gg/
- * @version 0.0.1
- * @datetime 2016-12-15T11:03:30+0800
- */
- public function untying($params = [])
- {
- // 是否ajax
- if(!IS_AJAX)
- {
- return $this->error('非法访问');
- }
-
- // 开始操作
- return Service::PetsUntying($params);
- }
-
- /**
- * 宠物删除
- * @author Devil
- * @blog http://gong.gg/
- * @version 0.0.1
- * @datetime 2016-12-15T11:03:30+0800
- */
- public function delete($params = [])
- {
- // 是否ajax
- if(!IS_AJAX)
- {
- return $this->error('非法访问');
- }
-
- // 开始操作
- return Service::PetsDelete($params);
- }
-
- /**
- * 宠物帮助数据列表
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function help($params = [])
- {
- // 参数
- if(empty($params['pets_id']))
- {
- return '参数有误';
- }
-
- // 分页
- $number = MyC('admin_page_number', 10, true);
-
- // 条件
- $where = [
- 'pets_id' => intval($params['pets_id']),
- ];
-
- // 获取总数
- $total = Service::HelpTotal($where);
-
- // 分页
- $page_params = array(
- 'number' => $number,
- 'total' => $total,
- 'where' => $params,
- 'page' => isset($params['page']) ? intval($params['page']) : 1,
- 'url' => PluginsAdminUrl('petscms', 'petsadmin', 'index'),
- );
- $page = new \base\Page($page_params);
- $this->assign('page_html', $page->GetPageHtml());
-
- // 获取列表
- $data_params = array(
- 'm' => $page->GetPageStarNumber(),
- 'n' => $number,
- 'where' => $where,
- );
- $data = Service::HelpList($data_params);
- unset($params['pets_id']);
- $this->assign('data_list', $data['data']);
- $this->assign('params', $params);
- return $this->fetch('../../../plugins/view/petscms/petsadmin/help');
- }
-
- /**
- * 宠物帮助数据地图展示
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-03-15T23:51:50+0800
- * @param [array] $params [输入参数]
- */
- public function helpmap($params = [])
- {
- // 隐藏头尾
- $this->assign('is_header', 0);
- $this->assign('is_footer', 0);
-
- // 参数
- $params = input();
- if(!empty($params['lng']))
- {
- $params['lng'] = base64_decode($params['lng']);
- }
- if(!empty($params['lat']))
- {
- $params['lat'] = base64_decode($params['lat']);
- }
- $this->assign('params', $params);
- return $this->fetch('../../../plugins/view/petscms/petsadmin/helpmap');
- }
-}
-?>
\ No newline at end of file
diff --git a/application/plugins/petscms/Service.php b/application/plugins/petscms/Service.php
deleted file mode 100755
index 6c5853d47..000000000
--- a/application/plugins/petscms/Service.php
+++ /dev/null
@@ -1,700 +0,0 @@
- ['value' => 'cat', 'name' => '猫咪'],
- 'dog' => ['value' => 'dog', 'name' => '狗狗'],
- 'other' => ['value' => 'other', 'name' => '其它'],
- ];
-
- // 是否
- public static $pets_attribute_is_text_list = [
- 0 => ['value' => 0, 'name' => '否', 'checked' => true],
- 1 => ['value' => 1, 'name' => '是'],
- ];
-
- // 性别
- public static $pets_attribute_gender_list = [
- 0 => ['value' => 0, 'name' => '公'],
- 1 => ['value' => 1, 'name' => '母'],
- ];
-
- // 状态(0正常, 1丢失, 2去世, 3关闭)
- public static $pets_attribute_status_list = [
- 0 => ['value' => 0, 'name' => '正常'],
- 1 => ['value' => 1, 'name' => '丢失'],
- 2 => ['value' => 2, 'name' => '去世'],
- 3 => ['value' => 3, 'name' => '关闭'],
- ];
-
- /**
- * 宠物列表
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-09-29
- * @desc description
- * @param [array] $params [输入参数]
- */
- public static function PetsList($params = [])
- {
- $where = empty($params['where']) ? [] : $params['where'];
- $m = isset($params['m']) ? intval($params['m']) : 0;
- $n = isset($params['n']) ? intval($params['n']) : 10;
- $order_by = empty($params['order_by']) ? 'status asc, id desc' : $params['order_by'];
-
- // 获取数据列表
- $data = Db::name('PluginsPetscmsPets')->where($where)->limit($m, $n)->order($order_by)->select();
- if(!empty($data))
- {
- foreach($data as &$v)
- {
- // 类型
- $v['type_name'] = (isset($v['type']) && isset(self::$pets_attribute_type_list[$v['type']])) ? self::$pets_attribute_type_list[$v['type']]['name'] : '';
-
- // 性别
- $v['gender_name'] = (isset($v['gender']) && isset(self::$pets_attribute_gender_list[$v['gender']])) ? self::$pets_attribute_gender_list[$v['gender']]['name'] : '';
-
- // 是否绝育
- $v['sterilization_name'] = (isset($v['sterilization']) && isset(self::$pets_attribute_is_text_list[$v['sterilization']])) ? self::$pets_attribute_is_text_list[$v['sterilization']]['name'] : '';
-
- // 是否疫苗
- $v['vaccine_name'] = (isset($v['vaccine']) && isset(self::$pets_attribute_is_text_list[$v['vaccine']])) ? self::$pets_attribute_is_text_list[$v['vaccine']]['name'] : '';
-
- // 状态
- $v['status_name'] = self::$pets_attribute_status_list[$v['status']]['name'];
-
- // 生日/年龄
- if(empty($v['birthday']))
- {
- $v['birthday_name'] = null;
- $v['age'] = '0岁';
- } else {
- $v['birthday_name'] = date('Y-m-d', $v['birthday']);
- $age = \base\Age::CalAge($v['birthday_name']);
- $v['age'] = $age['year'].'年'.$age['month'].'月'.$age['day'].'天';
- }
-
- // 内容
- $v['content'] = ResourcesService::ContentStaticReplace($v['content'], 'get');
-
- // 相册
- $v['photo'] = empty($v['photo']) ? null : self::GetPetsPhotoHandle($v['photo']);
-
- // 丢失时间
- $v['lose_time_name'] = empty($v['lose_time']) ? '' : date('Y-m-d', $v['lose_time']);
-
- // 丢失宠物特征
- $v['lose_features'] = str_replace("\n", '
', $v['lose_features']);
-
- // 二维码
- $v['qrcode_url'] = empty($v['qrcode_images']) ? MyUrl('index/qrcode/index', ['content'=>urlencode(base64_encode(PluginsHomeUrl('petscms', 'pets', 'detail', ['id'=>$v['id']])))]) : ResourcesService::AttachmentPathViewHandle($v['qrcode_images']);
- $v['qrcode_download'] = MyUrl('index/qrcode/download', ['url'=>urlencode(base64_encode($v['qrcode_url'])), 'filename'=>$v['pest_no']]);
-
- // 地址
- $v['province_name'] = RegionService::RegionName($v['lose_province']);
- $v['city_name'] = RegionService::RegionName($v['lose_city']);
- $v['county_name'] = RegionService::RegionName($v['lose_county']);
-
- // 时间
- $v['add_time_time'] = date('Y-m-d H:i:s', $v['add_time']);
- $v['add_time_date'] = date('Y-m-d', $v['add_time']);
- $v['upd_time_time'] = empty($v['upd_time']) ? '' : date('Y-m-d H:i:s', $v['upd_time']);
- $v['upd_time_date'] = empty($v['upd_time']) ? '' : date('Y-m-d', $v['upd_time']);
- }
- }
- return DataReturn('处理成功', 0, $data);
- }
-
- /**
- * 宠物相册获取处理
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2019-04-11T22:56:49+0800
- * @param [array] $photo [相册数据]
- */
- private static function GetPetsPhotoHandle($photo)
- {
- $result = [];
- if(!empty($photo))
- {
- if(is_string($photo))
- {
- $photo = json_decode($photo, true);
- }
- foreach($photo as &$v)
- {
- $result[] = [
- 'images_old' => $v,
- 'images' => ResourcesService::AttachmentPathViewHandle($v),
- ];
- }
- }
- return $result;
- }
-
- /**
- * 宠物列表条件
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-09-29
- * @desc description
- * @param [array] $params [输入参数]
- */
- public static function PetsListWhere($params = [])
- {
- // 条件初始化
- $where = [];
-
- // 用户id
- if(!empty($params['user']))
- {
- $where[] = ['user_id', '=', $params['user']['id']];
- }
-
- // 关键字
- if(!empty($params['keywords']))
- {
- $where[] = ['title|detail', 'like', '%'.$params['keywords'].'%'];
- }
-
- // 是否更多条件
- if(isset($params['is_more']) && $params['is_more'] == 1)
- {
- // 等值
- if(!empty($params['type']))
- {
- $where[] = ['type', '=', $params['type']];
- }
- if(isset($params['status']) && $params['status'] > -1)
- {
- $where[] = ['status', '=', intval($params['status'])];
- }
- if(isset($params['gender']) && $params['gender'] > -1)
- {
- $where[] = ['gender', '=', intval($params['gender'])];
- }
- if(isset($params['sterilization']) && $params['sterilization'] > -1)
- {
- $where[] = ['sterilization', '=', intval($params['sterilization'])];
- }
-
- if(!empty($params['time_start']))
- {
- $where[] = ['add_time', '>', strtotime($params['time_start'])];
- }
- if(!empty($params['time_end']))
- {
- $where[] = ['add_time', '<', strtotime($params['time_end'])];
- }
- }
-
- return $where;
- }
-
- /**
- * 宠物总数
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-09-29
- * @desc description
- * @param [array] $where [条件]
- */
- public static function PetsTotal($where = [])
- {
- return (int) Db::name('PluginsPetscmsPets')->where($where)->count();
- }
-
- /**
- * 宠物保存
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2019-04-11
- * @desc description
- * @param [array] $params [输入参数]
- */
- public static function PetsSave($params = [])
- {
- // 请求参数
- $p = [
- [
- 'checked_type' => 'length',
- 'key_name' => 'title',
- 'checked_data' => '1,60',
- 'is_checked' => 1,
- 'error_msg' => '标题格式 1~60 个字符之间',
- ],
- [
- 'checked_type' => 'length',
- 'key_name' => 'name',
- 'checked_data' => '1,30',
- 'is_checked' => 1,
- 'error_msg' => '宠物名字格式 1~30 个字符之间',
- ],
- [
- 'checked_type' => 'empty',
- 'key_name' => 'birthday',
- 'is_checked' => 1,
- 'error_msg' => '请填写出生日期',
- ],
- [
- 'checked_type' => 'in',
- 'key_name' => 'type',
- 'checked_data' => array_column(self::$pets_attribute_type_list, 'value'),
- 'is_checked' => 2,
- 'error_msg' => '宠物类型有误',
- ],
- [
- 'checked_type' => 'length',
- 'key_name' => 'varieties',
- 'checked_data' => '30',
- 'is_checked' => 1,
- 'error_msg' => '品种格式最多 30 个字符',
- ],
- [
- 'checked_type' => 'in',
- 'key_name' => 'gender',
- 'checked_data' => array_column(self::$pets_attribute_gender_list, 'value'),
- 'is_checked' => 2,
- 'error_msg' => '宠物性别有误',
- ],
- [
- 'checked_type' => 'in',
- 'key_name' => 'sterilization',
- 'checked_data' => array_column(self::$pets_attribute_gender_list, 'value'),
- 'is_checked' => 2,
- 'error_msg' => '宠物是否绝育有误',
- ],
- [
- 'checked_type' => 'empty',
- 'key_name' => 'photo',
- 'is_checked' => 1,
- 'error_msg' => '请上传宠物相册',
- ],
- [
- 'checked_type' => 'length',
- 'key_name' => 'content',
- 'checked_data' => '105000',
- 'is_checked' => 1,
- 'error_msg' => '宠物简介内容最多 105000 个字符',
- ],
- [
- 'checked_type' => 'length',
- 'key_name' => 'person_name',
- 'checked_data' => '1,30',
- 'is_checked' => 1,
- 'error_msg' => '主人姓名格式 1~30 个字符之间',
- ],
- [
- 'checked_type' => 'length',
- 'key_name' => 'person_tel',
- 'checked_data' => '1,30',
- 'is_checked' => 1,
- 'error_msg' => '主人电话格式 1~30 个字符之间',
- ],
- [
- 'checked_type' => 'length',
- 'key_name' => 'person_weixin',
- 'checked_data' => '1,30',
- 'is_checked' => 1,
- 'error_msg' => '主人微信格式 1~30 个字符之间',
- ],
- [
- 'checked_type' => 'in',
- 'key_name' => 'status',
- 'checked_data' => array_column(self::$pets_attribute_status_list, 'value'),
- 'is_checked' => 2,
- 'error_msg' => '宠物状态有误',
- ],
- ];
- $ret = ParamsChecked($params, $p);
- if($ret !== true)
- {
- return DataReturn($ret, -1);
- }
-
- // 相册
- $photo = self::GetFormPetsPhotoParams($params);
- if($photo['code'] != 0)
- {
- return $photo;
- }
-
- // 编辑器内容
- $content = empty($params['content']) ? '' : ResourcesService::ContentStaticReplace(htmlspecialchars_decode($params['content']), 'add');
-
- // 宠物数据
- $data = [
- 'user_id' => isset($params['user_id']) ? intval($params['user_id']) : 0,
- 'title' => isset($params['title']) ? $params['title'] : '',
- 'name' => isset($params['name']) ? $params['name'] : '',
- 'birthday' => empty($params['birthday']) ? 0 : strtotime($params['birthday']),
- 'type' => isset($params['type']) ? $params['type'] : '',
- 'varieties' => isset($params['varieties']) ? $params['varieties'] : '',
- 'gender' => isset($params['gender']) ? $params['gender'] : -1,
- 'sterilization' => isset($params['sterilization']) ? $params['sterilization'] : -1,
- 'vaccine' => isset($params['vaccine']) ? $params['vaccine'] : -1,
- 'photo' => empty($photo['data']) ? '' : json_encode($photo['data']),
- 'content' => $content,
- 'person_name' => isset($params['person_name']) ? $params['person_name'] : '',
- 'person_tel' => isset($params['person_tel']) ? $params['person_tel'] : '',
- 'person_weixin' => isset($params['person_weixin']) ? $params['person_weixin'] : '',
-
- 'lose_time' => empty($params['lose_time']) ? 0 : strtotime($params['lose_time']),
- 'lose_reward_amount' => !empty($params['lose_reward_amount']) ? PriceNumberFormat($params['lose_reward_amount']) : 0.00,
- 'lose_features' => isset($params['lose_features']) ? $params['lose_features'] : '',
- 'lose_province' => isset($params['province']) ? intval($params['province']) : 0,
- 'lose_city' => isset($params['city']) ? intval($params['city']) : 0,
- 'lose_county' => isset($params['county']) ? intval($params['county']) : 0,
- 'lose_lng' => empty($params['lng']) ? 0.00 : floatval($params['lng']),
- 'lose_lat' => empty($params['lat']) ? 0.00 : floatval($params['lat']),
- 'lose_address' => isset($params['address']) ? $params['address'] : '',
- 'status' => isset($params['status']) ? intval($params['status']) : 0,
- ];
-
- // 绑定编号
- $edit_msg_title = '编辑';
- if(!empty($params['pest_no']))
- {
- $pets = Db::name('PluginsPetscmsPets')->where(['pest_no'=>$params['pest_no']])->field('id,pest_no,user_id')->find();
- if(empty($pets))
- {
- return DataReturn('宠物编号不存在['.$params['pest_no'].']', -10);
- }
-
- // 是否被其他用户绑定
- if(!empty($pets['user_id']))
- {
- return DataReturn('宠物编号已被绑定['.$params['pest_no'].']', -11);
- }
-
- // 使用编辑模式
- $params['id'] = $pets['id'];
- $edit_msg_title = '绑定';
- }
-
- // 添加/编辑
- if(empty($params['id']))
- {
- $data['pest_no'] = date('YmdHis').GetNumberCode(6);
- $data['add_time'] = time();
- $pets_id = Db::name('PluginsPetscmsPets')->insertGetId($data);
- if($pets_id > 0)
- {
- // 生成二维码
- self::PetsQrcodeCreate($pets_id);
-
- return DataReturn('添加成功', 0);
- }
- return DataReturn('添加失败', -100);
- } else {
- $data['upd_time'] = time();
- if(Db::name('PluginsPetscmsPets')->where(['id'=>intval($params['id'])])->update($data))
- {
- return DataReturn($edit_msg_title.'成功', 0);
- }
- return DataReturn($edit_msg_title.'失败', -100);
- }
- }
-
- /**
- * 宠物二维码生成
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2019-04-19
- * @desc description
- * @param [type] $pets_id [description]
- */
- private static function PetsQrcodeCreate($pets_id)
- {
- if(!empty($pets_id))
- {
- $base = PluginsService::PluginsData('petscms', ['logo']);
- $params = [
- 'path' => DS.'static'.DS.'upload'.DS.'images'.DS.'plugins_petscms'.DS.'qrcode'.DS.date('Y').DS.date('m').DS.date('d').DS,
- 'content' => PluginsHomeUrl('petscms', 'pets', 'detail', ['id'=>$pets_id]),
- 'logo' => empty($base['data']['logo']) ? '' : $base['data']['logo'],
- ];
- $ret = (new \base\Qrcode())->Create($params);
- if($ret['code'] == 0)
- {
- if(!Db::name('PluginsPetscmsPets')->where(['id'=>$pets_id])->update(['qrcode_images'=>$ret['data']['path'].$ret['data']['filename'], 'upd_time'=>time()]))
- {
- return DataReturn('二维码生成失败', -10);
- }
- }
- }
- return DataReturn('二维码生成成功', 0);
- }
-
- /**
- * 获取宠物相册
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-07-10
- * @desc description
- * @param [array] $params [输入参数]
- * @return [array] [一维数组但图片地址]
- */
- private static function GetFormPetsPhotoParams($params = [])
- {
- $result = [];
- if(!empty($params['photo']) && is_array($params['photo']))
- {
- foreach($params['photo'] as $v)
- {
- $result[] = ResourcesService::AttachmentPathHandle($v);
- }
- }
- return DataReturn('success', 0, $result);
- }
-
- /**
- * 丢失提供信息保存
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2019-04-11
- * @desc description
- * @param [array] $params [输入参数]
- */
- public static function HelpSave($params = [])
- {
- // 请求参数
- $p = [
- [
- 'checked_type' => 'empty',
- 'key_name' => 'pets_id',
- 'error_msg' => '宠物id有误',
- ],
- [
- 'checked_type' => 'length',
- 'key_name' => 'contacts_name',
- 'checked_data' => '1,30',
- 'error_msg' => '联系人姓名格式 1~30 个字符之间',
- ],
- [
- 'checked_type' => 'empty',
- 'key_name' => 'province',
- 'error_msg' => '请选择省份',
- ],
- [
- 'checked_type' => 'empty',
- 'key_name' => 'city',
- 'error_msg' => '请选择城市',
- ],
- [
- 'checked_type' => 'empty',
- 'key_name' => 'county',
- 'error_msg' => '请选择区/县',
- ],
- [
- 'checked_type' => 'length',
- 'key_name' => 'address',
- 'checked_data' => '1,80',
- 'error_msg' => '详细地址格式 1~80 个字符之间',
- ],
- ];
- $ret = ParamsChecked($params, $p);
- if($ret !== true)
- {
- return DataReturn($ret, -1);
- }
-
- // 电话微信只至少填写一个
- if(empty($params['contacts_tel']) && empty($params['contacts_weixin']))
- {
- return DataReturn('电话/微信只至少填写一个', -1);
- }
-
- // 宠物数据
- $data = [
- 'user_id' => isset($params['user_id']) ? intval($params['user_id']) : 0,
- 'pets_id' => intval($params['pets_id']),
- 'contacts_name' => $params['contacts_name'],
- 'contacts_tel' => isset($params['contacts_tel']) ? $params['contacts_tel'] : '',
- 'contacts_weixin' => isset($params['contacts_weixin']) ? $params['contacts_weixin'] : '',
- 'province' => intval($params['province']),
- 'city' => intval($params['city']),
- 'county' => intval($params['county']),
- 'address' => $params['address'],
- 'lng' => empty($params['lng']) ? 0.00 : floatval($params['lng']),
- 'lat' => empty($params['lat']) ? 0.00 : floatval($params['lat']),
- ];
-
- // 添加/编辑
- if(empty($params['id']))
- {
- $data['add_time'] = time();
- if(Db::name('PluginsPetscmsHelp')->insertGetId($data) > 0)
- {
- return DataReturn('提供成功', 0);
- }
- return DataReturn('提供失败', -100);
- } else {
- $data['upd_time'] = time();
- if(Db::name('PluginsPetscmsHelp')->where(['id'=>intval($params['id'])])->update($data))
- {
- return DataReturn('编辑成功', 0);
- }
- return DataReturn('编辑失败', -100);
- }
- }
-
- /**
- * 宠物帮助数据列表
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-09-29
- * @desc description
- * @param [array] $params [输入参数]
- */
- public static function HelpList($params = [])
- {
- $where = empty($params['where']) ? [] : $params['where'];
- $m = isset($params['m']) ? intval($params['m']) : 0;
- $n = isset($params['n']) ? intval($params['n']) : 10;
- $order_by = empty($params['order_by']) ? 'id desc' : $params['order_by'];
-
- // 获取数据列表
- $data = Db::name('PluginsPetscmsHelp')->where($where)->limit($m, $n)->order($order_by)->select();
- if(!empty($data))
- {
- foreach($data as &$v)
- {
- // 地址
- $v['province_name'] = RegionService::RegionName($v['province']);
- $v['city_name'] = RegionService::RegionName($v['city']);
- $v['county_name'] = RegionService::RegionName($v['county']);
-
- // 时间
- $v['add_time_time'] = date('Y-m-d H:i:s', $v['add_time']);
- $v['add_time_date'] = date('Y-m-d', $v['add_time']);
- $v['upd_time_time'] = empty($v['upd_time']) ? '' : date('Y-m-d H:i:s', $v['upd_time']);
- $v['upd_time_date'] = empty($v['upd_time']) ? '' : date('Y-m-d', $v['upd_time']);
- }
- }
- return DataReturn('处理成功', 0, $data);
- }
-
- /**
- * 宠物帮助数据总数
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-09-29
- * @desc description
- * @param [array] $where [条件]
- */
- public static function HelpTotal($where = [])
- {
- return (int) Db::name('PluginsPetscmsHelp')->where($where)->count();
- }
-
- /**
- * 宠物解绑
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-12-18
- * @desc description
- * @param [array] $params [输入参数]
- */
- public static function PetsUntying($params = [])
- {
- // 请求参数
- $p = [
- [
- 'checked_type' => 'empty',
- 'key_name' => 'id',
- 'error_msg' => '操作id有误',
- ],
- ];
- $ret = ParamsChecked($params, $p);
- if($ret !== true)
- {
- return DataReturn($ret, -1);
- }
-
- // 条件
- $where = ['id'=>intval($params['id'])];
- if(!empty($params['user_id']))
- {
- $where['user_id'] = intval($params['user_id']);
- }
-
- // 解绑操作
- if(Db::name('PluginsPetscmsPets')->where($where)->update(['user_id'=>0, 'upd_time'=>time()]))
- {
- return DataReturn('解绑成功');
- }
-
- return DataReturn('解绑失败或资源不存在', -100);
- }
-
- /**
- * 宠物删除
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-12-18
- * @desc description
- * @param [array] $params [输入参数]
- */
- public static function PetsDelete($params = [])
- {
- // 请求参数
- $p = [
- [
- 'checked_type' => 'empty',
- 'key_name' => 'id',
- 'error_msg' => '操作id有误',
- ],
- ];
- $ret = ParamsChecked($params, $p);
- if($ret !== true)
- {
- return DataReturn($ret, -1);
- }
-
- // 删除操作
- if(Db::name('PluginsPetscmsPets')->where(['id'=>intval($params['id'])])->delete())
- {
- return DataReturn('删除成功');
- }
-
- return DataReturn('删除失败或资源不存在', -100);
- }
-}
-?>
\ No newline at end of file
diff --git a/application/plugins/petscms/config.json b/application/plugins/petscms/config.json
deleted file mode 100755
index 4f4d08639..000000000
--- a/application/plugins/petscms/config.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "base":{
- "plugins":"petscms",
- "name":"宠物管理系统",
- "logo":"\/static\/upload\/images\/plugins_petscms\/2019\/04\/09\/1554814711403578.jpg",
- "author":"Devil",
- "author_url":"https:\/\/shopxo.net\/",
- "version":"1.0.0",
- "desc":"宠物管理系统",
- "apply_terminal":[
- "pc",
- "h5"
- ],
- "apply_version":[
- "1.5.0"
- ],
- "is_home":false
- },
- "hook":{
- "plugins_service_users_center_left_menu_handle":[
- "app\\plugins\\petscms\\Hook"
- ],
- "plugins_service_header_navigation_top_right_handle":[
- "app\\plugins\\petscms\\Hook"
- ]
- }
-}
\ No newline at end of file
diff --git a/application/plugins/petscms/install.sql b/application/plugins/petscms/install.sql
deleted file mode 100755
index f69e00393..000000000
--- a/application/plugins/petscms/install.sql
+++ /dev/null
@@ -1,59 +0,0 @@
-# 宠物管理系统宠物
-CREATE TABLE `s_plugins_petscms_pets` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
- `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
- `pest_no` char(60) NOT NULL DEFAULT '' COMMENT '宠物编号',
- `status` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '状态(0正常, 1丢失, 2去世, 3关闭)',
- `qrcode_images` char(255) NOT NULL DEFAULT '' COMMENT '宠物二维码',
- `title` char(60) NOT NULL DEFAULT '' COMMENT '标题',
- `name` char(30) NOT NULL DEFAULT '' COMMENT '名字',
- `birthday` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '出生日期',
- `type` char(60) NOT NULL DEFAULT '' COMMENT '类型',
- `varieties` char(60) NOT NULL DEFAULT '' COMMENT '品种',
- `gender` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '性别(0公, 1母)',
- `sterilization` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '是否绝育(0否, 1是)',
- `vaccine` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '是否疫苗(0否, 1是)',
- `photo` mediumtext NOT NULL COMMENT '相册(json数据)',
- `content` mediumtext NOT NULL COMMENT '宠物简介',
- `person_name` char(30) NOT NULL DEFAULT '' COMMENT '主人姓名',
- `person_tel` char(30) NOT NULL DEFAULT '' COMMENT '主人电话',
- `person_weixin` char(30) NOT NULL DEFAULT '' COMMENT '主人微信',
- `lose_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '丢失-丢失时间',
- `lose_reward_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '丢失-悬赏金额',
- `lose_features` char(255) NOT NULL DEFAULT '' COMMENT '丢失-宠物特征',
- `lose_province` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '丢失-所在省',
- `lose_city` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '丢失-所在市',
- `lose_county` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '丢失-所在县/区',
- `lose_address` char(80) NOT NULL DEFAULT '' COMMENT '丢失-详细地址',
- `lose_lng` decimal(13,10) unsigned NOT NULL DEFAULT '0.0000000000' COMMENT '丢失-经度',
- `lose_lat` decimal(13,10) unsigned NOT NULL DEFAULT '0.0000000000' COMMENT '丢失-纬度',
- `add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
- `upd_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `pest_no` (`pest_no`),
- KEY `type` (`type`),
- KEY `gender` (`gender`),
- KEY `user_id` (`user_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='宠物管理系统宠物 - 应用'
-
-
-# 宠物管理系统宠物丢失帮助数据
-CREATE TABLE `s_plugins_petscms_help` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
- `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
- `pets_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '宠物id',
- `contacts_name` char(30) NOT NULL DEFAULT '' COMMENT '联系人姓名',
- `contacts_tel` char(30) NOT NULL DEFAULT '' COMMENT '联系人电话',
- `contacts_weixin` char(30) NOT NULL DEFAULT '' COMMENT '联系人微信',
- `province` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在省',
- `city` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在市',
- `county` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在县/区',
- `address` char(80) NOT NULL DEFAULT '' COMMENT '详细地址',
- `lng` decimal(13,10) unsigned NOT NULL DEFAULT '0.0000000000' COMMENT '经度',
- `lat` decimal(13,10) unsigned NOT NULL DEFAULT '0.0000000000' COMMENT '纬度',
- `add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
- `upd_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
- PRIMARY KEY (`id`),
- KEY `user_id` (`user_id`),
- KEY `pets_id` (`pets_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='宠物管理系统宠物丢失帮助数据 - 应用'
\ No newline at end of file
diff --git a/application/plugins/petscms/uninstall.sql b/application/plugins/petscms/uninstall.sql
deleted file mode 100755
index e865a6d31..000000000
--- a/application/plugins/petscms/uninstall.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-# 宠物管理系统宠物 - 应用
-DROP TABLE `s_plugins_petscms_pets`;
-
-# 宠物管理系统宠物丢失帮助数据 - 应用
-DROP TABLE `s_plugins_petscms_help`;
\ No newline at end of file
diff --git a/application/plugins/view/petscms/admin/base.html b/application/plugins/view/petscms/admin/base.html
deleted file mode 100755
index bfc95f396..000000000
--- a/application/plugins/view/petscms/admin/base.html
+++ /dev/null
@@ -1,99 +0,0 @@
-{{include file="public/header" /}}
-
-
-
-
-
-
- {{$data.lose_features|raw}}
- {{/if}} -- {{if !empty($plugins_base_data['not_bind_desc'])}} -
| 联系人信息 | -省市区/县 | -详细地址 | - -操作 | -|
|---|---|---|---|---|
|
- 姓名:{{if empty($v['contacts_name'])}}未填写{{else /}}{{$v.contacts_name}}{{/if}} - - 电话:{{if empty($v['contacts_tel'])}}未填写{{else /}}{{$v.contacts_tel}}{{/if}} - - 微信:{{if empty($v['contacts_weixin'])}}未填写{{else /}}{{$v.contacts_weixin}}{{/if}} - |
-
- 所在省:{{if empty($v['province_name'])}}未填写{{else /}}{{$v.province_name}}{{/if}} - - 所在市:{{if empty($v['city_name'])}}未填写{{else /}}{{$v.city_name}}{{/if}} - - 所在区/县:{{if empty($v['county_name'])}}未填写{{else /}}{{$v.county_name}}{{/if}} - |
- {{$v.address}} | - -- {{if !empty($v['lng']) and !empty($v['lat']) and $v['lng'] gt 0 and $v['lat'] gt 0}} - - {{/if}} - | -|
|
- 没有相关数据
- |
- ||||
| 宠物信息 | - -二维码 | -状态 | - -操作 | -|||
|---|---|---|---|---|---|---|
|
- 编号:{{if empty($v['pest_no'])}}未填写{{else /}}{{$v.pest_no}}{{/if}} - - 名字:{{if empty($v['name'])}}未填写{{else /}}{{$v.name}}{{/if}} - - 类型:{{if empty($v['type_name'])}}未填写{{else /}}{{$v.type_name}}{{/if}} - - 性别:{{if empty($v['gender_name'])}}未设置{{else /}}{{$v.gender_name}}{{/if}} - - 生日:{{if empty($v['birthday_name'])}}未填写{{else /}}{{$v.birthday_name}}{{/if}} - - 年龄:{{if empty($v['age'])}}未填写{{else /}}{{$v.age}}{{/if}} - - 品种:{{if empty($v['varieties'])}}未填写{{else /}}{{$v.varieties}}{{/if}} - - 绝育:{{if empty($v['sterilization_name'])}}未设置{{else /}}{{$v.sterilization_name}}{{/if}} - - 疫苗:{{if empty($v['sterilization_name'])}}未设置{{else /}}{{$v.sterilization_name}}{{/if}} - |
-
-
- 下载二维码 - - |
- {{$v.status_name}} | - -- 编辑 - - {{if $v['status'] neq 3}} - 详情 - {{/if}} - 帮助 - | -|||
|
- 没有相关数据
- |
- ||||||
| 联系人信息 | -省市区/县 | -详细地址 | - -操作 | -|
|---|---|---|---|---|
|
- 姓名:{{if empty($v['contacts_name'])}}未填写{{else /}}{{$v.contacts_name}}{{/if}} - - 电话:{{if empty($v['contacts_tel'])}}未填写{{else /}}{{$v.contacts_tel}}{{/if}} - - 微信:{{if empty($v['contacts_weixin'])}}未填写{{else /}}{{$v.contacts_weixin}}{{/if}} - |
-
- 所在省:{{if empty($v['province_name'])}}未填写{{else /}}{{$v.province_name}}{{/if}} - - 所在市:{{if empty($v['city_name'])}}未填写{{else /}}{{$v.city_name}}{{/if}} - - 所在区/县:{{if empty($v['county_name'])}}未填写{{else /}}{{$v.county_name}}{{/if}} - |
- {{$v.address}} | - -- {{if !empty($v['lng']) and !empty($v['lat']) and $v['lng'] gt 0 and $v['lat'] gt 0}} - - {{/if}} - | -|
|
- 没有相关数据
- |
- ||||
| 宠物信息 | - -二维码 | -状态 | - -操作 | -|||
|---|---|---|---|---|---|---|
|
- 编号:{{if empty($v['pest_no'])}}未填写{{else /}}{{$v.pest_no}}{{/if}} - - 名字:{{if empty($v['name'])}}未填写{{else /}}{{$v.name}}{{/if}} - - 类型:{{if empty($v['type_name'])}}未填写{{else /}}{{$v.type_name}}{{/if}} - - 性别:{{if empty($v['gender_name'])}}未设置{{else /}}{{$v.gender_name}}{{/if}} - - 生日:{{if empty($v['birthday_name'])}}未填写{{else /}}{{$v.birthday_name}}{{/if}} - - 年龄:{{if empty($v['age'])}}未填写{{else /}}{{$v.age}}{{/if}} - - 品种:{{if empty($v['varieties'])}}未填写{{else /}}{{$v.varieties}}{{/if}} - - 绝育:{{if empty($v['sterilization_name'])}}未设置{{else /}}{{$v.sterilization_name}}{{/if}} - - 疫苗:{{if empty($v['sterilization_name'])}}未设置{{else /}}{{$v.sterilization_name}}{{/if}} - |
-
-
- 下载二维码 - - |
- {{$v.status_name}} | - -- 编辑 - {{if $v['status'] neq 3}} - 详情 - {{/if}} - 帮助 - {{if $v['user_id'] gt 0}} - - {{/if}} - - | -|||
|
- 没有相关数据
- |
- ||||||
ailtZ++VP*GWtrWm4_
zqFA8Vpm<*KnG#XSP{~_~sg$L(Rq3?SV`Z$ep0cMhLwUJ!jq(}gUKN6hk&3@cvdT)8
z-&L-t^s6eV+NwsW&R4BaJ+9iVhE+3E^H<}jtybHsc2n)kIIVH+<5=VJ#_bx{G4A7d
zjqz^dS>yA^?;d|+{Fe!o3EmUtPFOqP;Dr0?ICWF?F!glx&FW{=UuvjmOwwRz