Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
d47fe68859d39d0bb85bbd6cb22b84b4a00b1267
2 parents
39da32b4
68e2e4b0
Merge branch 'hotfix/searchShop'
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
21 deletions
library/LibModels/Web/Product/PayData.php
yohobuy/www.yohobuy.com/application/models/Product/Item.php
yohobuy/www.yohobuy.com/application/models/Product/Shop.php
yohobuy/www.yohobuy.com/application/models/Shopping/Pay.php
yohobuy/www.yohobuy.com/application/models/Shopping/Payment.php
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Notice.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
library/LibModels/Web/Product/PayData.php
View file @
d47fe68
...
...
@@ -25,6 +25,7 @@ class PayData
{
$param
=
Yohobuy
::
param
();
$param
[
'client_type'
]
=
'web'
;
$param
[
'uid'
]
=
intval
(
$uid
);
$param
[
'private_key'
]
=
Yohobuy
::
$privateKeyList
[
'web'
];
$param
[
'method'
]
=
'web.SpaceOrders.getOrderCountByUid'
;
...
...
yohobuy/www.yohobuy.com/application/models/Product/Item.php
View file @
d47fe68
...
...
@@ -199,13 +199,19 @@ class ItemModel
if
(
!
empty
(
$banner
[
'brandId'
]))
{
$domainBrand
=
BrandsModel
::
getBrandByDomain
(
$banner
[
'brandDomain'
]);
if
(
empty
(
$domainBrand
[
'type'
])
||
$domainBrand
[
'type'
]
!==
2
)
{
//多品店不显示
$banner
=
array
();
}
else
{
$basisData
=
ShopModel
::
basisTemplate
(
$domainBrand
[
'shopId'
]);
$banner
[
'bgImg'
]
=
empty
(
$basisData
[
'shopTopBanner'
][
'banner'
])
?
$banner
[
'bgImg'
]
:
$basisData
[
'shopTopBanner'
][
'banner'
];
if
(
!
empty
(
$domainBrand
[
'type'
])
&&
!
empty
(
$domainBrand
[
'shopId'
]))
{
switch
(
intval
(
$domainBrand
[
'type'
]))
{
case
1
:
//多品店不显示
$banner
=
array
();
break
;
case
2
:
//单品店显示新版的店铺banner
$basisData
=
ShopModel
::
basisTemplate
(
$domainBrand
[
'shopId'
]);
$banner
[
'bgImg'
]
=
empty
(
$basisData
[
'shopTopBanner'
][
'banner'
])
?
$banner
[
'bgImg'
]
:
$basisData
[
'shopTopBanner'
][
'banner'
];
break
;
}
}
}
...
...
yohobuy/www.yohobuy.com/application/models/Product/Shop.php
View file @
d47fe68
...
...
@@ -426,7 +426,10 @@ class ShopModel
}
}
return
$result
;
return
array
(
'title'
=>
empty
(
$result
[
0
][
'title'
])
?
''
:
$result
[
0
][
'title'
],
'list'
=>
$result
);
}
/**
...
...
@@ -571,13 +574,8 @@ class ShopModel
$list
=
self
::
$fun
(
self
::
getResourceData
(
$list
),
$parameters
);
switch
(
$fun
)
{
case
'shopTopBanner'
:
$data
[
$fun
]
=
$list
;
break
;
case
'signboard'
:
$data
[
$fun
]
=
array
(
'title'
=>
isset
(
$list
[
0
][
'title'
])
?
$list
[
0
][
'title'
]
:
''
,
'list'
=>
$list
);
$data
[
$fun
]
=
$list
;
break
;
}
}
...
...
yohobuy/www.yohobuy.com/application/models/Shopping/Pay.php
View file @
d47fe68
...
...
@@ -169,9 +169,10 @@ class PayModel
$orderCount
=
0
;
$orders
=
PayData
::
getOrderCountByUid
(
$uid
);
if
(
isset
(
$orders
[
'data'
])
&&
!
empty
(
$orders
[
'data'
]))
{
$orderCount
=
$orders
[
'data'
][
'total'
];
if
(
!
empty
(
$orders
[
'data'
][
'count'
]))
{
$orderCount
=
$orders
[
'data'
][
'count'
];
}
$result
[
'isOldUser'
]
=
(
intval
(
$orderCount
)
>
self
::
OLD_USER_LIMIT
)
?
true
:
false
;
// 订单数(用于订单统计)
$result
[
'orderCount'
]
=
$orderCount
;
...
...
yohobuy/www.yohobuy.com/application/models/Shopping/Payment.php
View file @
d47fe68
...
...
@@ -173,9 +173,10 @@ class PaymentModel
//查询用户订单数接口
$orders
=
PayData
::
getOrderCountByUid
(
$uid
);
if
(
isset
(
$orders
[
'data'
])
&&
!
empty
(
$orders
[
'data'
]))
{
$orderCount
=
$orders
[
'data'
][
'total'
];
if
(
!
empty
(
$orders
[
'data'
][
'count'
]))
{
$orderCount
=
$orders
[
'data'
][
'count'
];
}
$result
[
'isOldUser'
]
=
(
intval
(
$orderCount
)
>
self
::
OLD_USER_LIMIT
)
?
true
:
false
;
// 订单数(用于订单统计)
$result
[
'orderCount'
]
=
$orderCount
;
...
...
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Notice.php
View file @
d47fe68
...
...
@@ -5,7 +5,7 @@ use Shopping\PayModel;
use
WebPlugin\Pay\PayFactory
;
use
WebPlugin\Pay\Rspparams
;
use
WebPlugin\Pay\weixin\PayNotifyCallBack
;
use
WebPlugin\UdpLog
;
/**
* 支付Notice
*/
...
...
@@ -24,6 +24,7 @@ class NoticeController extends WebAction
public
function
alipaynoticeAction
()
{
$res
=
$this
->
getParseResponse
(
$_POST
,
2
);
UdpLog
::
info
(
"【支付宝异步】,function:alipaynoticeAction,参数"
,
array
(
'pars'
=>
$_POST
,
'res'
=>
$res
));
if
(
$res
->
payResult
!=
-
1
)
{
$this
->
payResultProc
(
$res
,
2
);
echo
"success"
;
...
...
@@ -37,6 +38,7 @@ class NoticeController extends WebAction
public
function
alipayreturnAction
()
{
$res
=
$this
->
getParseResponse
(
$_GET
,
2
);
UdpLog
::
info
(
"【支付宝同步】,function:alipayreturnAction,参数"
,
array
(
'pars'
=>
$_GET
,
'res'
=>
$res
));
$dealResult
=
$this
->
payResultProc
(
$res
,
2
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'支付宝'
);
$this
->
commonShowResult
(
$dealResult
);
...
...
@@ -48,6 +50,7 @@ class NoticeController extends WebAction
public
function
alibarcodenoticeAction
()
{
$res
=
$this
->
getParseResponse
(
$_POST
,
17
);
UdpLog
::
info
(
"【支付宝二维码支付异步】,function:alibarcodenoticeAction,参数"
,
array
(
'pars'
=>
$_POST
,
'res'
=>
$res
));
if
(
$res
->
payResult
!=
-
1
)
{
$this
->
payResultProc
(
$res
,
17
);
echo
"success"
;
...
...
@@ -61,6 +64,7 @@ class NoticeController extends WebAction
public
function
alibarcodereturnAction
()
{
$res
=
$this
->
getParseResponse
(
$_GET
,
17
);
UdpLog
::
info
(
"【支付宝二维码支付同步】,function:alibarcodereturnAction,参数"
,
array
(
'pars'
=>
$_GET
,
'res'
=>
$res
));
$dealResult
=
$this
->
payResultProc
(
$res
,
17
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'支付宝'
);
$this
->
commonShowResult
(
$dealResult
);
...
...
@@ -225,6 +229,7 @@ class NoticeController extends WebAction
$uid
=
$this
->
getSession
(
self
::
SESSION_UID_KEY
);
$this
->
setSession
(
self
::
SESSION_UID_KEY
,
null
);
}
UdpLog
::
info
(
"【微信扫码支付结果商户通知地址】,function:wechatqrcodenotifyAction"
);
$notify
=
new
PayNotifyCallBack
(
$uid
);
$notify
->
handle
(
false
);
}
...
...
@@ -248,6 +253,7 @@ class NoticeController extends WebAction
$payment
=
PayModel
::
getPaymentById
(
21
);
$payService
=
PayFactory
::
factory
(
$payment
);
$res
=
$payService
->
parseResponse
(
array
(
'orderCode'
=>
$orderCode
));
UdpLog
::
info
(
"【微信扫码支付返回】,function:wechatqrcodereturnAction,参数"
,
array
(
'pars'
=>
$_GET
,
'res'
=>
$res
));
$dealResult
=
$this
->
payResultProc
(
$res
,
21
);
$dealResult
[
'payData'
]
=
array
(
'payWay'
=>
'微信扫码支付'
);
}
while
(
false
);
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
d47fe68
...
...
@@ -95,7 +95,7 @@ class IndexController extends WebAction
//调用模型获得品牌页数据
$data
=
BrandsModel
::
getBrandSearchData
(
$condition
,
$options
);
$data
[
'signboard'
]
=
isset
(
$result
[
'signboard'
])
?
$result
[
'signboard'
]
:
''
;
//水牌
//统计前三个商品
$skn
=
array
();
$arr
=
array
();
...
...
@@ -315,7 +315,6 @@ class IndexController extends WebAction
*/
public
function
shopHome
(
$shopId
)
{
$domain
=
$this
->
param
(
'named'
);
// 设置头部数据
$this
->
setWebNavHeader
();
$misort
=
$this
->
get
(
'misort'
);
...
...
Please
register
or
login
to post a comment