fix:多平台兼容

This commit is contained in:
2026-03-16 11:52:27 +08:00
parent b3836b8bf2
commit a79cf10bd4
18 changed files with 358 additions and 295 deletions
+5 -3
View File
@@ -15,7 +15,7 @@ import { HELP_CONTENT } from "@/constants/help"
// import { GET_PHONE_NUMBER_URL } from "../config/url"
// 统一快捷登录 - 微信小程序登录(使用 /app/user/quickLogin
export const wxLogin = () => {
export const wxLogin = (phoneCode) => {
return new Promise((resolve, reject) => {
// 1. 获取微信登录凭证(code -> 后端换 openId
uni.login({
@@ -30,7 +30,8 @@ export const wxLogin = () => {
const result = await quickLogin({
loginType: 'WECHAT',
appid: appid,
code: loginRes.code
loginCode: loginRes.code,
code:phoneCode
})
if (result.code === 200 && result.data) {
@@ -91,7 +92,7 @@ export const alipayLogin = () => {
const result = await quickLogin({
loginType: 'ALIPAY',
appid: ZFBappid,
code: res.authCode
loginCode: res.authCode
})
if (result.code === 200 && result.data) {
@@ -143,6 +144,7 @@ export const alipayLogin = () => {
export const smsQuickLogin = (phonenumber, smsCode) => {
return quickLogin({
loginType: 'SMS',
appid: appid,
phonenumber,
smsCode
})