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)
     }
   }