Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
cailing
9 years ago
Commit
320236528a7932701f2884f3aef159b8a1e883d8
2 parents
1e771bde
9dd9b475
Merge branch 'feature/wap4.3' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
9 deletions
library/LibModels/Wap/Home/CartData.php
static/dist/myohobuy/assets/img/coupon/.DS_Store
static/js/me/pay.js
static/sass-old/cart/_order-ensure.scss
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
yohobuy/m.yohobuy.com/application/modules/Shopping/controllers/Pay.php
library/LibModels/Wap/Home/CartData.php
View file @
3202365
...
...
@@ -438,5 +438,24 @@ class CartData
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
/**
* 选择支付,校验时间间隔,插入数据
* @param string $uid
* @param string $orderCode
* @param int $payment 14:银联手机支付 15:支付宝手机 18:支付宝wap(wap) 19:微信支付 22:微信wap(wap) 26:QQ钱包手机支付
* @return type
*/
public
static
function
savePrePayInfo
(
$uid
,
$orderCode
,
$payment
)
{
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.order.savePrePayInfo'
;
$param
[
'uid'
]
=
$uid
;
$param
[
'orderCode'
]
=
$orderCode
;
$param
[
'payment'
]
=
$payment
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
get
(
Yohobuy
::
API_URL
,
$param
);
}
}
...
...
static/dist/myohobuy/assets/img/coupon/.DS_Store
0 → 100644
View file @
3202365
No preview for this file type
static/js/me/pay.js
View file @
3202365
...
...
@@ -165,3 +165,21 @@ loading.showLoadingMask();
$
(
document
).
ready
(
main
);
$
(
'.box'
).
on
(
'click'
,
function
()
{
var
url
=
$
(
'.payapp-list a'
).
attr
(
'href'
),
theRequest
=
[],
orderCode
,
payment
;
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
{
theRequest
=
url
.
split
(
'?'
)[
1
].
split
(
"&"
);
orderCode
=
theRequest
[
0
].
split
(
'='
)[
1
];
payment
=
theRequest
[
1
].
split
(
'='
)[
1
];
}
$
.
ajax
({
url
:
'/shopping/pay/addPaymentInterval?orderCode='
+
orderCode
+
'&payment='
+
payment
,
method
:
'get'
});
});
...
...
static/sass-old/cart/_order-ensure.scss
View file @
3202365
...
...
@@ -19,6 +19,9 @@
color
:
#f00
;
}
}
.goods-bottom
{
padding-bottom
:
0
;
}
.border-none
{
border-bottom
:none
!
important
;
}
...
...
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
View file @
3202365
...
...
@@ -76,16 +76,15 @@
</div>
</section>
{
{#if
isJit
}
}
{
{>
me/order/jit-more
}
}
{
{/if
}
}
<section
class=
"block mt0"
style=
"margin-bottom: 0;"
>
{
{#each
goods
}
}
{
{>
me/order/good
}
}
{
{/each
}
}
<section
class=
"block goods-bottom"
>
{
{#if
isJit
}
}
{
{>
me/order/jit-more
}
}
{
{/if
}
}
{
{#each
goods
}
}
{
{>
me/order/good
}
}
{
{/each
}
}
<div
class=
"goods-num"
>共
{
{num
}
}件商品
合计<span>¥
{
{goodsPrice
}
}</span></div>
</section>
<div
class=
"goods-num"
>共
{
{num
}
}件商品
合计<span>¥
{
{goodsPrice
}
}</span></div>
<section
class=
"block"
>
<ul
class=
"sale-invoice"
>
...
...
yohobuy/m.yohobuy.com/application/modules/Shopping/controllers/Pay.php
View file @
3202365
...
...
@@ -3,6 +3,7 @@
use
Action\AbstractAction
;
use
Plugin\Helpers
;
use
LibModels\Wap\Home\OrderData
;
use
LibModels\Wap\Home\CartData
;
use
Plugin\Pay\weixin\JsApiPay
;
use
Plugin\Pay\weixin\lib\WxPayUnifiedOrder
;
use
Plugin\Pay\weixin\lib\WxPayApi
;
...
...
@@ -131,5 +132,33 @@ class PayController extends AbstractAction
}
while
(
false
);
}
/**
* 选择支付时,时间间隔校验插入
*/
public
function
addPaymentIntervalAction
()
{
$data
=
array
(
'code'
=>
400
,
'message'
=>
''
,
'data'
=>
''
);
do
{
if
(
!
$this
->
isAjax
())
{
break
;
}
$uid
=
$this
->
getUid
(
TRUE
);
$orderCode
=
$this
->
get
(
'orderCode'
,
''
);
$payment
=
$this
->
get
(
'payment'
,
0
);
if
(
!
$uid
||
!
$orderCode
||
!
$payment
)
{
break
;
}
$res
=
CartData
::
savePrePayInfo
(
$uid
,
$orderCode
,
$payment
);
$data
=
array
(
'code'
=>
$res
[
'code'
],
'message'
=>
$res
[
'message'
],
'data'
=>
$res
[
'data'
]);
}
while
(
false
);
$this
->
echoJson
(
$data
);
}
}
...
...
Please
register
or
login
to post a comment