Merge branch 'fanpeng' into 'develop'

feat: 添加微信小程序环境判断,优化插件导入逻辑

See merge request StarlockTeam/wx-starlock!44
This commit is contained in:
范鹏 2025-06-16 05:56:17 +00:00
commit ba45c6b8f4
3 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,5 @@
// #ifdef MP-WEIXIN
module.exports = {
wx
}
// #endif

View File

@ -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

View File

@ -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({