fix:提交修复6个问题
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { getRuntimePlatform } from './env';
|
||||
import { ensureJssdkReady } from './jssdk';
|
||||
import { ensureJssdkReady, normalizeJssdkPageUrl } from './jssdk';
|
||||
import type { WeixinSdkConfig } from './types';
|
||||
|
||||
export type ChooseWechatImageOptions = {
|
||||
@@ -32,7 +32,7 @@ async function reportChooseImageEvent(
|
||||
errMsg: payload.errMsg,
|
||||
sourceType: payload.sourceType,
|
||||
stage: payload.stage,
|
||||
pageUrl: typeof window !== 'undefined' ? window.location.href.split('#')[0] : undefined,
|
||||
pageUrl: typeof window !== 'undefined' ? normalizeJssdkPageUrl(window.location.href) : undefined,
|
||||
}),
|
||||
});
|
||||
} catch {
|
||||
@@ -84,7 +84,7 @@ export async function chooseWechatImages(
|
||||
const sourceType = options.sourceType ?? ['album', 'camera'];
|
||||
|
||||
if (platform === 'wechat-h5') {
|
||||
const pageUrl = typeof window !== 'undefined' ? window.location.href.split('#')[0] : '';
|
||||
const pageUrl = typeof window !== 'undefined' ? normalizeJssdkPageUrl(window.location.href) : '';
|
||||
const sourceTypeKey = sourceType.join(',');
|
||||
try {
|
||||
await ensureJssdkReady({
|
||||
|
||||
Reference in New Issue
Block a user