Showing
3 changed files
with
4 additions
and
6 deletions
@@ -13,12 +13,10 @@ try { | @@ -13,12 +13,10 @@ try { | ||
13 | info = {}; | 13 | info = {}; |
14 | } | 14 | } |
15 | 15 | ||
16 | -orderInfo = function(key, value) { | 16 | +exports.orderInfo = function(key, value) { |
17 | if (value === undefined) { | 17 | if (value === undefined) { |
18 | return info[key]; | 18 | return info[key]; |
19 | } | 19 | } |
20 | info[key] = value; | 20 | info[key] = value; |
21 | window.setCookie('order-info', JSON.stringify(info)); | 21 | window.setCookie('order-info', JSON.stringify(info)); |
22 | }; | 22 | }; |
23 | - | ||
24 | -module.export = orderInfo; |
@@ -5,10 +5,10 @@ | @@ -5,10 +5,10 @@ | ||
5 | */ | 5 | */ |
6 | 6 | ||
7 | var $ = require('jquery'), | 7 | var $ = require('jquery'), |
8 | - orderInfo = require('./order-info'); | 8 | + orderInfo = require('./order-info').orderInfo; |
9 | 9 | ||
10 | $('.address-item').on('touchend', function() { | 10 | $('.address-item').on('touchend', function() { |
11 | - orderInfo('addressId', $(this).data('address_id')); | 11 | + orderInfo('addressId', $(this).data('address-id')); |
12 | }).on('touchend', '.edit', function() { | 12 | }).on('touchend', '.edit', function() { |
13 | window.location.href = $(this).data('href'); | 13 | window.location.href = $(this).data('href'); |
14 | return false; | 14 | return false; |
@@ -9,7 +9,7 @@ var $ = require('jquery'), | @@ -9,7 +9,7 @@ var $ = require('jquery'), | ||
9 | ellipsis = require('mlellipsis'), | 9 | ellipsis = require('mlellipsis'), |
10 | loading = require('../plugin/loading'), | 10 | loading = require('../plugin/loading'), |
11 | tip = require('../plugin/tip'), | 11 | tip = require('../plugin/tip'), |
12 | - orderInfo = require('./order-info'); | 12 | + orderInfo = require('./order-info').orderInfo; |
13 | 13 | ||
14 | var page = 1, | 14 | var page = 1, |
15 | canGetCoupon = true, | 15 | canGetCoupon = true, |
-
Please register or login to post a comment