Commit b638b3f6 authored by zhz's avatar zhz

goods

parent 64a20008
...@@ -74,9 +74,7 @@ class EvaluationServiceModel extends \Business\AbstractModel { ...@@ -74,9 +74,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
//$images = $this->_upload($v['images']); //$images = $this->_upload($v['images']);
$images = $v['images']; $images = $v['images'];
if(!is_array($images)) $images = json_decode($images, true); if(!is_array($images)) $images = json_decode($images, true);
if(is_array($images) && empty($images)) { if(empty($images)) $images = null;
$images = null;
}
$images ? $data['goods'][$k]['haveImg'] = 1 : $data['goods'][$k]['haveImg'] = 0; $images ? $data['goods'][$k]['haveImg'] = 1 : $data['goods'][$k]['haveImg'] = 0;
if($data['goods'][$k]['haveImg'] == 1) { if($data['goods'][$k]['haveImg'] == 1) {
foreach ($images as &$image) { foreach ($images as &$image) {
......
...@@ -183,9 +183,9 @@ class GoodsCommonModel extends \DAO\AbstractModel { ...@@ -183,9 +183,9 @@ class GoodsCommonModel extends \DAO\AbstractModel {
public function getCount($where,$attrStr=''){ public function getCount($where,$attrStr=''){
$this->setDb($this->dbName); $this->setDb($this->dbName);
if($attrStr){ if($attrStr){
return $this->db->from($this->_tableName)->join('han_goods_attribute_value','han_goods_attribute_value.goods_commonid = han_goods_common.goods_commonid')->where($where)->where($attrStr)->fetchNum(); return $this->db->from($this->_tableName)->join('han_goods_attribute_value','han_goods_attribute_value.goods_commonid = han_goods_common.goods_commonid')->where($where)->where($attrStr)->where(array('goods_state'=>1,'goods_verify'=>1))->fetchNum();
} }
return $this->db->from($this->_tableName)->where($where)->fetchNum(); return $this->db->from($this->_tableName)->where(array('goods_state'=>1,'goods_verify'=>1))->where($where)->fetchNum();
} }
/** /**
* 获取分享信息 * 获取分享信息
......
...@@ -5,7 +5,7 @@ define("TIMESTAMP",time()); ...@@ -5,7 +5,7 @@ define("TIMESTAMP",time());
define("APPLICATION_PATH", realpath(dirname(__FILE__) . '/../')); define("APPLICATION_PATH", realpath(dirname(__FILE__) . '/../'));
define("APP_ENV",ini_get('yaf.environ')); define("APP_ENV",ini_get('yaf.environ'));
if(APP_ENV=='develop'){ if(APP_ENV=='develop'){
error_reporting(E_ALL); error_reporting(E_ALL ^ E_NOTICE);
} }
if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop'){ if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop'){
if(isset($_POST['data']['debug'])&&!empty($_POST['data']['debug'])){ if(isset($_POST['data']['debug'])&&!empty($_POST['data']['debug'])){
......
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 to comment