Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
yii2_fecshop
提交
bb8f4992
Y
yii2_fecshop
项目概览
OpenDocCN
/
yii2_fecshop
通知
18
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yii2_fecshop
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bb8f4992
编写于
9月 08, 2016
作者:
R
root
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
catalog product search
上级
c5598ddb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
155 addition
and
5 deletion
+155
-5
app/appfront/config/modules/Catalogsearch.php
app/appfront/config/modules/Catalogsearch.php
+20
-0
app/appfront/modules/Catalogsearch/Module.php
app/appfront/modules/Catalogsearch/Module.php
+41
-0
app/appfront/modules/Catalogsearch/block/index/Index.php
app/appfront/modules/Catalogsearch/block/index/Index.php
+22
-0
app/appfront/modules/Catalogsearch/controllers/IndexController.php
...ont/modules/Catalogsearch/controllers/IndexController.php
+48
-0
app/appfront/theme/base/front/catalogsearch/index/index.php
app/appfront/theme/base/front/catalogsearch/index/index.php
+19
-0
app/appfront/theme/base/front/widgets/header.php
app/appfront/theme/base/front/widgets/header.php
+5
-5
未找到文件。
app/appfront/config/modules/Catalogsearch.php
0 → 100644
浏览文件 @
bb8f4992
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
return
[
'catalogsearch'
=>
[
'class'
=>
'\fecshop\app\appfront\modules\Catalogsearch\Module'
,
'params'
=>
[
],
],
];
app/appfront/modules/Catalogsearch/Module.php
0 → 100644
浏览文件 @
bb8f4992
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
namespace
fecshop\app\appfront\modules\Catalogsearch
;
use
Yii
;
use
fecshop\app\appfront\modules\AppfrontModule
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
class
Module
extends
AppfrontModule
{
public
$blockNamespace
;
public
function
init
()
{
# 以下代码必须指定
$nameSpace
=
__NAMESPACE__
;
# web controller
if
(
Yii
::
$app
instanceof
\
yii\web\Application
)
{
$this
->
controllerNamespace
=
$nameSpace
.
'\\controllers'
;
$this
->
blockNamespace
=
$nameSpace
.
'\\block'
;
# console controller
//} elseif (Yii::$app instanceof \yii\console\Application) {
// $this->controllerNamespace = $nameSpace . '\\console\\controllers';
// $this->blockNamespace = $nameSpace . '\\console\\block';
}
//$this->_currentDir = __DIR__ ;
//$this->_currentNameSpace = __NAMESPACE__;
# 指定默认的man文件
//$this->layout = "home.php";
Yii
::
$service
->
page
->
theme
->
layoutFile
=
'main.php'
;
parent
::
init
();
}
}
app/appfront/modules/Catalogsearch/block/index/Index.php
0 → 100644
浏览文件 @
bb8f4992
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
namespace
fecshop\app\appfront\modules\Catalogsearch\block\index
;
use
Yii
;
use
fec\helpers\CModule
;
use
fec\helpers\CRequest
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
class
Index
{
public
function
getLastData
(){
return
[];
}
}
\ No newline at end of file
app/appfront/modules/Catalogsearch/controllers/IndexController.php
0 → 100644
浏览文件 @
bb8f4992
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
namespace
fecshop\app\appfront\modules\Catalogsearch\controllers
;
use
Yii
;
use
fec\helpers\CModule
;
use
fec\helpers\CRequest
;
use
fecshop\app\appfront\modules\AppfrontController
;
/**
* @author Terry Zhao <2358269014@qq.com>
* @since 1.0
*/
class
IndexController
extends
AppfrontController
{
public
function
init
(){
parent
::
init
();
}
# վϢ
public
function
actionIndex
()
{
//echo 1;exit;
$data
=
$this
->
getBlock
()
->
getLastData
();
return
$this
->
render
(
$this
->
action
->
id
,
$data
);
}
}
app/appfront/theme/base/front/catalogsearch/index/index.php
0 → 100644
浏览文件 @
bb8f4992
<?php
/**
* FecShop file.
*
* @link http://www.fecshop.com/
* @copyright Copyright (c) 2016 FecShop Software LLC
* @license http://www.fecshop.com/license/
*/
?>
<div
class=
"main container two-columns-left"
>
<div
class=
"col-main"
>
</div>
<div
class=
"col-left "
>
</div>
<div
class=
"clear"
></div>
</div>
\ No newline at end of file
app/appfront/theme/base/front/widgets/header.php
浏览文件 @
bb8f4992
...
...
@@ -87,17 +87,17 @@
<div
class=
"top_main_inner pr"
>
<div
class=
"top_header clearfix"
>
<div
class=
"topSeachForm"
>
<form
method=
"
post"
name=
"searchFrom"
class=
"js_topSeachForm
"
>
<form
method=
"
get"
name=
"searchFrom"
class=
"js_topSeachForm"
action=
"
<?=
Yii
::
$service
->
url
->
getUrl
(
'catalogsearch/index'
);
?>
"
>
<div
class=
"top_seachBox"
>
<div
class=
"searchInput fl"
>
<input
type=
"text"
autocomplete=
"off"
value=
""
maxlength=
"150"
placeholder=
"Products keyword"
class=
"searchArea js_k2 ac_input"
name=
"k1
"
>
<input
type=
"text"
value=
"
<?=
Yii
::
$app
->
request
->
get
(
'q'
);
?>
"
maxlength=
"150"
placeholder=
"Products keyword"
class=
"searchArea js_k2 ac_input"
name=
"q
"
>
</div>
<button
class=
"fl js_topSearch seachBtn"
type=
"submit"
><span
class=
"t_hidden"
>
search
</span></button>
<
input
type=
"hidden"
class=
"category"
value=
"0"
name=
"category"
>
</div>
<!--end .top_seachBox-->
<
!-- <input type="hidden" class="category" value="0" name="category"> --
>
</div>
<!--end .top_seachBox-->
</form>
</div>
<div
class=
"logo"
><a
titel=
"fecshop logo"
href=
"
<?=
$homeUrl
?>
"
style=
""
>
<img
src=
"
<?=
Yii
::
$service
->
image
->
getImgUrl
(
'custom/logo.png'
,
'appfront'
);
?>
"
/>
</a></div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录