|
@@ -105,10 +105,8 @@ export function getUser(params) {
|
|
|
export const UnityAction = {
|
|
|
event: {},
|
|
|
on(type, callback) {
|
|
|
- if (window.vuplex) {
|
|
|
- alert('----------on----------');
|
|
|
- addUnityListener();
|
|
|
- }
|
|
|
+ //修改添加unity时间监听时没有vuplex问题
|
|
|
+ addUnityListener();
|
|
|
if (!UnityAction.event[type]) {
|
|
|
UnityAction.event[type] = [];
|
|
|
}
|
|
@@ -151,7 +149,7 @@ export const UnityAction = {
|
|
|
},
|
|
|
};
|
|
|
|
|
|
-export function addUnityListener() {
|
|
|
+function addUnityListener() {
|
|
|
if (window.vuplex) {
|
|
|
window.vuplex.addEventListener('message', (e) => {
|
|
|
console.log(
|