diff --git a/app/admin/controller/Answer.php b/app/admin/controller/Answer.php
deleted file mode 100755
index 905927b54..000000000
--- a/app/admin/controller/Answer.php
+++ /dev/null
@@ -1,147 +0,0 @@
- MyConst('common_is_show_list'),
- 'common_is_text_list' => MyConst('common_is_text_list'),
- ];
- // 数据
- $data = $this->data_detail;
- if(!empty($data))
- {
- // 内容
- if(!empty($data['content']))
- {
- $data['content'] = str_replace('
', "\n", $data['content']);
- }
-
- // 回复内容
- if(!empty($data['reply']))
- {
- $data['reply'] = str_replace('
', "\n", $data['reply']);
- }
- }
- $assign['data'] = $data;
-
- // 参数
- $params = $this->data_request;
- unset($params['id']);
- $assign['params'] = $params;
-
- // 数据赋值
- MyViewAssign($assign);
- return MyView();
- }
-
- /**
- * 保存
- * @author Devil
- * @blog http://gong.gg/
- * @version 0.0.1
- * @datetime 2016-12-25T22:36:12+0800
- */
- public function Save()
- {
- $params = $this->data_request;
- return ApiService::ApiDataReturn(AnswerService::AnswerSave($params));
- }
-
- /**
- * 问答删除
- * @author Devil
- * @blog http://gong.gg/
- * @version 0.0.1
- * @datetime 2016-12-15T11:03:30+0800
- */
- public function Delete()
- {
- $params = $this->data_request;
- $params['user_type'] = 'admin';
- return ApiService::ApiDataReturn(AnswerService::AnswerDelete($params));
- }
-
- /**
- * 问答回复处理
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @datetime 2018-03-28T15:07:17+0800
- */
- public function Reply()
- {
- $params = $this->data_request;
- return ApiService::ApiDataReturn(AnswerService::AnswerReply($params));
- }
-
- /**
- * 状态更新
- * @author Devil
- * @blog http://gong.gg/
- * @version 0.0.1
- * @datetime 2017-01-12T22:23:06+0800
- */
- public function StatusUpdate()
- {
- $params = $this->data_request;
- return ApiService::ApiDataReturn(AnswerService::AnswerStatusUpdate($params));
- }
-}
-?>
\ No newline at end of file
diff --git a/app/admin/controller/Qrcode.php b/app/admin/controller/Qrcode.php
new file mode 100644
index 000000000..0f7cf569a
--- /dev/null
+++ b/app/admin/controller/Qrcode.php
@@ -0,0 +1,56 @@
+data_request['content']))
+ {
+ MyViewAssign('msg', MyLang('content_params_empty_tips'));
+ return MyView('public/tips_error');
+ }
+ (new \base\Qrcode())->View($this->data_request);
+ }
+
+ /**
+ * 二维码下载
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @datetime 2019-04-16T21:52:18+0800
+ */
+ public function Download()
+ {
+ $ret = (new \base\Qrcode())->Download($this->data_request);
+ if(!empty($ret) && isset($ret['code']) && $ret['code'] != 0)
+ {
+ MyViewAssign('msg', $ret['msg']);
+ return MyView('public/tips_error');
+ }
+ }
+}
+?>
\ No newline at end of file
diff --git a/app/admin/controller/Site.php b/app/admin/controller/Site.php
index 17a3eaea5..2c53d24f0 100755
--- a/app/admin/controller/Site.php
+++ b/app/admin/controller/Site.php
@@ -216,6 +216,14 @@ class Site extends Base
// 导航类型
switch($this->nav_type)
{
+ // 基础
+ case 'base' :
+ $field_list[] = 'home_site_logo';
+ $field_list[] = 'home_site_logo_wap';
+ $field_list[] = 'home_site_logo_app';
+ $field_list[] = 'home_site_logo_square';
+ break;
+
// 用户注册
case 'register' :
$field_list[] = 'home_user_reg_type';
@@ -244,6 +252,9 @@ class Site extends Base
// 站点类型
case 'sitetype' :
+ // 站点类型
+ $params['common_site_type'] = empty($params['common_site_type']) ? '' : (is_array($params['common_site_type']) ? json_encode($params['common_site_type'], JSON_UNESCAPED_UNICODE) : $params['common_site_type']);
+
// 自提地址处理
if(!empty($params['common_self_extraction_address']))
{
@@ -312,7 +323,7 @@ class Site extends Base
case 'cache' :
// session是否使用缓存
// 数据是否使用缓存
- if((isset($params['common_session_is_use_cache']) && $params['common_session_is_use_cache'] == 1) || (isset($params['common_data_is_use_cache']) && $params['common_data_is_use_cache'] == 1))
+ if((isset($params['common_session_is_use_cache']) && $params['common_session_is_use_cache'] == 1) || (isset($params['common_data_is_use_redis_cache']) && $params['common_data_is_use_redis_cache'] == 1))
{
// 连接测试
$ret = SiteService::RedisCheckConnectPing($params['common_cache_data_redis_host'], $params['common_cache_data_redis_port'], $params['common_cache_data_redis_password']);
diff --git a/app/admin/form/Goods.php b/app/admin/form/Goods.php
index e65af6f0f..5f11fb00d 100644
--- a/app/admin/form/Goods.php
+++ b/app/admin/form/Goods.php
@@ -81,10 +81,11 @@ class Goods
'is_sort' => 1,
'sort_field' => 'title',
'search_config' => [
- 'form_type' => 'input',
- 'form_name' => 'title|simple_desc|seo_title|seo_keywords|seo_keywords',
- 'where_type' => 'like',
- 'placeholder' => '请输入商品名称/简述/SEO信息'
+ 'form_type' => 'input',
+ 'form_name' => 'id',
+ 'where_type_custom' => 'in',
+ 'where_value_custom' => 'WhereValueGoodsInfo',
+ 'placeholder' => $lang['info_placeholder'],
],
],
[
@@ -311,6 +312,29 @@ class Goods
];
}
+ /**
+ * 商品信息条件处理
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2020-06-30
+ * @desc description
+ * @param [string] $value [条件值]
+ * @param [array] $params [输入参数]
+ */
+ public function WhereValueGoodsInfo($value, $params = [])
+ {
+ if(!empty($value))
+ {
+ // 获取商品 id
+ $ids = Db::name('Goods')->alias('g')->join('goods_spec_base gb', 'g.id=gb.goods_id')->where('g.title|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords|gb.coding|gb.barcode', 'like', '%'.$value.'%')->column('g.id');
+
+ // 避免空条件造成无效的错觉
+ return empty($ids) ? [0] : $ids;
+ }
+ return $value;
+ }
+
/**
* 商品分类条件处理
* @author Devil
diff --git a/app/admin/form/Goodsspectemplate.php b/app/admin/form/Goodsspectemplate.php
index c91a631fa..a7b205889 100644
--- a/app/admin/form/Goodsspectemplate.php
+++ b/app/admin/form/Goodsspectemplate.php
@@ -87,7 +87,7 @@ class GoodsSpecTemplate
],
],
[
- 'label' => $lang['category_id'],
+ 'label' => $lang['name'],
'view_type' => 'field',
'view_key' => 'name',
'is_sort' => 1,
diff --git a/app/admin/lang/cht.php b/app/admin/lang/cht.php
index e2ead7b04..342e25aca 100644
--- a/app/admin/lang/cht.php
+++ b/app/admin/lang/cht.php
@@ -364,28 +364,6 @@ return [
],
],
- // 问答
- 'answer' => [
- 'base_nav_title' => '問答',
- 'user_info_title' => '用戶資訊',
- // 动态表格
- 'form_table' => [
- 'user' => '用戶資訊',
- 'user_placeholder' => '請輸入用戶名/昵稱/手機/郵箱',
- 'name' => '連絡人',
- 'tel' => '聯繫電話',
- 'title' => '標題',
- 'content' => '內容',
- 'reply' => '回復內容',
- 'is_show' => '是否顯示',
- 'is_reply' => '是否回復',
- 'reply_time_time' => '回復時間',
- 'access_count' => '訪問次數',
- 'add_time_time' => '創建時間',
- 'upd_time_time' => '更新時間',
- ],
- ],
-
// 仓库管理
'warehouse' => [
'base_nav_title' => '倉庫',
@@ -587,6 +565,7 @@ return [
'form_table' => [
'id' => '商品ID',
'info' => '商品資訊',
+ 'info_placeholder' => '請輸入商品名稱/簡述/編碼/條碼/SEO資訊',
'category_text' => '商品分類',
'brand_name' => '品牌',
'price' => '銷售價格(元)',
@@ -1505,13 +1484,6 @@ return [
'data_index' => [
'name' => '資料管理',
'item' => [
- 'answer_index' => '問答留言',
- 'answer_reply' => '問答留言回復',
- 'answer_delete' => '問答留言删除',
- 'answer_statusupdate' => '問答留言狀態更新',
- 'answer_saveinfo' => '問答添加/編輯頁面',
- 'answer_save' => '問答添加/編輯',
- 'answer_detail' => '問答留言詳情',
'message_index' => '消息管理',
'message_delete' => '消息删除',
'message_detail' => '消息詳情',
diff --git a/app/admin/lang/en.php b/app/admin/lang/en.php
index d7c873678..36db9ed29 100644
--- a/app/admin/lang/en.php
+++ b/app/admin/lang/en.php
@@ -365,28 +365,6 @@ return [
],
],
- // 问答
- 'answer' => [
- 'base_nav_title' => 'Q&A',
- 'user_info_title' => 'User Info',
- // 动态表格
- 'form_table' => [
- 'user' => 'User Info',
- 'user_placeholder' => 'Please enter user name/nickname/mobile phone/email',
- 'name' => 'Contacts',
- 'tel' => 'Contact Number',
- 'title' => 'Title',
- 'content' => 'Content',
- 'reply' => 'Reply Content',
- 'is_show' => 'Show or not',
- 'is_reply' => 'Reply or not',
- 'reply_time_time' => 'Reply Time',
- 'access_count' => 'Access Count',
- 'add_time_time' => 'Creation Time',
- 'upd_time_time' => 'Update Time',
- ],
- ],
-
// 仓库管理
'warehouse' => [
'base_nav_title' => 'Warehouse',
@@ -588,6 +566,7 @@ return [
'form_table' => [
'id' => 'Goods ID',
'info' => 'Goods Info',
+ 'info_placeholder' => 'Please enter product name/brief description/code/barcode/SEO information',
'category_text' => 'Category',
'brand_name' => 'Brand',
'price' => 'Sales Price(yuan)',
@@ -1520,13 +1499,6 @@ return [
'data_index' => [
'name' => 'Data Admin',
'item' => [
- 'answer_index' => 'Q&A message',
- 'answer_reply' => 'Q&A message reply',
- 'answer_delete' => 'Q&A message delete',
- 'answer_statusupdate' => 'Update message status',
- 'answer_saveinfo' => 'Q&A add/edit page',
- 'answer_save' => 'Q&A add/edit',
- 'answer_detail' => 'Q&A message details',
'message_index' => 'Message log',
'message_delete' => 'Message delete',
'message_detail' => 'Message details',
diff --git a/app/admin/lang/spa.php b/app/admin/lang/spa.php
index d262f4c3a..1e7644fc3 100644
--- a/app/admin/lang/spa.php
+++ b/app/admin/lang/spa.php
@@ -364,28 +364,6 @@ return [
],
],
- // 问答
- 'answer' => [
- 'base_nav_title' => 'Preguntas y respuestas',
- 'user_info_title' => 'Información del usuario',
- // 动态表格
- 'form_table' => [
- 'user' => 'Información del usuario',
- 'user_placeholder' => 'Introduzca su nombre de usuario / apodo / teléfono móvil / buzón',
- 'name' => 'Contactos',
- 'tel' => 'Número de teléfono de contacto',
- 'title' => 'Título',
- 'content' => 'Contenido',
- 'reply' => 'Contenido de la respuesta',
- 'is_show' => 'Si se muestra',
- 'is_reply' => 'Si responder',
- 'reply_time_time' => 'Tiempo de respuesta',
- 'access_count' => 'Número de visitas',
- 'add_time_time' => 'Tiempo de creación',
- 'upd_time_time' => 'Tiempo de actualización',
- ],
- ],
-
// 仓库管理
'warehouse' => [
'base_nav_title' => 'Almacén',
@@ -587,6 +565,7 @@ return [
'form_table' => [
'id' => 'Identificación de la mercancía',
'info' => 'Información sobre productos básicos',
+ 'info_placeholder' => 'Introduzca el nombre del producto / descripción / código / código de barras / información seo',
'category_text' => 'Clasificación de mercancías',
'brand_name' => 'Marca',
'price' => 'Precio de venta (yuan)',
@@ -1505,13 +1484,6 @@ return [
'data_index' => [
'name' => 'Gestión de datos',
'item' => [
- 'answer_index' => 'Preguntas y respuestas mensajes',
- 'answer_reply' => 'Preguntas y respuestas respuesta al mensaje',
- 'answer_delete' => 'Eliminar mensajes de preguntas y respuestas',
- 'answer_statusupdate' => 'Actualización del Estado de los mensajes de preguntas y respuestas',
- 'answer_saveinfo' => 'Preguntas y respuestas añadir / editar Página',
- 'answer_save' => 'Preguntas y respuestas añadir / editar',
- 'answer_detail' => 'Detalles del mensaje de preguntas y respuestas',
'message_index' => 'Gestión de mensajes',
'message_delete' => 'Eliminación de mensajes',
'message_detail' => 'Detalles del mensaje',
diff --git a/app/admin/lang/zh.php b/app/admin/lang/zh.php
index 2848a74a1..ac002d9b9 100755
--- a/app/admin/lang/zh.php
+++ b/app/admin/lang/zh.php
@@ -364,28 +364,6 @@ return [
],
],
- // 问答
- 'answer' => [
- 'base_nav_title' => '问答',
- 'user_info_title' => '用户信息',
- // 动态表格
- 'form_table' => [
- 'user' => '用户信息',
- 'user_placeholder' => '请输入用户名/昵称/手机/邮箱',
- 'name' => '联系人',
- 'tel' => '联系电话',
- 'title' => '标题',
- 'content' => '内容',
- 'reply' => '回复内容',
- 'is_show' => '是否显示',
- 'is_reply' => '是否回复',
- 'reply_time_time' => '回复时间',
- 'access_count' => '访问次数',
- 'add_time_time' => '创建时间',
- 'upd_time_time' => '更新时间',
- ],
- ],
-
// 仓库管理
'warehouse' => [
'base_nav_title' => '仓库',
@@ -587,6 +565,7 @@ return [
'form_table' => [
'id' => '商品ID',
'info' => '商品信息',
+ 'info_placeholder' => '请输入商品名称/简述/编码/条码/SEO信息',
'category_text' => '商品分类',
'brand_name' => '品牌',
'price' => '销售价格(元)',
@@ -1505,13 +1484,6 @@ return [
'data_index' => [
'name' => '数据管理',
'item' => [
- 'answer_index' => '问答留言',
- 'answer_reply' => '问答留言回复',
- 'answer_delete' => '问答留言删除',
- 'answer_statusupdate' => '问答留言状态更新',
- 'answer_saveinfo' => '问答添加/编辑页面',
- 'answer_save' => '问答添加/编辑',
- 'answer_detail' => '问答留言详情',
'message_index' => '消息管理',
'message_delete' => '消息删除',
'message_detail' => '消息详情',
diff --git a/app/admin/view/default/answer/detail.html b/app/admin/view/default/answer/detail.html
deleted file mode 100644
index 06eeee457..000000000
--- a/app/admin/view/default/answer/detail.html
+++ /dev/null
@@ -1,2 +0,0 @@
-
-{{extend name="public/module/detail" /}}
\ No newline at end of file
diff --git a/app/admin/view/default/answer/index.html b/app/admin/view/default/answer/index.html
deleted file mode 100755
index 459ea5197..000000000
--- a/app/admin/view/default/answer/index.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-{{extend name="public/module/form" /}}
-
-
-{{block name="form_operate_top"}}
- {{:MyLang('add_title')}}
-
- {__block__}
-{{/block}}
-
-
-{{block name="form_extend"}}
-
-