高敬炎 il y a 2 ans
Parent
commit
ce4639972b
1 fichiers modifiés avec 13 ajouts et 2 suppressions
  1. 13 2
      xiaochengxu/pages/cardHolder/scanCodeAddCard.vue

+ 13 - 2
xiaochengxu/pages/cardHolder/scanCodeAddCard.vue

@@ -338,10 +338,21 @@
 			})
 			that = this
 			console.log(options)
-			this.id = options.id.indexOf(",") ? options.id.split(",")[0] : options.id
+			if(options.id){
+				this.id = options.id.indexOf(",") ? options.id.split(",")[0] : options.id
+			}else if(options.q){
+				var id = decodeURIComponent(options.q).split("=")[1]
+				this.id =id.indexOf(",") ? id.split(",")[0] : id
+			}
 			if (uni.getStorageSync("userInfo").phone) {
 				this.userInfo = uni.getStorageSync("userInfo")
-				this.commonId = options.id.indexOf(",") ? options.id.split(",")[1] : ''
+				if(options.q){
+					var id = decodeURIComponent(options.q).split("=")[1]
+					this.commonId =id.indexOf(",") ? id.split(",")[1] : ''
+				}else{
+					this.commonId = options.id.indexOf(",") ? options.id.split(",")[1] : ''
+				}
+				
 				
 				this.getList()