门店端微信号自动登录
This commit is contained in:
@@ -8,8 +8,7 @@ import {
|
||||
checkNeedsWechatAuth,
|
||||
fetchShopAccount,
|
||||
handleShopWechatCallback,
|
||||
saveShopWechatAuth,
|
||||
sessionFromWechatLogin,
|
||||
handleShopWechatLoginResult,
|
||||
} from '../lib/wechat-auth';
|
||||
import { isWechatEnv, weixinSdk } from '../lib/weixin';
|
||||
import { stripOAuthParamsFromLocation } from '@dukang/weixin-sdk';
|
||||
@@ -56,9 +55,8 @@ export default function HomePage() {
|
||||
void handleShopWechatCallback()
|
||||
.then((result) => {
|
||||
if (!result) return;
|
||||
const session = sessionFromWechatLogin(result);
|
||||
const session = handleShopWechatLoginResult(result);
|
||||
if (session) {
|
||||
saveShopWechatAuth(result);
|
||||
applySession(session);
|
||||
}
|
||||
setAuthModalOpen(false);
|
||||
|
||||
Reference in New Issue
Block a user