tangning %!s(int64=2) %!d(string=hai) anos
pai
achega
1bfa4e9162
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/views/mobile/index.vue

+ 2 - 1
src/views/mobile/index.vue

@@ -116,7 +116,8 @@ async function handleWxlogin(wxAppId: string) {
   } else if (code) {
     //存在code 换取openid
     const res = await wxLogin({ code, orderSn: orderSn.value })
-    if (!res.errmsg) {
+    console.log('openid',res)
+    if (res.openid) {
       setUserOpenId(res.openid)
     }
   }