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

View File

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

View File

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

View File

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

View File

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

View File

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

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