谢杰标 2 rokov pred
rodič
commit
a045999d38

+ 12 - 3
common/authorize.js

@@ -47,15 +47,15 @@ export function bindCode(code) {
   }
   OfficialLogin({
     code,
-  }).then((res) => {
-    
-  });
+  }).then((res) => {});
 }
 
 // url获取code
 export function backCode(cb = bindCode) {
+  console.log(1321);
   let code = uni.getStorageSync("code");
   if (code) {
+    console.log(cb, "绑定");
     cb(code);
   }
   if (!location.search.includes("code")) {
@@ -66,6 +66,15 @@ export function backCode(cb = bindCode) {
   cb(code);
 }
 
+export function backCode1(cb = bindCode) {
+  if (!location.search.includes("code")) {
+    return;
+  }
+  code = getQueryString("code");
+  uni.setStorageSync("code", code);
+  cb(code);
+}
+
 export function isWechat() {
   var ua = window.navigator.userAgent.toLowerCase();
   return ua.match(/micromessenger/i) == "micromessenger";

+ 6 - 6
common/wechat.js

@@ -25,12 +25,12 @@ export default {
         signature: result.signature,
         jsApiList: this.jsApiList,
       });
-      jweixin.checkJsApi({
-        jsApiList: this.jsApiList,
-        success: function (res) {
-          console.log(res, 7897);
-        },
-      });
+      // jweixin.checkJsApi({
+      //   jsApiList: this.jsApiList,
+      //   success: function (res) {
+      //     console.log(res, 7897);
+      //   },
+      // });
       //配置完成后,再执行分享等功能
       if (callback) {
         callback(result);

+ 3 - 3
pages/cashout/index.vue

@@ -61,7 +61,7 @@
 
 <script>
 import { mapGetters } from "vuex";
-import { authorize, backCode } from "@/common/authorize";
+import { authorize, backCode1 } from "@/common/authorize";
 import { checkBindGzh, withdrawal } from "@/utils/user";
 export default {
   data() {
@@ -72,7 +72,7 @@ export default {
     };
   },
   onShow() {
-    backCode();
+    backCode1();
   },
   onLoad(options) {
     if (this.$method.isGoLogin()) {
@@ -80,7 +80,7 @@ export default {
     }
     this.options = options;
     if (options.isAuth) {
-      this.checkBindGzh();
+      authorize();
     }
   },
   methods: {

+ 9 - 3
pages/login/login.vue

@@ -107,7 +107,7 @@
 
 <script>
 import { encryptor } from "@/common/jse";
-import { loginSms, accountLogin, smsLogin } from "@/utils/login";
+import { loginSms, accountLogin, smsLogin, openidLogin } from "@/utils/login";
 import { authorize, backCode } from "@/common/authorize";
 export default {
   data() {
@@ -182,7 +182,7 @@ export default {
     authorize();
   },
   onShow() {
-    backCode();
+    backCode(this.openidLogin);
   },
   onReady() {
     this.$refs.uForm1.setRules(this.rules);
@@ -268,7 +268,7 @@ export default {
       this.current = index;
     },
     loginCallback(data) {
-      backCode()
+      backCode();
       this.$store.commit("LOGIN_CB", data);
       this.$store.dispatch("getUserInfo").then((res) => {
         if (this.options.backBill) {
@@ -289,6 +289,12 @@ export default {
         }
       });
     },
+    openidLogin(code) {
+      openidLogin({ openid: code }).then((data) => {
+        this.$store.commit("LOGIN_CB", data);
+        this.$store.dispatch("getUserInfo");
+      });
+    },
   },
 };
 </script>

+ 0 - 2
unpackage/dist/build/h5/index.html

@@ -1,2 +0,0 @@
-<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>saas_manager</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.0bcb0f8b.js></script><script src=/static/js/index.7b11bd3c.js></script></body></html>

BIN
unpackage/dist/build/h5/static/image/login_bg.jpg


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/h5/static/jsencrypt.min.js


BIN
unpackage/dist/build/h5/static/logo.png


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov