6.6
This commit is contained in:
parent
8cc5a7bcdd
commit
5aed5a6177
@ -7,8 +7,9 @@ import '@vant/touch-emulator';
|
||||
import '../public/uni.webview.1.5.6.js';
|
||||
// import '../../set-vue/src/assets/icon/iconfont.js';
|
||||
import '../src/assets/icon/iconfont'
|
||||
// const VConsole = require('vconsole');
|
||||
// new VConsole(); // 初始化vConsole
|
||||
// import '../public/jweixin-1.3.2'
|
||||
const VConsole = require('vconsole');
|
||||
new VConsole(); // 初始化vConsole
|
||||
if (/xazn/.test(navigator.userAgent) || /uni-app/.test(navigator.userAgent)) {
|
||||
// 在App中
|
||||
console.log("UniAppJSBridgeReady 事件已触发");
|
||||
|
@ -48,7 +48,8 @@ export default {
|
||||
]);
|
||||
|
||||
// 从父页面接收的权限控制字符串(8位二进制)
|
||||
const permissionString = ref('00000000'); // 默认全部隐藏
|
||||
// const permissionString = ref('00000000'); // 默认全部隐藏
|
||||
const permissionString = ref('11111111');
|
||||
|
||||
// 计算属性:过滤出需要显示的菜单项
|
||||
const filteredMenuItems = computed(() => {
|
||||
|
@ -123,29 +123,44 @@ export default {
|
||||
// );
|
||||
// };
|
||||
|
||||
const MQTT_send = (send_string) => {
|
||||
console.log("向父页面发送消息:", JSON.stringify(send_string));
|
||||
// const MQTT_send = (send_string) => {
|
||||
// console.log("向父页面发送消息:", JSON.stringify(send_string));
|
||||
|
||||
// // 统一的消息发送方法,兼容各平台
|
||||
// if (typeof uni !== 'undefined' && uni.postMessage) {
|
||||
// // 小程序/APP环境下使用uni.postMessage
|
||||
// uni.postMessage({
|
||||
// data: {
|
||||
// type: 'mqtt_data',
|
||||
// payload: send_string,
|
||||
// timestamp: Date.now()
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// // H5环境下使用window.parent.postMessage
|
||||
// window.parent.postMessage(
|
||||
// {
|
||||
// data: send_string
|
||||
// },
|
||||
// '*' // 目标 origin,生产环境应替换为具体的父页面域名
|
||||
// );
|
||||
// }
|
||||
// };
|
||||
|
||||
const MQTT_send = (send_string) => {
|
||||
console.log("向父页面发送消息:", JSON.stringify(send_string));
|
||||
|
||||
// 统一使用uni.postMessage方法发送消息
|
||||
uni.postMessage({
|
||||
data: {
|
||||
type: 'mqtt_data',
|
||||
payload: send_string,
|
||||
timestamp: Date.now()
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 统一的消息发送方法,兼容各平台
|
||||
if (typeof uni !== 'undefined' && uni.postMessage) {
|
||||
// 小程序/APP环境下使用uni.postMessage
|
||||
uni.postMessage({
|
||||
data: {
|
||||
type: 'mqtt_data',
|
||||
payload: send_string,
|
||||
timestamp: Date.now()
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// H5环境下使用window.parent.postMessage
|
||||
window.parent.postMessage(
|
||||
{
|
||||
data: send_string
|
||||
},
|
||||
'*' // 目标 origin,生产环境应替换为具体的父页面域名
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
@ -225,6 +225,8 @@ export default {
|
||||
const runningtime = ref("1");
|
||||
const pauseduration = ref("1");
|
||||
const playlist = ref([]); // 播放列表数组
|
||||
|
||||
|
||||
const eventplaylist = ref([]); // 事件播放列表数组
|
||||
const showOptionsDialog = ref(false); // 控制 Dialog 显示状态
|
||||
const selectedOption = ref(""); // 用于指示哪个列表要被添加
|
||||
|
Loading…
x
Reference in New Issue
Block a user