Ver Fonte

授权路劲修改

谢杰标 há 2 anos atrás
pai
commit
df233b011a
1 ficheiros alterados com 5 adições e 4 exclusões
  1. 5 4
      pages/index/index.vue

+ 5 - 4
pages/index/index.vue

@@ -456,12 +456,13 @@ export default {
       uni.setStorageSync("h5_code", this.optObj.code);
       this.OfficialLogin();
     } else {
-      console.log("没有code");
       // 没有code,就重定向到地址https://www.xyyxt.net?ask_type=h.xyyxt.net 去获取code,授权后就会把code带上然后访问域名
       // h.gdzzkj.net
-      if (!uni.getStorageSync('h5_code')) {
-      	location.replace('https://www.xyyxt.net/?ask_type=h.gdzzkj.net')
-      	return
+      if (!uni.getStorageSync("h5_code")) {
+        let ask_type =
+          tenantId == "867735392558919680" ? "h.xyyxt.net" : "h.gdzzkj.net";
+        location.replace("https://www.xyyxt.net/?ask_type=" + ask_type);
+        return;
       }
     }
     // #endif