fix(mini-user): H5 pay use USER_H5; center login phone input
CI / verify (pull_request) Has been cancelled
CI / verify (pull_request) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,11 +2,10 @@ import { createWeixinSdk, isWechatEnv } from '@dukang/weixin-sdk';
|
||||
import { API_BASE, CLIENT_APP, getToken } from './api';
|
||||
|
||||
/**
|
||||
* H5 公众号内 JSSDK(分享 / OAuth / 支付)须与业务 API 使用同一 X-Client-App。
|
||||
* mini-user 全端(含 H5 产物)统一为 USER_MINI,否则 OAuth 登录签发的 JWT
|
||||
* 与本地请求头 USER_MINI 不匹配 → 401 清登录 → 反复拉起微信授权。
|
||||
*
|
||||
* (历史 h5-user 仍用 USER_H5;公众号能力由后端凭证配置,不依赖该 ClientApp 标签。)
|
||||
* H5 与业务 API 共用 CLIENT_APP:
|
||||
* - H5 → USER_H5(公众号 OAuth openId + 公众号支付 appId)
|
||||
* - 小程序 → USER_MINI
|
||||
* 须与 JWT 签发一致,才能同时避免「反复授权」与「appid/openid 不匹配」。
|
||||
*/
|
||||
export const weixinSdk = createWeixinSdk({
|
||||
apiBase: API_BASE,
|
||||
|
||||
Reference in New Issue
Block a user