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
a81f35d6
Commit
a81f35d6
authored
Aug 28, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
host
parent
14ba2125
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
Common.php
application/library/Our/Common.php
+11
-1
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+1
-1
No files found.
application/library/Our/Common.php
View file @
a81f35d6
...
...
@@ -94,13 +94,23 @@ class Common
public
static
function
getBaseUrl
(){
$prefix
=
'http'
;
if
(
isset
(
$_SERVER
[
'HTTPS'
])
&&
$_SERVER
[
'HTTPS'
]
==
'on'
){
if
(
self
::
is_https
()
){
$prefix
=
'https'
;
}
$url
=
$prefix
.
'://'
.
$_SERVER
[
'SERVER_NAME'
];
return
$url
;
}
function
is_https
()
{
if
(
!
empty
(
$_SERVER
[
'HTTPS'
])
&&
strtolower
(
$_SERVER
[
'HTTPS'
])
!==
'off'
)
{
return
true
;
}
elseif
(
isset
(
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
])
&&
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
]
===
'https'
)
{
return
true
;
}
elseif
(
!
empty
(
$_SERVER
[
'HTTP_FRONT_END_HTTPS'
])
&&
strtolower
(
$_SERVER
[
'HTTP_FRONT_END_HTTPS'
])
!==
'off'
)
{
return
true
;
}
return
false
;
}
/**
* 获取静态资源文件
...
...
application/models/Business/Goods/GoodsCommonService.php
View file @
a81f35d6
...
...
@@ -326,7 +326,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$attrbuteDAO
=
\DAO\GoodsAttributeModel
::
getInstance
();
$productData
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsAttributeRedisModel
::
getInstance
(),
array
(
&
$attrbuteDAO
,
'option'
),
array
(
'attribute,attribute_value'
,
array
(
'goods_commonid'
=>
$goodsCommonId
)),
\Our\ApiConst
::
oneDaySecond
,
array
(
$goodsCommonId
));
$html
=
array
(
'width'
=>
750
,
'height'
=>
$commonInfo
[
'goods_height'
],
'url'
=>
$_SERVER
[
'REQUEST_SCHEME'
]
.
'://'
.
$_SERVER
[
'HTTP_HOST'
]
.
'/index/goodsDetail?goodsCommonId='
.
$goodsCommonId
);
$html
=
array
(
'width'
=>
750
,
'height'
=>
$commonInfo
[
'goods_height'
],
'url'
=>
\Our\Common
::
getBaseUrl
()
.
'/index/goodsDetail?goodsCommonId='
.
$goodsCommonId
);
unset
(
$attrs
[
'commonInfo'
]);
return
array_merge
(
array
(
'storeId'
=>
$commonInfo
[
'store_id'
],
'goodsId'
=>
$commonInfo
[
'goodsId'
],
'goodsName'
=>
$commonInfo
[
'goods_name'
],
'goodsVerify'
=>
$commonInfo
[
'goods_verify'
],
'goodsState'
=>
$commonInfo
[
'goods_state'
],
'saleCount'
=>
$commonInfo
[
'sale_num'
],
'collectionState'
=>
$collectionState
,
'isOwn'
=>
$isOwn
,
'isHot'
=>
$commonInfo
[
'goods_hot'
],
'isRecoment'
=>
$commonInfo
[
'goods_commend'
],
'isFree'
=>
$commonInfo
[
'goods_free'
],
'isVirtual'
=>
$commonInfo
[
'is_virtual'
],
'goodsMostLimit'
=>
$commonInfo
[
'goods_most_limit'
],
'goodsLeastLimit'
=>
$commonInfo
[
'goods_least_limit'
],
'goodsTotalLimit'
=>
$commonInfo
[
'goods_total_limit'
],
'address'
=>
$area
,
'range'
=>
$rangePrice
,
'productData'
=>
$productData
,
'htmlContent'
=>
$html
,
'videoUrl'
=>
$commonInfo
[
'goods_youku_url'
]),
$attrs
);
}
...
...
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