feat: 添加微信小程序环境判断,优化插件导入逻辑
This commit is contained in:
parent
e8ce432e03
commit
eee81fafa9
@ -1,3 +1,5 @@
|
|||||||
|
// #ifdef MP-WEIXIN
|
||||||
module.exports = {
|
module.exports = {
|
||||||
wx
|
wx
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
// #ifdef MP-WEIXIN
|
||||||
const appParams = {
|
const appParams = {
|
||||||
appid: 123,
|
appid: 123,
|
||||||
appOauthId: 'xxx',
|
appOauthId: 'xxx',
|
||||||
@ -20,3 +21,4 @@ module.exports = {
|
|||||||
return requirePlugin('wechat-p2p-player')
|
return requirePlugin('wechat-p2p-player')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
|||||||
@ -126,8 +126,10 @@
|
|||||||
import { useUserStore } from '@/stores/user'
|
import { useUserStore } from '@/stores/user'
|
||||||
import { passthrough } from '@/api/sdk'
|
import { passthrough } from '@/api/sdk'
|
||||||
import { getLockNetTokenRequest } from '@/api/lock'
|
import { getLockNetTokenRequest } from '@/api/lock'
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
import * as A from './exportForXp2pPlugin'
|
import * as A from './exportForXp2pPlugin'
|
||||||
import * as B from './exportForPlayerPlugin'
|
import * as B from './exportForPlayerPlugin'
|
||||||
|
// #endif
|
||||||
|
|
||||||
const $bluetooth = useBluetoothStore()
|
const $bluetooth = useBluetoothStore()
|
||||||
const $basic = useBasicStore()
|
const $basic = useBasicStore()
|
||||||
@ -158,7 +160,9 @@
|
|||||||
const isVideoLoaded = ref(false)
|
const isVideoLoaded = ref(false)
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
console.log(A, B)
|
console.log(A, B)
|
||||||
|
// #endif
|
||||||
buttonInfo.value = await $basic.getButtonInfo()
|
buttonInfo.value = await $basic.getButtonInfo()
|
||||||
|
|
||||||
const { code, data, message } = await passthrough({
|
const { code, data, message } = await passthrough({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user