Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
8 years ago
Commit
4384288d4808c82c258bf98ee69d48f534a3a975
1 parent
f04acfae
cookie-product-sku
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
apps/cart/controllers/buy-now-controller.js
public/js/buynow/order-ensure.page.js
apps/cart/controllers/buy-now-controller.js
View file @
4384288
...
...
@@ -2,7 +2,6 @@
* @Author: Targaryen
* @Date: 2017-06-21 10:15:38
* @Last Modified by: Targaryen
* @Last Modified time: 2017-06-28 15:04:29
*/
const
_
=
require
(
'lodash'
);
const
co
=
require
(
'bluebird'
).
coroutine
;
...
...
@@ -48,6 +47,10 @@ class BuyNowController {
return
next
();
}
if
(
product_sku
!==
orderInfo
.
product_sku
)
{
orderInfo
=
{};
}
co
(
function
*
()
{
let
result
=
yield
req
.
ctx
(
BuyNowModel
).
payment
({
uid
:
req
.
user
.
uid
,
...
...
public/js/buynow/order-ensure.page.js
View file @
4384288
...
...
@@ -2,7 +2,6 @@
* @Author: Targaryen
* @Date: 2017-06-21 10:30:21
* @Last Modified by: Targaryen
* @Last Modified time: 2017-06-27 15:04:06
*/
require
(
'buynow/order-ensure.page.css'
);
const
$
=
require
(
'yoho-jquery'
);
...
...
@@ -41,17 +40,8 @@ require('common');
lazyLoad
();
/**
* Cookie Init
*/
function
orderInfoInit
()
{
let
product_sku
=
qs
.
product_sku
;
if
(
orderInfo
(
'product_sku'
)
!==
product_sku
)
{
cookie
.
remove
([
'buynow_info'
]);
orderInfo
(
'product_sku'
,
product_sku
);
}
}
// 存 COOKIE
orderInfo
(
'product_sku'
,
qs
.
product_sku
);
function
getQueryParam
()
{
let
queryArray
=
location
.
search
.
substr
(
1
).
split
(
'&'
),
...
...
@@ -526,4 +516,3 @@ $(window).scroll(function() {
$
(
'.address-bottom'
).
hide
();
}
});
orderInfoInit
();
...
...
Please
register
or
login
to post a comment