Authored by 毕凯

修改 orderInfo 用法

... ... @@ -13,12 +13,10 @@ try {
info = {};
}
orderInfo = function(key, value) {
exports.orderInfo = function(key, value) {
if (value === undefined) {
return info[key];
}
info[key] = value;
window.setCookie('order-info', JSON.stringify(info));
};
module.export = orderInfo;
... ...
... ... @@ -5,10 +5,10 @@
*/
var $ = require('jquery'),
orderInfo = require('./order-info');
orderInfo = require('./order-info').orderInfo;
$('.address-item').on('touchend', function() {
orderInfo('addressId', $(this).data('address_id'));
orderInfo('addressId', $(this).data('address-id'));
}).on('touchend', '.edit', function() {
window.location.href = $(this).data('href');
return false;
... ...
... ... @@ -9,7 +9,7 @@ var $ = require('jquery'),
ellipsis = require('mlellipsis'),
loading = require('../plugin/loading'),
tip = require('../plugin/tip'),
orderInfo = require('./order-info');
orderInfo = require('./order-info').orderInfo;
var page = 1,
canGetCoupon = true,
... ...