Showing
1 changed file
with
3 additions
and
4 deletions
@@ -3,8 +3,7 @@ | @@ -3,8 +3,7 @@ | ||
3 | * @author: bikai<kai.bi@yoho.cn> | 3 | * @author: bikai<kai.bi@yoho.cn> |
4 | * @date: 2015/12/14 | 4 | * @date: 2015/12/14 |
5 | */ | 5 | */ |
6 | -const cookie = require('yoho-cookie'); | ||
7 | -let info = cookie.get('order-info'); | 6 | +let info = window.cookie('order-info'); |
8 | 7 | ||
9 | // cookie 参数 | 8 | // cookie 参数 |
10 | let actCkOpthn = { | 9 | let actCkOpthn = { |
@@ -29,7 +28,7 @@ function init() { | @@ -29,7 +28,7 @@ function init() { | ||
29 | msg: null, | 28 | msg: null, |
30 | cartType: 'ordinary' | 29 | cartType: 'ordinary' |
31 | }; | 30 | }; |
32 | - cookie.set('order-info', JSON.stringify(info), actCkOpthn); | 31 | + window.setCookie('order-info', JSON.stringify(info), actCkOpthn); |
33 | } | 32 | } |
34 | 33 | ||
35 | // info 必须是 JSON 字符串 | 34 | // info 必须是 JSON 字符串 |
@@ -45,5 +44,5 @@ exports.orderInfo = function(key, value) { | @@ -45,5 +44,5 @@ exports.orderInfo = function(key, value) { | ||
45 | return info[key]; | 44 | return info[key]; |
46 | } | 45 | } |
47 | info[key] = value; | 46 | info[key] = value; |
48 | - cookie.set('order-info', JSON.stringify(info), actCkOpthn); | 47 | + window.setCookie('order-info', JSON.stringify(info), actCkOpthn); |
49 | }; | 48 | }; |
-
Please register or login to post a comment