diff --git a/pages/p2p/exportForPlayerPlugin.js b/pages/p2p/exportForPlayerPlugin.js index 7012535..84bcf96 100644 --- a/pages/p2p/exportForPlayerPlugin.js +++ b/pages/p2p/exportForPlayerPlugin.js @@ -1,3 +1,5 @@ +// #ifdef MP-WEIXIN module.exports = { wx } +// #endif diff --git a/pages/p2p/exportForXp2pPlugin.js b/pages/p2p/exportForXp2pPlugin.js index 861f36d..d473893 100644 --- a/pages/p2p/exportForXp2pPlugin.js +++ b/pages/p2p/exportForXp2pPlugin.js @@ -1,3 +1,4 @@ +// #ifdef MP-WEIXIN const appParams = { appid: 123, appOauthId: 'xxx', @@ -20,3 +21,4 @@ module.exports = { return requirePlugin('wechat-p2p-player') } } +// #endif diff --git a/pages/p2p/p2pPlayer.vue b/pages/p2p/p2pPlayer.vue index ab83dbb..12f1afb 100644 --- a/pages/p2p/p2pPlayer.vue +++ b/pages/p2p/p2pPlayer.vue @@ -126,8 +126,10 @@ import { useUserStore } from '@/stores/user' import { passthrough } from '@/api/sdk' import { getLockNetTokenRequest } from '@/api/lock' + // #ifdef MP-WEIXIN import * as A from './exportForXp2pPlugin' import * as B from './exportForPlayerPlugin' + // #endif const $bluetooth = useBluetoothStore() const $basic = useBasicStore() @@ -158,7 +160,9 @@ const isVideoLoaded = ref(false) onMounted(async () => { + // #ifdef MP-WEIXIN console.log(A, B) + // #endif buttonInfo.value = await $basic.getButtonInfo() const { code, data, message } = await passthrough({