Authored by wangqing

增加trycatch

@@ -147,7 +147,15 @@ function actionGoodsCart() { @@ -147,7 +147,15 @@ function actionGoodsCart() {
147 if (typeof window.cookie(params.cookie) === 'undefined') { 147 if (typeof window.cookie(params.cookie) === 'undefined') {
148 cartInfo = null; 148 cartInfo = null;
149 } else { 149 } else {
150 - cartInfo = json2.parse(window.cookie(params.cookie)); 150 + if (params.cookie) {
  151 + try {
  152 + cartInfo = json2.parse(window.cookie(params.cookie));
  153 + } catch (e) {
  154 +
  155 + }
  156 +
  157 + }
  158 +
151 } 159 }
152 if (cartInfo != null) { 160 if (cartInfo != null) {
153 totalNum = parseInt(cartInfo._nac) + parseInt(cartInfo._ac); 161 totalNum = parseInt(cartInfo._nac) + parseInt(cartInfo._ac);
@@ -232,7 +240,7 @@ function actionGoodsCart() { @@ -232,7 +240,7 @@ function actionGoodsCart() {
232 }; 240 };
233 var params = ''; 241 var params = '';
234 242
235 - if (typeof (domain) === undefined || domain === '') { 243 + if (typeof(domain) === undefined || domain === '') {
236 return false; 244 return false;
237 } 245 }
238 params = $.extend(defaults, options); 246 params = $.extend(defaults, options);
@@ -759,10 +759,10 @@ @@ -759,10 +759,10 @@
759 .gobuy { 759 .gobuy {
760 margin-top: 47px; 760 margin-top: 47px;
761 margin-left: 23px; 761 margin-left: 23px;
762 - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAg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WVxTZxGy9RA+66AgqGYg8XSQ36F49RFkN306cyDMsuYfTONGhXPsGRUX20Wec6BUODIr88AgSGQ+flyTyDUkCOEkS7UPVgGiX+flIEj2rRWFk2JJEpuZpO41oCa5qkKwybMdhYiW8WIIOaP2HpIqkov9h06ycQN0jBtVmDusCOpTPJihAm8x1SVqRjEW5gmBDnYVW5KfWxeMC1uGSvPDTnSFNTEXKfdAbySegWZUbYbIWUVnLH7VDM+ndP4mm4Q6eYA6uI23LsKk2uDwj5+M6+BJgAFPmZONXOE3uAAAAAElFTkSuQmCC); 762 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAABc0lEQVRIx73VvS9DURjH8W+LTYTZfyBCIhLJM0pMNotJxCJi8xdYJWI0WFkstg6mumn1pxEikXiX2Fgog5dUBUNv5fa62tJzPdNznufc80lO7jknYWbrwDjVcQz0S3rDUSSBsYh6D9DnCqlAs0AaOAn1hlxCiUpiZgPAfqC3KmkyDqgFKAAdfukSGHFgFCXdJIIVM0sBoy63zI/FZKiQiQEBmPsv6C4M7QFPMUBeFeQfUMUO+RHH9m1HQZ5j5BY4ioJ2gaJDKCPp4xsk6RXIO4SyUL7rosJzCHm1oKwj5AE4rAXtACUHUE7S+4+QpGfKP0Wz4VWSZCOTmoitRqBl4LwJZE3S1/uWqDfbzDr/gJQkVd2ZdaEAaEAXkJb0Eup1U376DyRdRX2frE+AmS0BOSAFZMysNdDrBU6BDeDMzIb/DAHTgXwQGAiMJ4B2P28DppqBCqHxfSC/rTP3V9AMcA08AvOSLgK9FWCT8gHPAwtRC3wCDWxrvGA4PUcAAAAASUVORK5CYII=);
763 background-repeat: no-repeat; 763 background-repeat: no-repeat;
764 - width: 30px;  
765 - height: 30px; 764 + width: 26px;
  765 + height: 26px;
766 position: relative; 766 position: relative;
767 cursor: pointer; 767 cursor: pointer;
768 } 768 }