Commit abb452f9 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsales

parents 1a6a63f1 ee390f72
...@@ -69,7 +69,7 @@ return array( ...@@ -69,7 +69,7 @@ return array(
'uploadresult' => 'Home/Index/uploadresult', 'uploadresult' => 'Home/Index/uploadresult',
'integral' => 'Home/Index/integral', 'integral' => 'Home/Index/integral',
'notice' => 'Home/Index/notice', 'notice' => 'Home/Index/notice',
'chat' => 'Home/Index/chat' 'chat' => 'Home/Index/chat',
'hotgoods' => 'Home/Cms/getHotGoods',
), ),
); );
\ No newline at end of file
...@@ -32,7 +32,7 @@ class BaseController extends Controller ...@@ -32,7 +32,7 @@ class BaseController extends Controller
} else { } else {
return $this->apiReturn(7004, '未找到数据'); return $this->apiReturn(7004, '未找到数据');
} }
} }
/** /**
* 统一格式返回 * 统一格式返回
......
<?php
namespace Home\Controller;
use Home\Controller\BaseController;
class CmsController extends BaseController
{
// 获取热门商品
public function getHotGoods()
{
$datas = $this->apiBaseCache('pc_hot_goods', '', 5); // 热门商品
return $this->jsonReturn(0, '', $datas['data']);
}
/**
* 统一格式返回
* @param integer $code [description]
* @param string $msg [description]
* @param array $extend [description]
* @return [type] [description]
*/
protected function jsonReturn($code = 0, $msg = '', $extend = array())
{
$data = array(
'err_code' => $code,
'err_msg' => $msg,
'data' => $extend,
);
if(isset($_GET['callback']) && !empty($_GET['callback'])){
echo $_GET['callback'].'('.json_encode($data).')';exit;
}else{
echo json_encode($data);exit;
}
}
}
\ No newline at end of file
...@@ -11,7 +11,7 @@ class IndexController extends BaseController ...@@ -11,7 +11,7 @@ class IndexController extends BaseController
public function _initialize() public function _initialize()
{ {
parent::_initialize(); parent::_initialize();
if (!cookie('token') && ACTION_NAME != 'login' && ACTION_NAME != 'register' && ACTION_NAME != 'index' && ACTION_NAME != 'indexsearch') { if (!cookie('token') && ACTION_NAME != 'login' && ACTION_NAME != 'register' && ACTION_NAME != 'index' && ACTION_NAME != 'indexsearch' && ACTION_NAME != 'forget') {
$this->redirect('/login'); $this->redirect('/login');
} }
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<span class="li_right icon iconfont"> <span class="li_right icon iconfont">
</a> </a>
<dl <if condition="(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail') || (ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')">style="display:block"</if>> <dl <if condition="(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail') || (ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')">style="display:block"</if>>
<dd <if condition="(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail')">class="active"</if>><a href="homeicsales/inquiry">我的询价</a></dd> <dd <if condition="(ACTION_NAME eq 'inquiry') || (ACTION_NAME eq 'releaseinquiry') || (ACTION_NAME eq 'inquirydetail')">class="active"</if>><a href="/inquiry">我的询价</a></dd>
<dd <if condition="(ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')">class="active"</if>><a href="homeicsales/quote">我的报价</a></dd> <dd <if condition="(ACTION_NAME eq 'quote') || (ACTION_NAME eq 'quotedetail')">class="active"</if>><a href="homeicsales/quote">我的报价</a></dd>
</dl> </dl>
</li> </li>
......
...@@ -107,6 +107,8 @@ ...@@ -107,6 +107,8 @@
if (!$mobile.val()) { if (!$mobile.val()) {
$mobile.parent('.input-wrap').addClass('error'); $mobile.parent('.input-wrap').addClass('error');
$(".error-text").show().find("span").text('请填写手机号');
return false; return false;
...@@ -115,6 +117,8 @@ ...@@ -115,6 +117,8 @@
if (!$password.val() && type === 1) { if (!$password.val() && type === 1) {
$password.parent().parent('.input-wrap').addClass('error'); $password.parent().parent('.input-wrap').addClass('error');
$(".error-text").show().find("span").text('请填写密码');
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment