no message

This commit is contained in:
kuaifan 2022-05-29 21:58:37 +08:00
parent 7c1834107e
commit 77f6381eff
7 changed files with 27 additions and 15 deletions

View File

@ -95,7 +95,7 @@ export default {
}, 6000)
}
//
if (this.$openVlog) {
if (this.$openLog) {
$A.loadScript('js/vconsole.min.js', (e) => {
if (e !== null || typeof window.VConsole !== 'function') {
$A.modalAlert("vConsole 组件加载失败!");
@ -109,7 +109,6 @@ export default {
console.log('vConsole: onClearLog');
}
});
console.info('vConsole: Welcome');
});
}
}
@ -186,14 +185,14 @@ export default {
}
//
window.__onPagePause = () => {
if (this.$openVlog) {
if (this.$openLog) {
console.log('onPagePause');
}
this.$store.dispatch("getBasicData", -1)
}
//
window.__onPageResume = (num) => {
if (this.$openVlog) {
if (this.$openLog) {
console.log('onPageResume', num);
console.log('ws', this.ws, this.ws ? this.ws.readyState : null);
}

View File

@ -136,7 +136,7 @@ $A.isMainElectron = false;
$A.isSubElectron = false;
$A.isEEUiApp = isEEUiApp;
$A.isDesktop = $A.isDesktop();
$A.openVlog = $A.getStorageString("vlog::open") === "open";
$A.openLog = $A.getStorageString("log::open") === "open";
if (isElectron) {
$A.Electron = electron;
$A.Platform = /macintosh|mac os x/i.test(navigator.userAgent) ? "mac" : "win";
@ -151,7 +151,7 @@ Vue.prototype.$isMainElectron = $A.isMainElectron;
Vue.prototype.$isSubElectron = $A.isSubElectron;
Vue.prototype.$isEEUiApp = $A.isEEUiApp;
Vue.prototype.$isDesktop = $A.isDesktop;
Vue.prototype.$openVlog = $A.openVlog;
Vue.prototype.$openLog = $A.openLog;
Vue.config.productionTip = false;

View File

@ -59,7 +59,7 @@ export default {
msg = msg == this.audioId
}
if (typeof msg === "boolean") {
if (!msg && !ended) {
if (msg && !ended) {
audio.pause()
}
return

View File

@ -230,6 +230,16 @@ export default {
}
}
}, 1000)
//
if (this.$isEEUiApp) {
window.__onPermissionRequest = (type, result) => {
console.log(type, result);
if (type === 'recordAudio' && result === false) {
// Android
this.stopRecord(true);
}
}
}
},
beforeDestroy() {
if (this.quill) {
@ -675,6 +685,7 @@ export default {
this.recordRec.close();
}
}, (msg) => {
this.recordState = "stop";
$A.messageError(msg || '打开录音失败')
});
})

View File

@ -311,14 +311,16 @@ export default {
watch: {
dialogKey(val) {
switch (val) {
case 'vlog.open':
case 'vlog:open':
$A.setStorage("vlog::open", "open");
case 'log.open':
case 'log:open':
case 'eruda:open':
$A.setStorage("log::open", "open");
$A.reloadUrl();
break;
case 'vlog.close':
case 'vlog:close':
$A.setStorage("vlog::open", "close");
case 'log.close':
case 'log:close':
case 'eruda:close':
$A.setStorage("log::open", "close");
$A.reloadUrl();
break;
}

View File

@ -2256,7 +2256,7 @@ export default {
url = url.replace("http://", "ws://");
url += "?action=web&token=" + state.userToken;
//
const wgLog = $A.openVlog;
const wgLog = $A.openLog;
const wsRandom = $A.randomString(16);
state.wsRandom = wsRandom;
//

@ -1 +1 @@
Subproject commit 5e43f5d24edce45158d33acc4c71e9a9f8579cba
Subproject commit 6b0878b7e6ae7ade39bb8f5dfafdb332e0f022d3