fix(mini-user): use USER_MINI for WeChat SDK so OAuth token persists
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:
@@ -1,9 +1,8 @@
|
||||
import Taro from '@tarojs/taro';
|
||||
import { getWechatLocationDetailed } from '@dukang/weixin-sdk';
|
||||
import { API_BASE, getToken, request } from './api';
|
||||
import { API_BASE, CLIENT_APP, getToken, request } from './api';
|
||||
import { DEFAULT_REGION, regionFromGeo, type RegionSelection } from './region-data';
|
||||
import { FALLBACK_CITY_CODE } from './product-images';
|
||||
import { ClientApp } from '@dukang/shared-types';
|
||||
|
||||
export const GPS_CITY_STORAGE_KEY = 'dukang_gps_city';
|
||||
|
||||
@@ -123,7 +122,7 @@ function getMiniLocation(): Promise<Taro.getLocation.SuccessCallbackResult> {
|
||||
async function resolveViaH5Jssdk(): Promise<ResolvedUserCity | null> {
|
||||
const outcome = await getWechatLocationDetailed({
|
||||
apiBase: API_BASE,
|
||||
clientApp: ClientApp.USER_H5,
|
||||
clientApp: CLIENT_APP,
|
||||
getAccessToken: () => getToken() || null,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user