Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
b638b3f6
Commit
b638b3f6
authored
Sep 10, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
goods
parent
64a20008
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
EvaluationService.php
application/models/Business/Goods/EvaluationService.php
+1
-3
GoodsCommon.php
application/models/DAO/GoodsCommon.php
+2
-2
index.php
public/index.php
+1
-1
No files found.
application/models/Business/Goods/EvaluationService.php
View file @
b638b3f6
...
...
@@ -74,9 +74,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
//$images = $this->_upload($v['images']);
$images
=
$v
[
'images'
];
if
(
!
is_array
(
$images
))
$images
=
json_decode
(
$images
,
true
);
if
(
is_array
(
$images
)
&&
empty
(
$images
))
{
$images
=
null
;
}
if
(
empty
(
$images
))
$images
=
null
;
$images
?
$data
[
'goods'
][
$k
][
'haveImg'
]
=
1
:
$data
[
'goods'
][
$k
][
'haveImg'
]
=
0
;
if
(
$data
[
'goods'
][
$k
][
'haveImg'
]
==
1
)
{
foreach
(
$images
as
&
$image
)
{
...
...
application/models/DAO/GoodsCommon.php
View file @
b638b3f6
...
...
@@ -183,9 +183,9 @@ class GoodsCommonModel extends \DAO\AbstractModel {
public
function
getCount
(
$where
,
$attrStr
=
''
){
$this
->
setDb
(
$this
->
dbName
);
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
();
}
/**
* 获取分享信息
...
...
public/index.php
100755 → 100644
View file @
b638b3f6
...
...
@@ -5,7 +5,7 @@ define("TIMESTAMP",time());
define
(
"APPLICATION_PATH"
,
realpath
(
dirname
(
__FILE__
)
.
'/../'
));
define
(
"APP_ENV"
,
ini_get
(
'yaf.environ'
));
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
(
isset
(
$_POST
[
'data'
][
'debug'
])
&&!
empty
(
$_POST
[
'data'
][
'debug'
])){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment