tangning 2 년 전
부모
커밋
1bfa4e9162
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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)
     }
   }