zhengkaixin 4 vuotta sitten
vanhempi
commit
946911dee6
1 muutettua tiedostoa jossa 16 lisäystä ja 5 poistoa
  1. 16 5
      src/components/Common.vue

+ 16 - 5
src/components/Common.vue

@@ -56,7 +56,18 @@
 			if (isWeiXin()) {
 				if (this.checkOpenId) {
 					if (!this.openId) {
-						this.getOpenid();
+                        if(this.$route.query.openId){
+                            debugger
+                             this.set_openid(this.$route.query.openId);
+
+                            //角色判定调用不同的信息获取详情
+                            this.getDataByOpenId(this.$route.query.openId);
+                        }else{
+                            this.getOpenid();
+
+                        }
+
+
 					} else {
 						this.getDataByOpenId();
 					}
@@ -108,15 +119,15 @@
 				}
 			},
 			//角色判定调用不同的信息获取详情
-			getDataByOpenId() {
-				this.getUserInfoByOpenId();
+			getDataByOpenId(opid) {
+				this.getUserInfoByOpenId(opid);
 			},
 			//获取用户详情
-			getUserInfoByOpenId() {
+			getUserInfoByOpenId(opid) {
 				this.isLoading = true;
 				
 				var type = type || '';
-				API_WeiXin.getDataByOpenId(this.openId).then(response => {
+				API_WeiXin.getDataByOpenId(opid||this.openId).then(response => {
 					
 					this.isLoading = false;