ソースを参照

修改地址bug.

zhangfufeng 1 週間 前
コミット
a19a669887
1 ファイル変更4 行追加1 行削除
  1. 4 1
      pages/checkout/checkout.vue

+ 4 - 1
pages/checkout/checkout.vue

@@ -566,7 +566,10 @@
 				var addressId = uni.getStorageSync('addressId');
 				if (addressId === '') {
 					addressId = 0;
-				}
+				}else if (typeof addressId === 'number') {
+        } else if ( (typeof addressId === 'string'&& addressId.indexOf("{") !== -1)||addressId.length>20) {
+          addressId = JSON.parse(addressId).id;
+        }
 				var couponId = uni.getStorageSync('couponId');
 				if (couponId === '') {
 					couponId = 0;